qcacmn: Cancel reap timer during driver unload
In case of driver unload, there can be a race condition since the timer for processing monitor status ring can run in parallel to the unload time wow ack response handler, which is also flushing all the monitor status ring entries. To avoid this race condition, stop the monitor reap timer as a part of target suspend, and process all the outstanding entries in the montior status ring. This will make sure that the monitor status ring is processed from only one context at any given time. Change-Id: If61327c73fdddc414b3957b69ae986f2a26bb803 CRs-Fixed: 2677812
This commit is contained in:
@@ -10390,10 +10390,38 @@ static void dp_process_wow_ack_rsp(struct cdp_soc_t *soc_hdl, uint8_t pdev_id)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_process_target_suspend_req() - process target suspend request
|
||||
* @soc_hdl: datapath soc handle
|
||||
* @pdev_id: data path pdev handle id
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static void dp_process_target_suspend_req(struct cdp_soc_t *soc_hdl,
|
||||
uint8_t pdev_id)
|
||||
{
|
||||
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||
struct dp_pdev *pdev = dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id);
|
||||
|
||||
if (qdf_unlikely(!pdev)) {
|
||||
dp_err("pdev is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Stop monitor reap timer and reap any pending frames in ring */
|
||||
if (((pdev->rx_pktlog_mode != DP_RX_PKTLOG_DISABLED) ||
|
||||
dp_is_enable_reap_timer_non_pkt(pdev)) &&
|
||||
soc->reap_timer_init) {
|
||||
qdf_timer_sync_cancel(&soc->mon_reap_timer);
|
||||
dp_service_mon_rings(soc, DP_MON_REAP_BUDGET);
|
||||
}
|
||||
}
|
||||
|
||||
static struct cdp_bus_ops dp_ops_bus = {
|
||||
.bus_suspend = dp_bus_suspend,
|
||||
.bus_resume = dp_bus_resume,
|
||||
.process_wow_ack_rsp = dp_process_wow_ack_rsp,
|
||||
.process_target_suspend_req = dp_process_target_suspend_req
|
||||
};
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user