Commit 8448609e authored by Sachin Kulkarni's avatar Sachin Kulkarni Committed by Sasha Levin

mac80211: Requeue work after scan complete for all VIF types.

[ Upstream commit 4fa11ec7 ]

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: default avatarSachin Kulkarni <Sachin.Kulkarni@imgtec.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 22186aa8
...@@ -1727,7 +1727,6 @@ void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local) ...@@ -1727,7 +1727,6 @@ void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local)
if (sdata->vif.type != NL80211_IFTYPE_ADHOC) if (sdata->vif.type != NL80211_IFTYPE_ADHOC)
continue; continue;
sdata->u.ibss.last_scan_completed = jiffies; sdata->u.ibss.last_scan_completed = jiffies;
ieee80211_queue_work(&local->hw, &sdata->work);
} }
mutex_unlock(&local->iflist_mtx); mutex_unlock(&local->iflist_mtx);
} }
......
...@@ -1299,17 +1299,6 @@ void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata) ...@@ -1299,17 +1299,6 @@ void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata)
sdata_unlock(sdata); 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) void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata)
{ {
......
...@@ -358,14 +358,10 @@ static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata) ...@@ -358,14 +358,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; 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_path_flush_by_iface(struct ieee80211_sub_if_data *sdata);
void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata); void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata);
void ieee80211s_stop(void); void ieee80211s_stop(void);
#else #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) static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata)
{ return false; } { return false; }
static inline void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata) static inline void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata)
......
...@@ -4002,8 +4002,6 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) ...@@ -4002,8 +4002,6 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
if (!(flags & IEEE80211_HW_CONNECTION_MONITOR)) if (!(flags & IEEE80211_HW_CONNECTION_MONITOR))
ieee80211_queue_work(&sdata->local->hw, ieee80211_queue_work(&sdata->local->hw,
&sdata->u.mgd.monitor_work); &sdata->u.mgd.monitor_work);
/* and do all the other regular work too */
ieee80211_queue_work(&sdata->local->hw, &sdata->work);
} }
} }
......
...@@ -310,6 +310,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) ...@@ -310,6 +310,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
bool was_scanning = local->scanning; bool was_scanning = local->scanning;
struct cfg80211_scan_request *scan_req; struct cfg80211_scan_request *scan_req;
struct ieee80211_sub_if_data *scan_sdata; struct ieee80211_sub_if_data *scan_sdata;
struct ieee80211_sub_if_data *sdata;
lockdep_assert_held(&local->mtx); lockdep_assert_held(&local->mtx);
...@@ -369,7 +370,16 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) ...@@ -369,7 +370,16 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
ieee80211_mlme_notify_scan_completed(local); ieee80211_mlme_notify_scan_completed(local);
ieee80211_ibss_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) if (was_scanning)
ieee80211_start_next_roc(local); ieee80211_start_next_roc(local);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment