diff options
author | Leon M. George <leon@georgemail.eu> | 2018-01-10 17:20:22 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-04-19 14:40:26 +0200 |
commit | 3a6c3c9c1c556fd53a4f650be2fbf5783ead1b88 (patch) | |
tree | bb782846ac8deddf00714cacd37986ff0f4a04ff | |
parent | 594dbaa2621cc3e5288c75f6d6165989f989068a (diff) | |
download | upstream-3a6c3c9c1c556fd53a4f650be2fbf5783ead1b88.tar.gz upstream-3a6c3c9c1c556fd53a4f650be2fbf5783ead1b88.tar.bz2 upstream-3a6c3c9c1c556fd53a4f650be2fbf5783ead1b88.zip |
mac80211: join 5GHz checks
Before this commit, devices supporting both 2.4GHz and 5GHz would be
configured for 2.4GHz by default - unless they have VHT capabilities.
With this commit, channel 36 is only set when the frequency is supported.
VHT isn't checked unless that is the case.
Signed-off-by: Leon M. George <leon@georgemail.eu>
-rw-r--r-- | package/kernel/mac80211/files/lib/wifi/mac80211.sh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh index 354077733e..511a9188db 100644 --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh @@ -82,14 +82,11 @@ detect_mac80211() { ht_capab="" iw phy "$dev" info | grep -q 'Capabilities:' && htmode=HT20 - iw phy "$dev" info | grep -q '2412 MHz' || { mode_band="a"; channel="36"; } - vht_cap=$(iw phy "$dev" info | grep -c 'VHT Capabilities') - cap_5ghz=$(iw phy "$dev" info | grep -c "Band 2") - [ "$vht_cap" -gt 0 -a "$cap_5ghz" -gt 0 ] && { - mode_band="a"; + iw phy "$dev" info | grep -q '5180 MHz' && { + mode_band="a" channel="36" - htmode="VHT80" + iw phy "$dev" info | grep -q 'VHT Capabilities' && htmode="VHT80" } [ -n "$htmode" ] && ht_capab="set wireless.radio${devidx}.htmode=$htmode" |