[OpenWrt-Devel] [PATCH 3/5] mac80211: add 802.11ad support
Adrian Schmutzler
freifunk at adrianschmutzler.de
Fri Nov 8 13:14:06 EST 2019
From: Robert Marko <robimarko at gmail.com>
This patch adds support for 802.11ad to mac80211.sh script.
It checks whether device supports 802.11ad Channel 1 and if so
configures it to channel 1 and ad hwmode.
htmode is not needed for 802.11ad.
Signed-off-by: Robert Marko <robimarko at gmail.com>
[rewrite if/else logic in mac80211.sh]
Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
.../kernel/mac80211/files/lib/wifi/mac80211.sh | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
index be9c537926..c7aae31d35 100644
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
@@ -75,18 +75,22 @@ detect_mac80211() {
config_foreach check_mac80211_device wifi-device
[ "$found" -gt 0 ] && continue
- mode_band="g"
- channel="11"
htmode=""
ht_capab=""
- iw phy "$dev" info | grep -q 'Capabilities:' && htmode=HT20
-
- iw phy "$dev" info | grep -q '5180 MHz' && {
+ if iw phy "$dev" info | grep -q '58320 MHz'; then
+ mode_band="ad"
+ channel="1"
+ elif iw phy "$dev" info | grep -q '5180 MHz'; then
mode_band="a"
channel="36"
- iw phy "$dev" info | grep -q 'VHT Capabilities' && htmode="VHT80"
- }
+ iw phy "$dev" info | grep -q 'Capabilities:' && htmode=HT20
+ iw phy "$dev" info | grep -q 'VHT Capabilities' && htmode=VHT80
+ else
+ mode_band="g"
+ channel="11"
+ iw phy "$dev" info | grep -q 'Capabilities:' && htmode=HT20
+ fi
[ -n "$htmode" ] && ht_capab="set wireless.radio${devidx}.htmode=$htmode"
--
2.20.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list