Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6417f9d0 authored by Arun Kumar Khandavalli's avatar Arun Kumar Khandavalli
Browse files

qcacmn: Enable VDEV response wakelock

Enable VDEV response converged wakelock logic.

Change-Id: I67917d5798d9279cb104d0e7ff2cbe26365658c1
CRs-Fixed: 2738667
parent 257df6cf
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@
#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])
				(struct wlan_lmac_if_tx_ops *tx_ops);
@@ -135,6 +137,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(&psoc->soc_cb.rx_ops);

	target_if_wake_lock_init(psoc);

	return QDF_STATUS_SUCCESS;
}
qdf_export_symbol(wlan_global_lmac_if_open);
@@ -149,6 +153,7 @@ qdf_export_symbol(wlan_global_lmac_if_open);
 */
QDF_STATUS wlan_global_lmac_if_close(struct wlan_objmgr_psoc *psoc)
{
	target_if_wake_lock_deinit(psoc);
	qdf_mem_zero(&psoc->soc_cb.tx_ops, sizeof(psoc->soc_cb.tx_ops));
	qdf_mem_zero(&psoc->soc_cb.rx_ops, sizeof(psoc->soc_cb.rx_ops));

+4 −1
Original line number Diff line number Diff line
/*
 * 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
+13 −17
Original line number Diff line number Diff line
/*
 * 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,9 @@ 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,
			 wlan_psoc_get_id(psoc));
		return QDF_STATUS_E_INVAL;
	if (!rx_ops || !rx_ops->psoc_get_wakelock_info) {
		mlme_err("psoc_id:%d No Rx Ops", wlan_psoc_get_id(psoc));
		return;
	}

	psoc_wakelock = rx_ops->psoc_get_wakelock_info(psoc);
@@ -56,10 +56,9 @@ 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,
			 wlan_psoc_get_id(psoc));
		return QDF_STATUS_E_INVAL;
	if (!rx_ops || !rx_ops->psoc_get_wakelock_info) {
		mlme_err("psoc_id:%d No Rx Ops", wlan_psoc_get_id(psoc));
		return;
	}

	psoc_wakelock = rx_ops->psoc_get_wakelock_info(psoc);
@@ -68,7 +67,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,13 +75,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,
			 wlan_psoc_get_id(psoc));
		mlme_err("psoc_id:%d No Rx Ops", wlan_psoc_get_id(psoc));
		return QDF_STATUS_E_INVAL;
	}

@@ -97,7 +94,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 +116,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;
	}

+1 −1
Original line number Diff line number Diff line
@@ -1610,7 +1610,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)(
+3 −0
Original line number Diff line number Diff line
@@ -23,6 +23,9 @@
#include <wlan_ext_mlme_obj_types.h>
#include <wlan_vdev_mgr_tgt_if_rx_defs.h>
#include <qdf_timer.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
Loading