qcacmn: Fix get peer stats cmd timeout

Request is cleared before response for race condition between request
thread wificond and response work thread.
1. wificond thread sent get peer request and waited for
response.
2. worker thread got response from F/W, completed the request.
3. Wificond got the response, finished the request.
4. wificond triggered another get peer request, created
new request, set pending request bit TYPE_PEER_STATS.
5. Kworker thread clear the pending request bit
TYPE_PEER_STATS.
6. Cleared request TYPE_PEER_STATS couldn't be completed any
more, wificond thread waited for 1.6s, timeout happened.

Fix: Clear pending request bit TYPE_PEER_STATS before
complete the request, make sure old pending request bit is
cleared before new request of same type is set.

Change-Id: I058cada5fa870d95172122364903bff2b31eb277
CRs-Fixed: 2621914
This commit is contained in:
Jianmin Zhu
2020-02-14 12:39:12 +08:00
committato da nshrivas
parent 70259d6252
commit c310645579

Vedi File

@@ -544,8 +544,8 @@ complete:
tgt_mc_cp_stats_extract_peer_extd_stats(psoc, ev);
if (tgt_mc_cp_stats_is_last_event(ev, TYPE_PEER_STATS)) {
tgt_mc_cp_stats_prepare_raw_peer_rssi(psoc, &last_req);
ucfg_mc_cp_stats_reset_pending_req(psoc, TYPE_PEER_STATS);
tgt_mc_cp_stats_prepare_raw_peer_rssi(psoc, &last_req);
}
}