diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-11-04 21:53:49 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-11-04 21:53:49 +0000 |
commit | 2f8e54f6735724516c2a2b1c736a7202b6ea96af (patch) | |
tree | 238413bade28487194412c7890b678d81b05e41d /package/mac80211/files | |
parent | a8b204bd78de35f98f6f00e5d460e008db2b8a56 (diff) | |
download | upstream-2f8e54f6735724516c2a2b1c736a7202b6ea96af.tar.gz upstream-2f8e54f6735724516c2a2b1c736a7202b6ea96af.tar.bz2 upstream-2f8e54f6735724516c2a2b1c736a7202b6ea96af.zip |
mac80211: fill some important capabilities into ht_capab in the hostapd config
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18293 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/files')
-rw-r--r-- | package/mac80211/files/lib/wifi/mac80211.sh | 13 |
1 files changed, 12 insertions, 1 deletions
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 <<EOF @@ -304,6 +314,7 @@ config wifi-device wifi$devidx option hwmode 11${mode_11n}${mode_band} # REMOVE THIS LINE TO ENABLE WIFI: option disabled 1 +$ht_capab config wifi-iface option device wifi$devidx |