qcacmn: Release wakelock in response path

Release delete wakelock in delete response handler.
Release stop wakelock after sending the down command to
firmware so that it completes the disconnect sequence.

Change-Id: I0f47be04652178494d9cf0475af74ea573978005
CRs-Fixed: 2760116
This commit is contained in:
Sandeep Puligilla
2020-08-21 16:19:30 -07:00
committed by snandini
parent 360f0419df
commit cb6735ac35
2 changed files with 11 additions and 2 deletions

View File

@@ -31,6 +31,7 @@
#include <target_if.h>
#include <wlan_vdev_mlme_main.h>
#include <wmi_unified_vdev_api.h>
#include <target_if_psoc_wake_lock.h>
static inline
void target_if_vdev_mgr_handle_recovery(struct wlan_objmgr_psoc *psoc,
@@ -428,7 +429,7 @@ static int target_if_vdev_mgr_delete_response_handler(ol_scn_t scn,
}
status = rx_ops->vdev_mgr_delete_response(psoc, &vdev_del_resp);
target_if_wake_lock_timeout_release(psoc, DELETE_WAKELOCK);
err:
return qdf_status_to_os_return(status);
}

View File

@@ -608,6 +608,14 @@ static QDF_STATUS target_if_vdev_mgr_stop_send(
vdev_rsp->expire_time = STOP_RESPONSE_TIMER;
target_if_vdev_mgr_rsp_timer_start(psoc, vdev_rsp, STOP_RESPONSE_BIT);
/*
* START wakelock is acquired before sending the start command and
* released after sending up command to fw. This is to prevent the
* system to go into suspend state during the connection.
* In auth/assoc failure scenario UP command is not sent
* so release the START wakelock here.
*/
target_if_wake_lock_timeout_release(psoc, START_WAKELOCK);
target_if_wake_lock_timeout_acquire(psoc, STOP_WAKELOCK);
status = wmi_unified_vdev_stop_send(wmi_handle, param->vdev_id);
@@ -649,7 +657,7 @@ static QDF_STATUS target_if_vdev_mgr_down_send(
}
status = wmi_unified_vdev_down_send(wmi_handle, param->vdev_id);
target_if_wake_lock_timeout_release(psoc, START_WAKELOCK);
target_if_wake_lock_timeout_release(psoc, STOP_WAKELOCK);
return status;
}