qcacmn: Add txops support for MGMT txrx module
1. Add txops APIs in mgmt txrx module 2. Register the txops APIs of mgmt txrx module. CRs-Fixed: 2927742 Change-Id: I9b226d9f2b85b4ef92527315cb08047563b9ebdd
Tento commit je obsažen v:

odevzdal
Madan Koyyalamudi

rodič
ac790cc9a2
revize
ceacfdf8ae
@@ -95,6 +95,10 @@
|
||||
|
||||
#include <target_if_gpio.h>
|
||||
|
||||
#ifdef WLAN_MGMT_RX_REO_SUPPORT
|
||||
#include <target_if_mgmt_txrx.h>
|
||||
#endif /* WLAN_MGMT_RX_REO_SUPPORT */
|
||||
|
||||
static struct target_if_ctx *g_target_if_ctx;
|
||||
|
||||
struct target_if_ctx *target_if_get_ctx()
|
||||
@@ -475,6 +479,19 @@ void target_if_gpio_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_MGMT_RX_REO_SUPPORT
|
||||
static
|
||||
void target_if_mgmt_txrx_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
target_if_mgmt_txrx_tx_ops_register(tx_ops);
|
||||
}
|
||||
#else
|
||||
static
|
||||
void target_if_mgmt_txrx_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
}
|
||||
#endif /* WLAN_MGMT_RX_REO_SUPPORT */
|
||||
|
||||
static
|
||||
QDF_STATUS target_if_register_umac_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
@@ -523,6 +540,8 @@ QDF_STATUS target_if_register_umac_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
|
||||
target_if_gpio_tx_ops_register(tx_ops);
|
||||
|
||||
target_if_mgmt_txrx_register_tx_ops(tx_ops);
|
||||
|
||||
/* Converged UMAC components to register their TX-ops here */
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
39
target_if/mgmt_txrx/inc/target_if_mgmt_txrx.h
Normální soubor
39
target_if/mgmt_txrx/inc/target_if_mgmt_txrx.h
Normální soubor
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 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 above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: target_if_mgmt_txrx.h
|
||||
* This file contains mgmt txrx module's target related APIs
|
||||
*/
|
||||
|
||||
#ifndef _TARGET_IF_MGMT_TXRX_H_
|
||||
#define _TARGET_IF_MGMT_TXRX_H_
|
||||
|
||||
#include <wlan_lmac_if_def.h>
|
||||
|
||||
/**
|
||||
* target_if_mgmt_txrx_tx_ops_register() - Register txops for mgmt_txrx
|
||||
* module.
|
||||
* @tx_ops: pointer to txops
|
||||
*
|
||||
* Register txops for mgmt_txrx module.
|
||||
*
|
||||
* return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
target_if_mgmt_txrx_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops);
|
||||
#endif /*_TARGET_IF_MGMT_TXRX_H_ */
|
||||
|
@@ -21,6 +21,10 @@
|
||||
|
||||
#ifndef _TARGET_IF_MGMT_TXRX_RX_REO_H_
|
||||
#define _TARGET_IF_MGMT_TXRX_RX_REO_H_
|
||||
|
||||
#include <qdf_types.h>
|
||||
#include <wlan_objmgr_psoc_obj.h>
|
||||
|
||||
#ifdef WLAN_MGMT_RX_REO_SUPPORT
|
||||
/**
|
||||
* target_if_mgmt_rx_reo_register_event_handlers() - Register management
|
||||
|
93
target_if/mgmt_txrx/src/target_if_mgmt_txrx.c
Normální soubor
93
target_if/mgmt_txrx/src/target_if_mgmt_txrx.c
Normální soubor
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright (c) 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 above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: target_if_mgmt_txrx.c
|
||||
* This file contains mgmt txrx module's target related function definitions
|
||||
*/
|
||||
|
||||
#include <target_if_mgmt_txrx.h>
|
||||
#include <target_if_mgmt_txrx_rx_reo.h>
|
||||
|
||||
/**
|
||||
* target_if_mgmt_txrx_unregister_event_handler() - Unregister event handlers
|
||||
* for mgmt txrx module
|
||||
* @psoc: pointer to psoc
|
||||
*
|
||||
* Unregister event handlers for management rx-reorder module
|
||||
*
|
||||
* return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS
|
||||
target_if_mgmt_txrx_unregister_event_handler(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!psoc) {
|
||||
mgmt_txrx_err("psoc is null");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
status = target_if_mgmt_rx_reo_unregister_event_handlers(psoc);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
mgmt_txrx_err("Failed to unregister mgmt rx reo events");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* target_if_mgmt_txrx_register_event_handler() - Register event handlers for
|
||||
* mgmt txrx module
|
||||
* @psoc: pointer to psoc
|
||||
*
|
||||
* Register event handlers for management rx-reorder module
|
||||
*
|
||||
* return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS
|
||||
target_if_mgmt_txrx_register_event_handler(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
|
||||
status = target_if_mgmt_rx_reo_register_event_handlers(psoc);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
mgmt_txrx_err("Failed to register mgmt rx reo events");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
target_if_mgmt_txrx_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
struct wlan_lmac_if_mgmt_txrx_tx_ops *mgmt_txrx_tx_ops;
|
||||
|
||||
if (!tx_ops) {
|
||||
mgmt_txrx_err("txops is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
mgmt_txrx_tx_ops = &tx_ops->mgmt_txrx_tx_ops;
|
||||
mgmt_txrx_tx_ops->reg_ev_handler =
|
||||
target_if_mgmt_txrx_register_event_handler;
|
||||
mgmt_txrx_tx_ops->unreg_ev_handler =
|
||||
target_if_mgmt_txrx_unregister_event_handler;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
Odkázat v novém úkolu
Zablokovat Uživatele