Commit 9981a3ac authored by Carl Huang's avatar Carl Huang Committed by Kalle Valo

wifi: ath12k: add qmi_cnss_feature_bitmap field to hardware parameters

Currently the CNSS (Connectivity Subsystem) QMI feature is assigned to
qmi_wlanfw_host_cap_req_msg_v01 request directly, this prevents chip-specific
CNSS features from being added easily.

Solve this by adding a new field qmi_cnss_feature_bitmap to hw_params so
chip-specific CNSS features can be assigned to this field and later assigned to
qmi_wlanfw_host_cap_req_msg_v01 request.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: default avatarCarl Huang <quic_cjhuang@quicinc.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230404032057.3236122-2-quic_cjhuang@quicinc.com
parent 3288ee58
...@@ -906,6 +906,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = { ...@@ -906,6 +906,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
.hal_ops = &hal_qcn9274_ops, .hal_ops = &hal_qcn9274_ops,
.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
}, },
{ {
.name = "wcn7850 hw2.0", .name = "wcn7850 hw2.0",
...@@ -960,6 +961,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = { ...@@ -960,6 +961,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
.wmi_init = ath12k_wmi_init_wcn7850, .wmi_init = ath12k_wmi_init_wcn7850,
.hal_ops = &hal_wcn7850_ops, .hal_ops = &hal_wcn7850_ops,
.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
}, },
{ {
.name = "qcn9274 hw2.0", .name = "qcn9274 hw2.0",
...@@ -1013,6 +1016,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = { ...@@ -1013,6 +1016,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
.wmi_init = ath12k_wmi_init_qcn9274, .wmi_init = ath12k_wmi_init_qcn9274,
.hal_ops = &hal_qcn9274_ops, .hal_ops = &hal_qcn9274_ops,
.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
}, },
}; };
......
...@@ -184,6 +184,8 @@ struct ath12k_hw_params { ...@@ -184,6 +184,8 @@ struct ath12k_hw_params {
struct ath12k_wmi_resource_config_arg *config); struct ath12k_wmi_resource_config_arg *config);
const struct hal_ops *hal_ops; const struct hal_ops *hal_ops;
u64 qmi_cnss_feature_bitmap;
}; };
struct ath12k_hw_ops { struct ath12k_hw_ops {
......
...@@ -1942,8 +1942,10 @@ static int ath12k_qmi_host_cap_send(struct ath12k_base *ab) ...@@ -1942,8 +1942,10 @@ static int ath12k_qmi_host_cap_send(struct ath12k_base *ab)
req.cal_done_valid = 1; req.cal_done_valid = 1;
req.cal_done = ab->qmi.cal_done; req.cal_done = ab->qmi.cal_done;
if (ab->hw_params->qmi_cnss_feature_bitmap) {
req.feature_list_valid = 1; req.feature_list_valid = 1;
req.feature_list = BIT(CNSS_QDSS_CFG_MISS_V01); req.feature_list = ab->hw_params->qmi_cnss_feature_bitmap;
}
/* BRINGUP: here we are piggybacking a lot of stuff using /* BRINGUP: here we are piggybacking a lot of stuff using
* internal_sleep_clock, should it be split? * internal_sleep_clock, should it be split?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment