From: nbd Date: Fri, 2 Oct 2009 19:41:04 +0000 (+0000) Subject: mac80211: autodetect the default phy mode based on 11n and freq capabilities X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/fcd449b084a1759e37ecf6c28fc4a384eeef689e?ds=sidebyside;hp=e1a9d004cc69536d02425e646ef3f184bab1d3ac mac80211: autodetect the default phy mode based on 11n and freq capabilities git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17825 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index 3acb3dc1c..a7b3005dd 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -272,12 +272,17 @@ detect_mac80211() { [ -n "$type" ] || break devidx=$(($devidx + 1)) done + mode_11n="" + mode_band="g" + iw phy "$dev" info | grep -q 'HT cap' && mode_11n="n" + iw phy "$dev" info | grep -q '2412 MHz' || mode_band="a" cat <