qcacld-3.0: cleanup NAN state upon NAN enable/disable timeout

Currently, driver sends NAN enable/disable request to firmware
and waits for the response. NAN state is cleaned up when NAN
disable indication is received. But if firmware doesn't respond to
NAN enable or disable request, a timeout happens and NAN state is
not cleaned up.
Cleanup the NAN state upon timeout for NAN enable/disable request.

Change-Id: Iadfff2b4d010407f04b529ff81b1ce1f11064695
CRs-Fixed: 2723094
This commit is contained in:
Srinivas Dasari
2020-07-01 19:41:34 +05:30
committed by nshrivas
parent 834ea0b828
commit 2586d8f598
5 changed files with 48 additions and 8 deletions

View File

@@ -758,13 +758,21 @@ post_msg:
if (req_type != NAN_GENERIC_REQ) {
err = osif_request_wait_for_response(request);
if (err)
if (err) {
nan_debug("NAN request: %u timed out: %d",
req_type, err);
if (req_type == NAN_ENABLE_REQ) {
nan_set_discovery_state(psoc,
NAN_DISC_DISABLED);
policy_mgr_check_n_start_opportunistic_timer(
psoc);
} else if (req_type == NAN_DISABLE_REQ) {
nan_disable_cleanup(psoc);
}
}
if (req_type == NAN_DISABLE_REQ)
psoc_priv->is_explicit_disable = false;
osif_request_put(request);
}