@@ -318,9 +318,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 *cmd;
+ int ret, tag;
void *buf;
+ u32 cmd_id, buf_len;
mutex_lock(&ar->conf_mutex);
@@ -345,6 +346,12 @@ static int ath12k_tm_cmd_wmi(struct ath12k *ar, struct nlattr *tb[])
cmd_id = nla_get_u32(tb[ATH_TM_ATTR_WMI_CMDID]);
+ cmd = buf;
+ tag = le32_get_bits(cmd->tlv_header, WMI_TLV_TAG);
+
+ if (tag == WMI_TAG_PDEV_SET_PARAM_CMD)
+ cmd->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);