[DO NOT MERGE]Add a configuration to disconnect on deinit if WoWLAN is enabled
Commit 02c21c02d09f ("wpa_supplicant: Do not disconnect on deinit if
WoWLAN is enabled") prevents the disconnection on deinit if the driver
indicates that WoWLAN is enabled. This is not the expected behavior in
some earlier use cases where the wpa_supplicant process is left running
when going to sleep and killing of the wpa_supplicant process is used
only when there is an expectation of Wi-Fi connection being disabled.
To support the use cases which require the WLAN to disconnect on deinit
even if WoWLAN is enabled, introduce a configuration parameter
wowlan_disconnect_on_deinit. This is set to 0 by default thereby not
impacting the functionality in the above mentioned commit. Setting it to
1 restores the old behavior before the commit identified above.
Bug: 175711228
Test: Do not observe connection delay after reboot
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Change-Id: I2737af9672cfe959dcb253c718998357e1dfb20c
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 82b8fc6..173be09 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -5067,6 +5067,7 @@
{ INT_RANGE(disable_btm, 0, 1), CFG_CHANGED_DISABLE_BTM },
{ INT_RANGE(extended_key_id, 0, 1), 0 },
#endif /* CONFIG_WNM */
+ { INT_RANGE(wowlan_disconnect_on_deinit, 0, 1), 0},
};
#undef FUNC