From 7d1a6c7dfab1997c4276152088ca4a2c19fb3818 Mon Sep 17 00:00:00 2001 From: Imre Kaloz Date: Fri, 20 Mar 2015 11:47:16 +0000 Subject: [PATCH] mac80211: when looking for VHT, check 5GHz support as well Signed-off-by: Imre Kaloz git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44906 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/kernel/mac80211/Makefile | 4 ++-- package/kernel/mac80211/files/lib/wifi/mac80211.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 589b0cb1bd..d71417ec35 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2014 OpenWrt.org +# Copyright (C) 2007-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 PKG_VERSION:=2015-03-09 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources PKG_BACKPORT_VERSION:= PKG_MD5SUM:=6d4b04e4ce8a1f54dabfb04f4709453c diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh index a7c4d2dbc2..ff0d467ab1 100644 --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh @@ -86,7 +86,8 @@ detect_mac80211() { iw phy "$dev" info | grep -q '2412 MHz' || { mode_band="a"; channel="36"; } vht_cap=$(iw phy "$dev" info | grep -c 'VHT Capabilities') - [ "$vht_cap" -gt 0 ] && { + 5ghz_cap=$(iw phy "$dev" info | grep -c "Band 2") + [ "$vht_cap" -gt 0 -a "$5ghz_cap" -gt 0 ] && { mode_band="a"; channel="36" htmode="VHT80"