projects
/
15.05
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b8c16b
)
mac80211: autodetect the default phy mode based on 11n and freq capabilities
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 2 Oct 2009 19:41:04 +0000
(19:41 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 2 Oct 2009 19:41:04 +0000
(19:41 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17825
3c298f89
-4303-0410-b956-
a3cf2f4a3e73
package/mac80211/files/lib/wifi/mac80211.sh
patch
|
blob
|
history
diff --git
a/package/mac80211/files/lib/wifi/mac80211.sh
b/package/mac80211/files/lib/wifi/mac80211.sh
index
3acb3dc
..
a7b3005
100644
(file)
--- 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 <<EOF
config wifi-device wifi$devidx
option type mac80211
option channel 5
option macaddr $(cat /sys/class/ieee80211/${dev}/macaddress)
+ option hwmode 11${mode_11n}${mode_band}
# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 1