From: Janusz Dziedzic Date: Tue, 5 Nov 2013 13:48:46 +0000 (+0100) Subject: mac80211: DFS setup chandef for radar_event correctly X-Git-Tag: v3.13-rc8~4^2~4^2^2~2^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84a3d1c97d024acd1d27ebbc10cb95784b11f4e7;p=platform%2Fkernel%2Flinux-stable.git mac80211: DFS setup chandef for radar_event correctly Setup chandef for radar event correctly, before we will clear this in ieee80211_dfs_cac_cancel() function. Without this patch mac80211 will report wrong channel width in case we will get radar event during active CAC. Signed-off-by: Janusz Dziedzic Reviewed-by: Luis R. Rodriguez Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 592a181..e9ce36d 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -2278,17 +2278,15 @@ void ieee80211_dfs_radar_detected_work(struct work_struct *work) { struct ieee80211_local *local = container_of(work, struct ieee80211_local, radar_detected_work); - struct cfg80211_chan_def chandef; + struct cfg80211_chan_def chandef = local->hw.conf.chandef; ieee80211_dfs_cac_cancel(local); if (local->use_chanctx) /* currently not handled */ WARN_ON(1); - else { - chandef = local->hw.conf.chandef; + else cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL); - } } void ieee80211_radar_detected(struct ieee80211_hw *hw)