Skip to contentSkip to conversation

mac80211: Remove NOP call to ieee80211_hw_config

PATCH In review [email protected] 2 participants 3 messages Oct 10, 2024 – Oct 22, 2024 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: Remove NOP call to ieee80211_hw_config

From: Ben Greear <[email protected]>

If changed is '0', then the ieee80211_hw_config takes no action, so just remove the call in __ieee809211_recalc_txpower()

---
 net/mac80211/iface.c | 1 -
 1 file changed, 1 deletion(-)
net/mac80211/iface.c +0 -1
index 566edad36b0a..88e9e19d34ea 100644
@@ -70,7 +70,6 @@ bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
 
 	if (power != sdata->vif.bss_conf.txpower) {
 		sdata->vif.bss_conf.txpower = power;
-		ieee80211_hw_config(sdata->local, 0);
 		return true;
 	}
 
Signature · 1 line
2.42.0
maintainer
#1 lore raw
Quoted 5 lines · On Thu, 2024-10-10 at 13:40 -0700, [email protected] wrote:

From: Ben Greear <[email protected]>

If changed is '0', then the ieee80211_hw_config takes no action, so just remove the call in __ieee809211_recalc_txpower()

Hmm. I think it may have done something in the past, so perhaps this is a bug that needs to be fixed instead?

- if (!local->use_chanctx)
- changed |= ieee80211_hw_conf_chan(local);

in "wifi: mac80211: simplify non-chanctx drivers".

But maybe that's exactly the previous patch? Would be nice though to have that in the commit message, or if it's related maybe even squash them?

johannes

author
#2 lore raw
Quoted 13 lines · Johannes Berg
Quoted 5 lines · On Thu, 2024-10-10 at 13:40 -0700, [email protected] wrote:

From: Ben Greear <[email protected]>

If changed is '0', then the ieee80211_hw_config takes no action, so just remove the call in __ieee809211_recalc_txpower()

Hmm. I think it may have done something in the past, so perhaps this is a bug that needs to be fixed instead?

(quoted diff) +0 -2
-       if (!local->use_chanctx)
-               changed |= ieee80211_hw_conf_chan(local);
Quoted 5 lines

in "wifi: mac80211: simplify non-chanctx drivers".

But maybe that's exactly the previous patch? Would be nice though to have that in the commit message, or if it's related maybe even squash them?

I'm not sure exactly how it is all supposed to work, but at least with the patches I posted, the mtk7996 driver works again. The mtk7996 driver does still have code to handle CONF_CHANGE_POWER, so possibly the code you reference above that if re-added would allow ieee80211_hw_config to configure txpower should be re-added.

If this is what you mean by previous patch:
mac80211: fix user-power when emulating chanctx
then I don't think it should be squashed with anything, but if you want me to squash it, let me know and I will do so and repost.

Thanks,
Ben

Quoted 3 lines

johannes

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com