Browse Source

qcacld-3.0: Allow TWT events to wake up wlan host

Currently when TWT commands are sent to firmware, the host driver
doesn't acquire wake lock. So the wlan can got to wow mode before
receiving the TWT command response and the response will get
dropped since host is in wow mode.

To avoid this make the TWT events as wakeable so firmware can
wake up host if host is suspended.

Change-Id: I2750049f9173de564e24114731d3fdd8ec8d6d86
CRs-Fixed: 2869865
Pragaspathi Thilagaraj 4 năm trước cách đây
mục cha
commit
b870f29782
2 tập tin đã thay đổi với 8 bổ sung1 xóa
  1. 5 1
      components/pmo/core/src/wlan_pmo_wow.c
  2. 3 0
      core/wma/src/wma_features.c

+ 5 - 1
components/pmo/core/src/wlan_pmo_wow.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -414,6 +414,10 @@ void pmo_set_sta_wow_bitmask(uint32_t *bitmask, uint32_t wow_bitmap_size)
 	pmo_set_wow_event_bitmap(WOW_VDEV_DISCONNECT_EVENT,
 				 wow_bitmap_size,
 				 bitmask);
+
+	pmo_set_wow_event_bitmap(WOW_TWT_EVENT,
+				 wow_bitmap_size,
+				 bitmask);
 }
 
 void pmo_set_sap_wow_bitmask(uint32_t *bitmask, uint32_t wow_bitmap_size)

+ 3 - 0
core/wma/src/wma_features.c

@@ -1493,6 +1493,8 @@ static const uint8_t *wma_wow_wake_reason_str(A_INT32 wake_reason)
 		return "LOCAL_DATA_UC_DROP";
 	case WOW_REASON_GENERIC_WAKE:
 		return "GENERIC_WAKE";
+	case WOW_REASON_TWT:
+		return "TWT Event";
 	default:
 		return "unknown";
 	}
@@ -1763,6 +1765,7 @@ static bool is_piggybacked_event(int32_t reason)
 	case WOW_REASON_ROAM_HO:
 	case WOW_REASON_ROAM_PMKID_REQUEST:
 	case WOW_REASON_VDEV_DISCONNECT:
+	case WOW_REASON_TWT:
 		return true;
 	default:
 		return false;