diff mbox

[1/2] ath10k: handle testmode events for 10.2 based firmware

Message ID 20160603153328.11947-1-rmanohar@qti.qualcomm.com (mailing list archive)
State Rejected
Delegated to: Kalle Valo
Headers show

Commit Message

Rajkumar Manoharan June 3, 2016, 3:33 p.m. UTC
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 <rmanohar@qti.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/wmi.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Kalle Valo Sept. 14, 2016, 12:24 p.m. UTC | #1
Rajkumar Manoharan <rmanohar@qti.qualcomm.com> wrote:
> 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 <rmanohar@qti.qualcomm.com>

This is an old patch, but we already have this functionality in
ath10k_wmi_10_2_op_rx(). So I'll drop this patch.
diff mbox

Patch

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);