Merge "wlan: Prioritize the bssid_hint, if it fails try with other BSS" into wlan-driver.lnx.1.0-dev.1.0
diff --git a/CORE/MAC/src/pe/lim/limSendMessages.c b/CORE/MAC/src/pe/lim/limSendMessages.c
index 91e028b..3f064aa 100644
--- a/CORE/MAC/src/pe/lim/limSendMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendMessages.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -799,6 +799,7 @@
     tANI_U32           i;
     tANI_U32           msgSize;
     tANI_BOOLEAN       ignore_secchannel_bcn_filter = false;
+    bool filter_skipped = false;
     tpBeaconFilterIe   pIe;
     tpDphHashNode      pStaDs;
 
@@ -874,6 +875,7 @@
         {
             limLog( pMac, LOGW,
                 FL("Skip Secondary Channel bcn filter when channel is 20Mhz"));
+            filter_skipped = true;
             continue;
         }
         pIe = (tpBeaconFilterIe) ptr;
@@ -885,6 +887,9 @@
         pIe->byte.ref =  beaconFilterTable[i].byte.ref; 
         ptr += sizeof(tBeaconFilterIe);
     }
+    if (filter_skipped)
+       pBeaconFilterMsg->ieNum--;
+
     msgQ.type = WDA_BEACON_FILTER_IND;
     msgQ.reserved = 0;
     msgQ.bodyptr = pBeaconFilterMsg;
diff --git a/CORE/WDA/src/wlan_qct_wda.c b/CORE/WDA/src/wlan_qct_wda.c
index 848761a..72c508d 100644
--- a/CORE/WDA/src/wlan_qct_wda.c
+++ b/CORE/WDA/src/wlan_qct_wda.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -11812,6 +11812,7 @@
       vos_mem_free(wdiBeaconFilterInfo);
       return VOS_STATUS_E_NOMEM;
    }
+   vos_mem_zero(wdiBeaconFilterInfo, sizeof(WDI_BeaconFilterReqParamsType));
    wdiBeaconFilterInfo->wdiBeaconFilterInfo.usBeaconInterval = 
       pBeaconFilterInfo->beaconInterval;
    wdiBeaconFilterInfo->wdiBeaconFilterInfo.usCapabilityInfo =