From patchwork Fri Jun 3 15:33:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 9153395 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 ED6E660221 for ; Fri, 3 Jun 2016 15:34:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF4591FF45 for ; Fri, 3 Jun 2016 15:34:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D41FA2832F; Fri, 3 Jun 2016 15:34:34 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6B3EB1FF45 for ; Fri, 3 Jun 2016 15:34:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8r72-0006cn-GK; Fri, 03 Jun 2016 15:34:16 +0000 Received: from wolverine01.qualcomm.com ([199.106.114.254]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8r6z-0006SG-Mq for ath10k@lists.infradead.org; Fri, 03 Jun 2016 15:34:14 +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=1464968053; x=1496504053; h=from:to:cc:subject:date:message-id:mime-version; bh=S2CVV1dZxsfH3z7f2ubn4cpPMSdIfN9uiD3Q9UOd3eU=; b=desks898guFqxBL2bF5oIfUv2ZzU9yWgP7s/ssUMmXK7GcBmMhG1Duno bli6wwAqA0m8drqEeWySI2cWg/LhBkHxOVPdYyzLP1LvFl+393O/WySm0 y99ea7UPZbM+gHvatHkdeTkLSuIbSKbYqSxIZJckaH0g+uX6x3dbqhX9L M=; X-IronPort-AV: E=Sophos;i="5.26,412,1459839600"; d="scan'208";a="197987558" Received: from ironmsg04-l-new.qualcomm.com (HELO Ironmsg04-L.qualcomm.com) ([10.53.140.111]) by wolverine01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Jun 2016 08:33:52 -0700 X-IronPort-AV: E=McAfee;i="5700,7163,8185"; a="1136505482" Received: from nasanexm01d.na.qualcomm.com ([10.85.0.84]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 03 Jun 2016 08:33:51 -0700 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by NASANEXM01D.na.qualcomm.com (10.85.0.84) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 3 Jun 2016 08:33:50 -0700 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01b.ap.qualcomm.com (10.252.127.11) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 3 Jun 2016 21:03:42 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Fri, 03 Jun 2016 21:03:34 +0530 From: Rajkumar Manoharan To: Subject: [PATCH 1/2] ath10k: handle testmode events for 10.2 based firmware Date: Fri, 3 Jun 2016 21:03:27 +0530 Message-ID: <20160603153328.11947-1-rmanohar@qti.qualcomm.com> X-Mailer: git-send-email 2.8.3 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanexm01a.na.qualcomm.com (10.85.0.81) To aphydexm01b.ap.qualcomm.com (10.252.127.11) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160603_083413_825152_0557D56A X-CRM114-Status: UNSURE ( 8.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, Rajkumar Manoharan , rmanohar@codeaurora.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently testmode events for 10.x firmware are processed from 10.1 wmi event processing. In order to remove 10.1 firmware support, testmode events should be handled from 10.2 event processing. Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/wmi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 6279ab4a760e..b7fb0d76c433 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -5095,6 +5095,7 @@ static void ath10k_wmi_10_2_op_rx(struct ath10k *ar, struct sk_buff *skb) { struct wmi_cmd_hdr *cmd_hdr; enum wmi_10_2_event_id id; + bool consumed; cmd_hdr = (struct wmi_cmd_hdr *)skb->data; id = MS(__le32_to_cpu(cmd_hdr->cmd_id), WMI_CMD_HDR_CMD_ID); @@ -5104,6 +5105,17 @@ static void ath10k_wmi_10_2_op_rx(struct ath10k *ar, struct sk_buff *skb) trace_ath10k_wmi_event(ar, id, skb->data, skb->len); + consumed = ath10k_tm_event_wmi(ar, id, skb); + /* Ready event must be handled normally also in UTF mode so that we + * know the UTF firmware has booted, others we are just bypass WMI + * events to testmode. + */ + if (consumed && id != WMI_10_2_READY_EVENTID) { + ath10k_dbg(ar, ATH10K_DBG_WMI, + "wmi testmode consumed 0x%x\n", id); + goto out; + } + switch (id) { case WMI_10_2_MGMT_RX_EVENTID: ath10k_wmi_event_mgmt_rx(ar, skb);