aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-08-06 07:26:16 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-08-20 07:20:56 -0400
commitaa7a00809cf6afe3cd6f5af2889110b47b798667 (patch)
tree4b2d537fdad3058f61ab0bb894b935afc75442b5 /net/mac80211/tx.c
parentf609a43dca2964a8a604ef554be92fa11c3b4c41 (diff)
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>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 7dbcf293708b..2d004ba0615e 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2481,7 +2481,8 @@ struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw,
2481 struct ieee80211_vif *vif) 2481 struct ieee80211_vif *vif)
2482{ 2482{
2483 struct ieee80211_if_ap *ap = NULL; 2483 struct ieee80211_if_ap *ap = NULL;
2484 struct sk_buff *presp = NULL, *skb = NULL; 2484 struct sk_buff *skb = NULL;
2485 struct probe_resp *presp = NULL;
2485 struct ieee80211_hdr *hdr; 2486 struct ieee80211_hdr *hdr;
2486 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); 2487 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
2487 2488
@@ -2495,10 +2496,12 @@ struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw,
2495 if (!presp) 2496 if (!presp)
2496 goto out; 2497 goto out;
2497 2498
2498 skb = skb_copy(presp, GFP_ATOMIC); 2499 skb = dev_alloc_skb(presp->len);
2499 if (!skb) 2500 if (!skb)
2500 goto out; 2501 goto out;
2501 2502
2503 memcpy(skb_put(skb, presp->len), presp->data, presp->len);
2504
2502 hdr = (struct ieee80211_hdr *) skb->data; 2505 hdr = (struct ieee80211_hdr *) skb->data;
2503 memset(hdr->addr1, 0, sizeof(hdr->addr1)); 2506 memset(hdr->addr1, 0, sizeof(hdr->addr1));
2504 2507