From d22ed62ec8f5b400301e02c2ed0a81a2314114f1 Mon Sep 17 00:00:00 2001 From: chenguo Date: Mon, 3 Dec 2018 16:54:56 +0800 Subject: [PATCH] qcacmn: Make sure int_timer is initialized in monitor mode During vdev attachment in monitor mode, the ini_timer is not initialzied which will cause FW assertion. Make sure int_timer is initialized properly. CRs-Fixed: 2359908 Change-Id: I48c97161345b17a0eb3e8a939499eabeae683bd2 --- dp/wifi3.0/dp_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 83d9c11d0e9a..72ce664be6e9 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -4142,6 +4142,13 @@ static struct cdp_vdev *dp_vdev_attach_wifi3(struct cdp_pdev *txrx_pdev, TAILQ_INIT(&vdev->peer_list); + if ((soc->intr_mode == DP_INTR_POLL) && + wlan_cfg_get_num_contexts(soc->wlan_cfg_ctx) != 0) { + if ((pdev->vdev_count == 0) || + (wlan_op_mode_monitor == vdev->opmode)) + qdf_timer_mod(&soc->int_timer, DP_INTR_POLL_TIMER_MS); + } + if (wlan_op_mode_monitor == vdev->opmode) { pdev->monitor_vdev = vdev; return (struct cdp_vdev *)vdev; @@ -4161,13 +4168,6 @@ static struct cdp_vdev *dp_vdev_attach_wifi3(struct cdp_pdev *txrx_pdev, dp_tx_vdev_attach(vdev); - - if ((soc->intr_mode == DP_INTR_POLL) && - wlan_cfg_get_num_contexts(soc->wlan_cfg_ctx) != 0) { - if (pdev->vdev_count == 1) - qdf_timer_mod(&soc->int_timer, DP_INTR_POLL_TIMER_MS); - } - if (pdev->vdev_count == 1) dp_lro_hash_setup(soc, pdev);