diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index c3c95c06606c..bd8963ccb4fd 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -4533,17 +4533,18 @@ ol_txrx_display_stats(void *soc, uint16_t value, /** * ol_txrx_clear_stats() - Clear OL TXRX stats * @soc - ol soc handle + * @pdev_id: pdev identifier * @value - Module id for which stats needs to be cleared * * Return: 0 - success/ non-zero failure */ -static QDF_STATUS ol_txrx_clear_stats(struct cdp_soc *soc, - uint8_t value) +static QDF_STATUS ol_txrx_clear_stats(struct cdp_soc_t *soc_hdl, + uint8_t pdev_id, uint8_t value) { - ol_txrx_pdev_handle pdev; + struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl); + ol_txrx_pdev_handle pdev = ol_txrx_get_pdev_from_pdev_id(soc, pdev_id); QDF_STATUS status = QDF_STATUS_SUCCESS; - pdev = cds_get_context(QDF_MODULE_ID_TXRX); if (!pdev) { QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR, "%s: pdev is NULL", __func__); diff --git a/core/hdd/src/wlan_hdd_hostapd_wext.c b/core/hdd/src/wlan_hdd_hostapd_wext.c index a90c0023be4d..a066d4d63058 100644 --- a/core/hdd/src/wlan_hdd_hostapd_wext.c +++ b/core/hdd/src/wlan_hdd_hostapd_wext.c @@ -37,6 +37,7 @@ #endif #include "wlan_hdd_power.h" #include "wlan_policy_mgr_ucfg.h" +#include #include #include "wlan_dfs_utils_api.h" #include @@ -957,7 +958,8 @@ static __iw_softap_setparam(struct net_device *dev, break; default: if (soc) - cdp_clear_stats(soc, set_value); + cdp_clear_stats(soc, OL_TXRX_PDEV_ID, + set_value); } break; } diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index f4fa0f49ea0f..b2c8355bc130 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -55,6 +55,8 @@ #include "dbglog_host.h" #include "wma.h" +#include + #include "wlan_hdd_power.h" #include "qwlan_version.h" #include "wlan_hdd_host_offload.h" @@ -4811,6 +4813,7 @@ static int hdd_we_clear_stats(struct hdd_adapter *adapter, int option) break; default: status = cdp_clear_stats(cds_get_context(QDF_MODULE_ID_SOC), + OL_TXRX_PDEV_ID, option); if (status != QDF_STATUS_SUCCESS) hdd_debug("Failed to dump stats for option: %d",