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: 9153389 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 5AEA360221 for ; Fri, 3 Jun 2016 15:33:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D6961FF45 for ; Fri, 3 Jun 2016 15:33:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 423452832F; Fri, 3 Jun 2016 15:33:56 +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 C83501FF45 for ; Fri, 3 Jun 2016 15:33:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964788AbcFCPdy (ORCPT ); Fri, 3 Jun 2016 11:33:54 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:65080 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932377AbcFCPdx (ORCPT ); Fri, 3 Jun 2016 11:33:53 -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=1464968033; x=1496504033; h=from:to:cc:subject:date:message-id:mime-version; bh=S2CVV1dZxsfH3z7f2ubn4cpPMSdIfN9uiD3Q9UOd3eU=; b=e2tkL3WEZlVC200bVetKf8sjxAKCF35rfjgES6N4CrwZRRAVLYVoRpSr MwzmWVVCcUnfqUkYSitQiZVJmWc+FsvGiSjCyf9SR1Ltn7tCV2indDdcM IeVUgn6m0eYhXo9BDHEbelJaxJe4UTlS8dW9tjJ7X9J9pbmAl4wqr77rt Q=; X-IronPort-AV: E=Sophos;i="5.26,412,1459839600"; d="scan'208";a="197987557" 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: CC: , , "Rajkumar Manoharan" 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) 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 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);