wlan: Prioritize connection req frames in pe queue

If there are many beacon/probe received and posted to pe queue
the connection req frames may get delayed and thus effect the
connection. This may also lead to connection failures.

To avoid this prioritize the connection req frames in pe queue.
Also ignore auth frame if same seq no frame is received after
sending assoc resp in case of SAP

Change-Id: I025701fa389000aff13d5e14b40f641e977ff640
CRs-Fixed: 2210853
diff --git a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
index 3112f7b..894549f 100644
--- a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2015, 2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2015, 2017-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -676,11 +676,11 @@
                  * SA-Query procedure determines that the original SA is
                  * invalid.
                  */
-                if (isConnected
+                if (isConnected && pStaDs->PrevAuthSeqno != currSeqNo
 #ifdef WLAN_FEATURE_11W
                     && !pStaDs->rmfEnabled
 #endif
-                                          )
+                   )
                 {
                     limLog(pMac, LOGE,
                             FL("STA is already connected but received auth frame"
@@ -699,7 +699,7 @@
             if (pAuthNode)
             {
                 /// Pre-auth context exists for the STA
-                if (pHdr->fc.retry == 0 || pAuthNode->seqNo != currSeqNo)
+                if (pAuthNode->seqNo != currSeqNo)
                 {
                     /**
                      * STA is initiating brand-new Authentication