aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-12-05 17:12:51 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-12-05 17:12:51 +0000
commitfee32f227e00406e2439d0313b76a21aa0e8a83f (patch)
tree320044c01f82d6d1d6bfb1dc489d4964284ca1b2
parentaf947d5c89d663da6314dcb8d95691622c157536 (diff)
downloadupstream-fee32f227e00406e2439d0313b76a21aa0e8a83f.tar.gz
upstream-fee32f227e00406e2439d0313b76a21aa0e8a83f.tar.bz2
upstream-fee32f227e00406e2439d0313b76a21aa0e8a83f.zip
mac80211: set the country code through iw reg, setting it only through hostapd apparently does not work
SVN-Revision: 18665
-rw-r--r--package/mac80211/files/lib/wifi/mac80211.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh
index f5c94a9eac..efceebbe4c 100644
--- a/package/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/mac80211/files/lib/wifi/mac80211.sh
@@ -76,11 +76,13 @@ enable_mac80211() {
config_get channel "$device" channel
config_get vifs "$device" vifs
config_get txpower "$device" txpower
+ config_get country "$device" country
find_mac80211_phy "$device" || return 0
config_get phy "$device" phy
local i=0
fixed=""
+ [ -n "$country" ] && iw reg set "$country"
[ "$channel" = "auto" -o "$channel" = "0" ] || {
fixed=1
}