diff mbox series

[v3,1/5] rsi: Add debug support for wowlan wakeup confirmation

Message ID 1549262009-8766-2-git-send-email-siva8118@gmail.com (mailing list archive)
State Accepted
Commit 6f3a5de16d681f038d1123fcdd832f3aa1d4f5fa
Delegated to: Kalle Valo
Headers show
Series wowlan debug support and fixes | expand

Commit Message

Siva Rebbagondla Feb. 4, 2019, 6:33 a.m. UTC
From: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>

When a wowlan magic-packet has received to wake up the device, currently
driver is not taking care of what kind of packet has received. This patch
will add debug support for wakeup reason in driver.

Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
---
 drivers/net/wireless/rsi/rsi_91x_mgmt.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

Comments

Kalle Valo Feb. 8, 2019, 3:30 p.m. UTC | #1
Siva Rebbagondla <siva8118@gmail.com> wrote:

> From: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
> 
> When a wowlan magic-packet has received to wake up the device, currently
> driver is not taking care of what kind of packet has received. This patch
> will add debug support for wakeup reason in driver.
> 
> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>

5 patches applied to wireless-drivers-next.git, thanks.

6f3a5de16d68 rsi: Add debug support for wowlan wakeup confirmation
cbde979b33fa rsi: add hci detach for hibernation and poweroff
a63762d0dc36 rsi: fix wowlan wakeup issue for hibernate(S4)
73f9b2571487 rsi: resolve power save issue after S4 resume
38ef8d9016da rsi: fix for wowlan wakeup failure
diff mbox series

Patch

diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
index 4042414..4c2c776 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -2003,6 +2003,35 @@  int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg)
 			return -1;
 		rsi_send_beacon(common);
 		break;
+	case WOWLAN_WAKEUP_REASON:
+		rsi_dbg(ERR_ZONE, "\n\nWakeup Type: %x\n", msg[15]);
+		switch (msg[15]) {
+		case RSI_UNICAST_MAGIC_PKT:
+			rsi_dbg(ERR_ZONE,
+				"*** Wakeup for Unicast magic packet ***\n");
+			break;
+		case RSI_BROADCAST_MAGICPKT:
+			rsi_dbg(ERR_ZONE,
+				"*** Wakeup for Broadcast magic packet ***\n");
+			break;
+		case RSI_EAPOL_PKT:
+			rsi_dbg(ERR_ZONE,
+				"*** Wakeup for GTK renewal ***\n");
+			break;
+		case RSI_DISCONNECT_PKT:
+			rsi_dbg(ERR_ZONE,
+				"*** Wakeup for Disconnect ***\n");
+			break;
+		case RSI_HW_BMISS_PKT:
+			rsi_dbg(ERR_ZONE,
+				"*** Wakeup for HW Beacon miss ***\n");
+			break;
+		default:
+			rsi_dbg(ERR_ZONE,
+				"##### Un-intentional Wakeup #####\n");
+			break;
+	}
+	break;
 	case RX_DOT11_MGMT:
 		return rsi_mgmt_pkt_to_core(common, msg, msg_len);
 	default: