aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-03 20:56:57 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-03 20:56:57 +0000
commit777cb3a71e545221a7d52a3d1885eea8fbb2067a (patch)
treec182043d6aceb0e36a6b1a0229733ce35d921152 /package/network/services/hostapd/files
parent3d981672e87d0a4f9aa3bff1301b13d5522b2aa0 (diff)
downloadmaster-187ad058-777cb3a71e545221a7d52a3d1885eea8fbb2067a.tar.gz
master-187ad058-777cb3a71e545221a7d52a3d1885eea8fbb2067a.tar.bz2
master-187ad058-777cb3a71e545221a7d52a3d1885eea8fbb2067a.zip
wpa_supplicant: set regulatory domain the same way as hostapd
In sta-only configuration, wpa_supplicant needs correct regulatory domain because otherwise it may skip channel of its AP during scan. Another alternative is to fix "iw reg set" in mac80211 netifd script. Currently it fails if some phy has private regulatory domain which matches configured one. Signed-off-by: Dmitry Ivanov <dima@ubnt.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48099 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/hostapd/files')
-rw-r--r--package/network/services/hostapd/files/netifd.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index 5541e4d658..80560802d2 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -536,9 +536,15 @@ wpa_supplicant_prepare_interface() {
_w_modestr="mode=1"
}
+ local country_str=
+ [ -n "$country" ] && {
+ country_str="country=$country"
+ }
+
wpa_supplicant_teardown_interface "$ifname"
cat > "$_config" <<EOF
$ap_scan
+$country_str
EOF
return 0
}