diff options
author | Davide Fioravanti <pantanastyle@gmail.com> | 2020-09-17 15:40:27 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2020-09-20 17:52:25 +0200 |
commit | cd36c0d2f093ec6b8a2c6e9b7b300a2fd4fc87b3 (patch) | |
tree | fbbac59cdca3a350d7be592b434fbead0d4e9ca0 | |
parent | 7190fb2da46bca02c233432db2cad57655208b68 (diff) | |
download | upstream-cd36c0d2f093ec6b8a2c6e9b7b300a2fd4fc87b3.tar.gz upstream-cd36c0d2f093ec6b8a2c6e9b7b300a2fd4fc87b3.tar.bz2 upstream-cd36c0d2f093ec6b8a2c6e9b7b300a2fd4fc87b3.zip |
mac80211: select the first available channel for 5GHz interfaces
Some 5GHz wifi interfaces, especially in Tri-band routers, can't use
channel 36. In these cases, the default configuration for 5GHz
interfaces, once enabled, doesn't work.
This patch selects the first non-disabled channel for 5GHz interfaces.
Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
-rw-r--r-- | package/kernel/mac80211/files/lib/wifi/mac80211.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh index be9c537926..c0fbfbe5a8 100644 --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh @@ -82,9 +82,9 @@ detect_mac80211() { iw phy "$dev" info | grep -q 'Capabilities:' && htmode=HT20 - iw phy "$dev" info | grep -q '5180 MHz' && { + iw phy "$dev" info | grep -q '\* 5... MHz \[' && { mode_band="a" - channel="36" + channel=$(iw phy "$dev" info | grep '\* 5... MHz \[' | grep '(disabled)' -v -m 1 | sed 's/[^[]*\[\|\].*//g') iw phy "$dev" info | grep -q 'VHT Capabilities' && htmode="VHT80" } |