wlan: Send proper IEs number when sec chan bcn filter is skipped

Even if sec chan bcn filter is skipped the count of IEs sent to
firmware include it. Due to this firmware assume that one extra
IE is sent and as the value of buffer being 0 it assume the IE
to be ssid. In case of some APs with malformed beacons the FW
keeps on waking up the host assuming the SSID has change.

To fix this if sec chan bcn filter is skipped, remove it from the
total count of IEs sent.

Change-Id: I01a3298ea5d02d36339691c006fd9222c84b71f0
CRs-Fixed: 1106798
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;