Skip to contentSkip to conversation

wifi: mac80211: skip BSS_CHANGED_TXPOWER for monitor interfaces

PATCH In review Dhyan K Prajapati 2 participants 2 messages Feb 7 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: mac80211: skip BSS_CHANGED_TXPOWER for monitor interfaces

Monitor mode interfaces do not maintain a BSS context, since a commit in July 2025 monitor interfaces with WANT_MONITOR_VIF began receiving link change notification duing ieee80211_add_vitual_monitor(), when ieee_assign_link_chanctx() assigns a channel context, it triggers ieee80211_recalc_txpower() this sends a bss_info_changed callback receive link->conf as the bss_conf prameter, in monitor mode it isn't initialised leading to NULL pointer dereference in drivers like iwldvm, as BSS_CHANGED_TXPOWER is not applicable for monitor mode we can just skip it.

Fixes c57e5b9819df ("wifi: mac80211: fix WARN_ON for monitor mode on some devices")
---
 net/mac80211/iface.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
net/mac80211/iface.c +3 -2
index 515384ca2..47f6bef0e 100644
@@ -76,8 +76,9 @@ bool __ieee80211_recalc_txpower(struct ieee80211_link_data *link)
 void ieee80211_recalc_txpower(struct ieee80211_link_data *link,
 			      bool update_bss)
 {
-	if (__ieee80211_recalc_txpower(link) ||
-	    (update_bss && ieee80211_sdata_running(link->sdata)))
+	if (link->sdata->vif.type != NL80211_IFTYPE_MONITOR &&
+	    (__ieee80211_recalc_txpower(link) ||
+	     (update_bss && ieee80211_sdata_running(link->sdata))))
 		ieee80211_link_info_change_notify(link->sdata, link,
 						  BSS_CHANGED_TXPOWER);
 }
Signature · 1 line
2.43.0
#1 lore raw
Quoted 8 lines · Dhyan K Prajapati

Monitor mode interfaces do not maintain a BSS context, since a commit in July 2025 monitor interfaces with WANT_MONITOR_VIF began receiving link change notification duing ieee80211_add_vitual_monitor(), when ieee_assign_link_chanctx() assigns a channel context, it triggers ieee80211_recalc_txpower() this sends a bss_info_changed callback receive link->conf as the bss_conf prameter, in monitor mode it isn't initialised leading to NULL pointer dereference in drivers like iwldvm, as BSS_CHANGED_TXPOWER is not applicable for monitor mode we can just

Impossible to understand.

Quoted 4 lines

skip it.

Fixes c57e5b9819df ("wifi: mac80211: fix WARN_ON for monitor mode on some devices")

No, you are the same person.

Plus I do not believe that this is anything more than microslop AI.

You ignore people's feedback, do not respond to it, do not version your patches (still!). Start reading and responding the feedback. Provide proofs (e.g. by improving your contributions) that you actually read what we asked.

Best regards,
Krzysztof