aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c13
-rw-r--r--net/mac80211/scan.c14
2 files changed, 13 insertions, 14 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index ffc47c81a161..809fb9160899 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2594,6 +2594,13 @@ void ieee80211_sta_work(struct work_struct *work)
2594 } 2594 }
2595} 2595}
2596 2596
2597static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
2598{
2599 if (sdata->vif.type == IEEE80211_IF_TYPE_STA ||
2600 ieee80211_vif_is_mesh(&sdata->vif))
2601 ieee80211_sta_timer((unsigned long)sdata);
2602}
2603
2597void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local) 2604void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local)
2598{ 2605{
2599 struct ieee80211_sub_if_data *sdata = local->scan_sdata; 2606 struct ieee80211_sub_if_data *sdata = local->scan_sdata;
@@ -2606,4 +2613,10 @@ void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local)
2606 !ieee80211_sta_active_ibss(sdata))) 2613 !ieee80211_sta_active_ibss(sdata)))
2607 ieee80211_sta_find_ibss(sdata, ifsta); 2614 ieee80211_sta_find_ibss(sdata, ifsta);
2608 } 2615 }
2616
2617 /* Restart STA timers */
2618 rcu_read_lock();
2619 list_for_each_entry_rcu(sdata, &local->interfaces, list)
2620 ieee80211_restart_sta_timer(sdata);
2621 rcu_read_unlock();
2609} 2622}
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 010781b806f3..f8b296bed0b9 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -424,13 +424,6 @@ static void ieee80211_send_nullfunc(struct ieee80211_local *local,
424 ieee80211_tx_skb(sdata, skb, 0); 424 ieee80211_tx_skb(sdata, skb, 0);
425} 425}
426 426
427static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
428{
429 if (sdata->vif.type == IEEE80211_IF_TYPE_STA ||
430 ieee80211_vif_is_mesh(&sdata->vif))
431 ieee80211_sta_timer((unsigned long)sdata);
432}
433
434void ieee80211_scan_completed(struct ieee80211_hw *hw) 427void ieee80211_scan_completed(struct ieee80211_hw *hw)
435{ 428{
436 struct ieee80211_local *local = hw_to_local(hw); 429 struct ieee80211_local *local = hw_to_local(hw);
@@ -446,11 +439,6 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
446 if (ieee80211_hw_config(local)) 439 if (ieee80211_hw_config(local))
447 printk(KERN_DEBUG "%s: failed to restore operational " 440 printk(KERN_DEBUG "%s: failed to restore operational "
448 "channel after scan\n", wiphy_name(local->hw.wiphy)); 441 "channel after scan\n", wiphy_name(local->hw.wiphy));
449 /* Restart STA timer for HW scan case */
450 rcu_read_lock();
451 list_for_each_entry_rcu(sdata, &local->interfaces, list)
452 ieee80211_restart_sta_timer(sdata);
453 rcu_read_unlock();
454 442
455 goto done; 443 goto done;
456 } 444 }
@@ -483,8 +471,6 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
483 } 471 }
484 } else 472 } else
485 netif_tx_wake_all_queues(sdata->dev); 473 netif_tx_wake_all_queues(sdata->dev);
486
487 ieee80211_restart_sta_timer(sdata);
488 } 474 }
489 rcu_read_unlock(); 475 rcu_read_unlock();
490 476