Use an empty IPv4 packet as the keep-alive packet for WNM BSS max idle
period mechanism. This is not really the best possible frame to use for
this, but for now, it can do until a more suitable frame is figured out
for this (e.g., special LLC header to indicate link test purposes).
Signed-hostap: Jouni Malinen <j@w1.fi>
if (wpa_s->wpa_state < WPA_ASSOCIATED)
return;
- wpa_printf(MSG_DEBUG, "WNM: Send 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: send keep alive frame - better use some short unicast data
- * frame that gets protected if PTK is set */
+ /* 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) {