qcacld-3.0: Do not start unsolicited timer back to back
Currently there is no check to not start unsolicited timer if its callback is already in process. If once this timer expires and callback is invoked, and if this timer again tries to start before the callback completes there is no check to prevent this timer from starting. As the callback of the previous timer expiry is already in progress, there is no need to start the unsolicited timer again. To address this issue a check is added before starting the unsolicited timer to validate if the callback is still in progress. CRs-Fixed: 2635740 Change-Id: Ib008562be22356c3a286fab49a61f99d6867c54e
This commit is contained in:
committed by
nshrivas
parent
aa8827cfc4
commit
79d116ce7e
@@ -1894,6 +1894,7 @@ struct hdd_context {
|
||||
qdf_mc_timer_t sar_safety_timer;
|
||||
qdf_mc_timer_t sar_safety_unsolicited_timer;
|
||||
qdf_event_t sar_safety_req_resp_event;
|
||||
qdf_atomic_t sar_safety_req_resp_event_in_progress;
|
||||
#endif
|
||||
|
||||
qdf_time_t runtime_resume_start_time_stamp;
|
||||
|
@@ -502,6 +502,8 @@ static void hdd_sar_unsolicited_timer_cb(void *user_data)
|
||||
|
||||
hdd_nofl_debug("Sar unsolicited timer expired");
|
||||
|
||||
qdf_atomic_set(&hdd_ctx->sar_safety_req_resp_event_in_progress, 1);
|
||||
|
||||
for (i = 0; i < hdd_ctx->config->sar_safety_req_resp_retry; i++) {
|
||||
qdf_event_reset(&hdd_ctx->sar_safety_req_resp_event);
|
||||
hdd_send_sar_unsolicited_event(hdd_ctx);
|
||||
@@ -511,6 +513,7 @@ static void hdd_sar_unsolicited_timer_cb(void *user_data)
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
break;
|
||||
}
|
||||
qdf_atomic_set(&hdd_ctx->sar_safety_req_resp_event_in_progress, 0);
|
||||
|
||||
if (i >= hdd_ctx->config->sar_safety_req_resp_retry)
|
||||
hdd_configure_sar_index(hdd_ctx,
|
||||
@@ -530,6 +533,10 @@ void wlan_hdd_sar_unsolicited_timer_start(struct hdd_context *hdd_ctx)
|
||||
if (!hdd_ctx->config->enable_sar_safety)
|
||||
return;
|
||||
|
||||
if (qdf_atomic_read(
|
||||
&hdd_ctx->sar_safety_req_resp_event_in_progress) > 0)
|
||||
return;
|
||||
|
||||
if (QDF_TIMER_STATE_RUNNING !=
|
||||
qdf_mc_timer_get_current_state(
|
||||
&hdd_ctx->sar_safety_unsolicited_timer))
|
||||
@@ -573,6 +580,7 @@ void wlan_hdd_sar_timers_init(struct hdd_context *hdd_ctx)
|
||||
QDF_TIMER_TYPE_SW,
|
||||
hdd_sar_unsolicited_timer_cb, hdd_ctx);
|
||||
|
||||
qdf_atomic_init(&hdd_ctx->sar_safety_req_resp_event_in_progress);
|
||||
qdf_event_create(&hdd_ctx->sar_safety_req_resp_event);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user