From: Felix Fietkau Date: Sun, 3 Jan 2016 20:56:57 +0000 (+0000) Subject: wpa_supplicant: set regulatory domain the same way as hostapd X-Git-Tag: reboot~999 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=74c36b9d2006199db7d79afe6420702b2731fc35;p=oweals%2Fopenwrt.git 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 SVN-Revision: 48099 --- 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" <