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
This commit is contained in:
Alan Chen 2021-01-26 16:19:11 -08:00 • committed by snandini
commit 590d5406c3
3 changed files with 12 additions and 0 deletions

View file

@ -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

View file

@ -2292,6 +2292,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;
}

View file

@ -2962,6 +2962,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);
@ -3470,6 +3472,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);
@ -4471,6 +4474,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 */