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: 9699775 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 D02C860224 for ; Tue, 25 Apr 2017 21:21:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BECE328630 for ; Tue, 25 Apr 2017 21:21:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1F5928646; Tue, 25 Apr 2017 21:21:21 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4B39A28630 for ; Tue, 25 Apr 2017 21:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=JCXOWDuxKXcCycu0BhXuxEEx7RJTmPKM5QTtM83QWY4=; b=PiG1V93xuCPlH+ /WsVgbIAWo577l0+3n4q78Gus0INuyPhZKGk9APQkSy0+NblqrFbAeKM9cdgA/100w2xQTdtru/6J iXKgO5BciViyDiUp3TpIx2WTgW7yhrDt9cgY+p6RuYFepVysQ2isnMhhkThzgxsY8mW+gq9MVvanM e3UYI8IwqJloS285n5wRwGf3ZoDHmbpbGF/HP1Ig5/ZEexXt8WtlYME4i2ewxih7i4Cmq8z+92OhH EhPxyAMcoPxa+72Z6LGVb3pqlUMX52PO3uO2V3kJc+Dwgk3jCJmAp+Bh0SkYA4mhOinvNI1/XsuUu IEUH90m3L9hZ+81MH+MA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d37tX-0003sy-Ug; Tue, 25 Apr 2017 21:21:11 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d37tV-0003qN-F1 for ath10k@lists.infradead.org; Tue, 25 Apr 2017 21:21:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1493155269; x=1524691269; h=from:to:cc:subject:date:message-id:mime-version; bh=N7TXTSinYD+aXfSyRefRuJ+J06bRLoH0KZMhVLH/4ss=; b=TcEy4CS5jCwa6gXq44ojI8BjMUVQ3bTIxXl2bL3fhTsSKnjhgBUEx4BR NzpT191+kFWp8A/HilAgaigzkiBMr3Gz+q7rruOABPfvZosSX9k4dX0A5 GQAZmr4c3YXJWDrybTtu1L5XKQJrXyLX0ObUX4wwxrqTpJQsH09iyjJB/ g=; X-IronPort-AV: E=Sophos;i="5.37,251,1488873600"; d="scan'208";a="376534546" Received: from ironmsg03-lv.qualcomm.com ([10.47.202.181]) by wolverine02.qualcomm.com with ESMTP; 25 Apr 2017 14:20:32 -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: , 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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170425_142109_624697_753A3C2E X-CRM114-Status: UNSURE ( 8.06 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryanhsu@qti.qualcomm.com Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.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,