diff options
author | Aloka Dixit <alokad@codeaurora.org> | 2020-09-11 03:05:31 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2020-09-18 15:06:20 +0300 |
commit | 295b02c4be74bebf988593b8322369513fcecf68 (patch) | |
tree | c75a9b95ee39ae92363b02b318529f457d925aac /net/mac80211/tx.c | |
parent | 291c49ded2fda1fd0d7bd6056de99fe47d2332e6 (diff) | |
download | linux-295b02c4be74bebf988593b8322369513fcecf68.tar.xz |
mac80211: Add FILS discovery support
This patch adds mac80211 support to configure FILS discovery
transmission.
Changes include functions to store and retrieve FILS discovery
template, minimum and maximum packet intervals.
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
Link: https://lore.kernel.org/r/20200805011838.28166-3-alokad@codeaurora.org
[remove SUPPORTS_FILS_DISCOVERY, driver can just set wiphy info]
Link: https://lore.kernel.org/r/010101747a7b3cbb-6edaa89c-436d-4391-8765-61456d7f5f4e-000000@us-west-2.amazonses.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 01b30c59d4b4..3e86f863a552 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -4999,6 +4999,34 @@ out: } EXPORT_SYMBOL(ieee80211_proberesp_get); +struct sk_buff *ieee80211_get_fils_discovery_tmpl(struct ieee80211_hw *hw, + struct ieee80211_vif *vif) +{ + struct sk_buff *skb = NULL; + struct fils_discovery_data *tmpl = NULL; + struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); + + if (sdata->vif.type != NL80211_IFTYPE_AP) + return NULL; + + rcu_read_lock(); + tmpl = rcu_dereference(sdata->u.ap.fils_discovery); + if (!tmpl) { + rcu_read_unlock(); + return NULL; + } + + skb = dev_alloc_skb(sdata->local->hw.extra_tx_headroom + tmpl->len); + if (skb) { + skb_reserve(skb, sdata->local->hw.extra_tx_headroom); + skb_put_data(skb, tmpl->data, tmpl->len); + } + + rcu_read_unlock(); + return skb; +} +EXPORT_SYMBOL(ieee80211_get_fils_discovery_tmpl); + struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { |