[openwrt/openwrt] wifi-scripts: fix setting tx power on some drivers
LEDE Commits
lede-commits at lists.infradead.org
Sat Jan 4 02:56:21 PST 2025
nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/2f60e7f00629bb12b066c06fee6b67664776b475
commit 2f60e7f00629bb12b066c06fee6b67664776b475
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Jan 4 11:52:50 2025 +0100
wifi-scripts: fix setting tx power on some drivers
On some drivers, setting the tx power on the interface is not enough.
Set it for the phy as well.
Fixes: 04fb05914ea7 ("wifi-scripts: add multi-radio config support")
Signed-off-by: Felix Fietkau <nbd at nbd.name>
(cherry picked from commit b795e5cbcffc54e858bc8d3bde0031a2ca32377e)
---
.../config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
index 5837f1c748..42d7bc66d0 100755
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
@@ -1203,6 +1203,14 @@ drv_mac80211_setup() {
wdev_tool "$phy$phy_suffix" set_config "$(json_dump)" $active_ifnames
json_set_namespace "$prev"
+ [ -z "$phy_suffix" ] && {
+ if [ -n "$txpower" ]; then
+ iw phy "$phy" set txpower fixed "${txpower%%.*}00"
+ else
+ iw phy "$phy" set txpower auto
+ fi
+ }
+
for_each_interface "ap sta adhoc mesh monitor" mac80211_set_vif_txpower
wireless_set_up
}
More information about the lede-commits
mailing list