summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2013-06-11 10:44:39 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-06-12 09:12:43 +0200
commita6b368f6caec2c897a2ac98c5c359cab9c35dea5 (patch)
tree8cf001a4de84b487f7fbbdcf79af64e953adf211 /net/mac80211
parent35d865afbbdf79e492f7d61df92b1a9e1d93d26f (diff)
downloadlinux-3.10-a6b368f6caec2c897a2ac98c5c359cab9c35dea5.tar.gz
linux-3.10-a6b368f6caec2c897a2ac98c5c359cab9c35dea5.tar.bz2
linux-3.10-a6b368f6caec2c897a2ac98c5c359cab9c35dea5.zip
mac80211: abort CAC in stop_ap()
When a CAC is running and stop_ap is called (e.g. when hostapd is killed while performing CAC), the CAC must be aborted immediately. Otherwise ieee80211_stop_ap() will try to stop it when it's too late - wdev->channel is already NULL and the abort event can not be generated. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 1a89c80e640..4fdb306e42e 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1057,6 +1057,12 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state);
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
+ if (sdata->wdev.cac_started) {
+ cancel_delayed_work_sync(&sdata->dfs_cac_timer_work);
+ cfg80211_cac_event(sdata->dev, NL80211_RADAR_CAC_ABORTED,
+ GFP_KERNEL);
+ }
+
drv_stop_ap(sdata->local, sdata);
/* free all potentially still buffered bcast frames */