aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-12-18 14:57:52 (GMT)
committerJouni Malinen <j@w1.fi>2012-12-18 14:57:52 (GMT)
commit2ec535fd376cf0f08c55d709024e3e1d045a266f (patch)
tree15563e126953e8d2470c8453af15a9ab56c4982f /wpa_supplicant/events.c
parent41014724e24d8ce8b88c733b20259698807aa652 (diff)
downloadhostap-2ec535fd376cf0f08c55d709024e3e1d045a266f.zip
hostap-2ec535fd376cf0f08c55d709024e3e1d045a266f.tar.gz
hostap-2ec535fd376cf0f08c55d709024e3e1d045a266f.tar.bz2
WNM: Add option to disable keep-alive frames for testing purposes
"wpa_cli set no_keep_alive 1/0" can now be used to disable/enable keep alive frames to enable testing. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index d9ed7a2..68b407b 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1316,12 +1316,16 @@ static void wnm_bss_keep_alive(void *eloop_ctx, void *sock_ctx)
if (wpa_s->wpa_state < WPA_ASSOCIATED)
return;
- wpa_printf(MSG_DEBUG, "WNM: Send keep-alive to AP " MACSTR,
- MAC2STR(wpa_s->bssid));
- /* TODO: could skip this if normal data traffic has been sent */
- /* TODO: Consider using some more appropriate data frame for this */
- if (wpa_s->l2)
- l2_packet_send(wpa_s->l2, wpa_s->bssid, 0x0800, (u8 *) "", 0);
+ if (!wpa_s->no_keep_alive) {
+ wpa_printf(MSG_DEBUG, "WNM: Send keep-alive to AP " MACSTR,
+ MAC2STR(wpa_s->bssid));
+ /* TODO: could skip this if normal data traffic has been sent */
+ /* TODO: Consider using some more appropriate data frame for
+ * this */
+ if (wpa_s->l2)
+ l2_packet_send(wpa_s->l2, wpa_s->bssid, 0x0800,
+ (u8 *) "", 0);
+ }
#ifdef CONFIG_SME
if (wpa_s->sme.bss_max_idle_period) {