aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/broadcom-wl/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-10-25 18:43:18 +0000
committerJo-Philipp Wich <jow@openwrt.org>2014-10-25 18:43:18 +0000
commitaeecc6ec124c9a4905fe8747d27693cc3968219b (patch)
treedd170222b10fecd57310ca2fbc53150d214961bd /package/kernel/broadcom-wl/files
parent7a5002ec9d67515cbeea99a89b94c70dc50456c4 (diff)
downloadupstream-aeecc6ec124c9a4905fe8747d27693cc3968219b.tar.gz
upstream-aeecc6ec124c9a4905fe8747d27693cc3968219b.tar.bz2
upstream-aeecc6ec124c9a4905fe8747d27693cc3968219b.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> SVN-Revision: 43063
Diffstat (limited to 'package/kernel/broadcom-wl/files')
-rw-r--r--package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh17
1 files changed, 13 insertions, 4 deletions
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
}