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@nbd.name>
log(`Configuring '${phy}' txantenna: ${config.txantenna}, rxantenna: ${config.rxantenna} distance: ${config.distance}`);
system(`iw phy ${phy} set antenna ${config.txantenna} ${config.rxantenna}`);
system(`iw phy ${phy} set distance ${config.distance}`);
+ system(`iw phy ${phy} set txpower ${config.txpower}`);
if (config.frag)
system(`iw phy ${phy} set frag ${frag}`);
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
}