diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 6851c970a7..feb0095879 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -10901,6 +10901,7 @@ dp_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, } dp_soc_set_interrupt_mode(soc); + htt_soc = htt_soc_attach(soc, htc_handle); if (!htt_soc) @@ -10933,6 +10934,7 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle, { int target_type; struct htt_soc *htt_soc = (struct htt_soc *)soc->htt_handle; + bool is_monitor_mode = false; htt_set_htc_handle(htt_soc, htc_handle); soc->hif_handle = hif_handle; @@ -11012,7 +11014,13 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle, } dp_soc_set_interrupt_mode(soc); - wlan_cfg_fill_interrupt_mask(soc->wlan_cfg_ctx, soc->intr_mode); + if (soc->cdp_soc.ol_ops->get_con_mode && + soc->cdp_soc.ol_ops->get_con_mode() == + QDF_GLOBAL_MONITOR_MODE) + is_monitor_mode = true; + + wlan_cfg_fill_interrupt_mask(soc->wlan_cfg_ctx, soc->intr_mode, + is_monitor_mode); wlan_cfg_set_rx_hash(soc->wlan_cfg_ctx, cfg_get(soc->ctrl_psoc, CFG_DP_RX_HASH)); soc->cce_disable = false; diff --git a/wlan_cfg/wlan_cfg.c b/wlan_cfg/wlan_cfg.c index 98ddc48b6c..45385ab388 100644 --- a/wlan_cfg/wlan_cfg.c +++ b/wlan_cfg/wlan_cfg.c @@ -370,7 +370,8 @@ static const uint8_t rx_fst_toeplitz_key[WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN] = { }; void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, - int interrupt_mode) { + int interrupt_mode, + bool is_monitor_mode) { int i = 0; if (interrupt_mode == DP_INTR_INTEGRATED) { @@ -396,10 +397,10 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] = rxdma2host_mon_ring_mask_integrated[i]; } - } else if (interrupt_mode == DP_INTR_MSI){ + } else if (interrupt_mode == DP_INTR_MSI || interrupt_mode == + DP_INTR_POLL) { for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) { wlan_cfg_ctx->int_tx_ring_mask[i] = tx_ring_mask_msi[i]; - wlan_cfg_ctx->int_rx_ring_mask[i] = rx_ring_mask_msi[i]; wlan_cfg_ctx->int_rx_mon_ring_mask[i] = rx_mon_ring_mask_msi[i]; wlan_cfg_ctx->int_rx_err_ring_mask[i] = @@ -408,8 +409,15 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, rx_wbm_rel_ring_mask_msi[i]; wlan_cfg_ctx->int_reo_status_ring_mask[i] = reo_status_ring_mask_msi[i]; - wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = - rxdma2host_ring_mask_msi[i]; + if (is_monitor_mode) { + wlan_cfg_ctx->int_rx_ring_mask[i] = 0; + wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0; + } else { + wlan_cfg_ctx->int_rx_ring_mask[i] = + rx_ring_mask_msi[i]; + wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = + rxdma2host_ring_mask_msi[i]; + } wlan_cfg_ctx->int_host2rxdma_ring_mask[i] = host2rxdma_ring_mask_msi[i]; wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] = diff --git a/wlan_cfg/wlan_cfg.h b/wlan_cfg/wlan_cfg.h index 4e125882d2..1555a9886e 100644 --- a/wlan_cfg/wlan_cfg.h +++ b/wlan_cfg/wlan_cfg.h @@ -1267,9 +1267,10 @@ wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg); * * @wlan_cfg_dp_soc_ctxt: soc configuration context * @interrupt_mode: interrupt_mode: MSI/LEGACY + * @is_monitor_mode: is monitor mode enabled * * Return: void */ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, - int interrupt_mode); + int interrupt_mode, bool is_monitor_mode); #endif