Browse Source

qcacld-3.0: Define a new wakelock for WPS probe request wakeup

Define a new wakelock for WPS probe request wakeup.

Change-Id: Idd39664dc70db4dd15594f77846b74c36049659c
CRs-Fixed: 2863611
Alan Chen 4 years ago
parent
commit
beb98ec261
3 changed files with 12 additions and 0 deletions
  1. 3 0
      core/wma/inc/wma.h
  2. 5 0
      core/wma/src/wma_features.c
  3. 4 0
      core/wma/src/wma_main.c

+ 3 - 0
core/wma/inc/wma.h

@@ -208,6 +208,8 @@
 #define WMA_ROAM_HO_WAKE_LOCK_DURATION          (500)          /* in msec */
 #define WMA_ROAM_PREAUTH_WAKE_LOCK_DURATION     (2 * 1000)
 
+#define WMA_REASON_PROBE_REQ_WPS_IE_RECV_DURATION     (3 * 1000)
+
 #ifdef FEATURE_WLAN_AUTO_SHUTDOWN
 #define WMA_AUTO_SHUTDOWN_WAKE_LOCK_DURATION    WAKELOCK_DURATION_RECOMMENDED
 #endif
@@ -968,6 +970,7 @@ typedef struct {
 	qdf_wake_lock_t wow_auto_shutdown_wl;
 	qdf_wake_lock_t roam_ho_wl;
 	qdf_wake_lock_t roam_preauth_wl;
+	qdf_wake_lock_t probe_req_wps_wl;
 	int wow_nack;
 	qdf_atomic_t is_wow_bus_suspended;
 #ifdef WLAN_FEATURE_LPSS

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

@@ -2304,6 +2304,11 @@ static void wma_acquire_wow_wakelock(t_wma_handle *wma, int wake_reason)
 	case WOW_REASON_ROAM_PREAUTH_START:
 		wl = &wma->roam_preauth_wl;
 		ms = WMA_ROAM_PREAUTH_WAKE_LOCK_DURATION;
+		break;
+	case WOW_REASON_PROBE_REQ_WPS_IE_RECV:
+		wl = &wma->probe_req_wps_wl;
+		ms = WMA_REASON_PROBE_REQ_WPS_IE_RECV_DURATION;
+		break;
 	default:
 		return;
 	}

+ 4 - 0
core/wma/src/wma_main.c

@@ -2945,6 +2945,8 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
 			"wlan_roam_ho_wl");
 		qdf_wake_lock_create(&wma_handle->roam_preauth_wl,
 				     "wlan_roam_preauth_wl");
+		qdf_wake_lock_create(&wma_handle->probe_req_wps_wl,
+				     "wlan_probe_req_wps_wl");
 	}
 
 	qdf_status = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_LEGACY_WMA_ID);
@@ -3454,6 +3456,7 @@ err_get_psoc_ref:
 		qdf_wake_lock_destroy(&wma_handle->wow_auto_shutdown_wl);
 		qdf_wake_lock_destroy(&wma_handle->roam_ho_wl);
 		qdf_wake_lock_destroy(&wma_handle->roam_preauth_wl);
+		qdf_wake_lock_destroy(&wma_handle->probe_req_wps_wl);
 	}
 err_free_wma_handle:
 	cds_free_context(QDF_MODULE_ID_WMA, wma_handle);
@@ -4429,6 +4432,7 @@ QDF_STATUS wma_close(void)
 		qdf_wake_lock_destroy(&wma_handle->wow_auto_shutdown_wl);
 		qdf_wake_lock_destroy(&wma_handle->roam_ho_wl);
 		qdf_wake_lock_destroy(&wma_handle->roam_preauth_wl);
+		qdf_wake_lock_destroy(&wma_handle->probe_req_wps_wl);
 	}
 
 	/* unregister Firmware debug log */