[openwrt/openwrt] mac80211: add 802.11ad-support

LEDE Commits lede-commits at lists.infradead.org
Mon Jan 4 21:19:46 EST 2021


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d140d18990ca3c45c558a3e158ad7c4e90b32a52

commit d140d18990ca3c45c558a3e158ad7c4e90b32a52
Author: Gary Cooper <gaco at bitmessage.de>
AuthorDate: Mon Jan 4 20:27:49 2021 +0300

    mac80211: add 802.11ad-support
    
    This adds logic to properly populate defaults in /etc/config/wireless.
    
    Signed-off-by: Gary Cooper <gaco at bitmessage.de>
---
 package/kernel/mac80211/Makefile                   | 2 +-
 package/kernel/mac80211/files/lib/wifi/mac80211.sh | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index e2e5b59825..35a7651d1d 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=mac80211
 
 PKG_VERSION:=5.8.18-1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.8.18/
 PKG_HASH:=f04a8172423c6a945fc7d9844b04f33fda9ae574e552f8f18ee3bdfcfb494563
 
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
index c0fbfbe5a8..3e99f06693 100644
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
@@ -88,6 +88,12 @@ detect_mac80211() {
 			iw phy "$dev" info | grep -q 'VHT Capabilities' && htmode="VHT80"
 		}
 
+		iw phy "$dev" info | grep -q '\* 5.... MHz \[' && {
+			mode_band="ad"
+			channel=$(iw phy "$dev" info | grep '\* 5.... MHz \[' | grep '(disabled)' -v -m 1 | sed 's/[^[]*\[\|\|\].*//g')
+			iw phy "$dev" info | grep -q 'Capabilities:' && htmode="HT20"
+		}
+
 		[ -n "$htmode" ] && ht_capab="set wireless.radio${devidx}.htmode=$htmode"
 
 		path="$(mac80211_phy_to_path "$dev")"



More information about the lede-commits mailing list