Skip to content

Commit 84a3d1c

Browse files
dziedjanjmberg-intel
authored andcommitted
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 <janusz.dziedzic@tieto.com> Reviewed-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 1fe4517 commit 84a3d1c

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎net/mac80211/util.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,17 +2278,15 @@ void ieee80211_dfs_radar_detected_work(struct work_struct *work)
22782278
{
22792279
struct ieee80211_local *local =
22802280
container_of(work, struct ieee80211_local, radar_detected_work);
2281-
struct cfg80211_chan_def chandef;
2281+
struct cfg80211_chan_def chandef = local->hw.conf.chandef;
22822282

22832283
ieee80211_dfs_cac_cancel(local);
22842284

22852285
if (local->use_chanctx)
22862286
/* currently not handled */
22872287
WARN_ON(1);
2288-
else {
2289-
chandef = local->hw.conf.chandef;
2288+
else
22902289
cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL);
2291-
}
22922290
}
22932291

22942292
void ieee80211_radar_detected(struct ieee80211_hw *hw)

0 commit comments

Comments
 (0)