mac80211: avoid using synchronize_rcu in ieee80211_set_probe_resp
This could take a while (100ms+) and may delay sending assoc resp in AP mode with WPS or P2P GO (as setting the probe resp takes place there). We've encountered situations where the delay was big enough to cause connection problems with devices like Galaxy Nexus. Switch to using call_rcu with a free handler. [Arik - rework to use plain buffer and instead of skb] Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
f609a43dca
commit
aa7a00809c
@@ -2481,7 +2481,8 @@ struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct ieee80211_if_ap *ap = NULL;
|
||||
struct sk_buff *presp = NULL, *skb = NULL;
|
||||
struct sk_buff *skb = NULL;
|
||||
struct probe_resp *presp = NULL;
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
|
||||
|
||||
@@ -2495,10 +2496,12 @@ struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw,
|
||||
if (!presp)
|
||||
goto out;
|
||||
|
||||
skb = skb_copy(presp, GFP_ATOMIC);
|
||||
skb = dev_alloc_skb(presp->len);
|
||||
if (!skb)
|
||||
goto out;
|
||||
|
||||
memcpy(skb_put(skb, presp->len), presp->data, presp->len);
|
||||
|
||||
hdr = (struct ieee80211_hdr *) skb->data;
|
||||
memset(hdr->addr1, 0, sizeof(hdr->addr1));
|
||||
|
||||
|
Reference in New Issue
Block a user