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