1
0

qcacmn: Add upper layer support to (un)register MGMT TxRx WMI events

Add TGT layer APIs in MGMT TxRx component to (un)register WMI events.
Add psoc enable/disable handlers in MGMT TxRx component and register them.

Change-Id: Icfea29005cc9b41cccbea9c27b59222ebc1983f7
CRs-Fixed: 2959077
Este cometimento está contido em:
Shiva Krishna Pittala
2021-04-22 15:27:16 +05:30
cometido por Madan Koyyalamudi
ascendente ef3d7b71c2
cometimento 5611ef5081
5 ficheiros modificados com 102 adições e 1 eliminações

Ver ficheiro

@@ -1310,8 +1310,13 @@ QDF_STATUS dispatcher_psoc_enable(struct wlan_objmgr_psoc *psoc)
if (status != QDF_STATUS_SUCCESS && status != QDF_STATUS_COMP_DISABLED)
goto spectral_psoc_enable_fail;
if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_psoc_enable(psoc))
goto mgmt_txrx_psoc_enable_fail;
return QDF_STATUS_SUCCESS;
mgmt_txrx_psoc_enable_fail:
spectral_psoc_disable(psoc);
spectral_psoc_enable_fail:
wlan_mlme_psoc_disable(psoc);
mlme_psoc_enable_fail:
@@ -1345,6 +1350,8 @@ QDF_STATUS dispatcher_psoc_disable(struct wlan_objmgr_psoc *psoc)
{
QDF_STATUS status;
QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_psoc_disable(psoc));
QDF_BUG(QDF_STATUS_SUCCESS == wlan_mlme_psoc_disable(psoc));
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_crypto_psoc_disable(psoc));

Ver ficheiro

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2018, 2021 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
@@ -120,4 +120,21 @@ uint8_t tgt_mgmt_txrx_get_vdev_id_from_desc_id(
uint32_t tgt_mgmt_txrx_get_free_desc_pool_count(
struct wlan_objmgr_pdev *pdev);
/**
* tgt_mgmt_txrx_register_ev_handler() - Register to mgmt txrx WMI events
* @psoc: Pointer to psoc object
*
* Return: QDF_STATUS of operation
*/
QDF_STATUS
tgt_mgmt_txrx_register_ev_handler(struct wlan_objmgr_psoc *psoc);
/**
* tgt_mgmt_txrx_unregister_ev_handler() - Unregister to mgmt txrx WMI events
* @psoc: Pointer to psoc object
*
* Return: QDF_STATUS of operation
*/
QDF_STATUS
tgt_mgmt_txrx_unregister_ev_handler(struct wlan_objmgr_psoc *psoc);
#endif

Ver ficheiro

@@ -1028,6 +1028,22 @@ QDF_STATUS wlan_mgmt_txrx_pdev_open(struct wlan_objmgr_pdev *pdev);
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS wlan_mgmt_txrx_pdev_close(struct wlan_objmgr_pdev *pdev);
/**
* wlan_mgmt_txrx_psoc_enable() - mgmt txrx module psoc enable API
* @psoc: psoc context
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS wlan_mgmt_txrx_psoc_enable(struct wlan_objmgr_psoc *psoc);
/**
* wlan_mgmt_txrx_psoc_disable() - mgmt txrx module psoc disable API
* @psoc: psoc context
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS wlan_mgmt_txrx_psoc_disable(struct wlan_objmgr_psoc *psoc);
#endif

Ver ficheiro

@@ -1456,3 +1456,53 @@ uint32_t tgt_mgmt_txrx_get_free_desc_pool_count(
fail:
return free_desc_count;
}
QDF_STATUS
tgt_mgmt_txrx_register_ev_handler(struct wlan_objmgr_psoc *psoc)
{
struct wlan_lmac_if_tx_ops *tx_ops;
struct wlan_lmac_if_mgmt_txrx_tx_ops *mgmt_txrx_tx_ops;
if (!psoc) {
mgmt_txrx_err("psoc is null");
return QDF_STATUS_E_NULL_VALUE;
}
tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
if (!tx_ops) {
mgmt_txrx_err("tx_ops is NULL");
return QDF_STATUS_E_NULL_VALUE;
}
mgmt_txrx_tx_ops = &tx_ops->mgmt_txrx_tx_ops;
if (mgmt_txrx_tx_ops->reg_ev_handler)
return mgmt_txrx_tx_ops->reg_ev_handler(psoc);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
tgt_mgmt_txrx_unregister_ev_handler(struct wlan_objmgr_psoc *psoc)
{
struct wlan_lmac_if_tx_ops *tx_ops;
struct wlan_lmac_if_mgmt_txrx_tx_ops *mgmt_txrx_tx_ops;
if (!psoc) {
mgmt_txrx_err("psoc is null");
return QDF_STATUS_E_NULL_VALUE;
}
tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
if (!tx_ops) {
mgmt_txrx_err("tx_ops is NULL");
return QDF_STATUS_E_NULL_VALUE;
}
mgmt_txrx_tx_ops = &tx_ops->mgmt_txrx_tx_ops;
if (mgmt_txrx_tx_ops->unreg_ev_handler)
return mgmt_txrx_tx_ops->unreg_ev_handler(psoc);
return QDF_STATUS_SUCCESS;
}

Ver ficheiro

@@ -23,6 +23,7 @@
*/
#include "wlan_mgmt_txrx_utils_api.h"
#include "wlan_mgmt_txrx_tgt_api.h"
#include "../../core/src/wlan_mgmt_txrx_main_i.h"
#include "wlan_objmgr_psoc_obj.h"
#include "wlan_objmgr_global_obj.h"
@@ -785,6 +786,16 @@ QDF_STATUS wlan_mgmt_txrx_psoc_close(struct wlan_objmgr_psoc *psoc)
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mgmt_txrx_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
return tgt_mgmt_txrx_register_ev_handler(psoc);
}
QDF_STATUS wlan_mgmt_txrx_psoc_disable(struct wlan_objmgr_psoc *psoc)
{
return tgt_mgmt_txrx_unregister_ev_handler(psoc);
}
QDF_STATUS wlan_mgmt_txrx_pdev_open(struct wlan_objmgr_pdev *pdev)
{
return QDF_STATUS_SUCCESS;