ath10k: append the wmi_op_version to testmode get_version cmd
authorRyan Hsu <ryanhsu@qti.qualcomm.com>
Tue, 25 Apr 2017 21:19:16 +0000 (14:19 -0700)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 4 May 2017 12:59:48 +0000 (15:59 +0300)
QCA9xxx and QCA61x4/QCA93xx are using different wmi operation, in order
for userspace to differentiate it, appends the wmi_op_version information
alone with the get_version command.

Signed-off-by: Ryan Hsu <ryanhsu@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/testmode.c
drivers/net/wireless/ath/ath10k/testmode_i.h

index d8564624415c9f23a8fb21ea6efda6b9fc5c6fd1..9d3eb258ac2fdd2cd5e456dcba717234319476f3 100644 (file)
@@ -137,6 +137,13 @@ static int ath10k_tm_cmd_get_version(struct ath10k *ar, struct nlattr *tb[])
                return ret;
        }
 
+       ret = nla_put_u32(skb, ATH10K_TM_ATTR_WMI_OP_VERSION,
+                         ar->normal_mode_fw.fw_file.wmi_op_version);
+       if (ret) {
+               kfree_skb(skb);
+               return ret;
+       }
+
        return cfg80211_testmode_reply(skb);
 }
 
index ba81bf66ce85aade4b60fe7ac90ac8c3b96dea40..191a8f34c8ea0831ca6105e87379a73b7303fdbc 100644 (file)
@@ -33,6 +33,7 @@ enum ath10k_tm_attr {
        ATH10K_TM_ATTR_WMI_CMDID        = 3,
        ATH10K_TM_ATTR_VERSION_MAJOR    = 4,
        ATH10K_TM_ATTR_VERSION_MINOR    = 5,
+       ATH10K_TM_ATTR_WMI_OP_VERSION   = 6,
 
        /* keep last */
        __ATH10K_TM_ATTR_AFTER_LAST,