mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
wifi: ath12k: introduce host_alloc_ml_id hardware parameter
Different ath12k devices diverge on who allocates MLD peer id: WCN7850/QCC2072 have the firmware allocate it and notify the host via HTT_T2H_MSG_TYPE_MLO_RX_PEER_MAP event; While others let the host allocate it and pass it down through WMI_PEER_ASSOC_CMDID with ATH12K_WMI_FLAG_MLO_PEER_ID_VALID set. Currently ath12k host allocates this ID and sends it to firmware by default for all devices. This breaks WCN7850/QCC2072, because the host maintained ID may be different from the firmware-allocated one. Consequently data path may fail to find the dp peer and drop some received packets. From user point of view, this results in bugs reported in [1] or the 4-way handshake timeout issue. Add host_alloc_ml_id flag to struct ath12k_hw_params (and a copy on struct ath12k_hw for hot-path access) so subsequent patches can branch on it. Set true for QCN9274/IPQ5332/IPQ5424, false for WCN7850/QCC2072. The flag will be consumed by subsequent patches. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3 Link: https://bugzilla.kernel.org/show_bug.cgi?id=221039 # 1 Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Link: https://patch.msgid.link/20260720-ath12k-fw-allocated-ml-peer-id-v2-5-630632758a80@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
committed by
Jeff Johnson
parent
a08455ee85
commit
378e659029
@@ -793,6 +793,7 @@ struct ath12k_hw {
|
||||
enum ath12k_hw_state state;
|
||||
bool regd_updated;
|
||||
bool use_6ghz_regd;
|
||||
bool host_alloc_ml_id;
|
||||
|
||||
u8 num_radio;
|
||||
|
||||
|
||||
@@ -236,6 +236,8 @@ struct ath12k_hw_params {
|
||||
u32 max_client_dbs;
|
||||
u32 max_client_dbs_sbs;
|
||||
} client;
|
||||
|
||||
bool host_alloc_ml_id;
|
||||
};
|
||||
|
||||
struct ath12k_hw_ops {
|
||||
|
||||
@@ -15385,8 +15385,9 @@ int ath12k_mac_allocate(struct ath12k_hw_group *ag)
|
||||
int mac_id, device_id, total_radio, num_hw;
|
||||
struct ath12k_base *ab;
|
||||
struct ath12k_hw *ah;
|
||||
int ret, i, j;
|
||||
bool conf = false;
|
||||
u8 radio_per_hw;
|
||||
int ret, i, j;
|
||||
|
||||
total_radio = 0;
|
||||
for (i = 0; i < ag->num_devices; i++) {
|
||||
@@ -15426,6 +15427,20 @@ int ath12k_mac_allocate(struct ath12k_hw_group *ag)
|
||||
}
|
||||
|
||||
ab = ag->ab[device_id];
|
||||
|
||||
/*
|
||||
* the assumption is all devices within an ah
|
||||
* share the same host_alloc_ml_id configuration
|
||||
*/
|
||||
if (j == 0) {
|
||||
conf = ab->hw_params->host_alloc_ml_id;
|
||||
} else if (conf != ab->hw_params->host_alloc_ml_id) {
|
||||
ath12k_warn(ab, "inconsistent ML ID config within ah, device 0 uses %s allocated ID, while device %u doesn't\n",
|
||||
conf ? "host" : "firmware", device_id);
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
pdev_map[j].ab = ab;
|
||||
pdev_map[j].pdev_idx = mac_id;
|
||||
mac_id++;
|
||||
@@ -15450,6 +15465,7 @@ int ath12k_mac_allocate(struct ath12k_hw_group *ag)
|
||||
}
|
||||
|
||||
ah->dev = ab->dev;
|
||||
ah->host_alloc_ml_id = conf;
|
||||
|
||||
ag->ah[i] = ah;
|
||||
ag->num_hw++;
|
||||
|
||||
@@ -442,6 +442,8 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
|
||||
.host_alloc_ml_id = true,
|
||||
},
|
||||
{
|
||||
.name = "wcn7850 hw2.0",
|
||||
@@ -533,6 +535,8 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
|
||||
.host_alloc_ml_id = false,
|
||||
},
|
||||
{
|
||||
.name = "qcn9274 hw2.0",
|
||||
@@ -620,6 +624,8 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
|
||||
.host_alloc_ml_id = true,
|
||||
},
|
||||
{
|
||||
.name = "ipq5332 hw1.0",
|
||||
@@ -700,6 +706,8 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
|
||||
.host_alloc_ml_id = true,
|
||||
},
|
||||
{
|
||||
.name = "qcc2072 hw1.0",
|
||||
@@ -792,6 +800,8 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
|
||||
.host_alloc_ml_id = false,
|
||||
},
|
||||
{
|
||||
.name = "ipq5424 hw1.0",
|
||||
@@ -876,6 +886,8 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
|
||||
.max_client_dbs = 128,
|
||||
.max_client_dbs_sbs = 128,
|
||||
},
|
||||
|
||||
.host_alloc_ml_id = true,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user