diff options
author | Sachin Kulkarni <Sachin.Kulkarni@imgtec.com> | 2016-01-12 14:30:19 +0530 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-02-15 15:42:34 -0500 |
commit | a61db7352e845785110ab878b489c503c62acd06 (patch) | |
tree | 2209eec6dacfea7a49ef3e6ae3526ae3b7e5e64e /net | |
parent | 8676a9bcce16820eea8e1bfa233dcf6608e65e33 (diff) | |
download | linux-stable-a61db7352e845785110ab878b489c503c62acd06.tar.gz linux-stable-a61db7352e845785110ab878b489c503c62acd06.tar.bz2 linux-stable-a61db7352e845785110ab878b489c503c62acd06.zip |
mac80211: Requeue work after scan complete for all VIF types.
[ Upstream commit 4fa11ec726a32ea6dd768dbb2e2af3453a98ec0a ]
During a sw scan ieee80211_iface_work ignores work items for all vifs.
However after the scan complete work is requeued only for STA, ADHOC
and MESH iftypes.
This occasionally results in event processing getting delayed/not
processed for iftype AP when it coexists with a STA. This can result
in data halt and eventually disconnection on the AP interface.
Cc: stable@vger.kernel.org
Signed-off-by: Sachin Kulkarni <Sachin.Kulkarni@imgtec.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ibss.c | 1 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 11 | ||||
-rw-r--r-- | net/mac80211/mesh.h | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 2 | ||||
-rw-r--r-- | net/mac80211/scan.c | 12 |
5 files changed, 11 insertions, 19 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 509bc157ce55..76de04be8900 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -1620,7 +1620,6 @@ void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local) if (sdata->vif.type != NL80211_IFTYPE_ADHOC) continue; sdata->u.ibss.last_scan_completed = jiffies; - ieee80211_queue_work(&local->hw, &sdata->work); } mutex_unlock(&local->iflist_mtx); } diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 0c8b2a77d312..2bbc820c7dfc 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -1297,17 +1297,6 @@ out: sdata_unlock(sdata); } -void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local) -{ - struct ieee80211_sub_if_data *sdata; - - rcu_read_lock(); - list_for_each_entry_rcu(sdata, &local->interfaces, list) - if (ieee80211_vif_is_mesh(&sdata->vif) && - ieee80211_sdata_running(sdata)) - ieee80211_queue_work(&local->hw, &sdata->work); - rcu_read_unlock(); -} void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata) { diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index f39a19f9090f..1ca355b5b608 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h @@ -355,14 +355,10 @@ static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata) return sdata->u.mesh.mesh_pp_id == IEEE80211_PATH_PROTOCOL_HWMP; } -void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local); - void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata); void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata); void ieee80211s_stop(void); #else -static inline void -ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local) {} static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata) { return false; } static inline void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index da1f639ecfb6..b13634c677f1 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -3715,8 +3715,6 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) if (!(flags & IEEE80211_HW_CONNECTION_MONITOR)) ieee80211_queue_work(&sdata->local->hw, &sdata->u.mgd.monitor_work); - /* and do all the other regular work too */ - ieee80211_queue_work(&sdata->local->hw, &sdata->work); } } diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index af0d094b2f2f..4835db45e197 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -290,6 +290,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) struct ieee80211_local *local = hw_to_local(hw); bool hw_scan = local->ops->hw_scan; bool was_scanning = local->scanning; + struct ieee80211_sub_if_data *sdata; lockdep_assert_held(&local->mtx); @@ -343,7 +344,16 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) ieee80211_mlme_notify_scan_completed(local); ieee80211_ibss_notify_scan_completed(local); - ieee80211_mesh_notify_scan_completed(local); + + /* Requeue all the work that might have been ignored while + * the scan was in progress; if there was none this will + * just be a no-op for the particular interface. + */ + list_for_each_entry_rcu(sdata, &local->interfaces, list) { + if (ieee80211_sdata_running(sdata)) + ieee80211_queue_work(&sdata->local->hw, &sdata->work); + } + if (was_scanning) ieee80211_start_next_roc(local); } |