qcacmn: Modify set 2 of ctrl_ops in dp to for umac-dp decoupling

Change set 2 of ctrl_ops APIs to replace pdev, vdev and peer
dp handles with pdev_id, vdev_id and peer mac address
along with dp soc handle

Change-Id: I3f180c9c360d564f0b229b447074ad23b7c0a737
This commit is contained in:
Pavankumar Nandeshwar
2019-09-30 18:43:03 +05:30
committed by nshrivas
parent e6f443f27a
commit 0ce3870654
18 changed files with 759 additions and 1564 deletions

View File

@@ -25,116 +25,9 @@
#ifndef _CDP_TXRX_MON_H_
#define _CDP_TXRX_MON_H_
#include "cdp_txrx_handle.h"
static inline void cdp_monitor_set_filter_ucast_data
(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, u_int8_t val)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance", __func__);
QDF_BUG(0);
return;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->txrx_monitor_set_filter_ucast_data)
return;
soc->ops->mon_ops->txrx_monitor_set_filter_ucast_data
(pdev, val);
}
static inline void cdp_monitor_set_filter_mcast_data
(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, u_int8_t val)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance", __func__);
QDF_BUG(0);
return;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->txrx_monitor_set_filter_mcast_data)
return;
soc->ops->mon_ops->txrx_monitor_set_filter_mcast_data
(pdev, val);
}
static inline void cdp_monitor_set_filter_non_data
(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, u_int8_t val)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance", __func__);
QDF_BUG(0);
return;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->txrx_monitor_set_filter_non_data)
return;
soc->ops->mon_ops->txrx_monitor_set_filter_non_data
(pdev, val);
}
static inline bool cdp_monitor_get_filter_ucast_data
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev_txrx_handle)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance", __func__);
QDF_BUG(0);
return 0;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->txrx_monitor_get_filter_ucast_data)
return 0;
return soc->ops->mon_ops->txrx_monitor_get_filter_ucast_data
(vdev_txrx_handle);
}
static inline bool cdp_monitor_get_filter_mcast_data
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev_txrx_handle)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance", __func__);
QDF_BUG(0);
return 0;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->txrx_monitor_get_filter_mcast_data)
return 0;
return soc->ops->mon_ops->txrx_monitor_get_filter_mcast_data
(vdev_txrx_handle);
}
static inline bool cdp_monitor_get_filter_non_data
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev_txrx_handle)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance", __func__);
QDF_BUG(0);
return 0;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->txrx_monitor_get_filter_non_data)
return 0;
return soc->ops->mon_ops->txrx_monitor_get_filter_non_data
(vdev_txrx_handle);
}
static inline QDF_STATUS cdp_reset_monitor_mode
(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
static inline QDF_STATUS cdp_reset_monitor_mode(ol_txrx_soc_handle soc,
uint8_t pdev_id)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
@@ -147,85 +40,31 @@ static inline QDF_STATUS cdp_reset_monitor_mode
!soc->ops->mon_ops->txrx_reset_monitor_mode)
return 0;
return soc->ops->mon_ops->txrx_reset_monitor_mode(pdev);
}
static inline void
cdp_record_monitor_chan_num(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
int chan_num)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance", __func__);
QDF_BUG(0);
return;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->txrx_monitor_record_channel)
return;
soc->ops->mon_ops->txrx_monitor_record_channel(pdev, chan_num);
}
static inline void
cdp_record_monitor_chan_freq(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
qdf_freq_t chan_freq)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance", __func__);
QDF_BUG(0);
return;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->txrx_monitor_record_frequency)
return;
soc->ops->mon_ops->txrx_monitor_record_frequency(pdev, chan_freq);
return soc->ops->mon_ops->txrx_reset_monitor_mode(soc, pdev_id);
}
/**
* cdp_deliver_tx_mgmt() - Deliver mgmt frame for tx capture
* @soc: Datapath SOC handle
* @pdev: Datapath PDEV handle
* @pdev_id: id of datapath PDEV handle
* @nbuf: Management frame buffer
*/
static inline void
cdp_deliver_tx_mgmt(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
static inline QDF_STATUS
cdp_deliver_tx_mgmt(ol_txrx_soc_handle soc, uint8_t pdev_id,
qdf_nbuf_t nbuf)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance", __func__);
QDF_BUG(0);
return;
return QDF_STATUS_E_FAILURE;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->txrx_deliver_tx_mgmt)
return;
return QDF_STATUS_E_FAILURE;
soc->ops->mon_ops->txrx_deliver_tx_mgmt(pdev, nbuf);
}
static inline void
cdp_set_bsscolor(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
uint8_t bsscolor)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance", __func__);
QDF_BUG(0);
return;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->txrx_set_bsscolor)
return;
soc->ops->mon_ops->txrx_set_bsscolor(pdev, bsscolor);
return soc->ops->mon_ops->txrx_deliver_tx_mgmt(soc, pdev_id, nbuf);
}
#ifdef WLAN_FEATURE_PKT_CAPTURE