Author: jow Date: 2014-10-25 20:43:18 +0200 (Sat, 25 Oct 2014) New Revision: 43063
Modified: trunk/package/kernel/broadcom-wl/Makefile trunk/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh Log: 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 <[email protected]> Modified: trunk/package/kernel/broadcom-wl/Makefile =================================================================== --- trunk/package/kernel/broadcom-wl/Makefile 2014-10-25 17:23:14 UTC (rev 43062) +++ trunk/package/kernel/broadcom-wl/Makefile 2014-10-25 18:43:18 UTC (rev 43063) @@ -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 @@ 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 Modified: trunk/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh =================================================================== --- trunk/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh 2014-10-25 17:23:14 UTC (rev 43062) +++ trunk/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh 2014-10-25 18:43:18 UTC (rev 43063) @@ -199,11 +199,20 @@ } # 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 } _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
