mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
wifi: ath12k: add hardware parameters for maximum supported clients
Currently, the driver uses memory profile parameters to determine the maximum number of supported clients, with a default limit of 512 for single-radio and 128 for DBS and DBS+SBS configurations. However, some devices have lower hardware limits depending on the radio configuration. Exceeding these hardware-specific limits can lead to firmware crashes. Add hardware parameters in ath12k_hw_params to define the maximum supported clients for each radio configuration. The driver uses the minimum of the memory profile limit and the hardware capability limit to prevent exceeding hardware constraints. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260515030909.3312511-1-aaradhana.sahu@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
parent
47809a7c83
commit
05337d0b9c
|
|
@ -19,14 +19,28 @@
|
|||
#define TARGET_NUM_VDEVS(ab) ((ab)->profile_param->num_vdevs)
|
||||
|
||||
/* Max num of stations for Single Radio mode */
|
||||
#define TARGET_NUM_STATIONS_SINGLE(ab) ((ab)->profile_param->max_client_single)
|
||||
#define TARGET_NUM_STATIONS_SINGLE(ab) \
|
||||
({ \
|
||||
typeof(ab) _ab = (ab); \
|
||||
min_not_zero(_ab->hw_params->client.max_client_single, \
|
||||
_ab->profile_param->max_client_single); \
|
||||
})
|
||||
|
||||
/* Max num of stations for DBS */
|
||||
#define TARGET_NUM_STATIONS_DBS(ab) ((ab)->profile_param->max_client_dbs)
|
||||
#define TARGET_NUM_STATIONS_DBS(ab) \
|
||||
({ \
|
||||
typeof(ab) _ab = (ab); \
|
||||
min_not_zero(_ab->hw_params->client.max_client_dbs, \
|
||||
_ab->profile_param->max_client_dbs); \
|
||||
})
|
||||
|
||||
/* Max num of stations for DBS_SBS */
|
||||
#define TARGET_NUM_STATIONS_DBS_SBS(ab) \
|
||||
((ab)->profile_param->max_client_dbs_sbs)
|
||||
({ \
|
||||
typeof(ab) _ab = (ab); \
|
||||
min_not_zero(_ab->hw_params->client.max_client_dbs_sbs, \
|
||||
_ab->profile_param->max_client_dbs_sbs); \
|
||||
})
|
||||
|
||||
#define TARGET_NUM_STATIONS(ab, x) TARGET_NUM_STATIONS_##x(ab)
|
||||
|
||||
|
|
@ -213,6 +227,11 @@ struct ath12k_hw_params {
|
|||
|
||||
/* setup REO queue, frag etc only for primary link peer */
|
||||
bool dp_primary_link_only:1;
|
||||
struct {
|
||||
u32 max_client_single;
|
||||
u32 max_client_dbs;
|
||||
u32 max_client_dbs_sbs;
|
||||
} client;
|
||||
};
|
||||
|
||||
struct ath12k_hw_ops {
|
||||
|
|
|
|||
|
|
@ -434,6 +434,11 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
|||
.current_cc_support = false,
|
||||
|
||||
.dp_primary_link_only = true,
|
||||
.client = {
|
||||
.max_client_single = 512,
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "wcn7850 hw2.0",
|
||||
|
|
@ -520,6 +525,11 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
|||
.current_cc_support = true,
|
||||
|
||||
.dp_primary_link_only = false,
|
||||
.client = {
|
||||
.max_client_single = 512,
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "qcn9274 hw2.0",
|
||||
|
|
@ -602,6 +612,11 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
|||
.current_cc_support = false,
|
||||
|
||||
.dp_primary_link_only = true,
|
||||
.client = {
|
||||
.max_client_single = 512,
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "ipq5332 hw1.0",
|
||||
|
|
@ -677,6 +692,11 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
|||
.bdf_addr_offset = 0xC00000,
|
||||
|
||||
.dp_primary_link_only = true,
|
||||
.client = {
|
||||
.max_client_single = 256,
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "qcc2072 hw1.0",
|
||||
|
|
@ -764,6 +784,11 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
|||
.current_cc_support = true,
|
||||
|
||||
.dp_primary_link_only = false,
|
||||
.client = {
|
||||
.max_client_single = 512,
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "ipq5424 hw1.0",
|
||||
|
|
@ -843,6 +868,11 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
|||
.current_cc_support = false,
|
||||
|
||||
.dp_primary_link_only = true,
|
||||
.client = {
|
||||
.max_client_single = 512,
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user