Skip to content

Commit

Permalink
mac80211: abort CAC in stop_ap()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Wunderlich authored and Johannes Berg committed Jun 12, 2013
1 parent 35d865a commit a6b368f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit a6b368f

Please sign in to comment.