Patchwork wpa_supplicant: save frequency for AP mode

login
register
mail settings
Submitter Janusz Dziedzic
Date Jan. 11, 2013, 9:13 p.m.
Message ID <CAFED-j=RUwL7KJ8dvsh6L1=mj9rDwMgSoPj0X_CU+bMC2WO5xw@mail.gmail.com>
Download mbox | patch
Permalink /patch/211421/
State Accepted
Commit bca06366a9f80327c13ce6c4eb8c18277f5dba89
Headers show

Comments

Janusz Dziedzic - Jan. 11, 2013, 9:13 p.m.
In case of wpa_supplicant AP mode (mode=2) after
we will call wpa_cli save command we should also
save configured frequency.In other case after
wpa_supplicant restart we have frequency = 0
and AP start will fail.

Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
 wpa_supplicant/config_file.c |    3 +++
 1 file changed, 3 insertions(+)

 	INT(peerkey);
Jouni Malinen - Jan. 12, 2013, 8:25 a.m.
On Fri, Jan 11, 2013 at 10:13:17PM +0100, Janusz Dziedzic wrote:
> In case of wpa_supplicant AP mode (mode=2) after
> we will call wpa_cli save command we should also
> save configured frequency.In other case after
> wpa_supplicant restart we have frequency = 0
> and AP start will fail.

Thanks, applied. Though, I removed the #ifdef CONFIG_AP part since this
field is used also for IBSS.

Patch

diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index b6fb3e6..f8473a5 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -678,6 +678,9 @@  static void wpa_config_write_network(FILE *f,
struct wpa_ssid *ssid)
 	INT_DEFe(fragment_size, DEFAULT_FRAGMENT_SIZE);
 #endif /* IEEE8021X_EAPOL */
 	INT(mode);
+#ifdef CONFIG_AP
+	INT(frequency);
+#endif /* CONFIG_AP */
 	write_int(f, "proactive_key_caching", ssid->proactive_key_caching, -1);
 	INT(disabled);