From patchwork Tue Apr 25 21:19:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ryanhsu@qti.qualcomm.com X-Patchwork-Id: 9699773 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 27FC760224 for ; Tue, 25 Apr 2017 21:20:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1635328389 for ; Tue, 25 Apr 2017 21:20:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0524328645; Tue, 25 Apr 2017 21:20:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA8E928389 for ; Tue, 25 Apr 2017 21:20:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1430717AbdDYVUF (ORCPT ); Tue, 25 Apr 2017 17:20:05 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:9671 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1428701AbdDYVUD (ORCPT ); Tue, 25 Apr 2017 17:20:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1493155203; x=1524691203; h=from:to:cc:subject:date:message-id:mime-version; bh=N7TXTSinYD+aXfSyRefRuJ+J06bRLoH0KZMhVLH/4ss=; b=buUrH0F/KI//d+GFmtWAiqWO6kQFYrpZtw5Ro5RVkPF2MFCrZBQVQGcU wUvHsB1qCop82CzW4NkDvD9MEObkrc8vR3xTgYa63vW836E5J4y6wtyZ2 mTye4r2/JebIhQMXWeEM1z+YZOCjmM7ln43UMRV5vjYKRKPDjQe2bxOuX o=; X-IronPort-AV: E=Sophos;i="5.37,251,1488873600"; d="scan'208";a="281029111" Received: from ironmsg03-lv.qualcomm.com ([10.47.202.181]) by wolverine01.qualcomm.com with ESMTP; 25 Apr 2017 14:20:02 -0700 X-IronPort-AV: E=McAfee;i="5800,7501,8509"; a="29129730" X-MGA-submission: =?us-ascii?q?MDGXHmoUQ1qeAPlkuGK/+xcaw7c3jqBK/uwc+3?= =?us-ascii?q?DcW17QLiZAiD60MZ0PDO3NMmFCzKKuAcmTX0rgWsD1trOTzfuT/3A6lH?= =?us-ascii?q?WbgrAMsL+6tzjfRzwYJJTblF9PtwCEOg/VFX7JUyj5TblkUuNS+C4tEQ?= =?us-ascii?q?OY?= Received: from nalasexr01g.na.qualcomm.com ([10.49.56.53]) by ironmsg03-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 25 Apr 2017 14:20:02 -0700 Received: from ryanhsu-linux2.qualcomm.com (10.80.80.8) by NALASEXR01G.na.qualcomm.com (10.49.56.53) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Tue, 25 Apr 2017 14:20:01 -0700 From: To: , CC: Subject: [PATCH] ath10k: append the wmi_op_version to testmode get_version cmd Date: Tue, 25 Apr 2017 14:19:16 -0700 Message-ID: <1493155156-22697-1-git-send-email-ryanhsu@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To NALASEXR01G.na.qualcomm.com (10.49.56.53) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ryan Hsu 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 --- drivers/net/wireless/ath/ath10k/testmode.c | 7 +++++++ drivers/net/wireless/ath/ath10k/testmode_i.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/testmode.c b/drivers/net/wireless/ath/ath10k/testmode.c index ed85f93..eaf4a4b 100644 --- a/drivers/net/wireless/ath/ath10k/testmode.c +++ b/drivers/net/wireless/ath/ath10k/testmode.c @@ -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); } diff --git a/drivers/net/wireless/ath/ath10k/testmode_i.h b/drivers/net/wireless/ath/ath10k/testmode_i.h index ba81bf6..191a8f3 100644 --- a/drivers/net/wireless/ath/ath10k/testmode_i.h +++ b/drivers/net/wireless/ath/ath10k/testmode_i.h @@ -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,