On 8/28/24 17:36, Johannes Berg wrote:
Btw,
+{
+ struct ieee80211_chanctx *ctx =
+ container_of(chanctx_conf, struct ieee80211_chanctx,
+ conf);
+ struct ieee80211_chanctx_conf *itr_data =
+ (struct ieee80211_chanctx_conf *)data;
+
+ if (ctx->replace_state == IEEE80211_CHANCTX_REPLACES_OTHER)
+ return;
+
+ if (itr_data) {
+ if (itr_data == chanctx_conf)
+ chanctx_conf->radar_detected = true;
+ return;
+ }
+
+ chanctx_conf->radar_detected = true;
It might be better to write the end of this function as
if (itr_data && &ctx->conf != itr_data)
return;
ctx->radar_detected = true;
to avoid the double setting.
Got it. Thanks.
johannes
--
Aditya