WLAN:Different short preamble capability in Beacon&Probe

send unicast probe request when AP caps change detected

1. If the Short preamble bit in beacon
is not matching with existing short preamble bit
settings(stored from probe response), then send
directed probe request frame instead of sending AP
caps changed event to SME.
2. After receiving probe response frame compare the
capabilities and if it still not matching then send
the AP caps event to SME.
3. If the capabilities in probe response are matching
with the existing settings then mark this event and
ignore all subsequent false alarms

Change-Id: If58c12e2ed8839645098a24533c943f8b348e31a
CRs-Fixed: 488403
diff --git a/CORE/MAC/src/pe/lim/limApi.c b/CORE/MAC/src/pe/lim/limApi.c
index a0ba77a..43a5359 100644
--- a/CORE/MAC/src/pe/lim/limApi.c
+++ b/CORE/MAC/src/pe/lim/limApi.c
@@ -1731,9 +1731,11 @@
 
     /* Some APs are not setting privacy bit when hidden ssid enabled.
      * So LIM was keep on sending eSIR_SME_AP_CAPS_CHANGED event to SME */
-    if (limIsNullSsid(&pBeacon->ssId) &&
+    if ((limIsNullSsid(&pBeacon->ssId) &&
             (SIR_MAC_GET_PRIVACY(apNewCaps.capabilityInfo) !=
-             SIR_MAC_GET_PRIVACY(psessionEntry->limCurrentBssCaps))
+             SIR_MAC_GET_PRIVACY(psessionEntry->limCurrentBssCaps))) ||
+            (SIR_MAC_GET_SHORT_PREAMBLE(apNewCaps.capabilityInfo) !=
+             SIR_MAC_GET_SHORT_PREAMBLE(psessionEntry->limCurrentBssCaps))
        )
     {
         /* If Hidden SSID and privacy bit is not matching with the current capability,
@@ -1746,6 +1748,7 @@
         }
         psessionEntry->fWaitForProbeRsp = true;
         limLog(pMac, LOGW, FL("Hidden SSID and privacy bit is not matching,"
+                    " Or Short preamble bit is not matching ,"
                     "sending directed probe request.. "));
         status = limSendProbeReqMgmtFrame(pMac, &psessionEntry->ssId, psessionEntry->bssId,
                 psessionEntry->currentOperChannel,psessionEntry->selfMacAddr,
@@ -1764,10 +1767,13 @@
          * or probe response frame */
         if (psessionEntry->fWaitForProbeRsp == true)
         {
-            if (((!limIsNullSsid(&pBeacon->ssId)) &&
+            if ((((!limIsNullSsid(&pBeacon->ssId)) &&
                         (limCmpSSid(pMac, &pBeacon->ssId, psessionEntry) == true)) &&
                     (SIR_MAC_GET_PRIVACY(apNewCaps.capabilityInfo) ==
-                     SIR_MAC_GET_PRIVACY(psessionEntry->limCurrentBssCaps)))
+                     SIR_MAC_GET_PRIVACY(psessionEntry->limCurrentBssCaps))) &&
+                    (SIR_MAC_GET_SHORT_PREAMBLE(apNewCaps.capabilityInfo) ==
+                     SIR_MAC_GET_SHORT_PREAMBLE(psessionEntry->limCurrentBssCaps))
+               )
             {
                 /* Only for probe response frames the control will come here */
                 /* If beacon with broadcast ssid then fWaitForProbeRsp will be false,