diff options
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index ab6cb56bc74d..2b413d38daa7 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -2415,6 +2415,37 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
2415 | } | 2415 | } |
2416 | EXPORT_SYMBOL(ieee80211_beacon_get_tim); | 2416 | EXPORT_SYMBOL(ieee80211_beacon_get_tim); |
2417 | 2417 | ||
2418 | struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw, | ||
2419 | struct ieee80211_vif *vif) | ||
2420 | { | ||
2421 | struct ieee80211_if_ap *ap = NULL; | ||
2422 | struct sk_buff *presp = NULL, *skb = NULL; | ||
2423 | struct ieee80211_hdr *hdr; | ||
2424 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); | ||
2425 | |||
2426 | if (sdata->vif.type != NL80211_IFTYPE_AP) | ||
2427 | return NULL; | ||
2428 | |||
2429 | rcu_read_lock(); | ||
2430 | |||
2431 | ap = &sdata->u.ap; | ||
2432 | presp = rcu_dereference(ap->probe_resp); | ||
2433 | if (!presp) | ||
2434 | goto out; | ||
2435 | |||
2436 | skb = skb_copy(presp, GFP_ATOMIC); | ||
2437 | if (!skb) | ||
2438 | goto out; | ||
2439 | |||
2440 | hdr = (struct ieee80211_hdr *) skb->data; | ||
2441 | memset(hdr->addr1, 0, sizeof(hdr->addr1)); | ||
2442 | |||
2443 | out: | ||
2444 | rcu_read_unlock(); | ||
2445 | return skb; | ||
2446 | } | ||
2447 | EXPORT_SYMBOL(ieee80211_proberesp_get); | ||
2448 | |||
2418 | struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw, | 2449 | struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw, |
2419 | struct ieee80211_vif *vif) | 2450 | struct ieee80211_vif *vif) |
2420 | { | 2451 | { |