aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-04-09 09:10:59 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-05-06 09:10:00 -0400
commit59af6928d2099479c0bc2ef3f66cc7b33998120a (patch)
treeef9010f083ae04406516c0e8cac87d0ebcd23546 /net/mac80211/ieee80211_i.h
parent33926eb7785ac7ce7d45d1ae5afb0780a4270342 (diff)
mac80211: fix CSA tx queue stopping
It was possible for tx queues to be stuck stopped if AP CSA finalization failed. In that case neither stop_ap nor do_stop woke the queues up. This means it was impossible to perform tx at all until driver was reloaded or a successful CSA was performed later. It was possible to solve this in a simpler manner however this is more robust and future proof (having multi-vif CSA in mind). New sdata->csa_block_tx is introduced to keep track of which interfaces requested tx to be blocked for CSA. This is required because mac80211 stops all tx queues for that purpose. This means queues must be awoken only when last tx-blocking CSA interface is finished. It is still possible to have tx queues stopped after CSA failure but as soon as offending interfaces are stopped from userspace (stop_ap or ifdown) tx queues are woken up properly. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index f86d06aaf54b..f4ba0c4a4314 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -756,6 +756,7 @@ struct ieee80211_sub_if_data {
756 int csa_counter_offset_beacon; 756 int csa_counter_offset_beacon;
757 int csa_counter_offset_presp; 757 int csa_counter_offset_presp;
758 bool csa_radar_required; 758 bool csa_radar_required;
759 bool csa_block_tx; /* write-protected by sdata_lock and local->mtx */
759 struct cfg80211_chan_def csa_chandef; 760 struct cfg80211_chan_def csa_chandef;
760 761
761 struct list_head assigned_chanctx_list; /* protected by chanctx_mtx */ 762 struct list_head assigned_chanctx_list; /* protected by chanctx_mtx */
@@ -1472,6 +1473,7 @@ void ieee80211_sw_roc_work(struct work_struct *work);
1472void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc); 1473void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc);
1473 1474
1474/* channel switch handling */ 1475/* channel switch handling */
1476bool ieee80211_csa_needs_block_tx(struct ieee80211_local *local);
1475void ieee80211_csa_finalize_work(struct work_struct *work); 1477void ieee80211_csa_finalize_work(struct work_struct *work);
1476int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, 1478int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
1477 struct cfg80211_csa_settings *params); 1479 struct cfg80211_csa_settings *params);