From: Johannes Berg The DFS state of channels and the CAC state of the wdev is protected by the wiphy mutex, so the radar and CAC events must be reported by drivers with the wiphy mutex held. In mac80211 we do this, but some drivers don't yet: - mwifiex/nxpwifi have an event handling worker, - qtnfmac also does it from event processing, and - mt7915 and mt7996 don't acquire a mutex for background radar events. Document the requirement. Signed-off-by: Johannes Berg --- include/net/cfg80211.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 9cb536fc8cb8..eb376a54a07f 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -9794,6 +9794,7 @@ void cfg80211_cqm_beacon_loss_notify(struct net_device *dev, gfp_t gfp); * @gfp: context flags * * This function is called when a radar is detected on the current chanenl. + * Must be called with the wiphy mutex held. */ void __cfg80211_radar_event(struct wiphy *wiphy, struct cfg80211_chan_def *chandef, @@ -9839,7 +9840,7 @@ void cfg80211_sta_opmode_change_notify(struct net_device *dev, const u8 *mac, * * This function is called when a Channel availability check (CAC) is finished * or aborted. This must be called to notify the completion of a CAC process, - * also by full-MAC drivers. + * also by full-MAC drivers. Must be called with the wiphy mutex held. */ void cfg80211_cac_event(struct net_device *netdev, const struct cfg80211_chan_def *chandef, -- 2.55.0