From 38587f87ed27ea0b1db59103a219a6270575f1d3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 3 Feb 2014 13:31:44 +0000 Subject: wifi: Introduce 802.11ac support This patch introduces 802.11ac support to mac80211 and hostapd. The split of VHT160 in two 80 MHz bands is not yet supported, since it requires an additional user supplied parameter for the channel of the second band. Signed-off-by: Matti Laakso Signed-off-by: Simon Wunderlich [sven@open-mesh.com: Rebased patch, merged htmode and vhtmode, removed special hwmode, replaced uci vht_capab list with overwritable autoconfig, fixed hostapd integration, fixed commit description, add HT40+/- for VHT modes, add VHT40 center_freq autoconfig, refactored major parts] Signed-off-by: Sven Eckelmann SVN-Revision: 39456 --- package/kernel/mac80211/files/lib/wifi/mac80211.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (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 e33b09abb2..e299ab939f 100644 --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh @@ -69,6 +69,8 @@ detect_mac80211() { mode_11n="" mode_band="g" channel="11" + htmode="" + ht_cap=0 for cap in $(iw phy "$dev" info | grep 'Capabilities:' | cut -d: -f2); do ht_cap="$(($ht_cap | $cap))" @@ -76,7 +78,7 @@ detect_mac80211() { ht_capab=""; [ "$ht_cap" -gt 0 ] && { mode_11n="n" - append ht_capab " option htmode HT20" "$N" + htmode="HT20" list=" list ht_capab" [ "$(($ht_cap & 1))" -eq 1 ] && append ht_capab "$list LDPC" "$N" @@ -91,6 +93,15 @@ detect_mac80211() { } iw phy "$dev" info | grep -q '2412 MHz' || { mode_band="a"; channel="36"; } + vht_cap=$(iw phy "$dev" info | grep -c 'VHT Capabilities') + [ "$vht_cap" -gt 0 ] && { + mode_band="a"; + channel="36" + htmode="VHT80" + } + + [ -n $htmode ] && append ht_capab " option htmode $htmode" "$N" + if [ -x /usr/bin/readlink ]; then path="$(readlink -f /sys/class/ieee80211/${dev}/device)" path="${path##/sys/devices/}" -- cgit v1.2.3