wlan: SAP-PMF: Fix to send the correct retry time in assoc resp

When SAP and STA is connected in PMF session, and if we receive another
assoc req for that STA then we should send assoc rsp with try again
later status with proper comeback time. with current code, we are not
populating the correct comeback time, This patch will fix it.

Change-Id: I929d4d1f9fa1711a9ef817fe6bcdccbe3a993201
CRs-Fixed: 694284
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
index 40d9e74..d4a63aa 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
@@ -866,6 +866,12 @@
             // start SA Query procedure, respond to Association Request
             // with try again later
             case DPH_SA_QUERY_NOT_IN_PROGRESS:
+                /*
+                 * We should reset the retry counter before we start
+                 * the SA query procedure, otherwise in next set of SA query
+                 * procedure we will end up using the stale value.
+                 */
+                pStaDs->pmfSaQueryRetryCount = 0;
                 limSendAssocRspMgmtFrame(pMac, eSIR_MAC_TRY_AGAIN_LATER, 1,
                                          pHdr->sa, subType, pStaDs, psessionEntry);
                 limSendSaQueryRequestFrame(
@@ -873,7 +879,6 @@
                     pHdr->sa, psessionEntry);
                 pStaDs->pmfSaQueryStartTransId = pStaDs->pmfSaQueryCurrentTransId;
                 pStaDs->pmfSaQueryCurrentTransId++;
-                pStaDs->pmfSaQueryRetryCount = 0;
 
                 // start timer for SA Query retry
                 if (tx_timer_activate(&pStaDs->pmfSaQueryTimer) != TX_SUCCESS)