Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84a3d1c9 authored by Janusz Dziedzic's avatar Janusz Dziedzic Committed by Johannes Berg
Browse files

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: default avatarJanusz Dziedzic <janusz.dziedzic@tieto.com>
Reviewed-by: default avatarLuis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 1fe4517c
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -2278,18 +2278,16 @@ void ieee80211_dfs_radar_detected_work(struct work_struct *work)
{
{
	struct ieee80211_local *local =
	struct ieee80211_local *local =
		container_of(work, struct ieee80211_local, radar_detected_work);
		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);
	ieee80211_dfs_cac_cancel(local);


	if (local->use_chanctx)
	if (local->use_chanctx)
		/* currently not handled */
		/* currently not handled */
		WARN_ON(1);
		WARN_ON(1);
	else {
	else
		chandef = local->hw.conf.chandef;
		cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL);
		cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL);
}
}
}


void ieee80211_radar_detected(struct ieee80211_hw *hw)
void ieee80211_radar_detected(struct ieee80211_hw *hw)
{
{