diff --git a/dp/inc/cdp_txrx_mon.h b/dp/inc/cdp_txrx_mon.h index 1bb7d3ed55..5ddd1d1d7c 100644 --- a/dp/inc/cdp_txrx_mon.h +++ b/dp/inc/cdp_txrx_mon.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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 @@ -217,6 +217,35 @@ cdp_is_lite_mon_enabled(ol_txrx_soc_handle soc, return soc->ops->mon_ops->txrx_is_lite_mon_enabled(soc, pdev_id, dir); } + +/* + * cdp_get_lite_mon_legacy_feature_enabled() - Get the legacy feature enabled + * + * @soc: dp soc handle + * @pdev_id: pdev id + * @dir: direction tx/rx + * + * This API is used to get the legacy feature enabled using lite_mon + * + * Return: legacy feature enabled + */ +static inline int +cdp_get_lite_mon_legacy_feature_enabled(ol_txrx_soc_handle soc, + uint8_t pdev_id, uint8_t dir) +{ + if (!soc || !soc->ops) { + dp_cdp_debug("Invalid Instance"); + return 0; + } + + if (!soc->ops->mon_ops || + !soc->ops->mon_ops->txrx_get_lite_mon_legacy_feature_enabled) + return 0; + + return soc->ops->mon_ops->txrx_get_lite_mon_legacy_feature_enabled(soc, + pdev_id, + dir); +} #endif #ifdef QCA_RSSI_DB2DBM diff --git a/dp/inc/cdp_txrx_mon_struct.h b/dp/inc/cdp_txrx_mon_struct.h index 0478b323d8..61632ad3b3 100644 --- a/dp/inc/cdp_txrx_mon_struct.h +++ b/dp/inc/cdp_txrx_mon_struct.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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 @@ -43,6 +43,24 @@ /* This should align with nac mac type enumerations in ieee80211_ioctl.h */ #define CDP_LITE_MON_PEER_MAC_TYPE_CLIENT 2 +/** + * enum cdp_lite_mon legacy_filter: legacy filters for tx/rx + * @LEGACY_FILTER_DISABLED: No filter / filter disabled + * @LEGACY_FILTER_MCOPY: M_Copy filter + * @LEGACY_FILTER_TX_CAPTURE: Tx_Capture filter + * @LEGACY_FILTER_RX_ENH_CAPTURE: Rx Enhance capture filter + * @LEGACY_FILTER_ADV_MON_FILTER: Advance Monitor filter + * + * Use to identify which filter is currently enabled using lite mon + */ +enum cdp_lite_mon_legacy_filter { + LEGACY_FILTER_DISABLED = 0, + LEGACY_FILTER_MCOPY = 1, + LEGACY_FILTER_TX_CAPTURE = 2, + LEGACY_FILTER_RX_ENH_CAPTURE = 3, + LEGACY_FILTER_ADV_MON_FILTER = 4, +}; + /* lite mon frame levels */ enum cdp_lite_mon_level { /* level invalid */ @@ -491,6 +509,7 @@ struct cdp_pdev_mon_stats { * @len: mgmt/ctrl/data frame lens * @debug: debug options * @vdev_id: output vdev id + * @legacy_filter_enabled: legacy filter currently enabled */ struct cdp_lite_mon_filter_config { uint8_t direction; @@ -503,6 +522,7 @@ struct cdp_lite_mon_filter_config { uint16_t len[CDP_MON_FRM_TYPE_MAX]; uint8_t debug; uint8_t vdev_id; + uint8_t legacy_filter_enabled; }; /** diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index c63c3cdff2..48b5477bdd 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -971,6 +971,7 @@ struct cdp_me_ops { * @txrx_set_advance_monitor_filter: set advanced monitor mode * @config_full_mon_mode: configure full monitor mode * @txrx_enable_mon_reap_timer: Enable/Disable reap timer of monitor status ring + * @txrx_get_lite_mon_legacy_feature_enabled: returns the legacy filter enabled */ struct cdp_mon_ops { @@ -1035,6 +1036,12 @@ struct cdp_mon_ops { (*txrx_is_lite_mon_enabled)(struct cdp_soc_t *soc, uint8_t pdev_id, uint8_t direction); + + /* get the legacy feature enabled */ + int + (*txrx_get_lite_mon_legacy_feature_enabled)(struct cdp_soc_t *soc, + uint8_t pdev_id, + uint8_t direction); #endif /*To set RSSI dbm conversion params in monitor pdev */ QDF_STATUS (*txrx_set_mon_pdev_params_rssi_dbm_conv) diff --git a/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c b/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c index 934d9dc846..e77b19c59a 100644 --- a/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c +++ b/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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 @@ -1312,6 +1312,7 @@ struct cdp_mon_ops dp_ops_mon_1_0 = { .txrx_set_lite_mon_peer_config = NULL, .txrx_get_lite_mon_peer_config = NULL, .txrx_is_lite_mon_enabled = NULL, + .txrx_get_lite_mon_legacy_feature_enabled = NULL, #endif .txrx_set_mon_pdev_params_rssi_dbm_conv = dp_mon_pdev_params_rssi_dbm_conv, diff --git a/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c b/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c index 5a1af95993..5d46850322 100644 --- a/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c +++ b/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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 @@ -1556,6 +1556,8 @@ struct cdp_mon_ops dp_ops_mon_2_0 = { .txrx_set_lite_mon_peer_config = dp_lite_mon_set_peer_config, .txrx_get_lite_mon_peer_config = dp_lite_mon_get_peer_config, .txrx_is_lite_mon_enabled = dp_lite_mon_is_enabled, + .txrx_get_lite_mon_legacy_feature_enabled = + dp_lite_mon_get_legacy_feature_enabled, #endif .txrx_set_mon_pdev_params_rssi_dbm_conv = dp_mon_pdev_params_rssi_dbm_conv, diff --git a/dp/wifi3.0/monitor/dp_mon.h b/dp/wifi3.0/monitor/dp_mon.h index f6468de360..801434076b 100644 --- a/dp/wifi3.0/monitor/dp_mon.h +++ b/dp/wifi3.0/monitor/dp_mon.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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 @@ -4311,6 +4311,14 @@ dp_lite_mon_rx_mpdu_process(struct dp_pdev *pdev, { return QDF_STATUS_E_FAILURE; } + +static inline int +dp_lite_mon_get_legacy_feature_enabled(struct cdp_soc_t *soc, + uint8_t pdev_id, + uint8_t direction) +{ + return 0; +} #endif #ifdef WLAN_TELEMETRY_STATS_SUPPORT