diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-04-09 09:10:59 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-05-06 09:10:00 -0400 |
commit | 59af6928d2099479c0bc2ef3f66cc7b33998120a (patch) | |
tree | ef9010f083ae04406516c0e8cac87d0ebcd23546 /net/mac80211/ieee80211_i.h | |
parent | 33926eb7785ac7ce7d45d1ae5afb0780a4270342 (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.h | 2 |
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); | |||
1472 | void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc); | 1473 | void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc); |
1473 | 1474 | ||
1474 | /* channel switch handling */ | 1475 | /* channel switch handling */ |
1476 | bool ieee80211_csa_needs_block_tx(struct ieee80211_local *local); | ||
1475 | void ieee80211_csa_finalize_work(struct work_struct *work); | 1477 | void ieee80211_csa_finalize_work(struct work_struct *work); |
1476 | int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, | 1478 | int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, |
1477 | struct cfg80211_csa_settings *params); | 1479 | struct cfg80211_csa_settings *params); |