qcacmn: Add Advance monitor filter support

Added advance monitor filter support for mon v2
in cfg80211tool.

Change-Id: Iee0a3c10f4281dd6d7f9b59efa7a5807c0fb234e
CRs-Fixed: 3380845
Este commit está contenido en:
Aniruddha Mishra
2023-01-05 18:38:47 +05:30
cometido por Madan Koyyalamudi
padre b17c727a41
commit 099d29726b
Se han modificado 4 ficheros con 69 adiciones y 3 borrados

Ver fichero

@@ -1295,6 +1295,7 @@ struct dp_mon_ops monitor_ops_1_0 = {
.mon_lite_mon_dealloc = NULL,
.mon_lite_mon_vdev_delete = NULL,
.mon_lite_mon_disable_rx = NULL,
.mon_lite_mon_is_rx_adv_filter_enable = NULL,
};
struct cdp_mon_ops dp_ops_mon_1_0 = {

Ver fichero

@@ -1333,9 +1333,12 @@ dp_mon_register_feature_ops_2_0(struct dp_soc *soc)
mon_ops->mon_htt_ppdu_stats_detach = dp_htt_ppdu_stats_detach;
mon_ops->mon_print_pdev_rx_mon_stats = dp_print_pdev_rx_mon_stats;
mon_ops->mon_set_bsscolor = dp_mon_set_bsscolor;
mon_ops->mon_pdev_get_filter_ucast_data = NULL;
mon_ops->mon_pdev_get_filter_mcast_data = NULL;
mon_ops->mon_pdev_get_filter_non_data = NULL;
mon_ops->mon_pdev_get_filter_ucast_data =
dp_lite_mon_get_filter_ucast_data;
mon_ops->mon_pdev_get_filter_mcast_data =
dp_lite_mon_get_filter_mcast_data;
mon_ops->mon_pdev_get_filter_non_data =
dp_lite_mon_get_filter_non_data;
mon_ops->mon_neighbour_peer_add_ast = NULL;
#ifndef DISABLE_MON_CONFIG
mon_ops->mon_tx_process = dp_tx_mon_process_2_0;
@@ -1537,6 +1540,7 @@ struct dp_mon_ops monitor_ops_2_0 = {
.mon_lite_mon_dealloc = dp_lite_mon_dealloc,
.mon_lite_mon_vdev_delete = dp_lite_mon_vdev_delete,
.mon_lite_mon_disable_rx = dp_lite_mon_disable_rx,
.mon_lite_mon_is_rx_adv_filter_enable = dp_lite_mon_is_rx_adv_filter_enable,
.mon_rx_ppdu_info_cache_create = dp_rx_mon_ppdu_info_cache_create,
.mon_rx_ppdu_info_cache_destroy = dp_rx_mon_ppdu_info_cache_destroy,
};

Ver fichero

@@ -509,6 +509,14 @@ static QDF_STATUS dp_vdev_set_monitor_mode(struct cdp_soc_t *dp_soc,
mon_pdev->monitor_configured = true;
/* If advance monitor filter is applied using lite_mon
* via vap configuration, required filters are already applied
* hence returning SUCCESS from here.
*/
if (dp_monitor_lite_mon_is_rx_adv_filter_enable(pdev)) {
status = QDF_STATUS_SUCCESS;
goto fail;
}
/* disable lite mon if configured, monitor vap takes
* priority over lite mon when its created. Lite mon
* can be configured later again.

Ver fichero

@@ -827,6 +827,7 @@ struct dp_mon_ops {
void (*mon_lite_mon_vdev_delete)(struct dp_pdev *pdev,
struct dp_vdev *vdev);
void (*mon_lite_mon_disable_rx)(struct dp_pdev *pdev);
bool (*mon_lite_mon_is_rx_adv_filter_enable)(struct dp_pdev *pdev);
/* Print advanced monitor stats */
void (*mon_rx_print_advanced_stats)
(struct dp_soc *soc, struct dp_pdev *pdev);
@@ -4260,6 +4261,34 @@ dp_monitor_lite_mon_disable_rx(struct dp_pdev *pdev)
return monitor_ops->mon_lite_mon_disable_rx(pdev);
}
/*
* dp_monitor_lite_mon_is_rx_adv_filter_enable()
* - check if advance mon filter is already applied
* @pdev: dp pdev
*
* Return: bool
*/
static inline bool
dp_monitor_lite_mon_is_rx_adv_filter_enable(struct dp_pdev *pdev)
{
struct dp_mon_ops *monitor_ops;
struct dp_mon_soc *mon_soc = pdev->soc->monitor_soc;
if (!mon_soc) {
dp_mon_debug("monitor soc is NULL");
return false;
}
monitor_ops = mon_soc->mon_ops;
if (!monitor_ops ||
!monitor_ops->mon_lite_mon_disable_rx) {
dp_mon_debug("callback not registered");
return false;
}
return monitor_ops->mon_lite_mon_is_rx_adv_filter_enable(pdev);
}
#ifndef QCA_SUPPORT_LITE_MONITOR
static inline void
dp_lite_mon_disable_rx(struct dp_pdev *pdev)
@@ -4271,6 +4300,30 @@ dp_lite_mon_disable_tx(struct dp_pdev *pdev)
{
}
static inline bool
dp_lite_mon_is_rx_adv_filter_enable(struct dp_pdev *pdev)
{
return false;
}
static inline bool
dp_lite_mon_get_filter_ucast_data(struct cdp_pdev *pdev_handle)
{
return false;
}
static inline bool
dp_lite_mon_get_filter_mcast_data(struct cdp_pdev *pdev_handle)
{
return false;
}
static inline bool
dp_lite_mon_get_filter_non_data(struct cdp_pdev *pdev_handle)
{
return false;
}
static inline int
dp_lite_mon_is_level_msdu(struct dp_mon_pdev *mon_pdev)
{