diff options
author | Rajat Soni <quic_rajson@quicinc.com> | 2023-09-11 17:56:18 +0530 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2023-09-13 18:56:41 +0300 |
commit | ba2a7d5c57ba0703f64cf849c0299ac23eb1c1f5 (patch) | |
tree | ea2e7630b24fa7caea7ffb65a8c6ac8052884200 | |
parent | b50dc57cafcdbdeab2e799fa6e3148498e7805d7 (diff) | |
download | ath12k-testmode.tar.gz |
wifi: ath12k: Fill pdev id for fw test cmdath12k-testmode
Currently pdev id is not set properly that can cause crash
if pdev id is not equal to the pdev id when firmware test
command is run during AP bring up or ping.
Set pdev id in function ath12k_tm_cmd_wmi to resolve this
issue.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Signed-off-by: Rajat Soni <quic_rajson@quicinc.com>
Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-rw-r--r-- | drivers/net/wireless/ath/ath12k/testmode.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath12k/testmode.c b/drivers/net/wireless/ath/ath12k/testmode.c index 76ffeab52bde7d..cb945286d6d20b 100644 --- a/drivers/net/wireless/ath/ath12k/testmode.c +++ b/drivers/net/wireless/ath/ath12k/testmode.c @@ -324,9 +324,10 @@ static int ath12k_tm_cmd_wmi(struct ath12k *ar, struct nlattr *tb[]) { struct ath12k_wmi_pdev *wmi = ar->wmi; struct sk_buff *skb; - u32 cmd_id, buf_len; - int ret; + struct wmi_pdev_set_param_cmd *ptr; + int ret, tag; void *buf; + u32 cmd_id, buf_len; mutex_lock(&ar->conf_mutex); @@ -351,6 +352,12 @@ static int ath12k_tm_cmd_wmi(struct ath12k *ar, struct nlattr *tb[]) cmd_id = nla_get_u32(tb[ATH_TM_ATTR_WMI_CMDID]); + ptr = (struct wmi_pdev_set_param_cmd *)buf; + tag = le32_get_bits(ptr->tlv_header, WMI_TLV_TAG); + + if (tag == WMI_TAG_PDEV_SET_PARAM_CMD) + ptr->pdev_id = cpu_to_le32(ar->pdev->pdev_id); + ath12k_dbg(ar->ab, ATH12K_DBG_TESTMODE, "testmode cmd wmi cmd_id %d buf length %d\n", cmd_id, buf_len); |