Jelajahi Sumber

qcacmn: Handle initial wake up message from target

Handle initial wake up message from target .

Change-Id: Ibd3e916e288090e1318ebbd75468577b25962d05
CRs-Fixed: 1051684
Rajeev Kumar 8 tahun lalu
induk
melakukan
296c019780
2 mengubah file dengan 13 tambahan dan 0 penghapusan
  1. 1 0
      htc/htc_internal.h
  2. 12 0
      htc/htc_recv.c

+ 1 - 0
htc/htc_internal.h

@@ -89,6 +89,7 @@ typedef enum {
 	HTC_PROCESS_CREDIT_REPORT,
 	HTC_SUSPEND_ACK,
 	HTC_SUSPEND_NACK,
+	HTC_INITIAL_WAKE_UP,
 } htc_credit_exchange_type;
 
 typedef struct {

+ 12 - 0
htc/htc_recv.c

@@ -440,6 +440,18 @@ QDF_STATUS htc_rx_completion_handler(void *Context, qdf_nbuf_t netbuf,
 
 				qdf_event_set(&target->ctrl_response_valid);
 				break;
+#ifdef CONFIG_MCL
+			case HTC_MSG_WAKEUP_FROM_SUSPEND_ID:
+				AR_DEBUG_PRINTF(ATH_DEBUG_ANY,
+					("Received initial wake up\n"));
+				LOCK_HTC_CREDIT(target);
+				htc_credit_record(HTC_INITIAL_WAKE_UP,
+					pEndpoint->TxCredits,
+					HTC_PACKET_QUEUE_DEPTH(
+						&pEndpoint->TxQueue));
+				UNLOCK_HTC_CREDIT(target);
+				break;
+#endif
 			case HTC_MSG_SEND_SUSPEND_COMPLETE:
 				wow_nack = false;
 				LOCK_HTC_CREDIT(target);