From 2f9048d8d38a7747f1bb3b7be7509b5e8d7132c2 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sun, 12 Jan 2014 12:07:11 +0000 Subject: hostapd: fix frequency setting for IBSS/RSN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduced by ("netifd: add wireless configuration support and port mac80211 to the new framework") Reported-by: René van Weert Signed-off-by: Antonio Quartulli SVN-Revision: 39231 --- package/network/services/hostapd/files/netifd.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'package/network') diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index dd2256578d..b2c437d824 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -447,12 +447,14 @@ wpa_supplicant_add_network() { local wpa_key_mgmt="WPA-PSK" local scan_ssid="1" + local freq [[ "$_w_mode" = "adhoc" ]] && { append network_data "mode=1" "$N$T" - [ -n "$fixed_frequency" ] || { + [ -n "$channel" ] && { + freq="$(get_freq "$phy" "$channel")" append network_data "fixed_freq=1" "$N$T" - append network_data "frequency=$fixed_frequency" "$N$T" + append network_data "frequency=$freq" "$N$T" } scan_ssid=0 -- cgit v1.2.3