[PATCH] CONFIG_AP: Run time reconfiguration fix

Bartosz.Markowski at tieto.com Bartosz.Markowski at tieto.com
Fri Apr 1 09:16:54 EDT 2011


Hi,

Small patch for CONFIG_AP mode - run time reconfiguration of AP.
When receiving DISABLE_NETWORK/REMOVE_NETWORK ap_deinit was not called.

When ssid->mode is WAPS_MODE_AP, call wpa_supplicant_ap_deinit() 
and reset reassociated_connection flag.


---
 wpa_supplicant/ctrl_iface.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 5488ea4..43d6dc5 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -1341,6 +1341,13 @@ static int wpa_supplicant_ctrl_iface_disable_network(
        }
        wpa_supplicant_disable_network(wpa_s, ssid);

+#ifdef CONFIG_AP
+       if (ssid->mode == WPAS_MODE_AP) {
+               wpa_supplicant_ap_deinit(wpa_s);
+               wpa_s->reassociated_connection = 0;
+       }
+#endif
+
        return 0;
 }

@@ -1415,6 +1422,12 @@ static int wpa_supplicant_ctrl_iface_remove_network(
                wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
        }

+#ifdef CONFIG_AP
+       if (ssid->mode == WPAS_MODE_AP) {
+               wpa_supplicant_ap_deinit(wpa_s);
+               wpa_s->reassociated_connection = 0;
+       }
+#endif
        return 0;
 }


Best Regards,
Bartosz Markowski



More information about the HostAP mailing list