aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/config_winreg.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-10-25 15:24:15 (GMT)
committerJouni Malinen <j@w1.fi>2010-10-25 15:24:15 (GMT)
commit3071e18109502e7504ab6e3d19a2de102e1f7050 (patch)
treed8b44a31264e0a931fcccf92517fdc8ab56501f5 /wpa_supplicant/config_winreg.c
parent1f4c7b6b2aa19d100179750d310b5a8adc288a77 (diff)
downloadhostap-3071e18109502e7504ab6e3d19a2de102e1f7050.zip
hostap-3071e18109502e7504ab6e3d19a2de102e1f7050.tar.gz
hostap-3071e18109502e7504ab6e3d19a2de102e1f7050.tar.bz2
P2P: Add mechanism for timing out idle groups
A new configuration parameter, p2p_group_idle, can now be used to set idle timeout value for P2P groups in seconds (0 = no timeout). If set, this values is used to remove P2P group (both GO and P2P client) interfaces after the group has been idle (no clients/GO seen) for the configuration duration. The P2P-GROUP-REMOVED event is now indicating the reason for group removal when known. For example: P2P-GROUP-REMOVED wlan0 GO reason=REQUESTED P2P-GROUP-REMOVED wlan1 client reason=IDLE
Diffstat (limited to 'wpa_supplicant/config_winreg.c')
-rw-r--r--wpa_supplicant/config_winreg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/config_winreg.c b/wpa_supplicant/config_winreg.c
index b2078af..ef95a29 100644
--- a/wpa_supplicant/config_winreg.c
+++ b/wpa_supplicant/config_winreg.c
@@ -259,6 +259,8 @@ static int wpa_config_read_global(struct wpa_config *config, HKEY hk)
#ifdef CONFIG_P2P
config->p2p_ssid_postfix = wpa_config_read_reg_string(
hk, TEXT("p2p_ssid_postfix"));
+ wpa_config_read_reg_dword(hk, TEXT("p2p_group_idle"),
+ (int *) &config->p2p_group_idle);
#endif /* CONFIG_P2P */
wpa_config_read_reg_dword(hk, TEXT("bss_max_count"),
@@ -596,6 +598,8 @@ static int wpa_config_write_global(struct wpa_config *config, HKEY hk)
#ifdef CONFIG_P2P
wpa_config_write_reg_string(hk, "p2p_ssid_postfix",
config->p2p_ssid_postfix);
+ wpa_config_write_reg_dword(hk, TEXT("p2p_group_idle"),
+ config->p2p_group_idle, 0);
#endif /* CONFIG_P2P */
wpa_config_write_reg_dword(hk, TEXT("bss_max_count"),