From: Rosen Penev <rosenp@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: b43-dev@lists.infradead.org (open list:B43 WIRELESS DRIVER),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH wireless] wifi: b43: apply the TX power limit set on the interface
Date: Fri, 23 Oct 2026 12:09:21 -0700 [thread overview]
Message-ID: <20261023190921.73237-1-rosenp@gmail.com> (raw)
A TX power limit set with "iw dev <dev> set txpower" never reaches the
hardware. mac80211 keeps such a limit per interface and only passes it
to the driver as BSS_CHANGED_TXPOWER. The power level of the hardware
configuration, which b43_op_config() turns into the desired TX power,
is only recalculated for a limit set on the whole wiphy, or when the
channel changes.
Take the TX power of the interface on BSS_CHANGED_TXPOWER as the
desired TX power, and recheck the TX power right away, as
b43_op_config() does.
Fixes: 1ea6f9c0d48b ("mac80211: handle TX power per virtual interface")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/net/wireless/broadcom/b43/main.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
index 3825b6ad9f4f..01e3e80b43a5 100644
--- a/drivers/net/wireless/broadcom/b43/main.c
+++ b/drivers/net/wireless/broadcom/b43/main.c
@@ -4161,6 +4161,17 @@ static void b43_op_bss_info_changed(struct ieee80211_hw *hw,
}
b43_mac_enable(dev);
+
+ /*
+ * mac80211 passes a TX power limit set on the interface only here,
+ * not in the power level of the hardware configuration.
+ */
+ if (changed & BSS_CHANGED_TXPOWER && conf->txpower > 0 &&
+ conf->txpower != dev->phy.desired_txpower) {
+ dev->phy.desired_txpower = conf->txpower;
+ b43_phy_txpower_check(dev, B43_TXPWR_IGNORE_TIME |
+ B43_TXPWR_IGNORE_TSSI);
+ }
out_unlock_mutex:
mutex_unlock(&wl->mutex);
}
--
2.56.0
reply other threads:[~2026-10-23 19:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261023190921.73237-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=b43-dev@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®