diff options
author | David S. Miller <davem@davemloft.net> | 2009-10-29 05:47:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-29 05:47:13 -0400 |
commit | ed3f2e40f3d438f4a1ec0a898173116cb26f106a (patch) | |
tree | f50e1c5f5f3511539084d9529e592e3fb0352607 /net | |
parent | fb699dfd426a189fe33b91586c15176a75c8aed0 (diff) | |
parent | bd6b4442ff3cee73f73987cf0c0e66ea677aa075 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/iface.c | 4 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 22 | ||||
-rw-r--r-- | net/mac80211/rx.c | 21 | ||||
-rw-r--r-- | net/mac80211/scan.c | 10 | ||||
-rw-r--r-- | net/wireless/mlme.c | 45 |
6 files changed, 49 insertions, 57 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 87aff1d923ba..14f10eb91c5c 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -314,7 +314,7 @@ static int ieee80211_open(struct net_device *dev) | |||
314 | if (sdata->vif.type == NL80211_IFTYPE_STATION) | 314 | if (sdata->vif.type == NL80211_IFTYPE_STATION) |
315 | ieee80211_queue_work(&local->hw, &sdata->u.mgd.work); | 315 | ieee80211_queue_work(&local->hw, &sdata->u.mgd.work); |
316 | 316 | ||
317 | netif_tx_start_all_queues(dev); | 317 | netif_start_queue(dev); |
318 | 318 | ||
319 | return 0; | 319 | return 0; |
320 | err_del_interface: | 320 | err_del_interface: |
@@ -343,7 +343,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
343 | /* | 343 | /* |
344 | * Stop TX on this interface first. | 344 | * Stop TX on this interface first. |
345 | */ | 345 | */ |
346 | netif_tx_stop_all_queues(dev); | 346 | netif_stop_queue(dev); |
347 | 347 | ||
348 | /* | 348 | /* |
349 | * Now delete all active aggregation sessions. | 349 | * Now delete all active aggregation sessions. |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index f7364e56f1ee..9a733890eb47 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -50,7 +50,7 @@ static void ieee80211_mesh_housekeeping_timer(unsigned long data) | |||
50 | struct ieee80211_local *local = sdata->local; | 50 | struct ieee80211_local *local = sdata->local; |
51 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; | 51 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; |
52 | 52 | ||
53 | ifmsh->wrkq_flags |= MESH_WORK_HOUSEKEEPING; | 53 | set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags); |
54 | 54 | ||
55 | if (local->quiescing) { | 55 | if (local->quiescing) { |
56 | set_bit(TMR_RUNNING_HK, &ifmsh->timers_running); | 56 | set_bit(TMR_RUNNING_HK, &ifmsh->timers_running); |
@@ -480,7 +480,7 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) | |||
480 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; | 480 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; |
481 | struct ieee80211_local *local = sdata->local; | 481 | struct ieee80211_local *local = sdata->local; |
482 | 482 | ||
483 | ifmsh->wrkq_flags |= MESH_WORK_HOUSEKEEPING; | 483 | set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags); |
484 | ieee80211_queue_work(&local->hw, &ifmsh->work); | 484 | ieee80211_queue_work(&local->hw, &ifmsh->work); |
485 | sdata->vif.bss_conf.beacon_int = MESH_DEFAULT_BEACON_INTERVAL; | 485 | sdata->vif.bss_conf.beacon_int = MESH_DEFAULT_BEACON_INTERVAL; |
486 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON | | 486 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON | |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 8d26e9bf8964..71220a5d1406 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -458,9 +458,15 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, | |||
458 | mgmt->u.deauth.reason_code = cpu_to_le16(reason); | 458 | mgmt->u.deauth.reason_code = cpu_to_le16(reason); |
459 | 459 | ||
460 | if (stype == IEEE80211_STYPE_DEAUTH) | 460 | if (stype == IEEE80211_STYPE_DEAUTH) |
461 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len, cookie); | 461 | if (cookie) |
462 | __cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); | ||
463 | else | ||
464 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); | ||
462 | else | 465 | else |
463 | cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len, cookie); | 466 | if (cookie) |
467 | __cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len); | ||
468 | else | ||
469 | cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len); | ||
464 | ieee80211_tx_skb(sdata, skb, ifmgd->flags & IEEE80211_STA_MFP_ENABLED); | 470 | ieee80211_tx_skb(sdata, skb, ifmgd->flags & IEEE80211_STA_MFP_ENABLED); |
465 | } | 471 | } |
466 | 472 | ||
@@ -923,7 +929,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, | |||
923 | ieee80211_recalc_ps(local, -1); | 929 | ieee80211_recalc_ps(local, -1); |
924 | mutex_unlock(&local->iflist_mtx); | 930 | mutex_unlock(&local->iflist_mtx); |
925 | 931 | ||
926 | netif_tx_start_all_queues(sdata->dev); | 932 | netif_start_queue(sdata->dev); |
927 | netif_carrier_on(sdata->dev); | 933 | netif_carrier_on(sdata->dev); |
928 | } | 934 | } |
929 | 935 | ||
@@ -1055,7 +1061,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1055 | * time -- we don't want the scan code to enable queues. | 1061 | * time -- we don't want the scan code to enable queues. |
1056 | */ | 1062 | */ |
1057 | 1063 | ||
1058 | netif_tx_stop_all_queues(sdata->dev); | 1064 | netif_stop_queue(sdata->dev); |
1059 | netif_carrier_off(sdata->dev); | 1065 | netif_carrier_off(sdata->dev); |
1060 | 1066 | ||
1061 | rcu_read_lock(); | 1067 | rcu_read_lock(); |
@@ -1959,12 +1965,10 @@ static void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
1959 | /* no action */ | 1965 | /* no action */ |
1960 | break; | 1966 | break; |
1961 | case RX_MGMT_CFG80211_DEAUTH: | 1967 | case RX_MGMT_CFG80211_DEAUTH: |
1962 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len, | 1968 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); |
1963 | NULL); | ||
1964 | break; | 1969 | break; |
1965 | case RX_MGMT_CFG80211_DISASSOC: | 1970 | case RX_MGMT_CFG80211_DISASSOC: |
1966 | cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len, | 1971 | cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len); |
1967 | NULL); | ||
1968 | break; | 1972 | break; |
1969 | default: | 1973 | default: |
1970 | WARN(1, "unexpected: %d", rma); | 1974 | WARN(1, "unexpected: %d", rma); |
@@ -2019,7 +2023,7 @@ static void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
2019 | cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, skb->len); | 2023 | cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, skb->len); |
2020 | break; | 2024 | break; |
2021 | case RX_MGMT_CFG80211_DEAUTH: | 2025 | case RX_MGMT_CFG80211_DEAUTH: |
2022 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len, NULL); | 2026 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); |
2023 | break; | 2027 | break; |
2024 | default: | 2028 | default: |
2025 | WARN(1, "unexpected: %d", rma); | 2029 | WARN(1, "unexpected: %d", rma); |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 7170bf4565a8..5c385e3c1d1f 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1504,19 +1504,28 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) | |||
1504 | /* illegal frame */ | 1504 | /* illegal frame */ |
1505 | return RX_DROP_MONITOR; | 1505 | return RX_DROP_MONITOR; |
1506 | 1506 | ||
1507 | if (!is_multicast_ether_addr(hdr->addr1) && | 1507 | if (mesh_hdr->flags & MESH_FLAGS_AE) { |
1508 | (mesh_hdr->flags & MESH_FLAGS_AE_A5_A6)) { | ||
1509 | struct mesh_path *mppath; | 1508 | struct mesh_path *mppath; |
1509 | char *proxied_addr; | ||
1510 | char *mpp_addr; | ||
1511 | |||
1512 | if (is_multicast_ether_addr(hdr->addr1)) { | ||
1513 | mpp_addr = hdr->addr3; | ||
1514 | proxied_addr = mesh_hdr->eaddr1; | ||
1515 | } else { | ||
1516 | mpp_addr = hdr->addr4; | ||
1517 | proxied_addr = mesh_hdr->eaddr2; | ||
1518 | } | ||
1510 | 1519 | ||
1511 | rcu_read_lock(); | 1520 | rcu_read_lock(); |
1512 | mppath = mpp_path_lookup(mesh_hdr->eaddr2, sdata); | 1521 | mppath = mpp_path_lookup(proxied_addr, sdata); |
1513 | if (!mppath) { | 1522 | if (!mppath) { |
1514 | mpp_path_add(mesh_hdr->eaddr2, hdr->addr4, sdata); | 1523 | mpp_path_add(proxied_addr, mpp_addr, sdata); |
1515 | } else { | 1524 | } else { |
1516 | spin_lock_bh(&mppath->state_lock); | 1525 | spin_lock_bh(&mppath->state_lock); |
1517 | mppath->exp_time = jiffies; | 1526 | mppath->exp_time = jiffies; |
1518 | if (compare_ether_addr(mppath->mpp, hdr->addr4) != 0) | 1527 | if (compare_ether_addr(mppath->mpp, mpp_addr) != 0) |
1519 | memcpy(mppath->mpp, hdr->addr4, ETH_ALEN); | 1528 | memcpy(mppath->mpp, mpp_addr, ETH_ALEN); |
1520 | spin_unlock_bh(&mppath->state_lock); | 1529 | spin_unlock_bh(&mppath->state_lock); |
1521 | } | 1530 | } |
1522 | rcu_read_unlock(); | 1531 | rcu_read_unlock(); |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 71e10cabf811..7a350d2690a0 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -306,10 +306,10 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) | |||
306 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { | 306 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { |
307 | if (sdata->u.mgd.associated) { | 307 | if (sdata->u.mgd.associated) { |
308 | ieee80211_scan_ps_disable(sdata); | 308 | ieee80211_scan_ps_disable(sdata); |
309 | netif_tx_wake_all_queues(sdata->dev); | 309 | netif_wake_queue(sdata->dev); |
310 | } | 310 | } |
311 | } else | 311 | } else |
312 | netif_tx_wake_all_queues(sdata->dev); | 312 | netif_wake_queue(sdata->dev); |
313 | 313 | ||
314 | /* re-enable beaconing */ | 314 | /* re-enable beaconing */ |
315 | if (sdata->vif.type == NL80211_IFTYPE_AP || | 315 | if (sdata->vif.type == NL80211_IFTYPE_AP || |
@@ -364,7 +364,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local) | |||
364 | * are handled in the scan state machine | 364 | * are handled in the scan state machine |
365 | */ | 365 | */ |
366 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 366 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
367 | netif_tx_stop_all_queues(sdata->dev); | 367 | netif_stop_queue(sdata->dev); |
368 | } | 368 | } |
369 | mutex_unlock(&local->iflist_mtx); | 369 | mutex_unlock(&local->iflist_mtx); |
370 | 370 | ||
@@ -523,7 +523,7 @@ static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *loca | |||
523 | continue; | 523 | continue; |
524 | 524 | ||
525 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { | 525 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { |
526 | netif_tx_stop_all_queues(sdata->dev); | 526 | netif_stop_queue(sdata->dev); |
527 | if (sdata->u.mgd.associated) | 527 | if (sdata->u.mgd.associated) |
528 | ieee80211_scan_ps_enable(sdata); | 528 | ieee80211_scan_ps_enable(sdata); |
529 | } | 529 | } |
@@ -558,7 +558,7 @@ static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *loca | |||
558 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { | 558 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { |
559 | if (sdata->u.mgd.associated) | 559 | if (sdata->u.mgd.associated) |
560 | ieee80211_scan_ps_disable(sdata); | 560 | ieee80211_scan_ps_disable(sdata); |
561 | netif_tx_wake_all_queues(sdata->dev); | 561 | netif_wake_queue(sdata->dev); |
562 | } | 562 | } |
563 | } | 563 | } |
564 | mutex_unlock(&local->iflist_mtx); | 564 | mutex_unlock(&local->iflist_mtx); |
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index ceb2c14c8f47..1f87b4e7f4f7 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -121,7 +121,7 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len) | |||
121 | } | 121 | } |
122 | EXPORT_SYMBOL(cfg80211_send_rx_assoc); | 122 | EXPORT_SYMBOL(cfg80211_send_rx_assoc); |
123 | 123 | ||
124 | static void __cfg80211_send_deauth(struct net_device *dev, | 124 | void __cfg80211_send_deauth(struct net_device *dev, |
125 | const u8 *buf, size_t len) | 125 | const u8 *buf, size_t len) |
126 | { | 126 | { |
127 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 127 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
@@ -130,7 +130,6 @@ static void __cfg80211_send_deauth(struct net_device *dev, | |||
130 | struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; | 130 | struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; |
131 | const u8 *bssid = mgmt->bssid; | 131 | const u8 *bssid = mgmt->bssid; |
132 | int i; | 132 | int i; |
133 | bool done = false; | ||
134 | 133 | ||
135 | ASSERT_WDEV_LOCK(wdev); | 134 | ASSERT_WDEV_LOCK(wdev); |
136 | 135 | ||
@@ -138,7 +137,6 @@ static void __cfg80211_send_deauth(struct net_device *dev, | |||
138 | 137 | ||
139 | if (wdev->current_bss && | 138 | if (wdev->current_bss && |
140 | memcmp(wdev->current_bss->pub.bssid, bssid, ETH_ALEN) == 0) { | 139 | memcmp(wdev->current_bss->pub.bssid, bssid, ETH_ALEN) == 0) { |
141 | done = true; | ||
142 | cfg80211_unhold_bss(wdev->current_bss); | 140 | cfg80211_unhold_bss(wdev->current_bss); |
143 | cfg80211_put_bss(&wdev->current_bss->pub); | 141 | cfg80211_put_bss(&wdev->current_bss->pub); |
144 | wdev->current_bss = NULL; | 142 | wdev->current_bss = NULL; |
@@ -148,7 +146,6 @@ static void __cfg80211_send_deauth(struct net_device *dev, | |||
148 | cfg80211_unhold_bss(wdev->auth_bsses[i]); | 146 | cfg80211_unhold_bss(wdev->auth_bsses[i]); |
149 | cfg80211_put_bss(&wdev->auth_bsses[i]->pub); | 147 | cfg80211_put_bss(&wdev->auth_bsses[i]->pub); |
150 | wdev->auth_bsses[i] = NULL; | 148 | wdev->auth_bsses[i] = NULL; |
151 | done = true; | ||
152 | break; | 149 | break; |
153 | } | 150 | } |
154 | if (wdev->authtry_bsses[i] && | 151 | if (wdev->authtry_bsses[i] && |
@@ -156,13 +153,10 @@ static void __cfg80211_send_deauth(struct net_device *dev, | |||
156 | cfg80211_unhold_bss(wdev->authtry_bsses[i]); | 153 | cfg80211_unhold_bss(wdev->authtry_bsses[i]); |
157 | cfg80211_put_bss(&wdev->authtry_bsses[i]->pub); | 154 | cfg80211_put_bss(&wdev->authtry_bsses[i]->pub); |
158 | wdev->authtry_bsses[i] = NULL; | 155 | wdev->authtry_bsses[i] = NULL; |
159 | done = true; | ||
160 | break; | 156 | break; |
161 | } | 157 | } |
162 | } | 158 | } |
163 | 159 | ||
164 | WARN_ON(!done); | ||
165 | |||
166 | if (wdev->sme_state == CFG80211_SME_CONNECTED) { | 160 | if (wdev->sme_state == CFG80211_SME_CONNECTED) { |
167 | u16 reason_code; | 161 | u16 reason_code; |
168 | bool from_ap; | 162 | bool from_ap; |
@@ -177,27 +171,19 @@ static void __cfg80211_send_deauth(struct net_device *dev, | |||
177 | false, NULL); | 171 | false, NULL); |
178 | } | 172 | } |
179 | } | 173 | } |
174 | EXPORT_SYMBOL(__cfg80211_send_deauth); | ||
180 | 175 | ||
181 | 176 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len) | |
182 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len, | ||
183 | void *cookie) | ||
184 | { | 177 | { |
185 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 178 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
186 | 179 | ||
187 | BUG_ON(cookie && wdev != cookie); | 180 | wdev_lock(wdev); |
188 | 181 | __cfg80211_send_deauth(dev, buf, len); | |
189 | if (cookie) { | 182 | wdev_unlock(wdev); |
190 | /* called within callback */ | ||
191 | __cfg80211_send_deauth(dev, buf, len); | ||
192 | } else { | ||
193 | wdev_lock(wdev); | ||
194 | __cfg80211_send_deauth(dev, buf, len); | ||
195 | wdev_unlock(wdev); | ||
196 | } | ||
197 | } | 183 | } |
198 | EXPORT_SYMBOL(cfg80211_send_deauth); | 184 | EXPORT_SYMBOL(cfg80211_send_deauth); |
199 | 185 | ||
200 | static void __cfg80211_send_disassoc(struct net_device *dev, | 186 | void __cfg80211_send_disassoc(struct net_device *dev, |
201 | const u8 *buf, size_t len) | 187 | const u8 *buf, size_t len) |
202 | { | 188 | { |
203 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 189 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
@@ -238,22 +224,15 @@ static void __cfg80211_send_disassoc(struct net_device *dev, | |||
238 | from_ap = memcmp(mgmt->sa, dev->dev_addr, ETH_ALEN) != 0; | 224 | from_ap = memcmp(mgmt->sa, dev->dev_addr, ETH_ALEN) != 0; |
239 | __cfg80211_disconnected(dev, NULL, 0, reason_code, from_ap); | 225 | __cfg80211_disconnected(dev, NULL, 0, reason_code, from_ap); |
240 | } | 226 | } |
227 | EXPORT_SYMBOL(__cfg80211_send_disassoc); | ||
241 | 228 | ||
242 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, | 229 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len) |
243 | void *cookie) | ||
244 | { | 230 | { |
245 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 231 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
246 | 232 | ||
247 | BUG_ON(cookie && wdev != cookie); | 233 | wdev_lock(wdev); |
248 | 234 | __cfg80211_send_disassoc(dev, buf, len); | |
249 | if (cookie) { | 235 | wdev_unlock(wdev); |
250 | /* called within callback */ | ||
251 | __cfg80211_send_disassoc(dev, buf, len); | ||
252 | } else { | ||
253 | wdev_lock(wdev); | ||
254 | __cfg80211_send_disassoc(dev, buf, len); | ||
255 | wdev_unlock(wdev); | ||
256 | } | ||
257 | } | 236 | } |
258 | EXPORT_SYMBOL(cfg80211_send_disassoc); | 237 | EXPORT_SYMBOL(cfg80211_send_disassoc); |
259 | 238 | ||