From f9ca9710e1ead705d937c3c520ce6ef19f66e41e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 3 May 2014 18:38:20 +0000 Subject: mac80211: clean up ht capability handling, drop the use of the ht_capab list, use individual variables instead Signed-off-by: Felix Fietkau git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40682 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/kernel/mac80211/files/lib/wifi/mac80211.sh | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'package/kernel/mac80211/files/lib/wifi') 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') -- cgit v1.2.3