mac80211: add multiple bssid support
cover mac80211: add multiple bssid support
Multiple bssid allows us to share a single beacon amongst several VAPs. This essentially safes airtime. This feature is achieved by adding an additional IE to the transmitting VAPs beacon. This new IE contains the additional SSIDs and their non-inheritance information.
This series is still missing handling for TIM, which will be sent in a follow-up series.
John Crispin (12):
nl80211: add basic multiple bssid support
nl80211: add attributes for multiple bssid related settings
nl80211: add attributes to set beacon transmit mode
mac80211: add multiple bssid support
mac80211: add multiple bssid IE parsing
mac80211: propagate multi bssid settings when starting an AP
mac80211: propagate beacon tx mode to the driver
ath11k: pass multiple bssid info to FW when a new vdev is created
ath11k: add a struct to pass parameters into ath11k_wmi_vdev_up
ath11k: add the multiple bssid IE offset to the beacon template
ath11k: set beacon tx mode
ath11k: set the multiple bssid hw cap
drivers/net/wireless/ath/ath11k/mac.c | 72 ++++++++++++++++++++++++--- drivers/net/wireless/ath/ath11k/wmi.c | 20 +++++--- drivers/net/wireless/ath/ath11k/wmi.h | 22 +++++++- include/net/cfg80211.h | 23 +++++++++ include/net/mac80211.h | 29 +++++++++++ include/uapi/linux/nl80211.h | 49 ++++++++++++++++++ net/mac80211/cfg.c | 64 ++++++++++++++++++++++++ net/mac80211/ieee80211_i.h | 2 + net/mac80211/iface.c | 16 ++++++ net/mac80211/tx.c | 10 ++++ net/mac80211/util.c | 31 ++++++++++++ net/wireless/nl80211.c | 36 ++++++++++++++ 12 files changed, 358 insertions(+), 16 deletions(-)
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 4/12 mac80211: add multiple bssid support
When bringing up multi bssid APs we need to track the parent-child relation of non-transmitting and transmitting VAPs.
The patch makes sure that
* a parent can not be deleted while it has children
* a parent can only be opened when all children are open
* a childs parent needs to exist when the child is added
* a child can only be closed when its parent is already closed
This patch ensures the above by using a linked list to track the relations.
--- include/net/mac80211.h | 20 ++++++++++++++ net/mac80211/cfg.c | 61 ++++++++++++++++++++++++++++++++++++++++++ net/mac80211/iface.c | 16 +++++++++++ net/mac80211/util.c | 27 +++++++++++++++++++ 4 files changed, 124 insertions(+)
include/net/mac80211.h +20 -0
@@ -6529,4 +6529,24 @@ u32 ieee80211_calc_tx_airtime(struct ieee80211_hw *hw,*/ bool ieee80211_set_hw_80211_encap (struct ieee80211_vif *vif,bool enable); +/** +* ieee80211_get_multi_bssid_mode - get a vifs multi bssid mode. +* +* This function is used to help look up the multi bssid mode which is tracked +* inside the wdev. +* +* @vif: &struct ieee80211_vif pointer from the add_interface callback. +*/ +enum nl80211_multi_bssid_mode ieee80211_get_multi_bssid_mode (struct ieee80211_vif *vif); + +/** +* ieee80211_get_multi_bssid_parent - get a vifs multi bssid parent. +* +* This function is used to help look up the multi bssid parent which is tracked +* inside the wdev. +* +* @vif: &struct ieee80211_vif pointer from the add_interface callback. +*/ +struct ieee80211_vif *ieee80211_get_multi_bssid_parent (struct ieee80211_vif *vif); +#endif /* MAC80211_H */
net/mac80211/cfg.c +61 -0
78 lines not on this page · raw message
net/mac80211/iface.c +16 -0
@@ -535,6 +535,15 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) }case NL80211_IFTYPE_AP : sdata->bss = &sdata->u.ap; +if (wdev->multi_bssid_mode ==NL80211_MULTIPLE_BSSID_TRANSMITTED ) { +struct wireless_dev *child; + +/* make sure all children are already up */ +list_for_each_entry (child, &wdev->multi_bssid_list, + multi_bssid_list) +if (!wdev_running (child)) +return -ENETDOWN ; + }break ;case NL80211_IFTYPE_MESH_POINT :case NL80211_IFTYPE_STATION :
@@ -795,6 +804,7 @@ static int ieee80211_open(struct net_device *dev)static void ieee80211_do_stop (struct ieee80211_sub_if_data *sdata,bool going_down) { +struct wireless_dev *wdev =ieee80211_vif_to_wdev (&sdata->vif);struct ieee80211_local *local = sdata->local;unsigned long flags;struct sk_buff *skb, *tmp;
@@ -805,6 +815,12 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,bool cancel_scan;struct cfg80211_nan_func *func; +if (sdata->vif.type ==NL80211_IFTYPE_AP && + wdev->multi_bssid_mode ==NL80211_MULTIPLE_BSSID_NON_TRANSMITTED ) +/* make sure the parent is already down */ +if (wdev_running (wdev->multi_bssid_parent)) +return ; +clear_bit (SDATA_STATE_RUNNING , &sdata->state); cancel_scan =rcu_access_pointer (local->scan_sdata) == sdata;
net/mac80211/util.c +27 -0
@@ -847,6 +847,33 @@ struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif) }EXPORT_SYMBOL_GPL (ieee80211_vif_to_wdev); +enum nl80211_multi_bssid_mode ieee80211_get_multi_bssid_mode (struct ieee80211_vif *vif) +{ +struct ieee80211_sub_if_data *sdata; + +if (!vif) +return 0 ; + + sdata =vif_to_sdata (vif); + +return sdata->wdev.multi_bssid_mode; +} +EXPORT_SYMBOL_GPL (ieee80211_get_multi_bssid_mode); + +struct ieee80211_vif *ieee80211_get_multi_bssid_parent (struct ieee80211_vif *vif) +{ +struct ieee80211_sub_if_data *sdata; + +if (!vif) +return NULL ; + + sdata =vif_to_sdata (vif); +if (sdata->wdev.multi_bssid_parent) +return wdev_to_ieee80211_vif (sdata->wdev.multi_bssid_parent); +return NULL ; +} +EXPORT_SYMBOL_GPL (ieee80211_get_multi_bssid_parent); +/* * Nothing should have been stuffed into the workqueue during * the suspend->resume cycle. Since we can't check each caller
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 5/12 mac80211: add multiple bssid IE parsing
In reply to John CrispinDrivers might need to know the offset and length of the IE. Add parsing code and propagate the values to the driver using the mutable struct.
--- include/net/mac80211.h | 5 +++++ net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/tx.c | 10 ++++++++++ net/mac80211/util.c | 4 ++++ 4 files changed, 21 insertions(+)
include/net/mac80211.h +5 -0
@@ -4717,12 +4717,17 @@ void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets);* @csa_counter_offs: array of IEEE80211_MAX_CSA_COUNTERS_NUM offsets * to CSA counters. This array can contain zero values which * should be ignored. +* @mbssid_offset: position of mbssid_offset +* @mbssid_length: position of mbssid_offset */ struct ieee80211_mutable_offsets {u16 tim_offset;u16 tim_length;u16 csa_counter_offs[IEEE80211_MAX_CSA_COUNTERS_NUM ]; + +u16 multiple_bssid_offset; +u16 multiple_bssid_length; };/**
net/mac80211/ieee80211_i.h +2 -0
@@ -1520,6 +1520,7 @@ struct ieee802_11_elems {u8 dtim_count;u8 dtim_period;const struct ieee80211_addba_ext_ie *addba_ext_ie; +u16 multiple_bssid_offset;/* length of them, respectively */ u8 ext_capab_len;
@@ -1540,6 +1541,7 @@ struct ieee802_11_elems {u8 perr_len;u8 country_elem_len;u8 bssid_index_len; +u8 multiple_bssid_len;/* whether a parse error occurred while retrieving these elements */ bool parse_error;
net/mac80211/tx.c +10 -0
@@ -4747,11 +4747,21 @@ __ieee80211_beacon_get(struct ieee80211_hw *hw, is_template);if (offs) { +struct ieee802_11_elems elems; + offs->tim_offset = beacon->head_len; offs->tim_length = skb->len - beacon->head_len;/* for AP the csa offsets are from tail */ csa_off_base = skb->len; + +ieee802_11_parse_elems (skb->head, skb->len, true, &elems, + sdata->wdev.address,NULL ); +if (!elems.parse_error) + goto out; + + offs->multiple_bssid_offset = elems.multiple_bssid_offset; + offs->multiple_bssid_length = elems.multiple_bssid_len; }if (beacon->tail)
net/mac80211/util.c +4 -0
@@ -1311,6 +1311,10 @@ _ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, &crc : NULL, elem, elems);break ; +case WLAN_EID_MULTIPLE_BSSID : + elems->multiple_bssid_offset = pos - start; + elems->multiple_bssid_len = elen; +break ;default :break ; }
Signature · 1 line
2.20.1
PATCH 3/12 nl80211: add attributes to set beacon transmit mode
In reply to John CrispinBeacons on a radio can be sent out in burst (back to back) or staggered (equally spread out over time) mode. This patch adds the required nl80211 attributes allowing us to configure this from userland.
--- include/net/cfg80211.h | 3 +++ include/uapi/linux/nl80211.h | 17 +++++++++++++++++ net/wireless/nl80211.c | 7 +++++++ 3 files changed, 27 insertions(+)
include/net/cfg80211.h +3 -0
@@ -1094,6 +1094,8 @@ 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) +* @beacon_tx_mode: can be set to tell the driver to sent the beacons in staggered +* or burst mode. */ struct cfg80211_ap_settings {struct cfg80211_chan_def chandef;
@@ -1125,6 +1127,7 @@ struct cfg80211_ap_settings {struct ieee80211_he_obss_pd he_obss_pd;struct cfg80211_he_bss_color he_bss_color;struct ieee80211_multi_bssid multi_bssid; +enum nl80211_beacon_tx_mode beacon_tx_mode; };/**
include/uapi/linux/nl80211.h +17 -0
@@ -2481,6 +2481,8 @@ enum nl80211_commands {* * @NL80211_ATTR_MULTI_BSSID_COUNT: The number of BSSs inside the multi bssid IE. * +* @NL80211_ATTR_BEACON_TX_MODE: Set the beacon tx mode to staggered or burst. +* * @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_MULTI_BSSID_INDEX ,NL80211_ATTR_MULTI_BSSID_COUNT , +NL80211_ATTR_BEACON_TX_MODE , +/* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST,
@@ -6732,6 +6736,19 @@ enum nl80211_multi_bssid_mode { NL80211_MULTIPLE_BSSID_NON_TRANSMITTED, }; +/** +* enum nl80211_beacon_tx_mode - Beacon tx mode settings +* +* @BEACON_TX_MODE_DEFAULT: The beacons shall be sent out in its default mode +* @BEACON_TX_MODE_STAGGERED: The beacons shall be sent out in staggered mode +* @BEACON_TX_MODE_BURST: The beacons shall be sent out in burst mode +* beacon +*/ +enum nl80211_beacon_tx_mode { +NL80211_BEACON_TX_MODE_STAGGERED =0 , +NL80211_BEACON_TX_MODE_BURST , +}; +/** * enum nl80211_peer_measurement_ftm_resp - FTM response attributes * @__NL80211_PMSR_FTM_RESP_ATTR_INVALID: invalid
net/wireless/nl80211.c +7 -0
@@ -669,6 +669,9 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { [NL80211_ATTR_MULTI_BSSID_PARENT] = { .type = NLA_U32 }, [NL80211_ATTR_MULTI_BSSID_INDEX] = { .type = NLA_U32 }, [NL80211_ATTR_MULTI_BSSID_COUNT] = { .type = NLA_U32 }, + [NL80211_ATTR_BEACON_TX_MODE ] =NLA_POLICY_RANGE (NLA_U8 , +NL80211_BEACON_TX_MODE_STAGGERED , + NL80211_BEACON_TX_MODE_BURST), };/* policy for the key attributes */
@@ -5165,6 +5168,10 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) params.multi_bssid.count =nla_get_u32 ( info->attrs[NL80211_ATTR_MULTI_BSSID_COUNT ]); +if (info->attrs[NL80211_ATTR_BEACON_TX_MODE ]) + params.beacon_tx_mode = +nla_get_u8 (info->attrs[NL80211_ATTR_BEACON_TX_MODE ]); +nl80211_calculate_ap_params (¶ms);if (info->attrs[NL80211_ATTR_EXTERNAL_AUTH_SUPPORT ])
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 6/12 mac80211: propagate multi bssid settings when starting an AP
In reply to John CrispinThis patch extends the bss_config allowing us to propagate the multiple bssid setting down the stack into the driver.
--- include/net/mac80211.h | 2 ++ net/mac80211/cfg.c | 2 ++ 2 files changed, 4 insertions(+)
include/net/mac80211.h +2 -0
@@ -606,6 +606,7 @@ struct ieee80211_ftm_responder_params {* @he_operation: 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 +* @multi_bssid: the multi bssid settings of the AP. */ struct ieee80211_bss_conf {const u8 *bssid;
@@ -669,6 +670,7 @@ struct ieee80211_bss_conf {struct ieee80211_he_operation he_operation;struct ieee80211_he_obss_pd he_obss_pd;struct cfg80211_he_bss_color he_bss_color; +struct ieee80211_multi_bssid multi_bssid; };/**
net/mac80211/cfg.c +2 -0
@@ -1130,6 +1130,8 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, sizeof(struct ieee80211_he_obss_pd));memcpy (&sdata->vif.bss_conf.he_bss_color, ¶ms->he_bss_color,sizeof (struct ieee80211_he_bss_color )); +memcpy (&sdata->vif.bss_conf.multi_bssid, ¶ms->multi_bssid, +sizeof (struct ieee80211_multi_bssid )); sdata->vif.bss_conf.ssid_len = params->ssid_len;if (params->ssid_len)
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 1/12 nl80211: add basic multiple bssid support
In reply to John CrispinThis patch adds support for passing the multiple bssid config to the kernel when adding an interface. A bss can be legacy, transmitting or non-transmitting. A non-transmitting BSSID will have a parent interface, which needs to be transmitting.
--- include/net/cfg80211.h | 8 ++++++++ include/uapi/linux/nl80211.h | 25 +++++++++++++++++++++++++ net/wireless/nl80211.c | 14 ++++++++++++++ 3 files changed, 47 insertions(+)
include/net/cfg80211.h +8 -0
@@ -601,6 +601,8 @@ struct vif_params {u8 macaddr[ETH_ALEN ];const u8 *vht_mumimo_groups;const u8 *vht_mumimo_follow_addr; +enum nl80211_multi_bssid_mode multi_bssid_mode; +u32 multi_bssid_parent; };/**
@@ -5060,6 +5062,9 @@ struct cfg80211_cqm_config;* @pmsr_list: (private) peer measurement requests * @pmsr_lock: (private) peer measurements requests/results lock * @pmsr_free_wk: (private) peer measurements cleanup work +* @multi_bssid_mode: Is this a legacy, transmitted or non-transmitted bssid +* @multi_bssid_parent: a non-transmitted bssid has a transmitted parent +* @multi_bssid_list: linked list for tracking parent - child relations. */ struct wireless_dev {struct wiphy *wiphy;
@@ -5136,6 +5141,9 @@ struct wireless_dev {struct list_head pmsr_list;spinlock_t pmsr_lock;struct work_struct pmsr_free_wk; +enum nl80211_multi_bssid_mode multi_bssid_mode; +struct wireless_dev *multi_bssid_parent; +struct list_head multi_bssid_list; };static inline u8 *wdev_address (struct wireless_dev *wdev)
include/uapi/linux/nl80211.h +25 -0
@@ -2470,6 +2470,12 @@ enum nl80211_commands {* no roaming occurs between the reauth threshold and PMK expiration, * disassociation is still forced. * +* @NL80211_ATTR_MULTI_BSSID_MODE: Set the (Non-)Transmitted flag for this +* BSSIDs beacon. +* +* @NL80211_ATTR_MULTI_BSSID_PARENT: If this is a Non-Transmitted BSSID, define +* the parent interface. +* * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2945,6 +2951,9 @@ enum nl80211_attrs {NL80211_ATTR_PMK_LIFETIME ,NL80211_ATTR_PMK_REAUTH_THRESHOLD , +NL80211_ATTR_MULTI_BSSID_MODE , +NL80211_ATTR_MULTI_BSSID_PARENT , +/* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST,
@@ -6700,6 +6709,22 @@ enum nl80211_peer_measurement_ftm_failure_reasons { NL80211_PMSR_FTM_FAILURE_BAD_CHANGED_PARAMS, }; +/** +* enum nl80211_multi_bssid_mode - Multiple BSSID beacon type +* +* Used by cfg80211_ap_settings +* +* @MULTIPLE_BSSID_LEGACY: This BSS is not part of a multiple BSSID group +* @MULTIPLE_BSSID_TRANSMITTED: This BSS is broadcasting a multiple BSSID +* beacon +* @MULTIPLE_BSSID_NON_TRANSMITTED: This BSS is not broadcasting a beacon +*/ +enum nl80211_multi_bssid_mode { +NL80211_MULTIPLE_BSSID_LEGACY =0 , +NL80211_MULTIPLE_BSSID_TRANSMITTED , +NL80211_MULTIPLE_BSSID_NON_TRANSMITTED , +}; +/** * enum nl80211_peer_measurement_ftm_resp - FTM response attributes * @__NL80211_PMSR_FTM_RESP_ATTR_INVALID: invalid
net/wireless/nl80211.c +14 -0
@@ -663,6 +663,10 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { [NL80211_ATTR_CONTROL_PORT_NO_PREAUTH] = { .type = NLA_FLAG }, [NL80211_ATTR_PMK_LIFETIME] = NLA_POLICY_MIN(NLA_U32, 1), [NL80211_ATTR_PMK_REAUTH_THRESHOLD] = NLA_POLICY_RANGE(NLA_U8, 1, 100), + [NL80211_ATTR_MULTI_BSSID_MODE ] =NLA_POLICY_RANGE (NLA_U8 , +NL80211_MULTIPLE_BSSID_LEGACY , + NL80211_MULTIPLE_BSSID_NON_TRANSMITTED), + [NL80211_ATTR_MULTI_BSSID_PARENT] = { .type = NLA_U32 }, };/* policy for the key attributes */
@@ -3756,6 +3760,16 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)if (err <0 )return err; +if (info->attrs[NL80211_ATTR_MULTI_BSSID_MODE ]) + params.multi_bssid_mode = +nla_get_u8 (info->attrs[NL80211_ATTR_MULTI_BSSID_MODE ]); +if (info->attrs[NL80211_ATTR_MULTI_BSSID_PARENT ]) + params.multi_bssid_parent = +nla_get_u8 (info->attrs[NL80211_ATTR_MULTI_BSSID_PARENT ]); +if (params.multi_bssid_mode ==NL80211_MULTIPLE_BSSID_NON_TRANSMITTED && + !params.multi_bssid_parent) +return -EOPNOTSUPP ; + msg =nlmsg_new (NLMSG_DEFAULT_SIZE ,GFP_KERNEL );if (!msg)return -ENOMEM ;
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 2/12 nl80211: add attributes for multiple bssid related settings
In reply to John CrispinWhen we start a multiple bssid AP we need to pass the index and number of peers aswell to the kernel. This info needs to be propagated to the driver.
--- include/net/cfg80211.h | 12 ++++++++++++ include/uapi/linux/nl80211.h | 7 +++++++ net/wireless/nl80211.c | 15 +++++++++++++++ 3 files changed, 34 insertions(+)
include/net/cfg80211.h +12 -0
@@ -448,6 +448,17 @@ struct ieee80211_supported_band {const struct ieee80211_sband_iftype_data *iftype_data; }; +/** +* struct ieee80211_multi_bssid - AP settings for multi bssid +* +* @index: the index of this AP in the multi bssid group. +* @count: the total number of multi bssid peer APs. +*/ +struct ieee80211_multi_bssid { +u32 index; +u32 count; +}; +/** * ieee80211_get_sband_iftype_data - return sband data for a given iftype * @sband: the sband to search for the STA on
@@ -1113,6 +1124,7 @@ struct cfg80211_ap_settings {u32 flags;struct ieee80211_he_obss_pd he_obss_pd;struct cfg80211_he_bss_color he_bss_color; +struct ieee80211_multi_bssid multi_bssid; };/**
include/uapi/linux/nl80211.h +7 -0
@@ -2476,6 +2476,11 @@ enum nl80211_commands {* @NL80211_ATTR_MULTI_BSSID_PARENT: If this is a Non-Transmitted BSSID, define * the parent interface. * +* @NL80211_ATTR_MULTI_BSSID_INDEX: The index of this BSS inside the multi bssid +* IE. +* +* @NL80211_ATTR_MULTI_BSSID_COUNT: The number of BSSs inside the multi bssid IE. +* * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2953,6 +2958,8 @@ enum nl80211_attrs {NL80211_ATTR_MULTI_BSSID_MODE ,NL80211_ATTR_MULTI_BSSID_PARENT , +NL80211_ATTR_MULTI_BSSID_INDEX , + NL80211_ATTR_MULTI_BSSID_COUNT,/* add attributes here, update the policy in nl80211.c */
net/wireless/nl80211.c +15 -0
@@ -667,6 +667,8 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { NL80211_MULTIPLE_BSSID_LEGACY, NL80211_MULTIPLE_BSSID_NON_TRANSMITTED), [NL80211_ATTR_MULTI_BSSID_PARENT] = { .type = NLA_U32 }, + [NL80211_ATTR_MULTI_BSSID_INDEX] = { .type = NLA_U32 }, + [NL80211_ATTR_MULTI_BSSID_COUNT] = { .type = NLA_U32 }, };/* policy for the key attributes */
@@ -4996,6 +4998,11 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) !info->attrs[NL80211_ATTR_BEACON_HEAD])return -EINVAL ; +if (wdev->multi_bssid_mode ==NL80211_MULTIPLE_BSSID_NON_TRANSMITTED && + (!info->attrs[NL80211_ATTR_MULTI_BSSID_INDEX ] || + !info->attrs[NL80211_ATTR_MULTI_BSSID_COUNT ])) +return -EINVAL ; + err =nl80211_parse_beacon (rdev, info->attrs, ¶ms.beacon);if (err)return err;
@@ -5150,6 +5157,14 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)return err; } +if (info->attrs[NL80211_ATTR_MULTI_BSSID_INDEX ]) + params.multi_bssid.index =nla_get_u32 ( + info->attrs[NL80211_ATTR_MULTI_BSSID_INDEX ]); + +if (info->attrs[NL80211_ATTR_MULTI_BSSID_COUNT ]) + params.multi_bssid.count =nla_get_u32 ( + info->attrs[NL80211_ATTR_MULTI_BSSID_COUNT ]); +nl80211_calculate_ap_params (¶ms);if (info->attrs[NL80211_ATTR_EXTERNAL_AUTH_SUPPORT ])
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 7/12 mac80211: propagate beacon tx mode to the driver
In reply to John CrispinNow that we can set the beacon xmit mode via nl80211 we want to also propagate that info to the device driver. This patch sets the field inside bss_config.
--- include/net/mac80211.h | 2 ++ net/mac80211/cfg.c | 1 + 2 files changed, 3 insertions(+)
include/net/mac80211.h +2 -0
@@ -607,6 +607,7 @@ struct ieee80211_ftm_responder_params {* @he_obss_pd: OBSS Packet Detection parameters. * @he_bss_color: BSS coloring settings, if BSS supports HE * @multi_bssid: the multi bssid settings of the AP. +* @beacon_tx_mode: the beacon tx mode. This can be staggered or burst. */ struct ieee80211_bss_conf {const u8 *bssid;
@@ -671,6 +672,7 @@ struct ieee80211_bss_conf {struct ieee80211_he_obss_pd he_obss_pd;struct cfg80211_he_bss_color he_bss_color;struct ieee80211_multi_bssid multi_bssid; +enum nl80211_beacon_tx_mode beacon_tx_mode; };/**
net/mac80211/cfg.c +1 -0
@@ -1071,6 +1071,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, prev_beacon_int = sdata->vif.bss_conf.beacon_int; sdata->vif.bss_conf.beacon_int = params->beacon_interval; + sdata->vif.bss_conf.beacon_tx_mode = params->beacon_tx_mode;if (params->he_cap && params->he_oper) { sdata->vif.bss_conf.he_support = true;
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 8/12 ath11k: pass multiple bssid info to FW when a new vdev is created
In reply to John CrispinWhen we use multiple bssid the FW needs to know if the bssid is non/transmitting and what the vdev_id of the parent is. This patch adds the required code to achieve this.
--- drivers/net/wireless/ath/ath11k/mac.c | 28 +++++++++++++++++++++++++-- drivers/net/wireless/ath/ath11k/wmi.c | 2 ++ drivers/net/wireless/ath/ath11k/wmi.h | 10 ++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +26 -2
@@ -4163,17 +4163,36 @@ static void ath11k_mac_op_stop(struct ieee80211_hw *hw)atomic_set (&ar->num_pending_mgmt_tx,0 ); } -static void +static int ath11k_mac_setup_vdev_create_params (struct ath11k_vif *arvif,struct vdev_create_params *params) {struct ath11k *ar = arvif->ar;struct ath11k_pdev *pdev = ar->pdev; +struct ieee80211_vif *parent; params->if_id = arvif->vdev_id; params->type = arvif->vdev_type; params->subtype = arvif->vdev_subtype; params->pdev_id = pdev->pdev_id; + params->vdevid_trans =0 ; +switch (ieee80211_get_multi_bssid_mode (arvif->vif)) { +case NL80211_MULTIPLE_BSSID_TRANSMITTED : + params->flags =WMI_HOST_VDEV_FLAGS_TRANSMIT_AP ; +break ; +case NL80211_MULTIPLE_BSSID_NON_TRANSMITTED : + params->flags =WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP ; + parent =ieee80211_get_multi_bssid_parent (arvif->vif); +if (!parent) +return -ENOENT ; +if (ar->hw->wiphy !=ieee80211_vif_to_wdev (parent)->wiphy) +return -EINVAL ; + params->vdevid_trans =ath11k_vif_to_arvif (parent)->vdev_id; +break ; +default : + params->flags =WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP ; +break ; + }if (pdev->cap.supported_bands &WMI_HOST_WLAN_2G_CAP ) { params->chains[NL80211_BAND_2GHZ ].tx = ar->num_tx_chains;
@@ -4183,6 +4202,7 @@ ath11k_mac_setup_vdev_create_params(struct ath11k_vif *arvif, params->chains[NL80211_BAND_5GHZ ].tx = ar->num_tx_chains; params->chains[NL80211_BAND_5GHZ ].rx = ar->num_rx_chains; } +return 0 ; } static u32
@@ -4334,7 +4354,11 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,for (i =0 ; i <ARRAY_SIZE (vif->hw_queue); i++) vif->hw_queue[i] = i % (ATH11K_HW_MAX_QUEUES -1 ); -ath11k_mac_setup_vdev_create_params (arvif, &vdev_param); + ret =ath11k_mac_setup_vdev_create_params (arvif, &vdev_param); +if (ret) { +ath11k_warn (ab,"failed to prepare vdev %d\n" , ret); + goto err; + } ret =ath11k_wmi_vdev_create (ar, vif->addr, &vdev_param);if (ret) {
drivers/net/wireless/ath/ath11k/wmi.c +2 -0
@@ -603,6 +603,8 @@ int ath11k_wmi_vdev_create(struct ath11k *ar, u8 *macaddr, cmd->vdev_subtype = param->subtype; cmd->num_cfg_txrx_streams =WMI_NUM_SUPPORTED_BAND_MAX ; cmd->pdev_id = param->pdev_id; + cmd->flags = param->flags; + cmd->vdevid_trans = param->vdevid_trans;ether_addr_copy (cmd->vdev_macaddr.addr, macaddr); ptr = skb->data +sizeof (*cmd);
drivers/net/wireless/ath/ath11k/wmi.h +10 -0
@@ -107,6 +107,12 @@ enum { WMI_HOST_WLAN_2G_5G_CAP = 0x3, }; +enum { +WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP =1 , +WMI_HOST_VDEV_FLAGS_TRANSMIT_AP =2 , +WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP =4 , +}; +/* * wmi command groups. */
@@ -2376,6 +2382,8 @@ struct vdev_create_params {u8 rx; } chains[NUM_NL80211_BANDS ];u32 pdev_id; +u32 flags; +u32 vdevid_trans; };struct wmi_vdev_create_cmd {
@@ -2386,6 +2394,8 @@ struct wmi_vdev_create_cmd {struct wmi_mac_addr vdev_macaddr;u32 num_cfg_txrx_streams;u32 pdev_id; +u32 flags; +u32 vdevid_trans; } __packed;struct wmi_vdev_txrx_streams {
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 9/12 ath11k: add a struct to pass parameters into ath11k_wmi_vdev_up
In reply to John CrispinWhen setting up a multiple bssid we need to pass additional parameters to the FW. Doing this as individual parameters would make the call signature very long. Use an intermediate struct instead and adjust all callees to make use of it.
--- drivers/net/wireless/ath/ath11k/mac.c | 38 ++++++++++++++++++++++----- drivers/net/wireless/ath/ath11k/wmi.c | 17 +++++++----- drivers/net/wireless/ath/ath11k/wmi.h | 12 +++++++-- 3 files changed, 53 insertions(+), 14 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +32 -6
@@ -668,9 +668,13 @@ void ath11k_mac_peer_cleanup_all(struct ath11k *ar)static int ath11k_monitor_vdev_up (struct ath11k *ar,int vdev_id) { +struct vdev_up_params params = { + .vdev_id = vdev_id, + .bssid = ar->mac_addr, + };int ret =0 ; - ret =ath11k_wmi_vdev_up (ar, vdev_id,0 , ar->mac_addr); + ret =ath11k_wmi_vdev_up (ar, ¶ms);if (ret) {ath11k_warn (ar->ab,"failed to put up monitor vdev %i: %d\n" , vdev_id, ret);
@@ -735,6 +739,13 @@ static void ath11k_control_beaconing(struct ath11k_vif *arvif, struct ieee80211_bss_conf *info) {struct ath11k *ar = arvif->ar; +struct ieee80211_vif *parent; +struct vdev_up_params params = { + .vdev_id = arvif->vdev_id, + .bssid = arvif->bssid, + .profile_num = info->multi_bssid.count, + .profile_idx = info->multi_bssid.index, + };int ret =0 ;lockdep_assert_held (&arvif->ar->conf_mutex);
@@ -762,9 +773,15 @@ static void ath11k_control_beaconing(struct ath11k_vif *arvif, arvif->aid =0 ;ether_addr_copy (arvif->bssid, info->bssid); + parent =ieee80211_get_multi_bssid_parent (arvif->vif); +if (parent) { +struct ath11k_vif *pvif = (struct ath11k_vif *)parent->drv_priv; + + params.trans_bssid = pvif->bssid; + } + - ret =ath11k_wmi_vdev_up (arvif->ar, arvif->vdev_id, arvif->aid, - arvif->bssid); + ret =ath11k_wmi_vdev_up (arvif->ar, ¶ms);if (ret) {ath11k_warn (ar->ab,"failed to bring up vdev %d: %i\n" , arvif->vdev_id, ret);
@@ -1685,6 +1702,11 @@ static void ath11k_bss_assoc(struct ieee80211_hw *hw,struct ath11k *ar = hw->priv;struct ath11k_vif *arvif = (void *)vif->drv_priv;struct peer_assoc_params peer_arg; +struct vdev_up_params params = { + .vdev_id = arvif->vdev_id, + .bssid = bss_conf->bssid, + .aid = bss_conf->aid, + };struct ieee80211_sta *ap_sta;int ret;
@@ -1733,7 +1755,7 @@ static void ath11k_bss_assoc(struct ieee80211_hw *hw, arvif->aid = bss_conf->aid;ether_addr_copy (arvif->bssid, bss_conf->bssid); - ret =ath11k_wmi_vdev_up (ar, arvif->vdev_id, arvif->aid, arvif->bssid); + ret =ath11k_wmi_vdev_up (ar, ¶ms);if (ret) {ath11k_warn (ar->ab,"failed to set vdev %d up: %d\n" , arvif->vdev_id, ret);
@@ -4987,6 +5009,8 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,/* TODO: Update ar->rx_channel */ for (i =0 ; i < n_vifs; i++) { +struct vdev_up_params params; + arvif = (void *)vifs[i].vif->drv_priv;if (WARN_ON (!arvif->is_started))
@@ -5007,8 +5031,10 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,continue ; } - ret =ath11k_wmi_vdev_up (arvif->ar, arvif->vdev_id, arvif->aid, - arvif->bssid); + params.vdev_id = arvif->vdev_id, + params.bssid = arvif->bssid, + params.aid = arvif->aid, + ret =ath11k_wmi_vdev_up (arvif->ar, ¶ms);if (ret) {ath11k_warn (ab,"failed to bring vdev up %d: %d\n" , arvif->vdev_id, ret);
drivers/net/wireless/ath/ath11k/wmi.c +11 -6
@@ -862,7 +862,7 @@ int ath11k_wmi_vdev_start(struct ath11k *ar, struct wmi_vdev_start_req_arg *arg,return ret; } -int ath11k_wmi_vdev_up (struct ath11k *ar,u32 vdev_id,u32 aid,const u8 *bssid) +int ath11k_wmi_vdev_up (struct ath11k *ar,struct vdev_up_params *params) {struct ath11k_pdev_wmi *wmi = ar->wmi;struct wmi_vdev_up_cmd *cmd;
@@ -877,10 +877,14 @@ int ath11k_wmi_vdev_up(struct ath11k *ar, u32 vdev_id, u32 aid, const u8 *bssid) cmd->tlv_header =FIELD_PREP (WMI_TLV_TAG ,WMI_TAG_VDEV_UP_CMD ) |FIELD_PREP (WMI_TLV_LEN ,sizeof (*cmd) -TLV_HDR_SIZE ); - cmd->vdev_id = vdev_id; - cmd->vdev_assoc_id = aid; + cmd->vdev_id = params->vdev_id; + cmd->vdev_assoc_id = params->aid; + cmd->profile_idx = params->profile_idx; + cmd->profile_num = params->profile_num; -ether_addr_copy (cmd->vdev_bssid.addr, bssid); +if (params->trans_bssid) +ether_addr_copy (cmd->trans_bssid.addr, params->trans_bssid); +ether_addr_copy (cmd->vdev_bssid.addr, params->bssid); ret =ath11k_wmi_cmd_send (wmi, skb,WMI_VDEV_UP_CMDID );if (ret) {
@@ -889,8 +893,9 @@ int ath11k_wmi_vdev_up(struct ath11k *ar, u32 vdev_id, u32 aid, const u8 *bssid) }ath11k_dbg (ar->ab,ATH11K_DBG_WMI , -"WMI mgmt vdev up id 0x%x assoc id %d bssid %pM\n" , - vdev_id, aid, bssid); +"WMI mgmt vdev up id 0x%x assoc id %d idx %d num %d bssid %pM trans_bssid %pM\n" , + params->vdev_id, params->aid, params->profile_idx, params->profile_num, + params->bssid, params->trans_bssid);return ret; }
drivers/net/wireless/ath/ath11k/wmi.h +10 -2
@@ -2410,6 +2410,15 @@ struct wmi_vdev_delete_cmd {u32 vdev_id; } __packed; +struct vdev_up_params { +u32 vdev_id; +u16 aid; +u32 profile_idx; +u32 profile_num; +const u8 *bssid; +u8 *trans_bssid; +}; +struct wmi_vdev_up_cmd {u32 tlv_header;u32 vdev_id;
@@ -4732,8 +4741,7 @@ int ath11k_wmi_bcn_tmpl(struct ath11k *ar, u32 vdev_id,struct ieee80211_mutable_offsets *offs, struct sk_buff *bcn);int ath11k_wmi_vdev_down (struct ath11k *ar,u8 vdev_id); -int ath11k_wmi_vdev_up (struct ath11k *ar,u32 vdev_id,u32 aid, -const u8 *bssid); +int ath11k_wmi_vdev_up (struct ath11k *ar,struct vdev_up_params *params);int ath11k_wmi_vdev_stop (struct ath11k *ar,u8 vdev_id);int ath11k_wmi_vdev_start (struct ath11k *ar,struct wmi_vdev_start_req_arg *arg,bool restart);
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 11/12 ath11k: set beacon tx mode
In reply to John CrispinThe beacon can be sent out in staggered or burst mode. Set this mode according to what mac80211 tells us to use whenever the beacon changes.
--- drivers/net/wireless/ath/ath11k/mac.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath11k/mac.c +2 -0
@@ -1907,6 +1907,8 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,if (changed &BSS_CHANGED_BEACON ) { param_id =WMI_PDEV_PARAM_BEACON_TX_MODE ; param_value =WMI_BEACON_STAGGERED_MODE ; +if (info->beacon_tx_mode ==NL80211_BEACON_TX_MODE_BURST ) + param_value =WMI_BEACON_BURST_MODE ; ret =ath11k_wmi_pdev_set_param (ar, param_id, param_value, ar->pdev->pdev_id);if (ret)
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 10/12 ath11k: add the multiple bssid IE offset to the beacon template
In reply to John CrispinThe FW needs to know the offset of the multi bssid IE. Add this value to the WMI TLV.
--- drivers/net/wireless/ath/ath11k/wmi.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath11k/wmi.c +1 -0
@@ -1567,6 +1567,7 @@ int ath11k_wmi_bcn_tmpl(struct ath11k *ar, u32 vdev_id, cmd->csa_switch_count_offset = offs->csa_counter_offs[0 ]; cmd->ext_csa_switch_count_offset = offs->csa_counter_offs[1 ]; cmd->buf_len = bcn->len; + cmd->mbssid_ie_offset = offs->multiple_bssid_offset; ptr = skb->data +sizeof (*cmd);
Signature · 1 line
2.20.1
PATCH 12/12 ath11k: set the multiple bssid hw cap
In reply to John CrispinThis patch sets the SUPPORTS_MULTI_BSSID inside ath11k.
--- drivers/net/wireless/ath/ath11k/mac.c | 4 ++++ drivers/net/wireless/ath/ath11k/wmi.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +4 -0
@@ -5980,17 +5980,20 @@ static int ath11k_mac_setup_channels_rates(struct ath11k *ar,static const u8 ath11k_if_types_ext_capa[] = { [0 ] =WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING , + [2 ] =WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT , [7 ] =WLAN_EXT_CAPA8_OPMODE_NOTIF , };static const u8 ath11k_if_types_ext_capa_sta[] = { [0 ] =WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING , + [2 ] =WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT , [7 ] =WLAN_EXT_CAPA8_OPMODE_NOTIF , [9 ] =WLAN_EXT_CAPA10_TWT_REQUESTER_SUPPORT , };static const u8 ath11k_if_types_ext_capa_ap[] = { [0 ] =WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING , + [2 ] =WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT , [7 ] =WLAN_EXT_CAPA8_OPMODE_NOTIF , [9 ] =WLAN_EXT_CAPA10_TWT_RESPONDER_SUPPORT , };
@@ -6101,6 +6104,7 @@ static int __ath11k_mac_register(struct ath11k *ar)ieee80211_hw_set (ar->hw,QUEUE_CONTROL );ieee80211_hw_set (ar->hw,SUPPORTS_TX_FRAG );ieee80211_hw_set (ar->hw,REPORTS_LOW_ACK ); +ieee80211_hw_set (ar->hw,SUPPORTS_MULTI_BSSID );if (ht_cap &WMI_HT_CAP_ENABLED ) {ieee80211_hw_set (ar->hw,AMPDU_AGGREGATION );ieee80211_hw_set (ar->hw,TX_AMPDU_SETUP_IN_HW );
drivers/net/wireless/ath/ath11k/wmi.h +2 -2
@@ -109,8 +109,8 @@ enum {enum {WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP =1 , -WMI_HOST_VDEV_FLAGS_TRANSMIT_AP =2 , -WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP =4 , +WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP =2 , +WMI_HOST_VDEV_FLAGS_TRANSMIT_AP =4 , };/*
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 12/12] ath11k: set the multiple bssid hw cap
Quoted 3 lines · John Crispin
This patch sets the
SUPPORTS_MULTI_BSSIDinside ath11k.Signed-off-by John Crispin <[email protected]>
On what hardware and firmware did you test this?
drivers/net/wireless/ath/ath11k/wmi.h enum { · line 113
Quoted 10 lines
drivers/net/wireless/ath/ath11k/wmi.h +2
-2@@ -109,8 +109,8 @@ enum {enum {WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP =1 , -WMI_HOST_VDEV_FLAGS_TRANSMIT_AP =2 , -WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP =4 , +WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP =2 , +WMI_HOST_VDEV_FLAGS_TRANSMIT_AP =4 ,
I wonder if this is a safe thing to do? Do all firmware branches use these new values?
Signature · 6 lines
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 12/12] ath11k: set the multiple bssid hw cap
Quoted 12 lines · Kalle Valo
Quoted 3 lines · John Crispin
This patch sets the
SUPPORTS_MULTI_BSSIDinside ath11k.Signed-off-by John Crispin <[email protected]>On what hardware and firmware did you test this?
Quoted 4 lines
drivers/net/wireless/ath/ath11k/wmi.h +0
-0@@ -109,8 +109,8 @@ enum {
Quoted 10 lines
drivers/net/wireless/ath/ath11k/wmi.h enum { · line 113
Quoted 6 lines
drivers/net/wireless/ath/ath11k/wmi.h +2
-2enum {WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP =1 , -WMI_HOST_VDEV_FLAGS_TRANSMIT_AP =2 , -WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP =4 , +WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP =2 , +WMI_HOST_VDEV_FLAGS_TRANSMIT_AP =4 ,I wonder if this is a safe thing to do? Do all firmware branches use these new values?
Hi,
looks like i folded the fix patch into the wrong patch. these values get added in this same patchset. Johannes commented on the nl80211 part already and i will send out a V2 this week.
John
_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 8 lines · John Crispin
Multiple bssid allows us to share a single beacon amongst several VAPs. This essentially safes airtime. This feature is achieved by adding an additional IE to the transmitting VAPs beacon. This new IE contains the additional SSIDs and their non-inheritance information.
This series is still missing handling for TIM, which will be sent in a follow-up series.
Quoted 14 lines
John Crispin (12):
nl80211: add basic multiple bssid support
nl80211: add attributes for multiple bssid related settings
nl80211: add attributes to set beacon transmit mode
mac80211: add multiple bssid support
mac80211: add multiple bssid IE parsing
mac80211: propagate multi bssid settings when starting an AP
mac80211: propagate beacon tx mode to the driver
ath11k: pass multiple bssid info to FW when a new vdev is created
ath11k: add a struct to pass parameters intoath11k_wmi_vdev_up
ath11k: add the multiple bssid IE offset to the beacon template
ath11k: set beacon tx mode
ath11k: set the multiple bssid hw cap
Great work :)
-Rajkumar
_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 01/12] nl80211: add basic multiple bssid support
In reply to John CrispinOn 2020-06-04 00:09, John Crispin wrote:
[...]
net/wireless/nl80211.c const struct nla_policy · line 672
Quoted 13 lines
net/wireless/nl80211.c +4
-0@@ -663,6 +663,10 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { [NL80211_ATTR_CONTROL_PORT_NO_PREAUTH] = { .type = NLA_FLAG }, [NL80211_ATTR_PMK_LIFETIME] = NLA_POLICY_MIN(NLA_U32, 1), [NL80211_ATTR_PMK_REAUTH_THRESHOLD ] =NLA_POLICY_RANGE (NLA_U8 ,1 , 100), + [NL80211_ATTR_MULTI_BSSID_MODE ] =NLA_POLICY_RANGE (NLA_U8 , +NL80211_MULTIPLE_BSSID_LEGACY , + NL80211_MULTIPLE_BSSID_NON_TRANSMITTED), + [NL80211_ATTR_MULTI_BSSID_PARENT] = { .type = NLA_U32 },
If it is read as u8, better define as NLA_U8.
Quoted 16 lines
};
/* policy for the key attributes */
net/wireless/nl80211.c +7
-0@@ -3756,6 +3760,16 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)if (err <0 )return err; +if (info->attrs[NL80211_ATTR_MULTI_BSSID_MODE ]) + params.multi_bssid_mode = +nla_get_u8 (info->attrs[NL80211_ATTR_MULTI_BSSID_MODE ]); +if (info->attrs[NL80211_ATTR_MULTI_BSSID_PARENT ]) + params.multi_bssid_parent = +nla_get_u8 (info->attrs[NL80211_ATTR_MULTI_BSSID_PARENT ]); + if (params.multi_bssid_mode == NL80211_MULTIPLE_BSSID_NON_TRANSMITTED&&
net/wireless/nl80211.c static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info) · line 3772
Quoted 3 lines
net/wireless/nl80211.c +3
-0+ !params.multi_bssid_parent) +return -EOPNOTSUPP ; +
Are you expecting BSSID or ifindex in multi_bssid_parent? If it is ifindex, it can be 0. no
-Rajkumar
Re: [PATCH 02/12] nl80211: add attributes for multiple bssid related settings
In reply to John CrispinQuoted 11 lines · John Crispin
When we start a multiple bssid AP we need to pass the index and number of peers aswell to the kernel. This info needs to be propagated to the driver.
Signed-off-by John Crispin <[email protected]>--- include/net/cfg80211.h | 12 ++++++++++++ include/uapi/linux/nl80211.h | 7 +++++++ net/wireless/nl80211.c | 15 +++++++++++++++ 3 files changed, 34 insertions(+)
[...]
Quoted 31 lines
net/wireless/nl80211.c +2
-0@@ -667,6 +667,8 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { NL80211_MULTIPLE_BSSID_LEGACY, NL80211_MULTIPLE_BSSID_NON_TRANSMITTED), [NL80211_ATTR_MULTI_BSSID_PARENT] = { .type = NLA_U32 }, + [NL80211_ATTR_MULTI_BSSID_INDEX] = { .type = NLA_U32 }, + [NL80211_ATTR_MULTI_BSSID_COUNT] = { .type = NLA_U32 }, };/* policy for the key attributes */
net/wireless/nl80211.c +1
-0@@ -4996,6 +4998,11 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) !info->attrs[NL80211_ATTR_BEACON_HEAD])return -EINVAL ; + if (wdev->multi_bssid_mode == NL80211_MULTIPLE_BSSID_NON_TRANSMITTED&&
net/wireless/nl80211.c +4
-0+ (!info->attrs[NL80211_ATTR_MULTI_BSSID_INDEX ] || + !info->attrs[NL80211_ATTR_MULTI_BSSID_COUNT])) + return -EINVAL; + err =nl80211_parse_beacon (rdev, info->attrs, ¶ms.beacon);if (err)return err;@@ -5150,6 +5157,14 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)return err;
net/wireless/nl80211.c static int nl80211_start_ap(struct sk_buff · line 5168
Quoted 10 lines
net/wireless/nl80211.c +8
-0} +if (info->attrs[NL80211_ATTR_MULTI_BSSID_INDEX ]) + params.multi_bssid.index =nla_get_u32 ( + info->attrs[NL80211_ATTR_MULTI_BSSID_INDEX ]); + +if (info->attrs[NL80211_ATTR_MULTI_BSSID_COUNT ]) + params.multi_bssid.count =nla_get_u32 ( + info->attrs[NL80211_ATTR_MULTI_BSSID_COUNT ]); +
John,
Does the count include transmitting and non-transmitting APs? Or just child-node counts. Are you expecting start_ap() for all non-trasmitting AP as well? Hope this count can be set only for parent AP?
-Rajkumar
_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 12/12] ath11k: set the multiple bssid hw cap
In reply to John CrispinQuoted 4 lines · John Crispin
This patch sets the
SUPPORTS_MULTI_BSSIDinside ath11k.Signed-off-by John Crispin <[email protected]>
[...]
Quoted 6 lines
drivers/net/wireless/ath/ath11k/wmi.h +0
-0
drivers/net/wireless/ath/ath11k/wmi.h enum { · line 115
Quoted 9 lines
drivers/net/wireless/ath/ath11k/wmi.h +2
-2@@ -109,8 +109,8 @@ enum {enum {WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP =1 , -WMI_HOST_VDEV_FLAGS_TRANSMIT_AP =2 , -WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP =4 , +WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP =2 , +WMI_HOST_VDEV_FLAGS_TRANSMIT_AP =4 , };
John,
Not sure how you got the above values? Please confirm.
#define VDEV_FLAGS_NON_MBSSID_AP 0x00000001 /* legacy AP */ #define VDEV_FLAGS_TRANSMIT_AP 0x00000002 /* indicate if this vdev is transmitting AP */ #define VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004 /* explicitly indicate this vdev is non-transmitting AP */ #define VDEV_FLAGS_EMA_MODE 0x00000008 /* vdev is EMA and supports multiple beacon profiles. */
-Rajkumar
_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k