mac80211: add 802.11ad-support
authorGary Cooper <gaco@bitmessage.de>
Mon, 4 Jan 2021 17:27:49 +0000 (20:27 +0300)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 5 Jan 2021 02:16:24 +0000 (02:16 +0000)
This adds logic to properly populate defaults in /etc/config/wireless.

Signed-off-by: Gary Cooper <gaco@bitmessage.de>
package/kernel/mac80211/Makefile
package/kernel/mac80211/files/lib/wifi/mac80211.sh

index e2e5b598256ec911e264f300e830c0029332350b..35a7651d1da497dc0a1c2aa224a003c2def0522a 100644 (file)
@@ -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
 
index c0fbfbe5a8e3437f89ed94e09dadfb02c04224f4..3e99f066934676259bf9cecb30538699fc51c558 100644 (file)
@@ -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")"