aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/files/lib/wifi
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-05-03 18:38:20 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-05-03 18:38:20 +0000
commitf9ca9710e1ead705d937c3c520ce6ef19f66e41e (patch)
treef28e98a43c9ae819be3504d5f7f92baf1bf5cc62 /package/kernel/mac80211/files/lib/wifi
parent0eaeceba022e813181e8e38ed836c7db562459b1 (diff)
downloadmaster-187ad058-f9ca9710e1ead705d937c3c520ce6ef19f66e41e.tar.gz
master-187ad058-f9ca9710e1ead705d937c3c520ce6ef19f66e41e.tar.bz2
master-187ad058-f9ca9710e1ead705d937c3c520ce6ef19f66e41e.zip
mac80211: clean up ht capability handling, drop the use of the ht_capab list, use individual variables instead
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40682 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/files/lib/wifi')
-rw-r--r--package/kernel/mac80211/files/lib/wifi/mac80211.sh21
1 files changed, 1 insertions, 20 deletions
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
index e299ab939f..1f69b47193 100644
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
@@ -71,26 +71,7 @@ detect_mac80211() {
channel="11"
htmode=""
- ht_cap=0
- for cap in $(iw phy "$dev" info | grep 'Capabilities:' | cut -d: -f2); do
- ht_cap="$(($ht_cap | $cap))"
- done
- ht_capab="";
- [ "$ht_cap" -gt 0 ] && {
- mode_11n="n"
- htmode="HT20"
-
- list=" list ht_capab"
- [ "$(($ht_cap & 1))" -eq 1 ] && append ht_capab "$list LDPC" "$N"
- [ "$(($ht_cap & 16))" -eq 16 ] && append ht_capab "$list GF" "$N"
- [ "$(($ht_cap & 32))" -eq 32 ] && append ht_capab "$list SHORT-GI-20" "$N"
- [ "$(($ht_cap & 64))" -eq 64 ] && append ht_capab "$list SHORT-GI-40" "$N"
- [ "$(($ht_cap & 128))" -eq 128 ] && append ht_capab "$list TX-STBC" "$N"
- [ "$(($ht_cap & 768))" -eq 256 ] && append ht_capab "$list RX-STBC1" "$N"
- [ "$(($ht_cap & 768))" -eq 512 ] && append ht_capab "$list RX-STBC12" "$N"
- [ "$(($ht_cap & 768))" -eq 768 ] && append ht_capab "$list RX-STBC123" "$N"
- [ "$(($ht_cap & 4096))" -eq 4096 ] && append ht_capab "$list DSSS_CCK-40" "$N"
- }
+ iw phy "$dev" info | grep -q 'Capabilities:' && htmode=HT20
iw phy "$dev" info | grep -q '2412 MHz' || { mode_band="a"; channel="36"; }
vht_cap=$(iw phy "$dev" info | grep -c 'VHT Capabilities')