rsi: Add debug support for wowlan wakeup confirmation
authorSiva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Mon, 4 Feb 2019 06:33:25 +0000 (12:03 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 8 Feb 2019 15:29:34 +0000 (17:29 +0200)
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rsi/rsi_91x_mgmt.c

index 404241424a62178c55d8c96379879bfd03f63c35..4c2c776fc86d3ca29381b804992658c4e6ec86df 100644 (file)
@@ -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: