mac80211: add 802.11ad-support
[openwrt/staging/mkresin.git] / package / kernel / mac80211 / files / lib / wifi / mac80211.sh
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")"