summaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-11-10 11:28:57 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-11-11 12:32:51 -0500
commit029458212604570eec4789049a8a74428484dbb4 (patch)
treecabbe65d50e83498300a25b02a67f8475c02c3b7 /net/mac80211/tx.c
parent00f740e1a3b7abb51980371ee8fa113df22ae0b8 (diff)
downloadop-kernel-dev-029458212604570eec4789049a8a74428484dbb4.zip
op-kernel-dev-029458212604570eec4789049a8a74428484dbb4.tar.gz
mac80211: Save probe response data for bss
Allow setting a probe response template for an interface operating in AP mode. Low level drivers are notified about changes in the probe response template and are able to retrieve a copy of the current probe response. This data can, for example, be uploaded to hardware as a template. Signed-off-by: Guy Eilam <guy@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index ab6cb56..2b413d3 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,
}
EXPORT_SYMBOL(ieee80211_beacon_get_tim);
+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 ieee80211_hdr *hdr;
+ struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+
+ if (sdata->vif.type != NL80211_IFTYPE_AP)
+ return NULL;
+
+ rcu_read_lock();
+
+ ap = &sdata->u.ap;
+ presp = rcu_dereference(ap->probe_resp);
+ if (!presp)
+ goto out;
+
+ skb = skb_copy(presp, GFP_ATOMIC);
+ if (!skb)
+ goto out;
+
+ hdr = (struct ieee80211_hdr *) skb->data;
+ memset(hdr->addr1, 0, sizeof(hdr->addr1));
+
+out:
+ rcu_read_unlock();
+ return skb;
+}
+EXPORT_SYMBOL(ieee80211_proberesp_get);
+
struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
OpenPOWER on IntegriCloud