diff mbox series

wifi: ath12k: fix mbssid max interface advertisement

Message ID 20240613153813.3509837-1-quic_periyasa@quicinc.com
State New
Headers show
Series wifi: ath12k: fix mbssid max interface advertisement | expand

Commit Message

Karthikeyan Periyasamy June 13, 2024, 3:38 p.m. UTC
The Current method for advertising the maximum MBSSID interface count
assumes single radio per wiphy (multi wiphy model). However, this
assumption is incorrect for multi radio per wiphy (single wiphy model).
Therefore, populate the parameter for each radio present in the MAC
abstraction layer (ah). This approach ensure scalability for both single
wiphy and multi wiphy models.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Fixes: 519a545cfee7 ("wifi: ath12k: advertise driver capabilities for MBSSID and EMA")
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/mac.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


base-commit: e72048809ec7355a947415ae6836d2eb7fdcda39

Comments

Jeff Johnson June 17, 2024, 6:07 p.m. UTC | #1
On 6/13/2024 8:38 AM, Karthikeyan Periyasamy wrote:
> The Current method for advertising the maximum MBSSID interface count
> assumes single radio per wiphy (multi wiphy model). However, this
> assumption is incorrect for multi radio per wiphy (single wiphy model).
> Therefore, populate the parameter for each radio present in the MAC
> abstraction layer (ah). This approach ensure scalability for both single
> wiphy and multi wiphy models.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Fixes: 519a545cfee7 ("wifi: ath12k: advertise driver capabilities for MBSSID and EMA")
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Kalle Valo June 19, 2024, 2:19 p.m. UTC | #2
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> wrote:

> The Current method for advertising the maximum MBSSID interface count
> assumes single radio per wiphy (multi wiphy model). However, this
> assumption is incorrect for multi radio per wiphy (single wiphy model).
> Therefore, populate the parameter for each radio present in the MAC
> abstraction layer (ah). This approach ensure scalability for both single
> wiphy and multi wiphy models.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Fixes: 519a545cfee7 ("wifi: ath12k: advertise driver capabilities for MBSSID and EMA")
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

253ec89c9013 wifi: ath12k: fix mbssid max interface advertisement
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 2259ce22cc8b..cab9021b9071 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -8959,6 +8959,7 @@  static int ath12k_mac_hw_register(struct ath12k_hw *ah)
 	u32 ht_cap = U32_MAX, antennas_rx = 0, antennas_tx = 0;
 	bool is_6ghz = false, is_raw_mode = false, is_monitor_disable = false;
 	u8 *mac_addr = NULL;
+	u8 mbssid_max_interfaces = 0;
 
 	wiphy->max_ap_assoc_sta = 0;
 
@@ -9002,6 +9003,8 @@  static int ath12k_mac_hw_register(struct ath12k_hw *ah)
 			mac_addr = ar->mac_addr;
 		else
 			mac_addr = ab->mac_addr;
+
+		mbssid_max_interfaces += TARGET_NUM_VDEVS;
 	}
 
 	wiphy->available_antennas_rx = antennas_rx;
@@ -9094,7 +9097,7 @@  static int ath12k_mac_hw_register(struct ath12k_hw *ah)
 	wiphy->iftype_ext_capab = ath12k_iftypes_ext_capa;
 	wiphy->num_iftype_ext_capab = ARRAY_SIZE(ath12k_iftypes_ext_capa);
 
-	wiphy->mbssid_max_interfaces = TARGET_NUM_VDEVS;
+	wiphy->mbssid_max_interfaces = mbssid_max_interfaces;
 	wiphy->ema_max_profile_periodicity = TARGET_EMA_MAX_PROFILE_PERIOD;
 
 	if (is_6ghz) {