diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-10-25 18:43:18 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2014-10-25 18:43:18 +0000 |
commit | 5ae9ec8f8883a7f1acfb5a0f6370bd25ce7089f7 (patch) | |
tree | b0f0bcd829129ad356cdcba4e69d51315a8d5b3e /package/kernel/broadcom-wl | |
parent | 29835cb287ae3b59eeaf6aee792f8938ded28313 (diff) | |
download | upstream-5ae9ec8f8883a7f1acfb5a0f6370bd25ce7089f7.tar.gz upstream-5ae9ec8f8883a7f1acfb5a0f6370bd25ce7089f7.tar.bz2 upstream-5ae9ec8f8883a7f1acfb5a0f6370bd25ce7089f7.zip |
broadcom-wl: align with mac80211 config
- Support HT40 instead of HT40+/HT40- like mac80211
- Enable 11n if htmode is HT20 or HT40
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43063 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/broadcom-wl')
-rw-r--r-- | package/kernel/broadcom-wl/Makefile | 4 | ||||
-rw-r--r-- | package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh | 17 |
2 files changed, 15 insertions, 6 deletions
diff --git a/package/kernel/broadcom-wl/Makefile b/package/kernel/broadcom-wl/Makefile index d790d2c3a4..29137e0dc0 100644 --- a/package/kernel/broadcom-wl/Makefile +++ b/package/kernel/broadcom-wl/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2012 OpenWrt.org +# Copyright (C) 2006-2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=broadcom-wl PKG_VERSION:=5.10.56.27.3 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(ARCH).tar.bz2 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh index 69e3132967..65179a5692 100644 --- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh @@ -199,11 +199,20 @@ enable_broadcom() { } # Use 'chanspec' instead of 'channel' for 'N' modes (See bcmwifi.h) - [ ${nmode:-0} -ne 0 -a -n "$band" -a -n "$channel" ] && { + [ -n "$nmode" -a -n "$band" -a -n "$channel" ] && { case "$htmode" in - HT40-) chanspec=$(printf 0x%x%x%02x $band 0xe $(($channel - 2))); channel=;; - HT40+) chanspec=$(printf 0x%x%x%02x $band 0xd $(($channel + 2))); channel=;; - HT20) chanspec=$(printf 0x%x%x%02x $band 0xb $channel); channel=;; + HT40) + if [ -n "$gmode" ]; then + [ $channel -lt 7 ] && htmode="HT40+" || htmode="HT40-" + else + [ $(( ($channel / 4) % 2 )) -eq 1 ] && htmode="HT40+" || htmode="HT40-" + fi + ;; + esac + case "$htmode" in + HT40-) chanspec=$(printf 0x%x%x%02x $band 0xe $(($channel - 2))); nmode=1; channel=;; + HT40+) chanspec=$(printf 0x%x%x%02x $band 0xd $(($channel + 2))); nmode=1; channel=;; + HT20) chanspec=$(printf 0x%x%x%02x $band 0xb $channel); nmode=1; channel=;; *) ;; esac } |