aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/files
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-03-09 15:59:32 +0100
committerAlexander Couzens <lynxis@fe80.eu>2019-03-16 21:16:28 +0100
commitdd3214f95d3557fc4c8dc794620149f4e3f4d2e8 (patch)
tree5ea5208bd3989b8cf2e87acc2b3c7c3e267c9488 /package/kernel/mac80211/files
parent8852a09d85e5b0c2ffab55578a9624edb2fb6dd1 (diff)
downloadupstream-dd3214f95d3557fc4c8dc794620149f4e3f4d2e8.tar.gz
upstream-dd3214f95d3557fc4c8dc794620149f4e3f4d2e8.tar.bz2
upstream-dd3214f95d3557fc4c8dc794620149f4e3f4d2e8.zip
mac80211: netifd: Use a mask when using `iw set antenna`
The keyword "all" is only supported by `iw set antenna` if it's used as the only argument. Convert "all" into a mask before calling `iw set antenna`. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'package/kernel/mac80211/files')
-rw-r--r--package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index e7d442f8ef..e9389e3447 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -781,11 +781,14 @@ drv_mac80211_setup() {
done
}
- set_default rxantenna all
- set_default txantenna all
+ set_default rxantenna 0xffffffff
+ set_default txantenna 0xffffffff
set_default distance 0
set_default antenna_gain 0
+ [ "$txantenna" = "all" ] && txantenna=0xffffffff
+ [ "$rxantenna" = "all" ] && rxantenna=0xffffffff
+
iw phy "$phy" set antenna $txantenna $rxantenna >/dev/null 2>&1
iw phy "$phy" set antenna_gain $antenna_gain
iw phy "$phy" set distance "$distance"