diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-06-06 14:40:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-06 14:40:06 -0400 |
commit | 7c9c46c16d2d1d232f3296924162de293477f017 (patch) | |
tree | 4dba9e4da9ad99a73251b4b0563f910f727894fb /net/mac80211/mlme.c | |
parent | fdbfff73408f99799724f583cbc2a0ce3263c6a7 (diff) | |
parent | 2d4524ac18a3965051f6279aff5e9b1d72ac9d7f (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
drivers/net/wireless/iwlwifi/iwl-drv.c
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 7c077158eb88..da6bd81fec6d 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1211,6 +1211,22 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local, | |||
1211 | sdata->vif.bss_conf.qos = true; | 1211 | sdata->vif.bss_conf.qos = true; |
1212 | } | 1212 | } |
1213 | 1213 | ||
1214 | static void __ieee80211_stop_poll(struct ieee80211_sub_if_data *sdata) | ||
1215 | { | ||
1216 | lockdep_assert_held(&sdata->local->mtx); | ||
1217 | |||
1218 | sdata->u.mgd.flags &= ~(IEEE80211_STA_CONNECTION_POLL | | ||
1219 | IEEE80211_STA_BEACON_POLL); | ||
1220 | ieee80211_run_deferred_scan(sdata->local); | ||
1221 | } | ||
1222 | |||
1223 | static void ieee80211_stop_poll(struct ieee80211_sub_if_data *sdata) | ||
1224 | { | ||
1225 | mutex_lock(&sdata->local->mtx); | ||
1226 | __ieee80211_stop_poll(sdata); | ||
1227 | mutex_unlock(&sdata->local->mtx); | ||
1228 | } | ||
1229 | |||
1214 | static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata, | 1230 | static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata, |
1215 | u16 capab, bool erp_valid, u8 erp) | 1231 | u16 capab, bool erp_valid, u8 erp) |
1216 | { | 1232 | { |
@@ -1276,8 +1292,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, | |||
1276 | sdata->u.mgd.flags |= IEEE80211_STA_RESET_SIGNAL_AVE; | 1292 | sdata->u.mgd.flags |= IEEE80211_STA_RESET_SIGNAL_AVE; |
1277 | 1293 | ||
1278 | /* just to be sure */ | 1294 | /* just to be sure */ |
1279 | sdata->u.mgd.flags &= ~(IEEE80211_STA_CONNECTION_POLL | | 1295 | ieee80211_stop_poll(sdata); |
1280 | IEEE80211_STA_BEACON_POLL); | ||
1281 | 1296 | ||
1282 | ieee80211_led_assoc(local, 1); | 1297 | ieee80211_led_assoc(local, 1); |
1283 | 1298 | ||
@@ -1447,8 +1462,7 @@ static void ieee80211_reset_ap_probe(struct ieee80211_sub_if_data *sdata) | |||
1447 | return; | 1462 | return; |
1448 | } | 1463 | } |
1449 | 1464 | ||
1450 | ifmgd->flags &= ~(IEEE80211_STA_CONNECTION_POLL | | 1465 | __ieee80211_stop_poll(sdata); |
1451 | IEEE80211_STA_BEACON_POLL); | ||
1452 | 1466 | ||
1453 | mutex_lock(&local->iflist_mtx); | 1467 | mutex_lock(&local->iflist_mtx); |
1454 | ieee80211_recalc_ps(local, -1); | 1468 | ieee80211_recalc_ps(local, -1); |
@@ -1468,7 +1482,6 @@ static void ieee80211_reset_ap_probe(struct ieee80211_sub_if_data *sdata) | |||
1468 | round_jiffies_up(jiffies + | 1482 | round_jiffies_up(jiffies + |
1469 | IEEE80211_CONNECTION_IDLE_TIME)); | 1483 | IEEE80211_CONNECTION_IDLE_TIME)); |
1470 | out: | 1484 | out: |
1471 | ieee80211_run_deferred_scan(local); | ||
1472 | mutex_unlock(&local->mtx); | 1485 | mutex_unlock(&local->mtx); |
1473 | } | 1486 | } |
1474 | 1487 | ||
@@ -2394,7 +2407,11 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
2394 | net_dbg_ratelimited("%s: cancelling probereq poll due to a received beacon\n", | 2407 | net_dbg_ratelimited("%s: cancelling probereq poll due to a received beacon\n", |
2395 | sdata->name); | 2408 | sdata->name); |
2396 | #endif | 2409 | #endif |
2410 | mutex_lock(&local->mtx); | ||
2397 | ifmgd->flags &= ~IEEE80211_STA_BEACON_POLL; | 2411 | ifmgd->flags &= ~IEEE80211_STA_BEACON_POLL; |
2412 | ieee80211_run_deferred_scan(local); | ||
2413 | mutex_unlock(&local->mtx); | ||
2414 | |||
2398 | mutex_lock(&local->iflist_mtx); | 2415 | mutex_lock(&local->iflist_mtx); |
2399 | ieee80211_recalc_ps(local, -1); | 2416 | ieee80211_recalc_ps(local, -1); |
2400 | mutex_unlock(&local->iflist_mtx); | 2417 | mutex_unlock(&local->iflist_mtx); |
@@ -2581,8 +2598,7 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata, | |||
2581 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 2598 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
2582 | u8 frame_buf[DEAUTH_DISASSOC_LEN]; | 2599 | u8 frame_buf[DEAUTH_DISASSOC_LEN]; |
2583 | 2600 | ||
2584 | ifmgd->flags &= ~(IEEE80211_STA_CONNECTION_POLL | | 2601 | ieee80211_stop_poll(sdata); |
2585 | IEEE80211_STA_BEACON_POLL); | ||
2586 | 2602 | ||
2587 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason, | 2603 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason, |
2588 | false, frame_buf); | 2604 | false, frame_buf); |
@@ -2860,8 +2876,7 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) | |||
2860 | u32 flags; | 2876 | u32 flags; |
2861 | 2877 | ||
2862 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { | 2878 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { |
2863 | sdata->u.mgd.flags &= ~(IEEE80211_STA_BEACON_POLL | | 2879 | __ieee80211_stop_poll(sdata); |
2864 | IEEE80211_STA_CONNECTION_POLL); | ||
2865 | 2880 | ||
2866 | /* let's probe the connection once */ | 2881 | /* let's probe the connection once */ |
2867 | flags = sdata->local->hw.flags; | 2882 | flags = sdata->local->hw.flags; |
@@ -2930,7 +2945,10 @@ void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata) | |||
2930 | if (test_and_clear_bit(TMR_RUNNING_CHANSW, &ifmgd->timers_running)) | 2945 | if (test_and_clear_bit(TMR_RUNNING_CHANSW, &ifmgd->timers_running)) |
2931 | add_timer(&ifmgd->chswitch_timer); | 2946 | add_timer(&ifmgd->chswitch_timer); |
2932 | ieee80211_sta_reset_beacon_monitor(sdata); | 2947 | ieee80211_sta_reset_beacon_monitor(sdata); |
2948 | |||
2949 | mutex_lock(&sdata->local->mtx); | ||
2933 | ieee80211_restart_sta_timer(sdata); | 2950 | ieee80211_restart_sta_timer(sdata); |
2951 | mutex_unlock(&sdata->local->mtx); | ||
2934 | } | 2952 | } |
2935 | #endif | 2953 | #endif |
2936 | 2954 | ||