From 875d957512d26a5cdadd4da6fde0d7873475d9b5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 4 Nov 2009 21:53:49 +0000 Subject: mac80211: fill some important capabilities into ht_capab in the hostapd config SVN-Revision: 18293 --- package/mac80211/files/lib/wifi/mac80211.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'package/mac80211') diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index 6c5359a1bb..bae9fb6d78 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -293,7 +293,17 @@ detect_mac80211() { done mode_11n="" mode_band="g" - iw phy "$dev" info | grep -q 'HT cap' && mode_11n="n" + ht_cap="$(iw phy "$dev" info | grep 'HT capabilities' | cut -d: -f2)" + ht_capab=""; + [ -n "$ht_cap" ] && { + mode_11n="n" + list=" list ht_capab" + [ "$(($ht_cap & 2))" -eq 1 ] && append ht_capab "$list LDPC" "$N" + [ "$(($ht_cap & 2))" -eq 2 ] && append ht_capab "$list HT40-" "$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 & 4096))" -eq 4096 ] && append ht_capab "$list DSSS_CCK-40" "$N" + } iw phy "$dev" info | grep -q '2412 MHz' || mode_band="a" cat <