prima: Send assoc response for duplicate assoc request frames

Few STA/P2P-client's are sending assoc req frame and waiting for
300-500ms. If they don't receive the assoc resp frame within
this time then they resending the assoc req frame. These frames
are not going to have retry bit set.

In the current design host driver is not handling these duplicate
assoc req frames without retry bit set.

To mitigate this issue, while processing assoc request frame,
if pStaDs entry already exists then send assoc response with
same tid and stop processing the assoc req further.

Change-Id: I6d67f4cd352bbee422301b832742e7386666037f
CRs-Fixed: 868736
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
index e8248b5..45c3542 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
@@ -231,14 +231,39 @@
      */
     pStaDs = dphLookupHashEntry(pMac, pHdr->sa, &peerIdx,
                              &psessionEntry->dph.dphHashTable);
-    if ((NULL != pStaDs) && (pHdr->fc.retry > 0))
+    if (NULL != pStaDs)
     {
-        limLog(pMac, LOGE,
-            FL("STA is initiating Assoc Req after ACK lost.So, do not Process"
-             "sessionid: %d sys subType=%d for role=%d from: "MAC_ADDRESS_STR),
-                psessionEntry->peSessionId, subType,
-                 psessionEntry->limSystemRole, MAC_ADDR_ARRAY(pHdr->sa));
-        return;
+        if (pHdr->fc.retry > 0)
+        {
+            /* Ignore the Retry */
+            limLog(pMac, LOGE,
+                    FL("STA is initiating Assoc Req after ACK lost. "
+                        "So, do not Process sessionid: %d sys subType=%d "
+                        "for role=%d from: "MAC_ADDRESS_STR),
+                    psessionEntry->peSessionId, subType,
+                    psessionEntry->limSystemRole,
+                    MAC_ADDR_ARRAY(pHdr->sa));
+            return;
+        }
+        else
+        {
+            /* STA might have missed the assoc response,
+             * so it is sending assoc request frame again.
+             */
+            limSendAssocRspMgmtFrame( pMac, eSIR_SUCCESS,
+                    pStaDs->assocId, pStaDs->staAddr,
+                    pStaDs->mlmStaContext.subType, pStaDs,
+                    psessionEntry);
+            limLog(pMac, LOGE,
+                    FL("DUT already received an assoc request frame "
+                        "and STA is sending another assoc req.So, do not "
+                        "Process sessionid: %d sys subType=%d for role=%d "
+                        "from: "MAC_ADDRESS_STR),
+                    psessionEntry->peSessionId, subType,
+                    psessionEntry->limSystemRole,
+                    MAC_ADDR_ARRAY(pHdr->sa));
+            return;
+        }
     }
 
     // Get pointer to Re/Association Request frame body