prima: WLAN Driver Release 3.2.0.9
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
index 6ee945d..5754e5e 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
@@ -220,6 +220,18 @@
     limLog(pMac, LOG2, FL("Received AssocReq Frame: "));
     sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG2, (tANI_U8 *) pBody, framelen);
 
+    if( palEqualMemory( pMac->hHdd,  (tANI_U8* ) pHdr->sa, (tANI_U8 *) pHdr->da, 
+                        (tANI_U8) (sizeof(tSirMacAddr))))
+    {
+        limSendAssocRspMgmtFrame(pMac,
+                    eSIR_MAC_UNSPEC_FAILURE_STATUS,
+                    1,
+                    pHdr->sa,
+                    subType, 0,psessionEntry);
+        limLog(pMac, LOGE, FL("Rejected Assoc Req frame Since same mac as SAP/GO\n"));
+        return ;
+    }
+
 #ifdef WLAN_SOFTAP_FEATURE
     // If TKIP counter measures active send Assoc Rsp frame to station with eSIR_MAC_MIC_FAILURE_REASON
     if ((psessionEntry->bTkipCntrMeasActive) && (psessionEntry->limSystemRole == eLIM_AP_ROLE))
@@ -601,7 +613,7 @@
 
     // Check for 802.11n HT caps compatibility; are HT Capabilities
     // turned on in lim?
-    if ( psessionEntry->htCapabality )
+    if ( psessionEntry->htCapability )
     {
         // There are; are they turned on in the STA?
         if ( pAssocReq->HTCaps.present )
@@ -870,6 +882,7 @@
             }
             limPrintMacAddr(pMac, pHdr->sa, LOG1);
             limPrintMlmState(pMac, LOG1, (tLimMlmStates) pStaDs->mlmStaContext.mlmState);
+
             goto error;
         } // if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE)
 
@@ -1012,6 +1025,9 @@
     psessionEntry->parsedAssocReq[pStaDs->assocId] = pAssocReq;
 
     pStaDs->mlmStaContext.htCapability = pAssocReq->HTCaps.present;
+#ifdef WLAN_FEATURE_11AC
+    pStaDs->mlmStaContext.vhtCapability = pAssocReq->VHTCaps.present;
+#endif
     pStaDs->qos.addtsPresent = (pAssocReq->addtsPresent==0) ? false : true;
     pStaDs->qos.addts        = pAssocReq->addtsReq;
     pStaDs->qos.capability   = pAssocReq->qosCapability;
@@ -1067,10 +1083,30 @@
         pStaDs->htShortGI20Mhz = (tANI_U8)pAssocReq->HTCaps.shortGI20MHz;
         pStaDs->htShortGI40Mhz = (tANI_U8)pAssocReq->HTCaps.shortGI40MHz;
         pStaDs->htSupportedChannelWidthSet = (tANI_U8)pAssocReq->HTCaps.supportedChannelWidthSet;
+        /* peer just follows AP; so when we are softAP/GO, we just store our session entry's secondary channel offset here in peer INFRA STA
+         * However, if peer's 40MHz channel width support is disabled then secondary channel will be zero
+         */
+        pStaDs->htSecondaryChannelOffset = (pStaDs->htSupportedChannelWidthSet)?psessionEntry->htSecondaryChannelOffset:0;
+#ifdef WLAN_FEATURE_11AC
+        if (pAssocReq->VHTCaps.present)
+        {
+            pStaDs->vhtSupportedChannelWidthSet = (tANI_U8)pAssocReq->VHTCaps.supportedChannelWidthSet; 
+        }
+#endif
         pStaDs->baPolicyFlag = 0xFF;
     }
 
 
+#ifdef WLAN_FEATURE_11AC
+if (limPopulateMatchingRateSet(pMac,
+                               pStaDs,
+                               &(pAssocReq->supportedRates),
+                               &(pAssocReq->extendedRates),
+                               pAssocReq->HTCaps.supportedMCSSet,
+                               &(pAssocReq->propIEinfo.propRates),
+                               psessionEntry , &pAssocReq->VHTCaps) 
+                               != eSIR_SUCCESS)
+#else
 
     if (limPopulateMatchingRateSet(pMac,
                                    pStaDs,
@@ -1078,6 +1114,7 @@
                                    &(pAssocReq->extendedRates),
                                    pAssocReq->HTCaps.supportedMCSSet,
                                    &(pAssocReq->propIEinfo.propRates), psessionEntry) != eSIR_SUCCESS)
+#endif
     {
         // Could not update hash table entry at DPH with rateset
         limLog(pMac, LOGE,
@@ -1262,8 +1299,11 @@
         }
     }
 
-    if(pStaDs!= NULL)
+    /* If it is not duplicate Assoc request then only make to Null */
+    if ((pStaDs != NULL) &&
+          (pStaDs->mlmStaContext.mlmState != eLIM_MLM_WT_ADD_STA_RSP_STATE))
         psessionEntry->parsedAssocReq[pStaDs->assocId] = NULL;
+
     return;
 
 } /*** end limProcessAssocReqFrame() ***/
@@ -1396,10 +1436,6 @@
                            pAssocReq->rsn.length);
         }
 
-        //FIXME: we need to have the cb information seprated between HT and Titan later. 
-        if(pAssocReq->HTCaps.present)
-            limGetHtCbAdminState(pMac, pAssocReq->HTCaps, &pMlmAssocInd->titanHtCaps);
-
         // Fill in 802.11h related info
         if (pAssocReq->powerCapabilityPresent && pAssocReq->supportedChannelsPresent)
         {
@@ -1554,9 +1590,6 @@
             palCopyMemory( pMac->hHdd, &pMlmReassocInd->rsnIE.rsnIEdata[2], pAssocReq->rsn.info, pAssocReq->rsn.length);
         }
 
-        if(pAssocReq->HTCaps.present)
-              limGetHtCbAdminState(pMac, pAssocReq->HTCaps,  &pMlmReassocInd->titanHtCaps );
-
         // 802.11h support
         if (pAssocReq->powerCapabilityPresent && pAssocReq->supportedChannelsPresent)
         {