qcacmn: Enable VDEV response wakelock

Enable VDEV response converged wakelock logic.

Change-Id: I67917d5798d9279cb104d0e7ff2cbe26365658c1
CRs-Fixed: 2738667
This commit is contained in:
Sandeep Puligilla 2020-07-28 23:53:17 -07:00 • committed by snandini
commit 9c7c6259ca
7 changed files with 29 additions and 25 deletions

View file

@ -25,6 +25,7 @@
#ifdef WLAN_CONV_SPECTRAL_ENABLE
#include <wlan_spectral_utils_api.h>
#endif
#include <target_if_psoc_wake_lock.h>
/* Function pointer to call DA/OL specific tx_ops registration function */
QDF_STATUS (*wlan_global_lmac_if_tx_ops_register[MAX_DEV_TYPE])
@ -193,6 +194,8 @@ QDF_STATUS wlan_global_lmac_if_open(struct wlan_objmgr_psoc *psoc)
/* Function call to register rx-ops handlers */
wlan_global_lmac_if_rx_ops_register(rx_ops);
target_if_wake_lock_init(psoc);
return QDF_STATUS_SUCCESS;
}
qdf_export_symbol(wlan_global_lmac_if_open);
@ -215,6 +218,7 @@ QDF_STATUS wlan_global_lmac_if_close(struct wlan_objmgr_psoc *psoc)
return QDF_STATUS_E_INVAL;
}
target_if_wake_lock_deinit(psoc);
tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
rx_ops = wlan_psoc_get_lmac_if_rxops(psoc);

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2020 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
@ -25,6 +25,9 @@
#ifndef __TARGET_IF_PSOC_WAKE_LOCK_H__
#define __TARGET_IF_PSOC_WAKE_LOCK_H__
#include <wlan_objmgr_psoc_obj.h>
#include <qdf_lock.h>
#ifdef FEATURE_VDEV_RSP_WAKELOCK
/**
* struct wlan_vdev_wakelock - vdev wake lock sub structure

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2020 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
@ -28,6 +28,7 @@
#include <host_diag_core_event.h>
#include <wlan_objmgr_psoc_obj.h>
#include <target_if.h>
#include <target_if_vdev_mgr_rx_ops.h>
void target_if_wake_lock_init(struct wlan_objmgr_psoc *psoc)
{
@ -35,10 +36,10 @@ void target_if_wake_lock_init(struct wlan_objmgr_psoc *psoc)
struct wlan_lmac_if_mlme_rx_ops *rx_ops;
rx_ops = target_if_vdev_mgr_get_rx_ops(psoc);
if (!rx_ops && !rx_ops->psoc_get_wakelock_info) {
mlme_err("vdev_id:%d psoc_id:%d No Rx Ops", vdev_id,
if (!rx_ops || !rx_ops->psoc_get_wakelock_info) {
mlme_err("psoc_id:%d No Rx Ops",
wlan_psoc_get_id(psoc));
return QDF_STATUS_E_INVAL;
return;
}
psoc_wakelock = rx_ops->psoc_get_wakelock_info(psoc);
@ -56,10 +57,10 @@ void target_if_wake_lock_deinit(struct wlan_objmgr_psoc *psoc)
struct wlan_lmac_if_mlme_rx_ops *rx_ops;
rx_ops = target_if_vdev_mgr_get_rx_ops(psoc);
if (!rx_ops && !rx_ops->psoc_get_wakelock_info) {
mlme_err("vdev_id:%d psoc_id:%d No Rx Ops", vdev_id,
if (!rx_ops || !rx_ops->psoc_get_wakelock_info) {
mlme_err("psoc_id:%d No Rx Ops",
wlan_psoc_get_id(psoc));
return QDF_STATUS_E_INVAL;
return;
}
psoc_wakelock = rx_ops->psoc_get_wakelock_info(psoc);
@ -68,7 +69,7 @@ void target_if_wake_lock_deinit(struct wlan_objmgr_psoc *psoc)
qdf_wake_lock_destroy(&psoc_wakelock->stop_wakelock);
qdf_wake_lock_destroy(&psoc_wakelock->delete_wakelock);
qdf_runtime_lock_deinit(&vdev_wakelock->wmi_cmd_rsp_runtime_lock);
qdf_runtime_lock_deinit(&psoc_wakelock->wmi_cmd_rsp_runtime_lock);
}
QDF_STATUS target_if_wake_lock_timeout_acquire(
@ -76,12 +77,11 @@ QDF_STATUS target_if_wake_lock_timeout_acquire(
enum wakelock_mode mode)
{
struct psoc_mlme_wakelock *psoc_wakelock;
struct wlan_objmgr_psoc *psoc;
struct wlan_lmac_if_mlme_rx_ops *rx_ops;
rx_ops = target_if_vdev_mgr_get_rx_ops(psoc);
if (!rx_ops && !rx_ops->psoc_get_wakelock_info) {
mlme_err("vdev_id:%d psoc_id:%d No Rx Ops", vdev_id,
mlme_err("psoc_id:%d No Rx Ops",
wlan_psoc_get_id(psoc));
return QDF_STATUS_E_INVAL;
}
@ -97,7 +97,7 @@ QDF_STATUS target_if_wake_lock_timeout_acquire(
STOP_RESPONSE_TIMER);
break;
case DELETE_WAKELOCK:
qdf_wake_lock_timeout_acquire(&vdev_wakelock->delete_wakelock,
qdf_wake_lock_timeout_acquire(&psoc_wakelock->delete_wakelock,
DELETE_RESPONSE_TIMER);
break;
default:
@ -119,9 +119,8 @@ QDF_STATUS target_if_wake_lock_timeout_release(
struct wlan_lmac_if_mlme_rx_ops *rx_ops;
rx_ops = target_if_vdev_mgr_get_rx_ops(psoc);
if (!rx_ops && !rx_ops->psoc_get_wakelock_info) {
mlme_err("vdev_id:%d psoc_id:%d No Rx Ops", vdev_id,
wlan_psoc_get_id(psoc));
if (!rx_ops || !rx_ops->psoc_get_wakelock_info) {
mlme_err("psoc_id:%d No Rx Ops", wlan_psoc_get_id(psoc));
return QDF_STATUS_E_INVAL;
}

View file

@ -1761,7 +1761,7 @@ struct wlan_lmac_if_mlme_rx_ops {
struct wlan_objmgr_psoc *psoc,
struct multi_vdev_restart_resp *rsp);
#ifdef FEATURE_VDEV_RSP_WAKELOCK
struct vdev_mlme_wakelock *(*psoc_get_wakelock_info)(
struct psoc_mlme_wakelock *(*psoc_get_wakelock_info)(
struct wlan_objmgr_psoc *psoc);
#endif
struct vdev_response_timer *(*psoc_get_vdev_response_timer_info)(

View file

@ -24,7 +24,9 @@
#include <wlan_vdev_mgr_tgt_if_rx_defs.h>
#include <qdf_timer.h>
#include <wlan_cm_bss_score_param.h>
#ifdef FEATURE_VDEV_RSP_WAKELOCK
#include <target_if_psoc_wake_lock.h>
#endif
/* Max RNR size given max vaps are 16 */
#define MAX_RNR_SIZE 256

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2019-2020 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 above
@ -26,7 +26,6 @@
#include <include/wlan_psoc_mlme.h>
#include <wlan_psoc_mlme_main.h>
#include <wlan_psoc_mlme_api.h>
#include <target_if_psoc_wake_lock.h>
struct psoc_mlme_obj *mlme_psoc_get_priv(struct wlan_objmgr_psoc *psoc)
{
@ -73,7 +72,6 @@ static QDF_STATUS mlme_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc,
goto init_failed;
}
target_if_wake_lock_init(psoc);
return QDF_STATUS_SUCCESS;
init_failed:
qdf_mem_free(psoc_mlme);
@ -92,7 +90,6 @@ static QDF_STATUS mlme_psoc_obj_destroy_handler(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
}
target_if_wake_lock_deinit(psoc);
wlan_objmgr_psoc_component_obj_detach(psoc, WLAN_UMAC_COMP_MLME,
psoc_mlme);

View file

@ -219,19 +219,18 @@ tgt_psoc_get_wakelock_info(struct wlan_objmgr_psoc *psoc)
psoc_mlme = mlme_psoc_get_priv(psoc);
if (!psoc_mlme) {
mlme_err("VDEV_%d: VDEV_MLME is NULL", wlan_vdev_get_id(psoc));
mlme_err("PSOC_MLME is NULL");
return NULL;
}
return &psoc_mlme->psoc_wakelock;
return &psoc_mlme->psoc_mlme_wakelock;
}
static inline void
tgt_psoc_reg_wakelock_info_rx_op(struct wlan_lmac_if_mlme_rx_ops
*mlme_rx_ops)
{
mlme_rx_ops->psoc_get_wakelock_info =
tgt_psoc_get_wakelock_info;
mlme_rx_ops->psoc_get_wakelock_info = tgt_psoc_get_wakelock_info;
}
#else
static inline void