diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index 203b4e7aff35..fe0b26f1baaa 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -1002,6 +1002,7 @@ struct ol_if_ops { uint32_t flags); bool (*is_roam_inprogress)(uint32_t vdev_id); + enum QDF_GLOBAL_MODE (*get_con_mode)(void); /* TODO: Add any other control path calls required to OL_IF/WMA layer */ }; diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 280aec2b8018..cdeb8620de0d 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -67,7 +67,6 @@ cdp_dump_flow_pool_info(struct cdp_soc_t *soc) #include "dp_txrx_me.h" #endif #if defined(DP_CON_MON) -extern int con_mode_monitor; #ifndef REMOVE_PKT_LOG #include #include @@ -1713,14 +1712,13 @@ static QDF_STATUS dp_soc_interrupt_attach_wrapper(void *txrx_soc) struct dp_soc *soc = (struct dp_soc *)txrx_soc; if (!(soc->wlan_cfg_ctx->napi_enabled) || - con_mode_monitor == QDF_GLOBAL_MONITOR_MODE) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO, - "%s: Poll mode", __func__); + (soc->cdp_soc.ol_ops->get_con_mode && + soc->cdp_soc.ol_ops->get_con_mode() == + QDF_GLOBAL_MONITOR_MODE)) { + dp_info("Poll mode"); return dp_soc_attach_poll(txrx_soc); } else { - - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO, - "%s: Interrupt mode", __func__); + dp_info("Interrupt mode"); return dp_soc_interrupt_attach(txrx_soc); } } @@ -9872,7 +9870,9 @@ void *dp_soc_init(void *dpsoc, HTC_HANDLE htc_handle, REO_DST_RING_SIZE_QCA6290); wlan_cfg_set_raw_mode_war(soc->wlan_cfg_ctx, true); soc->ast_override_support = 1; - if (con_mode_monitor == QDF_GLOBAL_MONITOR_MODE) { + if (soc->cdp_soc.ol_ops->get_con_mode && + soc->cdp_soc.ol_ops->get_con_mode() == + QDF_GLOBAL_MONITOR_MODE) { int int_ctx; for (int_ctx = 0; int_ctx < WLAN_CFG_INT_NUM_CONTEXTS; int_ctx++) {