summaryrefslogtreecommitdiffstats
path: root/package/acx-mac80211/patches/003-mac80211_fixes.diff
blob: 62052b352b29f16ac14aa2ac48a7e122aa0bd73c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
Index: acx-mac80211-20071003/common.c
===================================================================
--- acx-mac80211-20071003.orig/common.c	2007-10-15 21:33:40.000000000 +0800
+++ acx-mac80211-20071003/common.c	2007-10-16 10:01:58.000000000 +0800
@@ -1683,7 +1683,9 @@
 */
 void
 acx_i_set_multicast_list(struct ieee80211_hw *hw,
-                            unsigned short netflags, int mc_count)
+                         unsigned int changed_flags,
+                         unsigned int *total_flags,
+                         int mc_count, struct dev_addr_list *mc_list)
 {
         acx_device_t *adev = ieee2adev(hw);
         unsigned long flags;
@@ -1692,9 +1694,12 @@
 
         acx_lock(adev, flags);
 
+        *total_flags &= (FIF_PROMISC_IN_BSS | FIF_ALLMULTI);
+        if ((changed_flags & (FIF_PROMISC_IN_BSS | FIF_ALLMULTI)) == 0)
+                return;
         /* firmwares don't have allmulti capability,
          * so just use promiscuous mode instead in this case. */
-        if (netflags & (IFF_PROMISC | IFF_ALLMULTI)) {
+        if (*total_flags) {
                 SET_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
                 CLEAR_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
                 SET_BIT(adev->set_mask, SET_RXCONFIG);
@@ -4523,8 +4528,8 @@
 */
 
 int acx_net_set_key(struct ieee80211_hw *ieee,
-		    set_key_cmd cmd,
-		    u8 * addr, struct ieee80211_key_conf *key, int aid)
+		    enum set_key_cmd cmd, const u8 *local_addr,
+		    const u8 * addr, struct ieee80211_key_conf *key)
 {
 //      return 0;
 	struct acx_device *adev = ieee2adev(ieee);
@@ -4536,11 +4541,11 @@
 //	TODO();
 	switch (key->alg) {
 	default:
-	case ALG_NONE:
+/*	case ALG_NONE:
 	case ALG_NULL:
 		algorithm = ACX_SEC_ALGO_NONE;
 		break;
-	case ALG_WEP:
+*/	case ALG_WEP:
 		if (key->keylen == 5)
 			algorithm = ACX_SEC_ALGO_WEP;
 		else
@@ -4565,20 +4570,21 @@
 		if (err)
 			goto out_unlock;
 		key->hw_key_idx = index;
-		CLEAR_BIT(key->flags, IEEE80211_KEY_FORCE_SW_ENCRYPT);
-		if (CHECK_BIT(key->flags, IEEE80211_KEY_DEFAULT_TX_KEY))
-			adev->default_key_idx = index;
+/*		CLEAR_BIT(key->flags, IEEE80211_KEY_FORCE_SW_ENCRYPT);*/
+/*		if (CHECK_BIT(key->flags, IEEE80211_KEY_DEFAULT_TX_KEY))
+			adev->default_key_idx = index;*/
+                SET_BIT(key->flags, IEEE80211_KEY_FLAG_GENERATE_IV);
 		adev->key[index].enabled = 1;
 		break;
 	case DISABLE_KEY:
 		adev->key[index].enabled = 0;
 		err = 0;
 		break;
-	case REMOVE_ALL_KEYS:
+/*	case REMOVE_ALL_KEYS:
 		acx_clear_keys(adev);
 		err = 0;
 		break;
-     /* case ENABLE_COMPRESSION:
+*/    /* case ENABLE_COMPRESSION:
 	case DISABLE_COMPRESSION:
 		err = 0;
 		break; */
Index: acx-mac80211-20071003/pci.c
===================================================================
--- acx-mac80211-20071003.orig/pci.c	2007-10-15 21:33:40.000000000 +0800
+++ acx-mac80211-20071003/pci.c	2007-10-15 21:34:29.000000000 +0800
@@ -87,7 +87,7 @@
 static void disable_acx_irq(acx_device_t * adev);
 
 static int acxpci_e_open(struct ieee80211_hw *hw);
-static int acxpci_e_close(struct ieee80211_hw *hw);
+static void acxpci_e_close(struct ieee80211_hw *hw);
 static void acxpci_s_up(struct ieee80211_hw *hw);
 static void acxpci_s_down(struct ieee80211_hw *hw);
 
@@ -1414,12 +1414,12 @@
         .conf_tx = acx_net_conf_tx,
         .add_interface = acx_add_interface,
         .remove_interface = acx_remove_interface,
-	.open = acxpci_e_open,
+	.start = acxpci_e_open,
 	.stop = acxpci_e_close,
-        .reset = acx_net_reset,
+/*        .reset = acx_net_reset,*/
         .config = acx_net_config,
         .config_interface = acx_config_interface,
-        .set_multicast_list = acx_i_set_multicast_list,
+        .configure_filter = acx_i_set_multicast_list,
         .set_key = acx_net_set_key,
         .get_stats = acx_e_get_stats,
         .get_tx_stats = acx_net_get_tx_stats,
@@ -1454,9 +1454,7 @@
 		       pci_name(pdev));
 		goto fail_alloc_netdev;
 	}
-	ieee->flags &=	 ~IEEE80211_HW_RX_INCLUDES_FCS &
-			 ~IEEE80211_HW_MONITOR_DURING_OPER |
-			 IEEE80211_HW_WEP_INCLUDE_IV;
+	ieee->flags &=	 ~IEEE80211_HW_RX_INCLUDES_FCS;
 	ieee->queues = 1;
 
 	/* (NB: memsets to 0 entire area) */
@@ -2113,7 +2111,7 @@
 **	>0	f/w reported error
 **	<0	driver reported error
 */
-static int acxpci_e_close(struct ieee80211_hw *hw)
+static void acxpci_e_close(struct ieee80211_hw *hw)
 {
 	acx_device_t *adev = ieee2adev(hw);
 	unsigned long flags;
@@ -2142,7 +2140,6 @@
 
 	log(L_INIT, "closed device\n");
 	FN_EXIT0;
-	return OK;
 }
 
 
@@ -4145,9 +4142,7 @@
 		       vdev->dev.bus_id);
 		goto fail_alloc_netdev;
 	}
-	ieee->flags &=	 (~IEEE80211_HW_RX_INCLUDES_FCS &
-			  ~IEEE80211_HW_MONITOR_DURING_OPER) |
-			 IEEE80211_HW_WEP_INCLUDE_IV;
+	ieee->flags &=	 ~IEEE80211_HW_RX_INCLUDES_FCS;
 	ieee->queues = 1;
 
 	adev = ieee2adev(ieee);
Index: acx-mac80211-20071003/acx_func.h
===================================================================
--- acx-mac80211-20071003.orig/acx_func.h	2007-10-15 21:33:40.000000000 +0800
+++ acx-mac80211-20071003/acx_func.h	2007-10-15 21:36:01.000000000 +0800
@@ -610,10 +610,9 @@
 		struct ieee80211_if_init_conf *conf);
 int acx_net_reset(struct ieee80211_hw* ieee);
 int acx_net_set_key(struct ieee80211_hw *hw, 
-		set_key_cmd cmd,
-		u8 *addr,
-		struct ieee80211_key_conf *key,
-		int aid);
+		enum set_key_cmd cmd,
+		const u8 *local_addr, const u8 *addr,
+		struct ieee80211_key_conf *key);
 int acx_config_interface(struct ieee80211_hw* ieee, int if_id, 
 		struct ieee80211_if_conf *conf);
 int acx_net_config(struct ieee80211_hw* ieee, struct ieee80211_conf *conf);
@@ -625,7 +624,9 @@
 int acxpci_s_reset_dev(acx_device_t *adev);
 void acx_e_after_interrupt_task(struct work_struct* work);
 void acx_i_set_multicast_list(struct ieee80211_hw *hw,
-                            unsigned short netflags, int mc_count);
+                            unsigned int changed_flags,
+                            unsigned int *total_flags,
+                            int mc_count, struct dev_addr_list *mc_list);
 
 /*** End DeviceScape Functions **/