mirror of
https://github.com/openwrt/openwrt.git
synced 2025-04-05 10:27:19 +00:00
mac80211: fix applying tx/rx antenna changes afer hostapd reload change
Tear down all interfaces if the antenna settings change, so that the capabilities can be recalculated properly Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
9b56c27a8a
commit
afa229038c
@ -1089,14 +1089,18 @@ drv_mac80211_setup() {
|
||||
json_get_values scan_list scan_list
|
||||
json_select ..
|
||||
|
||||
json_select data && {
|
||||
json_get_var prev_rxantenna rxantenna
|
||||
json_get_var prev_txantenna txantenna
|
||||
json_select ..
|
||||
}
|
||||
|
||||
find_phy || {
|
||||
echo "Could not find PHY for device '$1'"
|
||||
wireless_set_retry 0
|
||||
return 1
|
||||
}
|
||||
|
||||
wireless_set_data phy="$phy"
|
||||
|
||||
local wdev
|
||||
local cwdev
|
||||
local found
|
||||
@ -1130,6 +1134,9 @@ drv_mac80211_setup() {
|
||||
[ "$txantenna" = "all" ] && txantenna=0xffffffff
|
||||
[ "$rxantenna" = "all" ] && rxantenna=0xffffffff
|
||||
|
||||
[ "$rxantenna" = "$prev_rxantenna" -a "$txantenna" = "$prev_txantenna" ] || mac80211_reset_config "$phy"
|
||||
wireless_set_data phy="$phy" txantenna="$txantenna" rxantenna="$rxantenna"
|
||||
|
||||
iw phy "$phy" set antenna $txantenna $rxantenna >/dev/null 2>&1
|
||||
iw phy "$phy" set antenna_gain $antenna_gain >/dev/null 2>&1
|
||||
iw phy "$phy" set distance "$distance" >/dev/null 2>&1
|
||||
|
Loading…
x
Reference in New Issue
Block a user