Skip to contentSkip to conversation

ath11k: add multiple bssid support

PATCH Superseded Aloka Dixit 2 participants 3 messages Jan 20, 2021 – Feb 1, 2021 Qualcomm Atheros ATH11K wireless driver

v6 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 ath11k: add multiple bssid support

From: John Crispin <[email protected]>

Add the required wmi support and make use of it in the beacon template code. We need to split the beacon code up into 2 code paths so that we can also send EMA templates.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01492-QCAHKSWPL_SILICONZ-1

---
v6:
Modified beacon_tx_offload_max_vdev to include EMA VAPs required by firmware to allocate enough memory for beacon templates. New hardware flags max_num_vaps and max_profile_periodicity. Initialized instances of struct vdev_up_params to avoid random values.

 drivers/net/wireless/ath/ath11k/hw.c  |   3 +
 drivers/net/wireless/ath/ath11k/hw.h  |   1 +
 drivers/net/wireless/ath/ath11k/mac.c | 201 ++++++++++++++++++++++----
 drivers/net/wireless/ath/ath11k/wmi.c |  28 +++-
 drivers/net/wireless/ath/ath11k/wmi.h |  90 +++++++++++-
 5 files changed, 287 insertions(+), 36 deletions(-)
drivers/net/wireless/ath/ath11k/hw.c +3 -0
index 66331da35012..11a35af7d794 100644
@@ -129,6 +129,9 @@ static void ath11k_init_wmi_config_ipq8074(struct ath11k_base *ab,
 	config->peer_map_unmap_v2_support = 1;
 	config->twt_ap_pdev_count = ab->num_radios;
 	config->twt_ap_sta_count = 1000;
+	config->ema_max_vap_cnt = ab->num_radios;
+	config->ema_max_profile_period = TARGET_EMA_MAX_PROFILE_PERIOD;
+	config->beacon_tx_offload_max_vdev += config->ema_max_vap_cnt;
 }
 
 static int ath11k_hw_mac_id_to_pdev_id_ipq8074(struct ath11k_hw_params *hw,
drivers/net/wireless/ath/ath11k/hw.h +1 -0
index 8af0034fdb05..5dabbec954ce 100644
@@ -62,6 +62,7 @@
 #define TARGET_NUM_WDS_ENTRIES		32
 #define TARGET_DMA_BURST_SIZE		1
 #define TARGET_RX_BATCHMODE		1
+#define TARGET_EMA_MAX_PROFILE_PERIOD	8
 
 #define ATH11K_HW_MAX_QUEUES		4
 #define ATH11K_QUEUE_LEN		4096
drivers/net/wireless/ath/ath11k/mac.c +175 -26

338 lines not on this page · raw message

drivers/net/wireless/ath/ath11k/wmi.c +21 -7
index 73869d445c5b..32759a7c4dd9 100644
@@ -651,6 +651,9 @@ 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);
@@ -855,6 +858,8 @@ int ath11k_wmi_vdev_start(struct ath11k *ar, struct wmi_vdev_start_req_arg *arg,
 	cmd->cac_duration_ms = arg->cac_duration_ms;
 	cmd->regdomain = arg->regdomain;
 	cmd->he_ops = arg->he_ops;
+	cmd->mbss_capability_flags = arg->mbss_capability_flags;
+	cmd->vdevid_trans = arg->vdevid_trans;
 
 	if (!restart) {
 		if (arg->ssid) {
@@ -908,7 +913,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;
@@ -923,10 +928,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) {
@@ -935,8 +944,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;
 }
@@ -1583,7 +1593,7 @@ int ath11k_wmi_send_bcn_offload_control_cmd(struct ath11k *ar,
 
 int ath11k_wmi_bcn_tmpl(struct ath11k *ar, u32 vdev_id,
 			struct ieee80211_mutable_offsets *offs,
-			struct sk_buff *bcn)
+			struct sk_buff *bcn, u32 ema_params)
 {
 	struct ath11k_pdev_wmi *wmi = ar->wmi;
 	struct wmi_bcn_tmpl_cmd *cmd;
@@ -1608,6 +1618,8 @@ int ath11k_wmi_bcn_tmpl(struct ath11k *ar, u32 vdev_id,
 	cmd->csa_switch_count_offset = offs->cntdwn_counter_offs[0];
 	cmd->ext_csa_switch_count_offset = offs->cntdwn_counter_offs[1];
 	cmd->buf_len = bcn->len;
+	cmd->mbssid_ie_offset = offs->multiple_bssid_offset;
+	cmd->ema_params = ema_params;
 
 	ptr = skb->data + sizeof(*cmd);
 
@@ -3273,6 +3285,8 @@ ath11k_wmi_copy_resource_config(struct wmi_resource_config *wmi_cfg,
 	wmi_cfg->sched_params = tg_cfg->sched_params;
 	wmi_cfg->twt_ap_pdev_count = tg_cfg->twt_ap_pdev_count;
 	wmi_cfg->twt_ap_sta_count = tg_cfg->twt_ap_sta_count;
+	wmi_cfg->ema_max_vap_cnt = tg_cfg->ema_max_vap_cnt;
+	wmi_cfg->ema_max_profile_period = tg_cfg->ema_max_profile_period;
 }
 
 static int ath11k_init_cmd_send(struct ath11k_pdev_wmi *wmi,
drivers/net/wireless/ath/ath11k/wmi.h +87 -3

163 lines not on this page · raw message

base-commit: be8cd9b8f5ed435c27530430aa1b1da30f9825d5
prerequisite-patch-id: 1c9127eb0d6efce75a0aa085527bf81ced427387
prerequisite-patch-id: 41af1c46bdedfa8768dd4205bb0647101de27dea
prerequisite-patch-id: f197607d75899cbecffd775e1ca243aa2fe082d0
prerequisite-patch-id: 55dad75c4f560213110f57f1abf24d9b7301a1b2

Signature · 1 line
2.25.0
#1 lore raw
Quoted 11 lines · Aloka Dixit

From: John Crispin <[email protected]>

Add the required wmi support and make use of it in the beacon template code. We need to split the beacon code up into 2 code paths so that we can also send EMA templates.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01492-QCAHKSWPL_SILICONZ-1

Please CC ath11k list with ath11k patches.

Quoted 5 lines

base-commit: be8cd9b8f5ed435c27530430aa1b1da30f9825d5
prerequisite-patch-id: 1c9127eb0d6efce75a0aa085527bf81ced427387
prerequisite-patch-id: 41af1c46bdedfa8768dd4205bb0647101de27dea
prerequisite-patch-id: f197607d75899cbecffd775e1ca243aa2fe082d0
prerequisite-patch-id: 55dad75c4f560213110f57f1abf24d9b7301a1b2

This fails to compile for me, what are these prerequisite patches?

Signature · 8 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#2 lore raw
Quoted 16 lines · Kalle Valo
Quoted 11 lines · Aloka Dixit

From: John Crispin <[email protected]>

Add the required wmi support and make use of it in the beacon template code. We need to split the beacon code up into 2 code paths so that we can also send EMA templates.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01492-QCAHKSWPL_SILICONZ-1

Please CC ath11k list with ath11k patches.

Quoted 7 lines
Quoted 5 lines

base-commit: be8cd9b8f5ed435c27530430aa1b1da30f9825d5
prerequisite-patch-id: 1c9127eb0d6efce75a0aa085527bf81ced427387
prerequisite-patch-id: 41af1c46bdedfa8768dd4205bb0647101de27dea
prerequisite-patch-id: f197607d75899cbecffd775e1ca243aa2fe082d0
prerequisite-patch-id: 55dad75c4f560213110f57f1abf24d9b7301a1b2

This fails to compile for me, what are these prerequisite patches?

The prerequisites are these: https://patchwork.kernel.org/project/linux-wireless/list/?series=417275
Compilation shouldn't have failed though. Once these are accepted, will send rebased version for ath11k. Thanks.