Avoid excessive probe response retries

Some client implementations only wait a few ms after sending a probe
request while scanning. Since probe responses are always sent at a low
rate this can eat quite some airtime and it might be impossible to get
the frame out before the client leaves the channel again. If the client
leaves before all probe reponses where acked this can cause the probe
reponse to be retried quite often consuming even more airtime.

Hence, add a new noack flag to the driver's send_mlme callback that
allows hostapd to request whether the driver should expect an ACK for
this frame or not.

Use the new noack-policy only for broadcast probe requests that contain
a wildcard SSID.

Signed-hostap: Helmut Schaa <helmut.schaa@googlemail.com>
This commit is contained in:
Helmut Schaa 2011-11-19 19:09:49 +02:00 committed by Jouni Malinen
parent 8cfa3527e1
commit 9a898ee879

View file

@ -198,6 +198,7 @@ void handle_probe_req(struct hostapd_data *hapd,
struct sta_info *sta = NULL; struct sta_info *sta = NULL;
size_t buflen; size_t buflen;
size_t i; size_t i;
int noack;
ie = mgmt->u.probe_req.variable; ie = mgmt->u.probe_req.variable;
if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req)) if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req))
@ -407,7 +408,13 @@ void handle_probe_req(struct hostapd_data *hapd,
pos = hostapd_eid_p2p_manage(hapd, pos); pos = hostapd_eid_p2p_manage(hapd, pos);
#endif /* CONFIG_P2P_MANAGER */ #endif /* CONFIG_P2P_MANAGER */
if (hostapd_drv_send_mlme(hapd, resp, pos - (u8 *) resp, 0) < 0) /*
* If this is a broadcast probe request, apply no ack policy to avoid
* excessive retries.
*/
noack = !!(elems.ssid_len == 0 && is_broadcast_ether_addr(mgmt->da));
if (hostapd_drv_send_mlme(hapd, resp, pos - (u8 *) resp, noack) < 0)
perror("handle_probe_req: send"); perror("handle_probe_req: send");
os_free(resp); os_free(resp);