FILS discovery and bcast probe resp support
Subsystems (2)
v2 cover FILS discovery and bcast probe resp support
This patchset adds support for FILS discovery and broadcast unsolicited probe response transmission in 6GHz for in-band discovery.
Aloka Dixit (2):
nl80211: FILS discovery/bcast probe resp support
mac80211: FILS disc/bcast probe resp config
include/net/cfg80211.h | 26 ++++++++++++++++ include/net/mac80211.h | 17 +++++++++++ include/uapi/linux/nl80211.h | 27 +++++++++++++++++ net/mac80211/cfg.c | 57 +++++++++++++++++++++++++++++++++++ net/mac80211/ieee80211_i.h | 8 +++++ net/mac80211/tx.c | 30 +++++++++++++++++++ net/wireless/nl80211.c | 58 ++++++++++++++++++++++++++++++++++++ 7 files changed, 223 insertions(+)
base-commit: 60689de46c7f6a0028c8b37b6f03db68cbfad8ed
Signature · 1 line
2.25.0
PATCH v2 1/2 nl80211: FILS discovery/bcast probe resp support
This patch adds new attribute, NL80211_ATTR_FD_BCASTPRESP_CFG to configure FILS discovery and broadcast probe response in 6GHz for in-band discovery.
Only one of the two is active at a time to reduce broadcast packets over the air.
Maximum packet interval can be 20 TUs.
Packet interval set to 0 disables FILS discovery and broadcast probe response transmission.
---
v2: Fixed warning.
include/net/cfg80211.h | 26 ++++++++++++++++ include/uapi/linux/nl80211.h | 27 +++++++++++++++++ net/wireless/nl80211.c | 58 ++++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+)
include/net/cfg80211.h +26 -0
@@ -957,6 +957,8 @@ struct cfg80211_crypto_settings {* @assocresp_ies_len: length of assocresp_ies in octets * @probe_resp_len: length of probe response template (@probe_resp) * @probe_resp: probe response template (AP mode only) +* @bcast_presp: Broadcast probe response template (AP mode only) +* @fils_disc: FILS discovery template (AP mode only) * @ftm_responder: enable FTM responder functionality; -1 for no change * (which also implies no change in LCI/civic location data) * @lci: Measurement Report element content, starting with Measurement Token
@@ -965,6 +967,8 @@ struct cfg80211_crypto_settings {* Token (measurement type 11) * @lci_len: LCI data length * @civicloc_len: Civic location data length +* @bcast_presp_len: Broadcast probe response template length +* @fils_disc_len: FILS discovery template length */ struct cfg80211_beacon_data {const u8 *head, *tail;
@@ -974,6 +978,8 @@ struct cfg80211_beacon_data {const u8 *probe_resp;const u8 *lci;const u8 *civicloc; +const u8 *bcast_presp; +const u8 *fils_disc;s8 ftm_responder;size_t head_len, tail_len;
@@ -983,6 +989,8 @@ struct cfg80211_beacon_data {size_t probe_resp_len;size_t lci_len;size_t civicloc_len; +size_t bcast_presp_len; +size_t fils_disc_len; };struct mac_address {
@@ -1017,6 +1025,22 @@ struct cfg80211_bitrate_mask { } control[NUM_NL80211_BANDS ]; }; +enum cfg80211_fd_bcastpresp_types { +CFG80211_TYPE_FILS_DISCOVERY =1 , +CFG80211_TYPE_BCAST_PROBE_RESP +}; + +/** +* struct cfg80211_fd_bcastpresp - FILS discovery/bcast probe response config +* +* @type: CFG80211_TYPE_FILS_DISCOVERY/CFG80211_TYPE_BCAST_PROBE_RESP +* @interval: FILS discovery/broadcast probe response interval in TUs +*/ +struct cfg80211_fd_bcastpresp { +enum cfg80211_fd_bcastpresp_types type; +u32 interval; +}; +/** * enum cfg80211_ap_settings_flags - AP settings flags *
@@ -1064,6 +1088,7 @@ enum cfg80211_ap_settings_flags {* @he_obss_pd: OBSS Packet Detection settings * @he_bss_color: BSS Color settings * @he_oper: HE operation IE (or %NULL if HE isn't enabled) +* @fd_bcastpresp: FILS discovery and broadcast probe response configuration */ struct cfg80211_ap_settings {struct cfg80211_chan_def chandef;
@@ -1094,6 +1119,7 @@ struct cfg80211_ap_settings {u32 flags;struct ieee80211_he_obss_pd he_obss_pd;struct cfg80211_he_bss_color he_bss_color; +struct cfg80211_fd_bcastpresp fd_bcastpresp; };/**
include/uapi/linux/nl80211.h +27 -0
@@ -2484,6 +2484,8 @@ enum nl80211_commands {* @NL80211_ATTR_RECEIVE_MULTICAST: multicast flag for the * %NL80211_CMD_REGISTER_FRAME command, see the description there. * +* @NL80211_ATTR_FD_BCASTPRESP_CFG: FILS discovery/broadcast probe resp. +* * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2961,6 +2963,8 @@ enum nl80211_attrs {NL80211_ATTR_RECEIVE_MULTICAST , +NL80211_ATTR_FD_BCASTPRESP_CFG , +/* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST,
@@ -6848,4 +6852,27 @@ enum nl80211_iftype_akm_attributes { NL80211_IFTYPE_AKM_ATTR_MAX = __NL80211_IFTYPE_AKM_ATTR_LAST - 1, }; +/** +* enum nl80211_fd_bcastpresp_attributes - FILS disc/bcast probe resp settings +* @__NL80211_FD_BCASTPRESP_ATTR_INVALID: Invalid +* +* @NL80211_FD_BCASTPRESP_ATTR_TYPE: 1-FILS discovery, 2-broadcast probe resp +* @NL80211_FD_BCASTPRESP_ATTR_INT: FILS disc/bcast probe resp interval in TUs +* @NL80211_FD_BCASTPRESP_ATTR_TMPL: FILS discovery/bcast probe resp template +* +* @__NL80211_FD_BCASTPRESP_ATTR_LAST: Internal +* @NL80211_FD_BCASTPRESP_ATTR_MAX: highest FD/bcast probe resp attribute +*/ +enum nl80211_fd_bcastpresp_attributes { + __NL80211_FD_BCASTPRESP_ATTR_INVALID, + +NL80211_FD_BCASTPRESP_ATTR_TYPE , +NL80211_FD_BCASTPRESP_ATTR_INT , +NL80211_FD_BCASTPRESP_ATTR_TMPL , + +/* keep last */ + __NL80211_FD_BCASTPRESP_ATTR_LAST, +NL80211_FD_BCASTPRESP_ATTR_MAX = __NL80211_FD_BCASTPRESP_ATTR_LAST -1 +}; +#endif /* __LINUX_NL80211_H */
net/wireless/nl80211.c +58 -0
82 lines not on this page · raw message
Signature · 1 line
2.25.0
PATCH v2 2/2 mac80211: FILS disc/bcast probe resp config
In reply to Aloka DixitThis patch adds mac80211 support to configure FILS discovery and broadcast probe response in 6GHz for in-band discovery.
Changes include functions to store and retrieve FILS discovery, broadcast probe response templates, and packet interval.
--- include/net/mac80211.h | 17 ++++++++++++ net/mac80211/cfg.c | 57 ++++++++++++++++++++++++++++++++++++++ net/mac80211/ieee80211_i.h | 8 ++++++ net/mac80211/tx.c | 30 ++++++++++++++++++++ 4 files changed, 112 insertions(+)
include/net/mac80211.h +17 -0
@@ -317,6 +317,7 @@ struct ieee80211_vif_chanctx_switch {* @BSS_CHANGED_TWT: TWT status changed * @BSS_CHANGED_HE_OBSS_PD: OBSS Packet Detection status changed. * @BSS_CHANGED_HE_BSS_COLOR: BSS Color has changed +* @BSS_CHANGED_FD_BCASTPRESP: FILS Discovery/Bcast probe resp status changed. * */ enum ieee80211_bss_change {
@@ -350,6 +351,7 @@ enum ieee80211_bss_change {BSS_CHANGED_TWT =1 <<27 ,BSS_CHANGED_HE_OBSS_PD =1 <<28 ,BSS_CHANGED_HE_BSS_COLOR =1 <<29 , + BSS_CHANGED_FD_BCASTPRESP = 1<<30, /* when adding here, make sure to change ieee80211_reconfig */ };
@@ -607,6 +609,7 @@ struct ieee80211_ftm_responder_params {* @he_oper: HE operation information of the AP we are connected to * @he_obss_pd: OBSS Packet Detection parameters. * @he_bss_color: BSS coloring settings, if BSS supports HE +* @fd_bcastpresp: FILS discovery and broadcast probe response configuration */ struct ieee80211_bss_conf {const u8 *bssid;
@@ -674,6 +677,7 @@ struct ieee80211_bss_conf { } he_oper;struct ieee80211_he_obss_pd he_obss_pd;struct cfg80211_he_bss_color he_bss_color; +struct cfg80211_fd_bcastpresp fd_bcastpresp; };/**
@@ -6554,4 +6558,17 @@ u32 ieee80211_calc_tx_airtime(struct ieee80211_hw *hw,*/ bool ieee80211_set_hw_80211_encap (struct ieee80211_vif *vif,bool enable); +/** +* ieee80211_get_fd_bcastpresp_tmpl - Get FILS disc/Bcast probe resp template. +* @hw: pointer obtained from ieee80211_alloc_hw(). +* @vif: &struct ieee80211_vif pointer from the add_interface callback. +* @config: 1-FILS discovery, 2-Broadcast probe response. +* +* The driver is responsible for freeing the returned skb. +* +* Return: FILS discovery/broadcast probe response template. %NULL on error. +*/ +struct sk_buff *ieee80211_get_fd_bcastpresp_tmpl (struct ieee80211_hw *hw, +struct ieee80211_vif *vif, +u8 config);#endif /* MAC80211_H */
net/mac80211/cfg.c +57 -0
90 lines not on this page · raw message
net/mac80211/ieee80211_i.h +8 -0
@@ -270,6 +270,12 @@ struct probe_resp {u8 data[0 ]; }; +struct fd_bcastpresp { +struct rcu_head rcu_head; +int len; +u8 data[0 ]; +}; +struct ps_data {/* yes, this looks ugly, but guarantees that we can later use * bitmap_empty :)
@@ -285,6 +291,8 @@ struct ps_data {struct ieee80211_if_ap {struct beacon_data __rcu *beacon;struct probe_resp __rcu *probe_resp; +struct fd_bcastpresp __rcu *bcast_presp; +struct fd_bcastpresp __rcu *fils_disc;/* to be used after channel switch. */ struct cfg80211_beacon_data *next_beacon;
net/mac80211/tx.c +30 -0
@@ -4984,6 +4984,36 @@ struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw, }EXPORT_SYMBOL (ieee80211_proberesp_get); +struct sk_buff *ieee80211_get_fd_bcastpresp_tmpl (struct ieee80211_hw *hw, +struct ieee80211_vif *vif, +u8 config) +{ +struct sk_buff *skb =NULL ; +struct fd_bcastpresp *tmpl =NULL ; +struct ieee80211_sub_if_data *sdata =vif_to_sdata (vif); + +if (sdata->vif.type !=NL80211_IFTYPE_AP ) +return NULL ; + +rcu_read_lock (); + +if (config ==CFG80211_TYPE_FILS_DISCOVERY ) + tmpl =rcu_dereference (sdata->u.ap.fils_disc); +else if (config ==CFG80211_TYPE_BCAST_PROBE_RESP ) + tmpl =rcu_dereference (sdata->u.ap.bcast_presp); + +if (!tmpl || !tmpl->len) + goto out; + + skb =dev_alloc_skb (tmpl->len); +if (skb) +skb_put_data (skb, tmpl->data, tmpl->len); +out: +rcu_read_unlock (); +return skb; +} +EXPORT_SYMBOL (ieee80211_get_fd_bcastpresp_tmpl); +struct sk_buff *ieee80211_pspoll_get (struct ieee80211_hw *hw,struct ieee80211_vif *vif) {
Signature · 1 line
2.25.0
Re: [PATCH v2 1/2] nl80211: FILS discovery/bcast probe resp support
In reply to Aloka DixitQuoted 7 lines · Aloka Dixit
This patch adds new attribute,
NL80211_ATTR_FD_BCASTPRESP_CFGto configure FILS discovery and broadcast probe response in 6GHz for in-band discovery.Only one of the two is active at a time to reduce broadcast packets over the air.
Quoted 6 lines
Maximum packet interval can be 20 TUs.
Packet interval set to 0 disables FILS discovery and broadcast probe response transmission.Signed-off-by Aloka Dixit <[email protected]>Reported-by kbuild test robot <[email protected]>
huh? what is reported. Oh, guess it is the reason for having v2. Don't think this tag is useful for that. Only useful if v1 would have been applied and this patch would fix that.
Quoted 31 lines
---
v2: Fixed warning.include/net/cfg80211.h | 26 ++++++++++++++++ include/uapi/linux/nl80211.h | 27 +++++++++++++++++ net/wireless/nl80211.c | 58 ++++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+)include/net/cfg80211.h +4
-0@@ -957,6 +957,8 @@ struct cfg80211_crypto_settings {* @assocresp_ies_len: length of assocresp_ies in octets * @probe_resp_len: length of probe response template (@probe_resp) * @probe_resp: probe response template (AP mode only) +* @bcast_presp: Broadcast probe response template (AP mode only) +* @fils_disc: FILS discovery template (AP mode only) * @ftm_responder: enable FTM responder functionality; -1 for no change * (which also implies no change in LCI/civic location data) * @lci: Measurement Report element content, starting with Measurement Token @@ -965,6 +967,8 @@ struct cfg80211_crypto_settings {* Token (measurement type 11) * @lci_len: LCI data length * @civicloc_len: Civic location data length +* @bcast_presp_len: Broadcast probe response template length +* @fils_disc_len: FILS discovery template length */ struct cfg80211_beacon_data {const u8 *head, *tail;
include/net/cfg80211.h struct cfg80211_beacon_data { · line 982
Quoted 5 lines
include/net/cfg80211.h +2
-0@@ -974,6 +978,8 @@ struct cfg80211_beacon_data {const u8 *probe_resp;const u8 *lci;const u8 *civicloc; +const u8 *bcast_presp; +const u8 *fils_disc;
This is not really beacon data, now is it?
Regards,
Arend
Johannes Berg
maintainerRe: [PATCH v2 1/2] nl80211: FILS discovery/bcast probe resp support
Quoted 12 lines · Arend Van Spriel
Quoted 11 lines · Aloka Dixit
This patch adds new attribute,
NL80211_ATTR_FD_BCASTPRESP_CFGto configure FILS discovery and broadcast probe response in 6GHz for in-band discovery.Only one of the two is active at a time to reduce broadcast packets over the air.
Maximum packet interval can be 20 TUs.
Packet interval set to 0 disables FILS discovery and broadcast probe response transmission.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Aloka Dixit <[email protected]>Reported-by kbuild test robot <[email protected]>huh? what is reported. Oh, guess it is the reason for having v2. Don't think this tag is useful for that. Only useful if v1 would have been applied and this patch would fix that.
Yeah, that's a bit confusing. OTOH, they do like to be credited for the fixes too ... Maybe that should then be "Co-developed-by" ;-)
I really don't know a good solution to this, but would probably drop the tag(s).
Quoted 8 lines
include/net/cfg80211.h struct cfg80211_beacon_data { · line 982
Quoted 6 lines
include/net/cfg80211.h +2
-0@@ -974,6 +978,8 @@ struct cfg80211_beacon_data {const u8 *probe_resp;const u8 *lci;const u8 *civicloc; +const u8 *bcast_presp; +const u8 *fils_disc;This is not really beacon data, now is it?
Well, neither is the probe_resp template :)
I guess we should rename this to ... cfg80211_beaconing_data? I dunno. I mean, this thing is for beaconing and related things, and can be swapped during runtime for a new beacon/config.
So that seems OK. However, Dan found an issue, so please respin.
johannes