diff options
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 75ced9a5476c..bece28b3eba5 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -3576,6 +3576,13 @@ static void ieee80211_send_nullfunc(struct ieee80211_local *local, | |||
3576 | } | 3576 | } |
3577 | 3577 | ||
3578 | 3578 | ||
3579 | static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) | ||
3580 | { | ||
3581 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || | ||
3582 | ieee80211_vif_is_mesh(&sdata->vif)) | ||
3583 | ieee80211_sta_timer((unsigned long)sdata); | ||
3584 | } | ||
3585 | |||
3579 | void ieee80211_scan_completed(struct ieee80211_hw *hw) | 3586 | void ieee80211_scan_completed(struct ieee80211_hw *hw) |
3580 | { | 3587 | { |
3581 | struct ieee80211_local *local = hw_to_local(hw); | 3588 | struct ieee80211_local *local = hw_to_local(hw); |
@@ -3589,6 +3596,12 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw) | |||
3589 | 3596 | ||
3590 | if (local->sta_hw_scanning) { | 3597 | if (local->sta_hw_scanning) { |
3591 | local->sta_hw_scanning = 0; | 3598 | local->sta_hw_scanning = 0; |
3599 | /* Restart STA timer for HW scan case */ | ||
3600 | rcu_read_lock(); | ||
3601 | list_for_each_entry_rcu(sdata, &local->interfaces, list) | ||
3602 | ieee80211_restart_sta_timer(sdata); | ||
3603 | rcu_read_unlock(); | ||
3604 | |||
3592 | goto done; | 3605 | goto done; |
3593 | } | 3606 | } |
3594 | 3607 | ||
@@ -3615,14 +3628,12 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw) | |||
3615 | if (sdata->dev == local->mdev) | 3628 | if (sdata->dev == local->mdev) |
3616 | continue; | 3629 | continue; |
3617 | 3630 | ||
3618 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA) { | 3631 | /* Tell AP we're back */ |
3619 | if (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED) | 3632 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA && |
3620 | ieee80211_send_nullfunc(local, sdata, 0); | 3633 | sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED) |
3621 | ieee80211_sta_timer((unsigned long)sdata); | 3634 | ieee80211_send_nullfunc(local, sdata, 0); |
3622 | } | ||
3623 | 3635 | ||
3624 | if (sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT) | 3636 | ieee80211_restart_sta_timer(sdata); |
3625 | ieee80211_sta_timer((unsigned long)sdata); | ||
3626 | 3637 | ||
3627 | netif_wake_queue(sdata->dev); | 3638 | netif_wake_queue(sdata->dev); |
3628 | } | 3639 | } |