]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mac80211: send ibss probe responses with noack flag
authorSimon Wunderlich <simon@open-mesh.com>
Fri, 24 Jan 2014 22:48:29 +0000 (23:48 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 4 Feb 2014 20:58:13 +0000 (21:58 +0100)
Responding to probe requests for scanning clients will often create
excessive retries, as it happens quite often that the scanning client
already left the channel. Therefore do it like hostapd and send probe
responses for wildcard SSID only once by using the noack flag.

Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
[fix typo & 'wildcard SSID' in commit log]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ibss.c

index a35f37980e7070fa641fe8f9740cfab3ba8cd3fb..531477a62f4b46728c0e1afdf763d8f127d697a0 100644 (file)
@@ -1465,6 +1465,11 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
        memcpy(((struct ieee80211_mgmt *) skb->data)->da, mgmt->sa, ETH_ALEN);
        ibss_dbg(sdata, "Sending ProbeResp to %pM\n", mgmt->sa);
        IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
+
+       /* avoid excessive retries for probe request to wildcard SSIDs */
+       if (pos[1] == 0)
+               IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_NO_ACK;
+
        ieee80211_tx_skb(sdata, skb);
 }