prima: WLAN Driver Release 3.2.0.9
diff --git a/CORE/DXE/src/wlan_qct_dxe.c b/CORE/DXE/src/wlan_qct_dxe.c
index 2482c86..c12e22d 100644
--- a/CORE/DXE/src/wlan_qct_dxe.c
+++ b/CORE/DXE/src/wlan_qct_dxe.c
@@ -77,6 +77,7 @@
 #define T_WLANDXE_TX_INT_ENABLE_FCOUNT     1
 #define T_WLANDXE_MEMDUMP_BYTE_PER_LINE    16
 #define T_WLANDXE_MAX_RX_PACKET_WAIT       6000
+#define WLANDXE_MAX_REAPED_RX_FRAMES       512
 
 /* This is temporary fot the compile
  * WDI will release official version
@@ -100,7 +101,7 @@
       "H2H_TEST_RX"
 #endif /* WLANDXE_TEST_CHANNEL_ENABLE */
    };
-
+static  wpt_packet               *rx_reaped_buf[WLANDXE_MAX_REAPED_RX_FRAMES];
 
 /*-------------------------------------------------------------------------
   *  External Function Proto Type
@@ -119,7 +120,6 @@
 /*-------------------------------------------------------------------------
   *  Local Function
   *-------------------------------------------------------------------------*/
-#ifdef WLANDXE_DEBUG_CH_INFO_DUMP
 /*==========================================================================
   @  Function Name 
       dxeChannelMonitor
@@ -142,28 +142,43 @@
 {
    wpt_status                status = eWLAN_PAL_STATUS_SUCCESS;
 
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   if((NULL == monitorDescription) || (NULL == channelEntry))
+   {
+      HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
+               "INVALID Input ARG");
+      return eWLAN_PAL_STATUS_E_INVAL;
+   }
+
+   if(channelEntry->channelType > WDTS_CHANNEL_RX_HIGH_PRI)
+   {
+      HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
+               "INVALID Channel type");
+      return eWLAN_PAL_STATUS_E_INVAL;
+   }
+
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "=== %s Channel Number %d, Channel Type %s",
             monitorDescription, channelEntry->assignedDMAChannel, channelType[channelEntry->channelType]);
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW, 
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL, 
             "numDesc %d, numFreeDesc %d, numResvDesc %d",
                    channelEntry->numDesc, channelEntry->numFreeDesc, channelEntry->numRsvdDesc);
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "headCB 0x%x, next 0x%x,  DESC 0x%x",
                    channelEntry->headCtrlBlk, channelEntry->headCtrlBlk->nextCtrlBlk, channelEntry->headCtrlBlk->linkedDescPhyAddr);
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "tailCB 0x%x, next 0x%x,  DESC 0x%x",
                    channelEntry->tailCtrlBlk, channelEntry->tailCtrlBlk->nextCtrlBlk, channelEntry->tailCtrlBlk->linkedDescPhyAddr);
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "headCB Order %d, tailCB Order %d",
             channelEntry->headCtrlBlk->ctrlBlkOrder, channelEntry->tailCtrlBlk->ctrlBlkOrder);
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "numFragmentCurrentChain %d, numTotalFrame %d ===",
             channelEntry->numFragmentCurrentChain,    channelEntry->numTotalFrame);
 
    return status;
 }
 
+#ifdef WLANDXE_DEBUG_MEMORY_DUMP
 /*==========================================================================
   @  Function Name 
       dxeMemoryDump
@@ -189,6 +204,12 @@
    wpt_uint32                numBytes    = 0;
    wpt_uint32                idx;
 
+   if((NULL == dumpPointer) ||
+      (NULL == dumpTarget))
+   {
+      return status;
+   }
+
    HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
             "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
    HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
@@ -213,6 +234,7 @@
 
    return status;
 }
+#endif /* WLANDXE_DEBUG_MEMORY_DUMP */
 
 /*==========================================================================
   @  Function Name 
@@ -238,24 +260,23 @@
    wpt_status                status      = eWLAN_PAL_STATUS_SUCCESS;
 
 
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
-            "Descriptor Dump for channel %s, %d / %d fragment",
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
+            "Descriptor Dump for channel %s, order %d",
                    channelType[channelEntry->channelType],
-                   fragmentOrder + 1,
-                   channelEntry->numFragmentCurrentChain);
+                   fragmentOrder);
 
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "CTRL WORD 0x%x, TransferSize %d",
                    WLANDXE_U32_SWAP_ENDIAN(targetDesc->descCtrl.ctrl),
             WLANDXE_U32_SWAP_ENDIAN(targetDesc->xfrSize));
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "SRC ADD 0x%x, DST ADD 0x%x, NEXT DESC 0x%x",
                    WLANDXE_U32_SWAP_ENDIAN(targetDesc->dxedesc.dxe_short_desc.srcMemAddrL),
                    WLANDXE_U32_SWAP_ENDIAN(targetDesc->dxedesc.dxe_short_desc.dstMemAddrL),
                    WLANDXE_U32_SWAP_ENDIAN(targetDesc->dxedesc.dxe_short_desc.phyNextL));
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
 
    return status;
@@ -284,39 +305,76 @@
    wpt_status                status      = eWLAN_PAL_STATUS_SUCCESS;
    wpt_uint32                regValue    = 0;
 
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "%s Channel register dump for %s, base address 0x%x", 
                    channelType[channelEntry->channelType],
                    dumpTarget,
                    channelEntry->channelRegister.chDXEBaseAddr);
    regValue = 0;
    wpalReadRegister(channelEntry->channelRegister.chDXECtrlRegAddr, &regValue);
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "Control Register 0x%x", regValue);
 
    regValue = 0;
    wpalReadRegister(channelEntry->channelRegister.chDXEStatusRegAddr, &regValue);
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "Status Register 0x%x", regValue);
    regValue = 0;
 
    wpalReadRegister(channelEntry->channelRegister.chDXESadrlRegAddr, &regValue);
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "Source Address Register 0x%x", regValue);
    regValue = 0;
 
    wpalReadRegister(channelEntry->channelRegister.chDXEDadrlRegAddr, &regValue);
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "Destination Address Register 0x%x", regValue);
    regValue = 0;
 
    wpalReadRegister(channelEntry->channelRegister.chDXELstDesclRegAddr, &regValue);
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
             "Descriptor Address Register 0x%x", regValue);
 
    return status;
 }
-#endif /* WLANDXE_DEBUG_CH_INFO_DUMP */
+
+/*==========================================================================
+  @  Function Name 
+      dxeChannelAllDescDump
+
+  @  Description 
+      Dump all DXE descriptors within assigned channe;
+
+  @  Parameters
+      WLANDXE_ChannelCBType   *channelEntry
+
+  @  Return
+      NONE
+
+===========================================================================*/
+void dxeChannelAllDescDump
+(
+   WLANDXE_ChannelCBType   *channelEntry
+)
+{
+   wpt_uint32               channelLoop;
+   WLANDXE_DescCtrlBlkType *targetCtrlBlk;
+
+   targetCtrlBlk = channelEntry->headCtrlBlk;
+
+   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
+            "%s %d descriptor chains",
+                    channelType[channelEntry->channelType], (int)channelEntry->numDesc);
+   for(channelLoop = 0; channelLoop < channelEntry->numDesc; channelLoop++)
+   {
+      HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
+               "%5d : 0x%x", (int)targetCtrlBlk->ctrlBlkOrder,
+                                    (unsigned int)targetCtrlBlk->linkedDesc->descCtrl.ctrl);
+      targetCtrlBlk = (WLANDXE_DescCtrlBlkType *)targetCtrlBlk->nextCtrlBlk;
+   }
+
+   return;
+}
 
 /*==========================================================================
   @  Function Name 
@@ -1183,6 +1241,45 @@
       return eWLAN_PAL_STATUS_E_FAULT;         
    }
 
+   /* Clean up Error INT Bit */
+   if(WLANDXE_CH_STAT_INT_ERR_MASK & *chStat)
+   {
+      status = wpalWriteRegister(WLANDXE_INT_ERR_CLR_ADDRESS,
+                                      (1 << channelEntry->assignedDMAChannel));
+      if(eWLAN_PAL_STATUS_SUCCESS != status)
+      {
+         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                  "dxeChannelCleanInt Read CH STAT register fail");
+         return eWLAN_PAL_STATUS_E_FAULT;         
+      }
+   }
+
+   /* Clean up DONE INT Bit */
+   if(WLANDXE_CH_STAT_INT_DONE_MASK & *chStat)
+   {
+      status = wpalWriteRegister(WLANDXE_INT_DONE_CLR_ADDRESS,
+                                      (1 << channelEntry->assignedDMAChannel));
+      if(eWLAN_PAL_STATUS_SUCCESS != status)
+      {
+         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                  "dxeChannelCleanInt Read CH STAT register fail");
+         return eWLAN_PAL_STATUS_E_FAULT;         
+      }
+   }
+
+   /* Clean up ED INT Bit */
+   if(WLANDXE_CH_STAT_INT_ED_MASK & *chStat)
+   {
+      status = wpalWriteRegister(WLANDXE_INT_ED_CLR_ADDRESS,
+                                      (1 << channelEntry->assignedDMAChannel));
+      if(eWLAN_PAL_STATUS_SUCCESS != status)
+      {
+         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                  "dxeChannelCleanInt Read CH STAT register fail");
+         return eWLAN_PAL_STATUS_E_FAULT;         
+      }
+   }
+
    HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
             "%s Exit", __FUNCTION__);
    return status;
@@ -1299,16 +1396,6 @@
    void                     *physAddress            = NULL;
 #endif /* FEATURE_R33D */
 
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
-            "%s Enter", __FUNCTION__);
-
-   /* Sanity Check */
-   if((NULL == dxeCtxt) || (NULL == channelEntry) || (NULL == currentCtrlBlock))
-   {
-      HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
-               "dxeChannelInitProgram Channel Entry is not valid");
-      return eWLAN_PAL_STATUS_E_INVAL;
-   }
 
    currentDesc            = currentCtrlBlock->linkedDesc;
 
@@ -1336,8 +1423,6 @@
    
    if(NULL == currentPalPacketBuffer)
    {
-      HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_WARN,
-               "!!! RX PAL Packet Alloc Fail, packet will be queued when the callback is invoked !!!");
       return eWLAN_PAL_STATUS_E_RESOURCES;
    }
 
@@ -1399,8 +1484,6 @@
    currentDesc->dxedesc.dxe_short_desc.dstMemAddrL =
                                        WLANDXE_U32_SWAP_ENDIAN((wpt_uint32)currentPalPacketBuffer->pBDPhys);
 
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
-            "%s Exit", __FUNCTION__);
    return status;
 }
 
@@ -1475,6 +1558,113 @@
 }
 
 /*==========================================================================
+  @  Function Name
+      dxeRXFrameRouteUpperLayer
+
+  @  Description 
+      Test DXE descriptors and if any RX frame pending within RING,
+      Route to upper layer
+
+  @  Parameters
+      WLANDXE_CtrlBlkType     *dxeCtrlBlk,
+                               DXE host driver main control block
+      WLANDXE_ChannelCBType   *channelEntry
+                               Channel specific control block
+  @  Return
+      -1 Any error happen
+      0  No frame pulled from RX RING
+      int number of RX frames pulled from RX ring
+
+===========================================================================*/
+static wpt_int32 dxeRXFrameRouteUpperLayer
+(
+   WLANDXE_CtrlBlkType     *dxeCtxt,
+   WLANDXE_ChannelCBType   *channelEntry
+)
+{
+   wpt_status                status = eWLAN_PAL_STATUS_SUCCESS;
+   WLANDXE_DescCtrlBlkType  *currentCtrlBlk = NULL;
+   WLANDXE_DescType         *currentDesc    = NULL;
+   wpt_uint32                descCtrl, frameCount = 0, i;
+
+   currentCtrlBlk = channelEntry->headCtrlBlk;
+   currentDesc    = currentCtrlBlk->linkedDesc;
+
+   /* Descriptoe should be SWAPPED ???? */
+   descCtrl = currentDesc->descCtrl.ctrl;
+
+   /* Get frames while VALID bit is not set (DMA complete) and a data 
+    * associated with it */
+   while(!(WLANDXE_U32_SWAP_ENDIAN(descCtrl) & WLANDXE_DESC_CTRL_VALID) &&
+         (eWLAN_PAL_STATUS_SUCCESS == wpalIsPacketLocked(currentCtrlBlk->xfrFrame)) &&
+         (currentCtrlBlk->xfrFrame->pInternalData != NULL) &&
+         (frameCount < WLANDXE_MAX_REAPED_RX_FRAMES) )
+   {
+      channelEntry->numTotalFrame++;
+      channelEntry->numFreeDesc++;
+#ifdef FEATURE_R33D
+      /* Transfer Size should be */
+      currentDesc->xfrSize = WLANDXE_U32_SWAP_ENDIAN(WLANDXE_DEFAULT_RX_OS_BUFFER_SIZE);
+      status = wpalPrepareRxFrame(&currentCtrlBlk->xfrFrame,
+                                       (wpt_uint32)currentCtrlBlk->xfrFrame->pBDPhys,
+                                       currentCtrlBlk->shadowBufferVa,
+                                       WLANDXE_DEFAULT_RX_OS_BUFFER_SIZE);
+      if(eWLAN_PAL_STATUS_SUCCESS != status)
+      {
+         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                  "dxeRXFrameReady Prepare RX Frame fail");
+         return -1;
+      }
+      status = wpalFreeRxFrame(currentCtrlBlk->shadowBufferVa);
+      if(eWLAN_PAL_STATUS_SUCCESS != status)
+      {
+         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                  "dxeRXFrameReady Free Shadow RX Frame fail");
+         return -1;
+      }
+
+#else /* FEATURE_R33D */
+      status = wpalUnlockPacket(currentCtrlBlk->xfrFrame);
+      if (eWLAN_PAL_STATUS_SUCCESS != status)
+      {
+         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                  "dxeRXFrameReady unable to unlock packet");
+         return -1;
+      }
+#endif /* FEATURE_R33D */
+      /* This Descriptor is valid, so linked Control block is also valid
+       * Linked Control block has pre allocated packet buffer
+       * So, just let upper layer knows preallocated frame pointer will be OK */
+      /* Reap Rx frames */ 
+      rx_reaped_buf[frameCount] = currentCtrlBlk->xfrFrame;
+      frameCount++;
+
+      /* Now try to refill the ring with empty Rx buffers to keep DXE busy */
+      dxeRXFrameRefillRing(dxeCtxt,channelEntry);
+
+      /* Test next contorl block
+       * if valid, this control block also has new RX frame must be handled */
+      currentCtrlBlk = (WLANDXE_DescCtrlBlkType *)currentCtrlBlk->nextCtrlBlk;
+      currentDesc    = currentCtrlBlk->linkedDesc;
+      descCtrl       = currentDesc->descCtrl.ctrl;
+   }
+
+   /* Update head control block
+    * current control block's valid bit was 0
+    * next trial first control block must be current control block */
+   channelEntry->headCtrlBlk = currentCtrlBlk;
+
+   /* Deliver all the reaped RX frames to upper layers */
+   i = 0;
+   while(i < frameCount) {
+      dxeCtxt->rxReadyCB(dxeCtxt->clientCtxt, rx_reaped_buf[i], channelEntry->channelType);
+      i++;
+   }
+
+   return frameCount;
+}
+
+/*==========================================================================
   @  Function Name 
       dxeRXFrameReady
 
@@ -1503,7 +1693,10 @@
    WLANDXE_DescCtrlBlkType  *currentCtrlBlk = NULL;
    WLANDXE_DescType         *currentDesc    = NULL;
    wpt_uint32                descCtrl;
-   wpt_uint32                frameCount = 0;
+   wpt_int32                 frameCount = 0;
+
+   wpt_uint32                descLoop;
+   wpt_uint32                invalidatedFound = 0;
 
    HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
             "%s Enter", __FUNCTION__);
@@ -1516,79 +1709,89 @@
       return eWLAN_PAL_STATUS_E_INVAL;
    }
 
-   currentCtrlBlk = channelEntry->headCtrlBlk;
-   currentDesc    = currentCtrlBlk->linkedDesc;
+   frameCount = dxeRXFrameRouteUpperLayer(dxeCtxt, channelEntry);
 
-   /* Descriptoe should be SWAPPED ???? */
-   descCtrl = currentDesc->descCtrl.ctrl;
-
-   /* Get frames while VALID bit is not set (DMA complete) and a data 
-    * associated with it */
-   while(!(WLANDXE_U32_SWAP_ENDIAN(descCtrl) & WLANDXE_DESC_CTRL_VALID) &&
-         (eWLAN_PAL_STATUS_SUCCESS == wpalIsPacketLocked(currentCtrlBlk->xfrFrame)))
-   {
-      channelEntry->numTotalFrame++;
-      channelEntry->numFreeDesc++;
-#ifdef FEATURE_R33D
-      /* Transfer Size should be */
-      currentDesc->xfrSize = WLANDXE_U32_SWAP_ENDIAN(WLANDXE_DEFAULT_RX_OS_BUFFER_SIZE);
-      status = wpalPrepareRxFrame(&currentCtrlBlk->xfrFrame,
-                                       (wpt_uint32)currentCtrlBlk->xfrFrame->pBDPhys,
-                                       currentCtrlBlk->shadowBufferVa,
-                                       WLANDXE_DEFAULT_RX_OS_BUFFER_SIZE);
-      if(eWLAN_PAL_STATUS_SUCCESS != status)
+   if(0 > frameCount)
       {
          HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
-                  "dxeRXFrameReady Prepare RX Frame fail");
-         return status;
-      }
-      status = wpalFreeRxFrame(currentCtrlBlk->shadowBufferVa);
-      if(eWLAN_PAL_STATUS_SUCCESS != status)
-      {
-         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
-                  "dxeRXFrameReady Free Shadow RX Frame fail");
-         return status;
-      }
-
-#else /* FEATURE_R33D */
-      status = wpalUnlockPacket(currentCtrlBlk->xfrFrame);
-      if (eWLAN_PAL_STATUS_SUCCESS != status)
-      {
-         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
-                  "dxeRXFrameReady unable to unlock packet");
-         return status;
-      }
-#endif /* FEATURE_R33D */
-      if(NULL == dxeCtxt->rxReadyCB)
-      {
-         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
-                  "dxeRXFrameReady rxReadyCB function is not registered");
+               "dxeRXFrameReady RX frame route fail");
          return eWLAN_PAL_STATUS_E_INVAL;
       }
-      /* This Descriptor is valid, so linked Control block is also valid
-       * Linked Control block has pre allocated packet buffer
-       * So, just let upper layer knows preallocated frame pointer will be OK */
-      frameCount++;
-      dxeCtxt->rxReadyCB(dxeCtxt->clientCtxt,
-                         currentCtrlBlk->xfrFrame,
-                         channelEntry->channelType);
 
-      /* Now try to refill the ring with empty Rx buffers to keep DXE busy */
-      dxeRXFrameRefillRing(dxeCtxt,channelEntry);
-
-      /* Test next contorl block
-       * if valid, this control block also has new RX frame must be handled */
-      currentCtrlBlk = (WLANDXE_DescCtrlBlkType *)currentCtrlBlk->nextCtrlBlk;
+  if((0 == frameCount) &&
+      ((WLANDXE_POWER_STATE_BMPS == dxeCtxt->hostPowerState) ||
+       (WLANDXE_POWER_STATE_FULL == dxeCtxt->hostPowerState)))
+   {
+      currentCtrlBlk = channelEntry->headCtrlBlk;
       currentDesc    = currentCtrlBlk->linkedDesc;
       descCtrl       = currentDesc->descCtrl.ctrl;
+
+      if(WLANDXE_POWER_STATE_BMPS != dxeCtxt->hostPowerState)
+      {
+          HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
+                   "RX ISR called but no frame handled PWS %d, channel %s",
+                   (int)dxeCtxt->hostPowerState,
+                   channelType[channelEntry->channelType]);
+      }
+
+      /* Current interupt empty and previous interrupt also empty
+       * detected successive empty interrupt
+       * or first interrupt empty, this should not happen */
+      if(0 == channelEntry->numFragmentCurrentChain)
+      {
+         dxeChannelMonitor("RX Ready", channelEntry);
+         dxeDescriptorDump(channelEntry, channelEntry->headCtrlBlk->linkedDesc, 0);
+         dxeChannelRegisterDump(channelEntry, "RX successive empty interrupt");
+         dxeChannelAllDescDump(channelEntry);
+
+         /* Abnormal interrupt detected, try to find not validated descriptor */
+         for(descLoop = 0; descLoop < channelEntry->numDesc; descLoop++)
+         {
+            if(!(WLANDXE_U32_SWAP_ENDIAN(descCtrl) & WLANDXE_DESC_CTRL_VALID))
+            {
+               HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                        "Found Invalidated Descriptor %d", (int)descLoop);
+               if(eWLAN_PAL_STATUS_SUCCESS == wpalIsPacketLocked(currentCtrlBlk->xfrFrame))
+               {
+                  HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                           "Packet locked, Resync Host and HW");
+                  channelEntry->headCtrlBlk = currentCtrlBlk;
+                  invalidatedFound = 1;
+                  break;
+               }
+               else
+               {
+                  HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                           "Packet Not Locked, cannot transfer frame");
+               }
+            }
+            currentCtrlBlk = (WLANDXE_DescCtrlBlkType *)currentCtrlBlk->nextCtrlBlk;
+            currentDesc    = currentCtrlBlk->linkedDesc;
+            descCtrl       = currentDesc->descCtrl.ctrl;
+         }
+
+         if(invalidatedFound)
+         {
+            HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                     "Found New Sync location with HW, handle frames from there");
+            frameCount = dxeRXFrameRouteUpperLayer(dxeCtxt, channelEntry);
+            HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                     "re-sync routed %d frames to upper layer", (int)frameCount);
+            frameCount = 0;
+         }
+         else
+         {
+            HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                     "Could not found invalidated descriptor");
+            HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                     "RX successive empty interrupt, Could not find invalidated DESC reload driver");
+            dxeCtxt->driverReloadInProcessing = eWLAN_PAL_TRUE;
+            wpalWlanReload();
+         }
+      }
    }
 
    channelEntry->numFragmentCurrentChain = frameCount;
-   /* Update head control block
-    * current control block's valid bit was 0
-    * next trial first control block must be current control block */
-   channelEntry->headCtrlBlk = currentCtrlBlk;
-
    HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
             "%s Exit", __FUNCTION__);
    return status;
@@ -1743,20 +1946,21 @@
    wpt_status                status     = eWLAN_PAL_STATUS_SUCCESS;
    wpt_uint32                intSrc     = 0;
    WLANDXE_ChannelCBType    *channelCb  = NULL;
-   wpt_uint32                chHighStat;
-   wpt_uint32                chLowStat;
+   wpt_uint32                chHighStat = 0;
+   wpt_uint32                chLowStat  = 0;
 
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
-            "%s Enter", __FUNCTION__);
+   dxeCtxt = (WLANDXE_CtrlBlkType *)(msgContent->pContext);
 
-   /* Sanity Check */
-   if(NULL == rxReadyMsg)
+   if(eWLAN_PAL_TRUE == dxeCtxt->driverReloadInProcessing)
    {
       HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
-               "dxeRXEventHandler Channel Entry is not valid");
-      return;
+               "RX Ready WLAN Driver re-loading in progress");
    }
 
+   /* Now try to refill the ring with empty Rx buffers to keep DXE busy */
+   dxeRXFrameRefillRing(dxeCtxt, &dxeCtxt->dxeChannel[WDTS_CHANNEL_RX_LOW_PRI]);
+   dxeRXFrameRefillRing(dxeCtxt, &dxeCtxt->dxeChannel[WDTS_CHANNEL_RX_HIGH_PRI]);
+
    dxeCtxt = (WLANDXE_CtrlBlkType *)(msgContent->pContext);
       
    if((!dxeCtxt->dxeChannel[WDTS_CHANNEL_RX_HIGH_PRI].extraConfig.chEnabled) ||
@@ -1826,7 +2030,6 @@
                   "dxeRXEventHandler INT Clean up fail");
          return;         
       }
-
       if(WLANDXE_CH_STAT_INT_ERR_MASK & chHighStat)
       {
          /* Error Happen during transaction, Handle it */
@@ -1844,6 +2047,16 @@
       }
       HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO,
                "RX HIGH CH EVNT STAT 0x%x, %d frames handled", chHighStat, channelCb->numFragmentCurrentChain);
+      /* Update the Rx DONE histogram */
+      channelCb->rxDoneHistogram = (channelCb->rxDoneHistogram << 1);
+      if(WLANDXE_CH_STAT_INT_DONE_MASK & chHighStat)
+      {
+         channelCb->rxDoneHistogram |= 1;
+      }
+      else
+      {
+         channelCb->rxDoneHistogram &= ~1;
+      }
    }
 #else
    /* Test H2H Test interrupt is enabled or not */
@@ -1885,7 +2098,7 @@
 #endif /* WLANDXE_TEST_CHANNEL_ENABLE */
 
    /* Test Low Priority Channel interrupt is enabled or not */
-   channelCb = &dxeCtxt->dxeChannel[WDTS_CHANNEL_RX_LOW_PRI];
+       channelCb = &dxeCtxt->dxeChannel[WDTS_CHANNEL_RX_LOW_PRI];
    if(intSrc & (1 << channelCb->assignedDMAChannel))
    {
       status = dxeChannelCleanInt(channelCb, &chLowStat);
@@ -1905,16 +2118,13 @@
          /* Handle RX Ready for low priority channel */
          status = dxeRXFrameReady(dxeCtxt,
                                   channelCb);
-      }
+       }
 
       /* Update the Rx DONE histogram */
       channelCb->rxDoneHistogram = (channelCb->rxDoneHistogram << 1);
       if(WLANDXE_CH_STAT_INT_DONE_MASK & chLowStat)
       {
          channelCb->rxDoneHistogram |= 1;
-         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO,
-            "DXE Channel Number %d, Rx DONE Histogram 0x%016llx",
-            channelCb->assignedDMAChannel, channelCb->rxDoneHistogram);
       }
       else
       {
@@ -2082,16 +2292,6 @@
    wpt_uint32                regValue;
 #endif /* FEATURE_R33D */
 
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
-            "%s Enter", __FUNCTION__);
-
-   /* Sanity Check */
-   if(NULL == hostCtxt)
-   {
-      HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
-               "dxeRXFrameReadyISR input is not valid");
-      return;
-   }
 
 #ifdef FEATURE_R33D
    status = wpalReadRegister(WLANDXE_INT_SRC_RAW_ADDRESS,
@@ -2134,8 +2334,6 @@
                "dxeRXFrameReadyISR interrupt serialize fail");
    }
 
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
-            "%s Exit", __FUNCTION__);
    return;
 }
 
@@ -2176,14 +2374,16 @@
 #else
    wpt_iterator                iterator;
 #endif /* FEATURE_R33D */
+    
+   wpt_uint32                  isEmpty = 0;
 
    HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
             "%s Enter", __FUNCTION__);
 
-   if(WLANDXE_POWER_STATE_BMPS == tempDxeCtrlBlk->hostPowerState)
+   if((0 == tempDxeCtrlBlk->dxeChannel[WDTS_CHANNEL_TX_LOW_PRI].numRsvdDesc) &&
+      (0 == tempDxeCtrlBlk->dxeChannel[WDTS_CHANNEL_TX_HIGH_PRI].numRsvdDesc))
    {
-      tempDxeCtrlBlk->rivaPowerState = WLANDXE_RIVA_POWER_STATE_BMPS_UNKNOWN;
-      dxeNotifySmsm(eWLAN_PAL_FALSE, eWLAN_PAL_TRUE);
+     isEmpty = 1;
    }
 
    channelEntry->numFragmentCurrentChain = 0;
@@ -2326,10 +2526,14 @@
    {
       /* Update channel head as next avaliable linked slot */
       channelEntry->headCtrlBlk = currentCtrlBlk;
-      tempDxeCtrlBlk->ringNotEmpty = eWLAN_PAL_TRUE;
-      HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW, "SMSM_ret LO=%d HI=%d", tempDxeCtrlBlk->dxeChannel[WDTS_CHANNEL_TX_LOW_PRI].numRsvdDesc,
-               tempDxeCtrlBlk->dxeChannel[WDTS_CHANNEL_TX_HIGH_PRI].numRsvdDesc );
-      dxeNotifySmsm(eWLAN_PAL_TRUE, eWLAN_PAL_FALSE);
+      
+      if( isEmpty )
+      {
+          tempDxeCtrlBlk->ringNotEmpty = eWLAN_PAL_TRUE;
+          HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW, "SMSM_ret LO=%d HI=%d", tempDxeCtrlBlk->dxeChannel[WDTS_CHANNEL_TX_LOW_PRI].numRsvdDesc,
+                   tempDxeCtrlBlk->dxeChannel[WDTS_CHANNEL_TX_HIGH_PRI].numRsvdDesc );
+          dxeNotifySmsm(eWLAN_PAL_TRUE, eWLAN_PAL_FALSE);
+      }
 	  return status;
    }
 
@@ -2559,7 +2763,7 @@
    {
       HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "dxeTXCompFrame TXCompCB is not registered");
-      return eWLAN_PAL_STATUS_E_EMPTY;
+      return eWLAN_PAL_STATUS_SUCCESS;
    }
 
    wpalMutexAcquire(&channelEntry->dxeChannelLock);
@@ -2570,7 +2774,7 @@
    if( currentCtrlBlk == channelEntry->headCtrlBlk )
    {
       wpalMutexRelease(&channelEntry->dxeChannelLock);
-      return eWLAN_PAL_STATUS_E_EMPTY;
+      return eWLAN_PAL_STATUS_SUCCESS;
    }
 
    /*  */
@@ -2695,11 +2899,38 @@
             "%s Enter", __FUNCTION__);
 
    dxeCtxt = (WLANDXE_CtrlBlkType *)(msgContent->pContext);
+   dxeCtxt->ucTxMsgCnt = 0;
+   
+   if(eWLAN_PAL_TRUE == dxeCtxt->driverReloadInProcessing)
+   {
+      HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+               "wlan: TX COMP WLAN Driver re-loading in progress");
+      return;
+   }
+
    /* Return from here if the RIVA is in IMPS, to avoid register access */
    if(WLANDXE_POWER_STATE_IMPS == dxeCtxt->hostPowerState)
    {
-      HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
-         "%s Riva is in %d, return from here ", __FUNCTION__, dxeCtxt->hostPowerState);
+      HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+               "dxeTXEventHandler TX COMP INT");
+      status = dxeTXCompFrame(dxeCtxt, &dxeCtxt->dxeChannel[WDTS_CHANNEL_TX_HIGH_PRI]);
+      if(eWLAN_PAL_STATUS_SUCCESS != status)
+      {
+         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                  "dxeTXEventHandler IMPS COMP interrupt fail");
+      }
+      if((dxeCtxt->txCompletedFrames) &&
+         (eWLAN_PAL_FALSE == dxeCtxt->txIntEnable))
+      {
+         dxeCtxt->txIntEnable =  eWLAN_PAL_TRUE; 
+         wpalEnableInterrupt(DXE_INTERRUPT_TX_COMPLE);
+         HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_WARN,
+                  "TX COMP INT Enabled, remain TX frame count on ring %d",
+                  dxeCtxt->txCompletedFrames);
+         /*Kicking the DXE after the TX Complete interrupt was enabled - to avoid 
+           the posibility of a race*/
+         dxePsComplete(dxeCtxt, eWLAN_PAL_TRUE);
+      }
       return;
    }
 
@@ -2711,8 +2942,6 @@
       return;
    }
 
-   dxeCtxt->ucTxMsgCnt = 0;   
-   
    /* Disable device interrupt */
    /* Read whole interrupt mask register and exclusive only this channel int */
    status = wpalReadRegister(WLANDXE_INT_SRC_RAW_ADDRESS,
@@ -2749,12 +2978,14 @@
          /* Handle TX complete for high priority channel */
          status = dxeTXCompFrame(dxeCtxt,
                                  channelCb);
+         bEnableISR = 1;
       }
       else if(WLANDXE_CH_STAT_INT_ED_MASK & chStat)
       {
          /* Handle TX complete for high priority channel */
          status = dxeTXCompFrame(dxeCtxt,
                                  channelCb);
+         bEnableISR = 1;
       }
       else
       {
@@ -2795,12 +3026,14 @@
          /* Handle TX complete for low priority channel */
          status = dxeTXCompFrame(dxeCtxt,
                                  channelCb);
+         bEnableISR = 1;
       }
       else if(WLANDXE_CH_STAT_INT_ED_MASK & chStat)
       {
          /* Handle TX complete for low priority channel */
          status = dxeTXCompFrame(dxeCtxt,
                                  channelCb);
+         bEnableISR = 1;
       }
       else
       {
@@ -2971,9 +3204,9 @@
             "%s Enter", __FUNCTION__);
 
    /* Return from here if the RIVA is in IMPS, to avoid register access */
-   if((WLANDXE_POWER_STATE_IMPS == dxeCtxt->hostPowerState) ||
-      (WLANDXE_POWER_STATE_DOWN == dxeCtxt->hostPowerState))
+   if(WLANDXE_POWER_STATE_DOWN == dxeCtxt->hostPowerState)
    {
+      dxeCtxt->txIntEnable = eWLAN_PAL_FALSE;
       /* Disable interrupt at here,
          IMPS or IMPS Pending state should not access RIVA register */
       status = wpalDisableInterrupt(DXE_INTERRUPT_TX_COMPLE);
@@ -3207,6 +3440,7 @@
    tempDxeCtrlBlk->dxeCookie    = WLANDXE_CTXT_COOKIE;
    tempDxeCtrlBlk->rxIntDisabledByIMPS = eWLAN_PAL_FALSE;
    tempDxeCtrlBlk->txIntDisabledByIMPS = eWLAN_PAL_FALSE;
+   tempDxeCtrlBlk->driverReloadInProcessing = eWLAN_PAL_FALSE;
 
    /* Initialize SMSM state
     * Init State is
@@ -3989,8 +4223,6 @@
    }
    pDxeCtrlBlk = (WLANDXE_CtrlBlkType *)pDXEContext;
 
-   HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_WARN,
-            "Set DXE Power state %d", powerState);
    switch(powerState)
    {
       case WDTS_POWER_STATE_FULL:
@@ -4076,6 +4308,7 @@
             if(eWLAN_PAL_TRUE == pDxeCtrlBlk->txIntDisabledByIMPS)
             {
                pDxeCtrlBlk->txIntDisabledByIMPS = eWLAN_PAL_FALSE;
+               pDxeCtrlBlk->txIntEnable =  eWLAN_PAL_TRUE;
                /* Enable RX interrupt at here, if new PS is not IMPS */
                status = wpalEnableInterrupt(DXE_INTERRUPT_TX_COMPLE);
                if(eWLAN_PAL_STATUS_SUCCESS != status)
diff --git a/CORE/DXE/src/wlan_qct_dxe_cfg_i.c b/CORE/DXE/src/wlan_qct_dxe_cfg_i.c
index 6bb0d42..398bd67 100644
--- a/CORE/DXE/src/wlan_qct_dxe_cfg_i.c
+++ b/CORE/DXE/src/wlan_qct_dxe_cfg_i.c
@@ -176,7 +176,7 @@
    WLANDXE_CHANNEL_HANDLE_CIRCULA,
 
    /* Number of Descriptor, NOT CLEAR YET !!! */
-   256,
+   512,
 
    /* MAX num RX Buffer, NOT CLEAR YET !!! */
    1,
diff --git a/CORE/DXE/src/wlan_qct_dxe_i.h b/CORE/DXE/src/wlan_qct_dxe_i.h
index aebb686..e29e18a 100644
--- a/CORE/DXE/src/wlan_qct_dxe_i.h
+++ b/CORE/DXE/src/wlan_qct_dxe_i.h
@@ -70,22 +70,31 @@
 #define WLANDXE_CTXT_COOKIE              0xC00CC111
 
 
-/* From here RIVA DXE register information
+/* From here WCNSS DXE register information
  * This is temporary definition location to make compile and unit test
  * If official msmreg.h integrated, this part will be eliminated */
 /* Start with base address */
-
+#ifdef WCN_PRONTO
+#define WLANDXE_CCU_DXE_INT_SELECT       0xfb2050dc
+#define WLANDXE_CCU_DXE_INT_SELECT_STAT  0xfb2050e0
+#define WLANDXE_CCU_ASIC_INT_ENABLE      0xfb2050e4
+#else
 #define WLANDXE_CCU_DXE_INT_SELECT       0x03200b10
 #define WLANDXE_CCU_DXE_INT_SELECT_STAT  0x03200b14
 #define WLANDXE_CCU_ASIC_INT_ENABLE      0x03200b18
+#endif
 
 #ifdef PAL_OS_TYPE_BMP
-#define WLANDXE_RIVA_BASE_ADDRESS        0xCDD00000
+#define WLANDXE_WCNSS_BASE_ADDRESS        0xCDD00000
 #else
-#define WLANDXE_RIVA_BASE_ADDRESS        0x03000000
+#ifdef WCN_PRONTO
+#define WLANDXE_WCNSS_BASE_ADDRESS        0xfb000000
+#else
+#define WLANDXE_WCNSS_BASE_ADDRESS        0x03000000
+#endif
 #endif /* PAL_OS_TYPE_BMP */
 
-#define WLANDXE_REGISTER_BASE_ADDRESS    WLANDXE_RIVA_BASE_ADDRESS + 0x202000
+#define WLANDXE_REGISTER_BASE_ADDRESS    WLANDXE_WCNSS_BASE_ADDRESS + 0x202000
 
 /* Common over the channels register addresses */
 #define WALNDEX_DMA_CSR_ADDRESS          WLANDXE_REGISTER_BASE_ADDRESS + 0x00
@@ -345,7 +354,7 @@
 #define WLANDXE_CH_STAT_INT_ED_MASK     0x00002000
 
 #define WLANDXE_CH_STAT_MASKED_MASK     0x00000008
-/* Till here RIVA DXE register information
+/* Till here WCNSS DXE register information
  * This is temporary definition location to make compile and unit test
  * If official msmreg.h integrated, this part will be eliminated */
 
@@ -605,6 +614,7 @@
    wpt_uint32                      dxeCookie;
    wpt_packet                     *freeRXPacket;
    wpt_boolean                     rxPalPacketUnavailable;
+   wpt_boolean                     driverReloadInProcessing;
 } WLANDXE_CtrlBlkType;
 
 /*==========================================================================
diff --git a/CORE/HDD/inc/qc_sap_ioctl.h b/CORE/HDD/inc/qc_sap_ioctl.h
index 1bb8b65..6efa7ad 100644
--- a/CORE/HDD/inc/qc_sap_ioctl.h
+++ b/CORE/HDD/inc/qc_sap_ioctl.h
@@ -231,6 +231,7 @@
 
 #define QCSAP_IOCTL_MODIFY_ACL          (SIOCIWFIRSTPRIV+18)
 #define QCSAP_IOCTL_GET_CHANNEL_LIST    (SIOCIWFIRSTPRIV+19)
+#define QCSAP_IOCTL_SET_TX_POWER        (SIOCIWFIRSTPRIV+20) 
 
 #define MAX_VAR_ARGS         7
 #define QCSAP_IOCTL_PRIV_GET_SOFTAP_LINK_SPEED (SIOCIWFIRSTPRIV + 31)
diff --git a/CORE/HDD/inc/wlan_hdd_assoc.h b/CORE/HDD/inc/wlan_hdd_assoc.h
index f3e73c4..d748cf3 100644
--- a/CORE/HDD/inc/wlan_hdd_assoc.h
+++ b/CORE/HDD/inc/wlan_hdd_assoc.h
@@ -39,8 +39,11 @@
    eConnectionState_IbssDisconnected,
 
    /** Participating in an IBSS network with partner stations also present*/
-   eConnectionState_IbssConnected
+   eConnectionState_IbssConnected,
 
+   /** Disconnecting in an Infrastructure network.*/
+   eConnectionState_Disconnecting
+	
 }eConnectionState;
 /**This structure stores the connection information */
 typedef struct connection_info_s
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 50a450e..554b857 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -260,12 +260,21 @@
     eHDD_DOT11_MODE_11g_ONLY,
     eHDD_DOT11_MODE_11n_ONLY,
     eHDD_DOT11_MODE_11b_ONLY,
+#ifdef WLAN_FEATURE_11AC
+    eHDD_DOT11_MODE_11ac_ONLY,
+    eHDD_DOT11_MODE_11ac,
+#endif
 }eHddDot11Mode;
 
 #define CFG_DOT11_MODE_NAME                    "gDot11Mode"
 #define CFG_DOT11_MODE_MIN                     eHDD_DOT11_MODE_AUTO
+#ifdef WLAN_FEATURE_11AC
+#define CFG_DOT11_MODE_MAX                     eHDD_DOT11_MODE_11ac
+#define CFG_DOT11_MODE_DEFAULT                 eHDD_DOT11_MODE_11ac
+#else
 #define CFG_DOT11_MODE_MAX                     eHDD_DOT11_MODE_11b_ONLY
 #define CFG_DOT11_MODE_DEFAULT                 eHDD_DOT11_MODE_11n
+#endif
 
 #define CFG_CHANNEL_BONDING_MODE_24GHZ_NAME    "gChannelBondingMode24GHz"
 #define CFG_CHANNEL_BONDING_MODE_MIN           WNI_CFG_CHANNEL_BONDING_MODE_STAMIN 
@@ -1050,6 +1059,23 @@
     eHDD_LINK_SPEED_REPORT_MAX = 1,
     eHDD_LINK_SPEED_REPORT_MAX_SCALED = 2,
 }eHddLinkSpeedReportType;
+#ifdef WLAN_FEATURE_11AC
+#define CFG_VHT_CHANNEL_WIDTH                "gVhtChannelWidth"
+#define CFG_VHT_CHANNEL_WIDTH_MIN            ( 0 )
+#define CFG_VHT_CHANNEL_WIDTH_MAX            ( 2 )
+#define CFG_VHT_CHANNEL_WIDTH_DEFAULT        ( 2 )
+
+#define CFG_VHT_ENABLE_RX_MCS_8_9               "gVhtRxMCS"
+#define CFG_VHT_ENABLE_RX_MCS_8_9_MIN           ( 0 )
+#define CFG_VHT_ENABLE_RX_MCS_8_9_MAX           ( 2 )
+#define CFG_VHT_ENABLE_RX_MCS_8_9_DEFAULT       ( 0 )
+
+#define CFG_VHT_ENABLE_TX_MCS_8_9               "gVhtTxMCS"
+#define CFG_VHT_ENABLE_TX_MCS_8_9_MIN           ( 0 )
+#define CFG_VHT_ENABLE_TX_MCS_8_9_MAX           ( 2 )
+#define CFG_VHT_ENABLE_TX_MCS_8_9_DEFAULT       ( 0 )
+
+#endif
 
 #define CFG_REPORT_MAX_LINK_SPEED                  "gReportMaxLinkSpeed"
 #define CFG_REPORT_MAX_LINK_SPEED_MIN              ( eHDD_LINK_SPEED_REPORT_ACTUAL )
@@ -1146,6 +1172,40 @@
 #define CFG_ENABLE_DYNAMIC_DTIM_MAX        ( 5 )
 #define CFG_ENABLE_DYNAMIC_DTIM_DEFAULT    ( 0 )
 
+/*
+ * Enable First Scan 2G Only
+ * Options
+ * 0 - Disable First Scan 2G Option
+ * 1 - Enable First Scan 2G Option
+ */
+#define CFG_ENABLE_FIRST_SCAN_2G_ONLY_NAME            "gEnableFirstScan2GOnly"
+#define CFG_ENABLE_FIRST_SCAN_2G_ONLY_MIN        ( 0 )
+#define CFG_ENABLE_FIRST_SCAN_2G_ONLY_MAX        ( 1 )
+#define CFG_ENABLE_FIRST_SCAN_2G_ONLY_DEFAULT    ( 0 )
+
+/*
+ * Skip DFS Channel in case of P2P Search
+ * Options
+ * 0 - Don't Skip DFS Channel in case of P2P Search
+ * 1 - Skip DFS Channel in case of P2P Search
+ */
+#define CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_NAME       "gSkipDfsChannelInP2pSearch"
+#define CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_MIN        ( 0 )
+#define CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_MAX        ( 1 )
+#define CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_DEFAULT    ( 0 )
+
+/*
+ * Ignore Dynamic Dtim in case of P2P
+ * Options
+ * 0 - Consider Dynamic Dtim incase of P2P
+ * 1 - Ignore Dynamic Dtim incase of P2P
+ */
+#define CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_NAME       "gIgnoreDynamicDtimInP2pMode"
+#define CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_MIN        ( 0 )
+#define CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_MAX        ( 1 )
+#define CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_DEFAULT    ( 0 )
+
+
 #define CFG_ENABLE_AUTOMATIC_TX_POWER_CONTROL_NAME  "gEnableAutomaticTxPowerControl"
 #define CFG_ENABLE_AUTOMATIC_TX_POWER_CONTROL_MIN        ( 0 )
 #define CFG_ENABLE_AUTOMATIC_TX_POWER_CONTROL_MAX        ( 1 )
@@ -1461,9 +1521,16 @@
 #ifdef WLAN_FEATURE_PACKET_FILTERING
    v_BOOL_t                    isMcAddrListFilter;
 #endif
+#ifdef WLAN_FEATURE_11AC
+   v_U8_t                      vhtChannelWidth;
+   v_U8_t                      vhtRxMCS;
+   v_U8_t                      vhtTxMCS;
+#endif
    v_U8_t                      enableModulatedDTIM;
    v_U32_t                     fEnableMCAddrList;
-   
+   v_BOOL_t                    enableFirstScan2GOnly;
+   v_BOOL_t                    skipDfsChnlInP2pSearch;
+   v_BOOL_t                    ignoreDynamicDtimInP2pMode;
 } hdd_config_t;
 /*--------------------------------------------------------------------------- 
   Function declarations and documenation
diff --git a/CORE/HDD/inc/wlan_hdd_includes.h b/CORE/HDD/inc/wlan_hdd_includes.h
index 522405d..07155e3 100644
--- a/CORE/HDD/inc/wlan_hdd_includes.h
+++ b/CORE/HDD/inc/wlan_hdd_includes.h
@@ -63,5 +63,10 @@
 #include "wlan_hdd_version.h"
 #include "wlan_hdd_tx_rx.h"
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/*include for oem data req specific structures*/
+/*and function declarations*/
+#include "wlan_hdd_oemdata.h" 
+#endif
 
 #endif    // end #if !defined( HDD_INCLUDES_H__ )
diff --git a/CORE/HDD/inc/wlan_hdd_innav.h b/CORE/HDD/inc/wlan_hdd_innav.h
deleted file mode 100644
index 1e9b029..0000000
--- a/CORE/HDD/inc/wlan_hdd_innav.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- *
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
diff --git a/CORE/HDD/inc/wlan_hdd_keep_alive.h b/CORE/HDD/inc/wlan_hdd_keep_alive.h
index 910a46f..7e19833 100644
--- a/CORE/HDD/inc/wlan_hdd_keep_alive.h
+++ b/CORE/HDD/inc/wlan_hdd_keep_alive.h
@@ -49,6 +49,7 @@
     v_U8_t  hostIpv4Addr[4]; 
     v_U8_t  destIpv4Addr[4];
     v_U8_t  destMacAddr [6];
+    v_U8_t  bssIdx;
 } tKeepAliveRequest, *tpKeepAliveRequest;
 
 #endif // __WLAN_HDD_KEEP_ALIVE_H__
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index ff544e5..c333556 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -50,6 +50,9 @@
 #include <wlan_hdd_wmm.h>
 #include <wlan_hdd_cfg.h>
 #include <linux/spinlock.h>
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+#include <linux/wakelock.h>
+#endif
 #ifdef ANI_MANF_DIAG
 #include <wlan_hdd_ftm.h>
 #endif
@@ -129,6 +132,15 @@
 
 #define MAX_NO_OF_2_4_CHANNELS 14
 
+#define WLAN_HDD_PUBLIC_ACTION_FRAME 4
+#define WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET 24
+#define WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET 30
+#define WLAN_HDD_P2P_SOCIAL_CHANNELS 3
+
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+#define HDD_WAKE_LOCK_DURATION 50
+#endif
+
 typedef struct hdd_tx_rx_stats_s
 {
    // start_xmit stats
@@ -350,6 +362,7 @@
 #ifdef ANI_MANF_DIAG
    ,WLAN_HDD_FTM,
 #endif
+   WLAN_HDD_P2P_DEVICE
 }device_mode_t;
 
 typedef enum rem_on_channel_request_type
@@ -404,6 +417,25 @@
   rem_on_channel_request_type_t rem_on_chan_request;
 }hdd_remain_on_chan_ctx_t;
 
+typedef enum{
+    HDD_IDLE,
+    HDD_PD_REQ_ACK_PENDING,
+    HDD_GO_NEG_REQ_ACK_PENDING,
+    HDD_INVALID_STATE,
+}eP2PActionFrameState;
+
+typedef enum {
+    WLAN_HDD_GO_NEG_REQ,
+    WLAN_HDD_GO_NEG_RESP,
+    WLAN_HDD_GO_NEG_CNF,
+    WLAN_HDD_INVITATION_REQ,
+    WLAN_HDD_INVITATION_RESP,
+    WLAN_HDD_DEV_DIS_REQ,
+    WLAN_HDD_DEV_DIS_RESP,
+    WLAN_HDD_PROV_DIS_REQ,
+    WLAN_HDD_PROV_DIS_RESP,
+}tActionFrmType;
+
 typedef struct hdd_cfg80211_state_s 
 {
   tANI_U16 current_freq;
@@ -412,6 +444,7 @@
   size_t len;
   struct sk_buff *skb;
   hdd_remain_on_chan_ctx_t* remain_on_chan_ctx;
+  eP2PActionFrameState actionFrmState;
 }hdd_cfg80211_state_t;
 
 #endif
@@ -541,7 +574,7 @@
    v_U32_t waitScanResult;
 
 #ifdef WLAN_FEATURE_P2P
-   v_BOOL_t p2pSearch;
+  v_BOOL_t flushP2pScanResults;
 #endif
 
    /* Additional IE for scan */
@@ -599,12 +632,6 @@
    sHddMib_t  hdd_mib;
            
    tANI_U8 sessionId;
-#ifdef WLAN_FEATURE_P2P   
-   /** p2pSessionId required to open new SME session for P2P 
-    *  Device address which is different from STA MAC Address
-    */ 
-   tANI_U8 p2pSessionId;
-#endif
 
    /* Completion variable for session close */
    struct completion session_close_comp_var;
@@ -858,6 +885,22 @@
 #ifdef WLAN_FEATURE_PACKET_FILTERING
    t_multicast_add_list mc_addr_list;
 #endif
+
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+   struct wake_lock rx_wake_lock;
+#endif
+
+   /* 
+    * Framework initiated driver restarting 
+    *    hdd_reload_timer   : Restart retry timer
+    *    isRestartInProgress: Restart in progress
+    *    hdd_restart_retries: Restart retries
+    *
+    */
+   vos_timer_t hdd_restart_timer;
+   atomic_t isRestartInProgress;
+   u_int8_t hdd_restart_retries;
+   
 };
 
 
@@ -929,4 +972,5 @@
 VOS_STATUS hdd_disable_bmps_imps(hdd_context_t *pHddCtx, tANI_U8 session_type);
 
 eHalStatus hdd_smeCloseSessionCallback(void *pContext);
+VOS_STATUS wlan_hdd_restart_driver(hdd_context_t *pHddCtx);
 #endif    // end #if !defined( WLAN_HDD_MAIN_H )
diff --git a/CORE/HDD/inc/wlan_hdd_oemdata.h b/CORE/HDD/inc/wlan_hdd_oemdata.h
new file mode 100644
index 0000000..e6815d6
--- /dev/null
+++ b/CORE/HDD/inc/wlan_hdd_oemdata.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+/**===========================================================================
+  
+  \file  wlan_hdd_oemdata.h
+  
+  \brief Internal includes for the oem data
+  
+               Copyright 2008 (c) Qualcomm, Incorporated.
+               All Rights Reserved.
+               Qualcomm Confidential and Proprietary.
+  
+  ==========================================================================*/
+
+
+#ifndef __WLAN_HDD_OEM_DATA_H__
+#define __WLAN_HDD_OEM_DATA_H__
+
+#ifndef OEM_DATA_REQ_SIZE
+#define OEM_DATA_REQ_SIZE 70
+#endif
+
+#ifndef OEM_DATA_RSP_SIZE
+#define OEM_DATA_RSP_SIZE 968
+#endif
+
+struct iw_oem_data_req
+{
+    v_U8_t                  oemDataReq[OEM_DATA_REQ_SIZE];
+};
+
+int iw_set_oem_data_req(
+        struct net_device *dev,
+        struct iw_request_info *info,
+        union iwreq_data *wrqu,
+        char *extra);
+
+int iw_get_oem_data_rsp(
+        struct net_device *dev,
+        struct iw_request_info *info,
+        union iwreq_data *wrqu,
+        char *extra);
+
+struct iw_oem_data_rsp
+{
+    tANI_U8           oemDataRsp[OEM_DATA_RSP_SIZE];
+};
+
+#endif //__WLAN_HDD_OEM_DATA_H__
+
+#endif //FEATURE_OEM_DATA_SUPPORT
diff --git a/CORE/HDD/inc/wlan_hdd_p2p.h b/CORE/HDD/inc/wlan_hdd_p2p.h
index 63d47b1..ec256ff 100644
--- a/CORE/HDD/inc/wlan_hdd_p2p.h
+++ b/CORE/HDD/inc/wlan_hdd_p2p.h
@@ -33,10 +33,12 @@
 ==========================================================================*/
 #ifdef CONFIG_CFG80211
 #define ACTION_FRAME_TX_TIMEOUT 1000
-#define WAIT_CANCEL_REM_CHAN    100
-#define WAIT_REM_CHAN_READY     100
+#define WAIT_CANCEL_REM_CHAN    1000
+#define WAIT_REM_CHAN_READY     1000
 #define WAIT_CHANGE_CHANNEL_FOR_OFFCHANNEL_TX 3000
 
+#define ACTION_FRAME_DEFAULT_WAIT 200
+
 #define WLAN_HDD_GET_TYPE_FRM_FC(__fc__)         (((__fc__) & 0x0F) >> 2)
 #define WLAN_HDD_GET_SUBTYPE_FRM_FC(__fc__)      (((__fc__) & 0xF0) >> 4)
 #define WLAN_HDD_80211_FRM_DA_OFFSET             4
diff --git a/CORE/HDD/inc/wlan_hdd_packet_filtering.h b/CORE/HDD/inc/wlan_hdd_packet_filtering.h
index d42c091..f4c2109 100644
--- a/CORE/HDD/inc/wlan_hdd_packet_filtering.h
+++ b/CORE/HDD/inc/wlan_hdd_packet_filtering.h
@@ -87,6 +87,7 @@
     v_U8_t            filterId;
     v_U8_t            numParams;
     struct PacketFilterParamsCfg paramsData [HDD_MAX_CMP_PER_PACKET_FILTER];
+    v_U8_t            bssIdx;
 }tPacketFilterCfg, *tpPacketFilterCfg;
 
 #endif
diff --git a/CORE/HDD/inc/wlan_hdd_wext.h b/CORE/HDD/inc/wlan_hdd_wext.h
index 1c1399a..2e0a7ac 100644
--- a/CORE/HDD/inc/wlan_hdd_wext.h
+++ b/CORE/HDD/inc/wlan_hdd_wext.h
@@ -53,6 +53,8 @@
 #define HDD_WLAN_WMM_PARAM_MAX_SERVICE_INTERVAL        17
 #define HDD_WLAN_WMM_PARAM_COUNT                       18
 
+#define MHZ 6
+
 typedef enum
 {
    HDD_WLAN_WMM_DIRECTION_UPSTREAM      = 0,
@@ -270,6 +272,14 @@
    /**Completion Variable*/
    struct completion completion_var;
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+   /* oem data req in Progress */
+   v_BOOL_t oemDataReqInProgress;
+
+   /* oem data req ID */
+   v_U32_t oemDataReqID;
+#endif
+
 #ifdef FEATURE_WLAN_CCX
    /* CCX state variables */
    v_BOOL_t isCCXConnection;
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
index 526218c..01e53cc 100644
--- a/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
@@ -99,7 +99,7 @@
 #define BEACON_FRAME_IES_OFFSET 12
 
 #ifdef WLAN_FEATURE_PACKET_FILTERING
-extern void wlan_hdd_set_mc_addr_list(hdd_context_t *pHddCtx, v_U8_t set);
+extern void wlan_hdd_set_mc_addr_list(hdd_context_t *pHddCtx, v_U8_t set, v_U8_t sessionId);
 #endif
 
 void hdd_ResetCountryCodeAfterDisAssoc(hdd_adapter_t *pAdapter);
@@ -655,7 +655,8 @@
     netif_tx_disable(dev);
     netif_carrier_off(dev);
     
-    hdd_connSetConnectionState( pHddStaCtx, eConnectionState_NotConnected );
+    INIT_COMPLETION(pAdapter->disconnect_comp_var);
+    hdd_connSetConnectionState( pHddStaCtx, eConnectionState_Disconnecting );
     /* If only STA mode is on */
     if((pHddCtx->concurrency_mode <= 1) && (pHddCtx->no_of_sessions[WLAN_HDD_INFRA_STATION] <=1))
     {
@@ -679,7 +680,13 @@
             /* To avoid wpa_supplicant sending "HANGED" CMD to ICS UI */
             if( eCSR_ROAM_LOSTLINK == roamStatus )
             {
-                cfg80211_disconnected(dev, WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY, NULL, 0, GFP_KERNEL);
+                /* TODO: Need to pass proper reason code
+                   currently we are passing only one reason code.
+                   Currently we are passing WLAN_REASON_DISASSOC_STA_HAS_LEFT
+                   rather than WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY
+                   to avoid the supplicant fast reconnect */
+
+                cfg80211_disconnected(dev, WLAN_REASON_DISASSOC_STA_HAS_LEFT, NULL, 0, GFP_KERNEL);
             }
             else
             {
@@ -689,7 +696,11 @@
             //If the Device Mode is Station
             // and the P2P Client is Connected
             //Enable BMPS
-            if((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) &&
+
+            // In case of JB, as Change-Iface may or maynot be called for p2p0
+            // Enable BMPS/IMPS in case P2P_CLIENT disconnected   
+            if(((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
+                (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode)) &&
                 (vos_concurrent_sessions_running()))
             {
                //Enable BMPS only of other Session is P2P Client
@@ -704,8 +715,7 @@
                    {
                        //Only P2P Client is there Enable Bmps back
                        if((0 == pHddCtx->no_of_sessions[VOS_STA_SAP_MODE]) &&
-                          (0 == pHddCtx->no_of_sessions[VOS_P2P_GO_MODE]) &&
-                          (1 == pHddCtx->no_of_sessions[VOS_P2P_CLIENT_MODE]))
+                          (0 == pHddCtx->no_of_sessions[VOS_P2P_GO_MODE]))
                        {
                            hdd_enable_bmps_imps(pHddCtx);
                        }
@@ -1130,7 +1140,11 @@
         //If the Device Mode is Station
         // and the P2P Client is Connected
         //Enable BMPS
-        if((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) &&
+
+        // In case of JB, as Change-Iface may or maynot be called for p2p0
+        // Enable BMPS/IMPS in case P2P_CLIENT disconnected   
+        if(((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
+            (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode)) &&
             (vos_concurrent_sessions_running()))
         {
            //Enable BMPS only of other Session is P2P Client
@@ -1145,8 +1159,7 @@
                {
                    //Only P2P Client is there Enable Bmps back
                    if((0 == pHddCtx->no_of_sessions[VOS_STA_SAP_MODE]) &&
-                      (0 == pHddCtx->no_of_sessions[VOS_P2P_GO_MODE]) &&
-                      (1 == pHddCtx->no_of_sessions[VOS_P2P_CLIENT_MODE]))
+                      (0 == pHddCtx->no_of_sessions[VOS_P2P_GO_MODE]))
                    {
                        hdd_enable_bmps_imps(pHddCtx);
                    }
@@ -1156,18 +1169,31 @@
 
 #ifdef CONFIG_CFG80211
         /* inform association failure event to nl80211 */
-        cfg80211_connect_result(dev, pWextState->req_bssId,
+        if(eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL == roamResult)
+        {
+           cfg80211_connect_result(dev, pWextState->req_bssId,
+                NULL, 0, NULL, 0,
+                WLAN_STATUS_ASSOC_DENIED_UNSPEC, 
+                GFP_KERNEL);
+        }
+        else
+        {
+           cfg80211_connect_result(dev, pWextState->req_bssId,
                 NULL, 0, NULL, 0,
                 WLAN_STATUS_UNSPECIFIED_FAILURE, 
                 GFP_KERNEL);
+        }
 #endif 
 
         netif_tx_disable(dev);
         netif_carrier_off(dev);
-
-        /* Association failed; Reset the country code information
-         * so that it re-initialize the valid channel list*/
-        hdd_ResetCountryCodeAfterDisAssoc(pAdapter);
+        
+        if (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode)
+        {
+            /* Association failed; Reset the country code information
+             * so that it re-initialize the valid channel list*/
+            hdd_ResetCountryCodeAfterDisAssoc(pAdapter);
+        }
     }
 
     return eHAL_STATUS_SUCCESS;
@@ -1634,14 +1660,17 @@
                     {
                         /*Filter applied during suspend mode*/
                         /*Clear it here*/
-                        wlan_hdd_set_mc_addr_list(pHddCtx, FALSE);
+                        wlan_hdd_set_mc_addr_list(pHddCtx, FALSE, pAdapter->sessionId);
                     }
                 }
 #endif
-                /* Disconnected from current AP. Reset the country code information
-                 * so that it re-initialize the valid channel list*/
-                hdd_ResetCountryCodeAfterDisAssoc(pAdapter);
 
+                if (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode)
+                {
+                    /* Disconnected from current AP. Reset the country code information
+                     * so that it re-initialize the valid channel list*/
+                    hdd_ResetCountryCodeAfterDisAssoc(pAdapter);
+                }
             }
             break;
         case eCSR_ROAM_IBSS_LEAVE:
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 83e3788..9eea30f 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -1472,6 +1472,50 @@
               CFG_MC_ADDR_LIST_ENABLE_MIN,
               CFG_MC_ADDR_LIST_ENABLE_MAX ),
 
+#ifdef WLAN_FEATURE_11AC              
+REG_VARIABLE( CFG_VHT_CHANNEL_WIDTH, WLAN_PARAM_Integer,
+              hdd_config_t, vhtChannelWidth, 
+              VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK, 
+              CFG_VHT_CHANNEL_WIDTH_DEFAULT, 
+              CFG_VHT_CHANNEL_WIDTH_MIN, 
+              CFG_VHT_CHANNEL_WIDTH_MAX),
+
+REG_VARIABLE( CFG_VHT_ENABLE_RX_MCS_8_9, WLAN_PARAM_Integer,
+              hdd_config_t, vhtRxMCS, 
+              VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK, 
+              CFG_VHT_ENABLE_RX_MCS_8_9_DEFAULT, 
+              CFG_VHT_ENABLE_RX_MCS_8_9_MIN, 
+              CFG_VHT_ENABLE_RX_MCS_8_9_MAX),
+
+REG_VARIABLE( CFG_VHT_ENABLE_TX_MCS_8_9, WLAN_PARAM_Integer,
+              hdd_config_t, vhtTxMCS, 
+              VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK, 
+              CFG_VHT_ENABLE_TX_MCS_8_9_DEFAULT, 
+              CFG_VHT_ENABLE_TX_MCS_8_9_MIN, 
+              CFG_VHT_ENABLE_TX_MCS_8_9_MAX),
+#endif
+
+REG_VARIABLE( CFG_ENABLE_FIRST_SCAN_2G_ONLY_NAME, WLAN_PARAM_Integer,
+              hdd_config_t, enableFirstScan2GOnly, 
+              VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, 
+              CFG_ENABLE_FIRST_SCAN_2G_ONLY_DEFAULT, 
+              CFG_ENABLE_FIRST_SCAN_2G_ONLY_MIN, 
+              CFG_ENABLE_FIRST_SCAN_2G_ONLY_MAX ),
+
+REG_VARIABLE( CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_NAME, WLAN_PARAM_Integer,
+              hdd_config_t, skipDfsChnlInP2pSearch, 
+              VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, 
+              CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_DEFAULT, 
+              CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_MIN, 
+              CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_MAX ),
+
+REG_VARIABLE( CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_NAME, WLAN_PARAM_Integer,
+              hdd_config_t, ignoreDynamicDtimInP2pMode, 
+              VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, 
+              CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_DEFAULT, 
+              CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_MIN, 
+              CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_MAX ),
+
 };
 
 /*
@@ -1834,6 +1878,12 @@
   VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gEnableDFSChnlScan] Value = [%u] ",pHddCtx->cfg_ini->enableDFSChnlScan);
   VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gReportMaxLinkSpeed] Value = [%u] ",pHddCtx->cfg_ini->reportMaxLinkSpeed);
   VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [thermalMitigationEnable] Value = [%u] ",pHddCtx->cfg_ini->thermalMitigationEnable);
+#ifdef WLAN_FEATURE_11AC
+  VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gVhtChannelWidth] value = [%u]\n",pHddCtx->cfg_ini->vhtChannelWidth);
+#endif
+  VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [enableFirstScan2GOnly] Value = [%u] ",pHddCtx->cfg_ini->enableFirstScan2GOnly);
+  VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [skipDfsChnlInP2pSearch] Value = [%u] ",pHddCtx->cfg_ini->skipDfsChnlInP2pSearch);
+  VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [ignoreDynamicDtimInP2pMode] Value = [%u] ",pHddCtx->cfg_ini->ignoreDynamicDtimInP2pMode);
 }
 
 
@@ -2216,6 +2266,12 @@
          return eCSR_DOT11_MODE_11n_ONLY;
       case (eHDD_DOT11_MODE_11b_ONLY):
          return eCSR_DOT11_MODE_11b_ONLY;
+#ifdef WLAN_FEATURE_11AC
+      case (eHDD_DOT11_MODE_11ac_ONLY):
+         return eCSR_DOT11_MODE_11ac_ONLY;
+      case (eHDD_DOT11_MODE_11ac):
+         return eCSR_DOT11_MODE_11ac;
+#endif
       case (eHDD_DOT11_MODE_AUTO):
          return eCSR_DOT11_MODE_AUTO;
    }
@@ -2769,6 +2825,53 @@
         hddLog(LOGE, "Could not pass on WNI_CFG_ENABLE_MC_ADDR_LIST to CCM\n");
      }
 
+#ifdef WLAN_FEATURE_11AC
+   /* Based on cfg.ini, update the Basic MCS set, RX/TX MCS map in the cfg.dat */
+   /* valid values are 0(MCS0-7), 1(MCS0-8), 2(MCS0-9) */
+   /* we update only the least significant 2 bits in the corresponding fields */
+   if( (pConfig->dot11Mode == eHDD_DOT11_MODE_AUTO) ||
+       (pConfig->dot11Mode == eHDD_DOT11_MODE_11ac_ONLY) ||
+       (pConfig->dot11Mode == eHDD_DOT11_MODE_11ac) )
+   {
+       {
+           tANI_U32 temp = 0;
+
+           ccmCfgGetInt(pHddCtx->hHal, WNI_CFG_VHT_BASIC_MCS_SET, &temp);
+           temp = (temp & 0xFFFC) | pConfig->vhtRxMCS; 
+
+           if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_VHT_BASIC_MCS_SET, 
+                           temp, NULL, eANI_BOOLEAN_FALSE)
+               ==eHAL_STATUS_FAILURE)
+           {
+               fStatus = FALSE;
+               hddLog(LOGE, "Could not pass on WNI_CFG_VHT_BASIC_MCS_SET to CCM\n");
+           }
+
+           ccmCfgGetInt(pHddCtx->hHal, WNI_CFG_VHT_RX_MCS_MAP, &temp);
+           temp = (temp & 0xFFFC) | pConfig->vhtRxMCS; 
+
+           if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_VHT_RX_MCS_MAP, 
+                           temp, NULL, eANI_BOOLEAN_FALSE)
+               ==eHAL_STATUS_FAILURE)
+           {
+              fStatus = FALSE;
+              hddLog(LOGE, "Could not pass on WNI_CFG_VHT_RX_MCS_MAP to CCM\n");
+           }
+
+           ccmCfgGetInt(pHddCtx->hHal, WNI_CFG_VHT_TX_MCS_MAP, &temp);
+           temp = (temp & 0xFFFC) | pConfig->vhtTxMCS; 
+
+           if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_VHT_TX_MCS_MAP, 
+                           temp, NULL, eANI_BOOLEAN_FALSE)
+               ==eHAL_STATUS_FAILURE)
+           {
+               fStatus = FALSE;
+               hddLog(LOGE, "Could not pass on WNI_CFG_VHT_TX_MCS_MAP to CCM\n");
+           }
+       }
+   }
+#endif
+
    return fStatus;
 }
 
@@ -2839,18 +2942,13 @@
 #endif
    //Remaining config params not obtained from registry
    // On RF EVB beacon using channel 1.
-   
+#ifdef WLAN_FEATURE_11AC
+    smeConfig.csrConfig.nVhtChannelWidth = pConfig->vhtChannelWidth;
+#endif
    smeConfig.csrConfig.AdHocChannel5G            = 44; 
    smeConfig.csrConfig.ProprietaryRatesEnabled   = 0;  
    smeConfig.csrConfig.HeartbeatThresh50         = 40; 
-   if( smeConfig.csrConfig.Is11dSupportEnabled )
-   {
-      smeConfig.csrConfig.Is11hSupportEnabled    = 1;
-   }
-   else
-   {
-      smeConfig.csrConfig.Is11hSupportEnabled    = 0;
-   }
+   smeConfig.csrConfig.Is11hSupportEnabled       = 1;
    smeConfig.csrConfig.bandCapability            = pConfig->nBandCapability; 
    smeConfig.csrConfig.cbChoice                  = 0;   
    smeConfig.csrConfig.bgScanInterval            = 0; 
@@ -2858,7 +2956,8 @@
    smeConfig.csrConfig.nTxPowerCap = pConfig->nTxPowerCap;
    smeConfig.csrConfig.fEnableBypass11d          = pConfig->enableBypass11d;
    smeConfig.csrConfig.fEnableDFSChnlScan        = pConfig->enableDFSChnlScan;
-   
+   smeConfig.csrConfig.fFirstScanOnly2GChnl      = pConfig->enableFirstScan2GOnly;
+
    //FIXME 11d config is hardcoded
 #ifdef WLAN_SOFTAP_FEATURE
    if ( VOS_STA_SAP_MODE != hdd_get_conparam()){
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 6088825..ef35511 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -410,6 +410,7 @@
  */
 int wlan_hdd_cfg80211_update_band(struct wiphy *wiphy, eCsrBand eBand)
 {
+    ENTER();
     switch(eBand)
     {
         case eCSR_BAND_24:
@@ -438,6 +439,8 @@
                                hdd_config_t *pCfg
                                )
 {
+    ENTER();
+
     /* Now bind the underlying wlan device with wiphy */
     set_wiphy_dev(wiphy, dev);
 
@@ -448,7 +451,8 @@
                     | WIPHY_FLAG_CUSTOM_REGULATORY;
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
-    wiphy->flags |=   WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
+    wiphy->flags |=   WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL 
+                    | WIPHY_FLAG_OFFCHAN_TX;
 #endif
 
     wiphy->max_scan_ssids = MAX_SCAN_SSID; 
@@ -536,6 +540,8 @@
     /* Register for all P2P action, public action etc frames */
     v_U16_t type = (SIR_MAC_MGMT_FRAME << 2) | ( SIR_MAC_MGMT_ACTION << 4);
 
+    ENTER();
+
    /* Right now we are registering these frame when driver is getting
       initialized. Once we will move to 2.6.37 kernel, in which we have
       frame register ops, we will move this code as a part of that */
@@ -574,6 +580,8 @@
     /* Register for all P2P action, public action etc frames */
     v_U16_t type = (SIR_MAC_MGMT_FRAME << 2) | ( SIR_MAC_MGMT_ACTION << 4);
 
+    ENTER();
+
    /* Right now we are registering these frame when driver is getting
       initialized. Once we will move to 2.6.37 kernel, in which we have
       frame register ops, we will move this code as a part of that */
@@ -676,6 +684,7 @@
     beacon_data_t *old = NULL;
     int head_len,tail_len;
 
+    ENTER();
     if (params->head && !params->head_len)
         return -EINVAL;
 
@@ -882,6 +891,7 @@
     v_U8_t *pIe = NULL;
     v_U8_t addIE[1] = {0};
     beacon_data_t *pBeacon = pHostapdAdapter->sessionCtx.ap.beacon;
+    int ret = 0;
 
     genie = vos_mem_malloc(MAX_GENIE_LEN);
 
@@ -903,7 +913,8 @@
         else 
         {
             hddLog( VOS_TRACE_LEVEL_ERROR, "**Wps Ie Length is too big***\n");
-            return -EINVAL;
+            ret = -EINVAL;
+            goto done;
         }
         total_ielen = ielen;
     }
@@ -919,7 +930,8 @@
         }
         else {
            hddLog( VOS_TRACE_LEVEL_ERROR, "**Wps Ie + P2p Ie + Wfd Ie Length is too big***\n");
-           return -EINVAL;
+           ret = -EINVAL;
+           goto done;
         }
         total_ielen += ielen; 
     }
@@ -939,7 +951,8 @@
         {
             hddLog( VOS_TRACE_LEVEL_ERROR, 
                     "**Wps Ie+ P2pIE Length is too big***\n");
-            return -EINVAL;
+            ret = -EINVAL;
+            goto done;
         }
         total_ielen += ielen;
     }
@@ -951,7 +964,8 @@
     {
         hddLog(LOGE,
                "Could not pass on WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA to CCM");
-        return -EINVAL;
+        ret = -EINVAL;
+        goto done;
     }
 
     if (ccmCfgSetInt((WLAN_HDD_GET_CTX(pHostapdAdapter))->hHal,
@@ -962,7 +976,8 @@
     {
         hddLog(LOGE,
             "Could not pass on WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG to CCM");
-        return -EINVAL;
+        ret = -EINVAL;
+        goto done;
     }
 
     // Added for ProResp IE
@@ -1002,7 +1017,8 @@
             {
                  hddLog(LOGE,
                        "Could not pass on WNI_CFG_PROBE_RSP_ADDNIE_DATA1 to CCM");
-                 return -EINVAL;
+                 ret = -EINVAL;
+                 goto done;
             }
             rem_probe_resp_ie_len += probe_rsp_ie_len[0];
         }
@@ -1017,7 +1033,8 @@
             {
                  hddLog(LOGE,
                        "Could not pass on WNI_CFG_PROBE_RSP_ADDNIE_DATA2 to CCM");
-                 return -EINVAL;
+                 ret = -EINVAL;
+                 goto done;
             }
             rem_probe_resp_ie_len += probe_rsp_ie_len[1];
         }
@@ -1032,7 +1049,8 @@
             {
                  hddLog(LOGE,
                        "Could not pass on WNI_CFG_PROBE_RSP_ADDNIE_DATA3 to CCM");
-                 return -EINVAL;
+                 ret = -EINVAL;
+                 goto done;
             }
             rem_probe_resp_ie_len += probe_rsp_ie_len[2];
         }
@@ -1067,7 +1085,8 @@
         {
            hddLog(LOGE,
              "Could not pass on WNI_CFG_PROBE_RSP_ADDNIE_FLAG to CCM");
-           return -EINVAL;
+           ret = -EINVAL;
+           goto done;
         }
     }
     else
@@ -1090,7 +1109,8 @@
        {
             hddLog(LOGE,
                   "Could not pass on WNI_CFG_ASSOC_RSP_ADDNIE_DATA to CCM");
-            return -EINVAL;
+            ret = -EINVAL;
+            goto done;
        }
 
        if (ccmCfgSetInt((WLAN_HDD_GET_CTX(pHostapdAdapter))->hHal,
@@ -1101,7 +1121,8 @@
        {
           hddLog(LOGE,
             "Could not pass on WNI_CFG_ASSOC_RSP_ADDNIE_FLAG to CCM");
-          return -EINVAL;
+          ret = -EINVAL;
+          goto done;
        }
     }
     else
@@ -1119,6 +1140,7 @@
         }
     }
 
+done:
     vos_mem_free(genie);
     return 0;
 }
@@ -1445,6 +1467,15 @@
     }
     wlan_hdd_set_sapHwmode(pHostapdAdapter);
 
+#ifdef WLAN_FEATURE_11AC
+    if(((WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini->dot11Mode == eHDD_DOT11_MODE_AUTO) || 
+       ((WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini->dot11Mode == eHDD_DOT11_MODE_11ac) ||
+       ((WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini->dot11Mode == eHDD_DOT11_MODE_11ac_ONLY) )
+    {
+        pConfig->SapHw_mode = eSAP_DOT11_MODE_11ac;
+    }
+#endif
+
     // ht_capab is not what the name conveys,this is used for protection bitmap
     pConfig->ht_capab =
                  (WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini->apProtection;
@@ -1625,9 +1656,23 @@
 #endif
 {
     hdd_adapter_t *pAdapter =  WLAN_HDD_GET_PRIV_PTR(dev);
-    hdd_context_t *pHddCtx;
+    hdd_context_t  *pHddCtx    = NULL;
+    hdd_scaninfo_t *pScanInfo  = NULL;
+    hdd_adapter_t  *staAdapter = NULL;
     VOS_STATUS status = 0;
 
+    staAdapter = hdd_get_adapter(pAdapter->pHddCtx, WLAN_HDD_INFRA_STATION);
+
+    if (!staAdapter)
+    {
+        staAdapter = hdd_get_adapter(pAdapter->pHddCtx, WLAN_HDD_P2P_CLIENT);
+    }
+
+    if (staAdapter != NULL)
+    {
+        pScanInfo =  &staAdapter->scan_info;
+    }
+
     ENTER();
 
     if (NULL == pAdapter)
@@ -1647,6 +1692,23 @@
     hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d\n",
                               __func__,pAdapter->device_mode);
 
+    if ((pScanInfo != NULL) && pScanInfo->mScanPending)
+    {
+        INIT_COMPLETION(staAdapter->abortscan_event_var);
+        hdd_abort_mac_scan(staAdapter->pHddCtx);
+        status = wait_for_completion_interruptible_timeout(
+                           &staAdapter->abortscan_event_var,
+                           msecs_to_jiffies(WLAN_WAIT_TIME_ABORTSCAN));
+        if (!status)
+        {
+            VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
+                         "%s: Timeout occured while waiting for abortscan" ,
+                         __FUNCTION__);
+            VOS_ASSERT(pScanInfo->mScanPending);
+            return 0;
+        }
+    }
+
     if ((pAdapter->device_mode == WLAN_HDD_SOFTAP)
 #ifdef WLAN_FEATURE_P2P
      || (pAdapter->device_mode == WLAN_HDD_P2P_GO)
@@ -1892,6 +1954,7 @@
     if( (pAdapter->device_mode == WLAN_HDD_INFRA_STATION)
 #ifdef WLAN_FEATURE_P2P
       || (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)
+      || (pAdapter->device_mode == WLAN_HDD_P2P_DEVICE)
 #endif
       )
     {
@@ -1908,8 +1971,14 @@
                 hddLog(VOS_TRACE_LEVEL_INFO,
                    "%s: setting interface Type to INFRASTRUCTURE", __func__);
                 pRoamProfile->BSSType = eCSR_BSS_TYPE_INFRASTRUCTURE;
-                pRoamProfile->phyMode =
-                   hdd_cfg_xlate_to_csr_phy_mode(pConfig->dot11Mode);
+#ifdef WLAN_FEATURE_11AC
+                if(pConfig->dot11Mode == eHDD_DOT11_MODE_AUTO)
+                {
+                    pConfig->dot11Mode = eHDD_DOT11_MODE_11ac;
+                }
+#endif
+                pRoamProfile->phyMode = 
+                hdd_cfg_xlate_to_csr_phy_mode(pConfig->dot11Mode);
                 wdev->iftype = type;
 #ifdef WLAN_FEATURE_P2P
                 pAdapter->device_mode = (type == NL80211_IFTYPE_STATION) ?
@@ -2005,6 +2074,10 @@
                 status = hdd_init_station_mode( pAdapter );
                 if( VOS_STATUS_SUCCESS != status )
                     return -EOPNOTSUPP;
+                /* In case of JB, for P2P-GO, only change interface will be called,
+                 * This is the right place to enable back bmps_imps()
+                 */
+                hdd_enable_bmps_imps(pHddCtx);
                 goto done;
             case NL80211_IFTYPE_AP:
 #ifdef WLAN_FEATURE_P2P
@@ -2082,6 +2155,8 @@
     hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR( dev );
     v_MACADDR_t STAMacAddress;
 
+    ENTER();
+
     if ( (WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress )
     {
         VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
@@ -2108,6 +2183,7 @@
         }
     }
     
+    EXIT();
     return status;
 }
 
@@ -2711,6 +2787,7 @@
         }
     }
 #endif
+    EXIT();
     return status;
 }
 
@@ -3048,12 +3125,27 @@
     struct cfg80211_bss *bss_status = NULL;
     size_t frame_len = sizeof (struct ieee80211_mgmt) + ie_length;
     int rssi = 0;
+#ifdef WLAN_OPEN_SOURCE
+    struct timespec ts;
+#endif
 
     ENTER();
 
     memcpy(mgmt->bssid, bss_desc->bssId, ETH_ALEN);
+
+#ifdef WLAN_OPEN_SOURCE
+    /* Android does not want the timestamp from the frame.
+       Instead it wants a monotonic increasing value */
+    get_monotonic_boottime(&ts);
+    mgmt->u.probe_resp.timestamp =
+         ((u64)ts.tv_sec * 1000000) + (ts.tv_nsec / 1000);
+#else
+    /* keep old behavior for non-open source (for now) */
     memcpy(&mgmt->u.probe_resp.timestamp, bss_desc->timeStamp,
             sizeof (bss_desc->timeStamp));
+
+#endif
+
     mgmt->u.probe_resp.beacon_int = bss_desc->beaconInterval;
     mgmt->u.probe_resp.capab_info = bss_desc->capabilityInfo;
     memcpy(mgmt->u.probe_resp.variable, ie, ie_length);
@@ -3242,16 +3334,16 @@
 
 #define dump_bssid(bssid) \
     { \
-        hddLog(VOS_TRACE_LEVEL_FATAL, "BSSID (MAC) address:\t"); \
-        hddPrintMacAddr(bssid, VOS_TRACE_LEVEL_FATAL);\
-        hddLog(VOS_TRACE_LEVEL_FATAL, "\n"); \
+        hddLog(VOS_TRACE_LEVEL_INFO, "BSSID (MAC) address:\t"); \
+        hddPrintMacAddr(bssid, VOS_TRACE_LEVEL_INFO);\
+        hddLog(VOS_TRACE_LEVEL_INFO, "\n"); \
     }
 
 #define dump_pmkid(pMac, pmkid) \
     { \
-        hddLog(VOS_TRACE_LEVEL_FATAL, "PMKSA-ID:\t"); \
-        hddPrintPmkId(pmkid, VOS_TRACE_LEVEL_FATAL);\
-        hddLog(VOS_TRACE_LEVEL_FATAL, "\n"); \
+        hddLog(VOS_TRACE_LEVEL_INFO, "PMKSA-ID:\t"); \
+        hddPrintPmkId(pmkid, VOS_TRACE_LEVEL_INFO);\
+        hddLog(VOS_TRACE_LEVEL_INFO, "\n"); \
     }
 
 #ifdef FEATURE_WLAN_LFR
@@ -3263,10 +3355,11 @@
                     hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo, 
                     int index, bool preauth )
 {
+#ifdef FEATURE_WLAN_OKC
     struct net_device *dev = pAdapter->dev;
 
     ENTER();
-    printk("%s is going to notify supplicant of:", __func__);
+    hddLog(VOS_TRACE_LEVEL_INFO, "%s is going to notify supplicant of:", __func__);
 
     if( NULL == pRoamInfo )
     {
@@ -3277,7 +3370,7 @@
     dump_bssid(pRoamInfo->bssid);
     cfg80211_pmksa_candidate_notify(dev, index,
                                     pRoamInfo->bssid, preauth, GFP_KERNEL);
-
+#endif  /* FEATURE_WLAN_OKC */
     return 0; 
 }
 #endif //FEATURE_WLAN_LFR
@@ -3294,7 +3387,6 @@
     //struct wireless_dev *wdev = dev->ieee80211_ptr;    
     hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR( dev );
     hdd_scaninfo_t *pScanInfo = &pAdapter->scan_info;
-    hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
     struct cfg80211_scan_request *req = NULL;
     int ret = 0;
 
@@ -3312,13 +3404,13 @@
     if (!ret)
     {
        VOS_ASSERT(pScanInfo->mScanPending);
-       return 0;
+       goto allow_suspend;
     }
 
     if(pScanInfo->mScanPending != VOS_TRUE)
     {
         VOS_ASSERT(pScanInfo->mScanPending);
-        return 0;
+        goto allow_suspend;
     }
 
     /* Check the scanId */
@@ -3330,9 +3422,6 @@
                 (int) scanId);
     }
 
-    /* Scan is no longer pending */
-    pScanInfo->mScanPending = VOS_FALSE;
-
     ret = wlan_hdd_cfg80211_update_bss((WLAN_HDD_GET_CTX(pAdapter))->wiphy, 
                                         pAdapter);
 
@@ -3372,7 +3461,7 @@
     if (!req)
     {
         hddLog(VOS_TRACE_LEVEL_ERROR, "request is became NULL\n");
-        return 0;
+        goto allow_suspend;
     }
 
     /*
@@ -3389,21 +3478,27 @@
     cfg80211_scan_done(req, false);
     complete(&pAdapter->abortscan_event_var);
     pAdapter->request = NULL;
+    /* Scan is no longer pending */
+    pScanInfo->mScanPending = VOS_FALSE;
 
 #ifdef WLAN_FEATURE_P2P
     /* Flush out scan result after p2p_serach is done */
-    if(pScanInfo->p2pSearch )
+    if(pScanInfo->flushP2pScanResults)
     {
         tANI_U8 sessionId = pAdapter->sessionId;
-        if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated)
-        { 
-            sessionId = pAdapter->p2pSessionId;
-        } 
         sme_ScanFlushResult(WLAN_HDD_GET_HAL_CTX(pAdapter), sessionId);
-        pScanInfo->p2pSearch = 0;
+        pScanInfo->flushP2pScanResults = 0;
     }
 #endif
 
+allow_suspend:
+    /* release the wake lock */
+    if((eConnectionState_NotConnected == 
+         (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState))
+    {
+        hdd_allow_suspend();
+    }
+
     EXIT();
     return 0;
 }
@@ -3425,6 +3520,7 @@
     v_U32_t scanId = 0;
     int status = 0;
     hdd_scaninfo_t *pScanInfo = &pAdapter->scan_info;
+    v_U8_t preventSuspend = 0;
 #ifdef WLAN_FEATURE_P2P
     v_U8_t* pP2pIe = NULL;
 #endif
@@ -3585,7 +3681,8 @@
             pScanInfo->scanAddIE.length = request->ie_len;
 
             if((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
-                (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode)
+                (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) ||
+                (WLAN_HDD_P2P_DEVICE == pAdapter->device_mode)
               )
             {
                pwextBuf->roamProfile.pAddIEScan = pScanInfo->scanAddIE.addIEdata;
@@ -3600,25 +3697,38 @@
                                                        request->ie_len);
             if (pP2pIe != NULL)
             {
-                if ( (request->n_ssids == 1) && 
-                     (request->ssids[0].ssid_len == P2P_WILDCARD_SSID_LEN) &&
-                     !memcmp(request->ssids[0].ssid, P2P_WILDCARD_SSID,
-                             P2P_WILDCARD_SSID_LEN ))
+                /* no_cck will be set during p2p find to disable 11b rates */
+                if(TRUE == request->no_cck)
                 {
                     tANI_U8 sessionId = pAdapter->sessionId;
                     hddLog(VOS_TRACE_LEVEL_INFO,
                            "%s: This is a P2P Search", __func__);
                     scanRequest.p2pSearch = 1;
-                    pScanInfo->p2pSearch = 1;
+
+                    /* Flush the scan results only for P2P search.
+                       P2P search happens on 3 social channels (1, 6, 11) */
+                    if( request->n_channels == WLAN_HDD_P2P_SOCIAL_CHANNELS )
+                    {
+                         pScanInfo->flushP2pScanResults = 1;
+                         sme_ScanFlushResult( WLAN_HDD_GET_HAL_CTX(pAdapter),
+                                          sessionId );
+                    }
+
+                    /*
+                       Skip Dfs Channel in case of P2P Search
+                       if it is set in ini file
+                    */
+                    if(cfg_param->skipDfsChnlInP2pSearch)
+                    {
+                       scanRequest.skipDfsChnlInP2pSearch = 1;
+                    }
+                    else
+                    {
+                       scanRequest.skipDfsChnlInP2pSearch = 0;
+                    }
 
                     /* set requestType to P2P Discovery */
                     scanRequest.requestType = eCSR_SCAN_P2P_DISCOVERY;
-                    if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated)
-                    {
-                        sessionId = pAdapter->p2pSessionId;
-                    }
-                    sme_ScanFlushResult( WLAN_HDD_GET_HAL_CTX(pAdapter),
-                                          sessionId );
                 }
             }
 #endif
@@ -3627,26 +3737,29 @@
 
     INIT_COMPLETION(pScanInfo->scan_req_completion_event);
 
-    if ((pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated) &&
-        (scanRequest.p2pSearch))
+    /*If the station is not connected and recieved a scan request, acquire the 
+     * wake lock to not request the suspend from Android*/
+    if((eConnectionState_NotConnected == 
+         (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState))
     {
-        status = sme_ScanRequest( WLAN_HDD_GET_HAL_CTX(pAdapter),
-                              pAdapter->p2pSessionId, &scanRequest, &scanId,
-                              &hdd_cfg80211_scan_done_callback, dev );
+        preventSuspend = 1;
+        hdd_prevent_suspend();
     }
-    else
-    {
-        status = sme_ScanRequest( WLAN_HDD_GET_HAL_CTX(pAdapter),
+
+    status = sme_ScanRequest( WLAN_HDD_GET_HAL_CTX(pAdapter),
                               pAdapter->sessionId, &scanRequest, &scanId,
                               &hdd_cfg80211_scan_done_callback, dev );
-    }
-    
+
     if (eHAL_STATUS_SUCCESS != status)
     {
         hddLog(VOS_TRACE_LEVEL_ERROR,
                 "%s: sme_ScanRequest returned error %d", __func__, status);
         complete(&pScanInfo->scan_req_completion_event);
         status = -EIO;
+        if(preventSuspend)
+        {
+            hdd_allow_suspend();
+        }
         goto free_mem;
     }
 
@@ -3698,9 +3811,14 @@
 
     if (pRoamProfile) 
     {
-        if (hdd_connGetConnectedBssType(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter),
-            &connectedBssType ) || ( eMib_dot11DesiredBssType_independent == 
-              connectedBssType))
+        int ret = 0;
+        hdd_station_ctx_t *pHddStaCtx;
+        pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
+        hdd_connGetConnectedBssType(pHddStaCtx,&connectedBssType );
+
+        if((eMib_dot11DesiredBssType_independent == connectedBssType) ||
+           (eConnectionState_Associated == pHddStaCtx->conn_info.connState) ||
+           (eConnectionState_IbssConnected == pHddStaCtx->conn_info.connState))
         {
             /* Issue disconnect to CSR */
             INIT_COMPLETION(pAdapter->disconnect_comp_var);
@@ -3709,9 +3827,23 @@
                             pAdapter->sessionId,
                             eCSR_DISCONNECT_REASON_UNSPECIFIED ) )
             {
-                wait_for_completion_interruptible_timeout(
-                        &pAdapter->disconnect_comp_var,
-                        msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT));
+                ret = wait_for_completion_interruptible_timeout(
+                             &pAdapter->disconnect_comp_var,
+                             msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT));
+                if (0 == ret)
+                {
+                    VOS_ASSERT(0);
+                }
+            }
+        }
+        else if(eConnectionState_Disconnecting == pHddStaCtx->conn_info.connState)
+        {
+            ret = wait_for_completion_interruptible_timeout(
+                         &pAdapter->disconnect_comp_var,
+                         msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT));
+            if (0 == ret)
+            {
+                VOS_ASSERT(0);
             }
         }
 
@@ -4952,6 +5084,8 @@
     hdd_adapter_t *pAdapter;
     hdd_context_t *pHddCtx = (hdd_context_t*) wiphy_priv(wiphy);
 
+    ENTER();
+
     if (NULL == pHddCtx)
     {
         hddLog(VOS_TRACE_LEVEL_FATAL,"%s: HDD context is Null",__func__);
@@ -4976,6 +5110,7 @@
     wlan_hdd_get_classAstats(pAdapter);
     *dbm = pAdapter->hdd_stats.ClassA_stat.max_pwr;
 
+    EXIT();
     return 0;
 }
 
@@ -5005,6 +5140,8 @@
     tANI_U8  rateFlag = 1;
     tANI_U8  i, j, rssidx;
 
+    ENTER();
+
     if ((eConnectionState_Associated != pHddStaCtx->conn_info.connState) ||
             (0 == ssidlen))
     {
@@ -5081,7 +5218,7 @@
         ccmCfgGetStr(hHal, WNI_CFG_OPERATIONAL_RATE_SET, OperationalRates, &ORLeng);
         for (i = 0; i < ORLeng; i++)
         {
-            for (j = 0; j < sizeof(supported_data_rate); j ++)
+            for (j = 0; j < (sizeof(supported_data_rate) / sizeof(supported_data_rate[0])); j ++)
             {
                 /* Validate Rate Set */
                 if (supported_data_rate[j].beacon_rate_index == (OperationalRates[i] & 0x7F))
@@ -5098,7 +5235,7 @@
         ccmCfgGetStr(hHal, WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET, ExtendedRates, &ERLeng);
         for (i = 0; i < ERLeng; i++)
         {
-            for (j = 0; j < sizeof(supported_data_rate); j ++)
+            for (j = 0; j < (sizeof(supported_data_rate) / sizeof(supported_data_rate[0])); j ++)
             {
                 if (supported_data_rate[j].beacon_rate_index == (ExtendedRates[i] & 0x7F))
                 {
@@ -5128,7 +5265,7 @@
 
             for (i = 0; i < MCSLeng; i++)
             {
-                for (j = 0; j < sizeof(supported_mcs_rate); j++)
+                for (j = 0; j < (sizeof(supported_mcs_rate) / sizeof(supported_mcs_rate[0])); j++)
                 {
                     if (supported_mcs_rate[j].beacon_rate_index == MCSRates[i])
                     {
@@ -5220,6 +5357,7 @@
     }
     sinfo->filled |= STATION_INFO_TX_BITRATE;
 
+    EXIT();
     return 0;
 }
 
@@ -5229,6 +5367,8 @@
     hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
     VOS_STATUS vos_status;
 
+    ENTER();
+
     if (NULL == pAdapter)
     {
         hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Adapter is NULL\n", __func__);
@@ -5247,6 +5387,7 @@
      **/
     vos_status =  wlan_hdd_enter_bmps(pAdapter, !mode);
 
+    EXIT();
     if (VOS_STATUS_E_FAILURE == vos_status)
     {
         return -EINVAL;
@@ -5260,6 +5401,7 @@
                          struct net_device *netdev,
                          u8 key_index)
 {
+    ENTER();
     return 0;
 }
 #endif //LINUX_VERSION_CODE 
@@ -5269,12 +5411,14 @@
                    struct net_device *dev,
                    struct ieee80211_txq_params *params)
 {
+    ENTER();
     return 0;
 }
 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
 static int wlan_hdd_set_txq_params(struct wiphy *wiphy,
                    struct ieee80211_txq_params *params)
 {
+    ENTER();
     return 0;
 }
 #endif //LINUX_VERSION_CODE
@@ -5284,6 +5428,7 @@
 {
     hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
 
+    ENTER();
     if ( NULL == pAdapter || NULL == pAdapter->pHddCtx)
     {
         hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Invalid Adapter or HDD Context " ,__func__);
@@ -5349,6 +5494,7 @@
           struct net_device *dev, u8 *mac, struct station_parameters *params)
 {
     // TODO: Implement this later.
+    ENTER();
     return 0;
 }
 
@@ -5366,6 +5512,8 @@
     eHalStatus result; 
     tANI_U8  BSSIDMatched = 0;
    
+    ENTER();
+
     // Validate pAdapter  
     if ( NULL == pAdapter || NULL == pAdapter->pHddCtx)
     {
@@ -5444,12 +5592,14 @@
 static int wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *dev,
             struct cfg80211_pmksa *pmksa)
 {
+    ENTER();
     // TODO: Implement this later.
     return 0;
 }
 
 static int wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device *dev)
 {
+    ENTER();
     // TODO: Implement this later.
     return 0;
 }
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index 47ea1d6..3ad6fd0 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -40,7 +40,6 @@
 #include <linux/pm.h>
 #include <linux/wait.h>
 #include <linux/earlysuspend.h>
-#include <linux/wcnss_wlan.h>
 #include <wlan_hdd_includes.h>
 #include <wlan_qct_driver.h>
 #include <linux/wakelock.h>
@@ -81,6 +80,7 @@
 #include "bap_hdd_misc.h"
 #endif
 
+#include <linux/wcnss_wlan.h>
 #include <linux/inetdevice.h>
 #include <wlan_hdd_cfg.h>
 /**-----------------------------------------------------------------------------
@@ -118,7 +118,7 @@
 #endif
 
 #ifdef WLAN_FEATURE_PACKET_FILTERING
-extern void wlan_hdd_set_mc_addr_list(hdd_context_t *pHddCtx, v_U8_t set);
+extern void wlan_hdd_set_mc_addr_list(hdd_context_t *pHddCtx, v_U8_t set, v_U8_t sessionId);
 #endif
 
 //Callback invoked by PMC to report status of standby request
@@ -698,7 +698,8 @@
                   offLoadRequest.params.hostIpv4Addr[3]);
 
           if (eHAL_STATUS_SUCCESS != 
-                    sme_SetHostOffload(WLAN_HDD_GET_HAL_CTX(pAdapter) , &offLoadRequest))
+                    sme_SetHostOffload(WLAN_HDD_GET_HAL_CTX(pAdapter), 
+                                       pAdapter->sessionId, &offLoadRequest))
           {
               hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Failed to enable HostOffload "
                       "feature\n", __func__);
@@ -718,7 +719,8 @@
        offLoadRequest.enableOrDisable = SIR_OFFLOAD_DISABLE;
        offLoadRequest.offloadType =  SIR_IPV4_ARP_REPLY_OFFLOAD;
 
-       if (eHAL_STATUS_SUCCESS != sme_SetHostOffload(WLAN_HDD_GET_HAL_CTX(pAdapter), &offLoadRequest))
+       if (eHAL_STATUS_SUCCESS != sme_SetHostOffload(WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId, 
+                                                     &offLoadRequest))
        {
             hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Failure to disable host "
                              "offload feature\n", __func__);
@@ -764,6 +766,7 @@
        pHddCtx->hdd_mcastbcast_filter_set = TRUE;
 }
 
+#ifdef CONFIG_HAS_EARLYSUSPEND
 #ifdef FEATURE_WLAN_INTEGRATED_SOC
 static void hdd_conf_suspend_ind(hdd_context_t* pHddCtx,
                                  hdd_adapter_t *pAdapter)
@@ -871,7 +874,7 @@
                     (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState))
            {
               /*set the filter*/
-              wlan_hdd_set_mc_addr_list(pHddCtx, TRUE);
+              wlan_hdd_set_mc_addr_list(pHddCtx, TRUE, pAdapter->sessionId);
            }
         }
 #endif
@@ -884,7 +887,7 @@
     }
 }
 
-static void hdd_conf_resume_ind(hdd_context_t* pHddCtx)
+static void hdd_conf_resume_ind(hdd_context_t* pHddCtx, v_U8_t sessionId)
 {
     VOS_STATUS vstatus;
     tpSirWlanResumeParam wlanResumeParam =
@@ -929,14 +932,13 @@
        {
           /*Filter applied during suspend mode*/
           /*Clear it here*/
-          wlan_hdd_set_mc_addr_list(pHddCtx, FALSE);
+          wlan_hdd_set_mc_addr_list(pHddCtx, FALSE, sessionId);
        }
     }
 #endif
 }
 #endif
 
-#ifdef CONFIG_HAS_EARLYSUSPEND
 //Suspend routine registered with Android OS
 void hdd_suspend_wlan(struct early_suspend *wlan_suspend)
 {
@@ -1030,8 +1032,13 @@
        }
 #endif
 
+   //Apply Dynamic Dtim For P2P
+   //Only if ignoreDynamicDtimInP2pMode is not set in ini
    if((pHddCtx->cfg_ini->enableDynamicDTIM ||
-       pHddCtx->cfg_ini->enableModulatedDTIM) && 
+       pHddCtx->cfg_ini->enableModulatedDTIM) &&
+       ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
+        ((WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) &&
+         !(pHddCtx->cfg_ini->ignoreDynamicDtimInP2pMode))) &&
        (eANI_BOOLEAN_TRUE == pAdapter->higherDtimTransition) &&
       (eConnectionState_Associated == 
          (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState) &&
@@ -1312,7 +1319,7 @@
 
          if(pHddCtx->hdd_mcastbcast_filter_set == TRUE) {
 #ifdef FEATURE_WLAN_INTEGRATED_SOC
-           hdd_conf_resume_ind(pHddCtx);
+           hdd_conf_resume_ind(pHddCtx, pAdapter->sessionId);
 #else
                   hdd_conf_mcastbcast_filter(pHddCtx, FALSE);
                               pHddCtx->hdd_mcastbcast_filter_set = FALSE;
@@ -2182,11 +2189,13 @@
       hddLog(VOS_TRACE_LEVEL_FATAL,"%s: hddRegisterPmOps failed",__func__);
       goto err_bap_stop;
    }
+#ifdef CONFIG_HAS_EARLYSUSPEND
    // Register suspend/resume callbacks
    if(pHddCtx->cfg_ini->nEnableSuspend)
    {
       register_wlan_suspend();
    }
+#endif
    /* Allow the phone to go to sleep */
    hdd_allow_suspend();
    /* register for riva power on lock */
diff --git a/CORE/HDD/src/wlan_hdd_ftm.c b/CORE/HDD/src/wlan_hdd_ftm.c
index f3122db..b6ba3d5 100644
--- a/CORE/HDD/src/wlan_hdd_ftm.c
+++ b/CORE/HDD/src/wlan_hdd_ftm.c
@@ -2607,6 +2607,9 @@
 
     ENTER();
 
+    //Delay to fix NV write failure on JB
+    vos_busy_wait(10000); //10ms
+
     if (!pRequestBuf) {
 
         hddLog(VOS_TRACE_LEVEL_ERROR,"%s: request buffer is null\n",__func__);
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index 83b5eb6..b7e5166 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -203,7 +203,7 @@
        goto exit;
     }
 
-    if ((!ifr) && (!ifr->ifr_data))
+    if ((!ifr) || (!ifr->ifr_data))
     {
         ret = -EINVAL;
         goto exit;
@@ -1057,6 +1057,43 @@
     return 0;
 }
 
+int
+static iw_softap_set_tx_power(struct net_device *dev,
+                        struct iw_request_info *info,
+                        union iwreq_data *wrqu, char *extra)
+{
+    hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev));
+    tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pHostapdAdapter);
+    int cmd_len = wrqu->data.length;
+    int *value = (int *) kmalloc(cmd_len+1, GFP_KERNEL);
+    int set_value;
+    tSirMacAddr bssid = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
+    tSirMacAddr selfMac = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
+
+    if(value == NULL)
+        return -ENOMEM;
+
+    if(copy_from_user((char *) value, (char*)(wrqu->data.pointer), cmd_len)) {
+        hddLog(VOS_TRACE_LEVEL_FATAL, "%s -- copy_from_user --data pointer failed! bailing",
+                __FUNCTION__);
+        kfree(value);
+        return -EFAULT;
+    }
+
+    set_value = value[0];
+    kfree(value);
+
+    if( sme_SetMaxTxPower(hHal, bssid, selfMac, set_value) !=
+            eHAL_STATUS_SUCCESS )
+    {
+        hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Setting maximum tx power failed",
+                __func__);
+        return -EIO;
+    }
+
+    return 0;
+}
+
 #define IS_BROADCAST_MAC(x) (((x[0] & x[1] & x[2] & x[3] & x[4] & x[5]) == 0xff) ? 1 : 0)
 
 int
@@ -1833,11 +1870,11 @@
 static int iw_get_ap_freq(struct net_device *dev, struct iw_request_info *info,
              struct iw_freq *fwrq, char *extra)
 {
-   v_U32_t status = 0,channel,freq;
+   v_U32_t status = FALSE, channel = 0, freq = 0;
    hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev));
    tHalHandle hHal;
    hdd_hostapd_state_t *pHostapdState;
-   hdd_ap_ctx_t *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter);  
+   hdd_ap_ctx_t *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter);
 
    ENTER();
 
@@ -1860,18 +1897,30 @@
        else
        {
           status = hdd_wlan_get_freq(channel, &freq);
-          fwrq->m = freq;
-          fwrq->e = 0;
+          if( TRUE == status)
+          {
+              /* Set Exponent parameter as 6 (MHZ) in struct iw_freq
+               * iwlist & iwconfig command shows frequency into proper
+               * format (2.412 GHz instead of 246.2 MHz)*/
+              fwrq->m = freq;
+              fwrq->e = MHZ;
+          }
        }
     }
     else
     {
        channel = pHddApCtx->operatingChannel;
        status = hdd_wlan_get_freq(channel, &freq);
-       fwrq->m = freq;
-       fwrq->e = 0;
+       if( TRUE == status)
+       {
+          /* Set Exponent parameter as 6 (MHZ) in struct iw_freq
+           * iwlist & iwconfig command shows frequency into proper
+           * format (2.412 GHz instead of 246.2 MHz)*/
+           fwrq->m = freq;
+           fwrq->e = MHZ;
+       }
     }
-   return status;
+   return 0;
 }
 
 static int iw_softap_setwpsie(struct net_device *dev,
@@ -2518,7 +2567,13 @@
         IW_PRIV_TYPE_BYTE | sizeof(tChannelListInfo),
         "getChannelList" },
 
+    /* handlers for main ioctl */
+    {   QCSAP_IOCTL_SET_TX_POWER,
+        IW_PRIV_TYPE_INT| IW_PRIV_SIZE_FIXED | 1,
+        0,
+        "" },
 };
+
 static const iw_handler hostapd_private[] = {
    [QCSAP_IOCTL_SETPARAM - SIOCIWFIRSTPRIV] = iw_softap_setparam,  //set priv ioctl
    [QCSAP_IOCTL_GETPARAM - SIOCIWFIRSTPRIV] = iw_softap_getparam,  //get priv ioctl   
@@ -2538,7 +2593,8 @@
    [QCSAP_IOCTL_SET_CHANNEL_RANGE - SIOCIWFIRSTPRIV] = iw_softap_set_channel_range,
    [QCSAP_IOCTL_MODIFY_ACL - SIOCIWFIRSTPRIV]   = iw_softap_modify_acl,
    [QCSAP_IOCTL_GET_CHANNEL_LIST - SIOCIWFIRSTPRIV]   = iw_softap_get_channel_list,
-   [QCSAP_IOCTL_PRIV_GET_SOFTAP_LINK_SPEED - SIOCIWFIRSTPRIV]     = iw_get_softap_linkspeed
+   [QCSAP_IOCTL_PRIV_GET_SOFTAP_LINK_SPEED - SIOCIWFIRSTPRIV]     = iw_get_softap_linkspeed,
+   [QCSAP_IOCTL_SET_TX_POWER - SIOCIWFIRSTPRIV]   = iw_softap_set_tx_power,
 };
 const struct iw_handler_def hostapd_handler_def = {
    .num_standard     = sizeof(hostapd_handler) / sizeof(hostapd_handler[0]),
@@ -2641,20 +2697,11 @@
             ( pAdapter->device_mode == WLAN_HDD_SOFTAP ) && 
             ( !strncmp( pAdapter->dev->name, "wlan", 4 )) )
     {
-        hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
-        if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated)
-        {
-            INIT_COMPLETION(pAdapter->session_close_comp_var);
-            if( eHAL_STATUS_SUCCESS == sme_CloseSession( pHddCtx->hHal,
-                        pAdapter->p2pSessionId,
-                        hdd_smeCloseSessionCallback, pAdapter ) )
-            {
-                //Block on a completion variable. Can't wait forever though.
-                wait_for_completion_interruptible_timeout(
-                        &pAdapter->session_close_comp_var,
-                        msecs_to_jiffies(WLAN_WAIT_TIME_SESSIONOPENCLOSE));
-            }
-        }
+       /* TODO: Revisit this later, either unregister p2p0 
+                interface here or make change in wifi.c file to pass 
+                information, that driver is getting loaded for SAP interface, 
+                in that case, during load time don't start p2p0 interface 
+        */
     }
 #endif
     EXIT();
diff --git a/CORE/HDD/src/wlan_hdd_innav.c b/CORE/HDD/src/wlan_hdd_innav.c
deleted file mode 100644
index 1e9b029..0000000
--- a/CORE/HDD/src/wlan_hdd_innav.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- *
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 9e64d20..9f59945 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -144,11 +144,25 @@
 module_param_string(fwpath, fwpath, BUF_LEN,
                     S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
+/*
+ * The rate at which the driver sends RESTART event to supplicant
+ * once the function 'vos_wlanRestart()' is called
+ *
+ */
+#define WLAN_HDD_RESTART_RETRY_DELAY_MS 5000  /* 5 second */
+#define WLAN_HDD_RESTART_RETRY_MAX_CNT  5     /* 5 retries */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,5))
 static struct wake_lock wlan_wake_lock;
+#endif
 /* set when SSR is needed after unload */
 static v_U8_t      isSsrRequired;
 
 //internal function declaration
+static VOS_STATUS wlan_hdd_framework_restart(hdd_context_t *pHddCtx);
+static void wlan_hdd_restart_init(hdd_context_t *pHddCtx);
+static void wlan_hdd_restart_deinit(hdd_context_t *pHddCtx);
+void wlan_hdd_restart_timer_cb(v_PVOID_t usrDataForCallback);
+
 v_U16_t hdd_select_queue(struct net_device *dev,
     struct sk_buff *skb);
 
@@ -173,7 +187,7 @@
 
    //Make sure that this callback corresponds to our device.
    if((strncmp( dev->name, "wlan", 4 )) && 
-      (strncmp( dev->name, "p2p-wlan", 8))
+      (strncmp( dev->name, "p2p", 3))
      )
       return NOTIFY_DONE;
 
@@ -207,11 +221,8 @@
         break;
 
    case NETDEV_CHANGE:
-        if(VOS_STA_MODE == hdd_get_conparam()) 
-        {
-            if(TRUE == pAdapter->isLinkUpSvcNeeded)
-               complete(&pAdapter->linkup_event_var);
-           }
+        if(TRUE == pAdapter->isLinkUpSvcNeeded)
+           complete(&pAdapter->linkup_event_var);
         break;
 
    case NETDEV_GOING_DOWN:
@@ -342,7 +353,7 @@
       goto exit; 
    }
 
-   if ((!ifr) && (!ifr->ifr_data))
+   if ((!ifr) || (!ifr->ifr_data))
    {
        ret = -EINVAL;
        goto exit; 
@@ -1268,65 +1279,6 @@
    return status;
 }
 
-#ifdef WLAN_FEATURE_P2P
-/**
- * hdd_init_p2p_device_mode
- *
- *FUNCTION:
- * This function is called from hdd_wlan_startup function when wlan 
- * driver module is loaded. 
- *
- *LOGIC:
- * Open New SME session with P2P Device Mac Address which is different 
- * from STA Mac Address SME session. When driver receive any frame on STA Mac 
- * Address then we divert all the frame using P2P Device Mac Address instaed of 
- * STA Mac address. 
- *
- *ASSUMPTIONS:
- *
- *
- *NOTE:
- *
- * @param  pAdapter   Pointer to pAdapter structure
- *
- * @return None
- */
-VOS_STATUS hdd_init_p2p_device_mode( hdd_adapter_t *pAdapter)
-{
-   hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
-   eHalStatus halStatus = eHAL_STATUS_SUCCESS;
-   VOS_STATUS status = VOS_STATUS_E_FAILURE;
-   int rc = 0;
-
-   INIT_COMPLETION(pAdapter->session_open_comp_var);
-   //Open a SME session for future operation
-   halStatus = sme_OpenSession( pHddCtx->hHal, hdd_smeRoamCallback, pAdapter,
-               (tANI_U8 *)&pHddCtx->p2pDeviceAddress, &pAdapter->p2pSessionId);
-   if ( !HAL_STATUS_SUCCESS( halStatus ) )
-   {
-      hddLog(VOS_TRACE_LEVEL_FATAL,
-             "sme_OpenSession() failed with status code %08d [x%08lx]",
-                                                 halStatus, halStatus );
-      status = VOS_STATUS_E_FAILURE;
-      return status;
-   }
-   
-   //Block on a completion variable. Can't wait forever though.
-   rc = wait_for_completion_interruptible_timeout(
-                        &pAdapter->session_open_comp_var,
-                        msecs_to_jiffies(WLAN_WAIT_TIME_SESSIONOPENCLOSE));
-   if (!rc)
-   {
-      hddLog(VOS_TRACE_LEVEL_FATAL,
-             "Session is not opened within timeout period code %08d", rc );
-      status = VOS_STATUS_E_FAILURE;
-      return status;
-   }
-
-   return VOS_STATUS_SUCCESS;
-}
-#endif
-
 #ifdef CONFIG_CFG80211
 void hdd_cleanup_actionframe( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter )
 {
@@ -1358,6 +1310,7 @@
    {
       case WLAN_HDD_INFRA_STATION:
       case WLAN_HDD_P2P_CLIENT:
+      case WLAN_HDD_P2P_DEVICE:
       {
          if(test_bit(INIT_TX_RX_SUCCESS, &pAdapter->event_flags))
          {
@@ -1598,6 +1551,7 @@
       case WLAN_HDD_INFRA_STATION:
 #ifdef WLAN_FEATURE_P2P
       case WLAN_HDD_P2P_CLIENT:
+      case WLAN_HDD_P2P_DEVICE:
 #endif
       {
          pAdapter = hdd_alloc_station_adapter( pHddCtx, macAddr, iface_name );
@@ -1606,12 +1560,11 @@
             return NULL;
 
 #ifdef CONFIG_CFG80211
-         pAdapter->wdev.iftype = (session_type == WLAN_HDD_INFRA_STATION) ?
-                                  NL80211_IFTYPE_STATION :
-                                  NL80211_IFTYPE_P2P_CLIENT;
+         pAdapter->wdev.iftype = (session_type == WLAN_HDD_P2P_CLIENT) ?
+                                  NL80211_IFTYPE_P2P_CLIENT:
+                                  NL80211_IFTYPE_STATION;
 #endif
 
-
          pAdapter->device_mode = session_type;
 
          status = hdd_init_station_mode( pAdapter );
@@ -1900,6 +1853,7 @@
    {
       case WLAN_HDD_INFRA_STATION:
       case WLAN_HDD_P2P_CLIENT:
+      case WLAN_HDD_P2P_DEVICE:
          if( hdd_connIsConnected( WLAN_HDD_GET_STATION_CTX_PTR( pAdapter )) )
          {
             if (pWextState->roamProfile.BSSType == eCSR_BSS_TYPE_START_IBSS)
@@ -2085,6 +2039,7 @@
       {
          case WLAN_HDD_INFRA_STATION:
          case WLAN_HDD_P2P_CLIENT:
+         case WLAN_HDD_P2P_DEVICE:
             hdd_init_station_mode(pAdapter);
             /* Open the gates for HDD to receive Wext commands */
             pAdapter->isLinkUpSvcNeeded = FALSE; 
@@ -2677,6 +2632,9 @@
 
    ENTER();
 
+   // Unloading, restart logic is no more required.
+   wlan_hdd_restart_deinit(pHddCtx);
+
 #ifdef CONFIG_CFG80211
 #ifdef WLAN_SOFTAP_FEATURE
    if (VOS_STA_SAP_MODE != hdd_get_conparam())
@@ -2820,26 +2778,6 @@
    // Unregister the Net Device Notifier
    unregister_netdevice_notifier(&hdd_netdev_notifier);
    
-#ifdef WLAN_FEATURE_P2P
-   if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated)
-   {
-       hdd_adapter_t* pAdapter = hdd_get_adapter(pHddCtx,
-                                    WLAN_HDD_INFRA_STATION);
-       if (pAdapter != NULL)
-       {
-          INIT_COMPLETION(pAdapter->session_close_comp_var);
-          if( eHAL_STATUS_SUCCESS == sme_CloseSession( pHddCtx->hHal,
-                                        pAdapter->p2pSessionId,
-                                        hdd_smeCloseSessionCallback, pAdapter ) )
-          {
-              //Block on a completion variable. Can't wait forever though.
-              wait_for_completion_interruptible_timeout(
-                         &pAdapter->session_close_comp_var,
-                         msecs_to_jiffies(WLAN_WAIT_TIME_SESSIONOPENCLOSE));
-          }
-       }
-   }
-#endif
    hdd_stop_all_adapters( pHddCtx );
 
 #ifdef ANI_BUS_TYPE_SDIO
@@ -2939,7 +2877,11 @@
          "%s: Failed to close VOSS Scheduler",__func__);
       VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) );
    }
-   
+
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+   /* Destroy the wake lock */
+   wake_lock_destroy(&pHddCtx->rx_wake_lock);
+#endif
 
    //Close VOSS
    //This frees pMac(HAL) context. There should not be any call that requires pMac access after this.
@@ -3182,12 +3124,20 @@
 /* wake lock APIs for HDD */
 void hdd_prevent_suspend(void)
 {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,5))
     wake_lock(&wlan_wake_lock);
+#else
+    wcnss_prevent_suspend();
+#endif
 }
 
 void hdd_allow_suspend(void)
 {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,5))
     wake_unlock(&wlan_wake_lock);
+#else
+    wcnss_allow_suspend();
+#endif
 }
 
 /**---------------------------------------------------------------------------
@@ -3206,6 +3156,7 @@
 {
    VOS_STATUS status;
    hdd_adapter_t *pAdapter = NULL;
+   hdd_adapter_t *pP2pAdapter = NULL;
    hdd_context_t *pHddCtx = NULL;
    v_CONTEXT_t pVosContext= NULL;
 #ifdef WLAN_BTAMP_FEATURE
@@ -3420,6 +3371,17 @@
       goto err_vosclose;
    }
 
+#ifdef FEATURE_WLAN_INTEGRATED_SOC
+      /* Vos preStart is calling */
+      /* vos preStart which does cfg download should be called before set sme config which accesses/sets some cfgs */
+      status = vos_preStart( pHddCtx->pvosContext );
+      if ( !VOS_IS_STATUS_SUCCESS( status ) )
+      {
+         hddLog(VOS_TRACE_LEVEL_FATAL,"%s: vos_preStart failed",__func__);
+         goto err_vosclose;
+      }
+#endif
+
    // Set the SME configuration parameters...
    status = hdd_set_sme_config( pHddCtx );
 
@@ -3438,16 +3400,6 @@
    }
 
 #ifdef FEATURE_WLAN_INTEGRATED_SOC
-   /* Vos preStart is calling */
-   status = vos_preStart( pHddCtx->pvosContext );
-   if ( !VOS_IS_STATUS_SUCCESS( status ) )
-   {
-      hddLog(VOS_TRACE_LEVEL_FATAL,"%s: vos_preStart failed",__func__);
-      goto err_vosclose;
-   }
-#endif
-
-#ifdef FEATURE_WLAN_INTEGRATED_SOC
    /* In the integrated architecture we update the configuration from
       the INI file and from NV before vOSS has been started so that
       the final contents are available to send down to the cCPU   */
@@ -3627,11 +3579,20 @@
       pr_info("%s: WCNSS hardware version %s\n",
               WLAN_MODULE_NAME, versionString);
 
-      /* Check if FW version is greater than 0.1.1.0. Only then send host-FW capability exchange message */
-      if ((versionReported.major>0) || (versionReported.minor>1) || ((versionReported.minor>=1) && (versionReported.version>=1)))
+      /* 1.Check if FW version is greater than 0.1.1.0. Only then send host-FW capability exchange message 
+              2.Host-FW capability exchange message  is only present on riva 1.1 so 
+                send the message only if it the riva is 1.1
+                minor numbers for different riva branches:
+                0 -> (1.0)Mainline Build
+                1 -> (1.1)Mainline Build
+                2->(1.04) Stability Build
+         */
+      if (((versionReported.major>0) || (versionReported.minor>1) || 
+         ((versionReported.minor>=1) && (versionReported.version>=1)))
+         && ((versionReported.major == 1) && (versionReported.minor >= 1)))
          fwFeatCapsMsgSupported = 1;
       if (fwFeatCapsMsgSupported)
-        sme_featureCapsExchange(pHddCtx->hHal);
+         sme_featureCapsExchange(pHddCtx->hHal);
    } while (0);
 
 #endif // FEATURE_WLAN_INTEGRATED_SOC
@@ -3658,26 +3619,44 @@
      if (pAdapter != NULL)
      {
 #ifdef WLAN_FEATURE_P2P
-         vos_mem_copy( pHddCtx->p2pDeviceAddress.bytes, 
-                       pHddCtx->cfg_ini->intfMacAddr[0].bytes,
-                       sizeof(tSirMacAddr));
          if ( pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated )
          {
+             vos_mem_copy( pHddCtx->p2pDeviceAddress.bytes,
+                       pHddCtx->cfg_ini->intfMacAddr[0].bytes,
+                       sizeof(tSirMacAddr));
              /* Generate the P2P Device Address.  This consists of the device's
               * primary MAC address with the locally administered bit set.
               */
              pHddCtx->p2pDeviceAddress.bytes[0] |= 0x02;
-             status = hdd_init_p2p_device_mode(pAdapter);
-             if ( VOS_STATUS_SUCCESS != status )
+         }
+         else
+         {
+             tANI_U8* p2p_dev_addr = wlan_hdd_get_intf_addr(pHddCtx);
+             if (p2p_dev_addr != NULL)
              {
-                 hddLog(VOS_TRACE_LEVEL_FATAL,
-                         "%s: Init Session fail for P2P Device Address Mode ",
-                          __FUNCTION__);
-                 goto err_close_adapter;
+                vos_mem_copy(&pHddCtx->p2pDeviceAddress.bytes[0],
+                             p2p_dev_addr, VOS_MAC_ADDR_SIZE);
+             }
+             else
+             {
+                hddLog(VOS_TRACE_LEVEL_FATAL,
+                    "%s: Failed to allocate mac_address for p2p_device",
+                    __FUNCTION__);
+                goto err_close_adapter;
              }
          }
+
+         pP2pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_P2P_DEVICE, "p2p%d",
+                           &pHddCtx->p2pDeviceAddress.bytes[0], FALSE );
+         if ( NULL == pP2pAdapter )
+         {
+             hddLog(VOS_TRACE_LEVEL_FATAL,
+                "%s: Failed to do hdd_open_adapter for P2P Device Interface",
+                __FUNCTION__);
+             goto err_close_adapter;
+         }
 #endif
-    }
+     }
 #ifdef WLAN_SOFTAP_FEATURE
    }
 #endif
@@ -3691,15 +3670,14 @@
      goto err_clkvote;
 #endif
    }
-   
-     
+
 #ifdef WLAN_BTAMP_FEATURE
    vStatus = WLANBAP_Open(pVosContext);
    if(!VOS_IS_STATUS_SUCCESS(vStatus))
    {
      VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
         "%s: Failed to open BAP",__func__);
-      goto err_p2psession_close;
+      goto err_close_adapter;
    }
 
    vStatus = BSL_Init(pVosContext);
@@ -3722,7 +3700,7 @@
    status = WLANBAP_SetConfig(&btAmpConfig);
 
 #endif //WLAN_BTAMP_FEATURE
- 
+
 #ifdef FEATURE_WLAN_SCAN_PNO
    /*SME must send channel update configuration to RIVA*/
    sme_UpdateChannelConfig(pHddCtx->hHal); 
@@ -3737,7 +3715,7 @@
 #ifdef WLAN_BTAMP_FEATURE
       goto err_bap_stop;
 #else
-      goto err_p2psession_close; 
+      goto err_close_adapter; 
 #endif //WLAN_BTAMP_FEATURE
    }
 
@@ -3813,7 +3791,7 @@
    if (VOS_STA_SAP_MODE != hdd_get_conparam())
 #endif
    {
-      wlan_hdd_cfg80211_post_voss_start(pAdapter);
+      wlan_hdd_cfg80211_post_voss_start(pP2pAdapter);
    }
 #endif
 
@@ -3821,11 +3799,21 @@
 
    pHddCtx->isLoadUnloadInProgress = FALSE;
 
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+   /* Initialize the wake lcok */
+   wake_lock_init(&pHddCtx->rx_wake_lock,
+           WAKE_LOCK_SUSPEND,
+           "qcom_rx_wakelock");
+#endif
+
    vos_event_init(&pAdapter->scan_info.scan_finished_event);
    pAdapter->scan_info.scan_pending_option = WEXT_SCAN_PENDING_GIVEUP;
 
    vos_set_load_unload_in_progress(VOS_MODULE_ID_VOSS, FALSE);
    hdd_allow_suspend();
+   
+   // Initialize the restart logic
+   wlan_hdd_restart_init(pHddCtx);
   
    goto success;
 
@@ -3852,29 +3840,6 @@
    WLANBAP_Close(pVosContext);
 #endif
 
-err_p2psession_close:
-#ifdef WLAN_FEATURE_P2P
-   if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated)
-   {
-       hdd_adapter_t* pAdapter = hdd_get_adapter(pHddCtx,
-                                    WLAN_HDD_INFRA_STATION);
-
-       if (pAdapter != NULL)
-       {
-          INIT_COMPLETION(pAdapter->session_close_comp_var);
-          if( eHAL_STATUS_SUCCESS == sme_CloseSession( pHddCtx->hHal,
-                                        pAdapter->p2pSessionId,
-                                        hdd_smeCloseSessionCallback, pAdapter ) )
-          {
-              //Block on a completion variable. Can't wait forever though.
-              wait_for_completion_interruptible_timeout(
-                         &pAdapter->session_close_comp_var,
-                         msecs_to_jiffies(WLAN_WAIT_TIME_SESSIONOPENCLOSE));
-          }
-       }
-   }
-#endif
-
 err_close_adapter:
    hdd_close_all_adapters( pHddCtx );
 
@@ -3968,7 +3933,9 @@
 
    ENTER();
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,5))
    wake_lock_init(&wlan_wake_lock, WAKE_LOCK_SUSPEND, "wlan");
+#endif
 
    pr_info("%s: loading driver v%s\n", WLAN_MODULE_NAME,
            QWLAN_VERSIONSTR TIMER_MANAGER_STR MEMORY_DEBUG_STR);
@@ -4146,7 +4113,9 @@
       vos_mem_exit();
 #endif
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,5))
       wake_lock_destroy(&wlan_wake_lock);
+#endif
       pr_err("%s: driver load failure\n", WLAN_MODULE_NAME);
    }
    else
@@ -4179,7 +4148,6 @@
 {
    hdd_context_t *pHddCtx = NULL;
    v_CONTEXT_t pVosContext = NULL;
-   int attempts = 0;
 
    pr_info("%s: unloading driver v%s\n", WLAN_MODULE_NAME, QWLAN_VERSIONSTR);
 
@@ -4201,13 +4169,10 @@
    }
    else
    {
+      /* module exit should never proceed if SSR is not completed */
       while(isWDresetInProgress()){
-         VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL, "%s:Reset in Progress by LOGP. Block rmmod for 500ms!!!",__func__);
-         VOS_ASSERT(0);
-         msleep(500);
-         attempts++;
-         if(attempts==MAX_EXIT_ATTEMPTS_DURING_LOGP)
-           break;
+         VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL, "%s:SSR in Progress; block rmmod for 1 second!!!",__func__);
+         msleep(1000);
        }
 
       pHddCtx->isLoadUnloadInProgress = TRUE;
@@ -4231,7 +4196,9 @@
 #endif
 
 done:
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,5))
    wake_lock_destroy(&wlan_wake_lock);
+#endif
    pr_info("%s: driver unloaded\n", WLAN_MODULE_NAME);
 }
 
@@ -4426,8 +4393,8 @@
        case WLAN_HDD_P2P_GO:
 #endif
        case WLAN_HDD_SOFTAP:
-    pHddCtx->concurrency_mode |= (1 << mode);
-    pHddCtx->no_of_sessions[mode]++;
+            pHddCtx->concurrency_mode |= (1 << mode);
+            pHddCtx->no_of_sessions[mode]++;
             break;
        default:
             break;
@@ -4459,6 +4426,189 @@
     __func__,pHddCtx->concurrency_mode,mode,pHddCtx->no_of_sessions[mode]);
 }
 
+/**---------------------------------------------------------------------------
+ *
+ *   \brief wlan_hdd_restart_init
+ *
+ *   This function initalizes restart timer/flag. An internal function.
+ *
+ *   \param  - pHddCtx
+ *
+ *   \return - None
+ *             
+ * --------------------------------------------------------------------------*/
+
+static void wlan_hdd_restart_init(hdd_context_t *pHddCtx)
+{
+   /* Initialize */
+   pHddCtx->hdd_restart_retries = 0;
+   atomic_set(&pHddCtx->isRestartInProgress, 0);
+   vos_timer_init(&pHddCtx->hdd_restart_timer, 
+                     VOS_TIMER_TYPE_SW, 
+                     wlan_hdd_restart_timer_cb,
+                     pHddCtx);
+}
+/**---------------------------------------------------------------------------
+ *
+ *   \brief wlan_hdd_restart_deinit
+ *
+ *   This function cleans up the resources used. An internal function.
+ *
+ *   \param  - pHddCtx
+ *
+ *   \return - None
+ *             
+ * --------------------------------------------------------------------------*/
+
+static void wlan_hdd_restart_deinit(hdd_context_t* pHddCtx)
+{
+ 
+   VOS_STATUS vos_status;
+   /* Block any further calls */
+   atomic_set(&pHddCtx->isRestartInProgress, 1);
+   /* Cleanup */
+   vos_status = vos_timer_stop( &pHddCtx->hdd_restart_timer );
+   if (!VOS_IS_STATUS_SUCCESS(vos_status))
+          hddLog(LOGE, FL("Failed to stop HDD restart timer\n"));
+   vos_status = vos_timer_destroy(&pHddCtx->hdd_restart_timer);
+   if (!VOS_IS_STATUS_SUCCESS(vos_status))
+          hddLog(LOGE, FL("Failed to destroy HDD restart timer\n"));
+
+}
+
+/**---------------------------------------------------------------------------
+ *
+ *   \brief wlan_hdd_framework_restart
+ *
+ *   This function uses a cfg80211 API to start a framework initiated WLAN
+ *   driver module unload/load.
+ *
+ *   Also this API keep retrying (WLAN_HDD_RESTART_RETRY_MAX_CNT).
+ *
+ *
+ *   \param  - pHddCtx
+ *
+ *   \return - VOS_STATUS_SUCCESS: Success
+ *             VOS_STATUS_E_EMPTY: Adapter is Empty
+ *             VOS_STATUS_E_NOMEM: No memory
+
+ * --------------------------------------------------------------------------*/
+
+static VOS_STATUS wlan_hdd_framework_restart(hdd_context_t *pHddCtx) 
+{
+   VOS_STATUS status = VOS_STATUS_SUCCESS;
+   hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
+   int len = (sizeof (struct ieee80211_mgmt));
+   struct ieee80211_mgmt *mgmt = NULL; 
+   
+   /* Prepare the DEAUTH managment frame with reason code */
+   mgmt =  kzalloc(len, GFP_KERNEL);
+   if(mgmt == NULL) 
+   {
+      VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL, 
+            "%s: memory allocatoin failed (%d bytes)", __func__, len);
+      return VOS_STATUS_E_NOMEM;
+   }
+   mgmt->u.deauth.reason_code = WLAN_REASON_DISASSOC_LOW_ACK;
+
+   /* Iterate over all adapters/devices */
+   status =  hdd_get_front_adapter ( pHddCtx, &pAdapterNode );
+   do 
+   {
+      if( (status == VOS_STATUS_SUCCESS) && 
+                           pAdapterNode  && 
+                           pAdapterNode->pAdapter)
+      {
+         VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL, 
+               "restarting the driver(intf:\'%s\' mode:%d :try %d)",
+               pAdapterNode->pAdapter->dev->name,
+               pAdapterNode->pAdapter->device_mode,
+               pHddCtx->hdd_restart_retries + 1);
+         /* 
+          * CFG80211 event to restart the driver
+          * 
+          * 'cfg80211_send_unprot_deauth' sends a 
+          * NL80211_CMD_UNPROT_DEAUTHENTICATE event to supplicant at any state 
+          * of SME(Linux Kernel) state machine.
+          *
+          * Reason code WLAN_REASON_DISASSOC_LOW_ACK is currently used to restart
+          * the driver.
+          *
+          */
+         
+         cfg80211_send_unprot_deauth(pAdapterNode->pAdapter->dev, (u_int8_t*)mgmt, len );  
+      }
+      status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
+      pAdapterNode = pNext;
+   } while((NULL != pAdapterNode) && (VOS_STATUS_SUCCESS == status));
+
+
+   /* Free the allocated management frame */
+   kfree(mgmt);
+
+   /* Retry until we unload or reach max count */
+   if(++pHddCtx->hdd_restart_retries < WLAN_HDD_RESTART_RETRY_MAX_CNT) 
+      vos_timer_start(&pHddCtx->hdd_restart_timer, WLAN_HDD_RESTART_RETRY_DELAY_MS);
+
+   return status;
+
+}
+/**---------------------------------------------------------------------------
+ *
+ *   \brief wlan_hdd_restart_timer_cb
+ *
+ *   Restart timer callback. An internal function.
+ *
+ *   \param  - User data:
+ *
+ *   \return - None
+ *             
+ * --------------------------------------------------------------------------*/
+
+void wlan_hdd_restart_timer_cb(v_PVOID_t usrDataForCallback)
+{
+   hdd_context_t *pHddCtx = usrDataForCallback;
+   wlan_hdd_framework_restart(pHddCtx);
+   return;
+
+}
+
+
+/**---------------------------------------------------------------------------
+ *
+ *   \brief wlan_hdd_restart_driver
+ *
+ *   This function sends an event to supplicant to restart the WLAN driver. 
+ *   
+ *   This function is called from vos_wlanRestart.
+ *
+ *   \param  - pHddCtx
+ *
+ *   \return - VOS_STATUS_SUCCESS: Success
+ *             VOS_STATUS_E_EMPTY: Adapter is Empty
+ *             VOS_STATUS_E_ALREADY: Request already in progress
+
+ * --------------------------------------------------------------------------*/
+VOS_STATUS wlan_hdd_restart_driver(hdd_context_t *pHddCtx) 
+{
+   VOS_STATUS status = VOS_STATUS_SUCCESS;
+
+   /* A tight check to make sure reentrancy */
+   if(atomic_xchg(&pHddCtx->isRestartInProgress, 1))
+   {
+      VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN, 
+            "%s: WLAN restart is already in progress", __func__);
+
+      return VOS_STATUS_E_ALREADY;
+   }
+
+   /* Restart API */
+   status = wlan_hdd_framework_restart(pHddCtx);
+   
+   return status;
+}
+
+
 //Register the module init/exit functions
 module_init(hdd_module_init);
 module_exit(hdd_module_exit);
diff --git a/CORE/HDD/src/wlan_hdd_oemdata.c b/CORE/HDD/src/wlan_hdd_oemdata.c
new file mode 100644
index 0000000..6243662
--- /dev/null
+++ b/CORE/HDD/src/wlan_hdd_oemdata.c
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+/*================================================================================ 
+    \file wlan_hdd_oemdata.c
+  
+    \brief Linux Wireless Extensions for oem data req/rsp
+  
+    $Id: wlan_hdd_oemdata.c,v 1.34 2010/04/15 01:49:23 -- VINAY
+  
+    Copyright (C) Qualcomm Inc.
+    
+================================================================================*/
+
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/wireless.h>
+#include <wlan_hdd_includes.h>
+#include <net/arp.h>
+
+/*---------------------------------------------------------------------------------------------
+
+  \brief hdd_OemDataReqCallback() - 
+
+  This function also reports the results to the user space
+
+  \return - 0 for success, non zero for failure
+
+-----------------------------------------------------------------------------------------------*/
+static eHalStatus hdd_OemDataReqCallback(tHalHandle hHal, 
+        void *pContext,
+        tANI_U32 oemDataReqID,
+        eOemDataReqStatus oemDataReqStatus)
+{
+    eHalStatus status = eHAL_STATUS_SUCCESS;
+    struct net_device *dev = (struct net_device *) pContext;
+    union iwreq_data wrqu;
+    char buffer[IW_CUSTOM_MAX+1];
+
+    memset(&wrqu, '\0', sizeof(wrqu));
+    memset(buffer, '\0', sizeof(buffer));
+
+    //now if the status is success, then send an event up
+    //so that the application can request for the data
+    //else no need to send the event up
+    if(oemDataReqStatus == eOEM_DATA_REQ_FAILURE)
+    {
+        snprintf(buffer, IW_CUSTOM_MAX, "QCOM: OEM-DATA-REQ-FAILED");
+        hddLog(LOGW, "%s: oem data req %d failed\n", __FUNCTION__, oemDataReqID);
+    }
+    else if(oemDataReqStatus == eOEM_DATA_REQ_INVALID_MODE)
+    {
+        snprintf(buffer, IW_CUSTOM_MAX, "QCOM: OEM-DATA-REQ-INVALID-MODE");
+        hddLog(LOGW, "%s: oem data req %d failed because the driver is in invalid mode (IBSS|BTAMP|AP)\n", __FUNCTION__, oemDataReqID);
+    }
+    else
+    {
+        snprintf(buffer, IW_CUSTOM_MAX, "QCOM: OEM-DATA-REQ-SUCCESS");
+        //everything went alright
+    }
+    
+    wrqu.data.pointer = buffer;
+    wrqu.data.length = strlen(buffer);
+        
+    wireless_send_event(dev, IWEVCUSTOM, &wrqu, buffer);
+
+    return status;
+}
+
+/**--------------------------------------------------------------------------------------------
+
+  \brief iw_get_oem_data_rsp() - 
+
+  This function gets the oem data response. This invokes
+  the respective sme functionality. Function for handling the oem data rsp 
+  IOCTL 
+
+  \param - dev  - Pointer to the net device
+         - info - Pointer to the iw_oem_data_req
+         - wrqu - Pointer to the iwreq data
+         - extra - Pointer to the data
+
+  \return - 0 for success, non zero for failure
+
+-----------------------------------------------------------------------------------------------*/
+int iw_get_oem_data_rsp(
+        struct net_device *dev, 
+        struct iw_request_info *info,
+        union iwreq_data *wrqu,
+        char *extra)
+{
+    eHalStatus                            status = eHAL_STATUS_SUCCESS;
+    struct iw_oem_data_rsp*               pHddOemDataRsp;
+    tOemDataRsp*                          pSmeOemDataRsp;
+
+    hdd_adapter_t *pAdapter = (netdev_priv(dev));
+
+    do
+    {
+        //get the oem data response from sme
+        status = sme_getOemDataRsp(WLAN_HDD_GET_HAL_CTX(pAdapter), &pSmeOemDataRsp);
+        if(status != eHAL_STATUS_SUCCESS)
+        {
+            hddLog(LOGE, "%s: failed in sme_getOemDataRsp\n", __FUNCTION__);
+            break;
+        }
+        else
+        {
+            if(pSmeOemDataRsp != NULL)
+            {
+                pHddOemDataRsp = (struct iw_oem_data_rsp*)(extra);
+                vos_mem_copy(pHddOemDataRsp->oemDataRsp, pSmeOemDataRsp->oemDataRsp, OEM_DATA_RSP_SIZE); 
+            }
+            else
+            {
+                hddLog(LOGE, "%s: pSmeOemDataRsp = NULL\n", __FUNCTION__);
+                status = eHAL_STATUS_FAILURE;
+                break;
+            }
+        }
+    } while(0);
+
+    return eHAL_STATUS_SUCCESS;
+}
+
+/**--------------------------------------------------------------------------------------------
+
+  \brief iw_set_oem_data_req() - 
+
+  This function sets the oem data req configuration. This invokes
+  the respective sme oem data req functionality. Function for 
+  handling the set IOCTL for the oem data req configuration
+
+  \param - dev  - Pointer to the net device
+     - info - Pointer to the iw_oem_data_req
+     - wrqu - Pointer to the iwreq data
+     - extra - Pointer to the data
+
+  \return - 0 for success, non zero for failure
+
+-----------------------------------------------------------------------------------------------*/
+int iw_set_oem_data_req(
+        struct net_device *dev, 
+        struct iw_request_info *info,
+        union iwreq_data *wrqu,
+        char *extra)
+{
+    eHalStatus status = eHAL_STATUS_SUCCESS;
+    struct iw_oem_data_req *pOemDataReq = NULL;
+    tOemDataReqConfig oemDataReqConfig;
+
+    tANI_U32 oemDataReqID = 0;
+
+    hdd_adapter_t *pAdapter = (netdev_priv(dev));
+    hdd_wext_state_t *pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
+
+
+    do
+    {
+        if(NULL != wrqu->data.pointer)
+        {
+            pOemDataReq = (struct iw_oem_data_req *)wrqu->data.pointer;
+        }
+
+        if(pOemDataReq == NULL)
+        {
+            hddLog(LOGE, "in %s oemDataReq == NULL\n", __FUNCTION__);
+            status = eHAL_STATUS_FAILURE;
+            break;
+        }
+
+        vos_mem_zero(&oemDataReqConfig, sizeof(tOemDataReqConfig));
+
+        vos_mem_copy((&oemDataReqConfig)->oemDataReq, pOemDataReq->oemDataReq, OEM_DATA_REQ_SIZE);
+    
+        status = sme_OemDataReq(WLAN_HDD_GET_HAL_CTX(pAdapter), 
+                                                pAdapter->sessionId,
+                                                &oemDataReqConfig, 
+                                                &oemDataReqID, 
+                                                &hdd_OemDataReqCallback, 
+                                                dev);
+    
+        pwextBuf->oemDataReqID = oemDataReqID;
+        pwextBuf->oemDataReqInProgress = TRUE;
+
+    } while(0);
+    
+    return status;
+}
+
+
+#endif
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index 5a08e10..418cc70 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -63,7 +63,6 @@
                                                 eHalStatus status )
 {
     hdd_adapter_t *pAdapter = (hdd_adapter_t*) pCtx;
-    hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
     hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR( pAdapter );
     hdd_remain_on_chan_ctx_t *pRemainChanCtx = cfgState->remain_on_chan_ctx;
 
@@ -95,15 +94,11 @@
     vos_mem_free( pRemainChanCtx );
 
     if ( ( WLAN_HDD_INFRA_STATION == pAdapter->device_mode ) ||
-         ( WLAN_HDD_P2P_CLIENT == pAdapter->device_mode )
+         ( WLAN_HDD_P2P_CLIENT == pAdapter->device_mode ) ||
+         ( WLAN_HDD_P2P_DEVICE == pAdapter->device_mode )
        )
     {
         tANI_U8 sessionId = pAdapter->sessionId;
-        if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated)
-        {
-            if ( WLAN_HDD_INFRA_STATION == pAdapter->device_mode )
-                sessionId = pAdapter->p2pSessionId;
-        }
         sme_DeregisterMgmtFrame(
                    hHal, sessionId,
                    (SIR_MAC_MGMT_FRAME << 2) | ( SIR_MAC_MGMT_PROBE_REQ << 4),
@@ -131,7 +126,6 @@
                                    rem_on_channel_request_type_t request_type )
 {
     hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
-    hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
     hdd_remain_on_chan_ctx_t *pRemainChanCtx;
     hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR( pAdapter );
     int status = 0;
@@ -144,9 +138,9 @@
 
     if( cfgState->remain_on_chan_ctx != NULL)
     {
-        /* Wait till remain on channel ready indication before issuing cancel 
-         * remain on channel request, otherwise if remain on channel not 
-         * received and if the driver issues cancel remain on channel then lim 
+        /* Wait till remain on channel ready indication before issuing cancel
+         * remain on channel request, otherwise if remain on channel not
+         * received and if the driver issues cancel remain on channel then lim
          * will be in unknown state.
          */
         status = wait_for_completion_interruptible_timeout(&pAdapter->rem_on_chan_ready_event,
@@ -159,13 +153,14 @@
         }
 
         INIT_COMPLETION(pAdapter->cancel_rem_on_chan_var);
-        
+
         /* Issue abort remain on chan request to sme.
          * The remain on channel callback will make sure the remain_on_chan
          * expired event is sent.
         */
         if ( ( WLAN_HDD_INFRA_STATION == pAdapter->device_mode ) ||
-             ( WLAN_HDD_P2P_CLIENT == pAdapter->device_mode )
+             ( WLAN_HDD_P2P_CLIENT == pAdapter->device_mode ) ||
+             ( WLAN_HDD_P2P_DEVICE == pAdapter->device_mode )
            )
         {
             sme_CancelRemainOnChannel( WLAN_HDD_GET_HAL_CTX( pAdapter ),
@@ -178,14 +173,14 @@
             WLANSAP_CancelRemainOnChannel(
                                      (WLAN_HDD_GET_CTX(pAdapter))->pvosContext);
         }
-        
+
         wait_for_completion_interruptible_timeout(&pAdapter->cancel_rem_on_chan_var,
                msecs_to_jiffies(WAIT_CANCEL_REM_CHAN));
     }
 
-    /* When P2P-GO and if we are trying to unload the driver then 
+    /* When P2P-GO and if we are trying to unload the driver then
      * wlan driver is keep on receiving the remain on channel command
-     * and which is resulting in crash. So not allowing any remain on 
+     * and which is resulting in crash. So not allowing any remain on
      * channel requets when Load/Unload is in progress*/
     if (((hdd_context_t*)pAdapter->pHddCtx)->isLoadUnloadInProgress)
     {
@@ -219,15 +214,11 @@
 
     //call sme API to start remain on channel.
     if ( ( WLAN_HDD_INFRA_STATION == pAdapter->device_mode ) ||
-         ( WLAN_HDD_P2P_CLIENT == pAdapter->device_mode )
+         ( WLAN_HDD_P2P_CLIENT == pAdapter->device_mode ) ||
+         ( WLAN_HDD_P2P_DEVICE == pAdapter->device_mode )
        )
     {
-        tANI_U8 sessionId = pAdapter->sessionId; 
-        if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated)
-        {
-            if ( WLAN_HDD_INFRA_STATION == pAdapter->device_mode )
-                sessionId = pAdapter->p2pSessionId;
-        }
+        tANI_U8 sessionId = pAdapter->sessionId;
         //call sme API to start remain on channel.
         sme_RemainOnChannel(
                        WLAN_HDD_GET_HAL_CTX(pAdapter), sessionId,
@@ -253,7 +244,7 @@
            VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
                     "%s: WLANSAP_RemainOnChannel returned fail", __func__);
            cfgState->remain_on_chan_ctx = NULL;
-           vos_mem_free (pRemainChanCtx);             
+           vos_mem_free (pRemainChanCtx);
            return -EINVAL;
         }
 
@@ -320,7 +311,6 @@
                                       struct net_device *dev, u64 cookie )
 {
     hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
-    hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
     hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR( pAdapter );
     int status = 0;
 
@@ -354,15 +344,11 @@
      * expired event is sent.
      */
     if ( ( WLAN_HDD_INFRA_STATION == pAdapter->device_mode ) ||
-         ( WLAN_HDD_P2P_CLIENT == pAdapter->device_mode )
+         ( WLAN_HDD_P2P_CLIENT == pAdapter->device_mode ) ||
+         ( WLAN_HDD_P2P_DEVICE == pAdapter->device_mode )
        )
     {
         tANI_U8 sessionId = pAdapter->sessionId; 
-        if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated)
-        {
-            if ( WLAN_HDD_INFRA_STATION == pAdapter->device_mode )
-                sessionId = pAdapter->p2pSessionId;
-        }
         sme_CancelRemainOnChannel( WLAN_HDD_GET_HAL_CTX( pAdapter ),
                                             sessionId );
     }
@@ -407,11 +393,25 @@
 {
     hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR( dev );
     hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR( pAdapter );
-    hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
+    tANI_U16 extendedWait = 0;
+    tANI_U8 type = WLAN_HDD_GET_TYPE_FRM_FC(buf[0]);
+    tANI_U8 subType = WLAN_HDD_GET_SUBTYPE_FRM_FC(buf[0]);
+    tActionFrmType actionFrmType;
+    bool noack = 0;
+
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
     hdd_adapter_t *goAdapter;
 #endif
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+    noack = dont_wait_for_ack;
+#endif
+
+    //If the wait is coming as 0 with off channel set
+    //then set the wait to 200 ms
+    if (offchan && !wait)
+        wait = ACTION_FRAME_DEFAULT_WAIT;
+
     hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
                             __func__,pAdapter->device_mode);
 
@@ -422,8 +422,6 @@
          ( WLAN_HDD_P2P_GO == pAdapter->device_mode )
        )
     {
-        tANI_U8 type = WLAN_HDD_GET_TYPE_FRM_FC(buf[0]);
-        tANI_U8 subType = WLAN_HDD_GET_SUBTYPE_FRM_FC(buf[0]);
         if (type == SIR_MAC_MGMT_FRAME)
         {
             if (subType == SIR_MAC_MGMT_PROBE_RSP)
@@ -436,23 +434,21 @@
             else if ((subType == SIR_MAC_MGMT_DISASSOC) ||
                     (subType == SIR_MAC_MGMT_DEAUTH))
             {
-                /* Deauth/Disassoc received from supplicant, If we simply 
-                 * transmit the frame over air, driver doesn't come to know 
-                 * about the deauth/disassoc. Because of this reason the 
-                 * supplicant and driver will be out of sync.
-                 * Drop the frame here and initiate the disassoc procedure 
-                 * from driver, the core stack will take care of sending
-                 * disassoc frame and indicating corresponding events to supplicant.
+                /* During EAP failure or P2P Group Remove supplicant
+                 * is sending del_station command to driver. From
+                 * del_station function, Driver will send deauth frame to
+                 * p2p client. No need to send disassoc frame from here.
+                 * so Drop the frame here and send tx indication back to
+                 * supplicant.
                  */
                 tANI_U8 dstMac[ETH_ALEN] = {0};
                 memcpy(&dstMac, &buf[WLAN_HDD_80211_FRM_DA_OFFSET], ETH_ALEN);
-                hddLog(VOS_TRACE_LEVEL_INFO, 
+                hddLog(VOS_TRACE_LEVEL_INFO,
                         "%s: Deauth/Disassoc received for STA:"
-                        "%02x:%02x:%02x:%02x:%02x:%02x", 
-                        __func__, 
-                        dstMac[0], dstMac[1], dstMac[2], 
+                        "%02x:%02x:%02x:%02x:%02x:%02x",
+                        __func__,
+                        dstMac[0], dstMac[1], dstMac[2],
                         dstMac[3], dstMac[4], dstMac[5]);
-                hdd_softap_sta_disassoc(pAdapter, (v_U8_t *)&dstMac);
                 goto err_rem_channel;
             }
         }
@@ -487,6 +483,8 @@
            (cfgState->current_freq == chan->center_freq)
           )
         {
+            hddLog(LOG1,"action frame: extending the wait time\n");
+            extendedWait = (tANI_U16)wait;
             goto send_frame;
         }
 
@@ -519,8 +517,8 @@
     }
     else if ( offchan )
     {
-        /* Check before sending action frame 
-           whether we already remain on channel */ 
+        /* Check before sending action frame
+           whether we already remain on channel */
         if(NULL == cfgState->remain_on_chan_ctx)
         {
             goto err_rem_channel;
@@ -529,47 +527,59 @@
     send_frame:
 #endif
 
-    cfgState->buf = vos_mem_malloc( len ); //buf;
-    if( cfgState->buf == NULL )
-        return -ENOMEM;
+    if(!noack)
+    {
+        cfgState->buf = vos_mem_malloc( len ); //buf;
+        if( cfgState->buf == NULL )
+            return -ENOMEM;
 
-    cfgState->len = len;
+        cfgState->len = len;
 
-    vos_mem_copy( cfgState->buf, buf, len);
+        vos_mem_copy( cfgState->buf, buf, len);
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
-    if( cfgState->remain_on_chan_ctx )
-    {
-        cfgState->action_cookie = cfgState->remain_on_chan_ctx->cookie;
-        *cookie = cfgState->action_cookie;
-    }
-    else
-    {
+        if( cfgState->remain_on_chan_ctx )
+        {
+            cfgState->action_cookie = cfgState->remain_on_chan_ctx->cookie;
+            *cookie = cfgState->action_cookie;
+        }
+        else
+        {
 #endif
-        *cookie = (tANI_U32) cfgState->buf;
-        cfgState->action_cookie = *cookie;
+            *cookie = (tANI_U32) cfgState->buf;
+            cfgState->action_cookie = *cookie;
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
-    }
+        }
 #endif
+    } 
 
     if ( (WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
-         (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode)
+         (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) ||
+         ( WLAN_HDD_P2P_DEVICE == pAdapter->device_mode )
        )
     {
-        tANI_U8 sessionId = pAdapter->sessionId; 
-        if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated)
+        tANI_U8 sessionId = pAdapter->sessionId;
+        if ((type == SIR_MAC_MGMT_FRAME) &&
+                (subType == SIR_MAC_MGMT_ACTION) &&
+                (buf[WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET] == WLAN_HDD_PUBLIC_ACTION_FRAME))
         {
-            if ( WLAN_HDD_INFRA_STATION == pAdapter->device_mode )
+            actionFrmType = buf[WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET];
+            hddLog(LOG1, "Tx Action Frame %u \n", actionFrmType);
+            if (actionFrmType == WLAN_HDD_PROV_DIS_REQ)
             {
-                sessionId = pAdapter->p2pSessionId;
-                vos_mem_copy((void*) (&buf[10]), 
-                             (void*) (&pHddCtx->p2pDeviceAddress.bytes[0]),
-                                     sizeof(tSirMacAddr));
+                cfgState->actionFrmState = HDD_PD_REQ_ACK_PENDING;
+                hddLog(LOG1, "%s: HDD_PD_REQ_ACK_PENDING \n", __func__);
+            }
+            else if (actionFrmType == WLAN_HDD_GO_NEG_REQ)
+            {
+                cfgState->actionFrmState = HDD_GO_NEG_REQ_ACK_PENDING;
+                hddLog(LOG1, "%s: HDD_GO_NEG_REQ_ACK_PENDING \n", __func__);
             }
         }
+
         if (eHAL_STATUS_SUCCESS !=
                sme_sendAction( WLAN_HDD_GET_HAL_CTX(pAdapter),
-                               sessionId, buf, len) )
+                               sessionId, buf, len, extendedWait, noack))
         {
             VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
                      "%s: sme_sendAction returned fail", __func__);
@@ -582,7 +592,7 @@
      {
         if( VOS_STATUS_SUCCESS !=
              WLANSAP_SendAction( (WLAN_HDD_GET_CTX(pAdapter))->pvosContext,
-                                  buf, len ) )
+                                  buf, len, 0 ) )
         {
             VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
                     "%s: WLANSAP_SendAction returned fail", __func__);
@@ -592,7 +602,10 @@
 
     return 0;
 err:
-    hdd_sendActionCnf( pAdapter, FALSE );
+    if(!noack)
+    {
+       hdd_sendActionCnf( pAdapter, FALSE );
+    }
     return 0;
 err_rem_channel:
     *cookie = (tANI_U32)cfgState;
@@ -613,10 +626,11 @@
 {
     hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR( pAdapter );
 
+    cfgState->actionFrmState = HDD_IDLE;
+
     hddLog( LOG1, "Send Action cnf, actionSendSuccess %d", actionSendSuccess);
     if( NULL == cfgState->buf )
     {
-        VOS_ASSERT( cfgState->buf );
         return;
     }
 
@@ -988,7 +1002,9 @@
     int needed_headroom = 0;
     int flag = HDD_RX_FLAG_IV_STRIPPED | HDD_RX_FLAG_DECRYPTED |
                HDD_RX_FLAG_MMIC_STRIPPED;
-
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+    hdd_context_t* pHddCtx = (hdd_context_t*)(pMonAdapter->pHddCtx);
+#endif
     hddLog( LOG1, FL("Indicate Frame over Monitor Intf"));
 
     VOS_ASSERT( (pbFrames != NULL) );
@@ -1031,6 +1047,9 @@
      skb->dev = pMonAdapter->dev;
      skb->protocol = eth_type_trans( skb, skb->dev );
      skb->ip_summed = CHECKSUM_UNNECESSARY;
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+     wake_lock_timeout(&pHddCtx->rx_wake_lock, HDD_WAKE_LOCK_DURATION);
+#endif
      rxstat = netif_rx_ni(skb);
      if( NET_RX_SUCCESS == rxstat )
      {
@@ -1049,6 +1068,10 @@
                             tANI_U32 rxChan )
 {
     tANI_U16 freq;
+    tANI_U8 type = 0;
+    tANI_U8 subType = 0; 
+    tActionFrmType actionFrmType;
+    hdd_cfg80211_state_t *cfgState = NULL;
 
     hddLog(VOS_TRACE_LEVEL_INFO, "%s: Frame Type = %d Frame Length = %d\n",
             __func__, frameType, nFrameLength);
@@ -1106,6 +1129,27 @@
                 IEEE80211_BAND_5GHZ);
     }
 
+    type = WLAN_HDD_GET_TYPE_FRM_FC(pbFrames[0]);
+    subType = WLAN_HDD_GET_SUBTYPE_FRM_FC(pbFrames[0]);
+    cfgState = WLAN_HDD_GET_CFG_STATE_PTR( pAdapter );
+    
+    if ((type == SIR_MAC_MGMT_FRAME) && 
+            (subType == SIR_MAC_MGMT_ACTION) &&
+            (pbFrames[WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET] == WLAN_HDD_PUBLIC_ACTION_FRAME))
+    {
+        actionFrmType = pbFrames[WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET];
+        hddLog(LOG1, "Rx Action Frame %u \n", actionFrmType);
+        if (((actionFrmType == WLAN_HDD_PROV_DIS_RESP) &&
+                    (cfgState->actionFrmState == HDD_PD_REQ_ACK_PENDING)) ||
+                ((actionFrmType == WLAN_HDD_GO_NEG_RESP) &&
+                 (cfgState->actionFrmState == HDD_GO_NEG_REQ_ACK_PENDING)))
+        {
+            hddLog(LOG1, "%s: ACK_PENDING and But received RESP for Action frame ", 
+                    __func__);
+            hdd_sendActionCnf(pAdapter, TRUE);
+        }
+    }
+
     //Indicate Frame Over Normal Interface
     hddLog( LOG1, FL("Indicate Frame over NL80211 Interface"));
 
@@ -1166,6 +1210,9 @@
     struct ieee80211_radiotap_header *rthdr;
     unsigned char *pos;
     struct sk_buff *skb = cfgState->skb;
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+    hdd_context_t *pHddCtx = (hdd_context_t*)(pAdapter->pHddCtx);
+#endif
 
     /* 2 Byte for TX flags and 1 Byte for Retry count */
     u32 rtHdrLen = sizeof(*rthdr) + 3;
@@ -1225,6 +1272,9 @@
     skb->pkt_type  = PACKET_OTHERHOST;
     skb->protocol  = htons(ETH_P_802_2);
     memset( skb->cb, 0, sizeof( skb->cb ) );
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+    wake_lock_timeout(&pHddCtx->rx_wake_lock, HDD_WAKE_LOCK_DURATION);
+#endif
     if (in_interrupt())
         netif_rx( skb );
     else
diff --git a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
index 4ba1d4a..b218471 100644
--- a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
@@ -1220,6 +1220,9 @@
 
          skb->protocol = eth_type_trans(skb, skb->dev);
          skb->ip_summed = CHECKSUM_UNNECESSARY;
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+         wake_lock_timeout(&pHddCtx->rx_wake_lock, HDD_WAKE_LOCK_DURATION);
+#endif
          rxstat = netif_rx_ni(skb);
          if (NET_RX_SUCCESS == rxstat)
          {
diff --git a/CORE/HDD/src/wlan_hdd_tx_rx.c b/CORE/HDD/src/wlan_hdd_tx_rx.c
index 9b5c6ec..e8ecc88 100644
--- a/CORE/HDD/src/wlan_hdd_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_tx_rx.c
@@ -319,7 +319,7 @@
 
    if (VOS_STATUS_SUCCESS != 
       WLANSAP_SendAction( (WLAN_HDD_GET_CTX(pAdapter))->pvosContext,
-                           skb->data, skb->len) )
+                           skb->data, skb->len, 0) )
    {
       VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
           "%s: WLANSAP_SendAction returned fail", __func__);
@@ -1316,13 +1316,23 @@
          VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,"%s: Failure extracting skb from vos pkt", __FUNCTION__);
          return VOS_STATUS_E_FAILURE;
       }
-   
+
+      if (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)
+      {
+         VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
+           "Magic cookie(%x) for adapter sanity verification is invalid", pAdapter->magic);
+         return eHAL_STATUS_FAILURE;
+      }
+
       skb->dev = pAdapter->dev;
       skb->protocol = eth_type_trans(skb, skb->dev);
       skb->ip_summed = CHECKSUM_UNNECESSARY;
       ++pAdapter->hdd_stats.hddTxRxStats.rxPackets;
       ++pAdapter->stats.rx_packets;
       pAdapter->stats.rx_bytes += skb->len;
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+      wake_lock_timeout(&pHddCtx->rx_wake_lock, HDD_WAKE_LOCK_DURATION);
+#endif
       rxstat = netif_rx_ni(skb);
       if (NET_RX_SUCCESS == rxstat)
       {
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 2624093..3041f23 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -100,6 +100,9 @@
 extern void hdd_resume_wlan(struct early_suspend *wlan_suspend);
 #endif
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+#define MAX_OEM_DATA_RSP_LEN 1024
+#endif
 
 #define HDD_FINISH_ULA_TIME_OUT    800
 
@@ -182,6 +185,9 @@
 #define WE_GET_CFG           3
 #define WE_GET_WMM_STATUS    4
 #define WE_GET_CHANNEL_LIST  5
+#ifdef WLAN_FEATURE_11AC
+#define WE_GET_RSSI          6
+#endif
 
 /* Private ioctls and their sub-ioctls */
 #define WLAN_PRIV_SET_NONE_GET_NONE   (SIOCIWFIRSTPRIV + 6)
@@ -219,6 +225,11 @@
 #define WAPI_CERT_AKM_SUITE 0x01721400
 #endif
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/* Private ioctls for setting the measurement configuration */
+#define WLAN_PRIV_SET_OEM_DATA_REQ (SIOCIWFIRSTPRIV + 17)
+#define WLAN_PRIV_GET_OEM_DATA_RSP (SIOCIWFIRSTPRIV + 19)
+#endif
 
 #ifdef WLAN_FEATURE_VOWIFI_11R
 #define WLAN_PRIV_SET_FTIES             (SIOCIWFIRSTPRIV + 20)
@@ -267,6 +278,13 @@
 #define WLAN_STATS_RX_RATE            14
 #define WLAN_STATS_TX_RATE            15
 
+#define WLAN_STATS_RX_UC_BYTE_CNT     16
+#define WLAN_STATS_RX_MC_BYTE_CNT     17
+#define WLAN_STATS_RX_BC_BYTE_CNT     18
+#define WLAN_STATS_TX_UC_BYTE_CNT     19
+#define WLAN_STATS_TX_MC_BYTE_CNT     20
+#define WLAN_STATS_TX_BC_BYTE_CNT     21
+
 #define FILL_TLV(__p, __type, __size, __val, __tlen) \
 {\
     if ((__tlen + __size + 2) < WE_MAX_STR_LEN) \
@@ -295,8 +313,9 @@
 #define WLAN_HDD_UI_SET_BAND_VALUE_OFFSET         8
 
 #ifdef WLAN_FEATURE_PACKET_FILTERING
-int wlan_hdd_set_filter(hdd_context_t *pHddCtx, tpPacketFilterCfg pRequest);
-void wlan_hdd_set_mc_addr_list(hdd_context_t *pHddCtx, v_U8_t set);
+int wlan_hdd_set_filter(hdd_context_t *pHddCtx, tpPacketFilterCfg pRequest, 
+                           v_U8_t sessionId);
+void wlan_hdd_set_mc_addr_list(hdd_context_t *pHddCtx, v_U8_t set, v_U8_t sessionId);
 #endif
 
 #ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
@@ -408,13 +427,21 @@
 
 int hdd_wlan_get_freq(v_U32_t channel, v_U32_t *pfreq)
 {
-     if((channel > 0) && (channel <= (FREQ_CHAN_MAP_TABLE_SIZE - 1)))
-     {
-       *pfreq = freq_chan_map[channel - 1].freq * 100000;
-       return 0;
-     }
-     else
-       return -EINVAL;
+    int i;
+    if (channel > 0)
+    {
+        for (i=0; i < FREQ_CHAN_MAP_TABLE_SIZE; i++)
+        {
+            if (channel == freq_chan_map[i].chan)
+            {
+                *pfreq = freq_chan_map[i].freq;
+                return 1;
+            }
+        }
+    }
+    VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+                               ("Invalid channel no=%d!!\n"), channel);
+    return -EINVAL;
 }
 
 static v_BOOL_t
@@ -1076,7 +1103,7 @@
 static int iw_get_freq(struct net_device *dev, struct iw_request_info *info,
              struct iw_freq *fwrq, char *extra)
 {
-   v_U32_t status = 0,channel,freq = 0;
+   v_U32_t status = FALSE, channel = 0, freq = 0;
    hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
    tHalHandle hHal;
    hdd_wext_state_t *pWextState;
@@ -1103,18 +1130,31 @@
        }
        else
        {
-          fwrq->m = channel;
-          fwrq->e = 0;
+           status = hdd_wlan_get_freq(channel, &freq);
+           if( TRUE == status )
+           {
+               /* Set Exponent parameter as 6 (MHZ) in struct iw_freq
+                * iwlist & iwconfig command shows frequency into proper
+                * format (2.412 GHz instead of 246.2 MHz)*/
+               fwrq->m = freq;
+               fwrq->e = MHZ;
+           }
        }
     }
     else
     {
        channel = pHddStaCtx->conn_info.operationChannel;
-       status = hdd_wlan_get_freq(channel,&freq);
-       fwrq->m = freq;
-       fwrq->e = 0;
+       status = hdd_wlan_get_freq(channel, &freq);
+       if( TRUE == status )
+       {
+          /* Set Exponent parameter as 6 (MHZ) in struct iw_freq
+           * iwlist & iwconfig command shows frequency into proper
+           * format (2.412 GHz instead of 246.2 MHz)*/
+           fwrq->m = freq;
+           fwrq->e = MHZ;
+       }
     }
-   return status;
+   return 0;
 }
 
 static int iw_get_tx_power(struct net_device *dev,
@@ -3760,7 +3800,17 @@
             wrqu->data.length = strlen(extra)+1;
             break;
         }
-
+#ifdef WLAN_FEATURE_11AC
+        case WE_GET_RSSI:
+        {
+            v_S7_t s7Rssi = 0;
+            wlan_hdd_get_rssi(pAdapter, &s7Rssi);
+            snprintf(extra, WE_MAX_STR_LEN, "rssi=%d",s7Rssi);
+            wrqu->data.length = strlen(extra)+1;
+            break;
+        }
+#endif
+           
         case WE_GET_WMM_STATUS:
         {
             snprintf(extra, WE_MAX_STR_LEN,
@@ -3786,6 +3836,7 @@
                     pAdapter->hddWmmStatus.wmmAcStatus[WLANTL_AC_BK].wmmAcAccessAllowed?"YES":"NO",
                     pAdapter->hddWmmStatus.wmmAcStatus[WLANTL_AC_BK].wmmAcTspecInfo.ts_info.direction);
 
+
             wrqu->data.length = strlen(extra)+1;
             break;
         }
@@ -4565,7 +4616,8 @@
        exactly the same.  Otherwise, each piece of information would have to be
        copied individually. */
     memcpy(&offloadRequest, pRequest, wrqu->data.length);
-    if (eHAL_STATUS_SUCCESS != sme_SetHostOffload(WLAN_HDD_GET_HAL_CTX(pAdapter), &offloadRequest))
+    if (eHAL_STATUS_SUCCESS != sme_SetHostOffload(WLAN_HDD_GET_HAL_CTX(pAdapter),
+                                        pAdapter->sessionId, &offloadRequest))
     {
         hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Failure to execute host offload request\n",
                __func__);
@@ -4628,7 +4680,8 @@
 
        hddLog(VOS_TRACE_LEVEL_ERROR, "set Keep: TP before SME %d\n", keepaliveRequest.timePeriod);
 
-    if (eHAL_STATUS_SUCCESS != sme_SetKeepAlive(WLAN_HDD_GET_HAL_CTX(pAdapter), &keepaliveRequest))
+    if (eHAL_STATUS_SUCCESS != sme_SetKeepAlive(WLAN_HDD_GET_HAL_CTX(pAdapter), 
+                                        pAdapter->sessionId, &keepaliveRequest))
     {
         hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Failure to execute Keep Alive\n",
                __func__);
@@ -4639,7 +4692,8 @@
 }
 
 #ifdef WLAN_FEATURE_PACKET_FILTERING
-int wlan_hdd_set_filter(hdd_context_t *pHddCtx, tpPacketFilterCfg pRequest)
+int wlan_hdd_set_filter(hdd_context_t *pHddCtx, tpPacketFilterCfg pRequest, 
+                            tANI_U8 sessionId)
 {
     tSirRcvPktFilterCfgType    packetFilterSetReq;
     tSirRcvFltPktClearParam    packetFilterClrReq;
@@ -4703,7 +4757,7 @@
                         pRequest->paramsData[i].dataMask[4], pRequest->paramsData[i].dataMask[5]);
             }
 
-            if (eHAL_STATUS_SUCCESS != sme_ReceiveFilterSetFilter(pHddCtx, &packetFilterSetReq))
+            if (eHAL_STATUS_SUCCESS != sme_ReceiveFilterSetFilter(pHddCtx, &packetFilterSetReq, sessionId))
             {
                 hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Failure to execute Set Filter\n",
                         __func__);
@@ -4717,7 +4771,7 @@
             hddLog(VOS_TRACE_LEVEL_INFO_HIGH, "%s: Clear Packet Filter Request for Id: %d\n",
                     __FUNCTION__, pRequest->filterId);
             packetFilterClrReq.filterId = pRequest->filterId;
-            if (eHAL_STATUS_SUCCESS != sme_ReceiveFilterClearFilter(pHddCtx, &packetFilterClrReq))
+            if (eHAL_STATUS_SUCCESS != sme_ReceiveFilterClearFilter(pHddCtx, &packetFilterClrReq, sessionId))
             {
                 hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Failure to execute Clear Filter\n",
                         __func__);
@@ -4733,7 +4787,7 @@
     return 0;
 }
 
-void wlan_hdd_set_mc_addr_list(hdd_context_t *pHddCtx, v_U8_t set)
+void wlan_hdd_set_mc_addr_list(hdd_context_t *pHddCtx, v_U8_t set, v_U8_t sessionId)
 {
     v_U8_t filterAction = 0; 
     tPacketFilterCfg request = {0}; 
@@ -4768,7 +4822,7 @@
                     request.paramsData[0].compareData[4], 
                     request.paramsData[0].compareData[5]);
         }
-        wlan_hdd_set_filter(pHddCtx, &request);
+        wlan_hdd_set_filter(pHddCtx, &request, sessionId);
     }
     pHddCtx->mc_addr_list.isFilterApplied = set ? TRUE : FALSE;
 }
@@ -4778,7 +4832,7 @@
 {   
     hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
     tpPacketFilterCfg pRequest = (tpPacketFilterCfg)wrqu->data.pointer;
-    return wlan_hdd_set_filter(WLAN_HDD_GET_CTX(pAdapter), pRequest);
+    return wlan_hdd_set_filter(WLAN_HDD_GET_CTX(pAdapter), pRequest, pAdapter->sessionId);
 }
 #endif
 static int iw_get_statistics(struct net_device *dev,
@@ -4904,9 +4958,9 @@
               (char*) &(pStats->rx_error_cnt),
               tlen);
 
-    FILL_TLV(p, (tANI_U8)WLAN_STATS_TX_BYTE_CNT,
-              (tANI_U8) sizeof (pStats->tx_byte_cnt),
-              (char*) &(pStats->tx_byte_cnt),
+    FILL_TLV(p, (tANI_U8)WLAN_STATS_TX_BYTE_CNT, 
+              (tANI_U8) sizeof (dStats->tx_uc_byte_cnt[0]),
+              (char*) &(dStats->tx_uc_byte_cnt[0]), 
               tlen);
 
     FILL_TLV(p, (tANI_U8)WLAN_STATS_RX_BYTE_CNT,
@@ -4925,6 +4979,31 @@
               (char*) &(aStats->tx_rate),
               tlen);
 
+    FILL_TLV(p, (tANI_U8)WLAN_STATS_RX_UC_BYTE_CNT, 
+              (tANI_U8) sizeof (dStats->rx_uc_byte_cnt[0]), 
+              (char*) &(dStats->rx_uc_byte_cnt[0]), 
+              tlen);
+    FILL_TLV(p, (tANI_U8)WLAN_STATS_RX_MC_BYTE_CNT, 
+              (tANI_U8) sizeof (dStats->rx_mc_byte_cnt), 
+              (char*) &(dStats->rx_mc_byte_cnt), 
+              tlen);
+    FILL_TLV(p, (tANI_U8)WLAN_STATS_RX_BC_BYTE_CNT, 
+              (tANI_U8) sizeof (dStats->rx_bc_byte_cnt), 
+              (char*) &(dStats->rx_bc_byte_cnt), 
+              tlen);
+    FILL_TLV(p, (tANI_U8)WLAN_STATS_TX_UC_BYTE_CNT, 
+              (tANI_U8) sizeof (dStats->tx_uc_byte_cnt[0]), 
+              (char*) &(dStats->tx_uc_byte_cnt[0]), 
+              tlen);
+    FILL_TLV(p, (tANI_U8)WLAN_STATS_TX_MC_BYTE_CNT, 
+              (tANI_U8) sizeof (dStats->tx_mc_byte_cnt), 
+              (char*) &(dStats->tx_mc_byte_cnt), 
+              tlen);
+    FILL_TLV(p, (tANI_U8)WLAN_STATS_TX_BC_BYTE_CNT, 
+              (tANI_U8) sizeof (dStats->tx_bc_byte_cnt), 
+              (char*) &(dStats->tx_bc_byte_cnt), 
+              tlen);
+
     wrqu->data.length = tlen;
 
   }
@@ -5491,7 +5570,16 @@
     }
 
     uTotalSize -= nOffset;
+    VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, 
+              "Power request parameter %d Total size", 
+              uTotalSize);
     ptr += nOffset;
+    /* This is added for dynamic Tele LI enable (0xF1) /disable (0xF0)*/
+    if(!(uTotalSize - nOffset) && 
+       (powerRequest.uListenInterval != SIR_NOCHANGE_POWER_VALUE))
+    {
+        uTotalSize = 0;
+    }
 
   }/*Go for as long as we have a valid string*/
 
@@ -5582,6 +5670,10 @@
    [WLAN_PRIV_ADD_TSPEC             - SIOCIWFIRSTPRIV]   = iw_add_tspec,
    [WLAN_PRIV_DEL_TSPEC             - SIOCIWFIRSTPRIV]   = iw_del_tspec,
    [WLAN_PRIV_GET_TSPEC             - SIOCIWFIRSTPRIV]   = iw_get_tspec,
+#ifdef FEATURE_OEM_DATA_SUPPORT
+   [WLAN_PRIV_SET_OEM_DATA_REQ - SIOCIWFIRSTPRIV] = iw_set_oem_data_req, //oem data req Specifc
+   [WLAN_PRIV_GET_OEM_DATA_RSP - SIOCIWFIRSTPRIV] = iw_get_oem_data_rsp, //oem data req Specifc
+#endif
 
 #ifdef FEATURE_WLAN_WAPI
    [WLAN_PRIV_SET_WAPI_MODE             - SIOCIWFIRSTPRIV]  = iw_qcom_set_wapi_mode,
@@ -5801,6 +5893,12 @@
         0,
         IW_PRIV_TYPE_CHAR| WE_MAX_STR_LEN,
         "getConfig" },
+#ifdef WLAN_FEATURE_11AC
+    {   WE_GET_RSSI,
+        0,
+        IW_PRIV_TYPE_CHAR| WE_MAX_STR_LEN,
+        "getRSSI" },
+#endif
     {   WE_GET_WMM_STATUS,
         0,
         IW_PRIV_TYPE_CHAR| WE_MAX_STR_LEN,
@@ -5869,6 +5967,21 @@
         IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
         "getTspec" },
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+    /* handlers for main ioctl - OEM DATA */
+    {
+        WLAN_PRIV_SET_OEM_DATA_REQ,
+        IW_PRIV_TYPE_BYTE | sizeof(struct iw_oem_data_req) | IW_PRIV_SIZE_FIXED,
+        0,
+        "set_oem_data_req" },
+
+    /* handlers for main ioctl - OEM DATA */
+    {
+        WLAN_PRIV_GET_OEM_DATA_RSP,
+        0,
+        IW_PRIV_TYPE_BYTE | MAX_OEM_DATA_RSP_LEN,
+        "get_oem_data_rsp" },
+#endif
 
 #ifdef FEATURE_WLAN_WAPI
    /* handlers for main ioctl SET_WAPI_MODE */
diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h
index 880a6bf..7e55f06 100644
--- a/CORE/MAC/inc/aniGlobal.h
+++ b/CORE/MAC/inc/aniGlobal.h
@@ -82,6 +82,9 @@
 #include "btcApi.h"
 #include "csrInternal.h"
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+#include "oemDataInternal.h" 
+#endif
 
 #if defined WLAN_FEATURE_VOWIFI
 #include "smeRrmInternal.h"
@@ -342,6 +345,7 @@
 #ifdef WLAN_FEATURE_P2P
     // This variable store the total duration to do scan
     tANI_U32 gTotalScanDuration;
+    tANI_U32 p2pRemOnChanTimeStamp;
 #endif    
 
     // abort scan is used to abort an on-going scan
@@ -544,9 +548,9 @@
     tANI_U8    fScanDisabled;
     //Can be set to invalid channel. If it is invalid, HAL
     //should move to previous valid channel or stay in the
-    //current channel.
-    tANI_U16   gResumeChannel;
-    //TODO - Add CB state here.
+    //current channel. CB state goes along with channel to resume to
+    tANI_U16    gResumeChannel;
+    ePhyChanBondState    gResumePhyCbState;
 #endif // GEN4_SCAN
 
     // Change channel generic scheme
@@ -579,7 +583,7 @@
     tANI_U32           propRateAdjustPeriod;
     tANI_U32           scanStartTime;    // used to measure scan time
 
-    tANI_U8            gLimBssid[6];
+    //tANI_U8            gLimBssid[6];
     tANI_U8            gLimMyMacAddr[6];
     tANI_U8            ackPolicy;
 
@@ -704,7 +708,7 @@
 
     // Place holder for Join request that we're
     // currently attempting
-    tLimMlmJoinReq       *gpLimMlmJoinReq;
+    //tLimMlmJoinReq       *gpLimMlmJoinReq;
 
     // Reason code to determine the channel change context while sending 
     // WDA_CHNL_SWITCH_REQ message to HAL       
@@ -737,27 +741,6 @@
     //////////////////////////////////////////     ASSOC RELATED END ///////////////////////////////////////////
 
 
-    // 11h Spectrum Management Related Flag
-    tANI_U32           gLim11hEnable;
-    tLimSpecMgmtInfo   gLimSpecMgmt;
-    // CB Primary/Secondary Channel Switch Info
-    tLimChannelSwitchInfo  gLimChannelSwitch;
-
-
-    // Channel Bonding mode, as configured by SME
-    tANI_U8 gCbMode;
-
-    //
-    // Identifies the runtime OPERATIONAL state of Channel
-    // Bonding. This info is encoded as a bitmap, as
-    // configured via gCbMode.
-    //
-    //  b7  b6  b5  b4  b3  b2  b1  b0
-    // --------------------------------
-    // | X | X | X | AU|CS|U/D| O | A |
-    // --------------------------------
-    //
-    tANI_U8 gCbState;
 
     //
     // For DEBUG purposes
@@ -768,24 +751,6 @@
     // Holds the desired tSirScanType, as requested by SME
     tSirScanType gLimScanOverrideSaved;
 
-    // Override with this Phy CB state always
-    //ePhyChanBondState gLimPhyCBState;
-
-    // When operating with -
-    // a) Channel Bonding mode (as configured by SME) AND
-    // b) CB State protection turned ON
-    // this object will save the CB state as desired by SME
-    //
-    // This object mimics the bitmap encoding of the
-    // gCbState object, as follows:
-    //
-    //  b7  b6  b5  b4  b3  b2  b1  b0
-    // --------------------------------
-    // | X | X | X | AU|CS|U/D| O | A |
-    // --------------------------------
-    //
-    tANI_U8 gCbStateProtected;
-
     //
     // CB State protection, operated upon as follows:
     // 1 - CB is enabled in the hardware ONLY WHEN a Titan
@@ -822,10 +787,6 @@
 
     tANI_U8 gHTGreenfield;
 
-    //0-20Mhz
-    //1-40Mhz
-    tANI_U8 gHTSupportedChannelWidthSet;
-
     tANI_U8 gHTShortGI40Mhz;
     tANI_U8 gHTShortGI20Mhz;
 
@@ -886,15 +847,6 @@
     tANI_U8 gHTRifsMode;
    // OBss Mode . set when we have Non HT STA is associated or with in overlap bss
     tANI_U8  gHTObssMode;
-    //
-    // Recommended Tx Width Set
-    // 0 - use 20 MHz channel (control channel)
-    // 1 - use channel width enabled under Supported Channel Width Set
-    //
-    tANI_U8 gHTRecommendedTxWidthSet;
-
-    // Identifies the 40 MHz extension channel
-    tSirMacHTSecondaryChannelOffset gHTSecondaryChannelOffset;
 
     // Identifies the current Operating Mode
     tSirMacHTOperatingMode gHTOperMode;
@@ -946,12 +898,21 @@
     tANI_U8   gSmeSessionId;
     tANI_U16 gTransactionId;
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+tLimMlmOemDataReq       *gpLimMlmOemDataReq;
+tLimMlmOemDataRsp       *gpLimMlmOemDataRsp;
+#endif
 
 #ifdef WLAN_FEATURE_P2P
     tSirRemainOnChnReq  *gpLimRemainOnChanReq; //hold remain on chan request in this buf
     vos_list_t  gLimMgmtFrameRegistratinQueue;
     tANI_U32    actionFrameSessionId;
 #endif
+#ifdef WLAN_FEATURE_11AC
+    tANI_U8    vhtCapabilityPresentInBeacon;
+    tANI_U8    apCenterChan;
+    tANI_U8    apChanWidth;
+#endif
 } tAniSirLim, *tpAniSirLim;
 
 #ifdef WLAN_FEATURE_P2P
@@ -1083,6 +1044,9 @@
     tCsrScanStruct scan;
     tCsrRoamStruct roam;
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+    tOemDataStruct oemData;
+#endif
 
 #ifdef ANI_PRODUCT_TYPE_CLIENT
     tPmcInfo     pmc;
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index ecfd822..2244955 100644
--- a/CORE/MAC/inc/qwlan_version.h
+++ b/CORE/MAC/inc/qwlan_version.h
@@ -23,7 +23,7 @@
 #define QWLAN_VERSION_H
 /*===========================================================================
 
-FILE: 
+FILE:
    qwlan_version.h
 
 BRIEF DESCRIPTION:
@@ -40,8 +40,8 @@
 #define QWLAN_VERSION_MINOR            2
 #define QWLAN_VERSION_PATCH            0
 #define QWLAN_VERSION_EXTRA            ""
-#define QWLAN_VERSION_BUILD            2
+#define QWLAN_VERSION_BUILD            9
 
-#define QWLAN_VERSIONSTR               "3.2.0.2"
+#define QWLAN_VERSIONSTR               "3.2.0.9"
 
 #endif /* QWLAN_VERSION_H */
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 8402917..1723072 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -36,6 +36,7 @@
 #include "sirTypes.h"
 #include "sirMacProtDef.h"
 #include "aniSystemDefs.h"
+#include "sirParams.h"
 
 #ifdef FEATURE_WLAN_CCX
 #include "ccxGlobal.h"
@@ -293,6 +294,9 @@
     eSIR_SME_CHANNEL_SWITCH_DISABLED,    // either 11h is disabled or channelSwitch is currently active
     eSIR_SME_HAL_SEND_MESSAGE_FAIL,      // Failed to send a message to HAL
 #endif // GEN4_SCAN
+#ifdef FEATURE_OEM_DATA_SUPPORT
+    eSIR_SME_HAL_OEM_DATA_REQ_START_FAILED,
+#endif
     eSIR_SME_STOP_BSS_FAILURE,           // Failed to stop the bss
     eSIR_SME_STA_ASSOCIATED,
     eSIR_SME_INVALID_PMM_STATE,
@@ -320,22 +324,6 @@
     eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE    
 } tSirResultCodes;
 
-//
-// Enumerated constants to identify
-// 1) the operating state of Channel Bonding
-// 2) the secondary CB channel to be used
-//
-typedef enum eAniCBSecondaryMode
-{
-    eANI_CB_SECONDARY_NONE,
-    eANI_CB_SECONDARY_DOWN,
-    eANI_CB_SECONDARY_UP,
-    eANI_DONOT_USE_SECONDARY_MODE = SIR_MAX_ENUM_SIZE
-} tAniCBSecondaryMode;
-
-
-
-
 /* each station added has a rate mode which specifies the sta attributes */
 typedef enum eStaRateMode {
     eSTA_TAURUS = 0,
@@ -345,6 +333,9 @@
     eSTA_11bg,
     eSTA_11a,
     eSTA_11n,
+#ifdef WLAN_FEATURE_11AC
+    eSTA_11ac,
+#endif
     eSTA_INVALID_RATE_MODE
 } tStaRateMode, *tpStaRateMode;
 
@@ -393,6 +384,18 @@
      */
     tANI_U16 rxHighestDataRate;
 
+#ifdef WLAN_FEATURE_11AC
+   /*Indicates the Maximum MCS that can be received for each number
+        of spacial streams */
+    tANI_U16 vhtRxMCSMap;
+   /*Indicate the highest VHT data rate that the STA is able to receive*/
+    tANI_U16 vhtRxHighestDataRate;
+   /*Indicates the Maximum MCS that can be transmitted	for each number
+        of spacial streams */
+    tANI_U16 vhtTxMCSMap;
+   /*Indicate the highest VHT data rate that the STA is able to transmit*/
+    tANI_U16 vhtTxHighestDataRate;
+#endif
 } tSirSupportedRates, *tpSirSupportedRates;
 
 
@@ -443,47 +446,6 @@
 #endif
 
 //
-// A bit-encoding, identifying the new TITAN capabilities
-// and state information. The capabilities being exposed
-// are -
-// Concatenation
-// Compression
-//FIXME_CBMODE: need to seperate out HT and TITAN CB mode fields.
-// Channel Bonding - Only this filed is used for HT also. 
-// Reverse FCS
-//
-// The bitfield encoding is as follows -
-//
-//  b7  b6   b5   b4   b3   b2   b1   b0
-// --------------------------------------
-// | X | X |CB/O|CB/O|CB/A|RFCS| CP | CC |
-// --------------------------------------
-// where,
-// CC   - Concatenation: 1 - ON, 0 - OFF
-// CP   - Compression: 1 - ON, 0 - OFF
-// RFCS - Reverse FCS Support: 1 - ON, 0 - OFF
-// CB/A - Channel Bonding "Admin" state: 1 - ON, 0 - OFF
-// CB/O - Channel Bonding "Oper" state:
-//        00 - CB Oper state OFF
-//        01 - CB Secondary channel DOWN
-//        10 - CB Secondary channel UP
-//        11 - Reserved
-// X    - Don't care
-//
-// This enumerated data type is used for IPC between the
-// LIM and SME (WSM/HDD) for the following northbound
-// interfaces -
-// LIM -> WSM
-// tSirNeighborBssInfo,
-// tSirSmeAssocInd,
-// tSirSmeReassocInd
-//
-// LIM -> HDD/Roaming
-// tSirBssDescription
-//
-typedef tANI_U8 tAniTitanHtCapabilityInfo;
-
-//
 // Identifies the neighbor BSS' that was(were) detected
 // by an STA and reported to the AP
 //
@@ -500,45 +462,6 @@
 
 } tAniTitanCBNeighborInfo, *tpAniTitanCBNeighborInfo;
 
-//
-// MACRO's to extract info from tAniTitanHtCapabilityInfo
-//
-#define SME_GET_CONCAT_STATE(titanHtCaps) \
-        (titanHtCaps & 0x01)
-#define SME_SET_CONCAT_STATE(titanHtCaps,state) \
-        (((state) == eHAL_CLEAR)? \
-          ((titanHtCaps) = (titanHtCaps) & (0x3E)): \
-          ((titanHtCaps) = (titanHtCaps) | (0x01)))
-
-#define SME_GET_COMPRESSION_STATE(titanHtCaps) \
-        ((titanHtCaps & 0x02) >> 1)
-#define SME_SET_COMPRESSION_STATE(titanHtCaps,state) \
-        (((state) == eHAL_CLEAR)? \
-          ((titanHtCaps) = (titanHtCaps) & (0x3D)): \
-          ((titanHtCaps) = (titanHtCaps) | (0x02)))
-
-#define SME_GET_RFCS_STATE(titanHtCaps) \
-        ((titanHtCaps & 0x04) >> 2)
-#define SME_SET_RFCS_STATE(titanHtCaps,state) \
-        (((state) == eHAL_CLEAR)? \
-          ((titanHtCaps) = (titanHtCaps) & (0x3B)): \
-          ((titanHtCaps) = (titanHtCaps) | (0x04)))
-
-#define SME_GET_CB_ADMIN_STATE(titanHtCaps) \
-        ((titanHtCaps & 0x08) >> 3)
-#define SME_SET_CB_ADMIN_STATE(titanHtCaps,state) \
-        (((state) == eHAL_CLEAR)? \
-          ((titanHtCaps) = (titanHtCaps) & (0x37)): \
-          ((titanHtCaps) = (titanHtCaps) | (0x08)))
-
-// NOTE - The value returned by this MACRO, SME_GET_CB_OPER_STATE,
-// can be used along with the enumerated type,
-// tAniCBSecondaryMode, to identify the Admin/Oper state of CB
-#define SME_GET_CB_OPER_STATE(titanHtCaps) \
-        ((titanHtCaps & 0x30) >> 4)
-#define SME_SET_CB_OPER_STATE(titanHtCaps,state) \
-        ((titanHtCaps) = (tANI_U8)(((titanHtCaps) & (0x0F)) | ((state) << 4)))
-
 /// Generic type for sending a response message
 /// with result code to host software
 typedef struct sSirSmeRsp
@@ -642,6 +565,9 @@
     eSIR_11B_NW_TYPE,
     eSIR_11G_NW_TYPE,
     eSIR_11N_NW_TYPE,
+#ifdef WLAN_FEATURE_11AC
+    eSIR_11AC_NW_TYPE,
+#endif
     eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE
 } tSirNwType;
 
@@ -695,7 +621,7 @@
     tSirBssType             bssType;
     tSirMacSSid             ssId;
     tANI_U8                 channelId;
-    tAniCBSecondaryMode     cbMode;
+    ePhyChanBondState       cbMode;
 #if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && (WNI_POLARIS_FW_PRODUCT == AP)
     tSirAlternateRadioList  alternateRadioList;
     tANI_S8                 powerLevel;
@@ -753,12 +679,6 @@
     //used only in scan case.
     tANI_U8              channelIdSelf;
     tANI_U8              sSirBssDescriptionRsvd[3];
-    //
-    // FIXME - This structure is not packed!
-    // Thus, the fields should be aligned at DWORD boundaries
-    // Elsewhere, titanHtCaps is of type tAniTitanHtCapabilityInfo
-    //
-    tANI_U32             titanHtCaps;
     tANI_TIMESTAMP nReceivedTime;     //base on a tick count. It is a time stamp, not a relative time.
 #if defined WLAN_FEATURE_VOWIFI
     tANI_U32       parentTSF;
@@ -862,7 +782,6 @@
 {
     tSirMacAddr             bssId;
     tANI_U8                 channelId;
-    tAniTitanHtCapabilityInfo titanHtCaps;
     tAniBool                wniIndicator;
     tSirBssType             bssType;
     tANI_U8                 sinr;
@@ -1113,6 +1032,7 @@
  
 #ifdef WLAN_FEATURE_P2P
     tANI_BOOLEAN         p2pSearch;
+    tANI_BOOLEAN         skipDfsChnlInP2pSearch;
 #endif
     tANI_U16             uIEFieldLen;
     tANI_U16             uIEFieldOffset;
@@ -1138,6 +1058,30 @@
       -----------------------------*/
 } tSirSmeScanReq, *tpSirSmeScanReq;
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+#ifndef OEM_DATA_REQ_SIZE
+#define OEM_DATA_REQ_SIZE 70
+#endif
+#ifndef OEM_DATA_RSP_SIZE
+#define OEM_DATA_RSP_SIZE 968
+#endif
+
+typedef struct sSirOemDataReq
+{
+    tANI_U16              messageType; //eWNI_SME_OEM_DATA_REQ
+    tSirMacAddr           selfMacAddr;
+    tANI_U8               oemDataReq[OEM_DATA_REQ_SIZE];
+} tSirOemDataReq, *tpSirOemDataReq;
+
+typedef struct sSirOemDataRsp
+{
+    tANI_U16             messageType;
+    tANI_U16             length;
+    tANI_U8              oemDataRsp[OEM_DATA_RSP_SIZE];
+} tSirOemDataRsp, *tpSirOemDataRsp;
+    
+#endif //FEATURE_OEM_DATA_SUPPORT
 
 /// Definition for response message to previously issued scan request
 typedef struct sSirSmeScanRsp
@@ -1235,13 +1179,14 @@
 {
     tANI_U16            messageType;            // eWNI_SME_JOIN_REQ
     tANI_U16            length;
-    tANI_U8             sessionId;              
+    tANI_U8             sessionId;
     tANI_U16            transactionId;  
     tSirMacSSid         ssId;
     tSirMacAddr         selfMacAddr;            // self Mac address
     tSirBssType         bsstype;                // add new type for BT -AMP STA and AP Modules
     tANI_U8             dot11mode;              // to support BT-AMP     
-    tVOS_CON_MODE       staPersona;        //Persona
+    tVOS_CON_MODE       staPersona;             //Persona
+    ePhyChanBondState   cbMode;                 // Pass CB mode value in Join.
 
     /*This contains the UAPSD Flag for all 4 AC
      * B0: AC_VO UAPSD FLAG
@@ -1400,7 +1345,6 @@
     tANI_U16                  capabilityInfo; // STA capability
     tSirNwType           nwType;            // Indicates 11a/b/g
 #endif
-    tAniTitanHtCapabilityInfo titanHtCaps;
     // powerCap & supportedChannels are present only when
     // spectrumMgtIndicator flag is set
     tAniBool                spectrumMgtIndicator;
@@ -1449,7 +1393,8 @@
     tSirMacAddr         selfMacAddr;            // self Mac address
     tSirBssType         bsstype;                // add new type for BT -AMP STA and AP Modules
     tANI_U8             dot11mode;              // to support BT-AMP     
-    tVOS_CON_MODE       staPersona;        //Persona
+    tVOS_CON_MODE       staPersona;             //Persona
+    ePhyChanBondState   cbMode;                 // CBMode value to be passed with reassoc req
 
     /*This contains the UAPSD Flag for all 4 AC
      * B0: AC_VO UAPSD FLAG
@@ -1557,7 +1502,6 @@
     tANI_U16             capabilityInfo; // STA capability
     tSirNwType           nwType;            // Indicates 11a/b/g
 #endif
-    tAniTitanHtCapabilityInfo titanHtCaps;
     // powerCap & supportedChannels are present only when
     // spectrumMgtIndicator flag is set
     tAniBool                spectrumMgtIndicator;
@@ -2130,7 +2074,7 @@
     // In a non-CB environment, with 11H enabled,
     // this field will be ignored
     //
-    tAniCBSecondaryMode cbMode;
+    ePhyChanBondState    cbMode;
 
     // dtimFactor indicates the number of DTIM
     // Beacon before LIM switches channel
@@ -3796,6 +3740,7 @@
 #ifdef WLAN_NS_OFFLOAD
     tSirNsOffloadReq nsOffloadInfo;
 #endif //WLAN_NS_OFFLOAD
+    tANI_U8 bssIdx;
 } tSirHostOffloadReq, *tpSirHostOffloadReq;
 
 /* Packet Types. */
@@ -3814,7 +3759,7 @@
     tSirIpv4Addr    hostIpv4Addr; 
     tSirIpv4Addr    destIpv4Addr;
     tSirMacAddr     destMacAddr;
-
+    v_U8_t          bssIdx;
 } tSirKeepAliveReq, *tpSirKeepAliveReq;
 
 typedef struct sSirSmeAddStaSelfReq
@@ -4117,6 +4062,8 @@
   tANI_U32                        numFieldParams;
   tANI_U32                        coalesceTime;
   tSirRcvPktFilterFieldParams     paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
+  tSirMacAddr                     selfMacAddr;
+  tSirMacAddr                     bssId; //Bssid of the connected AP
 }tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
 
 //
@@ -4145,6 +4092,8 @@
 {
   tANI_U32   status;  /* only valid for response message */
   tANI_U8    filterId;
+  tSirMacAddr selfMacAddr;
+  tSirMacAddr bssId;
 }tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
 
 //
@@ -4154,6 +4103,8 @@
 {
   tANI_U32       ulMulticastAddrCnt;
   tSirMacAddr    multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
+  tSirMacAddr    selfMacAddr;
+  tSirMacAddr    bssId;
 } tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
 #endif // WLAN_FEATURE_PACKET_FILTERING
 
diff --git a/CORE/MAC/inc/sirMacPropExts.h b/CORE/MAC/inc/sirMacPropExts.h
index c368e17..1b7deba 100644
--- a/CORE/MAC/inc/sirMacPropExts.h
+++ b/CORE/MAC/inc/sirMacPropExts.h
@@ -118,12 +118,23 @@
 #define IS_DOT11_MODE_HT(dot11Mode) \
         (((dot11Mode == WNI_CFG_DOT11_MODE_11N) || \
           (dot11Mode ==  WNI_CFG_DOT11_MODE_11N_ONLY) || \
+          (dot11Mode ==  WNI_CFG_DOT11_MODE_11AC) || \
+          (dot11Mode ==  WNI_CFG_DOT11_MODE_11AC_ONLY) || \
           (dot11Mode ==  WNI_CFG_DOT11_MODE_TAURUS) || \
           (dot11Mode ==  WNI_CFG_DOT11_MODE_ALL)) ? TRUE: FALSE)
 #else
 #define IS_DOT11_MODE_HT(dot11Mode) \
         (((dot11Mode == WNI_CFG_DOT11_MODE_11N) || \
           (dot11Mode ==  WNI_CFG_DOT11_MODE_TAURUS) || \
+          (dot11Mode ==  WNI_CFG_DOT11_MODE_11AC) || \
+          (dot11Mode ==  WNI_CFG_DOT11_MODE_ALL)) ? TRUE: FALSE)
+#endif
+
+#ifdef WLAN_FEATURE_11AC
+#define IS_DOT11_MODE_VHT(dot11Mode) \
+        (((dot11Mode == WNI_CFG_DOT11_MODE_11AC) || \
+          (dot11Mode ==  WNI_CFG_DOT11_MODE_11AC_ONLY) || \
+          (dot11Mode ==  WNI_CFG_DOT11_MODE_TAURUS) || \
           (dot11Mode ==  WNI_CFG_DOT11_MODE_ALL)) ? TRUE: FALSE)
 #endif
         /*
@@ -224,53 +235,6 @@
 #define GET_COMPRESSION_STATE(cpBitmap,tcid) \
         ((cpBitmap) & (tcid))
 
-// Get/Set state of Channel Bonding
-//
-// The CB bitfield encoding is -
-//
-//     b7    b6   b5  b4  b3  b2  b1  b0
-// --------------------------------------
-// |CCA_CB |CCA |ICE | AU|CS|U/D| O | A |
-// --------------------------------------
-//
-#define GET_CB_ADMIN_STATE(cbState)    (cbState & 0x01)
-#define GET_CB_OPER_STATE(cbState)     ((cbState & 0x02) >> 1)
-#define GET_CB_SEC_CHANNEL(cbState)    ((cbState & 0x04) >> 2)
-#define GET_CB_CS_IN_PROGRESS(cbState) ((cbState & 0x08) >> 3)
-#define GET_CB_CS_AUTO_UPDATE(cbState) ((cbState & 0x10) >> 4)
-#define GET_CB_ICE_STATE(cbState)      ((cbState & 0x20) >> 5)
-#define GET_CB_CCA_MODE(cbState)       ((cbState & 0x40) >> 6)
-#define GET_CB_CCA_CB_STATE(cbState)   ((cbState & 0x80) >> 7)
-
-#define SET_CB_STATE_DISABLE(cbState) \
-        ((cbState) = (0x00))
-#define SET_CB_STATE_ENABLE(cbState) \
-        ((cbState) = (0x03))
-#define SET_CB_AU_ENABLE(cbState) \
-        ((cbState) = ((cbState) | 0x10))
-#define SET_CB_AU_DISABLE(cbState) \
-        ((cbState) = ((cbState) & 0xEF))
-#define SET_CB_OPER_STATE(cbState,state) \
-        (((state) == eHAL_CLEAR)? \
-          ((cbState) = (cbState) & (0xfD)): \
-          ((cbState) = (cbState) | (0x02)))
-#define SET_CB_SEC_CHANNEL(cbState,state) \
-        (((state) == eHAL_CLEAR)? \
-          ((cbState) = (cbState) & (0xfB)): \
-          ((cbState) = (cbState) | (0x04)))
-#define SET_CB_ICE_DISABLE(cbState) \
-        ((cbState) = ((cbState) & 0xDF))
-#define SET_CB_ICE_ENABLE(cbState) \
-        ((cbState) = ((cbState) | 0x20))
-#define SET_CB_CCA_MODE_TWENTY(cbState) \
-        ((cbState) = ((cbState) & 0xBF))
-#define SET_CB_CCA_MODE_FOURTY(cbState) \
-        ((cbState) = ((cbState) | 0x40))
-#define SET_CB_CCA_CB_DISABLE(cbState) \
-        ((cbState) = ((cbState) & 0x7F))
-#define SET_CB_CCA_CB_ENABLE(cbState) \
-        ((cbState) = ((cbState) | 0x80))
-
 // Get/Set the state of Reverse FCS
 #define GET_RFCS_OPER_STATE(revFcsState) (revFcsState & 0x01)
 #define GET_RFCS_PATTERN_ID(revFcsState) ((revFcsState & 0x0E) >> 1)
diff --git a/CORE/MAC/inc/sirMacProtDef.h b/CORE/MAC/inc/sirMacProtDef.h
index 7f2f1d5..0b15872 100644
--- a/CORE/MAC/inc/sirMacProtDef.h
+++ b/CORE/MAC/inc/sirMacProtDef.h
@@ -367,6 +367,11 @@
 #define SIR_MAC_HT_INFO_EID_MIN    0
 #define SIR_MAC_HT_INFO_EID_MAX    255
 
+#ifdef WLAN_FEATURE_11AC
+#define SIR_MAC_VHT_CAPABILITIES_EID   191
+#define SIR_MAC_VHT_OPERATION_EID      192
+#define SIR_MAC_VHT_EXT_BSS_LOAD_EID   193
+#endif
 #define SIR_MAC_MAX_SUPPORTED_MCS_SET    16
 
 /// Workaround IE to change beacon length when it is 4*n+1
@@ -467,7 +472,7 @@
 
 
 // Length of Channel Switch related message
-#define SIR_SME_CHANNEL_SWITCH_SIZE        (sizeof(tANI_U8) + 2 *sizeof(tANI_U16) + sizeof(tANI_U32) + sizeof(tAniCBSecondaryMode))
+#define SIR_SME_CHANNEL_SWITCH_SIZE        (sizeof(tANI_U8) + 2 *sizeof(tANI_U16) + sizeof(tANI_U32) + sizeof(ePhyChanBondState))
 #define SIR_CHANNEL_SWITCH_IE_SIZE         EID_LEN(SIR_MAC_CHNL_SWITCH_ANN_EID_MIN)
 
 //Measurement Request/Report messages
@@ -1570,17 +1575,14 @@
 } tSirMacHTMIMOPowerSaveState;
 
 
-typedef enum eSirMacHTSecondaryChannelOffset
-{
-    eHT_SECONDARY_CHANNEL_OFFSET_NONE = 0,
-    eHT_SECONDARY_CHANNEL_OFFSET_UP = 1,
-    eHT_SECONDARY_CHANNEL_OFFSET_DOWN = 3
-} tSirMacHTSecondaryChannelOffset;
-
 typedef enum eSirMacHTChannelWidth
 {
     eHT_CHANNEL_WIDTH_20MHZ = 0,
-    eHT_CHANNEL_WIDTH_40MHZ = 1
+    eHT_CHANNEL_WIDTH_40MHZ = 1,
+#ifdef WLAN_FEATURE_11AC
+    eHT_CHANNEL_WIDTH_80MHZ = 2,
+#endif
+    eHT_MAX_CHANNEL_WIDTH
 } tSirMacHTChannelWidth;
 
 //Packet struct for HT capability
diff --git a/CORE/MAC/inc/wniApi.h b/CORE/MAC/inc/wniApi.h
index 14dc9b3..dc3cd0b 100644
--- a/CORE/MAC/inc/wniApi.h
+++ b/CORE/MAC/inc/wniApi.h
@@ -106,6 +106,10 @@
     eWNI_SME_SCAN_REQ,
     eWNI_SME_SCAN_ABORT_IND,
     eWNI_SME_SCAN_RSP,
+#ifdef FEATURE_OEM_DATA_SUPPORT
+    eWNI_SME_OEM_DATA_REQ,
+    eWNI_SME_OEM_DATA_RSP,
+#endif
     eWNI_SME_JOIN_REQ,
     eWNI_SME_JOIN_RSP,
     eWNI_SME_SETCONTEXT_REQ,
@@ -323,7 +327,8 @@
 #ifdef WLAN_WAKEUP_EVENTS
     eWNI_SME_WAKE_REASON_IND,
 #endif // WLAN_WAKEUP_EVENTS
-
+    eWNI_SME_EXCLUDE_UNENCRYPTED,
+    eWNI_SME_RSSI_IND, //RSSI indication from TL to be serialized on MC thread
     eWNI_SME_MSG_TYPES_END
 };
 
diff --git a/CORE/MAC/inc/wniCfgAp.h b/CORE/MAC/inc/wniCfgAp.h
index 68930d7..7c944cc 100644
--- a/CORE/MAC/inc/wniCfgAp.h
+++ b/CORE/MAC/inc/wniCfgAp.h
@@ -211,97 +211,129 @@
 #define WNI_CFG_BASIC_MCS_SET    166
 #define WNI_CFG_CURRENT_MCS_SET    167
 #define WNI_CFG_GREENFIELD_CAPABILITY    168
-#define WNI_CFG_MAX_AMSDU_LENGTH    169
-#define WNI_CFG_MPDU_DENSITY    170
-#define WNI_CFG_MAX_RX_AMPDU_FACTOR    171
-#define WNI_CFG_SHORT_GI_20MHZ    172
-#define WNI_CFG_SHORT_GI_40MHZ    173
-#define WNI_CFG_RIFS_ENABLED    174
-#define WNI_CFG_MAX_PS_POLL    175
-#define WNI_CFG_NUM_BEACON_PER_RSSI_AVERAGE    176
-#define WNI_CFG_RSSI_FILTER_PERIOD    177
-#define WNI_CFG_FT_RSSI_FILTER_PERIOD    178
-#define WNI_CFG_MIN_RSSI_THRESHOLD    179
-#define WNI_CFG_NTH_BEACON_FILTER    180
-#define WNI_CFG_BROADCAST_FRAME_FILTER_ENABLE    181
-#define WNI_CFG_SCAN_IN_POWERSAVE    182
-#define WNI_CFG_IGNORE_DTIM    183
-#define WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE    184
-#define WNI_CFG_WOWLAN_CHANNEL_SWITCH_ENABLE    185
-#define WNI_CFG_WOWLAN_DEAUTH_ENABLE    186
-#define WNI_CFG_WOWLAN_DISASSOC_ENABLE    187
-#define WNI_CFG_WOWLAN_MAX_MISSED_BEACON    188
-#define WNI_CFG_WOWLAN_MAX_SLEEP_PERIOD    189
-#define WNI_CFG_BA_TIMEOUT    190
-#define WNI_CFG_BA_THRESHOLD_HIGH    191
-#define WNI_CFG_MAX_BA_BUFFERS    192
-#define WNI_CFG_MAX_BA_SESSIONS    193
-#define WNI_CFG_BA_AUTO_SETUP    194
-#define WNI_CFG_ADDBA_REQ_DECLINE    195
-#define WNI_CFG_BG_SCAN_CHANNEL_LIST    196
-#define WNI_CFG_MAX_MEDIUM_TIME    197
-#define WNI_CFG_MAX_MPDUS_IN_AMPDU    198
-#define WNI_CFG_IBSS_AUTO_BSSID    199
-#define WNI_CFG_PROBE_REQ_ADDNIE_FLAG    200
-#define WNI_CFG_PROBE_REQ_ADDNIE_DATA    201
-#define WNI_CFG_PROBE_RSP_ADDNIE_FLAG    202
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA1    203
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA2    204
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA3    205
-#define WNI_CFG_ASSOC_RSP_ADDNIE_FLAG    206
-#define WNI_CFG_ASSOC_RSP_ADDNIE_DATA    207
-#define WNI_CFG_PROBE_REQ_ADDNP2PIE_FLAG    208
-#define WNI_CFG_PROBE_REQ_ADDNP2PIE_DATA    209
-#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG    210
-#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA    211
-#define WNI_CFG_WPS_ENABLE    212
-#define WNI_CFG_WPS_STATE    213
-#define WNI_CFG_WPS_PROBE_REQ_FLAG    214
-#define WNI_CFG_WPS_VERSION    215
-#define WNI_CFG_WPS_REQUEST_TYPE    216
-#define WNI_CFG_WPS_CFG_METHOD    217
-#define WNI_CFG_WPS_UUID    218
-#define WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY    219
-#define WNI_CFG_WPS_PIMARY_DEVICE_OUI    220
-#define WNI_CFG_WPS_DEVICE_SUB_CATEGORY    221
-#define WNI_CFG_WPS_ASSOCIATION_STATE    222
-#define WNI_CFG_WPS_CONFIGURATION_ERROR    223
-#define WNI_CFG_WPS_DEVICE_PASSWORD_ID    224
-#define WNI_CFG_WPS_ASSOC_METHOD    225
-#define WNI_CFG_LOW_GAIN_OVERRIDE    226
-#define WNI_CFG_ENABLE_PHY_AGC_LISTEN_MODE    227
-#define WNI_CFG_RPE_POLLING_THRESHOLD    228
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG    229
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG    230
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG    231
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG    232
-#define WNI_CFG_NO_OF_ONCHIP_REORDER_SESSIONS    233
-#define WNI_CFG_SINGLE_TID_RC    234
-#define WNI_CFG_RRM_ENABLED    235
-#define WNI_CFG_RRM_OPERATING_CHAN_MAX    236
-#define WNI_CFG_RRM_NON_OPERATING_CHAN_MAX    237
-#define WNI_CFG_TX_PWR_CTRL_ENABLE    238
-#define WNI_CFG_MCAST_BCAST_FILTER_SETTING    239
-#define WNI_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK    240
-#define WNI_CFG_DYNAMIC_PS_POLL_VALUE    241
-#define WNI_CFG_PS_NULLDATA_AP_RESP_TIMEOUT    242
-#define WNI_CFG_TELE_BCN_WAKEUP_EN    243
-#define WNI_CFG_TELE_BCN_TRANS_LI    244
-#define WNI_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS    245
-#define WNI_CFG_TELE_BCN_MAX_LI    246
-#define WNI_CFG_TELE_BCN_MAX_LI_IDLE_BCNS    247
-#define WNI_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS    248
-#define WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD    249
-#define WNI_CFG_ASSOC_STA_LIMIT    250
-#define WNI_CFG_SAP_CHANNEL_SELECT_START_CHANNEL    251
-#define WNI_CFG_SAP_CHANNEL_SELECT_END_CHANNEL    252
-#define WNI_CFG_SAP_CHANNEL_SELECT_OPERATING_BAND    253
-#define WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD    254
-#define WNI_CFG_ENABLE_CLOSE_LOOP    255
-#define WNI_CFG_ENABLE_LTE_COEX    256
-#define WNI_CFG_AP_KEEP_ALIVE_TIMEOUT    257
-#define WNI_CFG_GO_KEEP_ALIVE_TIMEOUT    258
-#define WNI_CFG_ENABLE_MC_ADDR_LIST    259
+#define WNI_CFG_VHT_MAX_MPDU_LENGTH    169
+#define WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET    170
+#define WNI_CFG_VHT_LDPC_CODING_CAP    171
+#define WNI_CFG_VHT_SHORT_GI_80MHZ    172
+#define WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ    173
+#define WNI_CFG_VHT_TXSTBC    174
+#define WNI_CFG_VHT_RXSTBC    175
+#define WNI_CFG_VHT_SU_BEAMFORMER_CAP    176
+#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP    177
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED    178
+#define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS    179
+#define WNI_CFG_VHT_MU_BEAMFORMER_CAP    180
+#define WNI_CFG_VHT_MU_BEAMFORMEE_CAP    181
+#define WNI_CFG_VHT_TXOP_PS    182
+#define WNI_CFG_VHT_HTC_VHTC_CAP    183
+#define WNI_CFG_VHT_AMPDU_LEN_EXPONENT    184
+#define WNI_CFG_VHT_LINK_ADAPTATION_CAP    185
+#define WNI_CFG_VHT_RX_ANT_PATTERN    186
+#define WNI_CFG_VHT_TX_ANT_PATTERN    187
+#define WNI_CFG_VHT_RX_MCS_MAP    188
+#define WNI_CFG_VHT_TX_MCS_MAP    189
+#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE    190
+#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE    191
+#define WNI_CFG_VHT_CHANNEL_WIDTH    192
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1    193
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2    194
+#define WNI_CFG_VHT_BASIC_MCS_SET    195
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT    196
+#define WNI_CFG_VHT_SS_UNDER_UTIL    197
+#define WNI_CFG_VHT_40MHZ_UTILIZATION    198
+#define WNI_CFG_VHT_80MHZ_UTILIZATION    199
+#define WNI_CFG_VHT_160MHZ_UTILIZATION    200
+#define WNI_CFG_MAX_AMSDU_LENGTH    201
+#define WNI_CFG_MPDU_DENSITY    202
+#define WNI_CFG_MAX_RX_AMPDU_FACTOR    203
+#define WNI_CFG_SHORT_GI_20MHZ    204
+#define WNI_CFG_SHORT_GI_40MHZ    205
+#define WNI_CFG_RIFS_ENABLED    206
+#define WNI_CFG_MAX_PS_POLL    207
+#define WNI_CFG_NUM_BEACON_PER_RSSI_AVERAGE    208
+#define WNI_CFG_RSSI_FILTER_PERIOD    209
+#define WNI_CFG_FT_RSSI_FILTER_PERIOD    210
+#define WNI_CFG_MIN_RSSI_THRESHOLD    211
+#define WNI_CFG_NTH_BEACON_FILTER    212
+#define WNI_CFG_BROADCAST_FRAME_FILTER_ENABLE    213
+#define WNI_CFG_SCAN_IN_POWERSAVE    214
+#define WNI_CFG_IGNORE_DTIM    215
+#define WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE    216
+#define WNI_CFG_WOWLAN_CHANNEL_SWITCH_ENABLE    217
+#define WNI_CFG_WOWLAN_DEAUTH_ENABLE    218
+#define WNI_CFG_WOWLAN_DISASSOC_ENABLE    219
+#define WNI_CFG_WOWLAN_MAX_MISSED_BEACON    220
+#define WNI_CFG_WOWLAN_MAX_SLEEP_PERIOD    221
+#define WNI_CFG_BA_TIMEOUT    222
+#define WNI_CFG_BA_THRESHOLD_HIGH    223
+#define WNI_CFG_MAX_BA_BUFFERS    224
+#define WNI_CFG_MAX_BA_SESSIONS    225
+#define WNI_CFG_BA_AUTO_SETUP    226
+#define WNI_CFG_ADDBA_REQ_DECLINE    227
+#define WNI_CFG_BG_SCAN_CHANNEL_LIST    228
+#define WNI_CFG_MAX_MEDIUM_TIME    229
+#define WNI_CFG_MAX_MPDUS_IN_AMPDU    230
+#define WNI_CFG_IBSS_AUTO_BSSID    231
+#define WNI_CFG_PROBE_REQ_ADDNIE_FLAG    232
+#define WNI_CFG_PROBE_REQ_ADDNIE_DATA    233
+#define WNI_CFG_PROBE_RSP_ADDNIE_FLAG    234
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA1    235
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA2    236
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA3    237
+#define WNI_CFG_ASSOC_RSP_ADDNIE_FLAG    238
+#define WNI_CFG_ASSOC_RSP_ADDNIE_DATA    239
+#define WNI_CFG_PROBE_REQ_ADDNP2PIE_FLAG    240
+#define WNI_CFG_PROBE_REQ_ADDNP2PIE_DATA    241
+#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG    242
+#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA    243
+#define WNI_CFG_WPS_ENABLE    244
+#define WNI_CFG_WPS_STATE    245
+#define WNI_CFG_WPS_PROBE_REQ_FLAG    246
+#define WNI_CFG_WPS_VERSION    247
+#define WNI_CFG_WPS_REQUEST_TYPE    248
+#define WNI_CFG_WPS_CFG_METHOD    249
+#define WNI_CFG_WPS_UUID    250
+#define WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY    251
+#define WNI_CFG_WPS_PIMARY_DEVICE_OUI    252
+#define WNI_CFG_WPS_DEVICE_SUB_CATEGORY    253
+#define WNI_CFG_WPS_ASSOCIATION_STATE    254
+#define WNI_CFG_WPS_CONFIGURATION_ERROR    255
+#define WNI_CFG_WPS_DEVICE_PASSWORD_ID    256
+#define WNI_CFG_WPS_ASSOC_METHOD    257
+#define WNI_CFG_LOW_GAIN_OVERRIDE    258
+#define WNI_CFG_ENABLE_PHY_AGC_LISTEN_MODE    259
+#define WNI_CFG_RPE_POLLING_THRESHOLD    260
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG    261
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG    262
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG    263
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG    264
+#define WNI_CFG_NO_OF_ONCHIP_REORDER_SESSIONS    265
+#define WNI_CFG_SINGLE_TID_RC    266
+#define WNI_CFG_RRM_ENABLED    267
+#define WNI_CFG_RRM_OPERATING_CHAN_MAX    268
+#define WNI_CFG_RRM_NON_OPERATING_CHAN_MAX    269
+#define WNI_CFG_TX_PWR_CTRL_ENABLE    270
+#define WNI_CFG_MCAST_BCAST_FILTER_SETTING    271
+#define WNI_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK    272
+#define WNI_CFG_DYNAMIC_PS_POLL_VALUE    273
+#define WNI_CFG_PS_NULLDATA_AP_RESP_TIMEOUT    274
+#define WNI_CFG_TELE_BCN_WAKEUP_EN    275
+#define WNI_CFG_TELE_BCN_TRANS_LI    276
+#define WNI_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS    277
+#define WNI_CFG_TELE_BCN_MAX_LI    278
+#define WNI_CFG_TELE_BCN_MAX_LI_IDLE_BCNS    279
+#define WNI_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS    280
+#define WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD    281
+#define WNI_CFG_ASSOC_STA_LIMIT    282
+#define WNI_CFG_SAP_CHANNEL_SELECT_START_CHANNEL    283
+#define WNI_CFG_SAP_CHANNEL_SELECT_END_CHANNEL    284
+#define WNI_CFG_SAP_CHANNEL_SELECT_OPERATING_BAND    285
+#define WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD    286
+#define WNI_CFG_ENABLE_CLOSE_LOOP    287
+#define WNI_CFG_ENABLE_LTE_COEX    288
+#define WNI_CFG_AP_KEEP_ALIVE_TIMEOUT    289
+#define WNI_CFG_GO_KEEP_ALIVE_TIMEOUT    290
+#define WNI_CFG_ENABLE_MC_ADDR_LIST    291
 
 /*
  * String parameter lengths 
@@ -583,11 +615,11 @@
 #define WNI_CFG_PHY_MODE_NONE    3
 
 #define WNI_CFG_DOT11_MODE_STAMIN    0
-#define WNI_CFG_DOT11_MODE_STAMAX    9
+#define WNI_CFG_DOT11_MODE_STAMAX    11
 #define WNI_CFG_DOT11_MODE_STADEF    0
 
 #define WNI_CFG_DOT11_MODE_APMIN    0
-#define WNI_CFG_DOT11_MODE_APMAX    9
+#define WNI_CFG_DOT11_MODE_APMAX    11
 #define WNI_CFG_DOT11_MODE_APDEF    0
 
 #define WNI_CFG_DOT11_MODE_ALL    0
@@ -600,6 +632,8 @@
 #define WNI_CFG_DOT11_MODE_TAURUS    7
 #define WNI_CFG_DOT11_MODE_11G_ONLY    8
 #define WNI_CFG_DOT11_MODE_11N_ONLY    9
+#define WNI_CFG_DOT11_MODE_11AC    10
+#define WNI_CFG_DOT11_MODE_11AC_ONLY    11
 
 #define WNI_CFG_LISTEN_INTERVAL_STAMIN    0
 #define WNI_CFG_LISTEN_INTERVAL_STAMAX    65535
@@ -1258,11 +1292,11 @@
 #define WNI_CFG_MAX_CONSECUTIVE_BACKGROUND_SCAN_FAILURE_APDEF    60
 
 #define WNI_CFG_CHANNEL_BONDING_MODE_STAMIN    0
-#define WNI_CFG_CHANNEL_BONDING_MODE_STAMAX    4
+#define WNI_CFG_CHANNEL_BONDING_MODE_STAMAX    10
 #define WNI_CFG_CHANNEL_BONDING_MODE_STADEF    0
 
 #define WNI_CFG_CHANNEL_BONDING_MODE_APMIN    0
-#define WNI_CFG_CHANNEL_BONDING_MODE_APMAX    4
+#define WNI_CFG_CHANNEL_BONDING_MODE_APMAX    10
 #define WNI_CFG_CHANNEL_BONDING_MODE_APDEF    0
 
 #define WNI_CFG_CHANNEL_BONDING_MODE_DISABLE    0
@@ -1272,16 +1306,23 @@
 #define WNI_CFG_CHANNEL_BONDING_MODE_INTELLIGENT    4
 
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_STAMIN    0
-#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_STAMAX    2
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_STAMAX    10
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_STADEF    0
 
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_APMIN    0
-#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_APMAX    2
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_APMAX    10
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_APDEF    0
 
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_NONE    0
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_LOWER    1
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_HIGHER    2
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_LOW_40MHZ_CENTERED    3
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_CENTERED_40MHZ_CENTERED    4
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_HIGH_40MHZ_CENTERED    5
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_LOW_40MHZ_LOW    6
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_HIGH_40MHZ_LOW    7
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_LOW_40MHZ_HIGH    8
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_HIGH_40MHZ_HIGH    9
 
 #define WNI_CFG_DYNAMIC_THRESHOLD_ZERO_STAMIN    0
 #define WNI_CFG_DYNAMIC_THRESHOLD_ZERO_STAMAX    255
@@ -1492,6 +1533,267 @@
 #define WNI_CFG_GREENFIELD_CAPABILITY_ENABLE    1
 #define WNI_CFG_GREENFIELD_CAPABILITY_DISABLE    0
 
+#define WNI_CFG_VHT_MAX_MPDU_LENGTH_STAMIN    0
+#define WNI_CFG_VHT_MAX_MPDU_LENGTH_STAMAX    2
+#define WNI_CFG_VHT_MAX_MPDU_LENGTH_STADEF    0
+
+#define WNI_CFG_VHT_MAX_MPDU_LENGTH_APMIN    0
+#define WNI_CFG_VHT_MAX_MPDU_LENGTH_APMAX    2
+#define WNI_CFG_VHT_MAX_MPDU_LENGTH_APDEF    0
+
+#define WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_STAMIN    0
+#define WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_STAMAX    0
+#define WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_STADEF    0
+
+#define WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_APMIN    0
+#define WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_APMAX    0
+#define WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_APDEF    0
+
+#define WNI_CFG_VHT_LDPC_CODING_CAP_STAMIN    0
+#define WNI_CFG_VHT_LDPC_CODING_CAP_STAMAX    1
+#define WNI_CFG_VHT_LDPC_CODING_CAP_STADEF    0
+
+#define WNI_CFG_VHT_LDPC_CODING_CAP_APMIN    0
+#define WNI_CFG_VHT_LDPC_CODING_CAP_APMAX    1
+#define WNI_CFG_VHT_LDPC_CODING_CAP_APDEF    0
+
+#define WNI_CFG_VHT_SHORT_GI_80MHZ_STAMIN    0
+#define WNI_CFG_VHT_SHORT_GI_80MHZ_STAMAX    1
+#define WNI_CFG_VHT_SHORT_GI_80MHZ_STADEF    1
+
+#define WNI_CFG_VHT_SHORT_GI_80MHZ_APMIN    0
+#define WNI_CFG_VHT_SHORT_GI_80MHZ_APMAX    1
+#define WNI_CFG_VHT_SHORT_GI_80MHZ_APDEF    1
+
+#define WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_STAMIN    0
+#define WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_STAMAX    1
+#define WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_STADEF    0
+
+#define WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_APMIN    0
+#define WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_APMAX    1
+#define WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_APDEF    0
+
+#define WNI_CFG_VHT_TXSTBC_STAMIN    0
+#define WNI_CFG_VHT_TXSTBC_STAMAX    1
+#define WNI_CFG_VHT_TXSTBC_STADEF    0
+
+#define WNI_CFG_VHT_TXSTBC_APMIN    0
+#define WNI_CFG_VHT_TXSTBC_APMAX    1
+#define WNI_CFG_VHT_TXSTBC_APDEF    0
+
+#define WNI_CFG_VHT_RXSTBC_STAMIN    0
+#define WNI_CFG_VHT_RXSTBC_STAMAX    1
+#define WNI_CFG_VHT_RXSTBC_STADEF    1
+
+#define WNI_CFG_VHT_RXSTBC_APMIN    0
+#define WNI_CFG_VHT_RXSTBC_APMAX    1
+#define WNI_CFG_VHT_RXSTBC_APDEF    1
+
+#define WNI_CFG_VHT_SU_BEAMFORMER_CAP_STAMIN    0
+#define WNI_CFG_VHT_SU_BEAMFORMER_CAP_STAMAX    1
+#define WNI_CFG_VHT_SU_BEAMFORMER_CAP_STADEF    0
+
+#define WNI_CFG_VHT_SU_BEAMFORMER_CAP_APMIN    0
+#define WNI_CFG_VHT_SU_BEAMFORMER_CAP_APMAX    1
+#define WNI_CFG_VHT_SU_BEAMFORMER_CAP_APDEF    0
+
+#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMIN    0
+#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMAX    1
+#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STADEF    1
+
+#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_APMIN    0
+#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_APMAX    1
+#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_APDEF    1
+
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMIN    0
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX    1
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STADEF    0
+
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_APMIN    0
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_APMAX    1
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_APDEF    0
+
+#define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_STAMIN    0
+#define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_STAMAX    1
+#define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_STADEF    1
+
+#define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_APMIN    0
+#define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_APMAX    1
+#define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_APDEF    1
+
+#define WNI_CFG_VHT_MU_BEAMFORMER_CAP_STAMIN    0
+#define WNI_CFG_VHT_MU_BEAMFORMER_CAP_STAMAX    1
+#define WNI_CFG_VHT_MU_BEAMFORMER_CAP_STADEF    0
+
+#define WNI_CFG_VHT_MU_BEAMFORMER_CAP_APMIN    0
+#define WNI_CFG_VHT_MU_BEAMFORMER_CAP_APMAX    1
+#define WNI_CFG_VHT_MU_BEAMFORMER_CAP_APDEF    0
+
+#define WNI_CFG_VHT_MU_BEAMFORMEE_CAP_STAMIN    0
+#define WNI_CFG_VHT_MU_BEAMFORMEE_CAP_STAMAX    1
+#define WNI_CFG_VHT_MU_BEAMFORMEE_CAP_STADEF    0
+
+#define WNI_CFG_VHT_MU_BEAMFORMEE_CAP_APMIN    0
+#define WNI_CFG_VHT_MU_BEAMFORMEE_CAP_APMAX    1
+#define WNI_CFG_VHT_MU_BEAMFORMEE_CAP_APDEF    0
+
+#define WNI_CFG_VHT_TXOP_PS_STAMIN    0
+#define WNI_CFG_VHT_TXOP_PS_STAMAX    1
+#define WNI_CFG_VHT_TXOP_PS_STADEF    0
+
+#define WNI_CFG_VHT_TXOP_PS_APMIN    0
+#define WNI_CFG_VHT_TXOP_PS_APMAX    1
+#define WNI_CFG_VHT_TXOP_PS_APDEF    0
+
+#define WNI_CFG_VHT_HTC_VHTC_CAP_STAMIN    0
+#define WNI_CFG_VHT_HTC_VHTC_CAP_STAMAX    1
+#define WNI_CFG_VHT_HTC_VHTC_CAP_STADEF    0
+
+#define WNI_CFG_VHT_HTC_VHTC_CAP_APMIN    0
+#define WNI_CFG_VHT_HTC_VHTC_CAP_APMAX    1
+#define WNI_CFG_VHT_HTC_VHTC_CAP_APDEF    0
+
+#define WNI_CFG_VHT_AMPDU_LEN_EXPONENT_STAMIN    0
+#define WNI_CFG_VHT_AMPDU_LEN_EXPONENT_STAMAX    7
+#define WNI_CFG_VHT_AMPDU_LEN_EXPONENT_STADEF    3
+
+#define WNI_CFG_VHT_AMPDU_LEN_EXPONENT_APMIN    0
+#define WNI_CFG_VHT_AMPDU_LEN_EXPONENT_APMAX    7
+#define WNI_CFG_VHT_AMPDU_LEN_EXPONENT_APDEF    3
+
+#define WNI_CFG_VHT_LINK_ADAPTATION_CAP_STAMIN    0
+#define WNI_CFG_VHT_LINK_ADAPTATION_CAP_STAMAX    3
+#define WNI_CFG_VHT_LINK_ADAPTATION_CAP_STADEF    0
+
+#define WNI_CFG_VHT_LINK_ADAPTATION_CAP_APMIN    0
+#define WNI_CFG_VHT_LINK_ADAPTATION_CAP_APMAX    3
+#define WNI_CFG_VHT_LINK_ADAPTATION_CAP_APDEF    0
+
+#define WNI_CFG_VHT_RX_ANT_PATTERN_STAMIN    0
+#define WNI_CFG_VHT_RX_ANT_PATTERN_STAMAX    1
+#define WNI_CFG_VHT_RX_ANT_PATTERN_STADEF    1
+
+#define WNI_CFG_VHT_RX_ANT_PATTERN_APMIN    0
+#define WNI_CFG_VHT_RX_ANT_PATTERN_APMAX    1
+#define WNI_CFG_VHT_RX_ANT_PATTERN_APDEF    1
+
+#define WNI_CFG_VHT_TX_ANT_PATTERN_STAMIN    0
+#define WNI_CFG_VHT_TX_ANT_PATTERN_STAMAX    1
+#define WNI_CFG_VHT_TX_ANT_PATTERN_STADEF    1
+
+#define WNI_CFG_VHT_TX_ANT_PATTERN_APMIN    0
+#define WNI_CFG_VHT_TX_ANT_PATTERN_APMAX    1
+#define WNI_CFG_VHT_TX_ANT_PATTERN_APDEF    1
+
+#define WNI_CFG_VHT_RX_MCS_MAP_STAMIN    0
+#define WNI_CFG_VHT_RX_MCS_MAP_STAMAX    65535
+#define WNI_CFG_VHT_RX_MCS_MAP_STADEF    65534
+
+#define WNI_CFG_VHT_RX_MCS_MAP_APMIN    0
+#define WNI_CFG_VHT_RX_MCS_MAP_APMAX    65535
+#define WNI_CFG_VHT_RX_MCS_MAP_APDEF    65534
+
+#define WNI_CFG_VHT_TX_MCS_MAP_STAMIN    0
+#define WNI_CFG_VHT_TX_MCS_MAP_STAMAX    65535
+#define WNI_CFG_VHT_TX_MCS_MAP_STADEF    65534
+
+#define WNI_CFG_VHT_TX_MCS_MAP_APMIN    0
+#define WNI_CFG_VHT_TX_MCS_MAP_APMAX    65535
+#define WNI_CFG_VHT_TX_MCS_MAP_APDEF    65534
+
+#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_STAMIN    1
+#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_STAMAX    434
+#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_STADEF    434
+
+#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_APMIN    1
+#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_APMAX    434
+#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_APDEF    434
+
+#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_STAMIN    1
+#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_STAMAX    434
+#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_STADEF    434
+
+#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_APMIN    1
+#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_APMAX    434
+#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_APDEF    434
+
+#define WNI_CFG_VHT_CHANNEL_WIDTH_STAMIN    0
+#define WNI_CFG_VHT_CHANNEL_WIDTH_STAMAX    3
+#define WNI_CFG_VHT_CHANNEL_WIDTH_STADEF    0
+
+#define WNI_CFG_VHT_CHANNEL_WIDTH_APMIN    0
+#define WNI_CFG_VHT_CHANNEL_WIDTH_APMAX    3
+#define WNI_CFG_VHT_CHANNEL_WIDTH_APDEF    0
+
+#define WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ    0
+#define WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ    1
+#define WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ    2
+#define WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ    3
+
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STAMIN    0
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STAMAX    256
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STADEF    0
+
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_APMIN    0
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_APMAX    256
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_APDEF    0
+
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2_STAMIN    0
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2_STAMAX    0
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2_STADEF    0
+
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2_APMIN    0
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2_APMAX    0
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2_APDEF    0
+
+#define WNI_CFG_VHT_BASIC_MCS_SET_STAMIN    0
+#define WNI_CFG_VHT_BASIC_MCS_SET_STAMAX    3
+#define WNI_CFG_VHT_BASIC_MCS_SET_STADEF    0
+
+#define WNI_CFG_VHT_BASIC_MCS_SET_APMIN    0
+#define WNI_CFG_VHT_BASIC_MCS_SET_APMAX    3
+#define WNI_CFG_VHT_BASIC_MCS_SET_APDEF    0
+
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_STAMIN    0
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_STAMAX    4
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_STADEF    0
+
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_APMIN    0
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_APMAX    4
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_APDEF    0
+
+#define WNI_CFG_VHT_SS_UNDER_UTIL_STAMIN    0
+#define WNI_CFG_VHT_SS_UNDER_UTIL_STAMAX    0
+#define WNI_CFG_VHT_SS_UNDER_UTIL_STADEF    0
+
+#define WNI_CFG_VHT_SS_UNDER_UTIL_APMIN    0
+#define WNI_CFG_VHT_SS_UNDER_UTIL_APMAX    0
+#define WNI_CFG_VHT_SS_UNDER_UTIL_APDEF    0
+
+#define WNI_CFG_VHT_40MHZ_UTILIZATION_STAMIN    0
+#define WNI_CFG_VHT_40MHZ_UTILIZATION_STAMAX    0
+#define WNI_CFG_VHT_40MHZ_UTILIZATION_STADEF    0
+
+#define WNI_CFG_VHT_40MHZ_UTILIZATION_APMIN    0
+#define WNI_CFG_VHT_40MHZ_UTILIZATION_APMAX    0
+#define WNI_CFG_VHT_40MHZ_UTILIZATION_APDEF    0
+
+#define WNI_CFG_VHT_80MHZ_UTILIZATION_STAMIN    0
+#define WNI_CFG_VHT_80MHZ_UTILIZATION_STAMAX    0
+#define WNI_CFG_VHT_80MHZ_UTILIZATION_STADEF    0
+
+#define WNI_CFG_VHT_80MHZ_UTILIZATION_APMIN    0
+#define WNI_CFG_VHT_80MHZ_UTILIZATION_APMAX    0
+#define WNI_CFG_VHT_80MHZ_UTILIZATION_APDEF    0
+
+#define WNI_CFG_VHT_160MHZ_UTILIZATION_STAMIN    0
+#define WNI_CFG_VHT_160MHZ_UTILIZATION_STAMAX    0
+#define WNI_CFG_VHT_160MHZ_UTILIZATION_STADEF    0
+
+#define WNI_CFG_VHT_160MHZ_UTILIZATION_APMIN    0
+#define WNI_CFG_VHT_160MHZ_UTILIZATION_APMAX    0
+#define WNI_CFG_VHT_160MHZ_UTILIZATION_APDEF    0
+
 #define WNI_CFG_MAX_AMSDU_LENGTH_STAMIN    0
 #define WNI_CFG_MAX_AMSDU_LENGTH_STAMAX    1
 #define WNI_CFG_MAX_AMSDU_LENGTH_STADEF    0
@@ -2106,12 +2408,12 @@
 #define WNI_CFG_ENABLE_MC_ADDR_LIST_APMAX    1
 #define WNI_CFG_ENABLE_MC_ADDR_LIST_APDEF    0
 
-#define CFG_PARAM_MAX_NUM         260
-#define CFG_AP_IBUF_MAX_SIZE      199
+#define CFG_PARAM_MAX_NUM         292
+#define CFG_AP_IBUF_MAX_SIZE      231
 #define CFG_AP_SBUF_MAX_SIZE      3422
-#define CFG_STA_IBUF_MAX_SIZE     194
+#define CFG_STA_IBUF_MAX_SIZE     226
 #define CFG_STA_SBUF_MAX_SIZE     3388
-#define CFG_SEM_MAX_NUM           12
+#define CFG_SEM_MAX_NUM           19
 
 #define CFG_STA_MAGIC_DWORD     0xbeefbeef
 
diff --git a/CORE/MAC/inc/wniCfgSta.h b/CORE/MAC/inc/wniCfgSta.h
index 66a3ddf..bdf146c 100644
--- a/CORE/MAC/inc/wniCfgSta.h
+++ b/CORE/MAC/inc/wniCfgSta.h
@@ -205,97 +205,129 @@
 #define WNI_CFG_BASIC_MCS_SET    166
 #define WNI_CFG_CURRENT_MCS_SET    167
 #define WNI_CFG_GREENFIELD_CAPABILITY    168
-#define WNI_CFG_MAX_AMSDU_LENGTH    169
-#define WNI_CFG_MPDU_DENSITY    170
-#define WNI_CFG_MAX_RX_AMPDU_FACTOR    171
-#define WNI_CFG_SHORT_GI_20MHZ    172
-#define WNI_CFG_SHORT_GI_40MHZ    173
-#define WNI_CFG_RIFS_ENABLED    174
-#define WNI_CFG_MAX_PS_POLL    175
-#define WNI_CFG_NUM_BEACON_PER_RSSI_AVERAGE    176
-#define WNI_CFG_RSSI_FILTER_PERIOD    177
-#define WNI_CFG_FT_RSSI_FILTER_PERIOD    178
-#define WNI_CFG_MIN_RSSI_THRESHOLD    179
-#define WNI_CFG_NTH_BEACON_FILTER    180
-#define WNI_CFG_BROADCAST_FRAME_FILTER_ENABLE    181
-#define WNI_CFG_SCAN_IN_POWERSAVE    182
-#define WNI_CFG_IGNORE_DTIM    183
-#define WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE    184
-#define WNI_CFG_WOWLAN_CHANNEL_SWITCH_ENABLE    185
-#define WNI_CFG_WOWLAN_DEAUTH_ENABLE    186
-#define WNI_CFG_WOWLAN_DISASSOC_ENABLE    187
-#define WNI_CFG_WOWLAN_MAX_MISSED_BEACON    188
-#define WNI_CFG_WOWLAN_MAX_SLEEP_PERIOD    189
-#define WNI_CFG_BA_TIMEOUT    190
-#define WNI_CFG_BA_THRESHOLD_HIGH    191
-#define WNI_CFG_MAX_BA_BUFFERS    192
-#define WNI_CFG_MAX_BA_SESSIONS    193
-#define WNI_CFG_BA_AUTO_SETUP    194
-#define WNI_CFG_ADDBA_REQ_DECLINE    195
-#define WNI_CFG_BG_SCAN_CHANNEL_LIST    196
-#define WNI_CFG_MAX_MEDIUM_TIME    197
-#define WNI_CFG_MAX_MPDUS_IN_AMPDU    198
-#define WNI_CFG_IBSS_AUTO_BSSID    199
-#define WNI_CFG_PROBE_REQ_ADDNIE_FLAG    200
-#define WNI_CFG_PROBE_REQ_ADDNIE_DATA    201
-#define WNI_CFG_PROBE_RSP_ADDNIE_FLAG    202
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA1    203
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA2    204
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA3    205
-#define WNI_CFG_ASSOC_RSP_ADDNIE_FLAG    206
-#define WNI_CFG_ASSOC_RSP_ADDNIE_DATA    207
-#define WNI_CFG_PROBE_REQ_ADDNP2PIE_FLAG    208
-#define WNI_CFG_PROBE_REQ_ADDNP2PIE_DATA    209
-#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG    210
-#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA    211
-#define WNI_CFG_WPS_ENABLE    212
-#define WNI_CFG_WPS_STATE    213
-#define WNI_CFG_WPS_PROBE_REQ_FLAG    214
-#define WNI_CFG_WPS_VERSION    215
-#define WNI_CFG_WPS_REQUEST_TYPE    216
-#define WNI_CFG_WPS_CFG_METHOD    217
-#define WNI_CFG_WPS_UUID    218
-#define WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY    219
-#define WNI_CFG_WPS_PIMARY_DEVICE_OUI    220
-#define WNI_CFG_WPS_DEVICE_SUB_CATEGORY    221
-#define WNI_CFG_WPS_ASSOCIATION_STATE    222
-#define WNI_CFG_WPS_CONFIGURATION_ERROR    223
-#define WNI_CFG_WPS_DEVICE_PASSWORD_ID    224
-#define WNI_CFG_WPS_ASSOC_METHOD    225
-#define WNI_CFG_LOW_GAIN_OVERRIDE    226
-#define WNI_CFG_ENABLE_PHY_AGC_LISTEN_MODE    227
-#define WNI_CFG_RPE_POLLING_THRESHOLD    228
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG    229
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG    230
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG    231
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG    232
-#define WNI_CFG_NO_OF_ONCHIP_REORDER_SESSIONS    233
-#define WNI_CFG_SINGLE_TID_RC    234
-#define WNI_CFG_RRM_ENABLED    235
-#define WNI_CFG_RRM_OPERATING_CHAN_MAX    236
-#define WNI_CFG_RRM_NON_OPERATING_CHAN_MAX    237
-#define WNI_CFG_TX_PWR_CTRL_ENABLE    238
-#define WNI_CFG_MCAST_BCAST_FILTER_SETTING    239
-#define WNI_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK    240
-#define WNI_CFG_DYNAMIC_PS_POLL_VALUE    241
-#define WNI_CFG_PS_NULLDATA_AP_RESP_TIMEOUT    242
-#define WNI_CFG_TELE_BCN_WAKEUP_EN    243
-#define WNI_CFG_TELE_BCN_TRANS_LI    244
-#define WNI_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS    245
-#define WNI_CFG_TELE_BCN_MAX_LI    246
-#define WNI_CFG_TELE_BCN_MAX_LI_IDLE_BCNS    247
-#define WNI_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS    248
-#define WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD    249
-#define WNI_CFG_ASSOC_STA_LIMIT    250
-#define WNI_CFG_SAP_CHANNEL_SELECT_START_CHANNEL    251
-#define WNI_CFG_SAP_CHANNEL_SELECT_END_CHANNEL    252
-#define WNI_CFG_SAP_CHANNEL_SELECT_OPERATING_BAND    253
-#define WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD    254
-#define WNI_CFG_ENABLE_CLOSE_LOOP    255
-#define WNI_CFG_ENABLE_LTE_COEX    256
-#define WNI_CFG_AP_KEEP_ALIVE_TIMEOUT    257
-#define WNI_CFG_GO_KEEP_ALIVE_TIMEOUT    258
-#define WNI_CFG_ENABLE_MC_ADDR_LIST    259
+#define WNI_CFG_VHT_MAX_MPDU_LENGTH    169
+#define WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET    170
+#define WNI_CFG_VHT_LDPC_CODING_CAP    171
+#define WNI_CFG_VHT_SHORT_GI_80MHZ    172
+#define WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ    173
+#define WNI_CFG_VHT_TXSTBC    174
+#define WNI_CFG_VHT_RXSTBC    175
+#define WNI_CFG_VHT_SU_BEAMFORMER_CAP    176
+#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP    177
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED    178
+#define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS    179
+#define WNI_CFG_VHT_MU_BEAMFORMER_CAP    180
+#define WNI_CFG_VHT_MU_BEAMFORMEE_CAP    181
+#define WNI_CFG_VHT_TXOP_PS    182
+#define WNI_CFG_VHT_HTC_VHTC_CAP    183
+#define WNI_CFG_VHT_AMPDU_LEN_EXPONENT    184
+#define WNI_CFG_VHT_LINK_ADAPTATION_CAP    185
+#define WNI_CFG_VHT_RX_ANT_PATTERN    186
+#define WNI_CFG_VHT_TX_ANT_PATTERN    187
+#define WNI_CFG_VHT_RX_MCS_MAP    188
+#define WNI_CFG_VHT_TX_MCS_MAP    189
+#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE    190
+#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE    191
+#define WNI_CFG_VHT_CHANNEL_WIDTH    192
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1    193
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2    194
+#define WNI_CFG_VHT_BASIC_MCS_SET    195
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT    196
+#define WNI_CFG_VHT_SS_UNDER_UTIL    197
+#define WNI_CFG_VHT_40MHZ_UTILIZATION    198
+#define WNI_CFG_VHT_80MHZ_UTILIZATION    199
+#define WNI_CFG_VHT_160MHZ_UTILIZATION    200
+#define WNI_CFG_MAX_AMSDU_LENGTH    201
+#define WNI_CFG_MPDU_DENSITY    202
+#define WNI_CFG_MAX_RX_AMPDU_FACTOR    203
+#define WNI_CFG_SHORT_GI_20MHZ    204
+#define WNI_CFG_SHORT_GI_40MHZ    205
+#define WNI_CFG_RIFS_ENABLED    206
+#define WNI_CFG_MAX_PS_POLL    207
+#define WNI_CFG_NUM_BEACON_PER_RSSI_AVERAGE    208
+#define WNI_CFG_RSSI_FILTER_PERIOD    209
+#define WNI_CFG_FT_RSSI_FILTER_PERIOD    210
+#define WNI_CFG_MIN_RSSI_THRESHOLD    211
+#define WNI_CFG_NTH_BEACON_FILTER    212
+#define WNI_CFG_BROADCAST_FRAME_FILTER_ENABLE    213
+#define WNI_CFG_SCAN_IN_POWERSAVE    214
+#define WNI_CFG_IGNORE_DTIM    215
+#define WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE    216
+#define WNI_CFG_WOWLAN_CHANNEL_SWITCH_ENABLE    217
+#define WNI_CFG_WOWLAN_DEAUTH_ENABLE    218
+#define WNI_CFG_WOWLAN_DISASSOC_ENABLE    219
+#define WNI_CFG_WOWLAN_MAX_MISSED_BEACON    220
+#define WNI_CFG_WOWLAN_MAX_SLEEP_PERIOD    221
+#define WNI_CFG_BA_TIMEOUT    222
+#define WNI_CFG_BA_THRESHOLD_HIGH    223
+#define WNI_CFG_MAX_BA_BUFFERS    224
+#define WNI_CFG_MAX_BA_SESSIONS    225
+#define WNI_CFG_BA_AUTO_SETUP    226
+#define WNI_CFG_ADDBA_REQ_DECLINE    227
+#define WNI_CFG_BG_SCAN_CHANNEL_LIST    228
+#define WNI_CFG_MAX_MEDIUM_TIME    229
+#define WNI_CFG_MAX_MPDUS_IN_AMPDU    230
+#define WNI_CFG_IBSS_AUTO_BSSID    231
+#define WNI_CFG_PROBE_REQ_ADDNIE_FLAG    232
+#define WNI_CFG_PROBE_REQ_ADDNIE_DATA    233
+#define WNI_CFG_PROBE_RSP_ADDNIE_FLAG    234
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA1    235
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA2    236
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA3    237
+#define WNI_CFG_ASSOC_RSP_ADDNIE_FLAG    238
+#define WNI_CFG_ASSOC_RSP_ADDNIE_DATA    239
+#define WNI_CFG_PROBE_REQ_ADDNP2PIE_FLAG    240
+#define WNI_CFG_PROBE_REQ_ADDNP2PIE_DATA    241
+#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG    242
+#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA    243
+#define WNI_CFG_WPS_ENABLE    244
+#define WNI_CFG_WPS_STATE    245
+#define WNI_CFG_WPS_PROBE_REQ_FLAG    246
+#define WNI_CFG_WPS_VERSION    247
+#define WNI_CFG_WPS_REQUEST_TYPE    248
+#define WNI_CFG_WPS_CFG_METHOD    249
+#define WNI_CFG_WPS_UUID    250
+#define WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY    251
+#define WNI_CFG_WPS_PIMARY_DEVICE_OUI    252
+#define WNI_CFG_WPS_DEVICE_SUB_CATEGORY    253
+#define WNI_CFG_WPS_ASSOCIATION_STATE    254
+#define WNI_CFG_WPS_CONFIGURATION_ERROR    255
+#define WNI_CFG_WPS_DEVICE_PASSWORD_ID    256
+#define WNI_CFG_WPS_ASSOC_METHOD    257
+#define WNI_CFG_LOW_GAIN_OVERRIDE    258
+#define WNI_CFG_ENABLE_PHY_AGC_LISTEN_MODE    259
+#define WNI_CFG_RPE_POLLING_THRESHOLD    260
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG    261
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG    262
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG    263
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG    264
+#define WNI_CFG_NO_OF_ONCHIP_REORDER_SESSIONS    265
+#define WNI_CFG_SINGLE_TID_RC    266
+#define WNI_CFG_RRM_ENABLED    267
+#define WNI_CFG_RRM_OPERATING_CHAN_MAX    268
+#define WNI_CFG_RRM_NON_OPERATING_CHAN_MAX    269
+#define WNI_CFG_TX_PWR_CTRL_ENABLE    270
+#define WNI_CFG_MCAST_BCAST_FILTER_SETTING    271
+#define WNI_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK    272
+#define WNI_CFG_DYNAMIC_PS_POLL_VALUE    273
+#define WNI_CFG_PS_NULLDATA_AP_RESP_TIMEOUT    274
+#define WNI_CFG_TELE_BCN_WAKEUP_EN    275
+#define WNI_CFG_TELE_BCN_TRANS_LI    276
+#define WNI_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS    277
+#define WNI_CFG_TELE_BCN_MAX_LI    278
+#define WNI_CFG_TELE_BCN_MAX_LI_IDLE_BCNS    279
+#define WNI_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS    280
+#define WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD    281
+#define WNI_CFG_ASSOC_STA_LIMIT    282
+#define WNI_CFG_SAP_CHANNEL_SELECT_START_CHANNEL    283
+#define WNI_CFG_SAP_CHANNEL_SELECT_END_CHANNEL    284
+#define WNI_CFG_SAP_CHANNEL_SELECT_OPERATING_BAND    285
+#define WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD    286
+#define WNI_CFG_ENABLE_CLOSE_LOOP    287
+#define WNI_CFG_ENABLE_LTE_COEX    288
+#define WNI_CFG_AP_KEEP_ALIVE_TIMEOUT    289
+#define WNI_CFG_GO_KEEP_ALIVE_TIMEOUT    290
+#define WNI_CFG_ENABLE_MC_ADDR_LIST    291
 
 /*
  * String parameter lengths 
@@ -488,7 +520,7 @@
 #define WNI_CFG_PHY_MODE_NONE    3
 
 #define WNI_CFG_DOT11_MODE_STAMIN    0
-#define WNI_CFG_DOT11_MODE_STAMAX    9
+#define WNI_CFG_DOT11_MODE_STAMAX    11
 #define WNI_CFG_DOT11_MODE_STADEF    0
 
 #define WNI_CFG_DOT11_MODE_ALL    0
@@ -501,6 +533,8 @@
 #define WNI_CFG_DOT11_MODE_TAURUS    7
 #define WNI_CFG_DOT11_MODE_11G_ONLY    8
 #define WNI_CFG_DOT11_MODE_11N_ONLY    9
+#define WNI_CFG_DOT11_MODE_11AC    10
+#define WNI_CFG_DOT11_MODE_11AC_ONLY    11
 
 #define WNI_CFG_LISTEN_INTERVAL_STAMIN    0
 #define WNI_CFG_LISTEN_INTERVAL_STAMAX    65535
@@ -891,7 +925,7 @@
 #define WNI_CFG_MAX_CONSECUTIVE_BACKGROUND_SCAN_FAILURE_STADEF    60
 
 #define WNI_CFG_CHANNEL_BONDING_MODE_STAMIN    0
-#define WNI_CFG_CHANNEL_BONDING_MODE_STAMAX    4
+#define WNI_CFG_CHANNEL_BONDING_MODE_STAMAX    10
 #define WNI_CFG_CHANNEL_BONDING_MODE_STADEF    0
 
 #define WNI_CFG_CHANNEL_BONDING_MODE_DISABLE    0
@@ -901,12 +935,19 @@
 #define WNI_CFG_CHANNEL_BONDING_MODE_INTELLIGENT    4
 
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_STAMIN    0
-#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_STAMAX    2
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_STAMAX    10
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_STADEF    0
 
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_NONE    0
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_LOWER    1
 #define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_HIGHER    2
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_LOW_40MHZ_CENTERED    3
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_CENTERED_40MHZ_CENTERED    4
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_HIGH_40MHZ_CENTERED    5
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_LOW_40MHZ_LOW    6
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_HIGH_40MHZ_LOW    7
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_LOW_40MHZ_HIGH    8
+#define WNI_CFG_CB_SECONDARY_CHANNEL_STATE_11AC_20MHZ_HIGH_40MHZ_HIGH    9
 
 #define WNI_CFG_DYNAMIC_THRESHOLD_ZERO_STAMIN    0
 #define WNI_CFG_DYNAMIC_THRESHOLD_ZERO_STAMAX    255
@@ -1045,6 +1086,139 @@
 #define WNI_CFG_GREENFIELD_CAPABILITY_ENABLE    1
 #define WNI_CFG_GREENFIELD_CAPABILITY_DISABLE    0
 
+#define WNI_CFG_VHT_MAX_MPDU_LENGTH_STAMIN    0
+#define WNI_CFG_VHT_MAX_MPDU_LENGTH_STAMAX    2
+#define WNI_CFG_VHT_MAX_MPDU_LENGTH_STADEF    0
+
+#define WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_STAMIN    0
+#define WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_STAMAX    0
+#define WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_STADEF    0
+
+#define WNI_CFG_VHT_LDPC_CODING_CAP_STAMIN    0
+#define WNI_CFG_VHT_LDPC_CODING_CAP_STAMAX    1
+#define WNI_CFG_VHT_LDPC_CODING_CAP_STADEF    0
+
+#define WNI_CFG_VHT_SHORT_GI_80MHZ_STAMIN    0
+#define WNI_CFG_VHT_SHORT_GI_80MHZ_STAMAX    1
+#define WNI_CFG_VHT_SHORT_GI_80MHZ_STADEF    1
+
+#define WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_STAMIN    0
+#define WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_STAMAX    1
+#define WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_STADEF    0
+
+#define WNI_CFG_VHT_TXSTBC_STAMIN    0
+#define WNI_CFG_VHT_TXSTBC_STAMAX    1
+#define WNI_CFG_VHT_TXSTBC_STADEF    0
+
+#define WNI_CFG_VHT_RXSTBC_STAMIN    0
+#define WNI_CFG_VHT_RXSTBC_STAMAX    1
+#define WNI_CFG_VHT_RXSTBC_STADEF    1
+
+#define WNI_CFG_VHT_SU_BEAMFORMER_CAP_STAMIN    0
+#define WNI_CFG_VHT_SU_BEAMFORMER_CAP_STAMAX    1
+#define WNI_CFG_VHT_SU_BEAMFORMER_CAP_STADEF    0
+
+#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMIN    0
+#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMAX    1
+#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STADEF    1
+
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMIN    0
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX    1
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STADEF    0
+
+#define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_STAMIN    0
+#define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_STAMAX    1
+#define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_STADEF    1
+
+#define WNI_CFG_VHT_MU_BEAMFORMER_CAP_STAMIN    0
+#define WNI_CFG_VHT_MU_BEAMFORMER_CAP_STAMAX    1
+#define WNI_CFG_VHT_MU_BEAMFORMER_CAP_STADEF    0
+
+#define WNI_CFG_VHT_MU_BEAMFORMEE_CAP_STAMIN    0
+#define WNI_CFG_VHT_MU_BEAMFORMEE_CAP_STAMAX    1
+#define WNI_CFG_VHT_MU_BEAMFORMEE_CAP_STADEF    0
+
+#define WNI_CFG_VHT_TXOP_PS_STAMIN    0
+#define WNI_CFG_VHT_TXOP_PS_STAMAX    1
+#define WNI_CFG_VHT_TXOP_PS_STADEF    0
+
+#define WNI_CFG_VHT_HTC_VHTC_CAP_STAMIN    0
+#define WNI_CFG_VHT_HTC_VHTC_CAP_STAMAX    1
+#define WNI_CFG_VHT_HTC_VHTC_CAP_STADEF    0
+
+#define WNI_CFG_VHT_AMPDU_LEN_EXPONENT_STAMIN    0
+#define WNI_CFG_VHT_AMPDU_LEN_EXPONENT_STAMAX    7
+#define WNI_CFG_VHT_AMPDU_LEN_EXPONENT_STADEF    3
+
+#define WNI_CFG_VHT_LINK_ADAPTATION_CAP_STAMIN    0
+#define WNI_CFG_VHT_LINK_ADAPTATION_CAP_STAMAX    3
+#define WNI_CFG_VHT_LINK_ADAPTATION_CAP_STADEF    0
+
+#define WNI_CFG_VHT_RX_ANT_PATTERN_STAMIN    0
+#define WNI_CFG_VHT_RX_ANT_PATTERN_STAMAX    1
+#define WNI_CFG_VHT_RX_ANT_PATTERN_STADEF    1
+
+#define WNI_CFG_VHT_TX_ANT_PATTERN_STAMIN    0
+#define WNI_CFG_VHT_TX_ANT_PATTERN_STAMAX    1
+#define WNI_CFG_VHT_TX_ANT_PATTERN_STADEF    1
+
+#define WNI_CFG_VHT_RX_MCS_MAP_STAMIN    0
+#define WNI_CFG_VHT_RX_MCS_MAP_STAMAX    65535
+#define WNI_CFG_VHT_RX_MCS_MAP_STADEF    65534
+
+#define WNI_CFG_VHT_TX_MCS_MAP_STAMIN    0
+#define WNI_CFG_VHT_TX_MCS_MAP_STAMAX    65535
+#define WNI_CFG_VHT_TX_MCS_MAP_STADEF    65534
+
+#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_STAMIN    1
+#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_STAMAX    434
+#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_STADEF    434
+
+#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_STAMIN    1
+#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_STAMAX    434
+#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_STADEF    434
+
+#define WNI_CFG_VHT_CHANNEL_WIDTH_STAMIN    0
+#define WNI_CFG_VHT_CHANNEL_WIDTH_STAMAX    3
+#define WNI_CFG_VHT_CHANNEL_WIDTH_STADEF    0
+
+#define WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ    0
+#define WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ    1
+#define WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ    2
+#define WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ    3
+
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STAMIN    0
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STAMAX    256
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STADEF    0
+
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2_STAMIN    0
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2_STAMAX    0
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2_STADEF    0
+
+#define WNI_CFG_VHT_BASIC_MCS_SET_STAMIN    0
+#define WNI_CFG_VHT_BASIC_MCS_SET_STAMAX    3
+#define WNI_CFG_VHT_BASIC_MCS_SET_STADEF    0
+
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_STAMIN    0
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_STAMAX    4
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_STADEF    0
+
+#define WNI_CFG_VHT_SS_UNDER_UTIL_STAMIN    0
+#define WNI_CFG_VHT_SS_UNDER_UTIL_STAMAX    0
+#define WNI_CFG_VHT_SS_UNDER_UTIL_STADEF    0
+
+#define WNI_CFG_VHT_40MHZ_UTILIZATION_STAMIN    0
+#define WNI_CFG_VHT_40MHZ_UTILIZATION_STAMAX    0
+#define WNI_CFG_VHT_40MHZ_UTILIZATION_STADEF    0
+
+#define WNI_CFG_VHT_80MHZ_UTILIZATION_STAMIN    0
+#define WNI_CFG_VHT_80MHZ_UTILIZATION_STAMAX    0
+#define WNI_CFG_VHT_80MHZ_UTILIZATION_STADEF    0
+
+#define WNI_CFG_VHT_160MHZ_UTILIZATION_STAMIN    0
+#define WNI_CFG_VHT_160MHZ_UTILIZATION_STAMAX    0
+#define WNI_CFG_VHT_160MHZ_UTILIZATION_STADEF    0
+
 #define WNI_CFG_MAX_AMSDU_LENGTH_STAMIN    0
 #define WNI_CFG_MAX_AMSDU_LENGTH_STAMAX    1
 #define WNI_CFG_MAX_AMSDU_LENGTH_STADEF    0
@@ -1391,10 +1565,10 @@
 #define WNI_CFG_ENABLE_MC_ADDR_LIST_STAMAX    1
 #define WNI_CFG_ENABLE_MC_ADDR_LIST_STADEF    0
 
-#define CFG_PARAM_MAX_NUM        260
-#define CFG_STA_IBUF_MAX_SIZE    194
+#define CFG_PARAM_MAX_NUM        292
+#define CFG_STA_IBUF_MAX_SIZE    226
 #define CFG_STA_SBUF_MAX_SIZE    3388
-#define CFG_SEM_MAX_NUM          12
+#define CFG_SEM_MAX_NUM          19
 
 #define CFG_STA_MAGIC_DWORD    0xbeefbeef
 
diff --git a/CORE/MAC/src/cfg/cfgApi.c b/CORE/MAC/src/cfg/cfgApi.c
index a20d0ec..a857343 100644
--- a/CORE/MAC/src/cfg/cfgApi.c
+++ b/CORE/MAC/src/cfg/cfgApi.c
@@ -187,15 +187,6 @@
         PELOGE(cfgLog(pMac, LOGE, FL("Not valid cfg id %d\n"), cfgId);)
         retVal = eSIR_CFG_INVALID_ID;
     }
-#if 0
-    else if (((control & CFG_CTL_RESTART) && !Restarting(pMac)) ||
-             ((control & CFG_CTL_RELOAD) && !Reloading(pMac)))
-    {
-        cfgLog(pMac, LOGE, FL("Change requires a restart/reload cfg id %d state %d\n"),
-               cfgId, pMac->lim.gLimSmeState);
-        retVal = eSIR_CFG_INVALID_ID;
-    }
-#endif
     else if ((pMac->cfg.gCfgIBufMin[index] > value) ||
              (pMac->cfg.gCfgIBufMax[index] < value))
     {
@@ -957,20 +948,10 @@
     if(sessionEntry->dot11mode == WNI_CFG_DOT11_MODE_11B)
         return eSIR_SUCCESS;
 
-
-    
     // Short slot time bit
     if (systemRole == eLIM_AP_ROLE)
     {
-        if (wlan_cfgGetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, &val)
-                       != eSIR_SUCCESS)
-        {
-            cfgLog(pMac, LOGP,
-                   FL("cfg get WNI_CFG_SHORT_SLOT_TIME failed\n"));
-            return eSIR_FAILURE;
-        }
-        if (val)
-            pCapInfo->shortSlotTime = 1;
+        pCapInfo->shortSlotTime = sessionEntry->shortSlotTimeSupported;
     }
     else
     {
@@ -989,16 +970,8 @@
          */
         if (val)
         {
-            if (wlan_cfgGetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, &val)
-                           != eSIR_SUCCESS)
-            {
-                cfgLog(pMac, LOGP,
-                       FL("cfg get WNI_CFG_SHORT_SLOT_TIME failed\n"));
-                return eSIR_FAILURE;
-            }
-            if (val)
-            pCapInfo->shortSlotTime = 1;
-    }
+            pCapInfo->shortSlotTime = sessionEntry->shortSlotTimeSupported;
+        }
     }
 
     // Spectrum Management bit
@@ -1174,7 +1147,7 @@
     mmhMsg.bodyval = (tANI_U32)cfgId;
     mmhMsg.bodyptr = NULL;
 
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
 
     if ((ntfMask & CFG_CTL_NTF_SCH) != 0)
         schPostMessage(pMac, &mmhMsg);
diff --git a/CORE/MAC/src/cfg/cfgParamName.c b/CORE/MAC/src/cfg/cfgParamName.c
index 0a984ed..5c1580b 100644
--- a/CORE/MAC/src/cfg/cfgParamName.c
+++ b/CORE/MAC/src/cfg/cfgParamName.c
@@ -202,6 +202,38 @@
     (unsigned char *)"BASIC_MCS_SET",
     (unsigned char *)"CURRENT_MCS_SET",
     (unsigned char *)"GREENFIELD_CAPABILITY",
+    (unsigned char *)"VHT_MAX_MPDU_LENGTH",
+    (unsigned char *)"VHT_SUPPORTED_CHAN_WIDTH_SET",
+    (unsigned char *)"VHT_LDPC_CODING_CAP",
+    (unsigned char *)"VHT_SHORT_GI_80MHZ",
+    (unsigned char *)"VHT_SHORT_GI_160_AND_80_PLUS_80MHZ",
+    (unsigned char *)"VHT_TXSTBC",
+    (unsigned char *)"VHT_RXSTBC",
+    (unsigned char *)"VHT_SU_BEAMFORMER_CAP",
+    (unsigned char *)"VHT_SU_BEAMFORMEE_CAP",
+    (unsigned char *)"VHT_CSN_BEAMFORMEE_ANT_SUPPORTED",
+    (unsigned char *)"VHT_NUM_SOUNDING_DIMENSIONS",
+    (unsigned char *)"VHT_MU_BEAMFORMER_CAP",
+    (unsigned char *)"VHT_MU_BEAMFORMEE_CAP",
+    (unsigned char *)"VHT_TXOP_PS",
+    (unsigned char *)"VHT_HTC_VHTC_CAP",
+    (unsigned char *)"VHT_AMPDU_LEN_EXPONENT",
+    (unsigned char *)"VHT_LINK_ADAPTATION_CAP",
+    (unsigned char *)"VHT_RX_ANT_PATTERN",
+    (unsigned char *)"VHT_TX_ANT_PATTERN",
+    (unsigned char *)"VHT_RX_MCS_MAP",
+    (unsigned char *)"VHT_TX_MCS_MAP",
+    (unsigned char *)"VHT_RX_HIGHEST_SUPPORTED_DATA_RATE",
+    (unsigned char *)"VHT_TX_HIGHEST_SUPPORTED_DATA_RATE",
+    (unsigned char *)"VHT_CHANNEL_WIDTH",
+    (unsigned char *)"VHT_CHANNEL_CENTER_FREQ_SEGMENT1",
+    (unsigned char *)"VHT_CHANNEL_CENTER_FREQ_SEGMENT2",
+    (unsigned char *)"VHT_BASIC_MCS_SET",
+    (unsigned char *)"VHT_MU_MIMO_CAP_STA_COUNT",
+    (unsigned char *)"VHT_SS_UNDER_UTIL",
+    (unsigned char *)"VHT_40MHZ_UTILIZATION",
+    (unsigned char *)"VHT_80MHZ_UTILIZATION",
+    (unsigned char *)"VHT_160MHZ_UTILIZATION",
     (unsigned char *)"MAX_AMSDU_LENGTH",
     (unsigned char *)"MPDU_DENSITY",
     (unsigned char *)"MAX_RX_AMPDU_FACTOR",
diff --git a/CORE/MAC/src/cfg/cfgProcMsg.c b/CORE/MAC/src/cfg/cfgProcMsg.c
index a93bfe1..30bcbd8 100644
--- a/CORE/MAC/src/cfg/cfgProcMsg.c
+++ b/CORE/MAC/src/cfg/cfgProcMsg.c
@@ -415,7 +415,7 @@
     mmhMsg.bodyptr = NULL;
     mmhMsg.bodyval = 0;
 
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     if (wdaPostCtrlMsg(pMac, &mmhMsg) != eSIR_SUCCESS)
     {
         PELOGE(cfgLog(pMac, LOGE, FL("WDAPostMsgApi failed!\n"));)
diff --git a/CORE/MAC/src/cfg/cfgSendMsg.c b/CORE/MAC/src/cfg/cfgSendMsg.c
index 469d464..8f83143 100644
--- a/CORE/MAC/src/cfg/cfgSendMsg.c
+++ b/CORE/MAC/src/cfg/cfgSendMsg.c
@@ -139,7 +139,7 @@
     }
 
     // Ship it
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     SysProcessMmhMsg(pMac, &mmhMsg);
 
 } /*** end cfgSendHostMsg() ***/
diff --git a/CORE/MAC/src/cfg/cfgUtil/cfg.txt b/CORE/MAC/src/cfg/cfgUtil/cfg.txt
index ad07684..ed4e62d 100644
--- a/CORE/MAC/src/cfg/cfgUtil/cfg.txt
+++ b/CORE/MAC/src/cfg/cfgUtil/cfg.txt
@@ -604,10 +604,10 @@
 WNI_CFG_DOT11_MODE     I     4     9
 V    RW    NP RESTART
 LIM
-0    9    0
+0    11    0
 V    RW    NP RESTART
 LIM
-0    9    0
+0    11    0
 
 #ENUM  ALL           0
 #ENUM  11A           1
@@ -619,6 +619,8 @@
 #ENUM  TAURUS        7
 #ENUM  11G_ONLY      8
 #ENUM  11N_ONLY      9
+#ENUM  11AC          10
+#ENUM  11AC_ONLY     11
 
 
 
@@ -2244,10 +2246,10 @@
 WNI_CFG_CHANNEL_BONDING_MODE    I    4    12
 V    RW    NP    RESTART
 LIM
-0    4     0
+0    10     0
 V    RW    NP    RESTART
 LIM
-0    4     0
+0    10     0
 
 #ENUM DISABLE          0
 #ENUM ENABLE           1
@@ -2263,21 +2265,35 @@
 *  lower frequency). 
 *
 *  0 - There is no secondary channel. The channel is 20Mhz
-*  1 - LOWER:  Secondary channel is located below the primary channel
-*  2 - HIGHER: Secondary channel is located above the primary channel   
+*  1 - LOWER:  Secondary channel 40MHZ is located below the primary channel
+*  2 - CENTERED:Secondary channel and primary located at centered
+*  3 - HIGHER: Secondary channel 40 MHZ is located above the primary channel
+*  4 - 80MHZ_LOW_CENTERED : 20/40MHZ offset LOW 40/80MHZ offset CENTERED
+*  5 - 80MHZ_CENTERED_CENTERED : 20/40MHZ offset CENTERED 40/80MHZ offset CENTERED
+*  6 - 80MHZ_HIGH_CENTERED : 20/40MHZ offset HIGH 40/80MHZ offset CENTERED
+*  7 - 80MHZ_LOW_LOW: 20/40MHZ offset LOW 40/80MHZ offset LOW
+*  8 - 80MHZ_HIGH_LOW: 20/40MHZ offset HIGH 40/80MHZ offset LOW
+*  9 - 80MHZ_LOW_HIGH: 20/40MHZ offset LOW 40/80MHZ offset HIGH
+*  10 - 80MHZ_HIGH_HIGH: 20/40MHZ offset HIGH 40/80MHZ offset HIGH
 *
 WNI_CFG_CB_SECONDARY_CHANNEL_STATE    I    4    12
 V    RW    NP
 NONE
-0    2     0
+0    10     0
 V    RW    NP
 NONE
-0    2     0
+0    10     0
 
 #ENUM NONE             0
 #ENUM LOWER            1
 #ENUM HIGHER           2
-
+#ENUM 11AC_20MHZ_LOW_40MHZ_CENTERED       3
+#ENUM 11AC_20MHZ_CENTERED_40MHZ_CENTERED  4
+#ENUM 11AC_20MHZ_HIGH_40MHZ_CENTERED      5
+#ENUM 11AC_20MHZ_LOW_40MHZ_LOW            6
+#ENUM 11AC_20MHZ_HIGH_40MHZ_LOW           7
+#ENUM 11AC_20MHZ_LOW_40MHZ_HIGH           8
+#ENUM 11AC_20MHZ_HIGH_40MHZ_HIGH          9
 
 *************************************
 * Feature:   Dynamic Retry Rates
@@ -2693,6 +2709,385 @@
 #ENUM ENABLE    1
 #ENUM DISABLE   0
 
+*
+* Maximum AMPDU Length
+* By default set to zero for 3895 octets
+*
+WNI_CFG_VHT_MAX_MPDU_LENGTH  I    4    19
+V    RW    NP    
+LIM
+0    2    0
+V    RW    NP    
+LIM
+0    2    0
+
+*
+* Supported Channel Width Set
+* By default set to zero for 
+* STAs does not support either 160 or 80+80MHz
+*
+WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET  I    4    19
+V    RW    NP    
+LIM
+0    0    0
+V    RW    NP    
+LIM
+0    0    0
+
+*
+* LDPC Coding Capability
+* Riva/Pronto supports, default set to 1
+*
+WNI_CFG_VHT_LDPC_CODING_CAP  I    4    19
+V    RW    NP    
+LIM
+0    1    0
+V    RW    NP    
+LIM
+0    1    0
+
+*
+* Short GI for 80MHz
+* Riva/Pronto supports, default set to 1
+*
+WNI_CFG_VHT_SHORT_GI_80MHZ  I    4    19
+V    RW    NP    
+LIM
+0    1    1
+V    RW    NP    
+LIM
+0    1    1
+
+*
+* Short GI for 160MHz and 80+80MHz
+* Riva/Pronto does not supports, default set to 0
+*
+WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ  I    4    19
+V    RW    NP    
+LIM
+0    1    0
+V    RW    NP    
+LIM
+0    1    0
+
+*
+* Support for Transmission of 2x1 STBC
+* Riva/Pronto does not supports, default set to 0
+*
+WNI_CFG_VHT_TXSTBC  I    4    19
+V    RW    NP    
+LIM
+0    1    0
+V    RW    NP    
+LIM
+0    1    0
+
+*
+* Support for Reception of PPDUs using STBC
+* Riva/Pronto supports, default set to 1
+*
+WNI_CFG_VHT_RXSTBC  I    4    19
+V    RW    NP    
+LIM
+0    1    1
+V    RW    NP    
+LIM
+0    1    1
+
+*
+* Support for Operating as SU Beamformer
+* Riva/Pronto does not supports, default set to 0
+*
+WNI_CFG_VHT_SU_BEAMFORMER_CAP  I    4    19
+V    RW    NP    
+LIM
+0    1    0
+V    RW    NP    
+LIM
+0    1    0
+
+*
+* Support for Operating as SU Beamformee
+* Riva does not support, But Pronto supports, default set to 0
+*
+WNI_CFG_VHT_SU_BEAMFORMEE_CAP  I    4    19
+V    RW    NP    
+LIM
+0    1    1
+V    RW    NP    
+LIM
+0    1    1
+
+*
+* Compressed Steering Number of Beamformer Antennas Supported
+* Riva/Pronto does not support, default set to 0
+*
+WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED  I    4    19
+V    RW    NP    
+LIM
+0    1    0
+V    RW    NP    
+LIM
+0    1    0
+
+*
+* Number of Sounding Dimensions indicates Number
+* of antennas used by the beamformer when sending beamformed transmissions
+* Riva/Pronto does not support beamformer, default set to 0
+*
+WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS  I    4    19
+V    RW    NP    
+LIM
+0    1    1
+V    RW    NP    
+LIM
+0    1    1
+
+*
+* MU Beamformer Capable
+* Riva/Pronto does not support, default set to 0
+*
+WNI_CFG_VHT_MU_BEAMFORMER_CAP  I    4    19
+V    RW    NP    
+LIM
+0    1    0
+V    RW    NP    
+LIM
+0    1    0
+
+*
+* MU Beamformee Capable
+* Riva does not support but pronto supports, default set to 0
+*
+WNI_CFG_VHT_MU_BEAMFORMEE_CAP  I    4    19
+V    RW    NP    
+LIM
+0    1    0
+V    RW    NP    
+LIM
+0    1    0
+
+*
+* VHT TXOP PS
+* Riva does not support but pronto supports, default set to 0
+*
+WNI_CFG_VHT_TXOP_PS  I    4    19
+V    RW    NP    
+LIM
+0    1    0
+V    RW    NP    
+LIM
+0    1    0
+
+*
+* +HTC-VHT Capable
+* Riva does not support but pronto supports, default set to 0
+*
+WNI_CFG_VHT_HTC_VHTC_CAP  I    4    19
+V    RW    NP    
+LIM
+0    1    0
+V    RW    NP    
+LIM
+0    1    0
+
+*
+* Maximum AMPDU Length exponent range 0-7
+* 2^(13+Max AMPDU Length)-1, default set to 0
+*
+WNI_CFG_VHT_AMPDU_LEN_EXPONENT  I    4    19
+V    RW    NP    
+LIM
+0    7    3
+V    RW    NP    
+LIM
+0    7    3
+
+*
+* VHT Link Adaptation Capable
+* Riva does not support but pronto supports, default set to 0
+*
+WNI_CFG_VHT_LINK_ADAPTATION_CAP  I    4    19
+V    RW    NP    
+LIM
+0    3    0
+V    RW    NP    
+LIM
+0    3    0
+
+*
+* VHT Rx Antenna Pattern Consistency
+*
+WNI_CFG_VHT_RX_ANT_PATTERN  I    4    19
+V    RW    NP    
+LIM
+0    1    1
+V    RW    NP    
+LIM
+0    1    1
+
+*
+* VHT Tx Antenna Pattern Consistency
+*
+WNI_CFG_VHT_TX_ANT_PATTERN  I    4    19
+V    RW    NP    
+LIM
+0    1    1
+V    RW    NP    
+LIM
+0    1    1
+
+*
+* RxMCS Map is 16 bits, The 2bit Max MCS for n SS field.
+* Indicates the maximum MCS that can be received for each
+* number of spacial streams. Riva supports MCS 0-9
+*
+WNI_CFG_VHT_RX_MCS_MAP  I    4    19
+V    RW    NP    
+LIM
+0    0xFFFF    0xFFFE
+V    RW    NP    
+LIM
+0    0xFFFF    0xFFFE
+
+* TxMCS Map is 16 bits, The 2bit Max MCS for n SS field.
+* Indicates the maximum MCS that can be transmitted for each
+* number of spacial streams.
+*
+WNI_CFG_VHT_TX_MCS_MAP  I    4    19
+V    RW    NP    
+LIM
+0    0xFFFF    0xFFFE
+V    RW    NP    
+LIM
+0    0xFFFF    0xFFFE
+
+*
+* Rx Highest supported data rate.
+*
+WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE  I    4    19
+V    RW    NP    
+LIM
+1    434   434
+V    RW    NP    
+LIM
+1    434   434
+
+*
+* Tx Highest supported data rate.
+*
+WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE  I    4    19
+V    RW    NP    
+LIM
+1    434    434
+V    RW    NP    
+LIM
+1    434    434
+
+*
+* VHT Operation Information
+* Channel Width set to zero for 20/40MHz.
+* set to 1 for 80MHz. 2->160Mhz, 3->80+80MHz
+*
+WNI_CFG_VHT_CHANNEL_WIDTH  I    4    19
+V    RW    NP    
+LIM
+0    3    0
+V    RW    NP    
+LIM
+0    3    0
+
+#ENUM 20_40MHZ       0
+#ENUM 80MHZ          1
+#ENUM 160MHZ         2
+#ENUM 80_PLUS_80MHZ  3
+*
+* Channel center freq Seg1 
+*
+WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1  I    4    19
+V    RW    NP    
+LIM
+0    256   0 
+V    RW    NP    
+LIM
+0    256   0
+
+*
+* Channel center freq Seg2 for 80+80 Mhz
+*
+WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2  I    4    19
+V    RW    NP    
+LIM
+0    0     0 
+V    RW    NP    
+LIM
+0    0     0
+
+*
+* Basic MCS Set
+*
+WNI_CFG_VHT_BASIC_MCS_SET  I    4    19
+V    RW    NP    
+LIM
+0    3     0 
+V    RW    NP    
+LIM
+0    3     0
+
+*
+* MU-MIMO Capable STA Count
+*
+WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT  I    4    19
+V    RW    NP    
+LIM
+0     4    0 
+V    RW    NP    
+LIM
+0     4     0
+
+*
+* Spatial Stream Under-Utilization
+*
+WNI_CFG_VHT_SS_UNDER_UTIL  I    4    19
+V    RW    NP    
+LIM
+0     0    0 
+V    RW    NP    
+LIM
+0     0     0
+
+*
+* Forty MHZ Utilization
+*
+WNI_CFG_VHT_40MHZ_UTILIZATION  I    4    19
+V    RW    NP    
+LIM
+0     0    0 
+V    RW    NP    
+LIM
+0     0     0
+
+*
+* Eighty MHz Utilization
+*
+WNI_CFG_VHT_80MHZ_UTILIZATION  I    4    19
+V    RW    NP    
+LIM
+0     0    0 
+V    RW    NP    
+LIM
+0     0     0
+
+*
+* Hundred Sixty MHz Utilization
+*
+WNI_CFG_VHT_160MHZ_UTILIZATION  I    4    19
+V    RW    NP    
+LIM
+0     0    0 
+V    RW    NP    
+LIM
+0     0     0
 
 *
 * Maximum AMSDU length
diff --git a/CORE/MAC/src/include/dot11f.h b/CORE/MAC/src/include/dot11f.h
index 7fe0dc4..d4657b1 100644
--- a/CORE/MAC/src/include/dot11f.h
+++ b/CORE/MAC/src/include/dot11f.h
@@ -35,7 +35,7 @@
   *
   *
   * This file was automatically generated by 'framesc'
-  * Tue May 15 13:12:01 2012 from the following file(s):
+  * Fri Aug 17 13:25:06 2012 from the following file(s):
   *
   * dot11f.frms
   * 
@@ -5005,6 +5005,113 @@
 #ifdef __cplusplus
 }; /* End extern "C". */
 #endif /* C++ */
+// EID 191 (0xbf)
+typedef struct sDot11fIEVHTCaps {
+    tANI_U8      present;
+    tANI_U32       maxMPDULen: 2;
+    tANI_U32 supportedChannelWidthSet: 2;
+    tANI_U32    ldpcCodingCap: 1;
+    tANI_U32     shortGI80MHz: 1;
+    tANI_U32 shortGI160and80plus80MHz: 1;
+    tANI_U32           txSTBC: 1;
+    tANI_U32           rxSTBC: 3;
+    tANI_U32  suBeamFormerCap: 1;
+    tANI_U32  suBeamformeeCap: 1;
+    tANI_U32 csnofBeamformerAntSup: 3;
+    tANI_U32   numSoundingDim: 3;
+    tANI_U32  muBeamformerCap: 1;
+    tANI_U32  muBeamformeeCap: 1;
+    tANI_U32        vhtTXOPPS: 1;
+    tANI_U32        htcVHTCap: 1;
+    tANI_U32   maxAMPDULenExp: 3;
+    tANI_U32  vhtLinkAdaptCap: 2;
+    tANI_U32     rxAntPattern: 1;
+    tANI_U32     txAntPattern: 1;
+    tANI_U32        reserved1: 2;
+    tANI_U16     rxMCSMap;
+    tANI_U16 rxHighSupDataRate: 13;
+    tANI_U16        reserved2: 3;
+    tANI_U16     txMCSMap;
+    tANI_U16    txSupDataRate: 13;
+    tANI_U16        reserved3: 3;
+} tDot11fIEVHTCaps;
+
+#define DOT11F_EID_VHTCAPS ( 191 )
+
+// N.B. These #defines do *not* include the EID & length
+#define DOT11F_IE_VHTCAPS_MIN_LEN ( 12 )
+
+#define DOT11F_IE_VHTCAPS_MAX_LEN ( 12 )
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+tANI_U32 dot11fUnpackIeVHTCaps(tpAniSirGlobal, tANI_U8*,tANI_U8, tDot11fIEVHTCaps*);
+
+tANI_U32 dot11fPackIeVHTCaps(tpAniSirGlobal, tDot11fIEVHTCaps*, tANI_U8*, tANI_U32, tANI_U32*);
+
+tANI_U32 dot11fGetPackedIEVHTCaps(tpAniSirGlobal, tDot11fIEVHTCaps*, tANI_U32*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
+// EID 193 (0xc1)
+typedef struct sDot11fIEVHTExtBssLoad {
+    tANI_U8      present;
+    tANI_U8      muMIMOCapStaCount;
+    tANI_U8      ssUnderUtil;
+    tANI_U8      FortyMHzUtil;
+    tANI_U8      EightyMHzUtil;
+    tANI_U8      OneSixtyMHzUtil;
+} tDot11fIEVHTExtBssLoad;
+
+#define DOT11F_EID_VHTEXTBSSLOAD ( 193 )
+
+// N.B. These #defines do *not* include the EID & length
+#define DOT11F_IE_VHTEXTBSSLOAD_MIN_LEN ( 5 )
+
+#define DOT11F_IE_VHTEXTBSSLOAD_MAX_LEN ( 5 )
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+tANI_U32 dot11fUnpackIeVHTExtBssLoad(tpAniSirGlobal, tANI_U8*,tANI_U8, tDot11fIEVHTExtBssLoad*);
+
+tANI_U32 dot11fPackIeVHTExtBssLoad(tpAniSirGlobal, tDot11fIEVHTExtBssLoad*, tANI_U8*, tANI_U32, tANI_U32*);
+
+tANI_U32 dot11fGetPackedIEVHTExtBssLoad(tpAniSirGlobal, tDot11fIEVHTExtBssLoad*, tANI_U32*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
+// EID 192 (0xc0)
+typedef struct sDot11fIEVHTOperation {
+    tANI_U8      present;
+    tANI_U8      chanWidth;
+    tANI_U8      chanCenterFreqSeg1;
+    tANI_U8      chanCenterFreqSeg2;
+    tANI_U16     basicMCSSet;
+} tDot11fIEVHTOperation;
+
+#define DOT11F_EID_VHTOPERATION ( 192 )
+
+// N.B. These #defines do *not* include the EID & length
+#define DOT11F_IE_VHTOPERATION_MIN_LEN ( 5 )
+
+#define DOT11F_IE_VHTOPERATION_MAX_LEN ( 5 )
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+tANI_U32 dot11fUnpackIeVHTOperation(tpAniSirGlobal, tANI_U8*,tANI_U8, tDot11fIEVHTOperation*);
+
+tANI_U32 dot11fPackIeVHTOperation(tpAniSirGlobal, tDot11fIEVHTOperation*, tANI_U8*, tANI_U32, tANI_U32*);
+
+tANI_U32 dot11fGetPackedIEVHTOperation(tpAniSirGlobal, tDot11fIEVHTOperation*, tANI_U32*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
 // EID 68 (0x44)
 typedef struct sDot11fIEWAPI {
     tANI_U8      present;
@@ -5091,6 +5198,32 @@
 #ifdef __cplusplus
 }; /* End extern "C". */
 #endif /* C++ */
+// EID 221 (0xdd) {OUI 0x50, 0x6f, 0x9a, 0x0a}
+typedef struct sDot11fIEWFDIEOpaque {
+    tANI_U8      present;
+    tANI_U8      num_data;
+    tANI_U8      data[249];
+} tDot11fIEWFDIEOpaque;
+
+#define DOT11F_EID_WFDIEOPAQUE ( 221 )
+
+// N.B. These #defines do *not* include the EID & length
+#define DOT11F_IE_WFDIEOPAQUE_MIN_LEN ( 6 )
+
+#define DOT11F_IE_WFDIEOPAQUE_MAX_LEN ( 253 )
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+tANI_U32 dot11fUnpackIeWFDIEOpaque(tpAniSirGlobal, tANI_U8*,tANI_U8, tDot11fIEWFDIEOpaque*);
+
+tANI_U32 dot11fPackIeWFDIEOpaque(tpAniSirGlobal, tDot11fIEWFDIEOpaque*, tANI_U8*, tANI_U32, tANI_U32*);
+
+tANI_U32 dot11fGetPackedIEWFDIEOpaque(tpAniSirGlobal, tDot11fIEWFDIEOpaque*, tANI_U32*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
 // EID 221 (0xdd) {OUI 0x00, 0x50, 0xf2, 0x02, 0x05}
 typedef struct sDot11fIEWMMCaps {
     tANI_U8      present;
@@ -5736,6 +5869,8 @@
     tDot11fIECCXRadMgmtCap  CCXRadMgmtCap;
     tDot11fIECCXVersion     CCXVersion;
     tDot11fIEP2PIEOpaque    P2PIEOpaque;
+    tDot11fIEWFDIEOpaque    WFDIEOpaque;
+    tDot11fIEVHTCaps        VHTCaps;
 } tDot11fAssocRequest;
 
 #define DOT11F_ASSOCREQUEST ( 5 )
@@ -5779,6 +5914,8 @@
     tDot11fIEAirgo          Airgo;
     tDot11fIEWscAssocRes    WscAssocRes;
     tDot11fIEP2PAssocRes    P2PAssocRes;
+    tDot11fIEVHTCaps        VHTCaps;
+    tDot11fIEVHTOperation   VHTOperation;
 } tDot11fAssocResponse;
 
 #define DOT11F_ASSOCRESPONSE ( 6 )
@@ -5863,6 +6000,9 @@
     tDot11fIEAirgo            Airgo;
     tDot11fIEWscBeacon        WscBeacon;
     tDot11fIEP2PBeacon        P2PBeacon;
+    tDot11fIEVHTCaps          VHTCaps;
+    tDot11fIEVHTOperation     VHTOperation;
+    tDot11fIEVHTExtBssLoad    VHTExtBssLoad;
 } tDot11fBeacon;
 
 #define DOT11F_BEACON ( 8 )
@@ -5930,6 +6070,9 @@
     tDot11fIECCXTrafStrmMet   CCXTrafStrmMet;
     tDot11fIECCXTxmitPower    CCXTxmitPower;
     tDot11fIEP2PBeacon        P2PBeacon;
+    tDot11fIEVHTCaps          VHTCaps;
+    tDot11fIEVHTOperation     VHTOperation;
+    tDot11fIEVHTExtBssLoad    VHTExtBssLoad;
 } tDot11fBeacon2;
 
 #define DOT11F_BEACON2 ( 10 )
@@ -5985,6 +6128,9 @@
     tDot11fIEAirgo             Airgo;
     tDot11fIEWscBeaconProbeRes WscBeaconProbeRes;
     tDot11fIEP2PBeaconProbeRes P2PBeaconProbeRes;
+    tDot11fIEVHTCaps           VHTCaps;
+    tDot11fIEVHTOperation      VHTOperation;
+    tDot11fIEVHTExtBssLoad     VHTExtBssLoad;
 } tDot11fBeaconIEs;
 
 #define DOT11F_BEACONIES ( 11 )
@@ -6498,6 +6644,7 @@
     tDot11fIEWscProbeReq   WscProbeReq;
     tDot11fIEWFATPC        WFATPC;
     tDot11fIEP2PProbeReq   P2PProbeReq;
+    tDot11fIEVHTCaps       VHTCaps;
 } tDot11fProbeRequest;
 
 #define DOT11F_PROBEREQUEST ( 34 )
@@ -6553,6 +6700,9 @@
     tDot11fIEAirgo            Airgo;
     tDot11fIEWscProbeRes      WscProbeRes;
     tDot11fIEP2PProbeRes      P2PProbeRes;
+    tDot11fIEVHTCaps          VHTCaps;
+    tDot11fIEVHTOperation     VHTOperation;
+    tDot11fIEVHTExtBssLoad    VHTExtBssLoad;
 } tDot11fProbeResponse;
 
 #define DOT11F_PROBERESPONSE ( 35 )
@@ -6690,6 +6840,8 @@
     tDot11fIEWMMTSPEC           WMMTSPEC[4];
     tDot11fIECCXTrafStrmRateSet CCXTrafStrmRateSet;
     tDot11fIEP2PIEOpaque        P2PIEOpaque;
+    tDot11fIEWFDIEOpaque        WFDIEOpaque;
+    tDot11fIEVHTCaps            VHTCaps;
 } tDot11fReAssocRequest;
 
 #define DOT11F_REASSOCREQUEST ( 40 )
@@ -6734,6 +6886,8 @@
     tDot11fIEAirgo              Airgo;
     tDot11fIEWscReassocRes      WscReassocRes;
     tDot11fIEP2PAssocRes        P2PAssocRes;
+    tDot11fIEVHTCaps            VHTCaps;
+    tDot11fIEVHTOperation       VHTOperation;
 } tDot11fReAssocResponse;
 
 #define DOT11F_REASSOCRESPONSE ( 41 )
diff --git a/CORE/MAC/src/include/dphGlobal.h b/CORE/MAC/src/include/dphGlobal.h
index 56e5ed9..9a53caf 100644
--- a/CORE/MAC/src/include/dphGlobal.h
+++ b/CORE/MAC/src/include/dphGlobal.h
@@ -21,352 +21,638 @@
 
 /*
  *
+
  * Airgo Networks, Inc proprietary. All rights reserved.
  * Author:      Sandesh Goel
+
  * Date:        02/25/02
+
  * History:-
+
  * Date            Modified by    Modification Information
+
  * --------------------------------------------------------------------
+
  *
+
  */
 
+
 #ifndef __DPH_GLOBAL_H__
+
 #define __DPH_GLOBAL_H__
 
+
 #include "limGlobal.h"
+
 //#include "parserApi.h"
+
 #include "sirMacProtDef.h"
+
 #include "sirMacPropExts.h"
+
 #include "sirApi.h"
 
+
 /// Following determines whether statistics are maintained or not
+
 #define DPH_STATS
 
+
 /// traffic category not allowed
+
 #define DPH_TID_NOTALLOWED           0xFF
 
+
 /// Periodicity of invocation of rate adaptation (in ms)
+
 #define DPH_RATE_ADAPTATION_PERIOD     20
 
+
 // Rate indices
+
 #define DPH_PHY_RATE_1_INDEX     0
+
 #define DPH_PHY_RATE_2_INDEX     1
+
 #define DPH_PHY_RATE_5_5_INDEX   2
+
 #define DPH_PHY_RATE_11_INDEX    3
+
 #define DPH_PHY_RATE_6_INDEX     4
+
 #define DPH_PHY_RATE_9_INDEX     5
+
 #define DPH_PHY_RATE_12_INDEX    6
+
 #define DPH_PHY_RATE_18_INDEX    7
+
 #define DPH_PHY_RATE_24_INDEX    8
+
 #define DPH_PHY_RATE_36_INDEX    9
+
 #define DPH_PHY_RATE_48_INDEX   10
+
 #define DPH_PHY_RATE_54_INDEX   11
+
 #define DPH_PHY_RATE_72_INDEX   12
+
 #define DPH_PHY_RATE_96_INDEX   13
+
 #define DPH_PHY_RATE_108_INDEX  14
+
 #define DPH_PHY_RATE_144_INDEX  15
+
 #define DPH_PHY_RATE_MAX_INDEX  16
 
+
 /// Maximum time to wait for a management packet to go out (ms)
+
 #define DPH_MAX_MGMT_WAIT_TIME  10000
 
+
 /// Step size for the wait time histogram (ms)
+
 #define DPH_WAIT_HIST_STEP 20
 
+
 /// Number of entries in wait time histogram
+
 #define DPH_WAIT_HIST_SIZE  100
 
+
 /// TCID for Management & Keep Alive Mgmt frames
+
 #define DPH_MGMT_TCID                      4
+
 #define DPH_KEEPALIVE_PROBE_RESPONSE_TCID  0
 
+
 /// STAID for Management frames
+
 #define DPH_USE_MGMT_STAID  -1
 
+
 // Keep Alive frames
+
 #define DPH_NON_KEEPALIVE_FRAME  0
+
 #define DPH_KEEPALIVE_FRAME      1
 
+
 /// Mask for subtype, type, protocol version, order and wep fields in the mac frame control
+
 #define DPH_FC_BD_FILL_MASK  0xFFCC
 
+
 /// Enable/Disable Txop generation in TFP for HCF mode
+
 #define DPH_ENABLE_HCF_TXOP_GEN_AT_TFP   0x00
+
 #define DPH_DISABLE_HCF_TXOP_GEN_AT_TFP  0x02
 
+
 /// Enable/Disable Txop generation in TFP for EDCF mode
+
 #define DPH_ENABLE_EDCF_TXOP_GEN_AT_TFP   0x00
+
 #define DPH_DISABLE_EDCF_TXOP_GEN_AT_TFP  0x01
 
+
 #define DPH_DUMP_ALL_STA_ID     -1
+
 #define DPH_DUMP_RX_BD           0
+
 #define DPH_DUMP_TX_BD           1
+
 #define DPH_DUMP_TX_MGMT_BD      2
 
+
 //DPH Hash Index for BSS(STA's Peer) on station.
+
 #define DPH_STA_HASH_INDEX_PEER   1
 
+
 typedef struct sDphRateBasedCtr
+
 {
+
     tANI_U32 hi;
+
     tANI_U32 lo;
+
 } tDphRateBasedCtr;
 
+
 typedef struct sDphPhyRates
+
 {
+
     tANI_U8 dataRateX2;
+
     tANI_U8 ackRateX2;
+
     tANI_U8 rtsRateX2;
+
 } tDphPhyRates;
 
+
 typedef struct sDphIFSValues
+
 {
+
     tANI_U8 sifs;
+
     tANI_U8 pifs;
+
     tANI_U8 difs;
+
     tANI_U8 preamble;
+
 } tDphIFSValues;
 
+
 typedef struct sDphQosParams
+
 {
+
     tANI_U8                   addtsPresent;
+
     tSirAddtsReqInfo       addts;
+
     tSirMacQosCapabilityStaIE capability;
+
 } tDphQosParams;
 
+
 /// Queue attribute structure
+
 typedef struct sDphQueueAttr
+
 {
+
     tANI_U16     valid : 1;
+
     tANI_U16     seqNum : 12;
+
     tANI_U16     ackPolicy : 2;
+
     tANI_U16     rsvd : 1;
+
 } tDphQueueAttr, *tpDphQueueAttr;
 
+
 #if defined( FEATURE_WLAN_INTEGRATED_SOC )
+
 typedef struct sCfgTrafficClass {
+
     //Use Block ACK on this STA/TID
+
     // Fields used to store the default TC parameters for this TSPEC.
+
     // They will be used when the TSPEC is deleted.
+
     tANI_U8 fDisableTx:1;
+
     tANI_U8 fDisableRx:1;
+
     tANI_U8 fUseBATx:1;
+
     tANI_U8 fUseBARx:1;
 
+
     // 1: expect to see frames with compressed BA coming from this peer MAC
+
     tANI_U8 fRxCompBA:1;
+
     tANI_U8 fTxCompBA:1;
 
+
     // immediate ACK or delayed ACK for frames from this peer MAC
+
     tANI_U8 fRxBApolicy:1;
 
+
     // immediate ACK or delayed ACK for frames to this peer MAC
+
     tANI_U8 fTxBApolicy:1;
 
+
     //Initiator or recipient
+
     tANI_U8 role;
 
+
     //Max # of MSDU received from this STA, negotiated at ADDBA
+
     // used for maintaining block ack state info
+
     tANI_U16 rxBufSize;
 
+
     //Max # of MSDU send to this STA, negotiated at ADDBA
+
     tANI_U16 txBufSize;
 
+
     //BA timeout negotiated at ADDBA. Unit: TU
+
     tANI_U16 tuTxBAWaitTimeout; //Time for Tx to wait for BA. 0 means no timeout
 
+
     tANI_U16 tuRxBAWaitTimeout; //Time for Rx to wait for explicit/implicit BAR. 0 means no timeout
 
+
 } tCfgTrafficClass;
+
 #endif /* EATURE_WLAN_INTEGRATED_SOC */
 
+
 /// STA state node
+
 typedef struct sDphHashNode
+
 {
 
+
     //BYTE 0
+
     // HASH ENTRY FIELDS NOT NEEDED IN HAL.
+
     /// This STA valid or not
+
     tANI_U8   valid : 1;
+
     tANI_U8   encPolicy : 3;
+
     tANI_U8   defaultKey : 1;
+
     tANI_U8   defaultKeyId : 2;
+
     tANI_U8   qosMode : 1;
 
+
     //BYTE 1
+
     tANI_U8   erpEnabled : 1;
+
     tANI_U8   added : 1; // This has been added to the dph hash table
+
     tANI_U8   linkTestOn : 1;
+
     tANI_U8   shortPreambleEnabled : 1;
+
     tANI_U8   shortSlotTimeEnabled : 1;
+
     tANI_U8   stopTx:1;
+
     tANI_U8   wmeEnabled: 1; // set if both ap and sta are wme capable
+
     tANI_U8   lleEnabled: 1; // set if both ap and sta are 11e capable
 
+
     //BYTE 2
+
     tANI_U8   wsmEnabled: 1; // set if both ap and sta are wsm capable
+
     tANI_U8   versionPresent:1; // station gave version info
+
     tANI_U8   burstEnableForce:1; // allow bursting regardless of qosMode
+
     tANI_U8   staAuthenticated:1;    
+
     /// Whether the peer is ANI or not
+
     tANI_U8  aniPeer:1;
+
     tANI_U8   titanPeer:1;                // flag to indicate if its a titan peer    
+
     tANI_U8  fAniCount:1;
+
 #if (WNI_POLARIS_FW_PRODUCT == AP)
+
     tANI_U8   hcfEnabled : 1;
+
 #else
+
     tANI_U8   rsvd:1;
+
 #endif
 
+
     /// Fragmentation size
+
     tANI_U16   fragSize;
 
+
     /// LIM state
+
     tLimMlmStaContext mlmStaContext;
 
+
     /// Number of Tim to wait if the STA doesn't respond / fetch data
+
     tANI_U8  timWaitCount;
 
+
     /// Number of Successfull MPDU's being sent
+
     tANI_U32    curTxMpduCnt;
 
 
+
+
     /// number of consecutive TIMs sent without response
+
     tANI_U8  numTimSent;
 
+
     // qos parameter info
+
     tDphQosParams  qos;
 
+
     // station version info - valid only if versionPresent is set
+
     tSirMacPropVersion version;
+
     // station proprietary capability
+
     tANI_U16                propCapability;
 
+
 #ifdef PLM_WDS
+
     tANI_U8  wdsIndex;
+
     tANI_U8  wdsPeerBeaconSeen;
+
 #endif
 
+
    //Taurus capabilities
+
    tANI_U16 baPolicyFlag;                 //BA Policy for each TID. 
 
+
     /*
+
     * All the legacy and airgo supported rates.
+
     */
+
     tSirSupportedRates supportedRates;
 
+
     tANI_U8 htGreenfield:1;
+
     tANI_U8 htShortGI40Mhz:1;
+
     tANI_U8 htShortGI20Mhz:1;
+
     // DSSS/CCK at 40 MHz: Enabled 1 or Disabled
+
     tANI_U8 htDsssCckRate40MHzSupport:1;
+
     // L-SIG TXOP Protection used only if peer support available
+
     tANI_U8 htLsigTXOPProtection:1;
+
     // A-MPDU Density
+
     // 000 - No restriction
+
     // 001 - 1/8 usec
+
     // 010 - 1/4 usec
+
     // 011 - 1/2 usec
+
     // 100 - 1 usec
+
     // 101 - 2 usec
+
     // 110 - 4 usec
+
     // 111 - 8 usec
+
     //
+
     tANI_U8 htAMpduDensity:3;
 
 
+
+
     //Set to 0 for 3839 octets
+
     //Set to 1 for 7935 octets
+
     tANI_U8 htMaxAmsduLength;
 
 
+
+
     // MIMO Power Save
+
     tSirMacHTMIMOPowerSaveState htMIMOPSState;
 
+
     //
 
+
     // Maximum Rx A-MPDU factor
+
     tANI_U8 htMaxRxAMpduFactor:2;
+
     //
+
     // Recommended Tx Width Set
+
     // 0 - use 20 MHz channel (control channel)
+
     // 1 - use 40 Mhz channel
+
     //
+
     tANI_U8 htSupportedChannelWidthSet:1;
-    tANI_U8 rsvd1:5;
+    tANI_U8 htSecondaryChannelOffset:2;
+    tANI_U8 rsvd1:3;
+
 
     ///////////////////////////////////////////////////////////////////////
+
     // DPH HASH ENTRY FIELDS NEEDED IN HAL ONLY
+
     ///////////////////////////////////////////////////////////////////////
+
     tANI_U8 dpuSig:4;                       // DPU signiture
+
     tANI_U8 staSig:4;                       // STA signature
+
     tANI_U8 staType;
 
+
     tANI_U16 bssId;                          // BSSID
+
     tANI_U16 assocId;                       // Association ID
 
 
+
+
     //This is the real sta index generated by HAL
+
     tANI_U16 staIndex;
+
     tANI_U8    staAddr[6];
+
     /*The DPU signatures will be sent eventually to TL to help it determine the 
+
       association to which a packet belongs to*/
+
     /*Unicast DPU signature*/
+
     tANI_U8     ucUcastSig;
 
+
     /*Broadcast DPU signature*/
+
     tANI_U8     ucBcastSig;
 
+
     //
+
     // PE needs this info on a per-STA, per-TID basis
+
     // At any point in time, when this data is sampled,
+
     // it gives a measure of:
+
     // a) All the active bA sessions
+
     // b) And the BA configuration itself
+
     //
+
     tCfgTrafficClass tcCfg[STACFG_MAX_TC];
 
+
     // Block Ack state
+
     // This is used between PE and HAL only.
+
     // can be set to one of the values from the following enum
+
     /*typedef enum eLimBAState
+
     {
+
         eLIM_BA_STATE_IDLE, // we are not waiting for anything from HAL.
+
         eLIM_BA_STATE_WT_ADD_RSP, //We are waiting for Add rsponse from HAL.
+
         eLIM_BA_STATE_WT_DEL_RSP //  We are waiting for Del response from HAL.
+
     } tLimBAState; */
 
 
+
+
     //BA state bitmap 2 bits per tid
+
     // BA state for tid i  = (baState >> tid*2) & 0x3
+
     tANI_U32 baState;
 
+#ifdef WLAN_FEATURE_11AC
+    tANI_U8  vhtSupportedChannelWidthSet;
+#endif
+
     /* When a station with already an existing dph entry tries to 
+
      * associate again, the old dph entry will be zeroed out except 
+
      * for the next pointer. The next pointer must be defined at the  
+
      * end of the structure.
+
      */
+
     struct sDphHashNode  *next;
 
+
 } tDphHashNode, *tpDphHashNode;
 
+
 #include "dphHashTable.h"
 
+
 // -------------------------------------------------------------------
 
+
 // get protection overrides from config variable
+
 // bit0: force cts to self protection for tx to Airgo peers
+
 // bit1: force cts to self protection for tx to non Airgo peers
+
 #define DPH_PROT_OVERRIDE_NONANI_PEER_GET(cfgval)    ((cfgval) & 1)
+
 #define DPH_PROT_OVERRIDE_ANI_PEER_GET(cfgval) (((cfgval) & 2) >> 1)
 
+
 typedef struct sAniSirDph
+
 {
+
     /// The hash table object
+
     dphHashTableClass dphHashTable;
+
 } tAniSirDph, *tpAniSirDph;
 
+
 #endif
 
 
+
+
diff --git a/CORE/MAC/src/include/parserApi.h b/CORE/MAC/src/include/parserApi.h
index ac63e09..a28f43d 100644
--- a/CORE/MAC/src/include/parserApi.h
+++ b/CORE/MAC/src/include/parserApi.h
@@ -124,6 +124,12 @@
     tANI_U8                   mdiePresent;
 #endif
 
+#ifdef WLAN_FEATURE_11AC
+    tDot11fIEVHTCaps          VHTCaps;
+    tDot11fIEVHTOperation     VHTOperation;
+    tDot11fIEVHTExtBssLoad    VHTExtBssLoad;
+#endif
+
 } tSirProbeRespBeacon, *tpSirProbeRespBeacon;
 
 // probe Request structure
@@ -139,6 +145,10 @@
     tANI_U8                   extendedRatesPresent;
     tANI_U8                   wscIePresent;
     tANI_U8                   p2pIePresent;
+#ifdef WLAN_FEATURE_11AC
+    tDot11fIEVHTCaps          VHTCaps;
+#endif
+
 
 } tSirProbeReq, *tpSirProbeReq;
 
@@ -191,6 +201,9 @@
     tANI_U32                  assocReqFrameLength;
     tANI_U8*                  assocReqFrame;
 #endif
+#ifdef WLAN_FEATURE_11AC
+    tDot11fIEVHTCaps          VHTCaps;
+#endif
 } tSirAssocReq, *tpSirAssocReq;
 
 
@@ -238,6 +251,10 @@
     tANI_U8                   tspecPresent;
     tANI_U8                   tsmPresent;
 #endif    
+#ifdef WLAN_FEATURE_11AC
+    tDot11fIEVHTCaps          VHTCaps;
+    tDot11fIEVHTOperation     VHTOperation;
+#endif
 } tSirAssocRsp, *tpSirAssocRsp;
 
 tANI_U8
@@ -423,12 +440,14 @@
 /// Populate a tDot11fIEChanSwitchAnn
 void
 PopulateDot11fChanSwitchAnn(tpAniSirGlobal          pMac,
-                            tDot11fIEChanSwitchAnn *pDot11f);
+                            tDot11fIEChanSwitchAnn *pDot11f,
+                            tpPESession psessionEntry);
 
 /// Populate a tDot11fIEChanSwitchAnn
 void
 PopulateDot11fExtChanSwitchAnn(tpAniSirGlobal          pMac,
-                             tDot11fIEExtChanSwitchAnn *pDot11f);
+                             tDot11fIEExtChanSwitchAnn *pDot11f,
+                             tpPESession psessionEntry);
 
 /// Populate a tDot11fIECountry
 tSirRetStatus
@@ -498,7 +517,8 @@
 
 tSirRetStatus
 PopulateDot11fHTCaps(tpAniSirGlobal           pMac,
-                             tDot11fIEHTCaps *pDot11f);
+                           tpPESession      psessionEntry,
+                           tDot11fIEHTCaps *pDot11f);
 
 #ifdef WLAN_SOFTAP_FEATURE
 tSirRetStatus
@@ -843,3 +863,15 @@
                            tpSirRSNie pRsnIe,
                            tANI_U8 EID);
 #endif
+
+#ifdef WLAN_FEATURE_11AC
+tSirRetStatus
+PopulateDot11fVHTCaps(tpAniSirGlobal  pMac, tDot11fIEVHTCaps *pDot11f);
+
+tSirRetStatus
+PopulateDot11fVHTOperation(tpAniSirGlobal  pMac, tDot11fIEVHTOperation  *pDot11f);
+
+tSirRetStatus
+PopulateDot11fVHTExtBssLoad(tpAniSirGlobal  pMac, tDot11fIEVHTExtBssLoad   *pDot11f);
+
+#endif
diff --git a/CORE/MAC/src/include/sirParams.h b/CORE/MAC/src/include/sirParams.h
index 02da0c9..02bec73 100644
--- a/CORE/MAC/src/include/sirParams.h
+++ b/CORE/MAC/src/include/sirParams.h
@@ -49,13 +49,32 @@
 #if defined( FEATURE_WLAN_INTEGRATED_SOC )
 typedef enum
 {
-    PHY_SINGLE_CHANNEL_CENTERED = 0,        // 20MHz IF bandwidth centered on IF carrier
-    PHY_DOUBLE_CHANNEL_LOW_PRIMARY = 1,     // 40MHz IF bandwidth with lower 20MHz supporting the primary channel
-    //not allowed PHY_DOUBLE_CHANNEL_CENTERED = 2,        // 40MHz IF bandwidth centered on IF carrier
-    PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3     // 40MHz IF bandwidth with higher 20MHz supporting the primary channel
+    PHY_SINGLE_CHANNEL_CENTERED     = 0,        // 20MHz IF bandwidth centered on IF carrier
+    PHY_DOUBLE_CHANNEL_LOW_PRIMARY  = 1,        // 40MHz IF bandwidth with lower 20MHz supporting the primary channel
+    PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3,        // 40MHz IF bandwidth with higher 20MHz supporting the primary channel
+#ifdef WLAN_FEATURE_11AC    
+    PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED = 4, //20/40MHZ offset LOW 40/80MHZ offset CENTERED
+    PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED = 5, //20/40MHZ offset CENTERED 40/80MHZ offset CENTERED
+    PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED = 6, //20/40MHZ offset HIGH 40/80MHZ offset CENTERED
+    PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW = 7,//20/40MHZ offset LOW 40/80MHZ offset LOW
+    PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW = 8, //20/40MHZ offset HIGH 40/80MHZ offset LOW
+    PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH = 9, //20/40MHZ offset LOW 40/80MHZ offset HIGH
+    PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH = 10,//20/40MHZ offset-HIGH 40/80MHZ offset HIGH
+#endif
+    PHY_CHANNEL_BONDING_STATE_MAX   = 11
 }ePhyChanBondState;
 #endif /* FEATURE_WLAN_INTEGRATED_SOC */
 
+#define SIR_MIN(a,b)   (((a) < (b)) ? (a) : (b))
+#define SIR_MAX(a,b)   (((a) > (b)) ? (a) : (b))
+
+typedef enum {
+   MCC	   = 0,
+   P2P	   = 1,
+   DOT11AC = 2,
+   MAX_FEATURE_SUPPORTED = 128,
+} placeHolderInCapBitmap;
+
 typedef enum eSriLinkState {
     eSIR_LINK_IDLE_STATE        = 0,
     eSIR_LINK_PREASSOC_STATE    = 1,
@@ -135,7 +154,10 @@
      */
     tANI_U16 msgLen;
 
-    tANI_U32 sessionId;
+    tANI_U8 sessionId;
+    tANI_U8 noack;
+    tANI_U16 wait;
+
     /**
      * This is the first data word in the mailbox message.
      * It is followed by n words of data.
@@ -423,6 +445,12 @@
 #ifdef ANI_CHIPSET_VOLANS
 /* PE <-> HAL addr2 mismatch message */
 #define SIR_LIM_ADDR2_MISS_IND             SIR_HAL_ITC_MSG_TYPES_BEGIN + 142
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/* PE <-> HAL OEM_DATA RELATED MESSAGES */
+#define SIR_HAL_START_OEM_DATA_REQ         SIR_HAL_ITC_MSG_TYPES_BEGIN + 143
+#define SIR_HAL_START_OEM_DATA_RSP       SIR_HAL_ITC_MSG_TYPES_BEGIN + 144
+#define SIR_HAL_FINISH_OEM_DATA_REQ      SIR_HAL_ITC_MSG_TYPES_BEGIN + 145
+#endif
 #endif
 
 #define SIR_HAL_SET_MAX_TX_POWER_REQ       SIR_HAL_ITC_MSG_TYPES_BEGIN + 146
@@ -519,10 +547,10 @@
 // LIM message types
 #define SIR_LIM_MSG_TYPES_BEGIN        (SIR_LIM_MODULE_ID << 8)
 #define SIR_LIM_ITC_MSG_TYPES_BEGIN    SIR_LIM_MSG_TYPES_BEGIN+0xB0
+
 // Messages to/from HAL
-#define SIR_LIM_RESUME_ACTIVITY_NTF        SIR_LIM_ITC_MSG_TYPES_BEGIN
-#define SIR_LIM_SUSPEND_ACTIVITY_REQ       SIR_LIM_ITC_MSG_TYPES_BEGIN + 1
-#define SIR_HAL_SUSPEND_ACTIVITY_RSP       SIR_LIM_ITC_MSG_TYPES_BEGIN + 2
+// Removed as part of moving HAL down to FW
+
 // Message from ISR upon TFP retry interrupt
 #define SIR_LIM_RETRY_INTERRUPT_MSG        SIR_LIM_ITC_MSG_TYPES_BEGIN + 3
 // Message from BB Transport
diff --git a/CORE/MAC/src/pe/include/limAdmitControl.h b/CORE/MAC/src/pe/include/limAdmitControl.h
index 158a94a..123564a 100644
--- a/CORE/MAC/src/pe/include/limAdmitControl.h
+++ b/CORE/MAC/src/pe/include/limAdmitControl.h
@@ -92,7 +92,7 @@
 tSirRetStatus limAdmitControlInit(tpAniSirGlobal pMac);
 
 tSirRetStatus limSendHalMsgAddTs(tpAniSirGlobal pMac, tANI_U16 staIdx, tANI_U8 tspecIdx, tSirMacTspecIE tspecIE, tANI_U8 sessionId);
-tSirRetStatus limSendHalMsgDelTs(tpAniSirGlobal pMac,  tANI_U16 staIdx,  tANI_U8 tspecIdx,  tSirDeltsReqInfo delts);
+tSirRetStatus limSendHalMsgDelTs(tpAniSirGlobal pMac,  tANI_U16 staIdx,  tANI_U8 tspecIdx,  tSirDeltsReqInfo delts, tANI_U8 sessionId);
 void limProcessHalAddTsRsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg);
 
 #endif
diff --git a/CORE/MAC/src/pe/include/limApi.h b/CORE/MAC/src/pe/include/limApi.h
index e0f2a4d..7e1a88a 100644
--- a/CORE/MAC/src/pe/include/limApi.h
+++ b/CORE/MAC/src/pe/include/limApi.h
@@ -33,7 +33,6 @@
  */
 #ifndef __LIM_API_H
 #define __LIM_API_H
-
 #include "wniApi.h"
 #include "sirApi.h"
 #include "aniGlobal.h"
@@ -51,17 +50,12 @@
 #include "wlan_qct_wdi_ds.h"
 #endif
 #include "wlan_qct_wda.h"
-
 #define LIM_POL_SYS_SCAN_MODE      0
 #define LIM_POL_SYS_LEARN_MODE     1
 
-
 /* Macro to count heartbeat */
-
 #define limResetHBPktCount(psessionEntry)   (psessionEntry->LimRxedBeaconCntDuringHB = 0)
 
-
-
 /* Useful macros for fetching various states in pMac->lim */
 /* gLimSystemRole */
 #define GET_LIM_SYSTEM_ROLE(psessionEntry)      (psessionEntry->limSystemRole)
@@ -80,9 +74,7 @@
 /* gLimQuietState */
 #define GET_LIM_QUIET_STATE(pMac)               (pMac->lim.gLimSpecMgmt.quietState)
 #define SET_LIM_QUIET_STATE(pMac, state)        (pMac->lim.gLimSpecMgmt.quietState = state)
-
 #define LIM_IS_CONNECTION_ACTIVE(psessionEntry)  (psessionEntry->LimRxedBeaconCntDuringHB)
-
 /*pMac->lim.gLimProcessDefdMsgs*/
 #define GET_LIM_PROCESS_DEFD_MESGS(pMac) (pMac->lim.gLimProcessDefdMsgs)
 #define SET_LIM_PROCESS_DEFD_MESGS(pMac, val) (pMac->lim.gLimProcessDefdMsgs = val)
@@ -94,7 +86,6 @@
 #define LIM_SET_RADAR_DETECTED(pMac, val)   (pMac->lim.gLimSpecMgmt.fRadarDetCurOperChan = val)
 #define LIM_MIN_BCN_PR_LENGTH  12
 #define LIM_BCN_PR_CAPABILITY_OFFSET 10
-
 typedef enum eMgmtFrmDropReason
 {
     eMGMT_DROP_NO_DROP,
@@ -106,11 +97,8 @@
 }tMgmtFrmDropReason;
 
 
-
-
 /// During TD ring clean up at HDD in RTAI, will call this call back
 extern void limPostTdDummyPktCallbak(void* pMacGlobals, unsigned int* pBd);
-
 /**
  * Function to initialize LIM state machines.
  * This called upon LIM thread creation.
@@ -125,47 +113,32 @@
  * Function to Initialize radar interrupts.
  */
 void limRadarInit(tpAniSirGlobal pMac);
-
 tSirRetStatus peStart(tpAniSirGlobal pMac);
 void peStop(tpAniSirGlobal pMac);
 tSirRetStatus pePostMsgApi(tpAniSirGlobal pMac, tSirMsgQ* pMsg);
 tSirRetStatus peProcessMsg(tpAniSirGlobal pMac, tSirMsgQ* limMsg);
 void limDumpInit(tpAniSirGlobal pMac);
-
 /**
  * Function to cleanup LIM state.
  * This called upon reset/persona change etc
  */
 extern void limCleanup(tpAniSirGlobal);
-
 /// Function to post messages to LIM thread
 extern tANI_U32  limPostMsgApi(tpAniSirGlobal, tSirMsgQ *);
-
 /**
  * Function to fetch messages posted LIM thread
  */
 extern void limProcessMessageQueue(tpAniSirGlobal);
-
 /**
  * Function to process messages posted to LIM thread
  * and dispatch to various sub modules within LIM module.
  */
 extern void limMessageProcessor(tpAniSirGlobal, tpSirMsgQ);
 extern void limProcessMessages(tpAniSirGlobal, tpSirMsgQ); // DT test alt deferred 2
-
-/**
- * Function to check the LIM state if system can be put in
- * Learn Mode.
- * This is called by SCH upon receiving SCH_START_LEARN_MODE
- * message from LIM.
- */
-extern tSirRetStatus limCheckStateForLearnMode(tpAniSirGlobal);
-
 /**
  * Function to check the LIM state if system is in Scan/Learn state.
  */
 extern tANI_U8 limIsSystemInScanState(tpAniSirGlobal);
-
 #if (defined(ANI_PRODUCT_TYPE_AP) || defined(ANI_PRODUCT_TYPE_AP_SDK))
 /**
  * Function to setup Polaris into Learn mode.
@@ -173,14 +146,11 @@
  * message from LIM.
  */
 extern void limSetLearnMode(tpAniSirGlobal);
-
 /**
  * Function to re-enable Learn mode measurements
  */
 extern void limReEnableLearnMode(tpAniSirGlobal);
-
 #endif //#if (defined(ANI_PRODUCT_TYPE_AP) || defined(ANI_PRODUCT_TYPE_AP_SDK))
-
 /**
  * Function to handle IBSS coalescing.
  * Beacon Processing module to call this.
@@ -188,32 +158,23 @@
 extern tSirRetStatus limHandleIBSScoalescing(tpAniSirGlobal,
                                               tpSchBeaconStruct,
                                               tANI_U8 *,tpPESession);
-
 /// Function used by other Sirius modules to read global SME state
  static inline tLimSmeStates
 limGetSmeState(tpAniSirGlobal pMac) { return pMac->lim.gLimSmeState; }
-
 /// Function used by other Sirius modules to read global system role
  static inline tLimSystemRole
 limGetSystemRole(tpPESession psessionEntry) { return psessionEntry->limSystemRole; }
-
 //limGetAID(tpPESession psessionEntry) { return psessionEntry->limAID; }
-
 extern void limReceivedHBHandler(tpAniSirGlobal, tANI_U8, tpPESession);
 //extern void limResetHBPktCount(tpPESession);
-
 extern void limCheckAndQuietBSS(tpAniSirGlobal);
-
 /// Function to send WDS info to WSM if needed
 extern void limProcessWdsInfo(tpAniSirGlobal, tSirPropIEStruct);
-
 /// Function to initialize WDS info params
 extern void limInitWdsInfoParams(tpAniSirGlobal);
-
 /// Function that triggers STA context deletion
 extern void limTriggerSTAdeletion(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
 
-
 /// Function that checks for change in AP's capabilties on STA
 extern void limDetectChangeInApCapabilities(tpAniSirGlobal,
                                              tpSirProbeRespBeacon,tpPESession);
@@ -221,62 +182,46 @@
                                                             tpSirProbeRespBeacon pBeacon, 
                                                             tpUpdateBeaconParams pBeaconParams,tpPESession);
 
-
 /// creates an addts request action frame and sends it out to staid
 extern void limSendAddtsReq (tpAniSirGlobal pMac, tANI_U16 staid, tANI_U8 tsid, tANI_U8 userPrio, tANI_U8 wme);
 /// creates a delts request action frame and sends it out to staid
 extern void limSendDeltsReq (tpAniSirGlobal pMac, tANI_U16 staid, tANI_U8 tsid, tANI_U8 userPrio, tANI_U8 wme);
 /// creates a SM Power State Mode update request action frame and sends it out to staid
 extern void limPostStartLearnModeMsgToSch(tpAniSirGlobal pMac);
-
-extern ePhyChanBondState limGetPhyCBState( tpAniSirGlobal pMac );
-tSirMacHTSecondaryChannelOffset    limGetHTCBState(tAniCBSecondaryMode aniCBMode);
-tAniCBSecondaryMode     limGetAniCBState( tSirMacHTSecondaryChannelOffset htCBMode) ;
-
-
-
-
-
+#ifdef WLAN_FEATURE_11AC
+extern ePhyChanBondState limGet11ACPhyCBState(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 htSecondaryChannelOffset );
+#endif
 tANI_U8 limIsSystemInActiveState(tpAniSirGlobal pMac);
-
 #if 0 /* Currently, this function is not used but keep it around for when we do need it */
 tSirRetStatus limUpdateGlobalChannelBonding(tpAniSirGlobal pMac, tHalBitVal cbBit);
 #endif /* 0 */
 
-
 #if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && (WNI_POLARIS_FW_PRODUCT == AP)
 extern void setupQuietBss( tpAniSirGlobal pMac, tANI_U32 learnInterval );
 extern tANI_BOOLEAN limUpdateQuietIEInBeacons( tpAniSirGlobal pMac );
 #endif
-
 #ifdef ANI_AP_SDK
 extern void limConvertScanDuration(tpAniSirGlobal pMac);
 #endif /* ANI_AP_SDK */
-
 #if (WNI_POLARIS_FW_PRODUCT == AP)
 tSirRetStatus limProcessCcaMonitorModeChangeNotification(tpAniSirGlobal pMac, tANI_U32 ccaCbMode);
 #endif /* WNI_POLARIS_FW_PRODUCT == AP */
-
 void limHandleLowRssiInd(tpAniSirGlobal pMac);
 void limHandleBmpsStatusInd(tpAniSirGlobal pMac);
 void limHandleMissedBeaconInd(tpAniSirGlobal pMac);
 tMgmtFrmDropReason limIsPktCandidateForDrop(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U32 subType);
 void limMicFailureInd(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
-
-
 /* ----------------------------------------------------------------------- */
 // These used to be in DPH
 extern void limSetBssid(tpAniSirGlobal pMac, tANI_U8 *bssId);
 extern void limGetBssid(tpAniSirGlobal pMac, tANI_U8 *bssId);
 extern void limGetMyMacAddr(tpAniSirGlobal pMac, tANI_U8 *mac);
 extern tSirRetStatus limCheckRxSeqNumber(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo);
-
 #define limGetQosMode(psessionEntry, pVal) *(pVal) = (psessionEntry)->limQosEnabled
 #define limGetWmeMode(psessionEntry, pVal) *(pVal) = (psessionEntry)->limWmeEnabled
 #define limGetWsmMode(psessionEntry, pVal) *(pVal) = (psessionEntry)->limWsmEnabled
 #define limGet11dMode(psessionEntry, pVal) *(pVal) = (psessionEntry)->lim11dEnabled
 #define limGetAckPolicy(pMac, pVal)         *(pVal) = pMac->lim.ackPolicy
-
 /* ----------------------------------------------------------------------- */
 static inline void limGetPhyMode(tpAniSirGlobal pMac, tANI_U32 *phyMode, tpPESession psessionEntry)
 {
@@ -301,9 +246,7 @@
   \return  tANI_U32 - TX_SUCCESS for success.
   
   --------------------------------------------------------------------------*/
-
 tSirRetStatus peProcessMessages(tpAniSirGlobal pMac, tSirMsgQ* pMsg);
-
 /** -------------------------------------------------------------
 \fn peFreeMsg
 \brief Called by VOS scheduler (function vos_sched_flush_mc_mqs)
@@ -315,7 +258,5 @@
 \return none
 -----------------------------------------------------------------*/
 v_VOID_t peFreeMsg( tpAniSirGlobal pMac, tSirMsgQ* pMsg);
-
 /************************************************************/
 #endif /* __LIM_API_H */
-
diff --git a/CORE/MAC/src/pe/include/limGlobal.h b/CORE/MAC/src/pe/include/limGlobal.h
index d35a6de..7061a68 100644
--- a/CORE/MAC/src/pe/include/limGlobal.h
+++ b/CORE/MAC/src/pe/include/limGlobal.h
@@ -363,6 +363,7 @@
 
 #ifdef WLAN_FEATURE_P2P
     tANI_BOOLEAN   p2pSearch;
+    tANI_BOOLEAN   skipDfsChnlInP2pSearch;
 #endif
     tANI_U16           uIEFieldLen;
     tANI_U16           uIEFieldOffset;
@@ -395,6 +396,27 @@
     tSirBssDescription bssDescription;
 };
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+#ifndef OEM_DATA_REQ_SIZE 
+#define OEM_DATA_REQ_SIZE 70
+#endif
+#ifndef OEM_DATA_RSP_SIZE
+#define OEM_DATA_RSP_SIZE 968
+#endif
+
+// OEM Data related structure definitions
+typedef struct sLimMlmOemDataReq
+{
+    tSirMacAddr           selfMacAddr;
+    tANI_U8               oemDataReq[OEM_DATA_REQ_SIZE];
+} tLimMlmOemDataReq, *tpLimMlmOemDataReq;
+
+typedef struct sLimMlmOemDataRsp
+{
+   tANI_U8                oemDataRsp[OEM_DATA_RSP_SIZE];
+} tLimMlmOemDataRsp, *tpLimMlmOemDataRsp;
+#endif
 
 // Pre-authentication structure definition
 typedef struct tLimPreAuthNode
@@ -438,6 +460,9 @@
     tANI_U8                 schClean:1;
     // 802.11n HT Capability in Station: Enabled 1 or DIsabled 0
     tANI_U8                 htCapability:1;
+#ifdef WLAN_FEATURE_11AC
+    tANI_U8                 vhtCapability:1;
+#endif
 } tLimMlmStaContext, *tpLimMlmStaContext;
 
 // Structure definition to hold deferred messages queue parameters
@@ -615,7 +640,7 @@
 {
     tLimChannelSwitchState   state;
     tANI_U8                  primaryChannel;
-    tAniCBSecondaryMode      secondarySubBand;
+    ePhyChanBondState        secondarySubBand;
     tANI_U32                 switchCount;
     tANI_U32                 switchTimeoutValue;
     tANI_U8                  switchMode;
diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h
index 5f72af4..b98ac47 100644
--- a/CORE/MAC/src/pe/include/limSession.h
+++ b/CORE/MAC/src/pe/include/limSession.h
@@ -97,7 +97,16 @@
     void                    *pLimMlmReassocReq;      //handle to MLM reassoc Req
     tANI_U16                channelChangeReasonCode;
     tANI_U8                 dot11mode;
-    tANI_U8                 htCapabality;
+    tANI_U8                 htCapability;
+    /* Supported Channel Width Set: 0-20MHz 1 - 40MHz */
+    tANI_U8                 htSupportedChannelWidthSet;
+    /* Recommended Tx Width Set
+     * 0 - use 20 MHz channel (control channel)
+     * 1 - use channel width enabled under Supported Channel Width Set
+     */
+    tANI_U8                 htRecommendedTxWidthSet;
+    /* Identifies the 40 MHz extension channel */
+    ePhyChanBondState       htSecondaryChannelOffset;
     tSirRFBand              limRFBand;
     tANI_U8                 limIbssActive;          //TO SUPPORT CONCURRENCY
 
@@ -107,17 +116,19 @@
     tANI_U8                 limCurrentBssQosCaps;
     tANI_U16                limCurrentBssPropCap;
     tANI_U8                 limSentCapsChangeNtf;
-    tANI_U32                limCurrentTitanHtCaps;
     tANI_U16                limAID;
 
     /* Parameters  For Reassociation */
     tSirMacAddr             limReAssocbssId;
     tSirMacChanNum          limReassocChannelId;
+    /* CB paramaters required/duplicated for Reassoc since re-assoc mantains its own params in lim */
+    tANI_U8                 reAssocHtSupportedChannelWidthSet;
+    tANI_U8                 reAssocHtRecommendedTxWidthSet;
+    ePhyChanBondState       reAssocHtSecondaryChannelOffset;
     tSirMacSSid             limReassocSSID;
     tANI_U16                limReassocBssCaps;
     tANI_U8                 limReassocBssQosCaps;
     tANI_U16                limReassocBssPropCap;
-    tANI_U32                limReassocTitanHtCaps;
 
     // Assoc or ReAssoc Response Data/Frame
     void                   *limAssocResponseData;
@@ -288,12 +299,22 @@
     tANI_U8  gLimEdcaParamSetCount;
 
     tBeaconParams beaconParams;
-
+#ifdef WLAN_FEATURE_11AC
+    tANI_U8 vhtCapability;
+    tANI_U8 vhtTxChannelWidthSet;
+#endif
     tANI_U8            spectrumMgtEnabled;
+    /* *********************11H related*****************************/
+    //tANI_U32           gLim11hEnable;
+    tLimSpecMgmtInfo   gLimSpecMgmt;
+    // CB Primary/Secondary Channel Switch Info
+    tLimChannelSwitchInfo  gLimChannelSwitch;
+    /* *********************End 11H related*****************************/
 
     /*Flag to Track Status/Indicate HBFailure on this session */
     tANI_BOOLEAN LimHBFailureStatus;
     tANI_U32           gLimPhyMode;
+
 }tPESession, *tpPESession;
 
 #define LIM_MAX_ACTIVE_SESSIONS 4
diff --git a/CORE/MAC/src/pe/include/limTrace.h b/CORE/MAC/src/pe/include/limTrace.h
index f0c2a1b..062ddb3 100644
--- a/CORE/MAC/src/pe/include/limTrace.h
+++ b/CORE/MAC/src/pe/include/limTrace.h
@@ -107,6 +107,7 @@
 
 
 #define MTRACE(p) p
+#define NO_SESSION 0xFF
 
 #else
 #define MTRACE(p) {  }
diff --git a/CORE/MAC/src/pe/lim/limAdmitControl.c b/CORE/MAC/src/pe/lim/limAdmitControl.c
index d14e56a..ec69451 100644
--- a/CORE/MAC/src/pe/lim/limAdmitControl.c
+++ b/CORE/MAC/src/pe/lim/limAdmitControl.c
@@ -1099,7 +1099,7 @@
      * WDA_ADD_TS_RSP from HAL.
      */
     SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
-    MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+    MTRACE(macTraceMsgTx(pMac, sessionId, msg.type));
 
     if(eSIR_SUCCESS != wdaPostCtrlMsg(pMac, &msg))
     {
@@ -1126,7 +1126,8 @@
   tpAniSirGlobal pMac,
   tANI_U16       staIdx,
   tANI_U8         tspecIdx,
-  tSirDeltsReqInfo delts)
+  tSirDeltsReqInfo delts,
+  tANI_U8        sessionId)
 {
   tSirMsgQ msg;
   tpDelTsParams pDelTsParam;
@@ -1147,7 +1148,7 @@
   pDelTsParam->tspecIdx = tspecIdx;
 
   PELOGW(limLog(pMac, LOGW, FL("calling wdaPostCtrlMsg()\n"));)
-  MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+  MTRACE(macTraceMsgTx(pMac, sessionId, msg.type));
 
   if(eSIR_SUCCESS != wdaPostCtrlMsg(pMac, &msg))
   {
diff --git a/CORE/MAC/src/pe/lim/limApi.c b/CORE/MAC/src/pe/lim/limApi.c
index 7b4fac0..aac103b 100644
--- a/CORE/MAC/src/pe/lim/limApi.c
+++ b/CORE/MAC/src/pe/lim/limApi.c
@@ -235,7 +235,7 @@
     pMac->lim.gLimPrevSmeState = eLIM_SME_OFFLINE_STATE;
 
     /// MLM State visible across all Sirius modules
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, eLIM_MLM_IDLE_STATE));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, NO_SESSION, eLIM_MLM_IDLE_STATE));
     pMac->lim.gLimMlmState = eLIM_MLM_IDLE_STATE;
 
     /// Previous MLM State
@@ -248,15 +248,15 @@
 
 #ifdef FEATURE_WLAN_INTEGRATED_SOC
     /**
-     * Initialize state to eLIM_MLM_OFFLINE_STATE
+     * Initialize state to eLIM_SME_OFFLINE_STATE
      */
-    pMac->lim.gLimSmeState     = eLIM_MLM_OFFLINE_STATE;
+    pMac->lim.gLimSmeState     = eLIM_SME_OFFLINE_STATE;
 #else
     /**
      * Initialize state to suspended state and wait for
      * HAL to send LIM_RESUME_ACTIVITY_NTF message.
      */
-    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, NO_SESSION, pMac->lim.gLimSmeState));
     pMac->lim.gLimSmeState     = eLIM_SME_SUSPEND_STATE;
 #endif /* FEATURE_WLAN_INTEGRATED_SOC */
 
@@ -275,7 +275,6 @@
     pMac->lim.gLimPhyMode = 0; 
     pMac->lim.scanStartTime = 0;    // used to measure scan time
 
-    palZeroMemory(pMac->hHdd, pMac->lim.gLimBssid, sizeof(pMac->lim.gLimBssid));
     palZeroMemory(pMac->hHdd, pMac->lim.gLimMyMacAddr, sizeof(pMac->lim.gLimMyMacAddr));
     pMac->lim.ackPolicy = 0;
 
@@ -325,20 +324,11 @@
     palZeroMemory(pMac->hHdd, &pMac->lim.gLimAlternateRadio, sizeof(tSirAlternateRadioInfo));
     SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
 
+#if 0
     // 11h Spectrum Management Related Flag
-    //pMac->lim.gLim11hEnable = 0;
-    pMac->lim.gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_INIT;
     LIM_SET_RADAR_DETECTED(pMac, eANI_BOOLEAN_FALSE);
     pMac->sys.gSysEnableLearnMode = eANI_BOOLEAN_TRUE;
-
-    // 11h Quiet Element Related Flag
-    pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
-    // A count-down value, used on the AP, to send out the
-    // Quiet BSS IE in that many Beacon's
-    pMac->lim.gLimSpecMgmt.quietCount = 0;
-    pMac->lim.gLimSpecMgmt.fQuietEnabled = eANI_BOOLEAN_FALSE;
-    pMac->lim.gLimSpecMgmt.fRadarIntrConfigured = eANI_BOOLEAN_FALSE;
-
+#endif
     // WMM Related Flag
     pMac->lim.gUapsdEnable = 0;
     pMac->lim.gUapsdPerAcBitmask = 0;
@@ -376,7 +366,7 @@
     // Place holder for current authentication request
     // being handled
     pMac->lim.gpLimMlmAuthReq = NULL;
-    pMac->lim.gpLimMlmJoinReq = NULL;
+    //pMac->lim.gpLimMlmJoinReq = NULL;
 
     /// MAC level Pre-authentication related globals
     pMac->lim.gLimPreAuthChannelNumber = 0;
@@ -399,32 +389,20 @@
     palZeroMemory(pMac->hHdd, pMac->lim.protStaOverlapCache, sizeof(tCacheParams) * LIM_PROT_STA_OVERLAP_CACHE_SIZE);
     palZeroMemory(pMac->hHdd, pMac->lim.protStaCache, sizeof(tCacheParams) * LIM_PROT_STA_CACHE_SIZE);
 
-    // Initialize Assoc/ReAssoc Response Data/Frame
-    //pMac->lim.gLimAssocResponseData = NULL;
-
 }
 
 
 static void __limInitTitanVars(tpAniSirGlobal pMac)
 {
-    pMac->lim.gCbMode = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
-    SET_CB_STATE_DISABLE( pMac->lim.gCbState );
+#if 0
     palZeroMemory(pMac->hHdd, &pMac->lim.gLimChannelSwitch, sizeof(tLimChannelSwitchInfo));
-
     pMac->lim.gLimChannelSwitch.state               = eLIM_CHANNEL_SWITCH_IDLE;
-    pMac->lim.gLimChannelSwitch.secondarySubBand    = eANI_CB_SECONDARY_NONE;
-
+    pMac->lim.gLimChannelSwitch.secondarySubBand    = PHY_SINGLE_CHANNEL_CENTERED;
+#endif
     // Debug workaround for BEACON's
     // State change triggered by "dump 222"
     pMac->lim.gLimScanOverride = 1;
     pMac->lim.gLimScanOverrideSaved = eSIR_ACTIVE_SCAN;
-
-
-    // Caches the CB State as desired by SME
-    SET_CB_STATE_DISABLE( pMac->lim.gCbStateProtected );
-
-    // TODO - This needs to be read off of a CFG variable
-
     pMac->lim.gLimTitanStaCount = 0;
     pMac->lim.gLimBlockNonTitanSta = 0;
 }
@@ -432,9 +410,7 @@
 static void __limInitHTVars(tpAniSirGlobal pMac)
 {
     pMac->lim.htCapabilityPresentInBeacon = 0;
-    pMac->lim.htCapability = 0;
     pMac->lim.gHTGreenfield = 0;
-    pMac->lim.gHTSupportedChannelWidthSet = 0;
     pMac->lim.gHTShortGI40Mhz = 0;
     pMac->lim.gHTShortGI20Mhz = 0;
     pMac->lim.gHTMaxAmsduLength = 0;
@@ -448,8 +424,6 @@
     pMac->lim.gHTMaxRxAMpduFactor = 0;
     pMac->lim.gHTServiceIntervalGranularity = 0;
     pMac->lim.gHTControlledAccessOnly = 0;
-    pMac->lim.gHTRecommendedTxWidthSet = 0;
-    pMac->lim.gHTSecondaryChannelOffset = eHT_SECONDARY_CHANNEL_OFFSET_NONE;
     pMac->lim.gHTOperMode = eSIR_HT_OP_MODE_PURE;
     pMac->lim.gHTPCOActive = 0;
 
@@ -463,7 +437,7 @@
 #if defined( FEATURE_WLAN_INTEGRATED_SOC )
 static tSirRetStatus __limInitConfig( tpAniSirGlobal pMac )
 {
-   tANI_U32 val1, val2, val3, len;
+   tANI_U32 val1, val2, val3;
    tANI_U16 val16;
    tANI_U8 val8;
    tSirMacHTCapabilityInfo   *pHTCapabilityInfo;
@@ -472,14 +446,10 @@
    tSirMacHTParametersInfo   *pAmpduParamInfo;
 
    /* Read all the CFGs here that were updated before peStart is called */
+   /* All these CFG READS/WRITES are only allowed in init, at start when there is no session 
+    * and they will be used throughout when there is no session
+    */
 
-   /* WNI_CFG_CHANNEL_BONDING_MODE */
-
-   handleCBCFGChange( pMac, WNI_CFG_CHANNEL_BONDING_MODE );
-         
-   //for Secondary channel, change setupCBMode function OR the caller of that
-   //function during Join (STA) or Start BSS(AP/IBSS) Now update the HT Capability
-   //CFG based on Channel Bonding CFG
    if(wlan_cfgGetInt(pMac, WNI_CFG_HT_CAP_INFO, &val1) != eSIR_SUCCESS) 
    {
       PELOGE(limLog(pMac, LOGE, FL("could not retrieve HT Cap CFG\n"));)
@@ -515,7 +485,6 @@
    pHTInfoField1 = ( tSirMacHTInfoField1* ) &val8;
    pHTInfoField1->recommendedTxWidthSet = 
      (tANI_U8)pHTCapabilityInfo->supportedChannelWidthSet;
-   pMac->lim.gHTRecommendedTxWidthSet = pHTInfoField1->recommendedTxWidthSet;
    if(cfgSetInt(pMac, WNI_CFG_HT_INFO_FIELD1, *(tANI_U8*)pHTInfoField1) 
       != eSIR_SUCCESS)
    {
@@ -602,16 +571,6 @@
       return eSIR_FAILURE;
    }
 
-   /* WNI_CFG_BSSID - this one is not updated in limHandleCFGparamUpdate do we
-      want to update this? */
-   len = 6;
-   if (wlan_cfgGetStr(pMac, WNI_CFG_BSSID, pMac->lim.gLimBssid, &len) != 
-       eSIR_SUCCESS)
-   {
-      limLog(pMac, LOGP, FL("cfg get bssid failed\n"));
-      return eSIR_FAILURE;
-   }
-
    /* WNI_CFG_MAX_PS_POLL */
 
    /* Allocate and fill in power save configuration. */
@@ -649,8 +608,7 @@
 
    /* This was initially done after resume notification from HAL. Now, DAL is
       started before PE so this can be done here */
-   handleCBCFGChange( pMac, ANI_IGNORE_CFG_ID );
-   handleHTCapabilityandHTInfo(pMac);
+   handleHTCapabilityandHTInfo(pMac, NULL);
 
    return eSIR_SUCCESS;
 }
@@ -671,7 +629,7 @@
    {
       pMac->lim.gLimSmeState = eLIM_SME_IDLE_STATE;
 
-      MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+      MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, NO_SESSION, pMac->lim.gLimSmeState));
 
       // By default do not return after first scan match
       pMac->lim.gLimReturnAfterFirstMatch = 0;
@@ -910,11 +868,13 @@
         pMac->lim.gpLimMlmAuthReq = NULL;
     }
 
+#if 0
     if (pMac->lim.gpLimMlmJoinReq != NULL)
     {
         palFreeMemory(pMac->hHdd, pMac->lim.gpLimMlmJoinReq);
         pMac->lim.gpLimMlmJoinReq = NULL;
     }
+#endif
 
     #if 0
     if (pMac->lim.gpLimReassocReq != NULL)
@@ -1074,6 +1034,9 @@
     }
 #endif
 
+#ifdef WLAN_FEATURE_P2P
+    pMac->lim.actionFrameSessionId = 0xff;
+#endif
 
     return eSIR_SUCCESS;
 }
@@ -1091,13 +1054,7 @@
 
     if (ANI_DRIVER_TYPE(pMac) == eDRIVER_TYPE_MFG)
         return eSIR_SUCCESS;
-
-    palFreeMemory(pMac->hHdd, pMac->lim.limTimers.gpLimCnfWaitTimer);
-    pMac->lim.limTimers.gpLimCnfWaitTimer = NULL;
-    palFreeMemory(pMac->hHdd, pMac->lim.gpLimAIDpool);
-    pMac->lim.gpLimAIDpool = NULL;
-
-   
+    
     for(i =0; i < pMac->lim.maxBssId; i++)
     {
         if(pMac->lim.gpSession[i].valid == TRUE)
@@ -1105,7 +1062,11 @@
             peDeleteSession(pMac,&pMac->lim.gpSession[i]);
         }
     }
-
+    palFreeMemory(pMac->hHdd, pMac->lim.limTimers.gpLimCnfWaitTimer);
+    pMac->lim.limTimers.gpLimCnfWaitTimer = NULL;
+    palFreeMemory(pMac->hHdd, pMac->lim.gpLimAIDpool);
+    pMac->lim.gpLimAIDpool = NULL;
+    
     palFreeMemory(pMac->hHdd, pMac->lim.gpSession);
     pMac->lim.gpSession = NULL;
     /*
@@ -1436,9 +1397,9 @@
     {
     PELOG1(limLog( pMac, LOG1,
        FL ( "RxBd=%p mHdr=%p Type: %d Subtype: %d  Sizes:FC%d Mgmt%d\n"),
-       pRxBd, mHdr, mHdr->fc.type, mHdr->fc.subType, sizeof(tSirMacFrameCtl), sizeof(tSirMacMgmtHdr) );)
+       pRxPacketInfo, mHdr, mHdr->fc.type, mHdr->fc.subType, sizeof(tSirMacFrameCtl), sizeof(tSirMacMgmtHdr) );)
 
-    MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT, 0, 
+    MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT, NO_SESSION, 
                         LIM_TRACE_MAKE_RXMGMT(mHdr->fc.subType,  
                         (tANI_U16) (((tANI_U16) (mHdr->seqControl.seqNumHi << 4)) | mHdr->seqControl.seqNumLo)));)
     }
@@ -1496,49 +1457,6 @@
 
 
 /**
- * limCheckStateForLearnMode()
- *
- *FUNCTION:
- * This function is called by SCH to verify if LIM is in a state
- * to put system into Learn mode
- *
- *LOGIC:
- * NA
- *
- *ASSUMPTIONS:
- * NA
- *
- *NOTE:
- *
- * @param  pMac - Pointer to Global MAC structure
- * @return eSIR_SUCCESS - LIM is in a state to put system
- *                        into Learn Mode
- *         eSIR_FAILURE - LIM is NOT in a state to put system
- *                        into Learn Mode
- */
-
-tSirRetStatus
-limCheckStateForLearnMode(tpAniSirGlobal pMac)
-{
-    switch (pMac->lim.gLimSmeState)
-    {
-        case eLIM_SME_OFFLINE_STATE:
-        case eLIM_SME_IDLE_STATE:
-        case eLIM_SME_JOIN_FAILURE_STATE:
-        case eLIM_SME_NORMAL_STATE:
-        case eLIM_SME_LINK_EST_STATE:
-            // LIM is in a state to put system into Learn mode
-            return eSIR_SUCCESS;
-
-        default:
-            // LIM is NOT in a state to put system into Learn mode
-            return eSIR_FAILURE;
-    }
-} /*** end limCheckStateForLearnMode() ***/
-
-
-
-/**
  * limIsSystemInScanState()
  *
  *FUNCTION:
@@ -1738,7 +1656,7 @@
     pMac->lim.gLimMeasParams.shortDurationCount++;
     limDeactivateAndChangeTimer(pMac, eLIM_LEARN_DURATION_TIMER);
 
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_LEARN_DURATION_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_LEARN_DURATION_TIMER));
     if (tx_timer_activate(&pMac->lim.gLimMeasParams.learnDurationTimer)
                                            != TX_SUCCESS)
     {
@@ -1786,7 +1704,7 @@
 
     if (pMac->lim.gLimSpecMgmt.fQuietEnabled)
     {
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_QUIET_BSS_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_QUIET_BSS_TIMER));
 #ifdef GEN6_TODO
         /* revisit this piece of code to assign the appropriate sessionId below
          * priority - HIGH
@@ -1805,7 +1723,7 @@
     else
     {
         limDeactivateAndChangeTimer(pMac, eLIM_LEARN_INTERVAL_TIMER);
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_LEARN_INTERVAL_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_LEARN_INTERVAL_TIMER));
 #ifdef GEN6_TODO
         /* revisit this piece of code to assign the appropriate sessionId below
         */
@@ -1960,7 +1878,7 @@
                 mmhMsg.type = eWNI_SME_WDS_INFO_IND;
                 mmhMsg.bodyptr = pSirSmeWdsInfoInd;
                 mmhMsg.bodyval = 0;
-                MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+                MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
                 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
                 pMac->lim.gLimNumWdsInfoInd++;
             }
@@ -2227,12 +2145,27 @@
 {
 
     tSirSmeApNewCaps   apNewCaps;
-    tANI_U32                cShortSlot, nShortSlot;
- 
-    apNewCaps.capabilityInfo = limGetU16((tANI_U8 *) &pBeacon->capabilityInfo);
+    tANI_U32           nShortSlot;
+    tANI_U32 val = 0;
+    tANI_U32 phyMode;
 
-    if (wlan_cfgGetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, &cShortSlot) != eSIR_SUCCESS)
-        limLog(pMac, LOGP, FL("unable to get short slot time\n"));
+    // Check Admin mode first. If it is disabled just return
+    if (wlan_cfgGetInt(pMac, WNI_CFG_11G_SHORT_SLOT_TIME_ENABLED, &val)
+                   != eSIR_SUCCESS)
+    {
+        limLog(pMac, LOGP,
+               FL("cfg get WNI_CFG_11G_SHORT_SLOT_TIME failed\n"));
+        return eSIR_FAILURE;
+    }
+    if (val == false)
+        return eSIR_SUCCESS;
+
+    // Check for 11a mode or 11b mode. In both cases return since slot time is constant and cannot/should not change in beacon
+    limGetPhyMode(pMac, &phyMode, psessionEntry);
+    if ((phyMode == WNI_CFG_PHY_MODE_11A) || (phyMode == WNI_CFG_PHY_MODE_11B))
+        return eSIR_SUCCESS;
+
+    apNewCaps.capabilityInfo = limGetU16((tANI_U8 *) &pBeacon->capabilityInfo);
 
     //  Earlier implementation: determine the appropriate short slot mode based on AP advertised modes
     // when erp is present, apply short slot always unless, prot=on  && shortSlot=off
@@ -2255,16 +2188,14 @@
     */
     nShortSlot = SIR_MAC_GET_SHORT_SLOT_TIME(apNewCaps.capabilityInfo);
 
-    if (nShortSlot != cShortSlot)
+    if (nShortSlot != psessionEntry->shortSlotTimeSupported)
     {
         // Short slot time capability of AP has changed. Adopt to it.
         PELOG1(limLog(pMac, LOG1, FL("Shortslot capability of AP changed: %d\n"),  nShortSlot);)
         ((tpSirMacCapabilityInfo)&psessionEntry->limCurrentBssCaps)->shortSlotTime = (tANI_U16)nShortSlot;
+        psessionEntry->shortSlotTimeSupported = nShortSlot;
         pBeaconParams->fShortSlotTime = (tANI_U8) nShortSlot;
         pBeaconParams->paramChangeBitmap |= PARAM_SHORT_SLOT_TIME_CHANGED;
-
-        if (cfgSetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, nShortSlot) != eSIR_SUCCESS)
-            PELOGE(limLog(pMac, LOGE,  FL("could not update short slot time at CFG\n"));)
     }
     return eSIR_SUCCESS;
 }
@@ -2447,7 +2378,7 @@
     msg.type = WDA_INIT_RADAR_IND;
     msg.bodyptr = NULL;
     msg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msg.type));
     status = wdaPostCtrlMsg(pMac, &msg);
     if (status != eHAL_STATUS_SUCCESS)
     {
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c
index 9402dda..60a1591 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.c
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.c
@@ -609,7 +609,7 @@
 
     if (pMac->lim.gLimAddtsSent)
     {
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_ADDTS_RSP_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, psessionEntry->peSessionId, eLIM_ADDTS_RSP_TIMER));
         tx_timer_deactivate(&pMac->lim.limTimers.gLimAddtsRspTimer);
     }
 
@@ -654,9 +654,9 @@
 
     if ((psessionEntry->limSystemRole == eLIM_STA_ROLE)||(psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE))
     {
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, eLIM_MLM_WT_DEL_STA_RSP_STATE));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, eLIM_MLM_WT_DEL_STA_RSP_STATE));
         psessionEntry->limMlmState = eLIM_MLM_WT_DEL_STA_RSP_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, eLIM_MLM_WT_DEL_STA_RSP_STATE));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, eLIM_MLM_WT_DEL_STA_RSP_STATE));
         /* Deactivating probe after heart beat timer */
         limDeactivateAndChangeTimer(pMac, eLIM_PROBE_AFTER_HB_TIMER);
         limHeartBeatDeactivateAndChangeTimer(pMac, psessionEntry);
@@ -843,8 +843,23 @@
         smetransactionId = psessionEntry->transactionId;
 
         psessionEntry->limSmeState = eLIM_SME_JOIN_FAILURE_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
 
+        //if it is a reassoc failure to join new AP
+        if(mlmStaContext.resultCode == eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE)
+        {
+            if(mlmStaContext.resultCode != eSIR_SME_SUCCESS )
+            {
+                peDeleteSession(pMac, psessionEntry);
+                psessionEntry = NULL;
+            } 
+
+            limSendSmeJoinReassocRsp(pMac, eWNI_SME_REASSOC_RSP,
+                               mlmStaContext.resultCode, mlmStaContext.protStatusCode, psessionEntry,
+                               smesessionId, smetransactionId);
+        }
+        else
+        {
         palFreeMemory( pMac->hHdd, psessionEntry->pLimJoinReq);
         psessionEntry->pLimJoinReq = NULL;
 
@@ -856,6 +871,7 @@
         
         limSendSmeJoinReassocRsp(pMac, eWNI_SME_JOIN_RSP, mlmStaContext.resultCode, mlmStaContext.protStatusCode,
                                  psessionEntry, smesessionId, smetransactionId);
+        }
         
     } 
 
@@ -1050,7 +1066,7 @@
     if(SIR_BAND_5_GHZ == rfBand)
     {
         //we are HT. if we are 11A, then protection is not required.
-        if(true == psessionEntry->htCapabality)
+        if(true == psessionEntry->htCapability)
         {
             //we are HT and 11A station is leaving.
             //protection consideration required.
@@ -1093,7 +1109,7 @@
         erpEnabled = pStaDs->erpEnabled;
         //we are HT or 11G and 11B station is getting deleted.
         if (((phyMode == WNI_CFG_PHY_MODE_11G) ||
-              psessionEntry->htCapabality) &&
+              psessionEntry->htCapability) &&
               (erpEnabled == eHAL_CLEAR))
         {
             PELOG1(limLog(pMac, LOG1, FL("(%d) A legacy STA is disassociated. Addr is "),
@@ -1124,7 +1140,7 @@
             }
         }
         //(non-11B station is leaving) or (we are not 11G or HT AP)
-        else if(psessionEntry->htCapabality)
+        else if(psessionEntry->htCapability)
         { //we are HT AP and non-11B station is leaving.
 
             //11g station is leaving            
@@ -1160,7 +1176,7 @@
     }
 
     //LSIG TXOP not supporting staiton leaving. applies to 2.4 as well as 5 GHZ.
-    if((true == psessionEntry->htCapabality) &&
+    if((true == psessionEntry->htCapability) &&
         (true == pStaDs->mlmStaContext.htCapability))
     {
         //HT non-GF leaving
@@ -1318,7 +1334,7 @@
              }
           }
        }
-       else 
+       else
 #endif
        {
            if (pMac->lim.gLimNoShortSlotParams.numNonShortSlotSta> 0)
@@ -1354,9 +1370,7 @@
          {
             pBeaconParams->fShortSlotTime = true;
             pBeaconParams->paramChangeBitmap |= PARAM_SHORT_SLOT_TIME_CHANGED;
-
-            if (cfgSetInt(pMac,  WNI_CFG_SHORT_SLOT_TIME,  true) != eSIR_SUCCESS)
-                PELOGE(limLog(pMac, LOGE,  FL("could not update short slot time at CFG\n"));)
+            psessionEntry->shortSlotTimeSupported = true;
          }
       }
       else 
@@ -1373,10 +1387,8 @@
             {
                pBeaconParams->fShortSlotTime = true;
                pBeaconParams->paramChangeBitmap |= PARAM_SHORT_SLOT_TIME_CHANGED;
-
-               if (cfgSetInt(pMac,  WNI_CFG_SHORT_SLOT_TIME,  true) != eSIR_SUCCESS)
-                     PELOGE(limLog(pMac, LOGE,  FL("could not update short slot time at CFG\n"));)
-             }
+               psessionEntry->shortSlotTimeSupported = true;
+            }
           }
        }
    }
@@ -1409,12 +1421,11 @@
                           tSirResultCodes resultCode,
                           tANI_U16 protStatusCode,tpPESession psessionEntry)
 {
-    tANI_U8                  chanNum;
+    tANI_U8             chanNum, secChanOffset;
     tLimMlmReassocCnf   mlmReassocCnf;
 
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, eLIM_MLM_LINK_ESTABLISHED_STATE));
     psessionEntry->limMlmState = eLIM_MLM_LINK_ESTABLISHED_STATE;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, eLIM_MLM_LINK_ESTABLISHED_STATE));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, eLIM_MLM_LINK_ESTABLISHED_STATE));
 
     // 'Change' timer for future activations
     limDeactivateAndChangeTimer(pMac, eLIM_REASSOC_FAIL_TIMER);
@@ -1435,8 +1446,9 @@
 
    /*  To support BT-AMP */
    chanNum = psessionEntry->currentOperChannel;
+   secChanOffset = psessionEntry->htSecondaryChannelOffset;
 
-    limSetChannel(pMac, psessionEntry->limCurrentTitanHtCaps, chanNum, psessionEntry->maxTxPower, psessionEntry->peSessionId);
+    limSetChannel(pMac, chanNum, secChanOffset, psessionEntry->maxTxPower, psessionEntry->peSessionId);
 
     /** @ToDo : Need to Integrate the STOP the DataTransfer to the AP from 11H code */
 
@@ -1480,7 +1492,71 @@
     return eANI_BOOLEAN_FALSE;
 } /*** end limIsReassocInProgress() ***/
 
+#ifdef WLAN_FEATURE_11AC
+tSirRetStatus limPopulateVhtMcsSet(tpAniSirGlobal pMac,
+                                  tpSirSupportedRates pRates,
+                                  tDot11fIEVHTCaps *pPeerVHTCaps,
+                                  tpPESession psessionEntry)
+{
+    tANI_U32 val;
 
+    if(IS_DOT11_MODE_VHT(psessionEntry->dot11mode))
+    {
+        if ( wlan_cfgGetInt( pMac,WNI_CFG_VHT_RX_MCS_MAP,&val) != 
+            eSIR_SUCCESS )
+        {
+            PELOGE(limLog(pMac, LOGE, FL("could not retrieve VHT RX MCS MAP\n"));)
+            goto error;
+        }
+        pRates->vhtRxMCSMap = (tANI_U16)val;
+    
+        if ( wlan_cfgGetInt( pMac,WNI_CFG_VHT_TX_MCS_MAP,&val ) != 
+            eSIR_SUCCESS )
+        {
+            PELOGE(limLog(pMac, LOGE, FL("could not retrieve VHT TX MCS MAP\n"));)
+            goto error;
+        }
+        pRates->vhtTxMCSMap = (tANI_U16)val;
+
+        if ( wlan_cfgGetInt( pMac,WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,&val ) != 
+            eSIR_SUCCESS )
+        {
+            PELOGE(limLog(pMac, LOGE, FL("could not retrieve VHT RX Supported data rate MAP\n"));)
+            goto error;
+        }
+        pRates->vhtRxHighestDataRate = (tANI_U16)val;
+    
+        if ( wlan_cfgGetInt( pMac,WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,&val ) != 
+            eSIR_SUCCESS )
+        {
+            PELOGE(limLog(pMac, LOGE, FL("could not retrieve VHT RX Supported data rate MAP\n"));)
+            goto error;
+        }
+        pRates->vhtTxHighestDataRate = (tANI_U16)val;
+
+        if( pPeerVHTCaps != NULL)
+        {
+            pRates->vhtTxHighestDataRate = SIR_MIN(pRates->vhtTxHighestDataRate, pPeerVHTCaps->txSupDataRate);
+            pRates->vhtRxHighestDataRate = SIR_MIN(pRates->vhtRxHighestDataRate, pPeerVHTCaps->rxHighSupDataRate);
+
+            // Aquire PEER MCS map if we exceed.
+            // We compare/update only the last 2 bits of the map as we support only single BSS.
+            // Firmware takes care of this comparison
+            pRates->vhtRxMCSMap &= ~(0x3); // Clearing the last 2 bits in the bitmap
+            pRates->vhtRxMCSMap |= (pPeerVHTCaps->rxMCSMap & 0x3); // Updating the last 2 bits in the bitmap
+
+            // Firmware takes care of this comparison
+            pRates->vhtTxMCSMap &= ~(0x3); // Clearing the last 2 bits in the bitmap
+            pRates->vhtTxMCSMap |= (pPeerVHTCaps->txMCSMap & 0x3); // Updating the last 2 bits in the bitmap
+        }
+    }
+    return eSIR_SUCCESS;
+error:
+
+    return eSIR_FAILURE;
+
+}
+#endif
 
 /**
  * limPopulateOwnRateSet
@@ -1505,13 +1581,23 @@
  * @return eSIR_SUCCESS or eSIR_FAILURE
  *
  */
-
+#ifdef WLAN_FEATURE_11AC
+tSirRetStatus
+limPopulateOwnRateSet(tpAniSirGlobal pMac,
+                      tpSirSupportedRates pRates,
+                      tANI_U8* pSupportedMCSSet,
+                      tANI_U8 basicOnly,
+                      tpPESession psessionEntry,
+                      tDot11fIEVHTCaps *pVHTCaps)
+#else
 tSirRetStatus
 limPopulateOwnRateSet(tpAniSirGlobal pMac,
                       tpSirSupportedRates pRates,
                       tANI_U8* pSupportedMCSSet,
                       tANI_U8 basicOnly,
                       tpPESession psessionEntry)
+#endif
+
 {
     tSirMacRateSet          tempRateSet;
     tSirMacRateSet          tempRateSet2;
@@ -1659,8 +1745,9 @@
             PELOGW(limLog(pMac, LOG2,FL("%x ") , pRates->supportedMCSSet[i]);)
     }
 
-
-
+#ifdef WLAN_FEATURE_11AC
+    limPopulateVhtMcsSet(pMac, pRates , pVHTCaps,psessionEntry);
+#endif
 
     return eSIR_SUCCESS;
 
@@ -1669,8 +1756,6 @@
     return eSIR_FAILURE;
 } /*** limPopulateOwnRateSet() ***/
 
-
-
 /**
  * limPopulateMatchingRateSet
  * FUNCTION:
@@ -1700,7 +1785,18 @@
  *
  * @return:  eSIR_SUCCESS or eSIR_FAILURE
  */
+#ifdef WLAN_FEATURE_11AC
+tSirRetStatus
+limPopulateMatchingRateSet(tpAniSirGlobal pMac,
+                           tpDphHashNode pStaDs,
+                           tSirMacRateSet *pOperRateSet,
+                           tSirMacRateSet *pExtRateSet,
+                           tANI_U8* pSupportedMCSSet,
+                           tSirMacPropRateSet *pAniLegRateSet,
+                           tpPESession  psessionEntry,
+                           tDot11fIEVHTCaps *pVHTCaps)
 
+#else
 tSirRetStatus
 limPopulateMatchingRateSet(tpAniSirGlobal pMac,
                            tpDphHashNode pStaDs,
@@ -1709,6 +1805,7 @@
                            tANI_U8* pSupportedMCSSet,
                            tSirMacPropRateSet *pAniLegRateSet,
                            tpPESession  psessionEntry)
+#endif
 {
    tSirMacRateSet          tempRateSet;
    tSirMacRateSet          tempRateSet2;
@@ -1929,6 +2026,9 @@
         }
     }
 
+#ifdef WLAN_FEATURE_11AC
+    limPopulateVhtMcsSet(pMac, &pStaDs->supportedRates, pVHTCaps, psessionEntry);
+#endif
     /**
       * Set the erpEnabled bit iff the phy is in G mode and at least
       * one A rate is supported
@@ -2041,9 +2141,20 @@
     //Update HT Capability
 
     if ((limGetSystemRole(psessionEntry) == eLIM_AP_ROLE) ||(limGetSystemRole(psessionEntry) == eLIM_BT_AMP_AP_ROLE) || (limGetSystemRole(psessionEntry) == eLIM_STA_IN_IBSS_ROLE))
+    {
         pAddStaParams->htCapable = pStaDs->mlmStaContext.htCapability;
+#ifdef WLAN_FEATURE_11AC
+        pAddStaParams->vhtCapable = pStaDs->mlmStaContext.vhtCapability;
+#endif
+    }
     else
-          pAddStaParams->htCapable = psessionEntry->htCapabality;
+    {
+        pAddStaParams->htCapable = psessionEntry->htCapability;
+#ifdef WLAN_FEATURE_11AC
+        pAddStaParams->vhtCapable = psessionEntry->vhtCapability;
+#endif
+
+    }
 
     pAddStaParams->greenFieldCapable = pStaDs->htGreenfield;
     pAddStaParams->maxAmpduDensity= pStaDs->htAMpduDensity;
@@ -2055,6 +2166,18 @@
     pAddStaParams->maxAmsduSize = pStaDs->htMaxAmsduLength;
     pAddStaParams->txChannelWidthSet = pStaDs->htSupportedChannelWidthSet;
     pAddStaParams->mimoPS = pStaDs->htMIMOPSState;
+
+#ifdef WLAN_FEATURE_11AC
+    if(pAddStaParams->vhtCapable)
+    {
+        pAddStaParams->vhtTxChannelWidthSet = psessionEntry->vhtTxChannelWidthSet;
+
+        /* TODO. Need to discuss this. Overwriting here.
+         * Stick to SAP's configuration for HT supported Channel width */
+        pAddStaParams->txChannelWidthSet = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET, psessionEntry);
+    }
+#endif
+
     /* Update PE session ID*/
     pAddStaParams->sessionId = psessionEntry->peSessionId;
 
@@ -2102,7 +2225,8 @@
   //we need to defer the message until we get the response back from HAL.
     if (pAddStaParams->respReqd)
         SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
-  msgQ.type = WDA_ADD_STA_REQ;
+
+    msgQ.type = WDA_ADD_STA_REQ;
 
     msgQ.reserved = 0;
     msgQ.bodyptr = pAddStaParams;
@@ -2110,11 +2234,13 @@
 
     limLog( pMac, LOGE, FL( "Sending SIR_HAL_ADD_STA_REQ for assocId %d\n" ),
             pStaDs->assocId);
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
     retCode = wdaPostCtrlMsg( pMac, &msgQ );
     if( eSIR_SUCCESS != retCode)
     {
+       if (pAddStaParams->respReqd)
+          SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
         limLog( pMac, LOGE, FL("ADD_STA_REQ for aId %d failed (reason %X)\n"),
                             pStaDs->assocId, retCode );
         palFreeMemory(pMac->hHdd, (void*)pAddStaParams);
@@ -2201,13 +2327,13 @@
         //when limDelSta is called from processSmeAssocCnf then mlmState is already set properly.
         if(eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE != GET_LIM_STA_CONTEXT_MLM_STATE(pStaDs))
         {
-            MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, eLIM_MLM_WT_DEL_STA_RSP_STATE));
+            MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, eLIM_MLM_WT_DEL_STA_RSP_STATE));
             SET_LIM_STA_CONTEXT_MLM_STATE(pStaDs, eLIM_MLM_WT_DEL_STA_RSP_STATE);
         }
         if ( (eLIM_STA_ROLE == GET_LIM_SYSTEM_ROLE(psessionEntry)) || 
              (eLIM_BT_AMP_STA_ROLE == GET_LIM_SYSTEM_ROLE(psessionEntry)) )
         {
-            MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, eLIM_MLM_WT_DEL_STA_RSP_STATE));
+            MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, eLIM_MLM_WT_DEL_STA_RSP_STATE));
 
             psessionEntry->limMlmState = eLIM_MLM_WT_DEL_STA_RSP_STATE; 
     
@@ -2228,10 +2354,12 @@
 
     limLog( pMac, LOGE, FL( "Sending SIR_HAL_DELETE_STA_REQ for STAID: %X and AssocID: %d\n" ),
     pDelStaParams->staIdx, pDelStaParams->assocId);
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
     retCode = wdaPostCtrlMsg( pMac, &msgQ );
     if( eSIR_SUCCESS != retCode)
     {
+        if(fRespReqd)
+           SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
         limLog( pMac, LOGE, FL("Posting DELETE_STA_REQ to HAL failed, reason=%X\n"),
                         retCode );
         palFreeMemory(pMac->hHdd, (void*)pDelStaParams);
@@ -2272,7 +2400,7 @@
 #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
     limLog( pMac, LOGE, FL( "Sending SIR_HAL_ADD_STA_REQ... (aid %d)" ), pAddStaParams->assocId);
 #endif
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
     psessionEntry->limPrevMlmState = psessionEntry->limMlmState;
     psessionEntry->limMlmState = eLIM_MLM_WT_ADD_STA_RSP_STATE;
@@ -2358,11 +2486,15 @@
     pAddStaParams->updateSta = updateSta;
 
     pAddStaParams->shortPreambleSupported = psessionEntry->beaconParams.fShortPreamble;
-    limPopulateOwnRateSet(pMac, &pAddStaParams->supportedRates, NULL, false,psessionEntry);
 
-    if( psessionEntry->htCapabality)
+#ifdef WLAN_FEATURE_11AC
+    limPopulateOwnRateSet(pMac, &pAddStaParams->supportedRates, NULL, false,psessionEntry,NULL);
+#else
+    limPopulateOwnRateSet(pMac, &pAddStaParams->supportedRates, NULL, false,psessionEntry);
+#endif
+    if( psessionEntry->htCapability)
     {
-        pAddStaParams->htCapable = psessionEntry->htCapabality;
+        pAddStaParams->htCapable = psessionEntry->htCapability;
 #ifdef DISABLE_GF_FOR_INTEROP
         /*
          * To resolve the interop problem with Broadcom AP, 
@@ -2406,7 +2538,10 @@
         pAddStaParams->fShortGI40Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_40MHZ);
 #endif
     }
-
+#ifdef WLAN_FEATURE_11AC
+    pAddStaParams->vhtCapable = psessionEntry->vhtCapability;
+    pAddStaParams->vhtTxChannelWidthSet = pMac->lim.apChanWidth;
+#endif
     if(wlan_cfgGetInt(pMac, WNI_CFG_LISTEN_INTERVAL, &listenInterval) != eSIR_SUCCESS)
        limLog(pMac, LOGP, FL("Couldn't get LISTEN_INTERVAL\n"));
     pAddStaParams->listenInterval = (tANI_U16)listenInterval;
@@ -2432,7 +2567,7 @@
 
     limLog( pMac, LOGW, FL( "Sending SIR_HAL_ADD_STA_REQ... (aid %d)" ),
           pAddStaParams->assocId);
-  MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+  MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
   if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
     {
@@ -2688,7 +2823,7 @@
         if ( pBPR->HTInfo.present )
             limUpdateStaRunTimeHTInfo( pMac, &pBPR->HTInfo, psessionEntry);
         psessionEntry->limMlmState = eLIM_MLM_JOINED_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, eLIM_MLM_JOINED_STATE));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, eLIM_MLM_JOINED_STATE));
 
 #if (WNI_POLARIS_FW_PRODUCT == AP)
         // In case of BP, we need to adopt to all rates
@@ -2811,7 +2946,7 @@
     else
         pDelBssParams->bssIdx          = bssIdx;
     psessionEntry->limMlmState = eLIM_MLM_WT_DEL_BSS_RSP_STATE;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, eLIM_MLM_WT_DEL_BSS_RSP_STATE));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, eLIM_MLM_WT_DEL_BSS_RSP_STATE));
 
     pDelBssParams->status= eHAL_STATUS_SUCCESS;
     pDelBssParams->respReqd = 1;
@@ -2826,10 +2961,11 @@
     msgQ.bodyptr = pDelBssParams;
     msgQ.bodyval = 0;
 
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
     if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
     {
+        SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
         limLog( pMac, LOGE, FL("Posting DELETE_BSS_REQ to HAL failed, reason=%X\n"), retCode );
         palFreeMemory(pMac->hHdd, (void*)pDelBssParams);
     }
@@ -2929,7 +3065,7 @@
 
     pAddBssParams->nwType = bssDescription->nwType;
     
-    pAddBssParams->shortSlotTimeSupported = (tANI_U8)pAssocRsp->capabilityInfo.shortSlotTime;    
+    pAddBssParams->shortSlotTimeSupported = (tANI_U8)pAssocRsp->capabilityInfo.shortSlotTime;
     pAddBssParams->llaCoexist = (tANI_U8) psessionEntry->beaconParams.llaCoexist;    
     pAddBssParams->llbCoexist = (tANI_U8) psessionEntry->beaconParams.llbCoexist;
     pAddBssParams->llgCoexist = (tANI_U8) psessionEntry->beaconParams.llgCoexist;
@@ -2961,7 +3097,7 @@
             else
             {
                 pAddBssParams->txChannelWidthSet = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
-                pAddBssParams->currentExtChannel = eHT_SECONDARY_CHANNEL_OFFSET_NONE;
+                pAddBssParams->currentExtChannel = PHY_SINGLE_CHANNEL_CENTERED;
             }
             pAddBssParams->llnNonGFCoexist = (tANI_U8)pAssocRsp->HTInfo.nonGFDevicesPresent;
             pAddBssParams->fLsigTXOPProtectionFullSupport = (tANI_U8)pAssocRsp->HTInfo.lsigTXOPProtectionFullSupport;
@@ -2971,6 +3107,22 @@
 
     pAddBssParams->currentOperChannel = bssDescription->channelId;
 
+#ifdef WLAN_FEATURE_11AC
+    if (psessionEntry->vhtCapability && ( pAssocRsp->VHTCaps.present ))
+    {
+        pAddBssParams->vhtCapable = pAssocRsp->VHTCaps.present;
+        pAddBssParams->vhtTxChannelWidthSet = pAssocRsp->VHTOperation.chanWidth; 
+        pAddBssParams->currentExtChannel = limGet11ACPhyCBState ( pMac, 
+                                           pAddBssParams->currentOperChannel,
+                                           pAddBssParams->currentExtChannel );
+    }
+    else 
+    {
+        pAddBssParams->vhtCapable = 0;
+    }
+#endif
+
+
     // Populate the STA-related parameters here
     // Note that the STA here refers to the AP
     {
@@ -3012,6 +3164,14 @@
                 (chanWidthSupp) )
             {
                 pAddBssParams->staContext.txChannelWidthSet = ( tANI_U8 )pAssocRsp->HTInfo.recommendedTxWidthSet;
+                
+#ifdef WLAN_FEATURE_11AC
+                if (psessionEntry->vhtCapability && ( pBeaconStruct->VHTCaps.present ))
+                {
+                    pAddBssParams->staContext.vhtCapable = 1;
+                    pAddBssParams->staContext.vhtTxChannelWidthSet = pAssocRsp->VHTOperation.chanWidth; //pMac->lim.apChanWidth;
+                }
+#endif
             }
             else
             {
@@ -3078,7 +3238,8 @@
     }
 #endif
 
-    pAddBssParams->bSpectrumMgtEnabled = psessionEntry->spectrumMgtEnabled;
+    pAddBssParams->bSpectrumMgtEnabled = psessionEntry->spectrumMgtEnabled || 
+        limIsconnectedOnDFSChannel(bssDescription->channelId);
 
 #if defined WLAN_FEATURE_VOWIFI_11R
     pAddBssParams->extSetStaKeyParamValid = 0;
@@ -3089,7 +3250,7 @@
         psessionEntry->limMlmState = eLIM_MLM_WT_ADD_BSS_RSP_ASSOC_STATE;
     else
         psessionEntry->limMlmState = eLIM_MLM_WT_ADD_BSS_RSP_REASSOC_STATE;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
     //we need to defer the message until we get the response back from HAL.
     SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
@@ -3101,11 +3262,12 @@
     msgQ.bodyval = 0;
 
     limLog( pMac, LOG1, FL( "Sending SIR_HAL_ADD_BSS_REQ..." ));
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
     retCode = wdaPostCtrlMsg( pMac, &msgQ );
     if( eSIR_SUCCESS != retCode) 
     {
+        SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
         palFreeMemory(pMac->hHdd, pAddBssParams);
         limLog( pMac, LOGE, FL("Posting ADD_BSS_REQ to HAL failed, reason=%X\n"),
                 retCode );
@@ -3189,7 +3351,7 @@
 
     pAddBssParams->nwType = bssDescription->nwType;
     
-    pAddBssParams->shortSlotTimeSupported = (tANI_U8)beaconStruct.capabilityInfo.shortSlotTime; 
+    pAddBssParams->shortSlotTimeSupported = (tANI_U8)beaconStruct.capabilityInfo.shortSlotTime;
     pAddBssParams->llaCoexist = (tANI_U8) psessionEntry->beaconParams.llaCoexist;
     pAddBssParams->llbCoexist = (tANI_U8) psessionEntry->beaconParams.llbCoexist;
     pAddBssParams->llgCoexist = (tANI_U8) psessionEntry->beaconParams.llgCoexist;
@@ -3219,7 +3381,7 @@
             else
             {
                 pAddBssParams->txChannelWidthSet = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
-                pAddBssParams->currentExtChannel = eHT_SECONDARY_CHANNEL_OFFSET_NONE;
+                pAddBssParams->currentExtChannel = PHY_SINGLE_CHANNEL_CENTERED;
             }
             pAddBssParams->llnNonGFCoexist = (tANI_U8)beaconStruct.HTInfo.nonGFDevicesPresent;
             pAddBssParams->fLsigTXOPProtectionFullSupport = (tANI_U8)beaconStruct.HTInfo.lsigTXOPProtectionFullSupport;
@@ -3229,6 +3391,21 @@
 
     pAddBssParams->currentOperChannel = bssDescription->channelId;
 
+#ifdef WLAN_FEATURE_11AC
+    if (psessionEntry->vhtCapability && ( beaconStruct.VHTCaps.present ))
+    {
+        pAddBssParams->vhtCapable = beaconStruct.VHTCaps.present;
+        pAddBssParams->vhtTxChannelWidthSet = beaconStruct.VHTOperation.chanWidth; 
+        pAddBssParams->currentExtChannel = limGet11ACPhyCBState ( pMac, 
+                                           pAddBssParams->currentOperChannel,
+                                           pAddBssParams->currentExtChannel );
+    }
+    else 
+    {
+        pAddBssParams->vhtCapable = 0;
+    }
+#endif
+
     // Populate the STA-related parameters here
     // Note that the STA here refers to the AP
     {
@@ -3255,6 +3432,13 @@
                 (chanWidthSupp) )
             {
                 pAddBssParams->staContext.txChannelWidthSet = ( tANI_U8 )beaconStruct.HTInfo.recommendedTxWidthSet;
+          #ifdef WLAN_FEATURE_11AC
+                if (psessionEntry->vhtCapability && ( beaconStruct.VHTCaps.present ))
+                {
+                    pAddBssParams->staContext.vhtCapable = 1;
+                    pAddBssParams->staContext.vhtTxChannelWidthSet = beaconStruct.VHTOperation.chanWidth; 
+                }
+          #endif
             }
             else
             {
@@ -3280,9 +3464,14 @@
             pAddBssParams->staContext.wmmEnabled = 0;
 
         //Update the rates
-        
+#ifdef WLAN_FEATURE_11AC
         limPopulateOwnRateSet(pMac, &pAddBssParams->staContext.supportedRates, 
-                                                    beaconStruct.HTCaps.supportedMCSSet, false,psessionEntry);
+                                        beaconStruct.HTCaps.supportedMCSSet, false,psessionEntry,
+                                        &beaconStruct.VHTCaps);
+#else
+        limPopulateOwnRateSet(pMac, &pAddBssParams->staContext.supportedRates, 
+                                        beaconStruct.HTCaps.supportedMCSSet, false,psessionEntry);
+#endif
         limFillSupportedRatesInfo(pMac, NULL, &pAddBssParams->staContext.supportedRates,psessionEntry);
 
     }
@@ -3311,7 +3500,8 @@
     
     pAddBssParams->halPersona = (tANI_U8)psessionEntry->pePersona; //update persona
 
-    pAddBssParams->bSpectrumMgtEnabled = psessionEntry->spectrumMgtEnabled;
+    pAddBssParams->bSpectrumMgtEnabled = psessionEntry->spectrumMgtEnabled || 
+        limIsconnectedOnDFSChannel(bssDescription->channelId);
 
 #if defined WLAN_FEATURE_VOWIFI_11R
     pAddBssParams->extSetStaKeyParamValid = 0;
@@ -3322,7 +3512,7 @@
     //pMac->lim.gLimMlmState = eLIM_MLM_WT_ADD_BSS_RSP_PREASSOC_STATE;
     psessionEntry->limMlmState = eLIM_MLM_WT_ADD_BSS_RSP_PREASSOC_STATE;
     
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
     //we need to defer the message until we get the response back from HAL.
     SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
@@ -3334,11 +3524,12 @@
     msgQ.bodyval = 0;
 
     limLog( pMac, LOG1, FL( "Sending SIR_HAL_ADD_BSS_REQ..." ));
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
     retCode = wdaPostCtrlMsg( pMac, &msgQ );
     if( eSIR_SUCCESS != retCode) 
     {
+        SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
         palFreeMemory(pMac->hHdd, pAddBssParams);
         limLog( pMac, LOGE, FL("Posting ADD_BSS_REQ to HAL failed, reason=%X\n"),
                 retCode );
@@ -3439,7 +3630,7 @@
             else
             {
                 pAddBssParams->txChannelWidthSet = (tANI_U8)pAssocRsp->HTCaps.supportedChannelWidthSet;
-                pAddBssParams->currentExtChannel = eHT_SECONDARY_CHANNEL_OFFSET_NONE;
+                pAddBssParams->currentExtChannel = PHY_SINGLE_CHANNEL_CENTERED;
             }
             pAddBssParams->llnNonGFCoexist = (tANI_U8)pAssocRsp->HTInfo.nonGFDevicesPresent;
             pAddBssParams->fLsigTXOPProtectionFullSupport = (tANI_U8)pAssocRsp->HTInfo.lsigTXOPProtectionFullSupport;
@@ -3536,7 +3727,7 @@
         psessionEntry->limMlmState = eLIM_MLM_WT_ADD_BSS_RSP_ASSOC_STATE;
     else
         psessionEntry->limMlmState = eLIM_MLM_WT_ADD_BSS_RSP_REASSOC_STATE;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
     //we need to defer the message until we get the response back from HAL.
     SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
@@ -3548,7 +3739,7 @@
     msgQ.bodyval = 0;
 
     limLog( pMac, LOG1, FL( "Sending SIR_HAL_ADD_BSS_REQ..." ));
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
     retCode = halPostMsgApi( pMac, &msgQ );
     if( eSIR_SUCCESS != retCode) 
@@ -3609,7 +3800,7 @@
     if ( (psessionEntry->limSystemRole == eLIM_STA_ROLE)||(psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE))
     {
         psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
     }
 
     limSendDelStaCnf(pMac, staDsAddr, staDsAssocId, mlmStaContext, statusCode,psessionEntry);
@@ -3633,6 +3824,10 @@
                 return eSTA_11bg;
             case WNI_CFG_DOT11_MODE_11N:
                 return eSTA_11n;
+#ifdef WLAN_FEATURE_11AC
+            case WNI_CFG_DOT11_MODE_11AC:
+                return eSTA_11ac;
+#endif
             case WNI_CFG_DOT11_MODE_ALL:
             default:
                 return eSTA_11n;           
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.h b/CORE/MAC/src/pe/lim/limAssocUtils.h
index a46f7ab..8b123fe 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.h
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.h
@@ -59,18 +59,42 @@
                                      tANI_U8 , tAniAuthType,
                                      tANI_U16, tANI_U8, tSirResultCodes, tpPESession);
 
+#ifdef WLAN_FEATURE_11AC
+tSirRetStatus limPopulateOwnRateSet(tpAniSirGlobal pMac,
+                                         tpSirSupportedRates pRates,
+                                         tANI_U8* pSupportedMCSSet,
+                                         tANI_U8 basicOnly,
+                                         tpPESession psessionEntry,
+                                         tDot11fIEVHTCaps *pVHTCaps);
+
+#else
 tSirRetStatus limPopulateOwnRateSet(tpAniSirGlobal pMac,
                                                                 tpSirSupportedRates pRates,
                                                                 tANI_U8* pSupportedMCSSet,
                                                                 tANI_U8 basicOnly,
                                                                 tpPESession psessionEntry);
+#endif
 
+#ifdef WLAN_FEATURE_11AC
+tSirRetStatus
+limPopulateMatchingRateSet(tpAniSirGlobal pMac,
+                           tpDphHashNode pStaDs,
+                           tSirMacRateSet *pOperRateSet,
+                           tSirMacRateSet *pExtRateSet,
+                           tANI_U8* pSupportedMCSSet,
+                           tSirMacPropRateSet *pAniLegRateSet,
+                           tpPESession  psessionEntry,
+                           tDot11fIEVHTCaps *pVHTCaps);
+#else
 tSirRetStatus   limPopulateMatchingRateSet(tpAniSirGlobal,
                                            tpDphHashNode,
                                            tSirMacRateSet *,
                                            tSirMacRateSet *,
                                            tANI_U8* pSupportedMCSSet,
                                            tSirMacPropRateSet *, tpPESession);
+
+
+#endif
 tSirRetStatus   limAddSta(tpAniSirGlobal, tpDphHashNode,tpPESession);
 tSirRetStatus   limDelBss(tpAniSirGlobal, tpDphHashNode, tANI_U16, tpPESession);
 tSirRetStatus   limDelSta(tpAniSirGlobal, tpDphHashNode, tANI_BOOLEAN, tpPESession);
diff --git a/CORE/MAC/src/pe/lim/limFT.c b/CORE/MAC/src/pe/lim/limFT.c
index 26d04f4..ceff4da 100644
--- a/CORE/MAC/src/pe/lim/limFT.c
+++ b/CORE/MAC/src/pe/lim/limFT.c
@@ -442,7 +442,7 @@
             else
             {
                 pAddBssParams->txChannelWidthSet = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
-                pAddBssParams->currentExtChannel = eHT_SECONDARY_CHANNEL_OFFSET_NONE;
+                pAddBssParams->currentExtChannel = PHY_SINGLE_CHANNEL_CENTERED;
             }
             pAddBssParams->llnNonGFCoexist = (tANI_U8)beaconStruct.HTInfo.nonGFDevicesPresent;
             pAddBssParams->fLsigTXOPProtectionFullSupport = (tANI_U8)beaconStruct.HTInfo.lsigTXOPProtectionFullSupport;
@@ -510,9 +510,14 @@
             pAddBssParams->staContext.wmmEnabled = 0;
 
         //Update the rates
-        
+#ifdef WLAN_FEATURE_11AC
+        limPopulateOwnRateSet(pMac, &pAddBssParams->staContext.supportedRates, 
+                             beaconStruct.HTCaps.supportedMCSSet, 
+                             false,pftSessionEntry,&beaconStruct.VHTCaps);
+#else
         limPopulateOwnRateSet(pMac, &pAddBssParams->staContext.supportedRates, 
                                                     beaconStruct.HTCaps.supportedMCSSet, false,pftSessionEntry);
+#endif
         limFillSupportedRatesInfo(pMac, NULL, &pAddBssParams->staContext.supportedRates,pftSessionEntry);
 
     }
@@ -583,7 +588,7 @@
     pftSessionEntry->peSessionId = sessionId;
 
     pftSessionEntry->dot11mode = psessionEntry->dot11mode;
-    pftSessionEntry->htCapabality = psessionEntry->htCapabality;
+    pftSessionEntry->htCapability = psessionEntry->htCapability;
 
     pftSessionEntry->limWmeEnabled = psessionEntry->limWmeEnabled;
     pftSessionEntry->limQosEnabled = psessionEntry->limQosEnabled;
@@ -649,11 +654,6 @@
                        
     pftSessionEntry->limCurrentBssCaps = pbssDescription->capabilityInfo;
     pftSessionEntry->limReassocBssCaps = pbssDescription->capabilityInfo;
-            
-    pftSessionEntry->limCurrentTitanHtCaps=
-                    pbssDescription->titanHtCaps;
-    pftSessionEntry->limReassocTitanHtCaps=
-        pftSessionEntry->limCurrentTitanHtCaps;
 
     regMax = cfgGetRegulatoryMaxTransmitPower( pMac, pftSessionEntry->currentOperChannel ); 
     localPowerConstraint = regMax;
@@ -1082,7 +1082,7 @@
 #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
     limLog( pMac, LOGE, FL( "Sending SIR_HAL_ADD_BSS_REQ..." ));
 #endif
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
     retCode = wdaPostCtrlMsg( pMac, &msgQ );
     if( eSIR_SUCCESS != retCode) 
@@ -1271,7 +1271,7 @@
      * WDA_AGGR_QOS_RSP from HAL.
      */
     SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
-    MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msg.type));
 
     if(eSIR_SUCCESS != wdaPostCtrlMsg(pMac, &msg))
     {
diff --git a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
index e98aeae..6b118a3 100644
--- a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
+++ b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
@@ -325,10 +325,16 @@
     tLimIbssPeerNode *pPeer,
     tpPESession       psessionEntry)
 {
+#ifdef WLAN_FEATURE_11AC
+    limPopulateMatchingRateSet(pMac, pStaDs, &pPeer->supportedRates,
+                               &pPeer->extendedRates, pPeer->supportedMCSSet,
+                               &pStaDs->mlmStaContext.propRateSet,psessionEntry,NULL);
+#else
     // Populate supported rateset
     limPopulateMatchingRateSet(pMac, pStaDs, &pPeer->supportedRates,
                                &pPeer->extendedRates, pPeer->supportedMCSSet,
                                &pStaDs->mlmStaContext.propRateSet,psessionEntry);
+#endif
 
     pStaDs->mlmStaContext.capabilityInfo = pPeer->capabilityInfo;
 } /*** end ibss_sta_info_update() ***/
@@ -550,20 +556,10 @@
      * so that the IBSS doesnt blindly start with short slot = 1. If IBSS start is part of coalescing then it will adapt
      * to peer's short slot using code below.
      */
-    if (wlan_cfgGetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, &cfg)
-                   != eSIR_SUCCESS)
-    {
-        limLog(pMac, LOGP, FL("cfg get WNI_CFG_SHORT_SLOT_TIME failed\n"));
-        return;
-    }
     /* If cfg is already set to current peer's capability then no need to set it again */
-    if (cfg != pBeacon->capabilityInfo.shortSlotTime)
+    if (psessionEntry->shortSlotTimeSupported != pBeacon->capabilityInfo.shortSlotTime)
     {
-        if (cfgSetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, pBeacon->capabilityInfo.shortSlotTime) != eSIR_SUCCESS)
-        {
-            limLog(pMac, LOGP, FL("could not update short slot time at CFG\n"));
-            return;
-        }
+        psessionEntry->shortSlotTimeSupported = pBeacon->capabilityInfo.shortSlotTime;
     }
     palCopyMemory( pMac->hHdd,
        (tANI_U8 *) &psessionEntry->pLimStartBssReq->operationalRateSet,
@@ -615,10 +611,10 @@
     mlmStartReq.bssType             = eSIR_IBSS_MODE;
     mlmStartReq.beaconPeriod        = pBeacon->beaconInterval;
     mlmStartReq.nwType              = psessionEntry->pLimStartBssReq->nwType; //psessionEntry->nwType is also OK????
-    mlmStartReq.htCapable           = psessionEntry->htCapabality;
+    mlmStartReq.htCapable           = psessionEntry->htCapability;
     mlmStartReq.htOperMode          = pMac->lim.gHTOperMode;
     mlmStartReq.dualCTSProtection   = pMac->lim.gHTDualCTSProtection;
-    mlmStartReq.txChannelWidthSet   = pMac->lim.gHTRecommendedTxWidthSet;
+    mlmStartReq.txChannelWidthSet   = psessionEntry->htRecommendedTxWidthSet;
 
     #if 0
     if (wlan_cfgGetInt(pMac, WNI_CFG_CURRENT_CHANNEL, &cfg) != eSIR_SUCCESS)
@@ -1006,7 +1002,7 @@
         limGetPhyMode(pMac, &phyMode, psessionEntry);
 
         //We are 11G or 11n. Check if we need protection from 11b Stations.
-        if ((phyMode == WNI_CFG_PHY_MODE_11G) || (pMac->lim.htCapability))
+        if ((phyMode == WNI_CFG_PHY_MODE_11G) || (psessionEntry->htCapability))
         {
             /* As we found in the past, it is possible that a 11n STA sends
              * Beacon with HT IE but not ERP IE.  So the absense of ERP IE
@@ -1315,18 +1311,14 @@
     limIbssDelete(pMac,psessionEntry);
     psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
 
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
     psessionEntry->limSystemRole = eLIM_STA_ROLE;
 
     /* Change the short slot operating mode to Default (which is 1 for now) so that when IBSS starts next time with Libra
      * as originator, it picks up the default. This enables us to remove hard coding of short slot = 1 from limApplyConfiguration 
      */
-    if (cfgSetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, WNI_CFG_SHORT_SLOT_TIME_STADEF) != eSIR_SUCCESS)
-    {
-        limLog(pMac, LOGP, FL("could not update short slot time at CFG\n"));
-        return;
-    }
+    psessionEntry->shortSlotTimeSupported = WNI_CFG_SHORT_SLOT_TIME_STADEF;
 
     end:
     if(pDelBss != NULL)
@@ -1481,7 +1473,7 @@
         psessionEntry->limIbssActive = true;
         limSendSmeWmStatusChangeNtf(pMac, eSIR_SME_IBSS_ACTIVE, NULL, 0, psessionEntry->smeSessionId);
         limHeartBeatDeactivateAndChangeTimer(pMac, psessionEntry);
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_HEART_BEAT_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_HEART_BEAT_TIMER));
         if (limActivateHearBeatTimer(pMac) != TX_SUCCESS)
             limLog(pMac, LOGP, FL("could not activate Heartbeat timer\n"));
     }
@@ -1636,7 +1628,7 @@
         limGetPhyMode(pMac, &phyMode, psessionEntry);
         erpEnabled = pStaDs->erpEnabled;
         //we are HT or 11G and 11B station is getting deleted.
-        if ( ((phyMode == WNI_CFG_PHY_MODE_11G) || pMac->lim.htCapability) 
+        if ( ((phyMode == WNI_CFG_PHY_MODE_11G) || psessionEntry->htCapability)
               && (erpEnabled == eHAL_CLEAR))
         {
             PELOGE(limLog(pMac, LOGE, FL("(%d) A legacy STA is disassociated. Addr is "),
diff --git a/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c b/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
index f9c103b..810dd9e 100644
--- a/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
+++ b/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
@@ -298,12 +298,12 @@
     pLen = pBuf;
     pBuf += sizeof(tANI_U16);
     msgLength += sizeof(tANI_U16);
-    
+
     //sessionId
-    *pBuf = psessionEntry->peSessionId;
+    *pBuf = psessionEntry->smeSessionId;
     pBuf++;
     msgLength++;
-  
+
     //transactionId
     limCopyU16((tANI_U8*)pBuf, psessionEntry->transactionId);
     pBuf += sizeof(tANI_U16);
diff --git a/CORE/MAC/src/pe/lim/limLogDump.c b/CORE/MAC/src/pe/lim/limLogDump.c
index 8271119..f15c80e 100644
--- a/CORE/MAC/src/pe/lim/limLogDump.c
+++ b/CORE/MAC/src/pe/lim/limLogDump.c
@@ -83,7 +83,7 @@
 #endif
 
 
-char *dumpLim( tpAniSirGlobal pMac, char *p )
+char *dumpLim( tpAniSirGlobal pMac, char *p, tANI_U32 sessionId)
 {
   #ifdef FIXME_GEN6
   //iterate through the sessionTable and dump sta entries for each session.
@@ -91,6 +91,13 @@
 
   tANI_U16 i, j;
 
+  tpPESession psessionEntry = peFindSessionBySessionId(pMac, sessionId);
+
+  if (psessionEntry == NULL)
+  {
+    p += log_sprintf( pMac, p, "Invalid sessionId: %d \n ", sessionId);
+    return p;
+  }
 
   p += log_sprintf( pMac,p, "\n ----- LIM Debug Information ----- \n");
   p += log_sprintf( pMac,p, "LIM Role  = (%d) %s\n",
@@ -99,11 +106,8 @@
                   pMac->lim.gLimSmeState, limSmeStateStr(pMac->lim.gLimSmeState));
   p += log_sprintf( pMac,p, "MLM State = (%d) %s",
                   pMac->lim.gLimMlmState, limMlmStateStr(pMac->lim.gLimMlmState));
-
-  p += log_sprintf( pMac,p, "CHANNEL BONDING Mode (%1d) and State (X|X|X|AU|CS|U/D|O|A) (0x%1x)\n",
-                  pMac->lim.gCbMode, pMac->lim.gCbState);
-  p += log_sprintf( pMac,p, "802.11n HT Capability: %s\n",
-                  (pMac->lim.htCapability == 1) ? "Enabled" : "Disabled");
+  p += log_sprintf( pMac,p, "802.11n session HT Capability: %s\n",
+                  (psessionEntry->htCapability == 1) ? "Enabled" : "Disabled");
   p += log_sprintf( pMac,p, "gLimProcessDefdMsgs: %s\n",
                   (pMac->lim.gLimProcessDefdMsgs == 1) ? "Enabled" : "Disabled");
 
@@ -131,10 +135,6 @@
 
       p += log_sprintf( pMac,p, "Num of Hash Miss Event ignored             = %d\n",
                       pMac->lim.gLimNumHashMissIgnored);
-
-
-
-
   }
 
   p += log_sprintf( pMac,p, "Num of RxCleanup Count                     = %d\n",
@@ -152,11 +152,6 @@
   p += log_sprintf( pMac,p, "No. of Beacons Rxed During HB Interval     = %d\n",
                   pMac->lim.gLimRxedBeaconCntDuringHB);
   p += log_sprintf( pMac,p, "Self Operating Mode                              = %s\n", limDot11ModeStr(pMac, (tANI_U8)pMac->lim.gLimDot11Mode));
-
-
-
-
-
   p += log_sprintf( pMac,p, "\n");
 
   if (pMac->lim.gLimSystemRole == eLIM_AP_ROLE)
@@ -349,16 +344,13 @@
             p += log_sprintf( pMac,p, "\n");
         }
     }
-
-
 #endif
     p += log_sprintf( pMac, p, "HT operating Mode = %d, llbCoexist = %d, llgCoexist = %d, ht20Coexist = %d, nonGfPresent = %d, RifsMode = %d, lsigTxop = %d\n",
                       pMac->lim.gHTOperMode, pMac->lim.llbCoexist, pMac->lim.llgCoexist,
                       pMac->lim.ht20MhzCoexist, pMac->lim.gHTNonGFDevicesPresent,
                       pMac->lim.gHTRifsMode, pMac->lim.gHTLSigTXOPFullSupport);
-
     p += log_sprintf(pMac, p, "2nd Channel offset = %d\n",
-                  pMac->lim.gHTSecondaryChannelOffset);
+                  psessionEntry->hHTSecondaryChannelOffset);
 #endif
     return p;
 }
@@ -378,7 +370,7 @@
     tSirMsgQ mesg = { (tANI_U16) SIR_LIM_BEACON_GEN_IND, (tANI_U16) 0, (tANI_U32) 0 };
     
     pMac->lim.gLimSmeState = eLIM_SME_NORMAL_STATE;
-    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, NO_SESSION, pMac->lim.gLimSmeState));
     pMac->lim.gLimSystemRole = eLIM_AP_ROLE;
     
     p += log_sprintf( pMac, p,
@@ -546,7 +538,7 @@
     tSirMsgQ  msg;
     tSirSmeStartBssReq  *pStartBssReq;
     unsigned char *pBuf;
-    tAniCBSecondaryMode  cbMode;
+    ePhyChanBondState  cbMode;
     tSirNwType  nwType;
 
     p += log_sprintf( pMac,p, "sendSmeStartBssReq: Preparing eWNI_SME_START_BSS_REQ message\n");
@@ -592,9 +584,9 @@
     pBuf++;
 
     // Filling in CB mode
-    cbMode = eANI_CB_SECONDARY_NONE;
-    palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&cbMode, sizeof(tAniCBSecondaryMode) );
-    pBuf += sizeof(tAniCBSecondaryMode);
+    cbMode = PHY_SINGLE_CHANNEL_CENTERED;
+    palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&cbMode, sizeof(ePhyChanBondState) );
+    pBuf += sizeof(ePhyChanBondState);
 
     // Filling in RSN IE Length to zero
     palZeroMemory( pMac->hHdd, pBuf, sizeof(tANI_U16) );    //tSirRSNie->length
@@ -766,7 +758,7 @@
             p += log_sprintf( pMac,p, "bssType: (%d) %s \n", psessionEntry->bssType, limBssTypeStr(psessionEntry->bssType));
             p += log_sprintf( pMac,p, "operMode: %d \n", psessionEntry->operMode);
             p += log_sprintf( pMac,p, "dot11mode: %d \n", psessionEntry->dot11mode);
-            p += log_sprintf( pMac,p, "htCapabality: %d \n", psessionEntry->htCapabality);
+            p += log_sprintf( pMac,p, "htCapability: %d \n", psessionEntry->htCapability);
             p += log_sprintf( pMac,p, "limRFBand: %d \n", psessionEntry->limRFBand);
             p += log_sprintf( pMac,p, "limIbssActive: %d \n", psessionEntry->limIbssActive);
             p += log_sprintf( pMac,p, "limCurrentAuthType: %d \n", psessionEntry->limCurrentAuthType);
@@ -782,7 +774,6 @@
             p += log_sprintf( pMac,p, "limReassocBssCaps: %d \n", psessionEntry->limReassocBssCaps);
             p += log_sprintf( pMac,p, "limReassocBssQosCaps: %d \n", psessionEntry->limReassocBssQosCaps);
             p += log_sprintf( pMac,p, "limReassocBssPropCap: %d \n", psessionEntry->limReassocBssPropCap);
-            p += log_sprintf( pMac,p, "limReassocTitanHtCaps: %d \n", psessionEntry->limReassocTitanHtCaps);
             p += log_sprintf( pMac,p, "********************************************\n");
         }
     }
@@ -1499,30 +1490,37 @@
 static char* dump_lim_update_cb_Mode(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
 {
     tANI_U32 localPwrConstraint;
-    tpPESession psessionEntry = &pMac->lim.gpSession[0];  //TBD-RAJESH HOW TO GET sessionEntry?????
-    
-    if ( !pMac->lim.htCapability )
+    tpPESession psessionEntry = peFindSessionBySessionId(pMac, arg1);
+
+    if (psessionEntry == NULL)
+    {
+      p += log_sprintf( pMac, p, "Invalid sessionId: %d \n ", arg1);
+      return p;
+    }
+
+    if ( !psessionEntry->htCapability )
     {
         p += log_sprintf( pMac,p, "Error: Dot11 mode is non-HT, can not change the CB mode.\n");
         return p;
     }
-    
-    pMac->lim.gHTSecondaryChannelOffset = arg1;
-    setupCBState(pMac,  limGetAniCBState(pMac->lim.gHTSecondaryChannelOffset));
+
+    psessionEntry->htSupportedChannelWidthSet = arg2?1:0;
+    psessionEntry->htRecommendedTxWidthSet = psessionEntry->htSupportedChannelWidthSet;
+    psessionEntry->htSecondaryChannelOffset = arg2;
 
     if(eSIR_SUCCESS != cfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE,  
-                                    arg1 ? WNI_CFG_CHANNEL_BONDING_MODE_ENABLE : WNI_CFG_CHANNEL_BONDING_MODE_DISABLE))
+                                    arg2 ? WNI_CFG_CHANNEL_BONDING_MODE_ENABLE : WNI_CFG_CHANNEL_BONDING_MODE_DISABLE))
         p += log_sprintf(pMac,p, "cfgSetInt failed for WNI_CFG_CHANNEL_BONDING_MODE\n");
-    
+
     wlan_cfgGetInt(pMac, WNI_CFG_LOCAL_POWER_CONSTRAINT, &localPwrConstraint);
-        
-    limSendSwitchChnlParams(pMac, psessionEntry->currentOperChannel, pMac->lim.gHTSecondaryChannelOffset,
+
+    limSendSwitchChnlParams(pMac, psessionEntry->currentOperChannel, psessionEntry->htSecondaryChannelOffset,
                                                                   (tPowerdBm) localPwrConstraint, psessionEntry->peSessionId);
     if ( (limGetSystemRole(psessionEntry) == eLIM_AP_ROLE) ||
           (limGetSystemRole(psessionEntry) == eLIM_STA_IN_IBSS_ROLE))
            schSetFixedBeaconFields(pMac,psessionEntry);
     return p;
-    
+
 }
 
 static char* dump_lim_abort_scan(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
@@ -1712,6 +1710,7 @@
 static char *
 dump_lim_dot11h_stats( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
 {
+#if 0
     unsigned int i;
     (void) arg1; (void) arg2; (void) arg3; (void) arg4;
 
@@ -1780,6 +1779,7 @@
     }
     p += log_sprintf(pMac, p, "\n");
     
+#endif
     return p;
 }
 
@@ -1806,7 +1806,7 @@
 dump_lim_enable_quietIE( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
 {
     (void) arg2; (void) arg3; (void) arg4;
-
+#if 0
     if (arg1)
     {
         pMac->lim.gLimSpecMgmt.fQuietEnabled = eANI_BOOLEAN_TRUE;
@@ -1817,6 +1817,7 @@
         pMac->lim.gLimSpecMgmt.fQuietEnabled = eANI_BOOLEAN_FALSE;
         p += log_sprintf(pMac, p, "QuietIE disabled\n");
     }
+#endif
 
     return p;
 }
@@ -1858,8 +1859,8 @@
 static char *
 dump_lim_info( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
 {
-    (void) arg1; (void) arg2; (void) arg3; (void) arg4;
-    p = dumpLim( pMac, p );
+    (void) arg2; (void) arg3; (void) arg4;
+    p = dumpLim( pMac, p, arg1);
     return p;
 }
 
@@ -2305,10 +2306,61 @@
     return p;    
 }
 #endif
+static char *
+dump_lim_channel_switch_announcement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
+{
+    tpPESession psessionEntry;
+    tANI_U8 nMode = arg2;
+    tANI_U8 nNewChannel = arg3;
+    tANI_U8 nCount = arg4;
+  tANI_U8 peer[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
 
+    if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL)
+    {
+        p += log_sprintf( pMac,
+            p,"Session does not exist usage: 363 <0> sessionid channel \n");
+        printk("Session Not found!!!!\n");
+        return p;
+    }
+
+    limSendChannelSwitchMgmtFrame( pMac, peer, nMode, nNewChannel, nCount, psessionEntry );
+
+    psessionEntry->gLimChannelSwitch.switchCount = nCount;
+    psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_RUNNING;
+    psessionEntry->gLimChannelSwitch.switchMode = nMode;
+    psessionEntry->gLimChannelSwitch.primaryChannel = nNewChannel;
+
+    schSetFixedBeaconFields(pMac, psessionEntry);
+    limSendBeaconInd(pMac, psessionEntry); 
+
+  return p;
+}
+
+static char *
+dump_lim_cancel_channel_switch_announcement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
+{
+    tpPESession psessionEntry;
+
+    if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL)
+    {
+        p += log_sprintf( pMac,
+            p,"Session does not exist usage: 363 <0> sessionid channel \n");
+        printk("Session Not found!!!!\n");
+        return p;
+    }
+    psessionEntry->gLimChannelSwitch.switchCount = 0;
+    psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_INIT;
+    psessionEntry->gLimChannelSwitch.switchMode = 0;
+    psessionEntry->gLimChannelSwitch.primaryChannel = 0;
+
+    schSetFixedBeaconFields(pMac, psessionEntry);
+    limSendBeaconInd(pMac, psessionEntry); 
+
+  return p;
+}
 static tDumpFuncEntry limMenuDumpTable[] = {
     {0,     "PE (300-499)",                                          NULL},
-    {300,   "LIM: Dump state(s)/statistics",                         dump_lim_info},
+    {300,   "LIM: Dump state(s)/statistics <session id>",            dump_lim_info},
     {301,   "PE.LIM: dump TSPEC Table",                              dump_lim_tspec_table},
     {302,   "PE.LIM: dump specified TSPEC entry (id)",               dump_lim_tspec_entry},
     {303,   "PE.LIM: dump EDCA params",                              dump_lim_edca_params},
@@ -2347,7 +2399,7 @@
     {346,   "PE:LIM: Set the Dot11 Mode",                            dump_lim_set_dot11_mode},
     {347,   "PE:Enable or Disable Protection",                       dump_lim_set_protection_control},
     {348,   "PE:LIM: Send SM Power Mode Action frame",               dump_lim_send_SM_Power_Mode},
-    {349,   "PE: LIM: Change CB Mode",                               dump_lim_update_cb_Mode},
+    {349,   "PE: LIM: Change CB Mode <session id> <sec chnl offset>",dump_lim_update_cb_Mode},
     {350,   "PE: LIM: abort scan",                                   dump_lim_abort_scan},
     {351,   "PE: LIM: Start stop BG scan",                           dump_lim_start_stop_bg_scan},
     {352,   "PE: LIM: PE statistics <scanmask>",                     dump_lim_get_pe_statistics},
@@ -2370,6 +2422,8 @@
 #ifdef WLAN_FEATURE_VOWIFI_11R
     {363,   "PE.LIM: trigger pre auth/reassoc event",                dump_lim_ft_event},
 #endif
+    {364,   "PE.LIM: Send a channel switch announcement",            dump_lim_channel_switch_announcement},
+    {365,   "PE.LIM: Cancel channel switch announcement",            dump_lim_cancel_channel_switch_announcement},
 
 };
 
diff --git a/CORE/MAC/src/pe/lim/limP2P.c b/CORE/MAC/src/pe/lim/limP2P.c
index 6f4d465..1b99e87 100644
--- a/CORE/MAC/src/pe/lim/limP2P.c
+++ b/CORE/MAC/src/pe/lim/limP2P.c
@@ -60,6 +60,8 @@
 #define   BSSID_OFFSET           16
 #define   ADDR2_OFFSET           10
 #define   ACTION_OFFSET          24
+#define   LIM_MIN_REM_TIME_FOR_TX_ACTION_FRAME                     30
+#define   LIM_MIN_REM_TIME_EXT_FOR_TX_ACTION_FRAME                 40
 
 
 
@@ -76,7 +78,7 @@
                          tpSetLinkStateCallback callback, void *callbackArg);
 
 static tSirRetStatus limCreateSessionForRemainOnChn(tpAniSirGlobal pMac, tPESession **ppP2pSession);
-
+eHalStatus limP2PActionCnf(tpAniSirGlobal pMac, tANI_U32 txCompleteSuccess);
 /*------------------------------------------------------------------
  *
  * Below function is callback function, it is called when 
@@ -129,6 +131,8 @@
                 tANI_U32 val;
                 tSirMacAddr nullBssid = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
+                pMac->lim.p2pRemOnChanTimeStamp = vos_timer_get_system_time();
+                pMac->lim.gTotalScanDuration = MsgBuff->duration;
 
                 /* get the duration from the request */
                 val = SYS_MS_TO_TICKS(MsgBuff->duration);
@@ -315,6 +319,8 @@
     // Start timer here to come back to operating channel.
     pMac->lim.limTimers.gLimRemainOnChannelTimer.sessionId =
                                                 psessionEntry->peSessionId;
+    pMac->lim.p2pRemOnChanTimeStamp = vos_timer_get_system_time();
+    pMac->lim.gTotalScanDuration = MsgRemainonChannel->duration;
 
       /* get the duration from the request */
     val = SYS_MS_TO_TICKS(MsgRemainonChannel->duration);
@@ -367,6 +373,15 @@
     tpPESession psessionEntry;
     tSirMacAddr             nullBssid = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
+    //Timer might get extended while Sending Action Frame
+    //In that case don't process Channel Timeout
+    if (tx_timer_running(&pMac->lim.limTimers.gLimRemainOnChannelTimer))
+    {
+        limLog( pMac, LOGE, 
+                "still timer is running already and not processing limProcessRemainOnChnTimeout");
+        return;
+    }
+
     limDeactivateAndChangeTimer(pMac, eLIM_REMAIN_CHN_TIMER);
 
     if (NULL == pMac->lim.gpLimRemainOnChanReq)
@@ -480,6 +495,7 @@
            peDeleteSession( pMac, psessionEntry);
         }
     }
+
     /* Post the meessage to Sme */
     limSendSmeRsp(pMac, eWNI_SME_REMAIN_ON_CHN_RSP, status, 
                   MsgRemainonChannel->sessionId, 0);
@@ -488,6 +504,14 @@
     pMac->lim.gpLimRemainOnChanReq = NULL;
 
     pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState;
+
+    /* If remain on channel timer expired and action frame is pending then 
+     * indicaiton confirmation with status failure */
+    if (pMac->lim.actionFrameSessionId != 0xff)
+    {
+       limP2PActionCnf(pMac, 0);
+    }
+
     return;
 }
 
@@ -500,7 +524,7 @@
 void limSendSmeMgmtFrameInd(
                     tpAniSirGlobal pMac, tANI_U8 frameType,
                     tANI_U8  *frame, tANI_U32 frameLen, tANI_U16 sessionId,
-                    tANI_U32 rxChannel)
+                    tANI_U32 rxChannel, tpPESession psessionEntry)
 {
     tSirMsgQ              mmhMsg;
     tpSirSmeMgmtFrameInd pSirSmeMgmtFrame = NULL;
@@ -521,7 +545,21 @@
     pSirSmeMgmtFrame->mesgLen = length;
     pSirSmeMgmtFrame->sessionId = sessionId;
     pSirSmeMgmtFrame->frameType = frameType;
-    pSirSmeMgmtFrame->rxChan = rxChannel;
+
+    /* work around for 5Ghz channel is not correct since rxhannel 
+     * is 4 bits. So we don't indicate more than 16 channels 
+     */
+    if( (VOS_FALSE == 
+        tx_timer_running(&pMac->lim.limTimers.gLimRemainOnChannelTimer)) &&
+        (psessionEntry != NULL) && 
+        (SIR_BAND_5_GHZ == limGetRFBand(psessionEntry->currentOperChannel)) ) 
+    {
+        pSirSmeMgmtFrame->rxChan = psessionEntry->currentOperChannel;
+    }
+    else
+    {
+        pSirSmeMgmtFrame->rxChan = rxChannel;
+    }
 
     vos_mem_zero(pSirSmeMgmtFrame->frameBuf,frameLen);
     vos_mem_copy(pSirSmeMgmtFrame->frameBuf,frame,frameLen);
@@ -529,6 +567,41 @@
     mmhMsg.type = eWNI_SME_MGMT_FRM_IND;
     mmhMsg.bodyptr = pSirSmeMgmtFrame;
     mmhMsg.bodyval = 0;
+
+    if(VOS_TRUE == tx_timer_running(&pMac->lim.limTimers.gLimRemainOnChannelTimer) && 
+            ( (psessionEntry != NULL) && (psessionEntry->pePersona != VOS_P2P_GO_MODE)) &&
+            (frameType == SIR_MAC_MGMT_ACTION))
+    {
+        tANI_U32 curTime = vos_timer_get_system_time();
+        if((curTime - pMac->lim.p2pRemOnChanTimeStamp) > (pMac->lim.gTotalScanDuration - LIM_MIN_REM_TIME_FOR_TX_ACTION_FRAME))
+        {
+            unsigned int chanWaitTime, vStatus ;
+
+            limLog( pMac, LOG1, FL("Rx: Extend the gLimRemainOnChannelTimer"));
+
+            pMac->lim.p2pRemOnChanTimeStamp = vos_timer_get_system_time();
+            pMac->lim.gTotalScanDuration = LIM_MIN_REM_TIME_EXT_FOR_TX_ACTION_FRAME;
+
+            chanWaitTime = SYS_MS_TO_TICKS(40);
+            vStatus = tx_timer_deactivate(&pMac->lim.limTimers.gLimRemainOnChannelTimer);
+
+            if (VOS_STATUS_SUCCESS != vStatus)
+            {     
+                limLog( pMac, LOGE, FL("Rx: Extend the gLimRemainOnChannelTimer"));
+            } 
+
+            if (tx_timer_change(&pMac->lim.limTimers.gLimRemainOnChannelTimer, chanWaitTime, 0) != TX_SUCCESS)
+            {
+                limLog( pMac, LOGE, FL("Unable to change the gLimRemainOnChannelTimer"));
+            }
+
+            if (tx_timer_activate(&pMac->lim.limTimers.gLimRemainOnChannelTimer) != 0)
+            {
+                limLog( pMac, LOGE, FL("Unable to active the gLimRemainOnChannelTimer"));
+            } 
+        } 
+    }
+
     limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
     return;
 } /*** end limSendSmeListenRsp() ***/
@@ -536,20 +609,26 @@
 
 eHalStatus limP2PActionCnf(tpAniSirGlobal pMac, tANI_U32 txCompleteSuccess)
 {
-    limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF,
-            (txCompleteSuccess ? eSIR_SME_SUCCESS : eSIR_SME_SEND_ACTION_FAIL),
-             pMac->lim.actionFrameSessionId, 0);
+    if (pMac->lim.actionFrameSessionId != 0xff)
+    {
+        /* The session entry might be invalid(0xff) action confirmation received after
+         * remain on channel timer expired */
+        limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF,
+                (txCompleteSuccess ? eSIR_SME_SUCCESS : eSIR_SME_SEND_ACTION_FAIL),
+                pMac->lim.actionFrameSessionId, 0);
+        pMac->lim.actionFrameSessionId = 0xff;
+    }
 
     return eHAL_STATUS_SUCCESS;
 }
 
 
-void limSetHtCaps(tpAniSirGlobal pMac,tANI_U8 *pIeStartPtr,tANI_U32 nBytes)
+void limSetHtCaps(tpAniSirGlobal pMac, tpPESession psessionEntry, tANI_U8 *pIeStartPtr,tANI_U32 nBytes)
 {
     v_U8_t              *pIe=NULL;
     tDot11fIEHTCaps     dot11HtCap;
 
-    PopulateDot11fHTCaps(pMac,&dot11HtCap);
+    PopulateDot11fHTCaps(pMac, psessionEntry, &dot11HtCap);
     pIe = limGetIEPtr(pMac,pIeStartPtr, nBytes,
                                        DOT11F_EID_HTCAPS,ONE_BYTE);
    limLog( pMac, LOGE, FL("pIe 0x%x dot11HtCap.supportedMCSSet[0]=0x%x"),
@@ -772,9 +851,53 @@
 
         if (SIR_MAC_MGMT_PROBE_RSP == pFc->subType)
         {
-            limSetHtCaps( pMac,(tANI_U8*)pMbMsg->data + PROBE_RSP_IE_OFFSET,
+            limSetHtCaps( pMac, psessionEntry, (tANI_U8*)pMbMsg->data + PROBE_RSP_IE_OFFSET,
                            nBytes);
         }
+        
+        /* The minimum wait for any action frame should be atleast 100 ms.
+         * If supplicant sends action frame at the end of already running remain on channel time
+         * Then there is a chance to miss the response of the frame. So increase the remain on channel
+         * time for all action frame to make sure that we receive the response frame */
+        if ((SIR_MAC_MGMT_ACTION == pFc->subType) &&
+                (0 != pMbMsg->wait))
+        {
+            if (tx_timer_running(&pMac->lim.limTimers.gLimRemainOnChannelTimer))
+            {
+                tANI_U32 val = 0;
+                tx_timer_deactivate(&pMac->lim.limTimers.gLimRemainOnChannelTimer);
+                /* get the duration from the request */
+                pMac->lim.p2pRemOnChanTimeStamp = vos_timer_get_system_time();
+                pMac->lim.gTotalScanDuration = pMbMsg->wait;
+
+                val = SYS_MS_TO_TICKS(pMbMsg->wait);
+
+                limLog(pMac, LOG1,
+                        FL("Tx: Extending the gLimRemainOnChannelTimer\n"));
+                if (tx_timer_change(
+                            &pMac->lim.limTimers.gLimRemainOnChannelTimer, val, 0)
+                        != TX_SUCCESS)
+                {
+                    limLog(pMac, LOGP,
+                            FL("Unable to change remain on channel Timer val\n"));
+                    return;
+                }
+                else if(TX_SUCCESS != tx_timer_activate(
+                            &pMac->lim.limTimers.gLimRemainOnChannelTimer))
+                {
+                    limLog(pMac, LOGP,
+                            FL("Unable to activate remain on channel Timer\n"));
+                    limDeactivateAndChangeTimer(pMac, eLIM_REMAIN_CHN_TIMER);
+                    return;
+                }
+            }
+            else
+            {
+                limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF, 
+                        eHAL_STATUS_FAILURE, pMbMsg->sessionId, 0);
+                return;
+            }
+        }
     }
 
 
@@ -812,15 +935,21 @@
      */
     txFlag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME;
 
-    if (SIR_MAC_MGMT_PROBE_RSP == pFc->subType)
+    if ( (SIR_MAC_MGMT_PROBE_RSP == pFc->subType) ||
+         (pMbMsg->noack)
+        )
     {
         halstatus = halTxFrame( pMac, pPacket, (tANI_U16)nBytes,
                         HAL_TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS,
                         7,/*SMAC_SWBD_TX_TID_MGMT_HIGH */ limTxComplete, pFrame,
                         txFlag );
 
-        limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF, 
+        if (!pMbMsg->noack)
+        {
+           limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF, 
                halstatus, pMbMsg->sessionId, 0);
+        }
+        pMac->lim.actionFrameSessionId = 0xff;
     }
     else
     {
@@ -834,10 +963,14 @@
              limLog( pMac, LOGE, FL("could not send action frame!\n" ));
              limSendSmeRsp(pMac, eWNI_SME_ACTION_FRAME_SEND_CNF, halstatus, 
                 pMbMsg->sessionId, 0);
+             pMac->lim.actionFrameSessionId = 0xff;
         }
         else
         {
              pMac->lim.actionFrameSessionId = pMbMsg->sessionId;
+             limLog( pMac, LOGE, FL("lim.actionFrameSessionId = %lu\n" ), 
+                     pMac->lim.actionFrameSessionId);
+
         }
     }
 
diff --git a/CORE/MAC/src/pe/lim/limProcessActionFrame.c b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
index 4c89a87..016cc10 100644
--- a/CORE/MAC/src/pe/lim/limProcessActionFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
@@ -57,6 +57,7 @@
 #if defined WLAN_FEATURE_VOWIFI
 #include "rrmApi.h"
 #endif
+#include "limSessionUtils.h"
 
 #if defined FEATURE_WLAN_CCX
 #include "ccxApi.h"
@@ -88,12 +89,21 @@
 void limStopTxAndSwitchChannel(tpAniSirGlobal pMac, tANI_U8 sessionId)
 {
     tANI_U8 isFullPowerRequested = 0;
+    tpPESession psessionEntry;
+
+    psessionEntry = peFindSessionBySessionId( pMac , sessionId );
+
+    if( NULL == psessionEntry )
+    {
+      limLog(pMac, LOGE, FL("Session %d  not active\n "), sessionId);
+      return;
+    }
 
     PELOG1(limLog(pMac, LOG1, FL("Channel switch Mode == %d\n"), 
-                       pMac->lim.gLimChannelSwitch.switchMode);)
+                       psessionEntry->gLimChannelSwitch.switchMode);)
 
-    if (pMac->lim.gLimChannelSwitch.switchMode == eSIR_CHANSW_MODE_SILENT ||
-        pMac->lim.gLimChannelSwitch.switchCount <= SIR_CHANSW_TX_STOP_MAX_COUNT)
+    if (psessionEntry->gLimChannelSwitch.switchMode == eSIR_CHANSW_MODE_SILENT ||
+        psessionEntry->gLimChannelSwitch.switchCount <= SIR_CHANSW_TX_STOP_MAX_COUNT)
     {
         /* Freeze the transmission */
         limFrameTransmissionControl(pMac, eLIM_TX_ALL, eLIM_STOP_TX);
@@ -112,11 +122,12 @@
         limFrameTransmissionControl(pMac, eLIM_TX_ALL, eLIM_RESUME_TX);
     }
 
+    pMac->lim.limTimers.gLimChannelSwitchTimer.sessionId = sessionId;
     /* change the channel immediatly only if the channel switch count is 0 and the 
      * device is not in powersave 
      * If the device is in powersave channel switch should happen only after the
      * device comes out of the powersave */
-    if (pMac->lim.gLimChannelSwitch.switchCount == 0) 
+    if (psessionEntry->gLimChannelSwitch.switchCount == 0) 
     {
         if(limIsSystemInActiveState(pMac))
         {
@@ -131,10 +142,8 @@
         }
         return;
     }
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_CHANNEL_SWITCH_TIMER));
 
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_CHANNEL_SWITCH_TIMER));
-
-    pMac->lim.limTimers.gLimChannelSwitchTimer.sessionId = sessionId;
 
     if (tx_timer_activate(&pMac->lim.limTimers.gLimChannelSwitchTimer) != TX_SUCCESS)
     {
@@ -156,31 +165,54 @@
 tSirRetStatus limStartChannelSwitch(tpAniSirGlobal pMac, tpPESession psessionEntry)
 {
     PELOG1(limLog(pMac, LOG1, FL("Starting the channel switch\n"));)
+    
+    /*If channel switch is already running and it is on a different session, just return*/  
+    /*This need to be removed for MCC */
+    if( limIsChanSwitchRunning (pMac) &&
+        psessionEntry->gLimSpecMgmt.dot11hChanSwState != eLIM_11H_CHANSW_RUNNING )
+    {
+       limLog(pMac, LOGW, FL("Ignoring channel switch on session %d\n"), psessionEntry->peSessionId);
+       return eSIR_SUCCESS;
+    }
+     
     /* Deactivate and change reconfigure the timeout value */
-    limDeactivateAndChangeTimer(pMac, eLIM_CHANNEL_SWITCH_TIMER);
+    //limDeactivateAndChangeTimer(pMac, eLIM_CHANNEL_SWITCH_TIMER);
+    if (tx_timer_deactivate(&pMac->lim.limTimers.gLimChannelSwitchTimer) != eSIR_SUCCESS)
+    {
+        limLog(pMac, LOGP, FL("tx_timer_deactivate failed!\n"));
+        return eSIR_FAILURE;
+    }
+
+    if (tx_timer_change(&pMac->lim.limTimers.gLimChannelSwitchTimer,
+                psessionEntry->gLimChannelSwitch.switchTimeoutValue,
+                            0) != TX_SUCCESS)
+    {
+        limLog(pMac, LOGP, FL("tx_timer_change failed \n"));
+        return eSIR_FAILURE;
+    }
 
     /* Follow the channel switch, forget about the previous quiet. */
     //If quiet is running, chance is there to resume tx on its timeout.
     //so stop timer for a safer side.
-    if (pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_BEGIN)
+    if (psessionEntry->gLimSpecMgmt.quietState == eLIM_QUIET_BEGIN)
     {
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_QUIET_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, psessionEntry->peSessionId, eLIM_QUIET_TIMER));
         if (tx_timer_deactivate(&pMac->lim.limTimers.gLimQuietTimer) != TX_SUCCESS)
         {
             limLog(pMac, LOGP, FL("tx_timer_deactivate failed\n"));
             return eSIR_FAILURE;
         }
     }
-    else if (pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING)
+    else if (psessionEntry->gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING)
     {
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_QUIET_BSS_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, psessionEntry->peSessionId, eLIM_QUIET_BSS_TIMER));
         if (tx_timer_deactivate(&pMac->lim.limTimers.gLimQuietBssTimer) != TX_SUCCESS)
         {
             limLog(pMac, LOGP, FL("tx_timer_deactivate failed\n"));
             return eSIR_FAILURE;
         }
     }
-    pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
+    psessionEntry->gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
 
     /* Prepare for 11h channel switch */
     limPrepareFor11hChannelSwitch(pMac, psessionEntry);
@@ -276,37 +308,26 @@
 
         beaconPeriod = (tANI_U16) val;
 
-        pMac->lim.gLimChannelSwitch.primaryChannel = pChannelSwitchFrame->ChanSwitchAnn.newChannel;
-        pMac->lim.gLimChannelSwitch.switchCount = pChannelSwitchFrame->ChanSwitchAnn.switchCount;
-        pMac->lim.gLimChannelSwitch.switchTimeoutValue = SYS_MS_TO_TICKS(beaconPeriod) *
-                                                         pMac->lim.gLimChannelSwitch.switchCount;
-        pMac->lim.gLimChannelSwitch.switchMode = pChannelSwitchFrame->ChanSwitchAnn.switchMode;
+        psessionEntry->gLimChannelSwitch.primaryChannel = pChannelSwitchFrame->ChanSwitchAnn.newChannel;
+        psessionEntry->gLimChannelSwitch.switchCount = pChannelSwitchFrame->ChanSwitchAnn.switchCount;
+        psessionEntry->gLimChannelSwitch.switchTimeoutValue = SYS_MS_TO_TICKS(beaconPeriod) *
+                                                         psessionEntry->gLimChannelSwitch.switchCount;
+        psessionEntry->gLimChannelSwitch.switchMode = pChannelSwitchFrame->ChanSwitchAnn.switchMode;
 
        PELOG3(limLog(pMac, LOG3, FL("Rcv Chnl Swtch Frame: Timeout in %d ticks\n"),
-                             pMac->lim.gLimChannelSwitch.switchTimeoutValue);)
+                             psessionEntry->gLimChannelSwitch.switchTimeoutValue);)
 
         /* Only primary channel switch element is present */
-        pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_ONLY;
-        pMac->lim.gLimChannelSwitch.secondarySubBand = eANI_CB_SECONDARY_NONE;
+        psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_ONLY;
+        psessionEntry->gLimChannelSwitch.secondarySubBand = PHY_SINGLE_CHANNEL_CENTERED;
 
-        if(GET_CB_ADMIN_STATE(pMac->lim.gCbState))
+        if (psessionEntry->htSupportedChannelWidthSet)
         {
-            switch(pChannelSwitchFrame->ExtChanSwitchAnn.secondaryChannelOffset)
+            if ((pChannelSwitchFrame->ExtChanSwitchAnn.secondaryChannelOffset == PHY_DOUBLE_CHANNEL_LOW_PRIMARY) ||
+                (pChannelSwitchFrame->ExtChanSwitchAnn.secondaryChannelOffset == PHY_DOUBLE_CHANNEL_HIGH_PRIMARY))
             {
-                case eHT_SECONDARY_CHANNEL_OFFSET_UP:
-                    pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
-                    pMac->lim.gLimChannelSwitch.secondarySubBand = eANI_CB_SECONDARY_UP;
-                    break;
-
-                case eHT_SECONDARY_CHANNEL_OFFSET_DOWN:
-                    pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
-                    pMac->lim.gLimChannelSwitch.secondarySubBand = eANI_CB_SECONDARY_DOWN;
-                    break;
-
-                case eHT_SECONDARY_CHANNEL_OFFSET_NONE:
-                default:
-                    /* Nothing to be done here */
-                    break;
+                psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
+                psessionEntry->gLimChannelSwitch.secondarySubBand = pChannelSwitchFrame->ExtChanSwitchAnn.secondaryChannelOffset;
             }
         }
 
@@ -779,7 +800,7 @@
     else
     {
       //send message to HAL to delete TS
-      if(eSIR_SUCCESS != limSendHalMsgDelTs(pMac, pSta->staIndex, tspecIdx, delts))
+      if(eSIR_SUCCESS != limSendHalMsgDelTs(pMac, pSta->staIndex, tspecIdx, delts, psessionEntry->peSessionId))
       {
         limLog(pMac, LOGW, FL("DelTs with UP %d failed in limSendHalMsgDelTs - ignoring request\n"),
                          tsinfo->traffic.userPrio);
@@ -1987,7 +2008,7 @@
                  // type is ACTION
                  limSendSmeMgmtFrameInd(pMac, pHdr->fc.subType, 
                     (tANI_U8*)pHdr, frameLen + sizeof(tSirMacMgmtHdr), 0, 
-                    WDA_GET_RX_CH( pRxPacketInfo ));
+                    WDA_GET_RX_CH( pRxPacketInfo ), psessionEntry);
               }
               else
               {
@@ -2068,7 +2089,7 @@
                   // type is ACTION
                   limSendSmeMgmtFrameInd(pMac, pHdr->fc.subType, 
                       (tANI_U8*)pHdr, frameLen + sizeof(tSirMacMgmtHdr), 0,
-                      WDA_GET_RX_CH( pBd ));
+                      WDA_GET_RX_CH( pBd ), NULL);
                 }
                 else
                 {
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)
         {
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
index b76995a..77cf321 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
@@ -128,6 +128,8 @@
                    pStaDs->htMaxRxAMpduFactor = pAssocRsp->HTCaps.maxRxAMPDUFactor;
                    limFillRxHighestSupportedRate(pMac, &rxHighestRate, pAssocRsp->HTCaps.supportedMCSSet);
                    pStaDs->supportedRates.rxHighestDataRate = rxHighestRate;
+                   /* This is for AP as peer STA and we are INFRA STA. We will put APs offset in dph node which is peer STA */
+                   pStaDs->htSecondaryChannelOffset = (tANI_U8)pAssocRsp->HTInfo.secondaryChannelOffset;
 
                    //FIXME_AMPDU
                    // In the future, may need to check for "assoc.HTCaps.delayedBA"
@@ -135,8 +137,19 @@
                    pStaDs->baPolicyFlag = 0xFF;
            }
        }
-    
-       if (limPopulateOwnRateSet(pMac, &pStaDs->supportedRates, pAssocRsp->HTCaps.supportedMCSSet, false,psessionEntry) != eSIR_SUCCESS) {
+
+#ifdef WLAN_FEATURE_11AC
+       if(IS_DOT11_MODE_VHT(psessionEntry->dot11mode))
+       {
+           pStaDs->mlmStaContext.vhtCapability = pAssocRsp->VHTCaps.present;
+       }
+       if (limPopulateOwnRateSet(pMac, &pStaDs->supportedRates, 
+                                pAssocRsp->HTCaps.supportedMCSSet,
+                                false,psessionEntry , &pAssocRsp->VHTCaps) != eSIR_SUCCESS) 
+#else
+       if (limPopulateOwnRateSet(pMac, &pStaDs->supportedRates, pAssocRsp->HTCaps.supportedMCSSet, false,psessionEntry) != eSIR_SUCCESS) 
+#endif
+       {
            limLog(pMac, LOGP, FL("could not get rateset and extended rate set\n"));
            return;
        }
@@ -231,10 +244,13 @@
     palCopyMemory( pMac->hHdd, psessionEntry->bssId,
                   psessionEntry->limReAssocbssId, sizeof(tSirMacAddr));
     psessionEntry->currentOperChannel = psessionEntry->limReassocChannelId;
+    psessionEntry->htSecondaryChannelOffset = psessionEntry->reAssocHtSupportedChannelWidthSet;
+    psessionEntry->htRecommendedTxWidthSet = psessionEntry->reAssocHtRecommendedTxWidthSet;
+    psessionEntry->htSecondaryChannelOffset = psessionEntry->reAssocHtSecondaryChannelOffset;
     psessionEntry->limCurrentBssCaps   = psessionEntry->limReassocBssCaps;
     psessionEntry->limCurrentBssQosCaps = psessionEntry->limReassocBssQosCaps;
     psessionEntry->limCurrentBssPropCap = psessionEntry->limReassocBssPropCap;
-    psessionEntry->limCurrentTitanHtCaps = psessionEntry->limReassocTitanHtCaps;
+
     palCopyMemory( pMac->hHdd, (tANI_U8 *) &psessionEntry->ssId,
                   (tANI_U8 *) &psessionEntry->limReassocSSID,
                   psessionEntry->limReassocSSID.length+1);
@@ -243,7 +259,7 @@
     psessionEntry->limAID = pAssocRsp->aid & 0x3FFF;
     /** Set the State Back to ReAssoc Rsp*/
     psessionEntry->limMlmState = eLIM_MLM_WT_REASSOC_RSP_STATE; 
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
     
 }
@@ -748,17 +764,15 @@
 #endif
        ) {
         PELOGE(limLog(pMac, LOGE,  FL("Assoc Rejected by the peer. Reason: %d\n"), mlmAssocCnf.resultCode);)
-        pMac->lim.gLimMlmState = eLIM_MLM_IDLE_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
         if (psessionEntry->pLimMlmJoinReq)
         {
             palFreeMemory( pMac->hHdd, psessionEntry->pLimMlmJoinReq);
             psessionEntry->pLimMlmJoinReq = NULL;
         }
-        if(limSetLinkState(pMac, eSIR_LINK_IDLE_STATE,psessionEntry->bssId, 
-             psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS)
-            PELOGE(limLog(pMac, LOGE,  FL("Failed to set the LinkState\n"));)
+
         if (subType == LIM_ASSOC)
         {
            limPostSmeMessage(pMac, LIM_MLM_ASSOC_CNF, (tANI_U32 *) &mlmAssocCnf);
diff --git a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
index 08fd818..5049af5 100644
--- a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
@@ -192,7 +192,7 @@
 
     pBody = WDA_GET_RX_MPDU_DATA(pRxPacketInfo);
 
-    PELOG3(sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG3, (tANI_U8*)pBd, ((tpHalBufDesc) pBd)->mpduDataOffset + frameLen);)
+    //PELOG3(sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG3, (tANI_U8*)pBd, ((tpHalBufDesc) pBd)->mpduDataOffset + frameLen);)
 
 
    
@@ -1162,7 +1162,7 @@
                                                     encrAuthFrame,key_length);
 
                                 psessionEntry->limMlmState = eLIM_MLM_WT_AUTH_FRAME4_STATE;
-                                MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+                                MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
                                 limSendAuthMgmtFrame(pMac,
                                                      (tpSirMacAuthFrameBody) encrAuthFrame,
@@ -1243,7 +1243,7 @@
 
                                 psessionEntry->limMlmState =
                                 eLIM_MLM_WT_AUTH_FRAME4_STATE;
-                                MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+                                MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
                                 limSendAuthMgmtFrame(pMac,
                                                      (tpSirMacAuthFrameBody) encrAuthFrame,
diff --git a/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c b/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c
index e797901..5b2e128 100644
--- a/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c
@@ -119,8 +119,8 @@
         }
 
 
-        MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT_TSF, 0, beacon.timeStamp[0]);)
-        MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT_TSF, 0, beacon.timeStamp[1]);)
+       MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT_TSF, psessionEntry->peSessionId, beacon.timeStamp[0]);)
+       MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT_TSF, psessionEntry->peSessionId, beacon.timeStamp[1]);)
 
 
         if ((pMac->lim.gLimMlmState  == eLIM_MLM_WT_PROBE_RESP_STATE) ||
diff --git a/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c b/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
index 726da44..0e82c0d 100644
--- a/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
+++ b/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
@@ -129,101 +129,6 @@
 
 } /*** end limSetDefaultKeyIdAndKeys() ***/
 
-
-/**
- * handleCBCFGChange()
- *
- *FUNCTION:
- *
- *PARAMS:
- *
- *LOGIC:
- *
- *ASSUMPTIONS:
- * If this API is invoked with
- *   cfgId == ANI_IGNORE_CFG_ID
- * Then,
- *   this routine will traverse thru' ALL the
- *   related CFG's that are statically setup
- * Else,
- *   only update this "1" CFG identified by cfgId
- *
- *NOTE:
- *
- * @param  pMac  - Pointer to Global MAC structure
- * @param  cfgId - ID of CFG parameter that got updated
- * @return None
- */
-void handleCBCFGChange( tpAniSirGlobal pMac, tANI_U32 cfgId )
-{
-tANI_U32 cfg, val, i = 0;
-tANI_U32 defaultCfgList[] = { 
-  WNI_CFG_CHANNEL_BONDING_MODE,
-  ANI_IGNORE_CFG_ID };
-
-  do
-  {
-    //
-    // Determine if we have to use our own default CFG list
-    // OR should we use the argument passed to us
-    //
-    if( ANI_IGNORE_CFG_ID == cfgId )
-      cfg = defaultCfgList[i]; // "n" iterations reqd
-    else
-      cfg = cfgId; // Just "1" iteration reqd
-
-    switch( cfg )
-    {
-      case WNI_CFG_CHANNEL_BONDING_MODE:
-        if( eSIR_SUCCESS != wlan_cfgGetInt( pMac,
-              WNI_CFG_CHANNEL_BONDING_MODE,
-              &val ))
-        {
-          limLog( pMac, LOGW,
-              FL("Unable to retrieve CHANNEL BONDING Mode from CFG. Defaulting to DISABLE\n"));
-          pMac->lim.gCbMode = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
-        }
-        else
-          pMac->lim.gCbMode = (tANI_U8) val;
-
-        // Now, set the CHANNEL BONDING state apropriately
-        switch( pMac->lim.gCbMode )
-        {
-          // Always OFF
-          case WNI_CFG_CHANNEL_BONDING_MODE_DISABLE:
-            SET_CB_STATE_DISABLE( pMac->lim.gCbState );
-            break;
-
-          // Always ON
-          case WNI_CFG_CHANNEL_BONDING_MODE_ENABLE:
-            SET_CB_STATE_ENABLE( pMac->lim.gCbState );
-            break;
-
-          default:
-            SET_CB_STATE_ENABLE( pMac->lim.gCbState );
-            break;
-        }
-        break;
-
-      default:
-          break;
-    }
-
-    // DEBUG LOG the TITAN CFG's
-    limLog( pMac, LOG1,
-        FL("The TITAN related global CFG's are: "
-          "cbMode - %1d cbState - %1d\n"),
-        pMac->lim.gCbMode, pMac->lim.gCbState);
-
-    // If only "1" CFG needs an update, then return
-    if( ANI_IGNORE_CFG_ID == cfgId )
-      i++;
-    else
-      break;
-
-  } while( ANI_IGNORE_CFG_ID != defaultCfgList[i] ); // End-Of-List?
-}
-
 /** -------------------------------------------------------------
 \fn limSetCfgProtection
 \brief sets lim global cfg cache from the config.
@@ -371,10 +276,8 @@
 {
     tANI_U32 val1, val2;
     tANI_U16 val16;
-    tANI_U8 val8;
     tSirMacHTCapabilityInfo   *pHTCapabilityInfo;
     tSirMacHTParametersInfo *pAmpduParamInfo;
-    tSirMacHTInfoField1         *pHTInfoField1;
 
     PELOG3(limLog(pMac, LOG3, FL("Handling CFG parameter id %X update\n"), cfgId);)
     switch (cfgId)
@@ -436,7 +339,7 @@
                    (pMac->lim.gLimSmeState == eLIM_SME_NORMAL_STATE)))
             {
                 // Reactivate Background scan timer
-                MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_BACKGROUND_SCAN_TIMER));
+                MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_BACKGROUND_SCAN_TIMER));
                 if (tx_timer_activate(
                       &pMac->lim.limTimers.gLimBackgroundScanTimer) != TX_SUCCESS)
                 {
@@ -473,7 +376,7 @@
                 pMac->lim.limTimers.gLimPreAuthClnupTimer.sessionId = sessionId;
 #endif
                 // Reactivate pre-auth cleanup timer
-                MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_PRE_AUTH_CLEANUP_TIMER));
+                MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_PRE_AUTH_CLEANUP_TIMER));
                 if (tx_timer_activate(&pMac->lim.limTimers.gLimPreAuthClnupTimer)
                                                        != TX_SUCCESS)
                 {
@@ -499,44 +402,6 @@
 
             break;
 
-    case WNI_CFG_CHANNEL_BONDING_MODE:
-         handleCBCFGChange( pMac, cfgId );
-         //for Secondary channel, change setupCBMode function OR the caller of that function during Join (STA) or Start BSS(AP/IBSS)
-         //Now update the HT Capability CFG based on Channel Bonding CFG
-         if (wlan_cfgGetInt(pMac, WNI_CFG_HT_CAP_INFO, &val1) != eSIR_SUCCESS) 
-            {
-                PELOGE(limLog(pMac, LOGE, FL("could not retrieve HT Cap CFG\n"));)
-                break;
-            }
-        if (wlan_cfgGetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE, &val2) != eSIR_SUCCESS) 
-            {
-                PELOGE(limLog(pMac, LOGE, FL("could not retrieve Channel Bonding CFG\n"));)
-                break;
-            }
-        val16 = ( tANI_U16 ) val1;
-        pHTCapabilityInfo = ( tSirMacHTCapabilityInfo* ) &val16;
-
-        //channel bonding mode could be set to anything from 0 to 4(Titan had these modes)
-        //But for Taurus we have only two modes: enable(>0) or disable(=0)
-        pHTCapabilityInfo->supportedChannelWidthSet = val2 ? WNI_CFG_CHANNEL_BONDING_MODE_ENABLE : WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
-        if(cfgSetInt(pMac, WNI_CFG_HT_CAP_INFO, *(tANI_U16*)pHTCapabilityInfo) != eSIR_SUCCESS)
-            PELOGE(limLog(pMac, LOGE, FL("could not update HT Cap Info CFG\n"));)
-
-         if (wlan_cfgGetInt(pMac, WNI_CFG_HT_INFO_FIELD1, &val1) != eSIR_SUCCESS) 
-            {
-                PELOGE(limLog(pMac, LOGE, FL("could not retrieve HT INFO Field1 CFG\n"));)
-                break;
-            }
-        val8 = ( tANI_U8 ) val1;
-        pHTInfoField1 = ( tSirMacHTInfoField1* ) &val8;
-        pHTInfoField1->recommendedTxWidthSet = (tANI_U8)pHTCapabilityInfo->supportedChannelWidthSet;
-        pMac->lim.gHTRecommendedTxWidthSet = pHTInfoField1->recommendedTxWidthSet;
-        if(cfgSetInt(pMac, WNI_CFG_HT_INFO_FIELD1, *(tANI_U8*)pHTInfoField1) != eSIR_SUCCESS)
-            PELOGE(limLog(pMac, LOGE, FL("could not update HT Info Field\n"));)
-
-        break;
-
-
     case WNI_CFG_TRIG_STA_BK_SCAN:
         if(limUpdateTriggerStaBkScanFlag(pMac) != eSIR_SUCCESS)
         {
@@ -819,15 +684,14 @@
 
     limUpdateConfig(pMac,psessionEntry);
 
-    if (wlan_cfgGetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, &val)
-            != eSIR_SUCCESS)
+    if (phyMode == WNI_CFG_PHY_MODE_11A)
     {
-        limLog(pMac, LOGP, FL("cfg get WNI_CFG_SHORT_SLOT_TIME failed\n"));
-        return;
+        // 11a mode always uses short slot
+        // Check this since some APs in 11a mode broadcast long slot in their beacons. As per standard, always use what PHY mandates.
+        psessionEntry->shortSlotTimeSupported = true;
     }
-    if (phyMode == WNI_CFG_PHY_MODE_11G)
+    else if (phyMode == WNI_CFG_PHY_MODE_11G)
     {
-
         if ((psessionEntry->pePersona == VOS_STA_SAP_MODE) ||
            (psessionEntry->pePersona == VOS_P2P_GO_MODE))
         {
@@ -842,22 +706,12 @@
         else if (psessionEntry->limMlmState == eLIM_MLM_WT_REASSOC_RSP_STATE)
             // Reassociating with AP.
             val = SIR_MAC_GET_SHORT_SLOT_TIME( psessionEntry->limReassocBssCaps);
-
- 
-        if (cfgSetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, val) != eSIR_SUCCESS)
-        {
-            limLog(pMac, LOGP, FL("could not update short slot time at CFG\n"));
-            return;
-        }
+        psessionEntry->shortSlotTimeSupported = val;
     }
-    else
+    else // if (phyMode == WNI_CFG_PHY_MODE_11B) - use this if another phymode is added later ON
     {
-        // Reset short slot time at CFG
-        if (cfgSetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, 0) != eSIR_SUCCESS)
-        {
-            limLog(pMac, LOGP, FL("could not update short slot time at CFG\n"));
-            return;
-    }
+        // Will reach here in 11b case
+        psessionEntry->shortSlotTimeSupported = false;
     }
     //apply protection related config.
 
diff --git a/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c b/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c
index 1147e90..79cfe66 100644
--- a/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c
@@ -110,7 +110,7 @@
 
     PELOGE(limLog(pMac, LOGE,
         FL("received Deauth frame (mlm state = %s) with reason code %d from "),
-        limMlmStateStr(pMac->lim.gLimMlmState), reasonCode);
+        limMlmStateStr(psessionEntry->limMlmState), reasonCode);
     limPrintMacAddr(pMac, pHdr->sa, LOGE);)
       
     if ( (psessionEntry->limSystemRole == eLIM_AP_ROLE )||(psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE) )
@@ -259,7 +259,7 @@
                         mlmDeauthInd.reasonCode = reasonCode;
 
                         psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
-                        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+                        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
                         
                         limPostSmeMessage(pMac,
@@ -290,7 +290,7 @@
 
                         psessionEntry->limMlmState =
                                    psessionEntry->limPrevMlmState;
-                        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, psessionEntry->limMlmState));
+                        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
                         // Deactive Association response timeout
                         limDeactivateAndChangeTimer(
diff --git a/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c b/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c
index 1e138a9..ff1697a 100644
--- a/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c
@@ -206,7 +206,7 @@
             case eSIR_MAC_DISASSOC_LEAVING_BSS_REASON:
                 // Valid reasonCode in received Disassociation frame
                 // as long as we're not about to channel switch
-                if(pMac->lim.gLimChannelSwitch.state != eLIM_CHANNEL_SWITCH_IDLE)
+                if(psessionEntry->gLimChannelSwitch.state != eLIM_CHANNEL_SWITCH_IDLE)
                 {
                     limLog(pMac, LOGW,
                         FL("Ignoring disassoc frame due to upcoming "
diff --git a/CORE/MAC/src/pe/lim/limProcessLmmMessages.c b/CORE/MAC/src/pe/lim/limProcessLmmMessages.c
index 27c95ce..b95251e 100644
--- a/CORE/MAC/src/pe/lim/limProcessLmmMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessLmmMessages.c
@@ -674,7 +674,7 @@
         pMac->lim.gLimSmeState = eLIM_SME_LINK_EST_WT_SCAN_STATE;
     else
         return;
-    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, NO_SESSION, pMac->lim.gLimSmeState));
 
     /* The commented piece of code here is to handle the Measurement Request from WSM as Scan
      * request in the LIM in Linux Station. Currently, the station uses Measurement request to 
@@ -686,7 +686,7 @@
     {
         pMac->lim.gLimPrevMlmState = pMac->lim.gLimMlmState;
         pMac->lim.gLimMlmState     = eLIM_MLM_LEARN_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, NO_SESSION, pMac->lim.gLimMlmState));
         pMac->lim.gLimSystemInScanLearnMode = eANI_BOOLEAN_TRUE;
     }
 #if 0
diff --git a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
index a0d3ca7..1639fdb 100644
--- a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
+++ b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
@@ -98,8 +98,7 @@
 
 
 /* this function should not changed */
-  if((pMac->lim.gLimSmeState == eLIM_SME_SUSPEND_STATE) &&
-      (limMsg->type != SIR_LIM_RESUME_ACTIVITY_NTF))
+  if(pMac->lim.gLimSmeState == eLIM_SME_OFFLINE_STATE)
   {
       // Defer processsing this message
       if (limDeferMsg(pMac, limMsg) != TX_SUCCESS)
@@ -126,7 +125,6 @@
         (limMsg->type != WDA_SET_BSSKEY_RSP)&&
         (limMsg->type != WDA_SET_STAKEY_RSP)&&
         (limMsg->type != WDA_SET_STA_BCASTKEY_RSP) &&
-        (limMsg->type != SIR_LIM_RESUME_ACTIVITY_NTF)&&
         (limMsg->type != eWNI_SME_START_REQ) &&
         (limMsg->type != WDA_AGGR_QOS_RSP) &&
         (limMsg->type != WDA_REMOVE_BSSKEY_RSP) &&
@@ -145,6 +143,9 @@
 #ifdef WLAN_FEATURE_P2P 
         (limMsg->type != WDA_P2P_NOA_ATTR_IND) &&
 #endif
+#ifdef FEATURE_OEM_DATA_SUPPORT
+        (limMsg->type != WDA_START_OEM_DATA_RSP) &&
+#endif
         (limMsg->type != WDA_ADD_TS_RSP))
     {
         PELOG1(limLog(pMac, LOG1, FL("Defer the current message %s , gLimProcessDefdMsgs is false and system is not in scan/learn mode\n"),
@@ -301,11 +302,11 @@
 #endif
     if(retCode == TX_SUCCESS)
         {
-            MTRACE(macTraceMsgRx(pMac, 0, LIM_TRACE_MAKE_RXMSG(pMsg->type, LIM_MSG_DEFERRED));)
+            MTRACE(macTraceMsgRx(pMac, NO_SESSION, LIM_TRACE_MAKE_RXMSG(pMsg->type, LIM_MSG_DEFERRED));)
         }
     else
         {
-            MTRACE(macTraceMsgRx(pMac, 0, LIM_TRACE_MAKE_RXMSG(pMsg->type, LIM_MSG_DROPPED));)
+            MTRACE(macTraceMsgRx(pMac, NO_SESSION, LIM_TRACE_MAKE_RXMSG(pMsg->type, LIM_MSG_DROPPED));)
         }
 
 
@@ -658,7 +659,7 @@
         limSendSmeMgmtFrameInd( pMac, pHdr->fc.subType, (tANI_U8*)pHdr, 
                      WDA_GET_RX_PAYLOAD_LEN(pBd) + sizeof(tSirMacMgmtHdr), 
                      pLimMgmtRegistration->sessionId,
-                     WDA_GET_RX_CH(pBd) );
+                     WDA_GET_RX_CH(pBd), psessionEntry );
     
         if ( (type == SIR_MAC_MGMT_FRAME) && (fc.type == SIR_MAC_MGMT_FRAME)
               && (subType == SIR_MAC_MGMT_RESERVED15) )
@@ -1082,6 +1083,61 @@
     }
 }
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+void limOemDataRspHandleResumeLinkRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* mlmOemDataRsp)
+{
+    if(status != eHAL_STATUS_SUCCESS)
+    {
+        limLog(pMac, LOGE, FL("OEM Data Rsp failed to get the response for resume link\n"));
+    }
+
+    if(NULL != pMac->lim.gpLimMlmOemDataReq)
+    {
+        palFreeMemory(pMac->hHdd, pMac->lim.gpLimMlmOemDataReq);
+        pMac->lim.gpLimMlmOemDataReq = NULL;
+    }
+
+    //"Failure" status doesn't mean that Oem Data Rsp did not happen
+    //and hence we need to respond to upper layers. Only Resume link is failed, but
+    //we got the oem data response already.
+    //Post the meessage to MLM
+    limPostSmeMessage(pMac, LIM_MLM_OEM_DATA_CNF, (tANI_U32*)(mlmOemDataRsp));
+
+    return;
+}
+
+void limProcessOemDataRsp(tpAniSirGlobal pMac, tANI_U32* body)
+{
+    eHalStatus status = eHAL_STATUS_SUCCESS;
+    tpLimMlmOemDataRsp mlmOemDataRsp = NULL;
+    tpStartOemDataRsp oemDataRsp = NULL;
+
+    //Process all the messages for the lim queue
+    SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
+
+    oemDataRsp = (tpStartOemDataRsp)(body);
+
+    status = palAllocateMemory(pMac->hHdd, (void**)(&mlmOemDataRsp), sizeof(tLimMlmOemDataRsp));
+    if(status != eHAL_STATUS_SUCCESS)
+    {
+        limLog(pMac, LOGP, FL("could not allocate memory for mlmOemDataRsp\n"));
+        return;
+    }
+
+    //copy the memory into tLimMlmOemDataRsp and free the tStartOemDataRsp
+    //the structures tStartOemDataRsp and tLimMlmOemDataRsp have the same structure
+    palCopyMemory(pMac->hHdd, (void*)(mlmOemDataRsp), (void*)(oemDataRsp), sizeof(tLimMlmOemDataRsp));
+
+    //Now free the incoming memory
+    palFreeMemory(pMac->hHdd, (void*)(oemDataRsp));
+
+    limResumeLink(pMac, limOemDataRspHandleResumeLinkRsp, (tANI_U32*)mlmOemDataRsp);
+
+    return;
+}
+
+#endif
 
 
 /**
@@ -1120,6 +1176,8 @@
 #endif
     if(pMac->gDriverType == eDRIVER_TYPE_MFG)
     {
+        palFreeMemory(pMac->hHdd, (tANI_U8 *)limMsg->bodyptr);
+        limMsg->bodyptr = NULL;
         return;
     }
 #ifdef WLAN_DEBUG    
@@ -1131,61 +1189,15 @@
       limMsgStr(limMsg->type), limSmeStateStr(pMac->lim.gLimSmeState),
       limMlmStateStr(pMac->lim.gLimMlmState));)
 
-    MTRACE(macTraceMsgRx(pMac, 0, LIM_TRACE_MAKE_RXMSG(limMsg->type, LIM_MSG_PROCESSED));)
+    MTRACE(macTraceMsgRx(pMac, NO_SESSION, LIM_TRACE_MAKE_RXMSG(limMsg->type, LIM_MSG_PROCESSED));)
 
     switch (limMsg->type)
     {
-#if defined(ANI_DVT_DEBUG)
-        case SIR_LIM_SUSPEND_ACTIVITY_REQ:
-            // This message is from HAL notifying LIM
-            // to suspend activity. (PTT needs)
-            // Disable TFP & RHP
-            //halSetStaTxEnable(pMac, 1, eHAL_CLEAR);
-            //halStopDataTraffic(pMac);
-            //halSetRxEnable(pMac, eHAL_CLEAR);
-
-            pMac->lim.gLimPrevSmeState = pMac->lim.gLimSmeState;
-            pMac->lim.gLimSmeState     = eLIM_SME_SUSPEND_STATE;
-         MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
-
-            // Post message back to HAL
-            msgQ.type = WDA_SUSPEND_ACTIVITY_RSP;
-            MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
-            wdaPostCtrlMsg(pMac, &msgQ);
-            break;
-#endif
 
         case SIR_LIM_UPDATE_BEACON:
             limUpdateBeacon(pMac);
             break;
 
-        case SIR_LIM_RESUME_ACTIVITY_NTF:
-            // This message is from HAL notifying LIM
-            // to resume activity.
-            if (pMac->lim.gLimSmeState == eLIM_SME_SUSPEND_STATE)
-            {
-                limLog(pMac, LOGE,
-                   FL("Received RESUME_NTF in State %s on Role %d\n"),
-                   limSmeStateStr(pMac->lim.gLimSmeState), pMac->lim.gLimSystemRole);
-                pMac->lim.gLimSmeState = pMac->lim.gLimPrevSmeState;
-             MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
-
-                 handleCBCFGChange( pMac, ANI_IGNORE_CFG_ID );
-                 handleHTCapabilityandHTInfo(pMac);
-                 //initialize the TSPEC admission control table.
-                 limAdmitControlInit(pMac);
-                 limRegisterHalIndCallBack(pMac);
-            }
-            else
-            {
-                limLog(pMac, LOGE,
-                   FL("Received RESUME_NTF in inval State %X on Role %d\n"),
-                   pMac->lim.gLimSmeState, pMac->lim.gLimSystemRole);
-                limPrintSmeState(pMac, LOGE, pMac->lim.gLimSmeState);
-            }
-
-            break;
-
         case SIR_CFG_PARAM_UPDATE_IND:
             /// CFG parameter updated
             if (limIsSystemInScanState(pMac))
@@ -1223,6 +1235,11 @@
         case WDA_FINISH_SCAN_RSP:
             limProcessFinishScanRsp(pMac, limMsg->bodyptr);
             break;
+#ifdef FEATURE_OEM_DATA_SUPPORT
+        case WDA_START_OEM_DATA_RSP:
+            limProcessOemDataRsp(pMac, limMsg->bodyptr);
+            break;
+#endif
 
         case WDA_SWITCH_CHANNEL_RSP:
             limProcessSwitchChannelRsp(pMac, limMsg->bodyptr);
@@ -1305,6 +1322,9 @@
         case eWNI_SME_STAT_SUMM_REQ:
         case eWNI_SME_GET_SCANNED_CHANNEL_REQ:
         case eWNI_SME_GET_STATISTICS_REQ:
+#ifdef FEATURE_OEM_DATA_SUPPORT
+        case eWNI_SME_OEM_DATA_REQ:
+#endif
             // These messages are from HDD
             limProcessNormalHddMsg(pMac, limMsg, true);  //need to response to hdd
             break;
@@ -1389,28 +1409,6 @@
 
         case eWNI_PMC_SMPS_STATE_IND :
         {
-#ifdef SUPPORT_eWNI_PMC_SMPS_STATE_IND
-            tSirMbMsg *pMBMsg;
-            tSirMacHTMIMOPowerSaveState mimoPSstate;
-            /** Is System processing any SMPS Indication*/
-            if (!limIsSystemInSetMimopsState(pMac))
-            {
-                pMBMsg = (tSirMbMsg *)limMsg->bodyptr;
-                palCopyMemory(pMac->hHdd, &mimoPSstate, pMBMsg->data, sizeof(tSirMacHTMIMOPowerSaveState));
-                limSMPowerSaveStateInd(pMac, mimoPSstate);
-            }
-            else
-            {
-                if (limDeferMsg(pMac, limMsg) != TX_SUCCESS)
-                {
-                    PELOGE(limLog(pMac, LOGE, FL("Unable to Defer message(0x%X) limSmeState %d (prev sme state %d) sysRole %d mlm state %d (prev mlm state %d)\n"),
-                        limMsg->type, pMac->lim.gLimSmeState,  pMac->lim.gLimPrevSmeState,
-                        pMac->lim.gLimSystemRole,  pMac->lim.gLimMlmState,  pMac->lim.gLimPrevMlmState);)
-                    limLogSessionStates(pMac);
-                    limPrintMsgName(pMac, LOGE, limMsg->type);
-                }
-            }
-#endif
             if(limMsg->bodyptr){
             palFreeMemory(pMac->hHdd, (tANI_U8 *)limMsg->bodyptr);
             limMsg->bodyptr = NULL;
@@ -1480,7 +1478,10 @@
          * function used in timeout case(i.e SIR_LIM_CHANNEL_SWITCH_TIMEOUT) 
          * for switching the channel*/
         case eWNI_SME_PRE_CHANNEL_SWITCH_FULL_POWER:
-            limProcessChannelSwitchTimeout(pMac);
+            if ( !tx_timer_running(&pMac->lim.limTimers.gLimChannelSwitchTimer) )
+            {  
+                limProcessChannelSwitchTimeout(pMac);
+            }
             palFreeMemory(pMac->hHdd, (tANI_U8 *)limMsg->bodyptr);
             limMsg->bodyptr = NULL;
             break;
@@ -2043,8 +2044,8 @@
     }
 
     /* limInsystemInscanState() refers the psessionEntry,  how to get session Entry????*/
-    if (((pMac->lim.gLimAddtsSent) || (limIsSystemInScanState(pMac)) ||
-                (LIM_IS_RADAR_DETECTED(pMac))) && fDeferMsg)
+    if (((pMac->lim.gLimAddtsSent) || (limIsSystemInScanState(pMac)) /*||
+                (LIM_IS_RADAR_DETECTED(pMac))*/) && fDeferMsg)
     {
         // System is in DFS (Learn) mode or awaiting addts response
         // or if radar is detected, Defer processsing this message
@@ -2085,7 +2086,7 @@
 }
 
 void
-handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac)
+handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry)
 {
     tSirMacHTCapabilityInfo macHTCapabilityInfo;
     tSirMacHTParametersInfo macHTParametersInfo;
@@ -2094,13 +2095,7 @@
     tSirMacHTInfoField3 macHTInfoField3;
     tANI_U32  cfgValue;
     tANI_U8 *ptr;
-    tpPESession psessionEntry = &pMac->lim.gpSession[0];//TBD-RAJESH HOW TO GET sessionEntry?????
 
-    pMac->lim.htCapability = IS_DOT11_MODE_HT(psessionEntry->dot11mode);  
-
-
-
-    // Get HT Capabilities
     if (wlan_cfgGetInt(pMac, WNI_CFG_HT_CAP_INFO, &cfgValue) != eSIR_SUCCESS)
     {
         limLog(pMac, LOGP, FL("Fail to retrieve WNI_CFG_HT_CAP_INFO value\n"));
@@ -2114,7 +2109,6 @@
     pMac->lim.gHTMaxAmsduLength = (tANI_U8)macHTCapabilityInfo.maximalAMSDUsize;
     pMac->lim.gHTShortGI20Mhz = (tANI_U8)macHTCapabilityInfo.shortGI20MHz;
     pMac->lim.gHTShortGI40Mhz = (tANI_U8)macHTCapabilityInfo.shortGI40MHz;
-    pMac->lim.gHTSupportedChannelWidthSet = (tANI_U8)macHTCapabilityInfo.supportedChannelWidthSet;
     pMac->lim.gHTPSMPSupport = (tANI_U8)macHTCapabilityInfo.psmp;
     pMac->lim.gHTDsssCckRate40MHzSupport = (tANI_U8)macHTCapabilityInfo.dsssCckMode40MHz;
 
@@ -2139,8 +2133,6 @@
     pMac->lim.gHTServiceIntervalGranularity = (tANI_U8)macHTInfoField1.serviceIntervalGranularity;
     pMac->lim.gHTControlledAccessOnly = (tANI_U8)macHTInfoField1.controlledAccessOnly;
     pMac->lim.gHTRifsMode = (tANI_U8)macHTInfoField1.rifsMode;
-    pMac->lim.gHTRecommendedTxWidthSet = (tANI_U8)macHTInfoField1.recommendedTxWidthSet;
-    pMac->lim.gHTSecondaryChannelOffset = (tSirMacHTSecondaryChannelOffset)macHTInfoField1.secondaryChannelOffset;
 
     if (wlan_cfgGetInt(pMac, WNI_CFG_HT_INFO_FIELD2, &cfgValue) != eSIR_SUCCESS)
     {
@@ -2160,10 +2152,20 @@
     *((tANI_U16 *)ptr) = (tANI_U16) (cfgValue & 0xffff);
     pMac->lim.gHTPCOActive = (tANI_U8)macHTInfoField3.pcoActive;
     pMac->lim.gHTPCOPhase = (tANI_U8)macHTInfoField3.pcoPhase;
-    psessionEntry->beaconParams.fLsigTXOPProtectionFullSupport = (tANI_U8)macHTInfoField3.lsigTXOPProtectionFullSupport;
     pMac->lim.gHTSecondaryBeacon = (tANI_U8)macHTInfoField3.secondaryBeacon;
     pMac->lim.gHTDualCTSProtection = (tANI_U8)macHTInfoField3.dualCTSProtection;
     pMac->lim.gHTSTBCBasicMCS = (tANI_U8)macHTInfoField3.basicSTBCMCS;
+
+    /* The lim globals for channelwidth and secondary chnl have been removed and should not be used during no session;
+     * instead direct cfg is read and used when no session for transmission of mgmt frames (same as old);
+     * For now, we might come here during init and join with sessionEntry = NULL; in that case just fill the globals which exist
+     * Sessionized entries values will be filled in join or add bss req. The ones which are missed in join are filled below
+     */
+    if (psessionEntry != NULL)
+    {
+        psessionEntry->htCapability = IS_DOT11_MODE_HT(psessionEntry->dot11mode);  
+        psessionEntry->beaconParams.fLsigTXOPProtectionFullSupport = (tANI_U8)macHTInfoField3.lsigTXOPProtectionFullSupport;
+    }
 }
 
 void limLogSessionStates(tpAniSirGlobal pMac)
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
index 10c27f1..91e6898 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
@@ -61,6 +61,9 @@
 // MLM REQ processing function templates
 static void limProcessMlmStartReq(tpAniSirGlobal, tANI_U32 *);
 static void limProcessMlmScanReq(tpAniSirGlobal, tANI_U32 *);
+#ifdef FEATURE_OEM_DATA_SUPPORT
+static void limProcessMlmOemDataReq(tpAniSirGlobal, tANI_U32 *);
+#endif
 static void limProcessMlmJoinReq(tpAniSirGlobal, tANI_U32 *);
 static void limProcessMlmAuthReq(tpAniSirGlobal, tANI_U32 *);
 static void limProcessMlmAssocReq(tpAniSirGlobal, tANI_U32 *);
@@ -84,26 +87,7 @@
 
 static void limProcessMlmRemoveKeyReq(tpAniSirGlobal pMac, tANI_U32 * pMsgBuf);
 void 
-limSetChannel(tpAniSirGlobal pMac, tANI_U32 titanHtcap, tANI_U8 channel, tPowerdBm maxTxPower, tANI_U8 peSessionId);
-
-
-/*
- * determine the secondary channel state for hal
- */
-static ePhyChanBondState
-mlm_get_ext_chnl(
-    tpAniSirGlobal      pMac,
-    tAniCBSecondaryMode chnl)
-{
-    if (chnl == eANI_CB_SECONDARY_UP)
-        return PHY_DOUBLE_CHANNEL_LOW_PRIMARY;
-    if (chnl == eANI_CB_SECONDARY_DOWN)
-        return PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
-    return PHY_SINGLE_CHANNEL_CENTERED;
-
-}
-
-
+limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
 #define IS_MLM_SCAN_REQ_BACKGROUND_SCAN_AGGRESSIVE(pMac)    (pMac->lim.gpLimMlmScanReq->backgroundScanMode == eSIR_AGGRESSIVE_BACKGROUND_SCAN)
 
 
@@ -141,6 +125,9 @@
     {
         case LIM_MLM_START_REQ:             limProcessMlmStartReq(pMac, Msg->bodyptr);   break;
         case LIM_MLM_SCAN_REQ:              limProcessMlmScanReq(pMac, Msg->bodyptr);    break;
+#ifdef FEATURE_OEM_DATA_SUPPORT
+        case LIM_MLM_OEM_DATA_REQ: limProcessMlmOemDataReq(pMac, Msg->bodyptr); break;
+#endif
         case LIM_MLM_JOIN_REQ:              limProcessMlmJoinReq(pMac, Msg->bodyptr);    break;
         case LIM_MLM_AUTH_REQ:              limProcessMlmAuthReq(pMac, Msg->bodyptr);    break;
         case LIM_MLM_ASSOC_REQ:             limProcessMlmAssocReq(pMac, Msg->bodyptr);   break;
@@ -352,7 +339,7 @@
     pMac->lim.gpchangeChannelData = cbdata;
 
     limSendSwitchChnlParams(pMac, newChannel,
-        eHT_SECONDARY_CHANNEL_OFFSET_NONE,
+        PHY_SINGLE_CHANNEL_CENTERED,
         psessionEntry->maxTxPower, psessionEntry->peSessionId);
 
     return;
@@ -451,7 +438,7 @@
             pMac->lim.limTimers.gLimMinChannelTimer.sessionId = sessionId;
 #endif            
             
-            MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_MIN_CHANNEL_TIMER));
+            MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_MIN_CHANNEL_TIMER));
 
             if (tx_timer_activate(&pMac->lim.limTimers.gLimMinChannelTimer) != TX_SUCCESS)
             {
@@ -499,7 +486,7 @@
         PELOG2(limLog(pMac, LOG2, FL("START PASSIVE Scan chan %d\n"), channelNum);)
 
         /// Passive Scanning. Activate maxChannelTimer
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_MAX_CHANNEL_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, NO_SESSION, eLIM_MAX_CHANNEL_TIMER));
         if (tx_timer_deactivate(&pMac->lim.limTimers.gLimMaxChannelTimer)
                                       != TX_SUCCESS)
         {
@@ -525,6 +512,8 @@
                 tANI_U32 val1 = 0;
 
                 val = SYS_MS_TO_TICKS(val);
+                //TODO: consider sessions.
+#if 0
 #ifdef ANI_PRODUCT_TYPE_CLIENT
                 // If a background was triggered via Quiet BSS,
                 // then we need to adjust the MIN and MAX channel
@@ -542,9 +531,10 @@
                     val1 = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->maxChannelTime);
                 }
 #endif
+#endif
                 //Pick the longer stay time
                 val = (val > val1) ? val : val1;
-                MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_MAX_CHANNEL_TIMER));
+                MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_MAX_CHANNEL_TIMER));
                 if (tx_timer_change(&pMac->lim.limTimers.gLimMaxChannelTimer,
                                 val, 0) != TX_SUCCESS)
                 {
@@ -716,53 +706,9 @@
         pInitScanParam->notifyHost = FALSE;
         pInitScanParam->scanMode = eHAL_SYS_MODE_LEARN;
 
-#if defined(ANI_AP_CLIENT_SDK) 
-        if (GET_LIM_SYSTEM_ROLE(pMac) == eLIM_STA_ROLE)
-        {
-            pInitScanParam->frameType = SIR_MAC_DATA_NULL;
-            // We need to inform the AP only when we are
-            // in the LINK_ESTABLISHED state
-            if( eLIM_SME_LINK_EST_WT_SCAN_STATE != pMac->lim.gLimSmeState )
-            {
-                pInitScanParam->notifyBss = FALSE;
-                // FIXME - Handle this one carefully
-                pInitScanParam->notifyHost = FALSE;
-            }
-            __limCreateInitScanRawFrame(pMac, pInitScanParam);
-            pInitScanParam->checkLinkTraffic = trafficCheck;
-        }
-        else
-#endif
-        {
-            pInitScanParam->frameType = SIR_MAC_CTRL_CTS;
-            __limCreateInitScanRawFrame(pMac, pInitScanParam);
-            pInitScanParam->checkLinkTraffic = trafficCheck;
-        }
-
-#if (defined(ANI_PRODUCT_TYPE_AP) ||defined(ANI_PRODUCT_TYPE_AP_SDK))
-        /* Currently using the AP's scanDuration values for Linux station also. This should
-         * be revisited if this needs to changed depending on AP or Station */
-        {
-            if (pMac->lim.gpLimMeasReq->measControl.longChannelScanPeriodicity &&
-                    (pMac->lim.gLimMeasParams.shortDurationCount ==
-                     pMac->lim.gpLimMeasReq->measControl.longChannelScanPeriodicity))
-            {
-#ifdef ANI_AP_SDK
-                pInitScanParam->scanDuration = (tANI_U16)pMac->lim.gLimScanDurationConvert.longChannelScanDuration_tick;
-#else
-                pInitScanParam->scanDuration = (tANI_U16)pMac->lim.gpLimMeasReq->measDuration.longChannelScanDuration;
-#endif /* ANI_AP_SDK */
-            }
-            else
-            {
-#ifdef ANI_AP_SDK
-                pInitScanParam->scanDuration = pMac->lim.gLimScanDurationConvert.shortChannelScanDuration_tick;
-#else
-                pInitScanParam->scanDuration = (tANI_U16)pMac->lim.gpLimMeasReq->measDuration.shortChannelScanDuration;
-#endif /* ANI_AP_SDK */
-            }
-        }
-#endif       //#if (defined(ANI_PRODUCT_TYPE_AP) ||defined(ANI_PRODUCT_TYPE_AP_SDK))
+        pInitScanParam->frameType = SIR_MAC_CTRL_CTS;
+        __limCreateInitScanRawFrame(pMac, pInitScanParam);
+        pInitScanParam->checkLinkTraffic = trafficCheck;
     }
     else
     {
@@ -789,7 +735,7 @@
 
     pMac->lim.gLimHalScanState = nextState;
     SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
-    MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msg.type));
 
     rc = wdaPostCtrlMsg(pMac, &msg);
     if (rc == eSIR_SUCCESS) {
@@ -870,7 +816,7 @@
         pMac->lim.gLimHalScanState = nextState;
         SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
 
-        MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+        MTRACE(macTraceMsgTx(pMac, NO_SESSION, msg.type));
         PELOGW(limLog(pMac, LOGW, FL("Channel %d\n"), channelNum);)
 
             rc = wdaPostCtrlMsg(pMac, &msg);
@@ -943,7 +889,7 @@
 
         pMac->lim.gLimHalScanState = nextState;
         SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
-        MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+        MTRACE(macTraceMsgTx(pMac, NO_SESSION, msg.type));
 
         rc = wdaPostCtrlMsg(pMac, &msg);
         if (rc == eSIR_SUCCESS) {
@@ -1036,9 +982,9 @@
     msg.type = WDA_FINISH_SCAN_REQ;
     msg.bodyptr = pFinishScanParam;
     msg.bodyval = 0;
-    pFinishScanParam->currentOperChannel = peGetResumeChannel(pMac);
-    //TODO: Fix CB State. Get it from session. similar to getChannel. 
-    pFinishScanParam->cbState = limGetPhyCBState( pMac );
+    
+    peGetResumeChannel(pMac, &pFinishScanParam->currentOperChannel, &pFinishScanParam->cbState);
+
     palZeroMemory( pMac->hHdd, (tANI_U8 *)&pFinishScanParam->macMgmtHdr, sizeof(tSirMacMgmtHdr));
 
     if (nextState == eLIM_HAL_FINISH_LEARN_WAIT_STATE)
@@ -1048,6 +994,7 @@
         pFinishScanParam->notifyBss = FALSE;
         pFinishScanParam->notifyHost = FALSE;
         pFinishScanParam->frameType = 0;
+
         pFinishScanParam->frameLength = 0;
         pMac->lim.gLimHalScanState = nextState;
     }
@@ -1073,7 +1020,7 @@
     }
 
     SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
-    MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msg.type));
 
     rc = wdaPostCtrlMsg(pMac, &msg);
     if (rc == eSIR_SUCCESS) {
@@ -1256,6 +1203,154 @@
     PELOG1(limLog(pMac, LOG1, FL("Scan ended, took %d tu\n"), (tx_time_get() - pMac->lim.scanStartTime));)
 } /*** limRestorePreScanState() ***/
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+void limSendHalOemDataReq(tpAniSirGlobal pMac)
+{
+    tSirMsgQ msg;
+    tpStartOemDataReq pStartOemDataReq = NULL;
+    tSirRetStatus rc = eSIR_SUCCESS;
+    tpLimMlmOemDataRsp pMlmOemDataRsp;
+    tANI_U32 reqLen = 0;
+    if(NULL == pMac->lim.gpLimMlmOemDataReq)
+    {
+        PELOGE(limLog(pMac, LOGE,  FL("Null pointer\n"));)
+        goto error;
+    }
+
+    reqLen = sizeof(tStartOemDataReq);
+
+    if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd, (void**)&pStartOemDataReq, reqLen))
+    {
+        PELOGE(limLog(pMac, LOGE,  FL("OEM_DATA: Could not allocate memory for pStartOemDataReq\n"));)
+        goto error;
+    }
+
+    palZeroMemory(pMac->hHdd, (tANI_U8*)(pStartOemDataReq), reqLen);
+
+    //Now copy over the information to the OEM DATA REQ to HAL
+    palCopyMemory(pMac->hHdd, pStartOemDataReq->selfMacAddr, pMac->lim.gpLimMlmOemDataReq->selfMacAddr, sizeof(tSirMacAddr));
+
+    palCopyMemory(pMac->hHdd, pStartOemDataReq->oemDataReq, pMac->lim.gpLimMlmOemDataReq->oemDataReq, OEM_DATA_REQ_SIZE);
+
+    //Create the message to be passed to HAL
+    msg.type = WDA_START_OEM_DATA_REQ;
+    msg.bodyptr = pStartOemDataReq;
+    msg.bodyval = 0;
+
+    SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msg.type));
+
+    rc = wdaPostCtrlMsg(pMac, &msg);
+    if(rc == eSIR_SUCCESS)
+    {
+        return;
+    }
+
+    SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
+    palFreeMemory(pMac->hHdd, (void*)pStartOemDataReq);
+    PELOGE(limLog(pMac, LOGE,  FL("OEM_DATA: posting WDA_START_OEM_DATA_REQ to HAL failed\n"));)
+
+error:
+    pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState;
+
+    if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd, (void**)(&pMlmOemDataRsp), sizeof(tLimMlmOemDataRsp)))
+    {
+        limLog(pMac->hHdd, LOGP, FL("OEM_DATA: memory allocation for pMlmOemDataRsp failed under suspend link failure\n"));
+        return;
+    }
+
+    if(NULL != pMac->lim.gpLimMlmOemDataReq)
+    {
+        palFreeMemory(pMac->hHdd, pMac->lim.gpLimMlmOemDataReq);
+        pMac->lim.gpLimMlmOemDataReq = NULL;
+    }
+
+    limPostSmeMessage(pMac, LIM_MLM_OEM_DATA_CNF, (tANI_U32*)pMlmOemDataRsp);
+
+    return;
+}
+/**
+ * limSetOemDataReqModeFailed()
+ *
+ * FUNCTION:
+ *  This function is used as callback to resume link after the suspend fails while
+ *  starting oem data req mode.
+ * LOGIC:
+ *  NA
+ *
+ * ASSUMPTIONS:
+ *  NA
+ *
+ * NOTE:
+ *
+ * @param pMac - Pointer to Global MAC structure
+ * @return None
+ */
+
+void limSetOemDataReqModeFailed(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data)
+{
+    tpLimMlmOemDataRsp pMlmOemDataRsp;
+
+    pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState;
+
+    if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd, (void**)(&pMlmOemDataRsp), sizeof(tLimMlmOemDataRsp)))
+    {
+        limLog(pMac->hHdd, LOGP, FL("OEM_DATA: memory allocation for pMlmOemDataRsp failed under suspend link failure\n"));
+        return;
+    }
+
+    if(NULL != pMac->lim.gpLimMlmOemDataReq)
+    {
+        palFreeMemory(pMac->hHdd, pMac->lim.gpLimMlmOemDataReq);
+        pMac->lim.gpLimMlmOemDataReq = NULL;
+    }
+
+    palZeroMemory(pMac->hHdd, pMlmOemDataRsp, sizeof(tLimMlmOemDataRsp));
+
+    limPostSmeMessage(pMac, LIM_MLM_OEM_DATA_CNF, (tANI_U32*)pMlmOemDataRsp);
+
+    return;
+}
+
+/**
+ * limSetOemDataReqMode()
+ *
+ *FUNCTION:
+ * This function is called to setup system into OEM DATA REQ mode
+ *
+ *LOGIC:
+ * NA
+ *
+ *ASSUMPTIONS:
+ * NA
+ *
+ *NOTE:
+ *
+ * @param  pMac - Pointer to Global MAC structure
+ * @return None
+ */
+
+void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data)
+{
+    if(status != eHAL_STATUS_SUCCESS)
+    {
+        limLog(pMac, LOGE, FL("OEM_DATA: failed in suspend link\n"));
+        goto error;
+    }
+    else
+    {
+        PELOGE(limLog(pMac, LOGE, FL("OEM_DATA: Calling limSendHalOemDataReq\n"));)
+        limSendHalOemDataReq(pMac);
+        return;
+    }
+
+error:
+    limResumeLink(pMac, limSetOemDataReqModeFailed, NULL);
+    return ;
+} /*** end limSendHalOemDataReq() ***/
+
+#endif //FEATURE_OEM_DATA_SUPPORT
 
 static void
 mlm_add_sta(
@@ -1323,8 +1418,17 @@
 
 #endif
     }
-
+#ifdef WLAN_FEATURE_11AC
+    if (psessionEntry->vhtCapability)
+    {
+        pSta->vhtCapable = VOS_TRUE;
+    }
+#endif
+#ifdef WLAN_FEATURE_11AC
+    limPopulateOwnRateSet(pMac, &pSta->supportedRates, NULL, false,psessionEntry,NULL);
+#else
     limPopulateOwnRateSet(pMac, &pSta->supportedRates, NULL, false,psessionEntry);
+#endif
     limFillSupportedRatesInfo(pMac, NULL, &pSta->supportedRates,psessionEntry);
     
     limLog( pMac, LOGE, FL( "GF: %d, ChnlWidth: %d, MimoPS: %d, lsigTXOP: %d, dsssCCK: %d, SGI20: %d, SGI40%d\n") ,
@@ -1361,10 +1465,6 @@
     tpAddBssParams pAddBssParams = NULL;
     tANI_U32 retCode;
 
-#ifdef WLAN_SOFTAP_FEATURE
-    tANI_U32 val = 0;
-#endif
-    
     // Package WDA_ADD_BSS_REQ message parameters
 
     if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
@@ -1401,16 +1501,9 @@
     }
 
 #ifdef WLAN_SOFTAP_FEATURE  
-    if( wlan_cfgGetInt ( pMac, WNI_CFG_SHORT_SLOT_TIME, &val ) != eSIR_SUCCESS)
-    {
-        limLog ( pMac, LOGP, FL(" Error : unable to fetch the WNI_CFG_SHORT_SLOT_TIME\n"));
-        palFreeMemory(pMac->hHdd,(void *)pAddBssParams);
-        return eSIR_SME_HAL_SEND_MESSAGE_FAIL;
-    }
-    pAddBssParams->shortSlotTimeSupported = (tANI_U8)val;
+    pAddBssParams->shortSlotTimeSupported = psessionEntry->shortSlotTimeSupported;
 #endif
 
-
     pAddBssParams->beaconInterval               = pMlmStartReq->beaconPeriod;
     pAddBssParams->dtimPeriod                   = pMlmStartReq->dtimPeriod;
     pAddBssParams->cfParamSet.cfpCount          = pMlmStartReq->cfParamSet.cfpCount;
@@ -1425,12 +1518,16 @@
     pAddBssParams->nwType = pMlmStartReq->nwType;
 
     pAddBssParams->htCapable            = pMlmStartReq->htCapable;
+#ifdef WLAN_FEATURE_11AC
+    pAddBssParams->vhtCapable           = psessionEntry->vhtCapability;
+    pAddBssParams->vhtTxChannelWidthSet = psessionEntry->vhtTxChannelWidthSet; 
+#endif
     pAddBssParams->htOperMode           = pMlmStartReq->htOperMode;
     pAddBssParams->dualCTSProtection    = pMlmStartReq->dualCTSProtection;
     pAddBssParams->txChannelWidthSet    = pMlmStartReq->txChannelWidthSet;
 
     pAddBssParams->currentOperChannel   = pMlmStartReq->channelNumber;
-    pAddBssParams->currentExtChannel    = mlm_get_ext_chnl(pMac, pMlmStartReq->cbMode);
+    pAddBssParams->currentExtChannel    = pMlmStartReq->cbMode;
 
     /* Update PE sessionId*/
     pAddBssParams->sessionId            = pMlmStartReq->sessionId; 
@@ -1459,7 +1556,7 @@
 
     // Set a new state for MLME
     psessionEntry->limMlmState = eLIM_MLM_WT_ADD_BSS_RSP_STATE;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
     pAddBssParams->halPersona=psessionEntry->pePersona; //pass on the session persona to hal
 
@@ -1478,7 +1575,7 @@
     msgQ.reserved   = 0;
     msgQ.bodyptr    = pAddBssParams;
     msgQ.bodyval    = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
     limLog( pMac, LOGW, FL( "Sending WDA_ADD_BSS_REQ...\n" ));
     if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
@@ -1718,6 +1815,7 @@
     {
         PELOGE(limLog(pMac, LOGE,
                FL("Sending START_SCAN from LIM while one req is pending\n"));)
+        palFreeMemory( pMac->hHdd, (tANI_U8 *) pMsgBuf);
         return;
     }
 
@@ -1737,7 +1835,7 @@
             pMac->lim.gLimMlmState = eLIM_MLM_WT_PROBE_RESP_STATE;
         else // eSIR_PASSIVE_SCAN
             pMac->lim.gLimMlmState = eLIM_MLM_PASSIVE_SCAN_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, NO_SESSION, pMac->lim.gLimMlmState));
 
         pMac->lim.gLimSystemInScanLearnMode = 1;
 
@@ -1775,6 +1873,57 @@
     }
 } /*** limProcessMlmScanReq() ***/
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+static void limProcessMlmOemDataReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
+{
+    tLimMlmOemDataRsp*     pMlmOemDataRsp;
+    
+    if (((pMac->lim.gLimMlmState == eLIM_MLM_IDLE_STATE) ||
+         (pMac->lim.gLimMlmState == eLIM_MLM_JOINED_STATE) ||
+         (pMac->lim.gLimMlmState == eLIM_MLM_AUTHENTICATED_STATE) ||
+         (pMac->lim.gLimMlmState == eLIM_MLM_BSS_STARTED_STATE) ||
+         (pMac->lim.gLimMlmState == eLIM_MLM_LINK_ESTABLISHED_STATE)))
+    {
+        //Hold onto the oem data request criteria
+        pMac->lim.gpLimMlmOemDataReq = (tLimMlmOemDataReq*)pMsgBuf;
+
+        pMac->lim.gLimPrevMlmState = pMac->lim.gLimMlmState;
+
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, NO_SESSION, pMac->lim.gLimMlmState));
+
+        //Now request for link suspension
+        limSuspendLink(pMac, eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN, limSetOemDataReqMode, NULL);
+    }
+    else
+    {
+        /**
+         * Should not have received oem data req in other states
+         * Log error
+         */
+
+        PELOGW(limLog(pMac, LOGW, FL("OEM_DATA: unexpected LIM_MLM_OEM_DATA_REQ in invalid state %X\n"),pMac->lim.gLimMlmState);)
+
+        limPrintMlmState(pMac, LOGW, pMac->lim.gLimMlmState);
+
+        /// Free up buffer allocated
+        palFreeMemory( pMac->hHdd, (tANI_U8 *) pMsgBuf);
+
+        /// Return Meas confirm with INVALID_PARAMETERS
+        if(eHAL_STATUS_SUCCESS == palAllocateMemory(pMac->hHdd, (void**)&pMlmOemDataRsp, sizeof(tLimMlmOemDataRsp)))
+        {
+            limPostSmeMessage(pMac, LIM_MLM_OEM_DATA_CNF, (tANI_U32*)pMlmOemDataRsp);
+            palFreeMemory(pMac->hHdd, pMlmOemDataRsp);
+        }
+        else
+        {
+            limLog(pMac, LOGP, FL("Could not allocate memory for pMlmOemDataRsp\n"));
+            return;
+        }
+    }
+
+    return;
+}
+#endif //FEATURE_OEM_DATA_SUPPORT
 
 
 /**
@@ -1803,7 +1952,7 @@
 static void
 limProcessMlmPostJoinSuspendLink(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *ctx)
 {
-    tANI_U8             chanNum;
+    tANI_U8             chanNum, secChanOffset;
     tLimMlmJoinCnf      mlmJoinCnf;
     tpPESession         psessionEntry = (tpPESession)ctx;
     tSirLinkState       linkState;
@@ -1815,7 +1964,7 @@
     }
     psessionEntry->limPrevMlmState = psessionEntry->limMlmState;
     psessionEntry->limMlmState = eLIM_MLM_WT_JOIN_BEACON_STATE;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
     limDeactivateAndChangeTimer(pMac, eLIM_JOIN_FAIL_TIMER);
 
@@ -1831,7 +1980,8 @@
     {
         limLog(pMac, LOGE, FL("limSetLinkState to eSIR_LINK_PREASSOC_STATE Failed!!\n"));
         mlmJoinCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
-        pMac->lim.gLimMlmState = eLIM_MLM_IDLE_STATE;
+        psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
         goto error;
     }
 
@@ -1839,11 +1989,11 @@
     // chanNum = pMac->lim.gpLimMlmJoinReq->bssDescription.channelId;
     
     chanNum = psessionEntry->currentOperChannel;
+    secChanOffset = psessionEntry->htSecondaryChannelOffset;
     //store the channel switch sessionEntry in the lim global var
     psessionEntry->channelChangeReasonCode = LIM_SWITCH_CHANNEL_JOIN;
 
-    limSetChannel(pMac, psessionEntry->pLimMlmJoinReq->bssDescription.titanHtCaps,
-                        chanNum, psessionEntry->maxTxPower, psessionEntry->peSessionId); 
+    limSetChannel(pMac, chanNum, secChanOffset, psessionEntry->maxTxPower, psessionEntry->peSessionId); 
 
     return;
 error:
@@ -1949,7 +2099,7 @@
         limPrintMlmState(pMac, LOGE, psessionEntry->limMlmState);
         
         limLog(pMac, LOGE, FL("Unexpected Join request for role %d state %X\n"),
-               psessionEntry->limSystemRole, pMac->lim.gLimMlmState);
+               psessionEntry->limSystemRole, psessionEntry->limMlmState);
     }
 
 error: 
@@ -2115,28 +2265,9 @@
             limDeletePreAuthNode(pMac,
                                  pMac->lim.gpLimMlmAuthReq->peerMacAddr);
 
-        //assign appropriate sessionId to the timer object
-        pMac->lim.limTimers.gLimAuthFailureTimer.sessionId = sessionId;
-        
-        // Activate Auth failure timer
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_AUTH_FAIL_TIMER));
-        if (tx_timer_activate(&pMac->lim.limTimers.gLimAuthFailureTimer)
-                                       != TX_SUCCESS)
-        {
-            /// Could not start Auth failure timer.
-            // Log error
-            limLog(pMac, LOGP,
-                   FL("could not start Auth failure timer\n"));
-
-            /// Return Auth confirm with Resources Unavailable
-            mlmAuthCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
-
-            goto end;
-        }
-
         psessionEntry->limPrevMlmState = psessionEntry->limMlmState;
         psessionEntry->limMlmState = eLIM_MLM_WT_AUTH_FRAME2_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
         /// Prepare & send Authentication frame
         authFrameBody.authAlgoNumber =
@@ -2148,6 +2279,22 @@
                              pMac->lim.gpLimMlmAuthReq->peerMacAddr,
                              LIM_NO_WEP_IN_FC,psessionEntry);
 
+        //assign appropriate sessionId to the timer object
+        pMac->lim.limTimers.gLimAuthFailureTimer.sessionId = sessionId;
+ 
+        // Activate Auth failure timer
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_AUTH_FAIL_TIMER));
+        if (tx_timer_activate(&pMac->lim.limTimers.gLimAuthFailureTimer)
+                                       != TX_SUCCESS)
+        {
+            /// Could not start Auth failure timer.
+            // Log error
+            limLog(pMac, LOGP,
+                   FL("could not start Auth failure timer\n"));
+            // Cleanup as if auth timer expired
+            limProcessAuthFailureTimeout(pMac);
+        }
+
         return;
     }
     else
@@ -2215,6 +2362,7 @@
     if( (psessionEntry = peFindSessionBySessionId(pMac,pMlmAssocReq->sessionId) )== NULL) 
     {
         limLog(pMac, LOGP,FL("Session Does not exist for given sessionID\n"));
+        palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmAssocReq);
         return;
     }
 
@@ -2232,31 +2380,13 @@
          (psessionEntry->limMlmState == eLIM_MLM_AUTHENTICATED_STATE || psessionEntry->limMlmState == eLIM_MLM_JOINED_STATE) &&
          (palEqualMemory(pMac->hHdd,pMlmAssocReq->peerMacAddr, currentBssId, sizeof(tSirMacAddr))) )
     {
+
         /// map the session entry pointer to the AssocFailureTimer 
         pMac->lim.limTimers.gLimAssocFailureTimer.sessionId = pMlmAssocReq->sessionId;
 
-
-        /// Start association failure timer
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_ASSOC_FAIL_TIMER));
-        if (tx_timer_activate(&pMac->lim.limTimers.gLimAssocFailureTimer)
-                                              != TX_SUCCESS)
-        {
-            /// Could not start Assoc failure timer.
-            // Log error
-            limLog(pMac, LOGP,
-                   FL("could not start Association failure timer\n"));
-
-            /// Return Assoc confirm with Resources Unavailable
-
-            mlmAssocCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
-            mlmAssocCnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS;
-
-            goto end;
-        }
-
         psessionEntry->limPrevMlmState = psessionEntry->limMlmState;
         psessionEntry->limMlmState = eLIM_MLM_WT_ASSOC_RSP_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
  
         /// Prepare and send Association request frame
         limSendAssocReqMgmtFrame(pMac, pMlmAssocReq,psessionEntry);
@@ -2273,6 +2403,19 @@
            psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS)
             PELOGE(limLog(pMac, LOGE,  FL("Failed to set the LinkState\n"));)
     }
+        /// Start association failure timer
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_ASSOC_FAIL_TIMER));
+        if (tx_timer_activate(&pMac->lim.limTimers.gLimAssocFailureTimer)
+                                              != TX_SUCCESS)
+        {
+            /// Could not start Assoc failure timer.
+            // Log error
+            limLog(pMac, LOGP,
+                   FL("could not start Association failure timer\n"));
+            // Cleanup as if assoc timer expired
+            limProcessAssocFailureTimeout(pMac,LIM_ASSOC );
+           
+        }
 
         return;
     }
@@ -2332,7 +2475,7 @@
 static void
 limProcessMlmReassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
 {
-    tANI_U8                       chanNum;
+    tANI_U8                       chanNum, secChannelOffset;
     struct tLimPreAuthNode  *pAuthNode;
     tLimMlmReassocReq       *pMlmReassocReq;
     tLimMlmReassocCnf       mlmReassocCnf;
@@ -2349,6 +2492,7 @@
     if((psessionEntry = peFindSessionBySessionId(pMac,pMlmReassocReq->sessionId)) == NULL)
     {
         PELOGE(limLog(pMac, LOGE,FL("Session Does not exist for given sessionId\n"));)
+        palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmReassocReq);
         return;
     }
     
@@ -2385,7 +2529,7 @@
 
         psessionEntry->limPrevMlmState = psessionEntry->limMlmState;
         psessionEntry->limMlmState    = eLIM_MLM_WT_REASSOC_RSP_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
 #if 0
         // Update BSSID at CFG database
@@ -2407,7 +2551,7 @@
          */
 
         chanNum = psessionEntry->limReassocChannelId;
-
+        secChannelOffset = psessionEntry->reAssocHtSecondaryChannelOffset;
 
         /* To Support BT-AMP .. read channel number from psessionEntry*/
         //chanNum = psessionEntry->currentOperChannel;
@@ -2420,8 +2564,8 @@
         //psessionEntry->pLimReAssocReq = (void *)pMlmReassocReq;
         psessionEntry->channelChangeReasonCode = LIM_SWITCH_CHANNEL_REASSOC;
 
-        /** Switch channell to the new Operating channel for Reassoc*/
-        limSetChannel(pMac, psessionEntry->limReassocTitanHtCaps, chanNum, psessionEntry->maxTxPower, psessionEntry->peSessionId);
+        /** Switch channel to the new Operating channel for Reassoc*/
+        limSetChannel(pMac, chanNum, secChannelOffset, psessionEntry->maxTxPower, psessionEntry->peSessionId);
 
         return;
     }
@@ -2571,7 +2715,7 @@
     pStaDs->mlmStaContext.cleanupTrigger = pMlmDisassocReq->disassocTrigger;
 
     /// Send Disassociate frame to peer entity
-    if (sendDisassocFrame)
+    if (sendDisassocFrame && (pMlmDisassocReq->reasonCode != eSIR_MAC_DISASSOC_DUE_TO_FTHANDOFF_REASON))
     {
     limSendDisassocMgmtFrame(pMac,
                              pMlmDisassocReq->reasonCode,
@@ -2582,13 +2726,6 @@
        sendDisassocFrame = 1;    
     }
 
-    if (psessionEntry->limSystemRole == eLIM_AP_ROLE) 
-    {
-       //SAP mode delay DEL STA for 300ms such that disassoc can be delivered at TIM
-       //100 ms for normal TIM and 300 ms for dynamic TIM
-       vos_sleep(300); 
-    }
-
     /// Receive path cleanup with dummy packet
     if(eSIR_SUCCESS != limCleanupRxPath(pMac, pStaDs,psessionEntry))
         {
@@ -2678,7 +2815,8 @@
         return;
     }
 
-    if( isLimSessionOffChannel(pMac, pMlmDisassocReq->sessionId) )
+    if( (psessionEntry->limSystemRole == eLIM_STA_ROLE) &&
+        isLimSessionOffChannel(pMac, pMlmDisassocReq->sessionId) )
     {
       //suspend link
       limSuspendLink(pMac, eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN, 
@@ -2720,6 +2858,7 @@
     {
     
         PELOGE(limLog(pMac, LOGE, FL("session does not exist for given sessionId\n"));)
+        palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmDeauthReq);
         return;
     }
     #if 0
@@ -2782,7 +2921,7 @@
                         /// Prepare and Send LIM_MLM_DEAUTH_CNF
                         mlmDeauthCnf.resultCode = eSIR_SME_SUCCESS;
                         psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
-                        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+                        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
                         goto end;
                     }
                     else
@@ -2812,6 +2951,7 @@
             break;
 
         case eLIM_STA_IN_IBSS_ROLE:
+            palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmDeauthReq);
 
             return;
 
@@ -2890,14 +3030,6 @@
     limSendDeauthMgmtFrame(pMac, pMlmDeauthReq->reasonCode,
                            pMlmDeauthReq->peerMacAddr,psessionEntry);
 
-    if( (psessionEntry->limSystemRole == eLIM_AP_ROLE))
-    {
-      // Delay DEL STA for 300ms such that unicast deauth is 
-      // delivered at TIM(100 for normal or 300ms for dynamic) 
-      // to power save stations after setting PVB
-      vos_sleep(300);
-    }
-
     /// Receive path cleanup with dummy packet
     limCleanupRxPath(pMac, pStaDs,psessionEntry);
 
@@ -2968,7 +3100,8 @@
         return;
     }
 
-    if( isLimSessionOffChannel(pMac, pMlmDeauthReq->sessionId) )
+    if( (psessionEntry->limSystemRole == eLIM_STA_ROLE) &&
+        isLimSessionOffChannel(pMac, pMlmDeauthReq->sessionId) )
     {
       //suspend link
       limSuspendLink(pMac, eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN, 
@@ -3125,15 +3258,23 @@
   }
 
     if ((pMlmSetKeysReq->numKeys == 0) && (pMlmSetKeysReq->edType != eSIR_ED_NONE)) {
-    //
-    // Broadcast/Multicast Keys (for WEP!!) are NOT sent
-    // via this interface!!
-    //
-    // This indicates to HAL that the WEP Keys need to be
-    // extracted from the CFG and applied to hardware
-    defaultKeyId = 0xff;
-      }else
-    defaultKeyId = 0;
+        //
+        // Broadcast/Multicast Keys (for WEP!!) are NOT sent
+        // via this interface!!
+        //
+        // This indicates to HAL that the WEP Keys need to be
+        // extracted from the CFG and applied to hardware
+        defaultKeyId = 0xff;
+    }else if(pMlmSetKeysReq->key[0].keyId && 
+             ((pMlmSetKeysReq->edType == eSIR_ED_WEP40) || 
+              (pMlmSetKeysReq->edType == eSIR_ED_WEP104))){
+        /* If the Key Id is non zero and encryption mode is WEP, 
+         * the key index is coming from the upper layers so that key only 
+         * need to be used as the default tx key, This is being used only 
+         * in case of WEP mode in HAL */
+        defaultKeyId = pMlmSetKeysReq->key[0].keyId;
+    }else
+        defaultKeyId = 0;
 
     limLog( pMac, LOG1,
       FL( "Trying to set keys for STA Index [%d], using defaultKeyId [%d]\n" ),
@@ -3143,7 +3284,7 @@
     if(limIsAddrBC( pMlmSetKeysReq->peerMacAddr )) {
   psessionEntry->limPrevMlmState = psessionEntry->limMlmState;
   psessionEntry->limMlmState = eLIM_MLM_WT_SET_BSS_KEY_STATE;
-  MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+  MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
         limLog( pMac, LOG1, FL("Trying to set Group Keys...%d \n"), 
             psessionEntry->peSessionId);
 
@@ -3204,6 +3345,7 @@
     {
         PELOGE(limLog(pMac, LOGE,
                     FL("session does not exist for given sessionId\n"));)
+        palFreeMemory( pMac->hHdd, (tANI_U8 *) pMsgBuf );
         return;
     }
 
@@ -3256,7 +3398,7 @@
     if(limIsAddrBC( pMlmRemoveKeyReq->peerMacAddr )) //Second condition for IBSS or AP role.
     {
         psessionEntry->limMlmState = eLIM_MLM_WT_REMOVE_BSS_KEY_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));    
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));    
         // Package WDA_REMOVE_BSSKEY_REQ message parameters
         limSendRemoveBssKeyReq( pMac,pMlmRemoveKeyReq,psessionEntry);
         return;
@@ -3294,7 +3436,7 @@
 
 
     psessionEntry->limMlmState = eLIM_MLM_WT_REMOVE_STA_KEY_STATE;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
     // Package WDA_REMOVE_STAKEY_REQ message parameters
     limSendRemoveStaKeyReq( pMac,pMlmRemoveKeyReq,staIdx,psessionEntry);
@@ -3302,6 +3444,7 @@
  
 end:
     limPostSmeRemoveKeyCnf( pMac,
+      psessionEntry,
       pMlmRemoveKeyReq,
       &mlmRemoveKeyCnf );
 
@@ -3605,7 +3748,7 @@
         mlmJoinCnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS;
 
         psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
         if(limSetLinkState(pMac, eSIR_LINK_IDLE_STATE, psessionEntry->bssId, 
             psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS)
             PELOGE(limLog(pMac, LOGE,  FL("Failed to set the LinkState\n"));)
@@ -3863,13 +4006,8 @@
             PELOGE(limLog(pMac, LOGE,  FL("(Re)Assoc Failure Timeout occurred.\n"));)
 
             psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
-            MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, psessionEntry->limMlmState));
-            
-            //Set the RXP mode to IDLE, so it starts filtering the frames.
-            if(limSetLinkState(pMac, eSIR_LINK_IDLE_STATE,psessionEntry->bssId, 
-                psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS)
-                PELOGE(limLog(pMac, LOGE,  FL("Failed to set the LinkState\n"));)
-         
+            MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
+
             // 'Change' timer for future activations
             limDeactivateAndChangeTimer(pMac, eLIM_ASSOC_FAIL_TIMER);
 
@@ -3916,7 +4054,7 @@
              * Set BSSID to currently associated AP address.
              */
             psessionEntry->limMlmState = psessionEntry->limPrevMlmState;
-            MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+            MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
             limRestorePreReassocState(pMac, 
                 eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE, eSIR_MAC_UNSPEC_FAILURE_STATUS,psessionEntry);
@@ -3951,7 +4089,7 @@
 
     /// Restore previous MLM state
     pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, NO_SESSION, pMac->lim.gLimMlmState));
     limRestorePreScanState(pMac);
 
     // Free up pMac->lim.gLimMlmScanReq
@@ -3998,6 +4136,7 @@
   {
       PELOGE(limLog(pMac, LOGE,
                FL("session does not exist for given sessionId\n"));)
+      palFreeMemory( pMac->hHdd, (tANI_U8 *) pMsgBuf );
       return;
   }
   
@@ -4048,7 +4187,7 @@
 
     // Restore MLME state
     psessionEntry->limMlmState = psessionEntry->limPrevMlmState;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
   }
 
@@ -4090,6 +4229,7 @@
     {
         PELOGE(limLog(pMac, LOGE,
                   FL("session does not exist for given session ID\n"));)
+        palFreeMemory( pMac->hHdd, (tANI_U8 *) pMsgBuf );
         return;
     }
   
@@ -4151,6 +4291,7 @@
     if((psessionEntry = peFindSessionBySessionId(pMac,pMlmDelBAReq->sessionId))== NULL)
     {
         PELOGE(limLog(pMac, LOGE,FL("session does not exist for given bssId\n"));)
+        palFreeMemory( pMac->hHdd, (tANI_U8 *) pMsgBuf );
         return;
     }
 
@@ -4319,49 +4460,93 @@
 return eSIR_SUCCESS;
 }
 
+#ifdef WLAN_FEATURE_11AC
+ePhyChanBondState limGet11ACPhyCBState(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 htSecondaryChannelOffset )
+{
+    ePhyChanBondState cbState = PHY_SINGLE_CHANNEL_CENTERED;
+
+    if(!pMac->lim.apChanWidth)
+    {
+        return htSecondaryChannelOffset;
+    }
+
+    if ( (htSecondaryChannelOffset 
+                 == PHY_DOUBLE_CHANNEL_LOW_PRIMARY)
+       )
+    {
+        if ((channel + 2 ) == pMac->lim.apCenterChan )
+            cbState =  PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED;
+        else if ((channel + 6 ) == pMac->lim.apCenterChan )
+            cbState =  PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW;
+        else if ((channel - 2 ) == pMac->lim.apCenterChan )
+            cbState =  PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH;
+        else 
+            limLog (pMac, LOGP, 
+                       FL("Invalid Channel Number = %d Center Chan = %d \n"), 
+                                 channel, pMac->lim.apCenterChan);
+    }
+    if ( (htSecondaryChannelOffset 
+                 == PHY_DOUBLE_CHANNEL_HIGH_PRIMARY)
+       )
+    {
+        if ((channel - 2 ) == pMac->lim.apCenterChan )
+            cbState =  PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED;
+        else if ((channel + 2 ) == pMac->lim.apCenterChan )
+            cbState =  PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW;
+        else if ((channel - 6 ) == pMac->lim.apCenterChan )
+            cbState =  PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH;
+        else 
+           limLog (pMac, LOGP, 
+                         FL("Invalid Channel Number = %d Center Chan = %d \n"),
+                                            channel, pMac->lim.apCenterChan);
+    }
+    return cbState;
+}
+
+#endif
+
 void 
-limSetChannel(tpAniSirGlobal pMac, tANI_U32 titanHtcap, tANI_U8 channel, tPowerdBm maxTxPower, tANI_U8 peSessionId)
+limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId)
 {
 #if !defined WLAN_FEATURE_VOWIFI
     tANI_U32 localPwrConstraint;
 #endif
+    tpPESession peSession;
 
-    // Setup the CB State appropriately, prior to
-    // issuing a dphChannelChange(). This is done
-    // so that if CB is enabled, the CB Secondary
-    // Channel is setup correctly
-    
-     /* if local CB admin state is off or join req CB admin state is off, don't bother with CB channel setup */
-    PELOG1(limLog(pMac, LOG1, FL("Before : gCbState = 0x%x, gCbmode = %x\n"), pMac->lim.gCbState, pMac->lim.gCbMode);)
-    if(GET_CB_ADMIN_STATE(pMac->lim.gCbState) &&
-                    SME_GET_CB_ADMIN_STATE(titanHtcap)) {
-        PELOG1(limLog(pMac, LOG1, FL("station doing channel bonding\n"));)
-        setupCBState( pMac, (tAniCBSecondaryMode)SME_GET_CB_OPER_STATE(titanHtcap));
-    }else {
-        PELOG1(limLog(pMac, LOG1, FL("station not doing channel bonding\n"));)
-        setupCBState(pMac, eANI_CB_SECONDARY_NONE);
+    peSession = peFindSessionBySessionId (pMac, peSessionId);
+
+    if ( NULL == peSession)
+    {
+       limLog (pMac, LOGP, FL("Invalid PE session = %d\n"), peSessionId);
+       return;
     }
-
-    PELOG1(limLog(pMac, LOG1, FL("After :gCbState = 0x%x, gCbmode = %x\n"), pMac->lim.gCbState, pMac->lim.gCbMode);)
-
-    #if 0
-    if (wlan_cfgSetInt(pMac, WNI_CFG_CURRENT_CHANNEL, channel) != eSIR_SUCCESS) {
-           limLog(pMac, LOGP, FL("could not set CURRENT_CHANNEL at CFG\n"));
-           return;
-    }
-    #endif // TO SUPPORT BT-AMP
-
 #if defined WLAN_FEATURE_VOWIFI  
-    limSendSwitchChnlParams( pMac, channel, limGetPhyCBState( pMac ), maxTxPower, peSessionId);
+#ifdef WLAN_FEATURE_11AC
+    if ( peSession->vhtCapability )
+    {
+        limSendSwitchChnlParams( pMac, channel, limGet11ACPhyCBState( pMac,channel,secChannelOffset ), maxTxPower, peSessionId);
+    }
+    else
+#endif
+    {
+        limSendSwitchChnlParams( pMac, channel, secChannelOffset, maxTxPower, peSessionId);
+    }
 #else
     if (wlan_cfgGetInt(pMac, WNI_CFG_LOCAL_POWER_CONSTRAINT, &localPwrConstraint) != eSIR_SUCCESS) {
            limLog(pMac, LOGP, FL("could not read WNI_CFG_LOCAL_POWER_CONSTRAINT from CFG\n"));
            return;
     }
     // Send WDA_CHNL_SWITCH_IND to HAL
-    limSendSwitchChnlParams( pMac, channel, limGetPhyCBState( pMac ), (tPowerdBm)localPwrConstraint, peSessionId);
+#ifdef WLAN_FEATURE_11AC
+    if ( peSession->vhtCapability && pMac->lim.vhtCapabilityPresentInBeacon)
+    {
+        limSendSwitchChnlParams( pMac, channel, limGet11ACPhyCBState( pMac,channel,secChannelOffset ), maxTxPower, peSessionId);
+    }
+    else
 #endif
-   
+    {
+        limSendSwitchChnlParams( pMac, channel, secChannelOffset, (tPowerdBm)localPwrConstraint, peSessionId);
+    }
+#endif
+
  }
-
-
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
index 8bd6a01..f3256a8 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
@@ -50,15 +50,21 @@
 #include "limSendMessages.h"
 #include "limIbssPeerMgmt.h"
 #include "limSession.h"
+#include "limSessionUtils.h"
 #if defined WLAN_FEATURE_VOWIFI
 #include "rrmApi.h"
 #endif
 #if defined WLAN_FEATURE_VOWIFI_11R
 #include <limFT.h>
 #endif
+#include "wlan_qct_wda.h"
 
 static void limHandleSmeJoinResult(tpAniSirGlobal, tSirResultCodes, tANI_U16,tpPESession);
+static void limHandleSmeReaasocResult(tpAniSirGlobal, tSirResultCodes, tANI_U16, tpPESession);
 void limProcessMlmScanCnf(tpAniSirGlobal, tANI_U32 *);
+#ifdef FEATURE_OEM_DATA_SUPPORT
+void limProcessMlmOemDataReqCnf(tpAniSirGlobal, tANI_U32 *);
+#endif
 void limProcessMlmJoinCnf(tpAniSirGlobal, tANI_U32 *);
 void limProcessMlmAuthCnf(tpAniSirGlobal, tANI_U32 *);
 void limProcessMlmStartCnf(tpAniSirGlobal, tANI_U32 *);
@@ -114,6 +120,11 @@
             limProcessMlmScanCnf(pMac, pMsgBuf);
             break;
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+        case LIM_MLM_OEM_DATA_CNF:
+            limProcessMlmOemDataReqCnf(pMac, pMsgBuf);
+            break;
+#endif
 
         case LIM_MLM_AUTH_CNF:
             limProcessMlmAuthCnf(pMac, pMsgBuf);
@@ -201,7 +212,7 @@
         //case eLIM_SME_LINK_EST_WT_SCAN_STATE:  //TO SUPPORT BT-AMP
         //case eLIM_SME_NORMAL_CHANNEL_SCAN_STATE:   //TO SUPPORT BT-AMP
             pMac->lim.gLimSmeState = pMac->lim.gLimPrevSmeState;
-            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, NO_SESSION, pMac->lim.gLimSmeState));
             pMac->lim.gLimSystemInScanLearnMode = 0;
             break;
         default:
@@ -270,6 +281,43 @@
     }
 } /*** end limProcessMlmScanCnf() ***/
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+/**
+ * limProcessMlmOemDataReqCnf()
+ *
+ *FUNCTION:
+ * This function is called to processes LIM_MLM_OEM_DATA_REQ_CNF
+ * message from MLM State machine.
+ *
+ *LOGIC:
+ *
+ *ASSUMPTIONS:
+ *
+ *NOTE:
+ *
+ * @param pMac       Pointer to Global MAC structure
+ * @param pMsgBuf    A pointer to the MLM message buffer
+ *
+ * @return None
+ */
+
+void limProcessMlmOemDataReqCnf(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
+{
+    tLimMlmOemDataRsp*    measRsp;
+
+    tSirResultCodes resultCode = eSIR_SME_SUCCESS;
+
+    measRsp = (tLimMlmOemDataRsp*)(pMsgBuf);
+
+    //Now send the meas confirm message to the sme
+    limSendSmeOemDataRsp(pMac, (tANI_U32*)measRsp, resultCode);
+
+    //Dont free the memory here. It will be freed up by the callee
+
+    return;
+}
+#endif
 
 /**
  * limProcessMlmStartCnf()
@@ -333,7 +381,7 @@
          * Beacon file register.
          */
         psessionEntry->limSmeState = eLIM_SME_NORMAL_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
         if(psessionEntry->bssType == eSIR_BTAMP_STA_MODE)
         {
              limLog(pMac, LOG1, FL("*** Started BSS in BT_AMP STA SIDE***\n"));
@@ -427,7 +475,7 @@
     {
         /// Join failure
         psessionEntry->limSmeState = eLIM_SME_JOIN_FAILURE_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, psessionEntry->limSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
         /// Send Join response to Host
         limHandleSmeJoinResult(pMac, resultCode, ((tLimMlmJoinCnf *) pMsgBuf)->protStatusCode, psessionEntry );
     }
@@ -562,12 +610,10 @@
             {
                 PELOGE(limLog(pMac, LOGE, FL("Auth Failure occurred.\n"));)
                 psessionEntry->limSmeState = eLIM_SME_JOIN_FAILURE_STATE;
-                MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+                MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
                 psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
-                MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
-                if(limSetLinkState(pMac, eSIR_LINK_IDLE_STATE,psessionEntry->bssId,
-                    psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS)
-                   PELOGE(limLog(pMac, LOGE,  FL("Failed to set the LinkState.\n"));)
+                MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
+
 #if defined(ANI_AP_CLIENT_SDK)
                 if (psessionEntry->limSystemRole == eLIM_STA_ROLE)
                 {
@@ -594,7 +640,7 @@
                  * Send Pre-auth failure response to host
                  */
                 psessionEntry->limSmeState = psessionEntry->limPrevSmeState;
-                MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+                MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
                 limSendSmeAuthRsp(
                             pMac,
                             ((tLimMlmAuthCnf *) pMsgBuf)->resultCode,
@@ -661,9 +707,10 @@
 
             pMlmAssocReq->capabilityInfo = caps;
            PELOG3(limLog(pMac, LOG3,
-               FL("Capabilities to be used in AssocReq=0x%X, privacy bit=%x\n"),
+               FL("Capabilities to be used in AssocReq=0x%X, privacy bit=%x shortSlotTime %x\n"),
                caps,
-               ((tpSirMacCapabilityInfo) &pMlmAssocReq->capabilityInfo)->privacy);)
+               ((tpSirMacCapabilityInfo) &pMlmAssocReq->capabilityInfo)->privacy,
+               ((tpSirMacCapabilityInfo) &pMlmAssocReq->capabilityInfo)->shortSlotTime);)
 
            /* If telescopic beaconing is enabled, set listen interval to
               WNI_CFG_TELE_BCN_MAX_LI */
@@ -702,7 +749,7 @@
             pMlmAssocReq->sessionId = psessionEntry->peSessionId;
             psessionEntry->limPrevSmeState = psessionEntry->limSmeState;
             psessionEntry->limSmeState     = eLIM_SME_WT_ASSOC_STATE;
-            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
             limPostMlmMessage(pMac,
                               LIM_MLM_ASSOC_REQ,
                               (tANI_U32 *) pMlmAssocReq);
@@ -714,7 +761,7 @@
              * Send Pre-auth response to host
              */
             psessionEntry->limSmeState = psessionEntry->limPrevSmeState;
-            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
             limSendSmeAuthRsp(
                         pMac,
                         ((tLimMlmAuthCnf *) pMsgBuf)->resultCode,
@@ -778,7 +825,7 @@
         // Association failure
         PELOG1(limLog(pMac, LOG1, FL("*** Association failure ***\n"));)
         psessionEntry->limSmeState = eLIM_SME_JOIN_FAILURE_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, pMac->lim.gLimSmeState));
 #if defined(ANI_AP_CLIENT_SDK)
         if (psessionEntry->limSystemRole == eLIM_STA_ROLE)
         {
@@ -803,7 +850,7 @@
         // Successful Association
         PELOG1(limLog(pMac, LOG1, FL("*** Associated with BSS ***\n"));)
         psessionEntry->limSmeState = eLIM_SME_LINK_EST_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
         /**
          * Need to send Join response with
          * Association success to Host.
@@ -873,7 +920,7 @@
         PELOG1(limLog(pMac, LOG1, FL("*** Reassociated with new BSS ***\n"));)
 
         psessionEntry->limSmeState = eLIM_SME_LINK_EST_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
 
         /**
         * Need to send Reassoc response with
@@ -888,7 +935,7 @@
         *   but we still have the link with the Older AP
         */
         psessionEntry->limSmeState = eLIM_SME_LINK_EST_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
 
         /**
         * Need to send Reassoc response with
@@ -900,15 +947,12 @@
     }else {
         // Reassociation failure
         psessionEntry->limSmeState = eLIM_SME_JOIN_FAILURE_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
         /**
          * Need to send Reassoc response with
          * Association failure to Host.
          */
-        limSendSmeJoinReassocRsp(
-                           pMac, eWNI_SME_REASSOC_RSP,
-                           pLimMlmReassocCnf->resultCode, pLimMlmReassocCnf->protStatusCode,psessionEntry,
-                           psessionEntry->smeSessionId,psessionEntry->transactionId);
+        limHandleSmeReaasocResult(pMac, pLimMlmReassocCnf->resultCode, pLimMlmReassocCnf->protStatusCode, psessionEntry);
     }
 } /*** end limProcessMlmReassocCnf() ***/
 
@@ -982,7 +1026,7 @@
     msgQ.type = eWNI_SME_REASSOC_IND;
     msgQ.bodyptr = pSirSmeReassocInd;
     msgQ.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
     limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_IND_EVENT, psessionEntry, 0, 0);
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -1046,7 +1090,7 @@
     msgQ.type = eWNI_SME_AUTH_IND;
     msgQ.bodyptr = pSirSmeAuthInd;
     msgQ.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
     limDiagEventReport(pMac, WLAN_PE_DIAG_AUTH_IND_EVENT, NULL, 0, 0);
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -1095,7 +1139,6 @@
                                 pAssocInd->addIE.length);
 
     // Copy the new TITAN capabilities
-    pSirSmeAssocInd->titanHtCaps = pAssocInd->titanHtCaps;
     pSirSmeAssocInd->spectrumMgtIndicator = pAssocInd->spectrumMgtIndicator;
     if (pAssocInd->spectrumMgtIndicator == eSIR_TRUE)
     {
@@ -1195,7 +1238,7 @@
 #ifdef WLAN_SOFTAP_FEATURE
    pSirSmeAssocInd->reassocReq = pStaDs->mlmStaContext.subType;
 #endif
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
     limDiagEventReport(pMac, WLAN_PE_DIAG_ASSOC_IND_EVENT, psessionEntry, 0, 0);
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -1271,7 +1314,7 @@
         case eLIM_STA_ROLE:
         case eLIM_BT_AMP_STA_ROLE:
         psessionEntry->limSmeState = eLIM_SME_WT_DISASSOC_STATE;
-            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
             break;
         default: // eLIM_AP_ROLE //eLIM_BT_AMP_AP_ROLE
                 PELOG1(limLog(pMac, LOG1,
@@ -1357,7 +1400,7 @@
                 psessionEntry->limSmeState = psessionEntry->limPrevSmeState;
             else
                 psessionEntry->limSmeState = eLIM_SME_OFFLINE_STATE;
-            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
             // Send Promiscuous mode response to host
             limSendSmePromiscuousModeRsp(pMac);
         }
@@ -1367,7 +1410,7 @@
                 psessionEntry->limSmeState = psessionEntry->limPrevSmeState;
             else
                 psessionEntry->limSmeState = eLIM_SME_IDLE_STATE;
-            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
             limSendSmeDisassocNtf(pMac, pMlmDisassocCnf->peerMacAddr,
                                   resultCode,
                                   pMlmDisassocCnf->disassocTrigger,
@@ -1420,7 +1463,7 @@
         case eLIM_STA_ROLE:
         case eLIM_BT_AMP_STA_ROLE:
             psessionEntry->limSmeState = eLIM_SME_WT_DEAUTH_STATE;
-            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, psessionEntry->limSmeState));
+            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
 
         default: // eLIM_AP_ROLE
             {
@@ -1516,7 +1559,7 @@
         }
         else
             psessionEntry->limSmeState = psessionEntry->limPrevSmeState;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
 
         if (pMac->lim.gLimRspReqd)
             pMac->lim.gLimRspReqd = false;
@@ -1606,7 +1649,7 @@
             if ((psessionEntry->limSystemRole == eLIM_STA_ROLE)||(psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE))
             {
                 psessionEntry->limSmeState = eLIM_SME_IDLE_STATE;
-                MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+                MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
 
 #if defined(ANI_AP_CLIENT_SDK)
                 // Whenever there is a disassoc notification, make sure the bssId is cleared so that
@@ -1669,13 +1712,13 @@
 limProcessMlmSetKeysCnf(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
 {
     // Prepare and send SME_SETCONTEXT_RSP message
-    tLimMlmSetKeysCnf  *pMlmSetKeysCnf;
+    tLimMlmSetKeysCnf   *pMlmSetKeysCnf;
     tpPESession        psessionEntry;
 
     if(pMsgBuf == NULL)
     {
-           PELOGE(limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n"));)
-           return;
+        PELOGE(limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n"));)
+        return;
     }
     pMlmSetKeysCnf = (tLimMlmSetKeysCnf *) pMsgBuf;
     if ((psessionEntry = peFindSessionBySessionId(pMac, pMlmSetKeysCnf->sessionId))== NULL)
@@ -1718,13 +1761,13 @@
 limProcessMlmRemoveKeyCnf(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
 {
     // Prepare and send SME_REMOVECONTEXT_RSP message
-    tLimMlmRemoveKeyCnf  *pMlmRemoveKeyCnf;
+    tLimMlmRemoveKeyCnf *pMlmRemoveKeyCnf;
     tpPESession          psessionEntry;
 
     if(pMsgBuf == NULL)
     {
-           PELOGE(limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n"));)
-           return;
+        PELOGE(limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n"));)
+        return;
     }
     pMlmRemoveKeyCnf = (tLimMlmRemoveKeyCnf *) pMsgBuf;
     if((psessionEntry = peFindSessionBySessionId(pMac,pMlmRemoveKeyCnf->sessionId))== NULL)
@@ -1736,7 +1779,7 @@
         FL("Received MLM_REMOVEKEYS_CNF with resultCode = %d\n"),
         pMlmRemoveKeyCnf->resultCode );
     limSendSmeRemoveKeyRsp(pMac,
-                            pMlmRemoveKeyCnf->peerMacAddr,
+                           pMlmRemoveKeyCnf->peerMacAddr,
                             (tSirResultCodes) pMlmRemoveKeyCnf->resultCode,psessionEntry,
                             psessionEntry->smeSessionId,psessionEntry->transactionId);
 } /*** end limProcessMlmRemoveKeyCnf() ***/
@@ -1790,6 +1833,8 @@
             pStaDs->mlmStaContext.protStatusCode = protStatusCode;
             //Done: 7-27-2009. JIM_FIX_ME: at the end of limCleanupRxPath, make sure PE is sending eWNI_SME_JOIN_RSP to SME
             limCleanupRxPath(pMac, pStaDs, psessionEntry);
+            palFreeMemory( pMac->hHdd, psessionEntry->pLimJoinReq);
+            psessionEntry->pLimJoinReq = NULL;
             return;
         }
     }
@@ -1801,6 +1846,9 @@
     {
         if(NULL != psessionEntry)
         {
+           if(limSetLinkState(pMac, eSIR_LINK_IDLE_STATE,psessionEntry->bssId,
+                psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS)
+               PELOGE(limLog(pMac, LOGE,  FL("Failed to set the LinkState.\n"));)
             peDeleteSession(pMac,psessionEntry);
             psessionEntry = NULL;
         }
@@ -1810,6 +1858,68 @@
 } /*** end limHandleSmeJoinResult() ***/
 
 /**
+ * limHandleSmeReaasocResult()
+ *
+ *FUNCTION:
+ * This function is called to process reassoc failures
+ * upon receiving REASSOC_CNF with a failure code or
+ * MLM_REASSOC_CNF with a success code in case of STA role 
+ *
+ *LOGIC:
+ *
+ *ASSUMPTIONS:
+ *
+ *NOTE:
+ *
+ * @param  pMac         Pointer to Global MAC structure
+ * @param  resultCode   Failure code to be sent
+ *
+ *
+ * @return None
+ */
+static void
+limHandleSmeReaasocResult(tpAniSirGlobal pMac, tSirResultCodes resultCode, tANI_U16 protStatusCode, tpPESession psessionEntry)
+{
+    tpDphHashNode pStaDs = NULL;
+    tANI_U8         smesessionId;
+    tANI_U16        smetransactionId;
+
+    if(psessionEntry == NULL)
+    {
+        PELOGE(limLog(pMac, LOGE,FL("psessionEntry is NULL \n"));)
+        return;
+    }
+    smesessionId = psessionEntry->smeSessionId;
+    smetransactionId = psessionEntry->transactionId;
+    /* When associations is failed , delete the session created  and pass NULL  to  limsendsmeJoinReassocRsp() */
+    if(resultCode != eSIR_SME_SUCCESS)
+    {
+          pStaDs = dphGetHashEntry(pMac, DPH_STA_HASH_INDEX_PEER, &psessionEntry->dph.dphHashTable);
+          if (pStaDs != NULL)
+          {
+            pStaDs->mlmStaContext.disassocReason = eSIR_MAC_UNSPEC_FAILURE_REASON;
+            pStaDs->mlmStaContext.cleanupTrigger = eLIM_JOIN_FAILURE;
+            pStaDs->mlmStaContext.resultCode = resultCode;
+            pStaDs->mlmStaContext.protStatusCode = protStatusCode;
+            limCleanupRxPath(pMac, pStaDs, psessionEntry);
+            return;
+        }
+    }
+
+    //Delete teh session if REASSOC failure occurred.
+    if(resultCode != eSIR_SME_SUCCESS)
+    {
+        if(NULL != psessionEntry)
+        {
+            peDeleteSession(pMac,psessionEntry);
+            psessionEntry = NULL;
+        }
+    }
+    limSendSmeJoinReassocRsp(pMac, eWNI_SME_REASSOC_RSP, resultCode, protStatusCode,psessionEntry,
+                                                smesessionId,  smetransactionId);
+} /*** end limHandleSmeReassocResult() ***/
+
+/**
   * limProcessMlmAddStaRsp()
  *
  *FUNCTION:
@@ -1833,13 +1943,6 @@
     //in the case of nested request the new request initiated from the response will take care of resetting
     //the deffered flag.
     SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
-#ifdef ANI_PRODUCT_TYPE_AP
-    if (psessionEntry->limSystemRole == eLIM_AP_ROLE)
-    {
-        limProcessApMlmAddStaRsp(pMac, limMsgQ);
-        return;
-    }
-#endif
     if ((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE)
 #ifdef WLAN_SOFTAP_FEATURE
     || (psessionEntry->limSystemRole == eLIM_AP_ROLE)
@@ -1890,7 +1993,7 @@
             FL( "Unable to get the DPH Hash Entry for AID - %d\n" ),
             DPH_STA_HASH_INDEX_PEER);
         psessionEntry->limMlmState = eLIM_MLM_LINK_ESTABLISHED_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
         /*
         * Storing the self StaIndex(Generated by HAL) in session context,
         * instead of storing it in DPH Hash entry for Self STA.
@@ -1900,7 +2003,7 @@
         psessionEntry->staId = pAddStaParams->staIdx;
         //if the AssocRsp frame is not acknowledged, then keep alive timer will take care of the state
         limReactivateHeartBeatTimer(pMac, psessionEntry);
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_KEEPALIVE_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_KEEPALIVE_TIMER));
 
         //assign the sessionId to the timer Object
         pMac->lim.limTimers.gLimKeepaliveTimer.sessionId = psessionEntry->peSessionId;
@@ -1943,13 +2046,6 @@
    //     return;
   //  }
   SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
- #ifdef ANI_PRODUCT_TYPE_AP
-    if (psessionEntry->limSystemRole == eLIM_AP_ROLE)
-    {
-        limProcessApMlmDelBssRsp(pMac, limMsgQ);
-        return;
-    }
-#endif
 
     if (((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE)  ||
          (psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE)
@@ -2003,6 +2099,10 @@
     else
     {
         limLog( pMac, LOGP, FL( "DEL BSS failed!\n" ) );
+        if( NULL != pDelBssParams )
+        {
+            palFreeMemory( pMac->hHdd, (void *) pDelBssParams );
+    	}
         return;
     }
    end:
@@ -2028,58 +2128,6 @@
     return;
 }
 
-
-#ifdef ANI_PRODUCT_TYPE_AP
-void limProcessApMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ)
-{
-    tSirResultCodes rc = eSIR_SME_SUCCESS;
-    tpDeleteBssParams pDelBss = (tpDeleteBssParams) limMsgQ->bodyptr;
-    if (pDelBss == NULL)
-    {
-        PELOGE(limLog(pMac, LOGE, FL("BSS: DEL_BSS_RSP with no body!\n"));)
-        rc = eSIR_SME_REFUSED;
-        goto end;
-    }
-    if( eLIM_MLM_WT_DEL_BSS_RSP_STATE != pMac->lim.gLimMlmState)
-    {
-            limLog( pMac, LOGE,
-                        FL( "Received unexpected WDA_DEL_BSS_RSP in state %X\n" ), pMac->lim.gLimMlmState);
-            rc = eSIR_SME_REFUSED;
-           goto end;
-    }
-    if (pDelBss->status != eHAL_STATUS_SUCCESS)
-    {
-        limLog(pMac, LOGP, FL("BSS: DEL_BSS_RSP error (%x) Bss %d "),
-               pDelBss->status, pDelBss->bssIdx);
-        rc = eSIR_SME_STOP_BSS_FAILURE;
-        goto end;
-    }
-    //Not used for station or softap.
-    rc = limSetLinkState(pMac, eSIR_LINK_IDLE_STATE);
-    if( rc != eSIR_SUCCESS )
-        goto end;
-    /** Softmac may send all the buffered packets right after resuming the transmission hence
-     * to occupy the medium during non channel occupancy period. So resume the transmission after
-     * HAL gives back the response.
-     */
-    if (LIM_IS_RADAR_DETECTED(pMac))
-    {
-         limFrameTransmissionControl(pMac, eLIM_TX_BSS_BUT_BEACON, eLIM_RESUME_TX);
-         LIM_SET_RADAR_DETECTED(pMac, eANI_BOOLEAN_FALSE);
-    }
-    dphHashTableClassInit(pMac);
-    limDeletePreAuthList(pMac);
-    //Is it ok to put LIM into IDLE state.
-    pMac->lim.gLimMlmState->limMlmState = eLIM_MLM_IDLE_STATE;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
-
-    end:
-    limSendSmeRsp(pMac, eWNI_SME_STOP_BSS_RSP, rc);
-    if(pDelBss != NULL)
-        palFreeMemory( pMac->hHdd, (void *) pDelBss );
-}
-#endif
-/* This code is same as limProcessApMlmDelBssRsp used for BT-AMP  */
 void limProcessBtAmpApMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry)
 {
     tSirResultCodes rc = eSIR_SME_SUCCESS;
@@ -2090,6 +2138,8 @@
     if(psessionEntry == NULL)
     {
         limLog(pMac, LOGE,FL("Session entry passed is NULL\n"));
+        if(pDelBss != NULL)
+            palFreeMemory( pMac->hHdd, (void *) pDelBss );
         return;
     }
 
@@ -2102,11 +2152,11 @@
     pMac->lim.gLimMlmState = eLIM_MLM_IDLE_STATE;
     if( eLIM_MLM_WT_DEL_BSS_RSP_STATE != psessionEntry->limMlmState)
     {
-        limLog(pMac, LOGE,
+            limLog( pMac, LOGE,
                FL( "Received unexpected WDA_DEL_BSS_RSP in state %X" ),
                psessionEntry->limMlmState);
-        rc = eSIR_SME_REFUSED;
-        goto end;
+            rc = eSIR_SME_REFUSED;
+           goto end;
     }
     if (pDelBss->status != eHAL_STATUS_SUCCESS)
     {
@@ -2126,11 +2176,13 @@
      * to occupy the medium during non channel occupancy period. So resume the transmission after
      * HAL gives back the response.
      */
+#if 0 //TODO: How to handle this per session
     if (LIM_IS_RADAR_DETECTED(pMac))
     {
          limFrameTransmissionControl(pMac, eLIM_TX_BSS_BUT_BEACON, eLIM_RESUME_TX);
          LIM_SET_RADAR_DETECTED(pMac, eANI_BOOLEAN_FALSE);
     }
+#endif
     dphHashTableClassInit(pMac, &psessionEntry->dph.dphHashTable);//TBD-RAJESH is it needed ?
     limDeletePreAuthList(pMac);
 #ifdef WLAN_SOFTAP_FEATURE
@@ -2158,16 +2210,11 @@
     if((psessionEntry = peFindSessionBySessionId(pMac,pDeleteStaParams->sessionId))==NULL)
     {
         limLog(pMac, LOGP,FL("Session Does not exist for given sessionID\n"));
+        if(pDeleteStaParams != NULL)
+            palFreeMemory( pMac->hHdd, (void *) pDeleteStaParams );
         return;
     }
 
-#ifdef ANI_PRODUCT_TYPE_AP
-    if (psessionEntry->limSystemRole == eLIM_AP_ROLE)
-    {
-        limProcessApMlmDelStaRsp(pMac, limMsgQ);
-        return;
-    }
-#endif
     if ((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE)
 #ifdef WLAN_SOFTAP_FEATURE
       || (psessionEntry->limSystemRole == eLIM_AP_ROLE)
@@ -2182,89 +2229,6 @@
 #endif
 }
 
-#ifdef ANI_PRODUCT_TYPE_AP
-void limProcessApMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ )
-{
-    tpDeleteStaParams pDelStaParams = (tpDeleteStaParams) limMsgQ->bodyptr;
-    tpDphHashNode pStaDs = dphGetHashEntry(pMac, pDelStaParams->assocId);
-    tSirResultCodes statusCode = eSIR_SME_SUCCESS;
-    if( eHAL_STATUS_SUCCESS == pDelStaParams->status )
-    {
-           limLog( pMac, LOGW,
-                      FL( "AP received the DEL_STA_RSP for assocID: %X.\n"), pDelStaParams->assocId);
-        if(pStaDs == NULL)
-        {
-             limLog( pMac, LOGE,
-                  FL( "DPH Entry for STA %X missing.\n"), pDelStaParams->assocId);
-             statusCode = eSIR_SME_REFUSED;
-             goto end;
-        }
-         if(( eLIM_MLM_WT_DEL_STA_RSP_STATE != pStaDs->mlmStaContext.mlmState) &&
-            ( eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE != pStaDs->mlmStaContext.mlmState))
-        {
-            limLog( pMac, LOGE,
-              FL( "Received unexpected WDA_DEL_STA_RSP in state %s for staId %d assocId %d \n" ),
-               limMlmStateStr(pStaDs->mlmStaContext.mlmState), pStaDs->staIndex, pStaDs->assocId);
-            statusCode = eSIR_SME_REFUSED;
-           goto end;
-        }
-
-        PELOG1(limLog( pMac, LOG1,
-            FL("Deleted STA AssocID %d staId %d MAC "),
-            pStaDs->assocId, pStaDs->staIndex);
-        limPrintMacAddr(pMac, pStaDs->staAddr, LOG1);)
-       if(eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE == pStaDs->mlmStaContext.mlmState)
-       {
-            if( 0 != limMsgQ->bodyptr )
-            {
-              palFreeMemory( pMac->hHdd, (void *) pDelStaParams );
-            }
-            if (limAddSta(pMac, pStaDs,psessionEntry) != eSIR_SUCCESS)
-            {
-                PELOGE(limLog(pMac, LOGE,
-                       FL("could not Add STA with assocId=%d\n"),
-                       pStaDs->assocId);)
-              // delete the TS if it has already been added.
-               // send the response with error status.
-                if(pStaDs->qos.addtsPresent)
-                {
-                  tpLimTspecInfo pTspecInfo;
-                  if(eSIR_SUCCESS == limTspecFindByAssocId(pMac, pStaDs->assocId,
-                            &pStaDs->qos.addts.tspec, &pMac->lim.tspecInfo[0], &pTspecInfo))
-                  {
-                    limAdmitControlDeleteTS(pMac, pStaDs->assocId, &pStaDs->qos.addts.tspec.tsinfo,
-                                                            NULL, &pTspecInfo->idx);
-                  }
-                }
-                limRejectAssociation(pMac,
-                         pStaDs->staAddr,
-                         pStaDs->mlmStaContext.subType,
-                         true, pStaDs->mlmStaContext.authType,
-                         pStaDs->assocId, true,
-                         (tSirResultCodes) eSIR_MAC_UNSPEC_FAILURE_STATUS);
-            }
-            return;
-        }
-   }
-    else
-    {
-        limLog( pMac, LOGW,
-             FL( "DEL STA failed!\n" ));
-        statusCode = eSIR_SME_REFUSED;
-    }
-    end:
-    if( 0 != limMsgQ->bodyptr )
-    {
-      palFreeMemory( pMac->hHdd, (void *) pDelStaParams );
-    }
-    if(eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE != pStaDs->mlmStaContext.mlmState)
-    {
-       limPrepareAndSendDelStaCnf(pMac, pStaDs, statusCode,psessionEntry);
-    }
-      return;
-}
-#endif
-/* This is the copy of  limProcessApMlmDelStaRsp used for BT-AMP Support  */
 void limProcessBtAmpApMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry)
 {
     tpDeleteStaParams pDelStaParams = (tpDeleteStaParams) limMsgQ->bodyptr;
@@ -2403,95 +2367,6 @@
     return;
 }
 
-#ifdef ANI_PRODUCT_TYPE_AP
-void limProcessApMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ )
-{
-    tpAddStaParams pAddStaParams = (tpAddStaParams) limMsgQ->bodyptr;
-    tpDphHashNode pStaDs = dphGetHashEntry(pMac, pAddStaParams->assocId);
-    if(pStaDs == NULL)
-    {
-        //TODO: any response to be sent out here ?
-        limLog( pMac, LOGE, FL( "DPH Entry for STA %X missing.\n"), pAddStaParams->assocId);
-        goto end;
-    }
-    //
-    // TODO & FIXME_GEN4
-    // Need to inspect tSirMsgQ.reserved for a valid Dialog token!
-    //
-    //TODO: any check for pMac->lim.gLimMlmState ?
-    if( eLIM_MLM_WT_ADD_STA_RSP_STATE != pStaDs->mlmStaContext.mlmState)
-    {
-        //TODO: any response to be sent out here ?
-        limLog( pMac, LOGE,
-                FL( "Received unexpected WDA_ADD_STA_RSP in state %X\n" ),
-                pStaDs->mlmStaContext.mlmState);
-        goto end;
-    }
-    if(eHAL_STATUS_SUCCESS != pAddStaParams->status)
-    {
-        PELOGE(limLog(pMac, LOGE, FL("Error! rcvd delSta rsp from HAL with status %d\n"),pAddStaParams->status);)
-        limRejectAssociation(pMac, pStaDs->staAddr,
-                 pStaDs->mlmStaContext.subType,
-                 true, pStaDs->mlmStaContext.authType,
-                 pStaDs->assocId, true,
-                 (tSirResultCodes) eSIR_MAC_UNSPEC_FAILURE_STATUS);
-        goto end;
-    }
-    pStaDs->bssId = pAddStaParams->bssIdx;
-    pStaDs->staIndex = pAddStaParams->staIdx;
-    pStaDs->ucUcastSig    = pAddStaParams->ucUcastSig;
-    pStaDs->ucBcastSig    = pAddStaParams->ucBcastSig;
-    if(pStaDs->qos.addtsPresent)
-    {
-        //need to send halMsg_AddTs to HAL.
-        tpLimTspecInfo pTspecInfo;
-        if(eSIR_SUCCESS ==
-           limTspecFindByAssocId(pMac, pStaDs->assocId, &pStaDs->qos.addts.tspec,
-                                 &pMac->lim.tspecInfo[0], &pTspecInfo))
-        {
-            if(eSIR_SUCCESS != limSendHalMsgAddTs(pMac, pStaDs->staIndex, pTspecInfo->idx, pStaDs->qos.addts.tspec))
-            {
-                // delete the TS that has already been added.
-                // send the response with error status.
-                limAdmitControlDeleteTS(pMac, pStaDs->assocId, &pStaDs->qos.addts.tspec.tsinfo, NULL, &pTspecInfo->idx);
-                PELOGE(limLog(pMac, LOGE,
-                 FL("limSendHalMsgAddTs failed for STA with assocId=%d\n"),
-                 pStaDs->assocId);)
-                limRejectAssociation(pMac,
-                   pStaDs->staAddr, pStaDs->mlmStaContext.subType,
-                   true, pStaDs->mlmStaContext.authType,
-                   pStaDs->assocId, false,
-                   (tSirResultCodes) eSIR_MAC_UNSPEC_FAILURE_STATUS);
-                if( 0 != limMsgQ->bodyptr )
-                {
-                    palFreeMemory( pMac->hHdd, (void *) pAddStaParams );
-                }
-                limDelSta(pMac, pStaDs, true,psessionEntry);
-                return;
-            }
-        }
-    }
-    //if the AssocRsp frame is not acknowledged, then keep alive timer will take care of the state
-    pStaDs->valid = 1;
-    pStaDs->mlmStaContext.mlmState = eLIM_MLM_LINK_ESTABLISHED_STATE;
-    PELOG1(limLog( pMac, LOG1,
-            FL("STA AssocID %d staId %d MAC "),
-            pStaDs->assocId,
-            pStaDs->staIndex);
-    limPrintMacAddr(pMac, pStaDs->staAddr, LOG1);)
-    // Send Re/Association Response with
-    // status code to requesting STA.
-    limSendAssocRspMgmtFrame(pMac, eSIR_SUCCESS, pStaDs->assocId, pStaDs->staAddr,
-                             pStaDs->mlmStaContext.subType, pStaDs,psessionEntry);
-end:
-    if( 0 != limMsgQ->bodyptr )
-    {
-        palFreeMemory( pMac->hHdd, (void *) pAddStaParams );
-    }
-    return;
-}
-#endif
-/* This is the copy of  limProcessApMlmAddStaRsp function .... used for BT-AMP AP Support */
 void limProcessBtAmpApMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry)
 {
     tpAddStaParams pAddStaParams = (tpAddStaParams) limMsgQ->bodyptr;
@@ -2602,6 +2477,8 @@
     if((psessionEntry = peFindSessionBySessionId(pMac,pAddBssParams->sessionId))== NULL)
     {
         PELOGE(limLog(pMac, LOGE,FL("session does not exist for given sessionId\n"));)
+        if( NULL != pAddBssParams )
+            palFreeMemory( pMac->hHdd, (void *) pAddBssParams );
         return;
     }
     /* Update PE session Id*/
@@ -2614,7 +2491,7 @@
             goto end;
         // Set MLME state
         psessionEntry->limMlmState = eLIM_MLM_BSS_STARTED_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId,  psessionEntry->limMlmState));
         if( eSIR_IBSS_MODE == pAddBssParams->bssType )
         {
             /** IBSS is 'active' when we receive
@@ -2625,7 +2502,7 @@
             psessionEntry->statypeForBss = STA_ENTRY_PEER; //to know session created for self/peer
             limResetHBPktCount( psessionEntry );
             limHeartBeatDeactivateAndChangeTimer(pMac, psessionEntry);
-            MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_HEART_BEAT_TIMER));
+            MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_HEART_BEAT_TIMER));
             if (limActivateHearBeatTimer(pMac) != TX_SUCCESS)
                 limLog(pMac, LOGP, FL("could not activate Heartbeat timer\n"));
         }
@@ -2717,7 +2594,7 @@
             goto end;
         // Set MLME state
         psessionEntry->limMlmState = eLIM_MLM_BSS_STARTED_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
         /** IBSS is 'active' when we receive
          * Beacon frames from other STAs that are part of same IBSS.
          * Mark internal state as inactive until then.
@@ -2726,7 +2603,7 @@
         limResetHBPktCount( psessionEntry );
         /* Timer related functions are not modified for BT-AMP : To be Done */
         limHeartBeatDeactivateAndChangeTimer(pMac, psessionEntry);
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_HEART_BEAT_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_HEART_BEAT_TIMER));
         if (limActivateHearBeatTimer(pMac) != TX_SUCCESS)
             limLog(pMac, LOGP, FL("could not activate Heartbeat timer\n"));
         psessionEntry->bssIdx     = (tANI_U8) pAddBssParams->bssIdx;
@@ -2844,14 +2721,14 @@
             // SUNIT_FIX_ME:  Set BOTH? Assume not. Please verify here and below.
             //pMac->lim.gLimMlmState = eLIM_MLM_JOINED_STATE;
             psessionEntry->limMlmState = eLIM_MLM_JOINED_STATE;
-            MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, eLIM_MLM_JOINED_STATE));
+            MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, eLIM_MLM_JOINED_STATE));
             pMlmAuthReq->sessionId = psessionEntry->peSessionId;
             psessionEntry->limPrevSmeState = psessionEntry->limSmeState;
             psessionEntry->limSmeState     = eLIM_SME_WT_AUTH_STATE;
             // remember staId in case of assoc timeout/failure handling
             psessionEntry->staId = pAddBssParams->staContext.staIdx;
 
-            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, psessionEntry->limSmeState));
+            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
             limPostMlmMessage(pMac,
                               LIM_MLM_AUTH_REQ,
                               (tANI_U32 *) pMlmAuthReq);
@@ -2861,7 +2738,7 @@
 joinFailure:
     {
         psessionEntry->limSmeState = eLIM_SME_JOIN_FAILURE_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, psessionEntry->limSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
 
         /// Send Join response to Host
         limHandleSmeJoinResult(pMac,  eSIR_SME_REFUSED, eSIR_MAC_UNSPEC_FAILURE_STATUS, psessionEntry);
@@ -2917,7 +2794,7 @@
     // start reassoc timer.
     pMac->lim.limTimers.gLimReassocFailureTimer.sessionId = psessionEntry->peSessionId;
     /// Start reassociation failure timer
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_REASSOC_FAIL_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_REASSOC_FAIL_TIMER));
     if (tx_timer_activate(&pMac->lim.limTimers.gLimReassocFailureTimer)
                                                != TX_SUCCESS)
     {
@@ -2993,18 +2870,22 @@
     pAddStaParams->updateSta = FALSE;
 
     pAddStaParams->shortPreambleSupported = (tANI_U8)psessionEntry->beaconParams.fShortPreamble;
+#ifdef WLAN_FEATURE_11AC
+    limPopulateOwnRateSet(pMac, &pAddStaParams->supportedRates, NULL, false,psessionEntry, NULL);
+#else
     limPopulateOwnRateSet(pMac, &pAddStaParams->supportedRates, NULL, false,psessionEntry);
+#endif
 
-    if( psessionEntry->htCapabality)
+    if( psessionEntry->htCapability)
     {
-        pAddStaParams->htCapable = psessionEntry->htCapabality;
+        pAddStaParams->htCapable = psessionEntry->htCapability;
 #ifdef DISABLE_GF_FOR_INTEROP
         /*
          * To resolve the interop problem with Broadcom AP,
          * where TQ STA could not pass traffic with GF enabled,
          * TQ STA will do Greenfield only with TQ AP, for
          * everybody else it will be turned off.
-        */
+         */
         if( (psessionEntry->pLimJoinReq != NULL) && (!psessionEntry->pLimJoinReq->bssDescription.aniIndicator))
         {
             limLog( pMac, LOGE, FL(" Turning off Greenfield, when adding self entry"));
@@ -3142,7 +3023,7 @@
 
          // Set MLME state
         psessionEntry->limMlmState = eLIM_MLM_WT_ADD_STA_RSP_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
         psessionEntry->statypeForBss = STA_ENTRY_PEER; //to know the session  started for self or for  peer oct6th
         // Now, send WDA_ADD_STA_REQ
         limLog( pMac, LOGW, FL( "On STA: ADD_BSS was successful\n" ));
@@ -3254,6 +3135,8 @@
     if((psessionEntry = peFindSessionBySessionId(pMac,pAddBssParams->sessionId))== NULL)
     {
         limLog( pMac, LOGE, FL( "Session Does not exist for given sessionId\n" ));
+            if( NULL != pAddBssParams )
+                palFreeMemory( pMac->hHdd, (void *) pAddBssParams );
         return;
     }
     /* update PE session Id*/
@@ -3324,14 +3207,14 @@
  */
 void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ )
 {
-    tANI_U8 respReqd = 1;
+    tANI_U8           respReqd = 1;
     tLimMlmSetKeysCnf mlmSetKeysCnf;
     tANI_U8  sessionId = 0;
     tpPESession  psessionEntry;
     SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
     palZeroMemory( pMac->hHdd, (void *)&mlmSetKeysCnf, sizeof( tLimMlmSetKeysCnf ));
    //BTAMP
-    if(NULL == limMsgQ->bodyptr)
+    if( NULL == limMsgQ->bodyptr )
     {
         PELOGE(limLog(pMac, LOGE,FL("limMsgQ bodyptr is NULL\n"));)
         return;
@@ -3340,12 +3223,13 @@
     if((psessionEntry = peFindSessionBySessionId(pMac, sessionId))== NULL)
     {
         PELOGE(limLog(pMac, LOGE,FL("session does not exist for given sessionId\n"));)
+        palFreeMemory( pMac->hHdd, (void *) limMsgQ->bodyptr );
         return;
     }
     if( eLIM_MLM_WT_SET_STA_KEY_STATE != psessionEntry->limMlmState )
     {
         // Mesg received from HAL in Invalid state!
-        limLog( pMac, LOGW, FL( "Received unexpected [Mesg Id - %d] in state %X\n" ), limMsgQ->type, pMac->lim.gLimMlmState );
+        limLog( pMac, LOGW, FL( "Received unexpected [Mesg Id - %d] in state %X\n" ), limMsgQ->type, psessionEntry->limMlmState );
         // There's not much that MLME can do at this stage...
         respReqd = 0;
     }
@@ -3354,9 +3238,8 @@
 
     palFreeMemory( pMac->hHdd, (void *) limMsgQ->bodyptr );
     // Restore MLME state
-    //pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState;
     psessionEntry->limMlmState = psessionEntry->limPrevMlmState;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
     if( respReqd )
     {
         tpLimMlmSetKeysReq lpLimMlmSetKeysReq = (tpLimMlmSetKeysReq) pMac->lim.gpLimMlmSetKeysReq;
@@ -3365,27 +3248,27 @@
         {
             palCopyMemory( pMac->hHdd, (tANI_U8 *) &mlmSetKeysCnf.peerMacAddr, (tANI_U8 *) lpLimMlmSetKeysReq->peerMacAddr, sizeof(tSirMacAddr) );
 #ifdef ANI_PRODUCT_TYPE_AP
-      mlmSetKeysCnf.aid = lpLimMlmSetKeysReq->aid;
+            mlmSetKeysCnf.aid = lpLimMlmSetKeysReq->aid;
 #endif
             // Free the buffer cached for the global pMac->lim.gpLimMlmSetKeysReq
-            palFreeMemory( pMac->hHdd, (tANI_U8 *) pMac->lim.gpLimMlmSetKeysReq);
+            palFreeMemory(pMac->hHdd, (tANI_U8 *) pMac->lim.gpLimMlmSetKeysReq);
             pMac->lim.gpLimMlmSetKeysReq = NULL;
         }
         mlmSetKeysCnf.sessionId = sessionId;
-        limPostSmeMessage( pMac, LIM_MLM_SETKEYS_CNF, (tANI_U32 *) &mlmSetKeysCnf );
+        limPostSmeMessage(pMac, LIM_MLM_SETKEYS_CNF, (tANI_U32 *) &mlmSetKeysCnf);
     }
 }
 void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ )
 {
     tANI_U8 respReqd = 1;
     tLimMlmSetKeysCnf mlmSetKeysCnf;
-    tANI_U16 resultCode;
-    tANI_U8  sessionId =0;
+    tANI_U16          resultCode;
+    tANI_U8           sessionId = 0;
     tpPESession  psessionEntry;
     SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
     palZeroMemory( pMac->hHdd, (void *)&mlmSetKeysCnf, sizeof( tLimMlmSetKeysCnf ));
    //BTAMP
-    if(NULL == limMsgQ->bodyptr)
+    if( NULL == limMsgQ->bodyptr )
     {
         PELOGE(limLog(pMac, LOGE,FL("limMsgQ bodyptr is null\n"));)
         return;
@@ -3394,6 +3277,7 @@
     if((psessionEntry = peFindSessionBySessionId(pMac, sessionId))== NULL)
     {
         PELOGE(limLog(pMac, LOGE,FL("session does not exist for given sessionId\n"));)
+        palFreeMemory( pMac->hHdd, (void *) limMsgQ->bodyptr );
         return;
     }
     if( eLIM_MLM_WT_SET_BSS_KEY_STATE == psessionEntry->limMlmState )
@@ -3401,10 +3285,10 @@
     else
         resultCode = (tANI_U16) (((tpSetStaKeyParams) limMsgQ->bodyptr)->status); //BCAST key also uses tpSetStaKeyParams. Done this way for readabilty.
 
-  //
-  // TODO & FIXME_GEN4
-  // Need to inspect tSirMsgQ.reserved for a valid Dialog token!
-  //
+    //
+    // TODO & FIXME_GEN4
+    // Need to inspect tSirMsgQ.reserved for a valid Dialog token!
+    //
   // Validate SME/LIM state - Read the above "ASSUMPTIONS"
   //if( eLIM_SME_LINK_EST_STATE == pMac->lim.gLimSmeState )
   //{
@@ -3413,7 +3297,7 @@
         eLIM_MLM_WT_SET_STA_BCASTKEY_STATE != psessionEntry->limMlmState )
     {
         // Mesg received from HAL in Invalid state!
-        limLog( pMac, LOGW, FL( "Received unexpected [Mesg Id - %d] in state %X\n" ), limMsgQ->type, pMac->lim.gLimMlmState );
+        limLog( pMac, LOGW, FL( "Received unexpected [Mesg Id - %d] in state %X\n" ), limMsgQ->type, psessionEntry->limMlmState );
         // There's not much that MLME can do at this stage...
         respReqd = 0;
     }
@@ -3422,10 +3306,9 @@
 
     palFreeMemory( pMac->hHdd, (void *) limMsgQ->bodyptr );
     // Restore MLME state
-    //pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState;
     psessionEntry->limMlmState = psessionEntry->limPrevMlmState;
 
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
     if( respReqd )
     {
         tpLimMlmSetKeysReq lpLimMlmSetKeysReq = (tpLimMlmSetKeysReq) pMac->lim.gpLimMlmSetKeysReq;
@@ -3436,13 +3319,13 @@
         {
             palCopyMemory( pMac->hHdd, (tANI_U8 *) &mlmSetKeysCnf.peerMacAddr, (tANI_U8 *) lpLimMlmSetKeysReq->peerMacAddr, sizeof(tSirMacAddr) );
 #ifdef ANI_PRODUCT_TYPE_AP
-      mlmSetKeysCnf.aid = lpLimMlmSetKeysReq->aid;
+            mlmSetKeysCnf.aid = lpLimMlmSetKeysReq->aid;
 #endif
             // Free the buffer cached for the global pMac->lim.gpLimMlmSetKeysReq
-            palFreeMemory( pMac->hHdd, (tANI_U8 *) pMac->lim.gpLimMlmSetKeysReq);
+            palFreeMemory(pMac->hHdd, (tANI_U8 *) pMac->lim.gpLimMlmSetKeysReq);
             pMac->lim.gpLimMlmSetKeysReq = NULL;
         }
-        limPostSmeMessage( pMac, LIM_MLM_SETKEYS_CNF, (tANI_U32 *) &mlmSetKeysCnf );
+        limPostSmeMessage(pMac, LIM_MLM_SETKEYS_CNF, (tANI_U32 *) &mlmSetKeysCnf);
     }
 }
 /**
@@ -3463,54 +3346,77 @@
  */
 void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ )
 {
-tLimMlmRemoveKeyCnf mlmRemoveCnf;
-tANI_U16 resultCode;
-tpLimMlmRemoveKeyReq lpLimMlmRemoveKeyReq = (tpLimMlmRemoveKeyReq) pMac->lim.gpLimMlmRemoveKeyReq;
-  SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
-  palZeroMemory( pMac->hHdd,
-      (void *) &mlmRemoveCnf,
-      sizeof( tLimMlmRemoveKeyCnf ));
-  // Validate MLME state
-    if( eLIM_MLM_WT_REMOVE_BSS_KEY_STATE != pMac->lim.gLimMlmState &&
-        eLIM_MLM_WT_REMOVE_STA_KEY_STATE != pMac->lim.gLimMlmState )
+    tANI_U8 respReqd = 1;
+    tLimMlmRemoveKeyCnf mlmRemoveCnf;
+    tANI_U16             resultCode;
+    tANI_U8              sessionId = 0;
+    tpPESession  psessionEntry;
+    SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
+    palZeroMemory( pMac->hHdd, (void *) &mlmRemoveCnf, sizeof( tLimMlmRemoveKeyCnf ));
+
+    if( NULL == limMsgQ->bodyptr )
     {
-      // Mesg received from HAL in Invalid state!
-      limLog( pMac, LOGW,
-          FL( "Received unexpected [Mesg Id - %d] in state %X\n" ),
-          limMsgQ->type,
-          pMac->lim.gLimMlmState );
-          return; //ignore the response.
+        PELOGE(limLog(pMac, LOGE,FL("limMsgQ bodyptr is NULL\n"));)
+        return;
     }
 
-  if( eLIM_MLM_WT_REMOVE_BSS_KEY_STATE == pMac->lim.gLimMlmState )
-    resultCode = (tANI_U16) (((tpRemoveBssKeyParams) limMsgQ->bodyptr)->status);
-  else
-    resultCode = (tANI_U16) (((tpRemoveStaKeyParams) limMsgQ->bodyptr)->status);
-  //
-  // TODO & FIXME_GEN4
-  // Need to inspect tSirMsgQ.reserved for a valid Dialog token!
-  //
+    if (limMsgQ->type == WDA_REMOVE_STAKEY_RSP)
+        sessionId = ((tpRemoveStaKeyParams) limMsgQ->bodyptr)->sessionId;
+    else if (limMsgQ->type == WDA_REMOVE_BSSKEY_RSP)
+        sessionId = ((tpRemoveBssKeyParams) limMsgQ->bodyptr)->sessionId;
 
-  if( 0 != limMsgQ->bodyptr )
-    palFreeMemory( pMac->hHdd, (void *) limMsgQ->bodyptr );
-  // Restore MLME state
-  pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState;
-  MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
-    // Prepare and Send LIM_MLM_REMOVEKEY_CNF
-    if( NULL != lpLimMlmRemoveKeyReq )
+    if((psessionEntry = peFindSessionBySessionId(pMac, sessionId))== NULL)
     {
-      palCopyMemory( pMac->hHdd,
-          (tANI_U8 *) &mlmRemoveCnf.peerMacAddr,
-          (tANI_U8 *) lpLimMlmRemoveKeyReq->peerMacAddr,
-          sizeof( tSirMacAddr ));
-      mlmRemoveCnf.resultCode = resultCode;
-      // Free the buffer cached for the global pMac->lim.gpLimMlmRemoveKeyReq
-      palFreeMemory( pMac->hHdd, (tANI_U8 *) pMac->lim.gpLimMlmRemoveKeyReq);
-      pMac->lim.gpLimMlmRemoveKeyReq = NULL;
-     }
-     limPostSmeMessage( pMac,
-        LIM_MLM_REMOVEKEY_CNF,
-        (tANI_U32 *) &mlmRemoveCnf );
+        PELOGE(limLog(pMac, LOGE,FL("session does not exist for given sessionId\n"));)
+        return;
+    }
+
+    if( eLIM_MLM_WT_REMOVE_BSS_KEY_STATE == psessionEntry->limMlmState )
+      resultCode = (tANI_U16) (((tpRemoveBssKeyParams) limMsgQ->bodyptr)->status);
+    else
+      resultCode = (tANI_U16) (((tpRemoveStaKeyParams) limMsgQ->bodyptr)->status);
+
+    // Validate MLME state
+    if( eLIM_MLM_WT_REMOVE_BSS_KEY_STATE != psessionEntry->limMlmState &&
+        eLIM_MLM_WT_REMOVE_STA_KEY_STATE != psessionEntry->limMlmState )
+    {
+        // Mesg received from HAL in Invalid state!
+        limLog(pMac, LOGW,
+            FL("Received unexpected [Mesg Id - %d] in state %X\n"),
+          limMsgQ->type,
+          psessionEntry->limMlmState );
+          respReqd = 0;
+    }
+    else
+        mlmRemoveCnf.resultCode = resultCode;
+
+    //
+    // TODO & FIXME_GEN4
+    // Need to inspect tSirMsgQ.reserved for a valid Dialog token!
+    //
+
+    palFreeMemory( pMac->hHdd, (void *) limMsgQ->bodyptr );
+
+    // Restore MLME state
+    psessionEntry->limMlmState = psessionEntry->limPrevMlmState;
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
+
+    if( respReqd )
+    {
+        tpLimMlmRemoveKeyReq lpLimMlmRemoveKeyReq = (tpLimMlmRemoveKeyReq) pMac->lim.gpLimMlmRemoveKeyReq;
+        mlmRemoveCnf.sessionId = sessionId;
+
+    // Prepare and Send LIM_MLM_REMOVEKEY_CNF
+        if( NULL != lpLimMlmRemoveKeyReq )
+    {
+            palCopyMemory( pMac->hHdd, (tANI_U8 *) &mlmRemoveCnf.peerMacAddr, (tANI_U8 *) lpLimMlmRemoveKeyReq->peerMacAddr,
+                      sizeof( tSirMacAddr ));
+        // Free the buffer cached for the global pMac->lim.gpLimMlmRemoveKeyReq
+        palFreeMemory(pMac->hHdd, (tANI_U8 *) pMac->lim.gpLimMlmRemoveKeyReq);
+        pMac->lim.gpLimMlmRemoveKeyReq = NULL;
+    }
+        limPostSmeMessage( pMac, LIM_MLM_REMOVEKEY_CNF, (tANI_U32 *) &mlmRemoveCnf );
+    }
 }
 
 #if (defined(ANI_PRODUCT_TYPE_AP) || defined(ANI_PRODUCT_TYPE_AP_SDK))
@@ -3741,7 +3647,7 @@
         goto end;
     }
     /// Start reassociation failure timer
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_REASSOC_FAIL_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_REASSOC_FAIL_TIMER));
     if (tx_timer_activate(&pMac->lim.limTimers.gLimReassocFailureTimer)
                                                != TX_SUCCESS)
     {
@@ -3814,17 +3720,7 @@
         goto error;
     }
 
-    // Activate Join failure timer
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_JOIN_FAIL_TIMER));
-    if (tx_timer_activate(&pMac->lim.limTimers.gLimJoinFailureTimer) != TX_SUCCESS)
-    {
-        limLog(pMac, LOGP, FL("could not activate Join failure timer\n"));
-        psessionEntry->limMlmState = psessionEntry->limPrevMlmState;
-         MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
-        //memory is freed up below.
-        psessionEntry->pLimMlmJoinReq = NULL;
-        goto error;
-    }
+   
     /* eSIR_BTAMP_AP_MODE stroed as bss type in session Table when join req is received, is to be veified   */
     if(psessionEntry->bssType == eSIR_BTAMP_AP_MODE)
     {
@@ -3867,6 +3763,19 @@
            psessionEntry->pLimMlmJoinReq->bssDescription.bssId, psessionEntry->currentOperChannel/*chanNum*/,
            psessionEntry->selfMacAddr, psessionEntry->dot11mode,
            psessionEntry->pLimJoinReq->addIEScan.length, psessionEntry->pLimJoinReq->addIEScan.addIEdata);
+
+    // Sending mgmt frame is a blocking call activate Join failure timer now
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_JOIN_FAIL_TIMER));
+    if (tx_timer_activate(&pMac->lim.limTimers.gLimJoinFailureTimer) != TX_SUCCESS)
+    {
+        limLog(pMac, LOGP, FL("could not activate Join failure timer\n"));
+        psessionEntry->limMlmState = psessionEntry->limPrevMlmState;
+         MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, pMac->lim.gLimMlmState));
+        //memory is freed up below.
+        psessionEntry->pLimMlmJoinReq = NULL;
+        goto error;
+    }
+
     return;
 error:  
     if(NULL != psessionEntry)
@@ -4075,7 +3984,29 @@
             }
             else
             {
-               pMac->lim.gLimCurrentScanChannelId++;
+               //Skip Dfs Channel in case of P2P Search
+               //If skipDfsChnlInP2pSearch is set in ini
+               if( ( pMac->lim.gpLimMlmScanReq != NULL ) &&
+                   pMac->lim.gpLimMlmScanReq->p2pSearch &&
+                   pMac->lim.gpLimMlmScanReq->skipDfsChnlInP2pSearch )
+               {
+                  int flag = 0;
+                  while(!flag)
+                  {
+                     pMac->lim.gLimCurrentScanChannelId++;
+                     if( (pMac->lim.gLimCurrentScanChannelId >
+                   (tANI_U32) (pMac->lim.gpLimMlmScanReq->channelList.numChannels - 1))||
+                        (limActiveScanAllowed(pMac, limGetCurrentScanChannel(pMac))))
+                     {
+                       flag=1; //Bail out from here
+                     }
+                  }
+               }
+               else
+               {
+                  pMac->lim.gLimCurrentScanChannelId++;
+               }
+
                limContinueChannelScan(pMac);
             }
             break;
@@ -4113,10 +4044,69 @@
     }
     return;
 }
+/**
+ *  limStopTxAndSwitch()
+ *
+ *FUNCTION:
+ * Start channel switch on all sessions that is in channel switch state.
+ *
+ * @param pMac                   - pointer to global adapter context
+ *
+ * @return None
+ *
+ */
+static void
+limStopTxAndSwitch (tpAniSirGlobal pMac)
+{
+    tANI_U8 i;
+
+    for(i =0; i < pMac->lim.maxBssId; i++)
+    {
+        if(pMac->lim.gpSession[i].valid && 
+            pMac->lim.gpSession[i].gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING)
+        {
+            limStopTxAndSwitchChannel(pMac, i);
+        }
+    }
+    return; 
+}
+/**
+ * limStartQuietOnSession()
+ *
+ *FUNCTION:
+ * This function is called to start quiet timer after finish scan if there is  
+ *      qeuieting on any session.
+ *
+ *LOGIC:
+ *
+ *ASSUMPTIONS:
+ * NA
+ *
+ *NOTE:
+ * NA
+ *
+ * @param  pMac    - Pointer to Global MAC structure
+ *
+ * @return None
+ */
+static void
+limStartQuietOnSession (tpAniSirGlobal pMac)
+{
+    tANI_U8 i;
+
+    for(i =0; i < pMac->lim.maxBssId; i++)
+    {
+        if(pMac->lim.gpSession[i].valid && 
+            pMac->lim.gpSession[i].gLimSpecMgmt.quietState == eLIM_QUIET_BEGIN)
+        {
+            limStartQuietTimer(pMac, i);
+        }
+    }
+    return;
+}
 void limProcessFinishScanRsp(tpAniSirGlobal pMac,  void *body)
 {
     tpFinishScanParams      pFinishScanParam;
-    tANI_U8                 dummySessionId = 0;
     eHalStatus              status;
     SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
     pFinishScanParam = (tpFinishScanParams) body;
@@ -4127,21 +4117,21 @@
         case eLIM_HAL_FINISH_SCAN_WAIT_STATE:
             pMac->lim.gLimHalScanState = eLIM_HAL_IDLE_SCAN_STATE;
             limCompleteMlmScan(pMac, eSIR_SME_SUCCESS);
-            if (pMac->lim.gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING)
+            if (limIsChanSwitchRunning(pMac))
             {
                 /** Right time to stop tx and start the timer for channel switch */
                 /* Sending Session ID 0, may not be correct, since SCAN is global there should not
                  * be any associated session id
                 */
-                limStopTxAndSwitchChannel(pMac, dummySessionId);
+                limStopTxAndSwitch(pMac);
             }
-            else if (pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_BEGIN)
+            else if (limIsQuietBegin(pMac))
             {
                 /** Start the quieting */
                 /* Sending Session ID 0, may not be correct, since SCAN is global there should not
                  * be any associated session id
                 */
-                limStartQuietTimer(pMac, dummySessionId);
+                limStartQuietOnSession(pMac);
             }
 #ifdef ANI_PRODUCT_TYPE_AP
             /* For handling the measurement request from WSM as scan request in LIM*/
@@ -4283,6 +4273,7 @@
   if((psessionEntry = peFindSessionBySessionId(pMac,pMlmAddBACnf->sessionId))== NULL)
   {
         PELOGE(limLog(pMac, LOGE,FL("session does not exist for given BSSId\n"));)
+        palFreeMemory( pMac->hHdd, (void *) pMsgBuf );
         return;
   }
   // First, extract the DPH entry
@@ -4301,7 +4292,7 @@
     PELOGE(limLog( pMac, LOGE,
         FL( "Received unexpected ADDBA CNF when STA BA state is %d\n" ),
         curBaState );)
-    palFreeMemory( pMac->hHdd, (void *) pMsgBuf );
+      palFreeMemory( pMac->hHdd, (void *) pMsgBuf );
     return;
   }
   // Restore STA BA state
@@ -4380,6 +4371,7 @@
     if((psessionEntry = peFindSessionBySessionId(pMac, pMlmDelBACnf->sessionId))== NULL)
    {
         limLog(pMac, LOGP,FL("Session Does not exist for given sessionID\n"));
+        palFreeMemory( pMac->hHdd, (void *) pMsgBuf );
         return;
    }
     // First, extract the DPH entry
@@ -4388,6 +4380,7 @@
     {
         limLog( pMac, LOGE,
             FL( "STA context not found - ignoring DELBA CNF from HAL\n" ));
+        palFreeMemory( pMac->hHdd, (void *) pMsgBuf );
         return;
     }
     if(NULL == pMlmDelBACnf)
@@ -4403,6 +4396,7 @@
         limLog( pMac, LOGE,
         FL( "Received unexpected DELBA CNF when STA BA state is %d\n" ),
         curBaState );
+        palFreeMemory( pMac->hHdd, (void *) pMsgBuf );
         return;
     }
     // Restore STA BA state
@@ -4437,6 +4431,7 @@
     if((psessionEntry = peFindSessionByBssid(pMac,pBADeleteParams->bssId,&sessionId))== NULL)
     {
         PELOGE(limLog(pMac, LOGE,FL("session does not exist for given BSSId\n"));)
+        palFreeMemory( pMac->hHdd, (void *) limMsgQ->bodyptr );
         return;
     }
     // First, extract the DPH entry
@@ -4595,7 +4590,7 @@
     /** Skipped the DeleteDPH Hash Entry as we need it for the new BSS*/
     /** Set the MlmState to IDLE*/
     psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
    /* Update PE session Id*/
     mlmReassocCnf.sessionId = psessionEntry->peSessionId;
     switch (psessionEntry->limMlmState) {
@@ -4676,13 +4671,13 @@
             mlmReassocCnf.protStatusCode = pStaDs->mlmStaContext.cleanupTrigger;
             /** Set the SME State back to WT_Reassoc State*/
             psessionEntry->limSmeState = eLIM_SME_WT_REASSOC_STATE;
-            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
             limDeleteDphHashEntry(pMac, pStaDs->staAddr, pStaDs->assocId,psessionEntry);
             if((psessionEntry->limSystemRole == eLIM_STA_ROLE)||
                 (psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE))
             {
                psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
-               MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+               MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
             }
             limPostSmeMessage(pMac, LIM_MLM_REASSOC_CNF, (tANI_U32 *) &mlmReassocCnf);
         }
@@ -4694,7 +4689,7 @@
             mlmReassocCnf.protStatusCode = eSIR_SME_UNEXPECTED_REQ_RESULT_CODE;
             goto Error;
     }
-return;
+    return;
 Error:
     limPostSmeMessage(pMac, LIM_MLM_REASSOC_CNF, (tANI_U32 *) &mlmReassocCnf);
 }
@@ -4773,7 +4768,8 @@
     tLimMlmReassocCnf           mlmReassocCnf;
     /** Skipped the DeleteDPH Hash Entry as we need it for the new BSS*/
     /** Set the MlmState to IDLE*/
-    pMac->lim.gLimMlmState = eLIM_MLM_IDLE_STATE;
+    psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE;
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
     switch (psessionEntry->limSmeState) {
 #if defined(ANI_PRODUCT_TYPE_CLIENT) || defined(ANI_AP_CLIENT_SDK)
         case eLIM_SME_WT_REASSOC_STATE : {
diff --git a/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c b/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c
index ecb7719..48f839c 100644
--- a/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c
@@ -549,7 +549,7 @@
                         pSirSmeProbeReq->sessionId = psessionEntry->smeSessionId;
                         palCopyMemory( pMac->hHdd, pSirSmeProbeReq->peerMacAddr, pHdr->sa, sizeof(tSirMacAddr));
                         pSirSmeProbeReq->devicePasswdId = probeReq.probeReqWscIeInfo.DevicePasswordID.id;
-                        MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+                        MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
                        if (limSysProcessMmhMsgApi(pMac, &msgQ,  ePROT) != eSIR_SUCCESS){
                             PELOG3(limLog(pMac, LOG3, FL("couldnt send the probe req to wsm "));)
                         }
@@ -731,7 +731,8 @@
     //send the probe req to SME.
     limSendSmeMgmtFrameInd( pMac, pHdr->fc.subType,
                (tANI_U8*)pHdr, (frameLen + sizeof(tSirMacMgmtHdr)), 
-               psessionEntry->smeSessionId, WDA_GET_RX_CH(pBd) );
+               psessionEntry->smeSessionId, WDA_GET_RX_CH(pBd),
+               psessionEntry);
 #ifdef WLAN_FEATURE_P2P_INTERNAL
     limSendP2PProbeResponse(pMac, pBd, psessionEntry);
 #endif
@@ -863,7 +864,7 @@
     palCopyMemory( pMac->hHdd, pSirSmeProbeReqInd->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
     palCopyMemory( pMac->hHdd, pSirSmeProbeReqInd->WPSPBCProbeReq.peerMacAddr, peerMacAddr, sizeof(tSirMacAddr));
 
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
     pSirSmeProbeReqInd->WPSPBCProbeReq.probeReqIELen = (tANI_U16)ProbeReqIELen;
     palCopyMemory( pMac->hHdd, pSirSmeProbeReqInd->WPSPBCProbeReq.probeReqIE, pProbeReqIE, ProbeReqIELen);
     
diff --git a/CORE/MAC/src/pe/lim/limProcessProbeRspFrame.c b/CORE/MAC/src/pe/lim/limProcessProbeRspFrame.c
index 6df50de..3d63939 100644
--- a/CORE/MAC/src/pe/lim/limProcessProbeRspFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessProbeRspFrame.c
@@ -237,8 +237,8 @@
                 {
                     limUpdateQuietIEFromBeacon(pMac, &(probeRsp.quietIE), psessionEntry);
                 }
-                else if ((pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_BEGIN) ||
-                     (pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING))
+                else if ((psessionEntry->gLimSpecMgmt.quietState == eLIM_QUIET_BEGIN) ||
+                     (psessionEntry->gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING))
                 {
                     PELOG1(limLog(pMac, LOG1, FL("Received a probe rsp without Quiet IE\n"));)
                     limCancelDot11hQuiet(pMac, psessionEntry);
@@ -249,7 +249,7 @@
                 {
                     limUpdateChannelSwitch(pMac, &probeRsp, psessionEntry);
                 }
-                else if (pMac->lim.gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING)
+                else if (psessionEntry->gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING)
                 {
                     limCancelDot11hChannelSwitch(pMac, psessionEntry);
                 }
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 9f1a1bf..9c8fd60 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -124,7 +124,7 @@
     if (TX_TIMER_VALID(pMac->lim.limTimers.gLimBackgroundScanTimer))
     {
         limDeactivateAndChangeTimer(pMac, eLIM_BACKGROUND_SCAN_TIMER);
-     MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_BACKGROUND_SCAN_TIMER));
+     MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_BACKGROUND_SCAN_TIMER));
         if (tx_timer_activate(&pMac->lim.limTimers.gLimBackgroundScanTimer) != TX_SUCCESS)
             limLog(pMac, LOGP, FL("could not activate background scan timer\n"));
         pMac->lim.gLimBackgroundScanStarted   = true;
@@ -316,7 +316,9 @@
 {
     /** fRadarDetCurOperChan will be set only if we detect radar in current
      * operating channel and System Role == AP ROLE */
-    if (LIM_IS_RADAR_DETECTED(pMac))
+    //TODO: Need to take care radar detection.
+    //if (LIM_IS_RADAR_DETECTED(pMac))
+    if( 0 )
     {
         if (limDeferMsg(pMac, pMsg) != TX_SUCCESS)
         {
@@ -365,7 +367,7 @@
     {
         pMac->lim.gLimSmeState = eLIM_SME_IDLE_STATE;
         
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, NO_SESSION, pMac->lim.gLimSmeState));
         
         /// By default do not return after first scan match
         pMac->lim.gLimReturnAfterFirstMatch = 0;
@@ -433,7 +435,7 @@
     }
 #endif
     PELOGW(limLog(pMac, LOGW, FL("sending WDA_SYS_READY_IND msg to HAL\n"));)
-    MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msg.type));
 
     if(eSIR_SUCCESS != wdaPostCtrlMsg(pMac, &msg))
     {
@@ -443,7 +445,62 @@
     return eANI_BOOLEAN_FALSE;
 }
 
+#ifdef WLAN_FEATURE_11AC
 
+tANI_U32 limGetCenterChannel(tpAniSirGlobal pMac,tANI_U8 primarychanNum,ePhyChanBondState secondaryChanOffset, tANI_U8 chanWidth)
+{
+    if (chanWidth == WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ)
+    {
+        switch(secondaryChanOffset)
+        {
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED:
+                return primarychanNum;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED:
+               return primarychanNum + 2;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED:
+               return primarychanNum - 2;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW:
+               return primarychanNum + 6;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW:
+               return primarychanNum + 2;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH:
+               return primarychanNum - 2;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH:
+               return primarychanNum - 6;
+            default :
+               return eSIR_CFG_INVALID_ID;
+        }
+    }
+    else if (chanWidth == WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ)
+    {
+        switch(secondaryChanOffset)
+        {
+            case PHY_DOUBLE_CHANNEL_LOW_PRIMARY:
+                return primarychanNum + 2;
+            case PHY_DOUBLE_CHANNEL_HIGH_PRIMARY:
+                return primarychanNum - 2;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED:
+                return primarychanNum;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED:
+               return primarychanNum + 2;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED:
+               return primarychanNum - 2;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW:
+               return primarychanNum + 2;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW:
+               return primarychanNum - 2;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH:
+               return primarychanNum + 2;
+            case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH:
+               return primarychanNum - 2;
+            default :
+               return eSIR_CFG_INVALID_ID;
+        }
+    }
+    return primarychanNum;
+}
+
+#endif
 /**
  * __limHandleSmeStartBssRequest()
  *
@@ -473,7 +530,6 @@
     tpSirSmeStartBssReq     pSmeStartBssReq;                //Local variable for Start BSS Req.. Added For BT-AMP Support 
     tSirResultCodes         retCode = eSIR_SME_SUCCESS;
     tANI_U32                autoGenBssId = FALSE;           //Flag Used in case of IBSS to Auto generate BSSID.
-    tSirMacHTChannelWidth   txWidthSet;
     tANI_U8                 sessionId;
     tpPESession             psessionEntry = NULL;
     tANI_U8                 smesessionId;
@@ -581,8 +637,12 @@
         /* Store the dot 11 mode in to the session Table*/
 
         psessionEntry->dot11mode = pSmeStartBssReq->dot11mode;
-        psessionEntry->htCapabality = IS_DOT11_MODE_HT(psessionEntry->dot11mode);
-
+        psessionEntry->htCapability = IS_DOT11_MODE_HT(psessionEntry->dot11mode);
+#ifdef WLAN_FEATURE_11AC
+        psessionEntry->vhtCapability = IS_DOT11_MODE_VHT(psessionEntry->dot11mode);
+        VOS_TRACE(VOS_MODULE_ID_PE,VOS_TRACE_LEVEL_FATAL,
+            FL("*****psessionEntry->vhtCapability = %d\n"),psessionEntry->vhtCapability);
+#endif
         palCopyMemory(pMac->hHdd, (void*)&psessionEntry->rateSet,
             (void*)&pSmeStartBssReq->operationalRateSet,
             sizeof(tSirMacRateSet));
@@ -667,41 +727,73 @@
         if (pSmeStartBssReq->channelId)
         {
             channelNumber = pSmeStartBssReq->channelId;
-            /*Update cbMode received from sme with LIM's updated cbMode*/
-            pSmeStartBssReq->cbMode = (tAniCBSecondaryMode)pMac->lim.gCbMode;
+            psessionEntry->htSupportedChannelWidthSet = (pSmeStartBssReq->cbMode)?1:0; // This is already merged value of peer and self - done by csr in csrGetCBModeFromIes
+            psessionEntry->htRecommendedTxWidthSet = psessionEntry->htSupportedChannelWidthSet;
+            psessionEntry->htSecondaryChannelOffset = pSmeStartBssReq->cbMode;
+            VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ERROR,
+                      FL("cbMode %u"), pSmeStartBssReq->cbMode);
+#ifdef WLAN_FEATURE_11AC
+            if(psessionEntry->vhtCapability)
+            {
+                tANI_U32 centerChan;
+                tANI_U32 chanWidth;
 
-            setupCBState( pMac, pSmeStartBssReq->cbMode );
-            pMac->lim.gHTSecondaryChannelOffset = limGetHTCBState(pSmeStartBssReq->cbMode);
-#ifdef WLAN_SOFTAP_FEATURE
-            txWidthSet = (tSirMacHTChannelWidth)limGetHTCapability(pMac, eHT_RECOMMENDED_TX_WIDTH_SET, psessionEntry);
-#else
-            txWidthSet = (tSirMacHTChannelWidth)limGetHTCapability(pMac, eHT_RECOMMENDED_TX_WIDTH_SET);
-#endif
-
-            /*
-                * If there is a mismatch in secondaryChannelOffset being passed in the START_BSS request and
-                * ChannelBonding CFG, then MAC will override the 'ChannelBonding' CFG with what is being passed
-                * in StartBss Request.
-                * HAL RA and PHY will go out of sync, if both these values are not consistent and will result in TXP Errors
-                * when HAL RA tries to use 40Mhz rates when CB is turned off in PHY.
-                */
-            if(((pMac->lim.gHTSecondaryChannelOffset == eHT_SECONDARY_CHANNEL_OFFSET_NONE) &&
-                    (txWidthSet == eHT_CHANNEL_WIDTH_40MHZ)) ||
-                    ((pMac->lim.gHTSecondaryChannelOffset != eHT_SECONDARY_CHANNEL_OFFSET_NONE) &&
-                    (txWidthSet == eHT_CHANNEL_WIDTH_20MHZ)))
+                if (wlan_cfgGetInt(pMac, WNI_CFG_VHT_CHANNEL_WIDTH,
+                          &chanWidth) != eSIR_SUCCESS)
                 {
-                   PELOGW(limLog(pMac, LOGW, FL("secondaryChannelOffset and txWidthSet don't match, resetting txWidthSet CFG\n"));)
-                    txWidthSet = (txWidthSet == eHT_CHANNEL_WIDTH_20MHZ) ? eHT_CHANNEL_WIDTH_40MHZ : eHT_CHANNEL_WIDTH_20MHZ;
-                    if (cfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE, txWidthSet)
-                                        != eSIR_SUCCESS)
+                    limLog(pMac, LOGP,
+                      FL("Unable to retrieve Channel Width from CFG\n"));
+                }
+
+                if(chanWidth == eHT_CHANNEL_WIDTH_20MHZ || chanWidth == eHT_CHANNEL_WIDTH_40MHZ)
+                {
+                    if (cfgSetInt(pMac, WNI_CFG_VHT_CHANNEL_WIDTH, WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ)
+                                                                     != eSIR_SUCCESS)
                     {
                         limLog(pMac, LOGP, FL("could not set  WNI_CFG_CHANNEL_BONDING_MODE at CFG\n"));
                         retCode = eSIR_LOGP_EXCEPTION;
-                        goto free;
+                         goto free;
                     }
                 }
-        }
+                if (chanWidth == eHT_CHANNEL_WIDTH_80MHZ)
+                {
+                    if (cfgSetInt(pMac, WNI_CFG_VHT_CHANNEL_WIDTH, WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ)
+                                                                     != eSIR_SUCCESS)
+                    {
+                        limLog(pMac, LOGP, FL("could not set  WNI_CFG_CHANNEL_BONDING_MODE at CFG\n"));
+                        retCode = eSIR_LOGP_EXCEPTION;
+                         goto free;
+                    }
 
+                    centerChan = limGetCenterChannel(pMac,channelNumber,pSmeStartBssReq->cbMode,WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ);
+                    if(centerChan != eSIR_CFG_INVALID_ID)
+                    {
+                        limLog(pMac, LOGW, FL("***Center Channel for 80MHZ channel width = %ld\n"),centerChan);
+                        if (cfgSetInt(pMac, WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1, centerChan)
+                                                                     != eSIR_SUCCESS)
+                        {
+                            limLog(pMac, LOGP, FL("could not set  WNI_CFG_CHANNEL_BONDING_MODE at CFG\n"));
+                            retCode = eSIR_LOGP_EXCEPTION;
+                            goto free;
+                        }
+                    }
+                }
+
+                /* All the translation is done by now for gVhtChannelWidth from .ini file to 
+                 * the actual values as defined in spec. So, grabing the spec value which is 
+                 * updated in .dat file by the above logic */
+                if (wlan_cfgGetInt(pMac, WNI_CFG_VHT_CHANNEL_WIDTH,
+                                   &chanWidth) != eSIR_SUCCESS)
+                {
+                    limLog(pMac, LOGP,
+                      FL("Unable to retrieve Channel Width from CFG\n"));
+                }
+
+                psessionEntry->vhtTxChannelWidthSet = chanWidth;
+            }
+            psessionEntry->htSecondaryChannelOffset = limGetHTCBState(pSmeStartBssReq->cbMode);
+#endif
+        }
         else
         {
             PELOGW(limLog(pMac, LOGW, FL("Received invalid eWNI_SME_START_BSS_REQ\n"));)
@@ -719,18 +811,10 @@
 
 #ifdef FIXME_GEN6   //following code may not be required. limInitMlm is now being invoked during peStart
         /// Initialize MLM state machine
-#ifdef ANI_PRODUCT_TYPE_AP
-            /* The Role is not set yet. Currently assuming the AddBss in Linux will be called by AP only.
-             * This should be handled when IBSS functionality is implemented in the Linux
-             * TODO */
-            pMac->lim.gLimMlmState = eLIM_MLM_IDLE_STATE;
-            MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
-#else
         limInitMlm(pMac);
 #endif
-#endif
 
-        psessionEntry->htCapabality = IS_DOT11_MODE_HT(pSmeStartBssReq->dot11mode);
+        psessionEntry->htCapability = IS_DOT11_MODE_HT(pSmeStartBssReq->dot11mode);
 
 #ifdef WLAN_SOFTAP_FEATURE
             /* keep the RSN/WPA IE information in PE Session Entry
@@ -860,16 +944,13 @@
                       
         // Now populate the 11n related parameters
         pMlmStartReq->nwType    = psessionEntry->nwType;
-        pMlmStartReq->htCapable = psessionEntry->htCapabality;
+        pMlmStartReq->htCapable = psessionEntry->htCapability;
         //
         // FIXME_GEN4 - Determine the appropriate defaults...
         //
         pMlmStartReq->htOperMode        = pMac->lim.gHTOperMode;
         pMlmStartReq->dualCTSProtection = pMac->lim.gHTDualCTSProtection; // Unused
-        pMlmStartReq->txChannelWidthSet = pMac->lim.gHTRecommendedTxWidthSet;
-
-        //Update the global LIM parameter, which is used to populate HT Info IEs in beacons/probe responses.
-        pMac->lim.gHTSecondaryChannelOffset = limGetHTCBState(pMlmStartReq->cbMode);
+        pMlmStartReq->txChannelWidthSet = psessionEntry->htRecommendedTxWidthSet;
 
         /* sep26 review */
         psessionEntry->limRFBand = limGetRFBand(channelNumber);
@@ -890,18 +971,9 @@
                 limLog(pMac, LOGP, FL("Fail to get WNI_CFG_11H_ENABLED \n"));
         }
 
-#ifdef ANI_PRODUCT_TYPE_AP
-        PELOGE(limLog(pMac, LOGE, FL("Dot 11h is %s\n"), pMac->lim.gLim11hEnable?"Enabled":"Disabled");)
-        if (pMac->lim.gLim11hEnable)
-        { 
-           PELOG2(limLog(pMac, LOG2, FL("Cb state = %d, SecChanOffset = %d\n"),
-                   pMac->lim.gCbState, pMac->lim.gHTSecondaryChannelOffset);)
-            limRadarInit(pMac);
-        }
-#endif
         psessionEntry ->limPrevSmeState = psessionEntry->limSmeState;
         psessionEntry ->limSmeState     =  eLIM_SME_WT_START_BSS_STATE;
-     MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry ->limSmeState));
 
         limPostMlmMessage(pMac, LIM_MLM_START_REQ, (tANI_U32 *) pMlmStartReq);
         return;
@@ -1092,7 +1164,7 @@
          pMac->lim.gLimPrevSmeState = pMac->lim.gLimSmeState;
         
         pMac->lim.gLimSmeState = eLIM_SME_WT_SCAN_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, NO_SESSION, pMac->lim.gLimSmeState));
 
         if (pScanReq->returnFreshResults & SIR_BG_SCAN_PURGE_RESUTLS)
         {
@@ -1214,6 +1286,7 @@
         pMlmScanReq->dot11mode = pScanReq->dot11mode;
 #ifdef WLAN_FEATURE_P2P
         pMlmScanReq->p2pSearch = pScanReq->p2pSearch;
+        pMlmScanReq->skipDfsChnlInP2pSearch = pScanReq->skipDfsChnlInP2pSearch;
 #endif
 
         //Store the smeSessionID and transaction ID for later use.
@@ -1265,7 +1338,36 @@
 
 } /*** end __limProcessSmeScanReq() ***/
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
 
+static void __limProcessSmeOemDataReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
+{
+    tpSirOemDataReq    pOemDataReq;
+    tLimMlmOemDataReq* pMlmOemDataReq;
+
+    pOemDataReq = (tpSirOemDataReq) pMsgBuf; 
+
+    //post the lim mlm message now
+    if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd, (void**)&pMlmOemDataReq, (sizeof(tLimMlmOemDataReq))))
+    {
+        limLog(pMac, LOGP, FL("palAllocateMemory failed for mlmOemDataReq\n"));
+        return;
+    }
+
+    //Initialize this buffer
+    palZeroMemory(pMac->hHdd, pMlmOemDataReq, (sizeof(tLimMlmOemDataReq)));
+
+    palCopyMemory(pMac->hHdd, pMlmOemDataReq->selfMacAddr, pOemDataReq->selfMacAddr, sizeof(tSirMacAddr)); 
+    palCopyMemory(pMac->hHdd, pMlmOemDataReq->oemDataReq, pOemDataReq->oemDataReq, OEM_DATA_REQ_SIZE);
+
+    //Issue LIM_MLM_OEM_DATA_REQ to MLM
+    limPostMlmMessage(pMac, LIM_MLM_OEM_DATA_REQ, (tANI_U32*)pMlmOemDataReq);
+
+    return;
+
+} /*** end __limProcessSmeOemDataReq() ***/
+
+#endif //FEATURE_OEM_DATA_SUPPORT
 
 
 /**
@@ -1285,7 +1387,6 @@
  * @param  *pMsgBuf  A pointer to the SME message buffer
  * @return None
  */
-
 static void
 __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
 {
@@ -1338,9 +1439,6 @@
         }
         (void) palZeroMemory(pMac->hHdd, (void *) pSmeJoinReq, nSize);
  
-#if defined(ANI_PRODUCT_TYPE_CLIENT) || defined(ANI_AP_CLIENT_SDK)
-        handleHTCapabilityandHTInfo(pMac);
-#endif
         if ((limJoinReqSerDes(pMac, pSmeJoinReq, (tANI_U8 *)pMsgBuf) == eSIR_FAILURE) ||
                 (!limIsSmeJoinReqValid(pMac, pSmeJoinReq)))
         {
@@ -1400,7 +1498,8 @@
                 goto end;
             }
         }   
-        
+        handleHTCapabilityandHTInfo(pMac, psessionEntry);
+
         /* Store Session related parameters */
         /* Store PE session Id in session Table */
         psessionEntry->peSessionId = sessionId;
@@ -1428,18 +1527,25 @@
 
         psessionEntry->dot11mode  = pSmeJoinReq->dot11mode;
         psessionEntry->nwType = pSmeJoinReq->bssDescription.nwType;
+#ifdef WLAN_FEATURE_11AC
+        psessionEntry->vhtCapability = IS_DOT11_MODE_VHT(psessionEntry->dot11mode);
+        VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_FATAL,
+            "***__limProcessSmeJoinReq: vhtCapability=%d****\n",psessionEntry->vhtCapability);
+#endif
 
         /*Phy mode*/
         psessionEntry->gLimPhyMode = pSmeJoinReq->bssDescription.nwType;
 
         /* Copy The channel Id to the session Table */
         psessionEntry->currentOperChannel = pSmeJoinReq->bssDescription.channelId;
-
+        psessionEntry->htSupportedChannelWidthSet = (pSmeJoinReq->cbMode)?1:0; // This is already merged value of peer and self - done by csr in csrGetCBModeFromIes
+        psessionEntry->htRecommendedTxWidthSet = psessionEntry->htSupportedChannelWidthSet;
+        psessionEntry->htSecondaryChannelOffset = pSmeJoinReq->cbMode;
 
         /*Store Persona */
         psessionEntry->pePersona = pSmeJoinReq->staPersona;
         VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO,
-                  FL("PE PERSONA=%d"), psessionEntry->pePersona);
+                  FL("PE PERSONA=%d cbMode %u"), psessionEntry->pePersona, pSmeJoinReq->cbMode);
         
         /* Copy the SSID from smejoinreq to session entry  */  
         psessionEntry->ssId.length = pSmeJoinReq->ssId.length;
@@ -1553,10 +1659,6 @@
 
         pMac->lim.gLimCurrentBssCaps =
             pMac->lim.gpLimJoinReq->neighborBssList.bssList[0].capabilityInfo;
-
-        pMac->lim.gLimCurrentTitanHtCaps =
-             pMac->lim.gpLimJoinReq->neighborBssList.bssList[0].titanHtCaps;
-
         palCopyMemory( pMac->hHdd,
          (tANI_U8 *) &pMac->lim.gLimCurrentSSID,
          (tANI_U8 *) &pMac->lim.gpLimJoinReq->neighborBssList.bssList[0].ssId,
@@ -1569,30 +1671,19 @@
            (tANI_U8 *) &psessionEntry->pLimJoinReq->bssDescription.bssId,
            psessionEntry->pLimJoinReq->bssDescription.length + 2);
 
-#if 0
-
-        pMac->lim.gLimCurrentChannelId =
-           psessionEntry->pLimJoinReq->bssDescription.channelId;
-#endif //oct 9th review remove globals
-
-        
         psessionEntry->limCurrentBssCaps =
-               psessionEntry->pLimJoinReq->bssDescription.capabilityInfo;
-        
+           psessionEntry->pLimJoinReq->bssDescription.capabilityInfo;
 
-        psessionEntry->limCurrentTitanHtCaps=
-                psessionEntry->pLimJoinReq->bssDescription.titanHtCaps;
-
-            regMax = cfgGetRegulatoryMaxTransmitPower( pMac, psessionEntry->currentOperChannel ); 
-            localPowerConstraint = regMax;
-            limExtractApCapability( pMac,
-               (tANI_U8 *) psessionEntry->pLimJoinReq->bssDescription.ieFields,
-               limGetIElenFromBssDescription(&psessionEntry->pLimJoinReq->bssDescription),
-               &psessionEntry->limCurrentBssQosCaps,
-               &psessionEntry->limCurrentBssPropCap,
-               &pMac->lim.gLimCurrentBssUapsd //TBD-RAJESH  make gLimCurrentBssUapsd this session specific
-               , &localPowerConstraint
-               ); 
+        regMax = cfgGetRegulatoryMaxTransmitPower( pMac, psessionEntry->currentOperChannel ); 
+        localPowerConstraint = regMax;
+        limExtractApCapability( pMac,
+           (tANI_U8 *) psessionEntry->pLimJoinReq->bssDescription.ieFields,
+           limGetIElenFromBssDescription(&psessionEntry->pLimJoinReq->bssDescription),
+           &psessionEntry->limCurrentBssQosCaps,
+           &psessionEntry->limCurrentBssPropCap,
+           &pMac->lim.gLimCurrentBssUapsd //TBD-RAJESH  make gLimCurrentBssUapsd this session specific
+           , &localPowerConstraint
+           ); 
 #ifdef FEATURE_WLAN_CCX
             psessionEntry->maxTxPower = limGetMaxTxPower(regMax, localPowerConstraint, pMac->roam.configParam.nTxPowerCap);
 #else
@@ -1628,9 +1719,9 @@
         //To care of the scenario when STA transitions from IBSS to Infrastructure mode.
         pMac->lim.gLimIbssCoalescingHappened = false;
 
-        psessionEntry->limPrevSmeState = psessionEntry->limSmeState;
-        psessionEntry->limSmeState = eLIM_SME_WT_JOIN_STATE;
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+            psessionEntry->limPrevSmeState = psessionEntry->limSmeState;
+            psessionEntry->limSmeState = eLIM_SME_WT_JOIN_STATE;
+            MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
 
         PELOG1(limLog(pMac, LOG1, FL("SME JoinReq: SSID %d.%c%c%c%c%c%c\n"),
                psessionEntry->ssId.length,
@@ -1711,152 +1802,6 @@
 }
 #endif
 
-
-#if 0
-/**
- * __limProcessSmeAuthReq()
- *
- *FUNCTION:
- * This function is called to process SME_AUTH_REQ message
- * from HDD or upper layer application.
- *
- *LOGIC:
- *
- *ASSUMPTIONS:
- *
- *NOTE:
- *
- * @param  pMac      Pointer to Global MAC structure
- * @param  *pMsgBuf  A pointer to the SME message buffer
- * @return None
- */
-
-static void
-__limProcessSmeAuthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
-{
-
-    tAniAuthType       authMode;
-    tLimMlmAuthReq     *pMlmAuthReq;
-    tpSirSmeAuthReq    pSirSmeAuthReq;
-    tSirResultCodes    retCode = eSIR_SME_SUCCESS;
-    tpPESession        psessionEntry;
-    tANI_U8            sessionId;
-
-    
-    if(pMsgBuf == NULL)
-    {
-        limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n"));
-           return;
-    }
-
-    pSirSmeAuthReq = (tpSirSmeAuthReq) pMsgBuf;
-
-    if((psessionEntry = peFindSessionByBssid(pMac,pSirSmeAuthReq->bssId,&sessionId))== NULL)
-    {
-        limLog(pMac, LOGE,FL("Session Does not exist for given BssId\n"));
-        return;
-    }
-
-    if (!limIsSmeAuthReqValid(pSirSmeAuthReq))
-    {
-        limLog(pMac, LOGW,
-               FL("received invalid SME_AUTH_REQ message\n"));
-
-        /// Send AUTH failure response to host
-        retCode = eSIR_SME_INVALID_PARAMETERS;
-        goto end;
-    }
-
-    PELOG1(limLog(pMac, LOG1,
-           FL("RECEIVED AUTH_REQ\n"));)
-
-    /**
-     * Expect Auth request for STA in link established state
-     * or STA in IBSS mode in normal state.
-     */
-
-    if ((psessionEntry->limSmeState == eLIM_SME_LINK_EST_STATE) ||
-        (psessionEntry->limSmeState == eLIM_SME_JOIN_FAILURE_STATE) ||
-        ((psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE) &&
-         (psessionEntry->limSmeState == eLIM_SME_NORMAL_STATE)))
-    {
-        if (pSirSmeAuthReq->authType == eSIR_AUTO_SWITCH)
-            authMode = eSIR_SHARED_KEY; // Try Shared Key first
-        else
-            authMode = pSirSmeAuthReq->authType;
-
-        // Trigger MAC based Authentication
-        if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pMlmAuthReq, sizeof(tLimMlmAuthReq)))
-        {
-            // Log error
-            limLog(pMac, LOGP,
-                   FL("call to palAllocateMemory failed for mlmAuthReq\n"));
-            return;
-        }
-
-        pMac->lim.gLimPreAuthType = pSirSmeAuthReq->authType;
-
-        psessionEntry->limPrevSmeState = psessionEntry->limSmeState;
-        psessionEntry->limSmeState     = eLIM_SME_WT_PRE_AUTH_STATE;
-     MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
-
-        // Store channel specified in auth request.
-        // This will be programmed later by MLM.
-        pMac->lim.gLimPreAuthChannelNumber =
-                                    (tSirMacChanNum)
-                                    pSirSmeAuthReq->channelNumber;
-
-        palCopyMemory( pMac->hHdd, (tANI_U8 *) &pMac->lim.gLimPreAuthPeerAddr,
-                      (tANI_U8 *) &pSirSmeAuthReq->peerMacAddr,
-                      sizeof(tSirMacAddr));
-
-        palCopyMemory( pMac->hHdd, (tANI_U8 *) &pMlmAuthReq->peerMacAddr,
-                      (tANI_U8 *) &pSirSmeAuthReq->peerMacAddr,
-                      sizeof(tSirMacAddr));
-
-        pMlmAuthReq->authType = authMode;
-        
-        /* Update PE session  Id */
-        pMlmAuthReq->sessionId = sessionId;
-
-        if (wlan_cfgGetInt(pMac, WNI_CFG_AUTHENTICATE_FAILURE_TIMEOUT,
-                      (tANI_U32 *) &pMlmAuthReq->authFailureTimeout)
-                            != eSIR_SUCCESS)
-        {
-            /**
-             * Could not get AuthFailureTimeout value from CFG.
-             * Log error.
-             */
-            limLog(pMac, LOGP,
-                   FL("could not retrieve AuthFailureTimeout value\n"));
-        }
-
-        limPostMlmMessage(pMac, LIM_MLM_AUTH_REQ, (tANI_U32 *) pMlmAuthReq);
-        return;
-    }
-    else
-    {
-        /// Should not have received eWNI_SME_AUTH_REQ
-        // Log the event
-        limLog(pMac, LOGE,
-               FL("received unexpected SME_AUTH_REQ in state %X\n"),psessionEntry->limSmeState);
-        limPrintSmeState(pMac, LOGE, psessionEntry->limSmeState);
-
-        /// Send AUTH failure response to host
-        retCode = eSIR_SME_UNEXPECTED_REQ_RESULT_CODE;
-        goto end;
-    }
-
-end:
-    limSendSmeAuthRsp(pMac, retCode,
-                      pSirSmeAuthReq->peerMacAddr,
-                      pSirSmeAuthReq->authType,
-                      eSIR_MAC_UNSPEC_FAILURE_STATUS );
-
-} /*** end __limProcessSmeAuthReq() ***/
-#endif
-
-
 /**
  * __limProcessSmeReassocReq()
  *
@@ -1975,30 +1920,6 @@
         goto end;
     }
 
-#if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && defined(ANI_PRODUCT_TYPE_AP)
-    limCopyNeighborInfoToCfg(pMac,
-        psessionEntry->pLimReAssocReq->neighborBssList.bssList[0],
-        psessionEntry);
-
-    palCopyMemory( pMac->hHdd,
-             pMac->lim.gLimReassocBssId,
-             psessionEntry->pLimReAssocReq->neighborBssList.bssList[0].bssId,
-             sizeof(tSirMacAddr));
-
-    pMac->lim.gLimReassocChannelId =
-         psessionEntry->pLimReAssocReq->neighborBssList.bssList[0].channelId;
-
-    pMac->lim.gLimReassocBssCaps =
-    psessionEntry->pLimReAssocReq->neighborBssList.bssList[0].capabilityInfo;
-
-    pMac->lim.gLimReassocTitanHtCaps = 
-        psessionEntry->pLimReAssocReq->neighborBssList.bssList[0].titanHtCaps;
-
-    palCopyMemory( pMac->hHdd,
-    (tANI_U8 *) &pMac->lim.gLimReassocSSID,
-    (tANI_U8 *) &psessionEntry->pLimReAssocReq->neighborBssList.bssList[0].ssId,
-    psessionEntry->pLimReAssocReq->neighborBssList.bssList[0].ssId.length+1);
-#else
     palCopyMemory( pMac->hHdd,
              psessionEntry->limReAssocbssId,
              psessionEntry->pLimReAssocReq->bssDescription.bssId,
@@ -2007,12 +1928,15 @@
     psessionEntry->limReassocChannelId =
          psessionEntry->pLimReAssocReq->bssDescription.channelId;
 
+    psessionEntry->reAssocHtSupportedChannelWidthSet =
+         (psessionEntry->pLimReAssocReq->cbMode)?1:0;
+    psessionEntry->reAssocHtRecommendedTxWidthSet =
+         psessionEntry->reAssocHtSupportedChannelWidthSet;
+    psessionEntry->reAssocHtSecondaryChannelOffset =
+         psessionEntry->pLimReAssocReq->cbMode;
+
     psessionEntry->limReassocBssCaps =
                 psessionEntry->pLimReAssocReq->bssDescription.capabilityInfo;
-
-    psessionEntry->limReassocTitanHtCaps =
-            psessionEntry->pLimReAssocReq->bssDescription.titanHtCaps;
-    
     regMax = cfgGetRegulatoryMaxTransmitPower( pMac, psessionEntry->currentOperChannel ); 
     localPowerConstraint = regMax;
     limExtractApCapability( pMac,
@@ -2057,8 +1981,6 @@
         limLog( pMac, LOG1, FL("UAPSD flag for all AC - 0x%2x\n"), pMac->lim.gUapsdPerAcBitmask);
     }
 
-#endif
-
     if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pMlmReassocReq, sizeof(tLimMlmReassocReq)))
     {
         // Log error
@@ -2146,7 +2068,7 @@
     psessionEntry->limPrevSmeState = psessionEntry->limSmeState;
     psessionEntry->limSmeState    = eLIM_SME_WT_REASSOC_STATE;
 
-    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
 
     limPostMlmMessage(pMac,
                       LIM_MLM_REASSOC_REQ,
@@ -2243,7 +2165,7 @@
     }
 
 
-    PELOGE(limLog(pMac, LOGE,   FL("received DISASSOC_REQ message. Reason: %d SmeState: %d\n"), 
+    PELOGE(limLog(pMac, LOGE,   FL("received DISASSOC_REQ message. Reason: %d global SmeState: %d\n"), 
                                                         smeDisassocReq.reasonCode, pMac->lim.gLimSmeState);)
 
 
@@ -2275,7 +2197,7 @@
                 case eLIM_SME_LINK_EST_STATE:
                     psessionEntry->limPrevSmeState = psessionEntry->limSmeState;
                     psessionEntry->limSmeState= eLIM_SME_WT_DISASSOC_STATE;
-                      MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+                    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
                     break;
 
                 case eLIM_SME_WT_DEAUTH_STATE:
@@ -2285,7 +2207,7 @@
                      * its been set when PE entered WT_DEAUTH_STATE. 
                      */                  
                     psessionEntry->limSmeState= eLIM_SME_WT_DISASSOC_STATE;
-                    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+                    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
                     limLog(pMac, LOG1, FL("Rcvd SME_DISASSOC_REQ while in SME_WT_DEAUTH_STATE. \n"));
                     break;
 
@@ -2611,7 +2533,7 @@
                 case eLIM_SME_IDLE_STATE:
                     psessionEntry->limPrevSmeState = psessionEntry->limSmeState;
                     psessionEntry->limSmeState = eLIM_SME_WT_DEAUTH_STATE;
-              MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+              MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, pMac->lim.gLimSmeState));
 
                     // Send Deauthentication request to MLM below
 
@@ -3040,178 +2962,6 @@
     palFreeMemory( pMac->hHdd, pRemoveKeyReq);
 } /*** end __limProcessSmeRemoveKeyReq() ***/
 
-
-
-#if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && defined(ANI_PRODUCT_TYPE_AP)
-/**
- * __limHandleSmeSwitchChlRequest()
- *
- *FUNCTION:
- *  This function is called to process the following SME messages
- *  received from HDD or WSM:
- *      - eWNI_SME_SWITCH_CHL_REQ
- *      - eWNI_SME_SWITCH_CHL_CB_PRIMARY_REQ
- *      - eWNI_SME_SWITCH_CHL_CB_SECONDARY_REQ
- *
- *ASSUMPTIONS:
- *
- *  eWNI_SME_SWITCH_CHL_REQ is issued only when 11h is enabled,
- *  and WSM wishes to switch its primary channel. AP shall
- *  populate the 802.11h channel switch IE in its Beacons/Probe Rsp.
- *
- *  eWNI_SME_SWITCH_CHL_CB_PRIMARY_REQ is issued only when 11h is enabled,
- *  and WSM wishes to switch both its primary channel and secondary channel.
- *  (In the case of if 11h is disabled, and WSM wants to change both
- *  primary & secondary channel, then WSM should issue a restart-BSS). AP
- *  shall populate the 802.11h channel switch IE in its Beacons/Probe Rsp.
- *
- *  eWNI_SME_SWITCH_CHL_CB_SECONDARY_REQ is issued when WSM wishes to
- *  switch/disable only its secondary channel. This can occur when 11h
- *  is enabled or disabled. AP shall populate the airgo proprietary
- *  channel switch IE in its Beacons/Probe Rsp.
- *
- *NOTE:
- *
- * @param  pMac      Pointer to Global MAC structure
- * @param  *pMsgBuf  A pointer to the SME message buffer
- * @return None
- */
-
-static void
-__limHandleSmeSwitchChlRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
-{
-    tpSirSmeSwitchChannelReq   pSmeMsg;
-    eHalStatus                 status;
-
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
-    limDiagEventReport(pMac, WLAN_PE_DIAG_SWITCH_CHL_REQ_EVENT, NULL, 0, 0);
-#endif //FEATURE_WLAN_DIAG_SUPPORT
-    
-    if(pMsgBuf == NULL)
-    {
-        limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n"));
-           return;
-    }
-
-    if (pMac->lim.gLimSmeState != eLIM_SME_NORMAL_STATE ||
-            pMac->lim.gLimSystemRole != eLIM_AP_ROLE ||
-            pMac->lim.gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING)
-    {
-        PELOGE(limLog(pMac, LOGE, "Rcvd Switch Chl Req in wrong state\n");)
-        limSendSmeRsp(pMac, eWNI_SME_SWITCH_CHL_RSP, eSIR_SME_CHANNEL_SWITCH_FAIL);
-        return;
-    }
-                
-    status = palAllocateMemory( pMac->hHdd, (void **)&pSmeMsg, sizeof(tSirSmeSwitchChannelReq));
-    if( eHAL_STATUS_SUCCESS != status)
-    {
-        PELOGE(limLog(pMac, LOGE, FL("palAllocateMemory failed, status = %d\n"), status);)
-        return;
-    }
-
-    if (!limIsSmeSwitchChannelReqValid(pMac, (tANI_U8 *)pMsgBuf, pSmeMsg))
-    {
-        limLog(pMac, LOGE,
-            FL("invalid sme message received\n"));
-        palFreeMemory( pMac->hHdd, pSmeMsg);
-        limSendSmeRsp(pMac, eWNI_SME_SWITCH_CHL_RSP, eSIR_SME_INVALID_PARAMETERS);
-        return;
-    }
-
-
-    /* If we're already doing channel switching and we're in the
-     * middle of counting down, then reject this channel switch msg.
-     */
-    if (pMac->lim.gLimChannelSwitch.state != eLIM_CHANNEL_SWITCH_IDLE)
-    {
-        limLog(pMac, LOGE,
-            FL("channel switching is already in progress.\n"));
-        palFreeMemory( pMac->hHdd, pSmeMsg);
-        limSendSmeRsp(pMac, eWNI_SME_SWITCH_CHL_RSP, eSIR_SME_CHANNEL_SWITCH_DISABLED);
-        return;
-    }
-
-    PELOG1(limLog(pMac, LOG1, FL("rcvd eWNI_SME_SWITCH_CHL_REQ, message type = %d\n"), pSmeMsg->messageType);)
-    switch(pSmeMsg->messageType)
-    {
-        case eWNI_SME_SWITCH_CHL_REQ:
-            pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_ONLY;
-            break;
-
-        case eWNI_SME_SWITCH_CHL_CB_PRIMARY_REQ:
-
-            pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
-            break;
-
-        case eWNI_SME_SWITCH_CHL_CB_SECONDARY_REQ:
-            pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_SECONDARY_ONLY;
-            break;
-
-        default:
-            PELOGE(limLog(pMac, LOGE, FL("unknown message\n"));)
-            palFreeMemory( pMac->hHdd, pSmeMsg);
-            limSendSmeRsp(pMac, eWNI_SME_SWITCH_CHL_RSP, eSIR_SME_INVALID_PARAMETERS);
-            return;
-    }
-
-    pMac->lim.gLimChannelSwitch.primaryChannel = pSmeMsg->channelId;
-    pMac->lim.gLimChannelSwitch.secondarySubBand = pSmeMsg->cbMode;
-    pMac->lim.gLimChannelSwitch.switchCount = computeChannelSwitchCount(pMac, pSmeMsg->dtimFactor);
-    if (LIM_IS_RADAR_DETECTED(pMac))
-    {
-        /** Measurement timers not running */
-        pMac->lim.gLimChannelSwitch.switchMode = eSIR_CHANSW_MODE_SILENT;
-    }
-    else
-    {
-        /** Stop measurement timers till channel switch */
-        limStopMeasTimers(pMac);
-        pMac->lim.gLimChannelSwitch.switchMode = eSIR_CHANSW_MODE_NORMAL;
-    }
-
-    PELOG1(limLog(pMac, LOG1, FL("state %d, primary %d, subband %d, count %d \n"),
-           pMac->lim.gLimChannelSwitch.state,
-           pMac->lim.gLimChannelSwitch.primaryChannel,
-           pMac->lim.gLimChannelSwitch.secondarySubBand,
-           pMac->lim.gLimChannelSwitch.switchCount);)
-    palFreeMemory( pMac->hHdd, pSmeMsg);
-    
-    pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_END;
-    pMac->lim.gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_RUNNING;
-    
-    return;
-} /*** end __limHandleSmeSwitchChlRequest() ***/
-
-
-/**--------------------------------------------------------------
-\fn     __limProcessSmeSwitchChlReq
-
-\brief  Wrapper for the function __limHandleSmeSwitchChlRequest
-        This message will be defered until softmac come out of
-        scan mode.
-\param  pMac
-\param  pMsg
-
-\return TRUE - If we consumed the buffer
-        FALSE - If have defered the message.
- ---------------------------------------------------------------*/
-static tANI_BOOLEAN
-__limProcessSmeSwitchChlReq(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
-{
-    if (__limIsDeferedMsgForLearn(pMac, pMsg))
-    {
-        /**
-                * If message defered, buffer is not consumed yet.
-                * So return false
-                */
-        return eANI_BOOLEAN_FALSE;
-    }
-    __limHandleSmeSwitchChlRequest(pMac, (tANI_U32 *) pMsg->bodyptr);
-    return eANI_BOOLEAN_TRUE;
-}
-#endif
-
-
 void limProcessSmeGetScanChannelInfo(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
 {
     tSirMsgQ         mmhMsg;
@@ -3262,7 +3012,7 @@
     mmhMsg.bodyval = 0;
   
     pMac->lim.gLimRspReqd = false;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg,  ePROT);
 }
 
@@ -3581,7 +3331,7 @@
     prevState = psessionEntry->limSmeState;
 
     psessionEntry->limSmeState = eLIM_SME_IDLE_STATE;
-    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
 
     /* Update SME session Id and Transaction Id */
     psessionEntry->smeSessionId = smesessionId;
@@ -3609,7 +3359,7 @@
         PELOGE(limLog(pMac, LOGE, FL("delBss failed for bss %d\n"), psessionEntry->bssIdx);)
         psessionEntry->limSmeState= prevState;
 
-        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
+        MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState));
    
         limSendSmeRsp(pMac, eWNI_SME_STOP_BSS_RSP, eSIR_SME_STOP_BSS_FAILURE,smesessionId,smetransactionId);
     }
@@ -4258,7 +4008,7 @@
         limLog(pMac, LOGP, FL("AddtsRsp timer change failed!\n"));
         return;
     }
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_ADDTS_RSP_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_ADDTS_RSP_TIMER));
     
     //add the sessionId to the timer object
     pMac->lim.limTimers.gLimAddtsRspTimer.sessionId = sessionId;
@@ -4441,6 +4191,7 @@
     if((psessionEntry = peFindSessionByBssid(pMac,pStatsReq->bssId,&sessionId))== NULL)
     {
         limLog(pMac, LOGE, FL("session does not exist for given bssId\n"));
+        palFreeMemory( pMac, pMsgBuf );
         return;
     }
 
@@ -4482,10 +4233,11 @@
     msgQ.reserved = 0;
     msgQ.bodyptr = pMsgBuf;
     msgQ.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
     if( eSIR_SUCCESS != (wdaPostCtrlMsg( pMac, &msgQ ))){
         limLog(pMac, LOGP, "Unable to forward request\n");
+        palFreeMemory( pMac, pMsgBuf );
         return;
     }
 
@@ -4530,7 +4282,7 @@
     msgQ.reserved = 0;
     msgQ.bodyptr = pMsgBuf;
     msgQ.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
 
     if( eSIR_SUCCESS != (wdaPostCtrlMsg( pMac, &msgQ ))){
         palFreeMemory( pMac, pMsgBuf );
@@ -4866,7 +4618,7 @@
    msg.bodyval = 0;
 
    PELOGW(limLog(pMac, LOG1, FL("sending SIR_HAL_ADD_STA_SELF_REQ msg to HAL\n"));)
-      MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+      MTRACE(macTraceMsgTx(pMac, NO_SESSION, msg.type));
 
    if(eSIR_SUCCESS != wdaPostCtrlMsg(pMac, &msg))
    {
@@ -4916,7 +4668,7 @@
    msg.bodyval = 0;
 
    PELOGW(limLog(pMac, LOG1, FL("sending SIR_HAL_ADD_STA_SELF_REQ msg to HAL\n"));)
-      MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+      MTRACE(macTraceMsgTx(pMac, NO_SESSION, msg.type));
 
    if(eSIR_SUCCESS != wdaPostCtrlMsg(pMac, &msg))
    {
@@ -4952,9 +4704,8 @@
     tpLimMgmtFrameRegistration pLimMgmtRegistration = NULL, pNext = NULL;
     tANI_BOOLEAN match = VOS_FALSE;
     PELOG1(limLog(pMac, LOG1, 
-           FL("%s: registerFrame %d, frameType %d, matchLen %d\n", 
-           __func__, pSmeReq->registerFrame, pSmeReq->frameType, 
-       pSmeReq->matchLen)));
+           FL("registerFrame %d, frameType %d, matchLen %d\n"), 
+            pSmeReq->registerFrame, pSmeReq->frameType, pSmeReq->matchLen);)
 
     /* First check whether entry exists already*/
 
@@ -5056,7 +4807,7 @@
     tANI_BOOLEAN bufConsumed = TRUE; //Set this flag to false within case block of any following message, that doesnt want pMsgBuf to be freed.
     tANI_U32 *pMsgBuf = pMsg->bodyptr;
 
-    PELOG1(limLog(pMac, LOG1, FL("LIM Received SME Message %s(%d) LimSmeState:%s(%d) LimMlmState: %s(%d)\n"),
+    PELOG1(limLog(pMac, LOG1, FL("LIM Received SME Message %s(%d) Global LimSmeState:%s(%d) Global LimMlmState: %s(%d)\n"),
          limMsgStr(pMsg->type), pMsg->type,
          limSmeStateStr(pMac->lim.gLimSmeState), pMac->lim.gLimSmeState,
          limMlmStateStr(pMac->lim.gLimMlmState), pMac->lim.gLimMlmState );)
@@ -5081,6 +4832,12 @@
 
             break;
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+        case eWNI_SME_OEM_DATA_REQ:
+            __limProcessSmeOemDataReq(pMac, pMsgBuf);
+
+            break;
+#endif
 #ifdef WLAN_FEATURE_P2P
         case eWNI_SME_REMAIN_ON_CHANNEL_REQ:
             bufConsumed = limProcessRemainOnChnlReq(pMac, pMsgBuf);
diff --git a/CORE/MAC/src/pe/lim/limPropExtsUtils.c b/CORE/MAC/src/pe/lim/limPropExtsUtils.c
index cfd824f..2419782 100644
--- a/CORE/MAC/src/pe/lim/limPropExtsUtils.c
+++ b/CORE/MAC/src/pe/lim/limPropExtsUtils.c
@@ -33,7 +33,6 @@
  * --------------------------------------------------------------------
  *
  */
-
 #include "aniGlobal.h"
 #ifdef ANI_PRODUCT_TYPE_AP
 #include "wniCfgAp.h"
@@ -55,7 +54,6 @@
 #include "limSerDesUtils.h"
 #include "limTrace.h"
 #include "limSession.h"
-
 #define LIM_GET_NOISE_MAX_TRY 5
 #if (defined(ANI_PRODUCT_TYPE_AP) || defined(ANI_PRODUCT_TYPE_AP_SDK))
 /**
@@ -82,11 +80,9 @@
 limGetCurrentLearnChannel(tpAniSirGlobal pMac)
 {
     tANI_U8 *pChanNum = pMac->lim.gpLimMeasReq->channelList.channelNumber;
-
     return (*(pChanNum + pMac->lim.gLimMeasParams.nextLearnChannelId));
 } /*** end limGetCurrentLearnChannel() ***/
 #endif //#if (defined(ANI_PRODUCT_TYPE_AP) || defined(ANI_PRODUCT_TYPE_AP_SDK))
-
 /**
  * limExtractApCapability()
  *
@@ -107,7 +103,6 @@
  * @param   qosCap    Bits are set according to capabilities
  * @return  0 - If AP does not assert HCF capability & 1 - otherwise
  */
-
 void
 limExtractApCapability(tpAniSirGlobal pMac, tANI_U8 *pIE, tANI_U16 ieLen,
                        tANI_U8 *qosCap, tANI_U16 *propCap, tANI_U8 *uapsd, 
@@ -118,13 +113,10 @@
 #if !defined WLAN_FEATURE_VOWIFI
     tANI_U32            localPowerConstraints = 0;
 #endif
-
     palZeroMemory( pMac->hHdd, (tANI_U8 *) &beaconStruct, sizeof(beaconStruct));
-
     *qosCap = 0;
     *propCap = 0;
     *uapsd = 0;
-
     PELOG3(limLog( pMac, LOG3,
         FL("In limExtractApCapability: The IE's being received are:\n"));
     sirDumpBuf( pMac, SIR_LIM_MODULE_ID, LOG3, pIE, ieLen );)
@@ -146,10 +138,24 @@
         else
             pMac->lim.htCapabilityPresentInBeacon = 0;
 
+#ifdef WLAN_FEATURE_11AC
+        VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_FATAL,
+            "***beacon.VHTCaps.present*****=%d\n",beaconStruct.VHTCaps.present);
+
+        if ( beaconStruct.VHTCaps.present && beaconStruct.VHTOperation.present)
+        {
+            pMac->lim.vhtCapabilityPresentInBeacon = 1;
+            pMac->lim.apCenterChan = beaconStruct.VHTOperation.chanCenterFreqSeg1;
+            pMac->lim.apChanWidth = beaconStruct.VHTOperation.chanWidth;
+        }
+        else
+        {
+            pMac->lim.vhtCapabilityPresentInBeacon = 0;
+        }
+#endif
         // Extract the UAPSD flag from WMM Parameter element
         if (beaconStruct.wmeEdcaPresent)
             *uapsd = beaconStruct.edcaParams.qosInfo.uapsd;
-
 #if defined FEATURE_WLAN_CCX
         /* If there is Power Constraint Element specifically,
          * adapt to it. Hence there is else condition check
@@ -160,12 +166,15 @@
             *localConstraint = beaconStruct.ccxTxPwr.power_limit;
         }
 #endif
-
-        if (beaconStruct.powerConstraintPresent && ( pMac->lim.gLim11hEnable
+        if (beaconStruct.powerConstraintPresent)
+#if 0
+        //Remove this check. This function is expected to return localPowerConsraints
+        //and it should just do that. Check for 11h enabled or not can be done at the caller
 #if defined WLAN_FEATURE_VOWIFI
-                 || pMac->rrm.rrmPEContext.rrmEnable
+          && ( pMac->lim.gLim11hEnable
+           || pMac->rrm.rrmPEContext.rrmEnable
 #endif
-                 ))
+#endif
         {
 #if defined WLAN_FEATURE_VOWIFI 
            *localConstraint -= beaconStruct.localPowerConstraint.localPowerConstraints;
@@ -173,7 +182,6 @@
            localPowerConstraints = (tANI_U32)beaconStruct.localPowerConstraint.localPowerConstraints;
 #endif
         }
-
 #if !defined WLAN_FEATURE_VOWIFI
         if (cfgSetInt(pMac, WNI_CFG_LOCAL_POWER_CONSTRAINT, localPowerConstraints) != eSIR_SUCCESS)
         {
@@ -181,12 +189,9 @@
         }
 #endif
     }
-
     return;
 } /****** end limExtractApCapability() ******/
 
-
-
 #if (defined(ANI_PRODUCT_TYPE_AP) || defined(ANI_PRODUCT_TYPE_AP_SDK))
 /**
  * limQuietBss()
@@ -210,18 +215,14 @@
  * @param   duration  Specifies quiet duration in millisec
  * @return  None
  */
-
 void
 limQuietBss(tpAniSirGlobal pMac, tANI_U32 duration)
 {
-
     // Temporarily not quieting BSS
     (void) pMac; (void) duration;
     return;
 } /****** end limQuietBss() ******/
 
-
-
 /**
  * limIsMatrixNodePresent()
  *
@@ -240,16 +241,13 @@
  * @param   pMac  - Pointer to Global MAC structure
  * @return  pNode - Pointer to Matrix node if found. Else NULL
  */
-
 static tpLimMeasMatrixNode
 limIsMatrixNodePresent(tpAniSirGlobal pMac)
 {
     tANI_U8   i, chanNum = limGetCurrentLearnChannel(pMac);
     tpLimMeasMatrixNode pNode = pMac->lim.gpLimMeasData->pMeasMatrixInfo;
-
     if (!pNode)
         return NULL;
-
     for (i = 0; i < pMac->lim.gpLimMeasReq->channelList.numChannels; i++)
     {
         if (pNode->matrix.channelNumber == chanNum)
@@ -264,12 +262,9 @@
                 break;
         }
     }
-
     return NULL;
 } /****** end limIsMatrixNodePresent() ******/
 
-
-
 /**
  * limGetMatrixNode()
  *
@@ -289,13 +284,11 @@
  * @param   pMac      Pointer to Global MAC structure
  * @return  None
  */
-
 static tpLimMeasMatrixNode
 limGetMatrixNode(tpAniSirGlobal pMac)
 {
     tpLimMeasMatrixNode       pNewMatrix;
     eHalStatus          status;
-
     pNewMatrix = limIsMatrixNodePresent(pMac);
     if (!pNewMatrix)
     {
@@ -310,7 +303,6 @@
                FL("palAllocateMemory failed for new measMatrix Node\n"));
             return NULL;
         }
-
         status = palZeroMemory( pMac->hHdd, (void *)pNewMatrix, sizeof(*pNewMatrix));
         if (status != eHAL_STATUS_SUCCESS)
         {
@@ -324,20 +316,15 @@
         pNewMatrix->matrix.channelNumber =
                                    limGetCurrentLearnChannel(pMac);
         pNewMatrix->avgRssi              = 0;
-
        PELOG3(limLog(pMac, LOG3, FL("Adding new Matrix info:channel#=%d\n"),
                pNewMatrix->matrix.channelNumber);)
-
         pNewMatrix->next = pMac->lim.gpLimMeasData->pMeasMatrixInfo;
         pMac->lim.gpLimMeasData->pMeasMatrixInfo = pNewMatrix;
         pMac->lim.gpLimMeasData->numMatrixNodes++;
     }
-
     return pNewMatrix;
 } /****** end limGetMatrixNode() ******/
 
-
-
 /**
  * limComputeAvg()
  *
@@ -358,7 +345,6 @@
  * @param   newVal    New averaged value
  * @return  None
  */
-
 tANI_U32
 limComputeAvg(tpAniSirGlobal pMac, tANI_U32 oldVal, tANI_U32 newVal)
 {
@@ -367,8 +353,6 @@
                       pMac->lim.gLimMeasParams.rssiAlpha));
 } /****** end limComputeAvg() ******/
 
-
-
 /**
  * limCollectRSSI()
  *
@@ -387,13 +371,11 @@
  * @param   pMac      Pointer to Global MAC structure
  * @return  None
  */
-
 void
 limCollectRSSI(tpAniSirGlobal pMac)
 {
     tpLimMeasMatrixNode  pNewMatrix = limGetMatrixNode(pMac);
     tANI_U32 i, noise;
-
     for (i = 0; i < LIM_GET_NOISE_MAX_TRY; i++)
         if ((noise = halGetNoise(pMac)) != HAL_NOISE_INVALID)
         {
@@ -404,17 +386,14 @@
         }
 } /****** end limCollectRSSI() ******/
 
-
 /**----------------------------------------------------------------------------
 \fn        limGetNeighbourBssNode
-
 \brief    returns neighbour bss node if it is already present in the list.
 \param pMac
 \param bssid - Bssid of new beacon or data packet.
 \param pSsId - Pointer to SSID of new packet.
 \param nwType - 11b/g/a
 \param chanId - Channel in which we received the packet.
-
 \return tpLimNeighborBssWdsNode or NULL
 -------------------------------------------------------------------------------*/
 static tpLimNeighborBssWdsNode
@@ -422,7 +401,6 @@
                                             tSirNwType nwType, tpAniSSID pSsId, tANI_U8 type)
 {
     tpLimNeighborBssWdsNode pNode = pMac->lim.gpLimMeasData->pNeighborWdsInfo;
-
     while (pNode)
     {
         //Do we need to check for ssId also ?
@@ -448,17 +426,14 @@
 #endif
                 return pNode;
         }
-
         if (!pNode->next)
             break;
         else
             pNode = pNode->next;
     }
-
     return NULL;
 }
 
-
 /**
  * limCollectMeasurementData()
  *
@@ -479,7 +454,6 @@
  * @param  pBeacon  - Pointer to parsed BSS info
  * @return None
  */
-
 void
 limCollectMeasurementData(tpAniSirGlobal pMac,
                           tANI_U32 *pRxPacketInfo, tpSchBeaconStruct pBeacon)
@@ -496,10 +470,8 @@
     tpLimMeasMatrixNode     pNewMatrix;
     eHalStatus status;
     tpSirMacMgmtHdr       pHdr;
-
    PELOG3(limLog(pMac, LOG3, FL("Collecting measurement data for RadioId %d\n"),
            pMac->sys.gSirRadioId);)
-
     tANI_U32 ignore = 0;
     limGetBssidFromBD(pMac, (tpHalBufDesc) pRxPacketInfo, bssIdRcv, &ignore);
     if (palEqualMemory( pMac->hHdd, bssIdRcv, pMac->lim.gLimBssid, sizeof(tSirMacAddr)))
@@ -509,7 +481,6 @@
     }
     pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo);
     fc = pHdr->fc;
-
     if (fc.type == SIR_MAC_DATA_FRAME)
     {
         PELOG2(limLog(pMac, LOG2, FL("Received DATA packet\n"));)
@@ -524,7 +495,6 @@
         chanId = limGetChannelFromBeacon(pMac, pBeacon);
         ieLen = pBeacon->wpa.length + pBeacon->propIEinfo.wdsLength;
     }
-
     if (chanId == 0)
     {
       /* If the channel Id is not retrieved from Beacon, extract the channel from BD */
@@ -536,30 +506,24 @@
            chanId = pMac->lim.gLimCurrentScanChannelId;
       }
     }
-
     /*
      * Now always returns nwType as 11G for data packets - FIXIT
      */
     nwType = limGetNwType(pMac, chanId, fc.type, pBeacon);
-
     pNewMatrix = limGetMatrixNode(pMac);
     /** LOGP would result in freeing all dynamicall allocated memories. So
       *  return from here if limGetMatrixNode returns NULL
       */
     if (!pNewMatrix)
         return;
-
     pNewMatrix->matrix.aggrRssi += WDA_GET_RX_RSSI_DB(pRxPacketInfo);
     pNewMatrix->matrix.totalPackets++;
-
     // Find if this neighbor is already 'learned'
     // If found, update its information.
     pNode = limGetNeighbourBssNode(pMac, bssIdRcv, chanId, nwType, &ssId, fc.type);
-
     if (!pNode)
     {
         realLen = sizeof(tSirNeighborBssWdsInfo);
-
         /** Newly discovered neighbor. Inform WSM of this
           * and add this BSS info at the beginning
           * Need to limit the number newly discovered BSS added
@@ -570,14 +534,12 @@
                  sizeof(tSirMeasMatrixInfo)));
        PELOG2(limLog(pMac, LOG2, FL("Current BSS length %d, Real length %d\n"),
                 pMac->lim.gpLimMeasData->totalBssSize, realLen);)
-
         /** Check if we have enough room for adding a new node.
           */
         if (pMac->lim.gpLimMeasData->totalBssSize + realLen < len)
         {
             pMac->lim.gpLimMeasData->numBssWds++;
             pMac->lim.gpLimMeasData->totalBssSize += realLen;
-
             PELOG2(limPrintMacAddr(pMac, bssIdRcv, LOG2);)
         }
         else
@@ -585,20 +547,17 @@
             PELOG2(limLog(pMac, LOG2, FL("Dropping the measurement packets: No memory!\n"));)
             return;
     }
-
         /** Allocate max memory required even if the packet is of type DATA,
           * So that next time we receive a beacon, won't run out of memory to
           * update the information.
           */
         allocLen = sizeof(tLimNeighborBssWdsNode) + 4 + ieLen;
         status = palAllocateMemory( pMac->hHdd, (void **)&pNode, allocLen);
-
     if (status != eHAL_STATUS_SUCCESS)
     {
             limLog(pMac, LOGP, FL("palAllocateMemory failed for new NeighborBssWds Node\n"));
         return;
     }
-
         status = palZeroMemory(pMac->hHdd, pNode, allocLen);
         if (status != eHAL_STATUS_SUCCESS)
         {
@@ -609,13 +568,11 @@
         pMac->lim.gpLimMeasData->pNeighborWdsInfo = pNode;
         found = eANI_BOOLEAN_FALSE;
     }
-
     pNode->info.neighborBssInfo.rssi = WDA_GET_RX_RSSI_DB(pRxPacketInfo);
     pNode->info.neighborBssInfo.aggrRssi += pNode->info.neighborBssInfo.rssi;
     if (fc.type == SIR_MAC_DATA_FRAME)
         pNode->info.neighborBssInfo.dataCount++;
     pNode->info.neighborBssInfo.totalPackets++;
-
     /** If node not found or previous learn was not from a beacon/probe rsp
       * then learn again.
       */
@@ -630,12 +587,10 @@
         // Data frame received from other BSS.
         // Collect as much information as possible
             pNode->info.neighborBssInfo.wniIndicator = (tAniBool) 0;
-
         if (fc.toDS || fc.fromDS)
                 pNode->info.neighborBssInfo.bssType = eSIR_INFRASTRUCTURE_MODE;
         else
                 pNode->info.neighborBssInfo.bssType = eSIR_IBSS_MODE;
-
             pNode->info.neighborBssInfo.load.numStas = 0;
             pNode->info.neighborBssInfo.load.channelUtilization = 0;
             pNode->info.neighborBssInfo.ssId.length = 0;
@@ -645,19 +600,6 @@
     }
     else
     {
-        //FIXME_CBMODE: need to seperate out TITAN and HT cb modes.
-        if(pBeacon->HTCaps.present)
-        {
-            limGetHtCbAdminState(pMac, pBeacon->HTCaps, 
-                        &pNode->info.neighborBssInfo.titanHtCaps);
-        
-            if( pBeacon->HTInfo.present)
-            {
-                    limGetHtCbOpState(pMac, pBeacon->HTInfo, 
-                            &pNode->info.neighborBssInfo.titanHtCaps);
-            }
-        }
-
         // This must be either Beacon frame or
         // Probe Response. Copy all relevant information.
             pNode->info.neighborBssInfo.wniIndicator = (tAniBool) pBeacon->propIEinfo.aniIndicator;
@@ -670,7 +612,6 @@
             pNode->info.neighborBssInfo.apName.length = pBeacon->propIEinfo.apName.length;
             palCopyMemory( pMac->hHdd, (tANI_U8 *) pNode->info.neighborBssInfo.apName.name,
                     pBeacon->propIEinfo.apName.name, pBeacon->propIEinfo.apName.length);
-
             pNode->info.neighborBssInfo.rsnIE.length = 0;
             // Add WPA2 information. Before that make sure that memory is available
             if (pBeacon->rsnPresent && (pBeacon->rsn.length < SIR_MAC_MAX_IE_LENGTH))
@@ -680,12 +621,10 @@
                 pNode->info.neighborBssInfo.rsnIE.rsnIEdata[1] = pBeacon->rsn.length;
                 palCopyMemory( pMac->hHdd, (tANI_U8 *) &pNode->info.neighborBssInfo.rsnIE.rsnIEdata[2],
                         pBeacon->rsn.info, pBeacon->rsn.length);
-
                PELOG2(limLog(pMac, LOG2, FL("NeighborBss RSN IE, type=%x, length=%x\n"), 
                         pNode->info.neighborBssInfo.rsnIE.rsnIEdata[0],
                         pNode->info.neighborBssInfo.rsnIE.rsnIEdata[1]);)
             }
-
             // Add WPA information. Before that make sure that memory is available
             if (pBeacon->wpaPresent && ((pBeacon->rsn.length + pBeacon->wpa.length) < (SIR_MAC_MAX_IE_LENGTH-2)))
             {
@@ -693,11 +632,9 @@
                     SIR_MAC_WPA_EID;
                 pNode->info.neighborBssInfo.rsnIE.rsnIEdata[pNode->info.neighborBssInfo.rsnIE.length + 1] =
                     pBeacon->wpa.length;
-
                 palCopyMemory( pMac->hHdd,
                         (tANI_U8 *) &pNode->info.neighborBssInfo.rsnIE.rsnIEdata[pNode->info.neighborBssInfo.rsnIE.length + 2],
                         pBeacon->wpa.info, pBeacon->wpa.length);
-
                PELOG2(limLog(pMac, LOG2, FL("NeighborBss WPA IE, type=%x, length=%x\n"),
                         pNode->info.neighborBssInfo.rsnIE.rsnIEdata[pNode->info.neighborBssInfo.rsnIE.length],
                         pNode->info.neighborBssInfo.rsnIE.rsnIEdata[pNode->info.neighborBssInfo.rsnIE.length + 1]);)
@@ -707,28 +644,23 @@
             palCopyMemory( pMac->hHdd, (tANI_U8 *) pNode->info.wdsInfo.wdsBytes,
                       pBeacon->propIEinfo.wdsData,
                       pBeacon->propIEinfo.wdsLength);
-
             pNode->info.neighborBssInfo.capabilityInfo = *((tANI_U16*)&pBeacon->capabilityInfo);
-
 #if 0
             if (pBeacon->HTCaps.present)
                 palCopyMemory( pMac->hHdd, (tANI_U8 *)&pNode->info.neighborBssInfo.HTCaps,
                         (tANI_U8 *)&pBeacon->HTCaps, HT_CAPABILITY_IE_SIZE);
         else
                 pNode->info.neighborBssInfo.HTCaps.present = 0;
-
             if (pBeacon->HTInfo.present)
                 palCopyMemory( pMac->hHdd, (tANI_U8 *)&pNode->info.neighborBssInfo.HTInfo,
                         (tANI_U8 *)&pBeacon->HTInfo, HT_INFO_IE_SIZE);
         else
                 pNode->info.neighborBssInfo.HTInfo.present = 0;
 #endif
-
             if (pBeacon->suppRatesPresent && (pBeacon->supportedRates.numRates <= 
                                               SIR_MAC_RATESET_EID_MAX))
             {
                 pNode->info.neighborBssInfo.operationalRateSet.numRates = pBeacon->supportedRates.numRates;
-
                PELOG4(limLog(pMac, LOG4, FL("Supported Rates (%d) : "),
                         pNode->info.neighborBssInfo.operationalRateSet.numRates);)
                 for (i=0; i<pBeacon->supportedRates.numRates; i++)
@@ -738,12 +670,10 @@
                 }
                 PELOG4(limLog(pMac, LOG4, FL("\n"));)
             }
-
             if (pBeacon->extendedRatesPresent && (pBeacon->extendedRates.numRates <= 
                                                   SIR_MAC_RATESET_EID_MAX))
             {
                 pNode->info.neighborBssInfo.extendedRateSet.numRates = pBeacon->extendedRates.numRates;
-
                PELOG4(limLog(pMac, LOG4, FL("Extended Rates (%d) : "),
                         pNode->info.neighborBssInfo.extendedRateSet.numRates);)
                 for (i=0; i<pBeacon->extendedRates.numRates; i++)
@@ -770,7 +700,6 @@
         }
     }
 } /****** end limCollectMeasurementData() ******/
-
 /**
  * limCleanupMatrixNodes()
  *
@@ -789,7 +718,6 @@
  * @param  pMac      Pointer to Global MAC structure
  * @return None
  */
-
 static void
 limCleanupMatrixNodes(tpAniSirGlobal pMac)
 {
@@ -797,26 +725,21 @@
     {
         tpLimMeasMatrixNode pNode = pMac->lim.gpLimMeasData->pMeasMatrixInfo;
         tpLimMeasMatrixNode pNext;
-
       while (pNode)
       {
             pNext = pNode->next;
             palFreeMemory( pMac->hHdd, pNode);
-
             if (pNext)
                 pNode = pNext;
             else
               break;
           }
       }
-
     pMac->lim.gpLimMeasData->numMatrixNodes = 0;
          PELOG2(limLog(pMac, LOG2,
            FL("Cleaned up channel matrix nodes\n"));)
-
     pMac->lim.gpLimMeasData->pMeasMatrixInfo = NULL;
 } /****** end limCleanupMatrixNodes() ******/
-
 /**
  * limCleanupNeighborBssNodes()
  *
@@ -835,7 +758,6 @@
  * @param  pMac      Pointer to Global MAC structure
  * @return None
  */
-
 static void
 limCleanupNeighborBssNodes(tpAniSirGlobal pMac)
 {
@@ -849,23 +771,19 @@
             pNext = pNode->next;
             pMac->lim.gpLimMeasData->numBssWds--;
             palFreeMemory( pMac->hHdd, pNode);
-
             if (pNext)
                 pNode = pNext;
             else
                 break;
         }
     }
-
    PELOG2(limLog(pMac, LOG2,
            FL("Cleaned up neighbor nodes\n"));)
-
     pMac->lim.gpLimMeasData->numBssWds        = 0;
     pMac->lim.gpLimMeasData->totalBssSize     = 0;
     pMac->lim.gpLimMeasData->pNeighborWdsInfo = NULL;
 } /****** end limCleanupNeighborBssNodes() ******/
 
-
 /**
  * limSendSmeMeasurementInd()
  *
@@ -882,32 +800,27 @@
  * @param  pMac - Pointer to Global MAC structure
  * @return None
  */
-
 void
 limSendSmeMeasurementInd(tpAniSirGlobal pMac)
 {
     tANI_U8          *pMeasInd;
     tANI_U16         len = 0;
     tSirMsgQ    mmhMsg;
-
 #ifdef GEN6_TODO
     //fetch the sessionEntry based on the sessionId
     //priority - MEDIUM
     tpPESession sessionEntry;
-
     if((sessionEntry = peFindSessionBySessionId(pMac, pMac->lim.gLimMeasParams.measurementIndTimer.sessionId))== NULL) 
     {
         limLog(pMac, LOGP,FL("Session Does not exist for given sessionID\n"));
         return;
     }
 #endif
-
     if (!pMac->sys.gSysEnableLearnMode ||
         (pMac->lim.gpLimMeasReq == NULL))
     {
         return;
     }
-
     len = sizeof(tSirSmeMeasurementInd) +
           (pMac->lim.gpLimMeasReq->channelList.numChannels *
            sizeof(tSirMeasMatrixInfo)) +
@@ -921,37 +834,28 @@
                pMac->lim.gpLimMeasData->numBssWds,
                pMac->lim.gpLimMeasData->totalBssSize);
     }
-
     PELOG2(limLog(pMac, LOG2, FL("*****  Measurement IND size %d\n"), len);)
-
     if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pMeasInd, len))
     {
         /// Buffer not available. Log error
         limLog(pMac, LOGP,
                FL("call to palAllocateMemory failed for eWNI_SME_MEAS_IND\n"));
-
         return;
     }
-
    PELOG3(limLog(pMac, LOG3,
        FL("Sending eWNI_SME_MEAS_IND on Radio %d, requested len=%d\n"),
        pMac->sys.gSirRadioId, len);)
-
     limMeasurementIndSerDes(pMac, pMeasInd);
-
     mmhMsg.type = eWNI_SME_MEASUREMENT_IND;
     mmhMsg.bodyptr = pMeasInd;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg,  ePROT);
-
     // Cleanup neighbor information
     limCleanupNeighborBssNodes(pMac);
     limCleanupMatrixNodes(pMac);
 } /*** end limSendSmeMeasurementInd() ***/
 
-
-
 /**
  * limCleanupMeasData()
  *
@@ -972,51 +876,40 @@
  * @param  pMac      Pointer to Global MAC structure
  * @return None
  */
-
 void
 limCleanupMeasData(tpAniSirGlobal pMac)
 {
     if (pMac->lim.gpLimMeasReq)
         palFreeMemory( pMac->hHdd, pMac->lim.gpLimMeasReq);
-
     pMac->lim.gpLimMeasReq = NULL;
-
     if (!pMac->lim.gpLimMeasData)
         return;
-
     if (pMac->lim.gpLimMeasData->pMeasMatrixInfo)
     {
         // Retain current channel's data and flush remaining
         tpLimMeasMatrixNode pMatrix =
                         (pMac->lim.gpLimMeasData->pMeasMatrixInfo)->next;
         tpLimMeasMatrixNode pNext;
-
         while (pMatrix)
         {
             pNext = pMatrix->next;
             palFreeMemory( pMac->hHdd, pMatrix);
-
             if (pNext)
                 pMatrix = pNext;
             else
                 break;
         }
-
         pMac->lim.gpLimMeasData->pMeasMatrixInfo->next = NULL;
     }
-
     pMac->lim.gpLimMeasData->numMatrixNodes = 0;
    PELOG2(limLog(pMac, LOG2,
            FL("Cleaned up measurement metrics nodes\n"));)
-
     // Cleanup neighbor information
     limCleanupNeighborBssNodes(pMac);
 } /****** end limCleanupMeasData() ******/
-
 /**---------------------------------------------------------
 \fn     limStopMeasTimers
 \brief  Stops all measurement related timers.
-
 \param  pMac
 \return None
  ----------------------------------------------------------*/
@@ -1025,7 +918,6 @@
 {
     if (pMac->lim.gpLimMeasReq == NULL)
         return;
-
     if (pMac->lim.gpLimMeasReq->measControl.periodicMeasEnabled)
     {
         if (tx_timer_deactivate(&pMac->lim.gLimMeasParams.measurementIndTimer) != TX_SUCCESS)
@@ -1034,28 +926,25 @@
         }
     }
     pMac->lim.gLimMeasParams.isMeasIndTimerActive = 0;
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_LEARN_INTERVAL_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, NO_SESSION, eLIM_LEARN_INTERVAL_TIMER));
     if (tx_timer_deactivate(&pMac->lim.gLimMeasParams.learnIntervalTimer) != TX_SUCCESS)
     {
         PELOGE(limLog(pMac, LOGE, FL("Cannot stop learn interval timer\n"));)
     }
-
     if (pMac->lim.gLimSpecMgmt.fQuietEnabled)
     {
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_LEARN_DURATION_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, NO_SESSION, eLIM_LEARN_DURATION_TIMER));
         if (tx_timer_deactivate(&pMac->lim.gLimMeasParams.learnDurationTimer) != TX_SUCCESS)
         {
             PELOGE(limLog(pMac, LOGE, FL("Cannot stop learn duration timer\n"));)
         }
     }
-
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_LEARN_DURATION_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, NO_SESSION, eLIM_LEARN_DURATION_TIMER));
     if (tx_timer_deactivate(&pMac->lim.gLimMeasParams.learnDurationTimer) != TX_SUCCESS)
     {
         PELOGE(limLog(pMac, LOGE, FL("Cannot stop learn duration timer\n"));)
     }
 }
-
 /**
  * limDeleteMeasTimers()
  *
@@ -1073,7 +962,6 @@
  * @param  pMac      Pointer to Global MAC structure
  * @return None
  */
-
 void
 limDeleteMeasTimers(tpAniSirGlobal pMac)
 {
@@ -1083,8 +971,6 @@
     tx_timer_delete(&pMac->lim.gLimMeasParams.learnDurationTimer);
 } /*** end limDeleteMeasTimers() ***/
 
-
-
 /**
  * limCleanupMeasResources()
  *
@@ -1105,30 +991,24 @@
  * @param  pMac      Pointer to Global MAC structure
  * @return None
  */
-
 void
 limCleanupMeasResources(tpAniSirGlobal pMac)
 {
    PELOG1( limLog(pMac, LOG1,
            FL("Cleaning up Learn mode Measurement resources\n"));)
-
     if (pMac->lim.gpLimMeasReq == NULL)
         return;
-
     limDeleteMeasTimers(pMac);
-
     if (pMac->lim.gpLimMeasData)
     {
         limCleanupMeasData(pMac);
         if (pMac->lim.gpLimMeasData->pMeasMatrixInfo)
             palFreeMemory( pMac->hHdd, pMac->lim.gpLimMeasData->pMeasMatrixInfo);
-
         palFreeMemory( pMac->hHdd, pMac->lim.gpLimMeasData);
         pMac->lim.gpLimMeasData = NULL;
     }
 } /****** end limCleanupMeasResources() ******/
 
-
 /**
  * limDeleteCurrentBssWdsNode()
  *
@@ -1152,7 +1032,6 @@
 {
     tANI_U32                 cfg = sizeof(tSirMacAddr);
     tSirMacAddr         currentBssId;
-
 #if 0
     if (wlan_cfgGetStr(pMac, WNI_CFG_BSSID, currentBssId, &cfg) !=
                                 eSIR_SUCCESS)
@@ -1162,10 +1041,8 @@
     }
 #endif //TO SUPPORT BT-AMP
     sirCopyMacAddr(currentBssId,sessionEntry->bssId);
-
     if (!pMac->lim.gpLimMeasData)
         return;
-
     if (pMac->lim.gpLimMeasData->pNeighborWdsInfo)
     {
         tpLimNeighborBssWdsNode pNode =
@@ -1183,20 +1060,16 @@
                 break;
             }
             pPrev = pNode;
-
             if (pNode->next)
                 pNode = pNode->next;
             else
                 break;
         }
-
         if (!pMac->lim.gpLimMeasData->numBssWds)
             pMac->lim.gpLimMeasData->pNeighborWdsInfo = NULL;
     }
 } /****** end limDeleteCurrentBssWdsNode() ******/
 
-
-
 /**
  * limRestorePreLearnState()
  *
@@ -1215,61 +1088,23 @@
  * @param  pMac      Pointer to Global MAC structure
  * @return None
  */
-
 void
 limRestorePreLearnState(tpAniSirGlobal pMac)
 {
    PELOG4(limLog(pMac, LOG4,
            FL("Restoring from Learn mode on RadioId %d\n"),
            pMac->sys.gSirRadioId);)
-
     pMac->lim.gLimSystemInScanLearnMode = 0;
-
     // Go back to previous state.
     pMac->lim.gLimSmeState = pMac->lim.gLimPrevSmeState;
     pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState;
-    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, 0, pMac->lim.gLimSmeState));
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
-
+    MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, NO_SESSION, pMac->lim.gLimSmeState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, NO_SESSION, pMac->lim.gLimMlmState));
    PELOG4(limLog(pMac, LOG4,
            FL("Restored from Learn mode on RadioId %d\n"),
            pMac->sys.gSirRadioId);)
 } /****** end limRestorePreLearnState() ******/
-
 #endif //#if (defined(ANI_PRODUCT_TYPE_AP) || (ANI_PRODUCT_TYPE_AP_SDK))
-
-/**
- * limGetPhyCBState
- *
- *FUNCTION:
- * Based on the current state of LIM, this routine determines
- * the correct PHY enumeration "ePhyChanBondState" to use
- *
- *LOGIC:
- * Is it possible to have a common enumeration?
- *
- *ASSUMPTIONS:
- *
- *NOTE:
- *
- * @param  pMac - Pointer to Global MAC structure
- * @return The corresponding PHY enumeration ePhyChanBondState
- */
-ePhyChanBondState limGetPhyCBState( tpAniSirGlobal pMac )
-{
-    ePhyChanBondState cbState = PHY_SINGLE_CHANNEL_CENTERED;
-
-    if( GET_CB_OPER_STATE( pMac->lim.gCbState ))
-    {
-      if( GET_CB_SEC_CHANNEL( pMac->lim.gCbState ))
-        cbState = PHY_DOUBLE_CHANNEL_LOW_PRIMARY;
-      else
-        cbState = PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
-    }
-  return cbState;
-}
-
-
 /**
  * limGetHTCBState
  *
@@ -1284,45 +1119,34 @@
  * @param  pMac - Pointer to Global MAC structure
  * @return The corresponding HT enumeration
  */
-
-tSirMacHTSecondaryChannelOffset    limGetHTCBState(tAniCBSecondaryMode aniCBMode) 
+ePhyChanBondState  limGetHTCBState(ePhyChanBondState aniCBMode) 
 {
-    if(aniCBMode == eANI_CB_SECONDARY_DOWN)
-        return eHT_SECONDARY_CHANNEL_OFFSET_DOWN;
-    else if(aniCBMode == eANI_CB_SECONDARY_UP)
-        return eHT_SECONDARY_CHANNEL_OFFSET_UP;
-    else
-        return eHT_SECONDARY_CHANNEL_OFFSET_NONE;
+    switch ( aniCBMode )
+    {
+#ifdef WLAN_FEATURE_11AC
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW:
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED:
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH:
+#endif
+        case PHY_DOUBLE_CHANNEL_HIGH_PRIMARY:
+        return PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
+#ifdef WLAN_FEATURE_11AC
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW:
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED:
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH:
+#endif
+        case PHY_DOUBLE_CHANNEL_LOW_PRIMARY:
+        return PHY_DOUBLE_CHANNEL_LOW_PRIMARY;
+#ifdef WLAN_FEATURE_11AC
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED:
+           return PHY_SINGLE_CHANNEL_CENTERED;
+#endif
+        default :
+           return PHY_SINGLE_CHANNEL_CENTERED;
+     }
 }
 
-
-/**
- * limGetAniCBState
- *
- *FUNCTION:
- * This routing provides the translation of HT Enum to Airgo enum for determining 
- * secondary channel offset.
- * Airgo Enum is required for backward compatibility purposes.
- *
- *
- *NOTE:
- *
- * @param  pMac - Pointer to Global MAC structure
- * @return The corresponding ANI enumeration
- */
-
-tAniCBSecondaryMode     limGetAniCBState( tSirMacHTSecondaryChannelOffset htCBMode) 
-{
-    if(eHT_SECONDARY_CHANNEL_OFFSET_DOWN == htCBMode)
-        return eANI_CB_SECONDARY_DOWN;
-    else if(eHT_SECONDARY_CHANNEL_OFFSET_UP == htCBMode)
-        return eANI_CB_SECONDARY_UP;
-    else
-        return eANI_CB_SECONDARY_NONE;
-}
-
-
-/**
+ /*
  * limGetStaPeerType
  *
  *FUNCTION:
@@ -1347,7 +1171,6 @@
     tpPESession   psessionEntry)
 {
 tStaRateMode staPeerType = eSTA_11b;
-
   // Determine the peer-STA type
   if( pStaDs->aniPeer )
   {
@@ -1358,118 +1181,16 @@
     else
         staPeerType = eSTA_POLARIS;
   }
+#ifdef WLAN_FEATURE_11AC
+  else if(pStaDs->mlmStaContext.vhtCapability)
+      staPeerType = eSTA_11ac;
+#endif
   else if(pStaDs->mlmStaContext.htCapability)
         staPeerType = eSTA_11n;
   else if(pStaDs->erpEnabled)
         staPeerType = eSTA_11bg;
   else if(psessionEntry->limRFBand == SIR_BAND_5_GHZ)
         staPeerType = eSTA_11a;
-
   return staPeerType;
 }
 
-/**
- * setupCBState()
- *
- *FUNCTION:
- * This function is called during eWNI_SME_START_BSS_REQ.
- * Based on the configured Channel Bonding mode, the
- * appropriate Channel Bonding state is setup in the global
- * LIM object - gCbState. This will then be subsequently used
- * in the proprietary IE field
- *
- *LOGIC:
- *
- *ASSUMPTIONS:
- *
- *NOTE:
- *
- * @param  pMac   Pointer to Global MAC structure
- * @param  cbMode The CB mode as set by SME (WSM)
- * @return None
- */
-void setupCBState( tpAniSirGlobal pMac,
-    tAniCBSecondaryMode cbMode )
-{
-
-  switch( cbMode )
-  {
-    case eANI_CB_SECONDARY_DOWN:
-      SET_CB_OPER_STATE( pMac->lim.gCbState, eHAL_SET );
-      SET_CB_SEC_CHANNEL( pMac->lim.gCbState, eHAL_CLEAR );
-      if (cfgSetInt(pMac, WNI_CFG_CB_SECONDARY_CHANNEL_STATE, WNI_CFG_CB_SECONDARY_CHANNEL_STATE_LOWER) != eSIR_SUCCESS)
-          limLog(pMac, LOGP, FL("cfgSetInt WNI_CFG_CB_SECONDARY_CHANNEL_STATE failed \n"));
-      // AU state is set via CFG
-      break;
-
-    case eANI_CB_SECONDARY_UP:
-      SET_CB_OPER_STATE( pMac->lim.gCbState, eHAL_SET );
-      SET_CB_SEC_CHANNEL( pMac->lim.gCbState, eHAL_SET );
-      if (cfgSetInt(pMac, WNI_CFG_CB_SECONDARY_CHANNEL_STATE, WNI_CFG_CB_SECONDARY_CHANNEL_STATE_HIGHER) != eSIR_SUCCESS)
-          limLog(pMac, LOGP, FL("cfgSetInt WNI_CFG_CB_SECONDARY_CHANNEL_STATE failed \n"));
-      // AU state is set via CFG
-      break;
-
-    case eANI_CB_SECONDARY_NONE:
-      if (cfgSetInt(pMac, WNI_CFG_CB_SECONDARY_CHANNEL_STATE, WNI_CFG_CB_SECONDARY_CHANNEL_STATE_NONE) != eSIR_SUCCESS)
-          limLog(pMac, LOGP, FL("cfgSetInt WNI_CFG_CB_SECONDARY_CHANNEL_STATE failed \n"));
-
-    default:
-      SET_CB_OPER_STATE( pMac->lim.gCbState, eHAL_CLEAR );
-      break;
-  }
-
-
-
-  limLog( pMac, LOG2,
-      FL("New CB State: 0x%1x for Mode %d\n"),
-      pMac->lim.gCbState,
-      cbMode );
-}
-
-/**
- * limGetCurrentCBSecChannel()
- *
- *FUNCTION:
- * This function is called to determine the current
- * "secondary" channel when Channel Bonding is enabled
- *
- *PARAMS:
- *
- *LOGIC:
- *
- *ASSUMPTIONS:
- * NA
- *
- *NOTE:
- * NA
- *
- * @param  pMac      Pointer to Global MAC structure
- * @return Channel number
- */
-tANI_U8 limGetCurrentCBSecChannel( tpAniSirGlobal pMac,tpPESession psessionEntry)
-{
-tANI_U8 chanNum;
-
-  //
-  // FIXME - This is a HACK!!
-  // Need to have a clean way of determining the current
-  // CB secondary channel!!
-  //
-  chanNum = psessionEntry->currentOperChannel;
-  if( GET_CB_OPER_STATE( pMac->lim.gCbState ))
-  {
-    if( GET_CB_SEC_CHANNEL( pMac->lim.gCbState ))
-      chanNum += 4;
-    else
-      chanNum -= 4;
-  }
-
-  limLog( pMac, LOG4,
-      FL("Returning CB Sec Channel %1d\n"),
-      chanNum );
-
-  return chanNum;
-}
-
-
diff --git a/CORE/MAC/src/pe/lim/limPropExtsUtils.h b/CORE/MAC/src/pe/lim/limPropExtsUtils.h
index 17f2da2..4294424 100644
--- a/CORE/MAC/src/pe/lim/limPropExtsUtils.h
+++ b/CORE/MAC/src/pe/lim/limPropExtsUtils.h
@@ -63,11 +63,11 @@
 // Determine if a newly discovered BSS is TITAN-compatible
 void handleNonTitanBss( tpAniSirGlobal, tSirNeighborBssWdsInfo );
 #endif
-ePhyChanBondState limGetPhyCBState( tpAniSirGlobal );
 tStaRateMode limGetStaPeerType( tpAniSirGlobal, tpDphHashNode ,tpPESession);
-void setupCBState( tpAniSirGlobal, tAniCBSecondaryMode );
+#ifdef WLAN_FEATURE_11AC
+ePhyChanBondState  limGetHTCBState(ePhyChanBondState aniCBMode) ;
+#endif
 
-tANI_U8 limGetCurrentCBSecChannel( tpAniSirGlobal,tpPESession );
 
 #endif /* __LIM_PROP_EXTS_UTILS_H */
 
diff --git a/CORE/MAC/src/pe/lim/limScanResultUtils.c b/CORE/MAC/src/pe/lim/limScanResultUtils.c
index a866152..ee76b57 100644
--- a/CORE/MAC/src/pe/lim/limScanResultUtils.c
+++ b/CORE/MAC/src/pe/lim/limScanResultUtils.c
@@ -75,7 +75,7 @@
             */
         
         limDeactivateAndChangeTimer(pMac,eLIM_MIN_CHANNEL_TIMER);
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_MAX_CHANNEL_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_MAX_CHANNEL_TIMER));
         if (tx_timer_activate(&pMac->lim.limTimers.gLimMaxChannelTimer)
                                           == TX_TIMER_ERROR)
         {
@@ -196,33 +196,6 @@
    }
 
     pBssDescr->channelIdSelf = rxChannel;
-    pBssDescr->titanHtCaps = 0;
-
-    //FIXME_CBMODE : need to seperate out TITAN and HT CB mode.
-    //HT neighbor with channel bonding
-    if( pBPR->HTCaps.present  )
-    {
-        tAniTitanHtCapabilityInfo titanHtCaps = 0;
-        limGetHtCbAdminState(pMac, pBPR->HTCaps, &titanHtCaps);
-        if( pBPR->HTInfo.present &&
-          pBPR->HTInfo.secondaryChannelOffset )
-        {
-
-            limGetHtCbOpState( pMac,
-                pBPR->HTInfo,
-                &titanHtCaps );
-        }
-        pBssDescr->titanHtCaps = (tANI_U32) titanHtCaps;
-    }
-
-    // Is this is a TITAN neighbor?
-    else if( pBPR->propIEinfo.aniIndicator &&
-        pBPR->propIEinfo.titanPresent )
-    {
-    tAniTitanHtCapabilityInfo titanHtCaps = 0;
-      pBssDescr->titanHtCaps = (tANI_U32) titanHtCaps;
-    }
-
     //set the network type in bss description
     channelNum = pBssDescr->channelId;
     pBssDescr->nwType = limGetNwType(pMac, channelNum, SIR_MAC_MGMT_FRAME, pBPR);
@@ -665,18 +638,20 @@
 
     for (pprev = ptemp; ptemp; pprev = ptemp, ptemp = ptemp->next)
     {
-        //For infrastructure, only check BSSID. For IBSS, check more
+        //For infrastructure, check BSSID and SSID. For IBSS, check more
         pSirCapTemp = (tSirMacCapabilityInfo *)&ptemp->bssDescription.capabilityInfo;
         if((pSirCapTemp->ess == pSirCap->ess) && //matching ESS type first
             (palEqualMemory( pMac->hHdd,(tANI_U8 *) pBssDescr->bssDescription.bssId,
                       (tANI_U8 *) ptemp->bssDescription.bssId,
                       sizeof(tSirMacAddr))) &&   //matching BSSID
-            ((pSirCapTemp->ess) ||    //we are done for infrastructure
-            //For IBSS, matching SSID, nwType and channelId
-            ((palEqualMemory( pMac->hHdd,((tANI_U8 *) &pBssDescr->bssDescription.ieFields + 1),
+            (pBssDescr->bssDescription.channelId ==
+                                      ptemp->bssDescription.channelId) &&
+            palEqualMemory( pMac->hHdd,((tANI_U8 *) &pBssDescr->bssDescription.ieFields + 1),
                            ((tANI_U8 *) &ptemp->bssDescription.ieFields + 1),
                            (tANI_U8) (ssidLen + 1)) &&
-            (pBssDescr->bssDescription.nwType ==
+            ((pSirCapTemp->ess) || //we are done for infrastructure
+            //For IBSS, nwType and channelId
+            (((pBssDescr->bssDescription.nwType ==
                                          ptemp->bssDescription.nwType) &&
             (pBssDescr->bssDescription.channelId ==
                                       ptemp->bssDescription.channelId))))
diff --git a/CORE/MAC/src/pe/lim/limSecurityUtils.c b/CORE/MAC/src/pe/lim/limSecurityUtils.c
index d1c774f..d7385ed 100644
--- a/CORE/MAC/src/pe/lim/limSecurityUtils.c
+++ b/CORE/MAC/src/pe/lim/limSecurityUtils.c
@@ -375,7 +375,7 @@
 limReleasePreAuthNode(tpAniSirGlobal pMac, tpLimPreAuthNode pAuthNode)
 {
     pAuthNode->fFree = 1;
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_PRE_AUTH_CLEANUP_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, NO_SESSION, eLIM_PRE_AUTH_CLEANUP_TIMER));
     tx_timer_deactivate(&pAuthNode->timer);                
     pMac->lim.gLimNumPreAuthContexts--;
 } /*** end limReleasePreAuthNode() ***/
@@ -642,7 +642,7 @@
 
     sessionEntry->limMlmState = sessionEntry->limPrevMlmState;
     
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, sessionEntry->peSessionId, sessionEntry->limMlmState));
 
 
     // 'Change' timer for future activations
@@ -1000,6 +1000,7 @@
  * A utility API to send MLM_REMOVEKEY_CNF to SME
  */
 void limPostSmeRemoveKeyCnf( tpAniSirGlobal pMac,
+    tpPESession psessionEntry,
     tLimMlmRemoveKeyReq *pMlmRemoveKeyReq,
     tLimMlmRemoveKeyCnf *mlmRemoveKeyCnf)
 {
@@ -1012,8 +1013,8 @@
   palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmRemoveKeyReq );
   pMac->lim.gpLimMlmRemoveKeyReq = NULL;
 
-  pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState; //Restore the state.
-  MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+  psessionEntry->limMlmState = psessionEntry->limPrevMlmState; //Restore the state.
+  MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
   limPostSmeMessage( pMac,
       LIM_MLM_REMOVEKEY_CNF,
@@ -1081,7 +1082,7 @@
   // Update the WDA_SET_BSSKEY_REQ parameters
   pSetBssKeyParams->bssIdx = psessionEntry->bssIdx;
   pSetBssKeyParams->encType = pMlmSetKeysReq->edType;
-  pSetBssKeyParams->numKeys = pMlmSetKeysReq->numKeys;
+
 
   if(eSIR_SUCCESS != wlan_cfgGetInt(pMac, WNI_CFG_SINGLE_TID_RC, &val))
   {
@@ -1093,10 +1094,27 @@
   /* Update PE session Id*/
   pSetBssKeyParams->sessionId = psessionEntry ->peSessionId;
 
-  palCopyMemory( pMac->hHdd,
+  if(pMlmSetKeysReq->key[0].keyId && 
+     ((pMlmSetKeysReq->edType == eSIR_ED_WEP40) || 
+      (pMlmSetKeysReq->edType == eSIR_ED_WEP104))
+    )
+  {
+    /* IF the key id is non-zero and encryption type is WEP, Send all the 4 
+     * keys to HAL with filling the key at right index in pSetBssKeyParams->key. */
+    pSetBssKeyParams->numKeys = SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
+    palCopyMemory( pMac->hHdd,
+      (tANI_U8 *) &pSetBssKeyParams->key[pMlmSetKeysReq->key[0].keyId],
+      (tANI_U8 *) &pMlmSetKeysReq->key[0], sizeof(pMlmSetKeysReq->key[0]));
+
+  }
+  else
+  {
+    pSetBssKeyParams->numKeys = pMlmSetKeysReq->numKeys;
+    palCopyMemory( pMac->hHdd,
       (tANI_U8 *) &pSetBssKeyParams->key,
       (tANI_U8 *) &pMlmSetKeysReq->key,
       sizeof( tSirKeys ) * pMlmSetKeysReq->numKeys );
+  }
 
   SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
   msgQ.type = WDA_SET_BSSKEY_REQ;
@@ -1111,7 +1129,7 @@
 
   limLog( pMac, LOGW,
       FL( "Sending WDA_SET_BSSKEY_REQ...\n" ));
-  MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+  MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
   if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
   {
     limLog( pMac, LOGE,
@@ -1208,7 +1226,7 @@
       sessionEntry->limMlmState = eLIM_MLM_WT_SET_STA_KEY_STATE;
       msgQ.type = WDA_SET_STAKEY_REQ;
   }
-  MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+  MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, sessionEntry->peSessionId, sessionEntry->limMlmState));
 
   /**
    * In the Case of WEP_DYNAMIC, ED_TKIP and ED_CCMP
@@ -1232,12 +1250,14 @@
 #endif
           pSetStaKeyParams->wepType = eSIR_WEP_STATIC;
           sessionEntry->limMlmState = eLIM_MLM_WT_SET_STA_KEY_STATE;
-          MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+          MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, sessionEntry->peSessionId, sessionEntry->limMlmState));
       }else {
-          pSetStaKeyParams->wepType = eSIR_WEP_DYNAMIC;
+          /*This case the keys are coming from upper layer so need to fill the 
+          * key at the default wep key index and send to the HAL */
           palCopyMemory( pMac->hHdd,
-                         (tANI_U8 *) &pSetStaKeyParams->key,
-                         (tANI_U8 *) &pMlmSetKeysReq->key[0], sizeof( tSirKeys ));
+                             (tANI_U8 *) &pSetStaKeyParams->key[defWEPIdx],
+                             (tANI_U8 *) &pMlmSetKeysReq->key[0], sizeof( pMlmSetKeysReq->key[0] ));
+          pMlmSetKeysReq->numKeys = SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
       }
       break;
   case eSIR_ED_TKIP:
@@ -1265,7 +1285,7 @@
   msgQ.bodyval = 0;
 
   limLog( pMac, LOG1, FL( "Sending WDA_SET_STAKEY_REQ...\n" ));
-  MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+  MTRACE(macTraceMsgTx(pMac, sessionEntry->peSessionId, msgQ.type));
   if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ ))) {
       limLog( pMac, LOGE, FL("Posting SET_STAKEY to HAL failed, reason=%X\n"), retCode );
       // Respond to SME with LIM_MLM_SETKEYS_CNF
@@ -1345,7 +1365,7 @@
 
   limLog( pMac, LOGW,
       FL( "Sending WDA_REMOVE_BSSKEY_REQ...\n" ));
-  MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+  MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
   if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
   {
@@ -1361,6 +1381,7 @@
 
 end:
   limPostSmeRemoveKeyCnf( pMac,
+      psessionEntry,
       pMlmRemoveKeyReq,
       &mlmRemoveKeysCnf );
 
@@ -1390,7 +1411,7 @@
 void limSendRemoveStaKeyReq( tpAniSirGlobal pMac,
     tLimMlmRemoveKeyReq *pMlmRemoveKeyReq,
     tANI_U16 staIdx ,
-    tpPESession sessionEntry)
+    tpPESession psessionEntry)
 {
 tSirMsgQ           msgQ;
 tpRemoveStaKeyParams  pRemoveStaKeyParams = NULL;
@@ -1430,7 +1451,7 @@
   pRemoveStaKeyParams->unicast = pMlmRemoveKeyReq->unicast;
 
   /* Update PE session ID*/
-  pRemoveStaKeyParams->sessionId = sessionEntry->peSessionId;
+  pRemoveStaKeyParams->sessionId = psessionEntry->peSessionId;
 
   SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
   
@@ -1446,7 +1467,7 @@
 
   limLog( pMac, LOGW,
       FL( "Sending WDA_REMOVE_STAKEY_REQ...\n" ));
-  MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+  MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
   if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
   {
     limLog( pMac, LOGE,
@@ -1461,6 +1482,7 @@
 
 end:
   limPostSmeRemoveKeyCnf( pMac,
+      psessionEntry,
       pMlmRemoveKeyReq,
       &mlmRemoveKeyCnf );
 
diff --git a/CORE/MAC/src/pe/lim/limSecurityUtils.h b/CORE/MAC/src/pe/lim/limSecurityUtils.h
index 2479f14..da1e908 100644
--- a/CORE/MAC/src/pe/lim/limSecurityUtils.h
+++ b/CORE/MAC/src/pe/lim/limSecurityUtils.h
@@ -68,7 +68,7 @@
 
 void limSendRemoveBssKeyReq(tpAniSirGlobal pMac, tLimMlmRemoveKeyReq * pMlmRemoveKeyReq,tpPESession);
 void limSendRemoveStaKeyReq(tpAniSirGlobal pMac, tLimMlmRemoveKeyReq * pMlmRemoveKeyReq, tANI_U16 staIdx,tpPESession);
-void limPostSmeRemoveKeyCnf(tpAniSirGlobal pMac, tLimMlmRemoveKeyReq * pMlmRemoveKeyReq, tLimMlmRemoveKeyCnf * mlmRemoveKeyCnf);
+void limPostSmeRemoveKeyCnf(tpAniSirGlobal pMac, tpPESession psessionEntry, tLimMlmRemoveKeyReq * pMlmRemoveKeyReq, tLimMlmRemoveKeyCnf * mlmRemoveKeyCnf);
 
 #define  PTAPS  0xedb88320
 
diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
index 131ff49..4c50af6 100644
--- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c
+++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
@@ -240,7 +240,16 @@
     {
         p2pIe = limGetP2pIEPtr(pMac, pAdditionalIE, nAdditionalIELen);
     }
-    if( p2pIe != NULL)
+    /* Don't include 11b rate only when device is doing P2P Search */
+    if( ( WNI_CFG_DOT11_MODE_11B != dot11mode ) && 
+        ( p2pIe != NULL ) && 
+    /* Don't include 11b rate if it is a P2P serach or probe request is sent by P2P Client */
+        ( ( ( pMac->lim.gpLimMlmScanReq != NULL ) &&
+              pMac->lim.gpLimMlmScanReq->p2pSearch ) || 
+          ( ( psessionEntry != NULL ) && 
+            ( VOS_P2P_CLIENT_MODE == psessionEntry->pePersona ) )
+         )
+      )
     {
         /* In the below API pass channel number > 14, do that it fills only
          * 11a rates in supported rates */
@@ -272,21 +281,38 @@
        PopulateDot11fWFATPC( pMac, &pr.WFATPC, txPower, 0 );
     }
 #endif
-    pMac->lim.htCapability = IS_DOT11_MODE_HT(dot11mode);
 
     if (psessionEntry != NULL ) {
-       psessionEntry->htCapabality = IS_DOT11_MODE_HT(dot11mode);
+       psessionEntry->htCapability = IS_DOT11_MODE_HT(dot11mode);
        //Include HT Capability IE
-       if (psessionEntry->htCapabality)
+       if (psessionEntry->htCapability)
        {
-           PopulateDot11fHTCaps( pMac, &pr.HTCaps );
+           PopulateDot11fHTCaps( pMac, psessionEntry, &pr.HTCaps );
        }
-    } else {
-           if (pMac->lim.htCapability)
+    } else { //psessionEntry == NULL
+           if (IS_DOT11_MODE_HT(dot11mode))
            {
-               PopulateDot11fHTCaps( pMac, &pr.HTCaps );
+               PopulateDot11fHTCaps( pMac, psessionEntry, &pr.HTCaps );
            }
     }
+#ifdef WLAN_FEATURE_11AC
+    if (psessionEntry != NULL ) {
+       psessionEntry->vhtCapability = IS_DOT11_MODE_VHT(dot11mode);
+       //Include HT Capability IE
+       if (psessionEntry->vhtCapability)
+       {
+          limLog( pMac, LOGW, FL("Populate VHT IEs in Probe Request\n"));
+          PopulateDot11fVHTCaps( pMac, &pr.VHTCaps );
+       }
+    }  else {
+       if (IS_DOT11_MODE_VHT(dot11mode))
+       {
+          limLog( pMac, LOGW, FL("Populate VHT IEs in Probe Request\n"));
+          PopulateDot11fVHTCaps( pMac, &pr.VHTCaps );
+       }
+    }
+#endif
+
 
     // That's it-- now we pack it.  First, how much space are we going to
     // need?
@@ -566,7 +592,7 @@
     PopulateDot11fEDCAParamSet( pMac, &frm.EDCAParamSet, psessionEntry);
 
 #ifdef ANI_PRODUCT_TYPE_AP
-    if( pMac->lim.gLim11hEnable )
+    if( pSessionEntry->lim11hEnable )
     {
         PopulateDot11fPowerConstraints( pMac, &frm.PowerConstraints );
         PopulateDot11fTPCReport( pMac, &frm.TPCReport, psessionEntry);
@@ -580,8 +606,8 @@
                pMac->lim.gLimChannelSwitch.state ==
                eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY ) )
         {
-            PopulateDot11fChanSwitchAnn( pMac, &frm.ChanSwitchAnn );
-            PopulateDot11fExtChanSwitchAnn(pMac, &frm.ExtChanSwitchAnn);
+            PopulateDot11fChanSwitchAnn( pMac, &frm.ChanSwitchAnn, psessionEntry );
+            PopulateDot11fExtChanSwitchAnn(pMac, &frm.ExtChanSwitchAnn, psessionEntry );
         }
     }
 #endif
@@ -596,15 +622,25 @@
                                 &frm.ExtSuppRates, psessionEntry );
 
     //Populate HT IEs, when operating in 11n or Taurus modes.
-    if ( psessionEntry->htCapabality )
+    if ( psessionEntry->htCapability )
     {
-        PopulateDot11fHTCaps( pMac, &frm.HTCaps );
+        PopulateDot11fHTCaps( pMac, psessionEntry, &frm.HTCaps );
 #ifdef WLAN_SOFTAP_FEATURE
         PopulateDot11fHTInfo( pMac, &frm.HTInfo, psessionEntry );
 #else
         PopulateDot11fHTInfo( pMac, &frm.HTInfo );
 #endif
     }
+#ifdef WLAN_FEATURE_11AC
+    if(psessionEntry->vhtCapability)
+    {
+        limLog( pMac, LOGW, FL("Populate VHT IE in Probe Response\n"));
+        PopulateDot11fVHTCaps( pMac, &frm.VHTCaps );
+        PopulateDot11fVHTOperation( pMac, &frm.VHTOperation );
+        // we do not support multi users yet
+        //PopulateDot11fVHTExtBssLoad( pMac, &frm.VHTExtBssLoad );
+    }
+#endif
 
     if ( psessionEntry->pLimStartBssReq ) 
     {
@@ -1252,10 +1288,10 @@
         } // End if on Airgo peer.
 
         if ( pSta->mlmStaContext.htCapability  && 
-             pMac->lim.htCapability )
+             psessionEntry->htCapability )
         {
-            PopulateDot11fHTCaps( pMac, &frm.HTCaps );
-            PopulateDot11fHTInfo( pMac, &frm.HTInfo );
+            PopulateDot11fHTCaps( pMac, psessionEntry, &frm.HTCaps );
+            PopulateDot11fHTInfo( pMac, &frm.HTInfo, psessionEntry);
         }
     } // End if on non-NULL 'pSta'.
 
@@ -1524,15 +1560,26 @@
         } // End if on Airgo peer.
 
         if ( pSta->mlmStaContext.htCapability  && 
-             psessionEntry->htCapabality )
+             psessionEntry->htCapability )
         {
-            PopulateDot11fHTCaps( pMac, &frm.HTCaps );
+            PopulateDot11fHTCaps( pMac, psessionEntry, &frm.HTCaps );
 #ifdef WLAN_SOFTAP_FEATURE
             PopulateDot11fHTInfo( pMac, &frm.HTInfo, psessionEntry );
 #else
             PopulateDot11fHTInfo( pMac, &frm.HTInfo );
 #endif
         }
+
+#ifdef WLAN_FEATURE_11AC
+        if( pSta->mlmStaContext.vhtCapability && 
+            psessionEntry->vhtCapability )
+        {
+            limLog( pMac, LOGW, FL("Populate VHT IEs in Assoc Response\n"));
+            PopulateDot11fVHTCaps( pMac, &frm.VHTCaps );
+            PopulateDot11fVHTOperation( pMac, &frm.VHTOperation);
+        }
+#endif
+
     } // End if on non-NULL 'pSta'.
 
 
@@ -2341,10 +2388,10 @@
 
     //Populate HT IEs, when operating in 11n or Taurus modes AND
     //when AP is also operating in 11n mode.
-    if ( psessionEntry->htCapabality &&
+    if ( psessionEntry->htCapability &&
             pMac->lim.htCapabilityPresentInBeacon)
     {
-        PopulateDot11fHTCaps( pMac, &frm.HTCaps );
+        PopulateDot11fHTCaps( pMac, psessionEntry, &frm.HTCaps );
 #ifdef DISABLE_GF_FOR_INTEROP
 
         /*
@@ -2362,6 +2409,15 @@
 #endif
 
     }
+#ifdef WLAN_FEATURE_11AC
+    if ( psessionEntry->vhtCapability &&
+        pMac->lim.vhtCapabilityPresentInBeacon)
+    {
+        limLog( pMac, LOGW, FL("Populate VHT IEs in Assoc Request\n"));
+        PopulateDot11fVHTCaps( pMac, &frm.VHTCaps );
+    }
+#endif
+
 
 #if defined WLAN_FEATURE_VOWIFI_11R
     if (psessionEntry->pLimJoinReq->is11Rconnection)
@@ -2417,7 +2473,7 @@
                     "sociation Request.\n"), nBytes );
 
         psessionEntry->limMlmState = psessionEntry->limPrevMlmState;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
 
 
         /* Update PE session id*/
@@ -2761,10 +2817,10 @@
 #endif    
     }
 
-    if ( psessionEntry->htCapabality &&
+    if ( psessionEntry->htCapability &&
             pMac->lim.htCapabilityPresentInBeacon)
     {
-        PopulateDot11fHTCaps( pMac, &frm.HTCaps );
+        PopulateDot11fHTCaps( pMac, psessionEntry, &frm.HTCaps );
     }
 
     nStatus = dot11fGetPackedReAssocRequestSize( pMac, &frm, &nPayload );
@@ -2803,7 +2859,7 @@
     if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
     {
         psessionEntry->limMlmState = psessionEntry->limPrevMlmState;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
         limLog( pMac, LOGP, FL("Failed to allocate %d bytes for a Re-As"
                     "sociation Request.\n"), nBytes );
         goto end;
@@ -3089,11 +3145,19 @@
         }
     }
 
-    if ( psessionEntry->htCapabality &&
+    if ( psessionEntry->htCapability &&
           pMac->lim.htCapabilityPresentInBeacon)
     {
-        PopulateDot11fHTCaps( pMac, &frm.HTCaps );
+        PopulateDot11fHTCaps( pMac, psessionEntry, &frm.HTCaps );
     }
+#ifdef WLAN_FEATURE_11AC
+    if ( psessionEntry->vhtCapability &&
+             pMac->lim.vhtCapabilityPresentInBeacon)
+    {
+        limLog( pMac, LOGW, FL("Populate VHT IEs in Re-Assoc Request\n"));
+        PopulateDot11fVHTCaps( pMac, &frm.VHTCaps );
+    }
+#endif
 
     nStatus = dot11fGetPackedReAssocRequestSize( pMac, &frm, &nPayload );
     if ( DOT11F_FAILED( nStatus ) )
@@ -3119,7 +3183,7 @@
     if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
     {
         psessionEntry->limMlmState = psessionEntry->limPrevMlmState;
-        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+        MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
         limLog( pMac, LOGP, FL("Failed to allocate %d bytes for a Re-As"
                                "sociation Request.\n"), nBytes );
         goto end;
@@ -3479,6 +3543,10 @@
        || ( psessionEntry->pePersona == VOS_P2P_CLIENT_MODE ) ||
          ( psessionEntry->pePersona == VOS_P2P_GO_MODE)
 #endif
+#if  defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
+       || ((NULL != pMac->ft.ftPEContext.pFTPreAuthReq) 
+           && ( SIR_BAND_5_GHZ == limGetRFBand(pMac->ft.ftPEContext.pFTPreAuthReq->preAuthchannelNum)))
+#endif
          )
     {
         txFlag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME;
@@ -4168,7 +4236,7 @@
 #endif  //ANI_SUPPORT_11H
 
 
-#ifdef ANI_PRODUCT_TYPE_AP
+#if 1//def ANI_PRODUCT_TYPE_AP
 /**
  * \brief Send a Channel Switch Announcement
  *
@@ -4191,17 +4259,19 @@
 tSirRetStatus
 limSendChannelSwitchMgmtFrame(tpAniSirGlobal pMac,
                               tSirMacAddr    peer,
-                              tANI_U8             nMode,
-                              tANI_U8             nNewChannel,
-                              tANI_U8             nCount)
+                              tANI_U8        nMode,
+                              tANI_U8        nNewChannel,
+                              tANI_U8        nCount,
+                              tpPESession    psessionEntry )
 {
     tDot11fChannelSwitch frm;
     tANI_U8                  *pFrame;
     tSirRetStatus        nSirStatus;
     tpSirMacMgmtHdr      pMacHdr;
-    tANI_U32                  nBytes, nPayload, nStatus, nCfg;
+    tANI_U32                  nBytes, nPayload, nStatus;//, nCfg;
     void               *pPacket;
     eHalStatus          halstatus;
+    tANI_U8 txFlag = 0;
     
     palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
 
@@ -4243,7 +4313,12 @@
 
     // Next, we fill out the buffer descriptor:
     nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
-                                SIR_MAC_MGMT_ACTION, peer);
+                                SIR_MAC_MGMT_ACTION, peer, psessionEntry->selfMacAddr);
+    pMacHdr = ( tpSirMacMgmtHdr ) pFrame;
+    palCopyMemory( pMac->hHdd,
+                   (tANI_U8 *) pMacHdr->bssId,
+                   (tANI_U8 *) psessionEntry->bssId,
+                   sizeof( tSirMacAddr ));
     if ( eSIR_SUCCESS != nSirStatus )
     {
         limLog( pMac, LOGE, FL("Failed to populate the buffer descrip"
@@ -4253,6 +4328,7 @@
         return eSIR_FAILURE;    // just allocated...
     }
 
+#if 0
     pMacHdr = ( tpSirMacMgmtHdr ) pFrame;
 
     nCfg = 6;
@@ -4265,7 +4341,7 @@
         palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT, ( void* ) pFrame, ( void* ) pPacket );
         return eSIR_FAILURE;    // just allocated...
     }
-
+#endif
     nStatus = dot11fPackChannelSwitch( pMac, &frm, pFrame +
                                        sizeof(tSirMacMgmtHdr),
                                        nPayload, &nPayload );
@@ -4282,11 +4358,20 @@
                                "hannel Switch (0x%08x).\n") );
     }
 
+    if( ( SIR_BAND_5_GHZ == limGetRFBand(psessionEntry->currentOperChannel))
+#ifdef WLAN_FEATURE_P2P
+       || ( psessionEntry->pePersona == VOS_P2P_CLIENT_MODE ) ||
+         ( psessionEntry->pePersona == VOS_P2P_GO_MODE)
+#endif
+         )
+    {
+        txFlag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME;
+    }
     halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
                             HAL_TXRX_FRM_802_11_MGMT,
                             ANI_TXDIR_TODS,
                             7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
-                            limTxComplete, pFrame, 0 );
+                            limTxComplete, pFrame, txFlag );
     if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
     {
         limLog( pMac, LOGE, FL("Failed to send a Channel Switch "
diff --git a/CORE/MAC/src/pe/lim/limSendMessages.c b/CORE/MAC/src/pe/lim/limSendMessages.c
index 3b95f1d..7dff6e0 100644
--- a/CORE/MAC/src/pe/lim/limSendMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendMessages.c
@@ -31,14 +31,12 @@
  * --------------------------------------------------------------------------
  *
  */
-
 #include "limSendMessages.h"
 #include "cfgApi.h"
 #include "limTrace.h"
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
 #include "vos_diag_core_log.h"
 #endif //FEATURE_WLAN_DIAG_SUPPORT 
-
 /* When beacon filtering is enabled, firmware will
  * analyze the selected beacons received during BMPS,
  * and monitor any changes in the IEs as listed below.
@@ -65,7 +63,6 @@
 #endif
 };
 
-
 /**
  * limSendCFParams()
  *
@@ -87,41 +84,33 @@
  *
  * @return success if message send is ok, else false.
  */
-
 tSirRetStatus limSendCFParams(tpAniSirGlobal pMac, tANI_U8 bssIdx, tANI_U8 cfpCount, tANI_U8 cfpPeriod)
 {
     tpUpdateCFParams pCFParams = NULL;
     tSirRetStatus   retCode = eSIR_SUCCESS;
     tSirMsgQ msgQ;
 
-
     if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
           (void **) &pCFParams,
           sizeof( tUpdateCFParams )))
       {
         limLog( pMac, LOGP,
             FL( "Unable to PAL allocate memory during Update CF Params\n" ));
-
         retCode = eSIR_MEM_ALLOC_FAILED;
         goto returnFailure;
       }
-
     palZeroMemory( pMac->hHdd, (tANI_U8 *) pCFParams, sizeof(tUpdateCFParams));
-
     pCFParams->cfpCount = cfpCount;
     pCFParams->cfpPeriod = cfpPeriod;
     pCFParams->bssIdx     = bssIdx;
 
-
     msgQ.type = WDA_UPDATE_CF_IND;
     msgQ.reserved = 0;
     msgQ.bodyptr = pCFParams;
     msgQ.bodyval = 0;
-
     limLog( pMac, LOG3,
                 FL( "Sending WDA_UPDATE_CF_IND..." ));
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
-
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
     if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
     {
         palFreeMemory(pMac->hHdd, pCFParams);
@@ -129,13 +118,10 @@
                     FL("Posting  WDA_UPDATE_CF_IND to WDA failed, reason=%X\n"),
                     retCode );
     }
-
 returnFailure:
     return retCode;
 }
 
-
-
 /**
  * limSendBeaconParams()
  *
@@ -157,7 +143,6 @@
  *
  * @return success if message send is ok, else false.
  */
-
 tSirRetStatus limSendBeaconParams(tpAniSirGlobal pMac, 
                                   tpUpdateBeaconParams pUpdatedBcnParams,
                                   tpPESession  psessionEntry )
@@ -166,27 +151,22 @@
     tSirRetStatus   retCode = eSIR_SUCCESS;
     tSirMsgQ msgQ;
 
-
     if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
           (void **) &pBcnParams, sizeof(*pBcnParams)))
     {
         limLog( pMac, LOGP,
             FL( "Unable to PAL allocate memory during Update Beacon Params\n" ));
-
         return eSIR_MEM_ALLOC_FAILED;
     }
-
     palCopyMemory( pMac->hHdd, (tANI_U8 *) pBcnParams,  pUpdatedBcnParams, sizeof(*pBcnParams));
-
     msgQ.type = WDA_UPDATE_BEACON_IND;
     msgQ.reserved = 0;
     msgQ.bodyptr = pBcnParams;
     msgQ.bodyval = 0;
-
     PELOG3(limLog( pMac, LOG3,
                 FL( "Sending WDA_UPDATE_BEACON_IND, paramChangeBitmap in hex = %x" ),
                     pUpdatedBcnParams->paramChangeBitmap);)
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
     if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
     {
         palFreeMemory(pMac->hHdd, pBcnParams);
@@ -197,11 +177,9 @@
 #ifdef WLAN_SOFTAP_FEATURE
     limSendBeaconInd(pMac, psessionEntry);
 #endif
-
     return retCode;
 }
 
-
 /**
  * limSendSwitchChnlParams()
  *
@@ -223,46 +201,38 @@
  *
  * @return success if message send is ok, else false.
  */
-
 #if !defined WLAN_FEATURE_VOWIFI  
 tSirRetStatus limSendSwitchChnlParams(tpAniSirGlobal pMac,
                                       tANI_U8 chnlNumber,
-                                      tSirMacHTSecondaryChannelOffset secondaryChnlOffset,
+                                      ePhyChanBondState secondaryChnlOffset,
                                       tANI_U8 localPwrConstraint, tANI_U8 peSessionId)
 #else
 tSirRetStatus limSendSwitchChnlParams(tpAniSirGlobal pMac,
                                       tANI_U8 chnlNumber,
-                                      tSirMacHTSecondaryChannelOffset secondaryChnlOffset,
+                                      ePhyChanBondState secondaryChnlOffset,
                                       tPowerdBm maxTxPower, tANI_U8 peSessionId)
-
 #endif
 {
     tpSwitchChannelParams pChnlParams = NULL;
     tSirRetStatus   retCode = eSIR_SUCCESS;
     tSirMsgQ msgQ;
     tpPESession pSessionEntry;
-
     if((pSessionEntry = peFindSessionBySessionId(pMac , peSessionId)) == NULL)
     {
        limLog( pMac, LOGP,
              FL( "Unable to get Session for session Id %d\n" ), peSessionId);
        return eSIR_FAILURE;
-
     }
-
     if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
           (void **) &pChnlParams,
           sizeof( tSwitchChannelParams )))
       {
           limLog( pMac, LOGP,
             FL( "Unable to PAL allocate memory during Switch Channel Params\n" ));
-
         retCode = eSIR_MEM_ALLOC_FAILED;
         goto returnFailure;
       }
-
     palZeroMemory( pMac->hHdd, (tANI_U8 *) pChnlParams, sizeof(tSwitchChannelParams));
-
     pChnlParams->secondaryChannelOffset = secondaryChnlOffset;
     pChnlParams->channelNumber= chnlNumber;
 #if defined WLAN_FEATURE_VOWIFI  
@@ -271,19 +241,16 @@
 #else
     pChnlParams->localPowerConstraint = localPwrConstraint;
 #endif
-
     palCopyMemory( pMac->hHdd, pChnlParams->bssId, pSessionEntry->bssId, sizeof(tSirMacAddr) );
     pChnlParams->peSessionId = peSessionId;
     
     //we need to defer the message until we get the response back from WDA.
     SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
-
     msgQ.type = WDA_CHNL_SWITCH_REQ;
     msgQ.reserved = 0;
     msgQ.bodyptr = pChnlParams;
     msgQ.bodyval = 0;
-
-#if !defined WLAN_FEATURE_VOWIFI  
+#if defined WLAN_FEATURE_VOWIFI  
     PELOG3(limLog( pMac, LOG3,
         FL( "Sending WDA_CHNL_SWITCH_REQ with SecondaryChnOffset - %d, ChannelNumber - %d, maxTxPower - %d"),
         pChnlParams->secondaryChannelOffset, pChnlParams->channelNumber, pChnlParams->maxTxPower);)
@@ -292,7 +259,7 @@
         FL( "Sending WDA_CHNL_SWITCH_REQ with SecondaryChnOffset - %d, ChannelNumber - %d, LocalPowerConstraint - %d"),
         pChnlParams->secondaryChannelOffset, pChnlParams->channelNumber, pChnlParams->localPowerConstraint);)
 #endif
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, peSessionId, msgQ.type));
     if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
     {
         palFreeMemory(pMac->hHdd, pChnlParams);
@@ -300,12 +267,10 @@
                     FL("Posting  WDA_CHNL_SWITCH_REQ to WDA failed, reason=%X\n"),
                     retCode );
     }
-
 returnFailure:
     return retCode;
 }
 
-
 /**
  * limSendEdcaParams()
  *
@@ -327,36 +292,30 @@
  *
  * @return success if message send is ok, else false.
  */
-
 tSirRetStatus limSendEdcaParams(tpAniSirGlobal pMac, tSirMacEdcaParamRecord *pUpdatedEdcaParams, tANI_U16 bssIdx, tANI_BOOLEAN highPerformance)
 {
     tEdcaParams *pEdcaParams = NULL;
     tSirRetStatus   retCode = eSIR_SUCCESS;
     tSirMsgQ msgQ;
-
     if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
           (void **) &pEdcaParams,
           sizeof(tEdcaParams)))
     {
         limLog( pMac, LOGP,
             FL( "Unable to PAL allocate memory during Update EDCA Params\n" ));
-
         retCode = eSIR_MEM_ALLOC_FAILED;
         return retCode;
     }
-
     pEdcaParams->bssIdx = bssIdx;
     pEdcaParams->acbe = pUpdatedEdcaParams[EDCA_AC_BE];
     pEdcaParams->acbk = pUpdatedEdcaParams[EDCA_AC_BK];
     pEdcaParams->acvi = pUpdatedEdcaParams[EDCA_AC_VI];
     pEdcaParams->acvo = pUpdatedEdcaParams[EDCA_AC_VO];
     pEdcaParams->highPerformance = highPerformance;
-
     msgQ.type = WDA_UPDATE_EDCA_PROFILE_IND;
     msgQ.reserved = 0;
     msgQ.bodyptr = pEdcaParams;
     msgQ.bodyval = 0;
-
     {
         tANI_U8 i;
         PELOG1(limLog( pMac, LOG1,FL("Sending WDA_UPDATE_EDCA_PROFILE_IND with EDCA Parameters:" ));)
@@ -367,7 +326,7 @@
                    pUpdatedEdcaParams[i].cw.min, pUpdatedEdcaParams[i].cw.max, pUpdatedEdcaParams[i].txoplimit);)
         }
     }
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
     if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
     {
         palFreeMemory(pMac->hHdd, pEdcaParams);
@@ -375,11 +334,9 @@
                     FL("Posting  WDA_UPDATE_EDCA_PROFILE_IND to WDA failed, reason=%X\n"),
                     retCode );
     }
-
     return retCode;
 }
 
-
 /**
  * limSetActiveEdcaParams()
  *
@@ -404,13 +361,11 @@
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
     vos_log_qos_edca_pkt_type *log_ptr = NULL;
 #endif //FEATURE_WLAN_DIAG_SUPPORT 
-
     // Initialize gLimEdcaParamsActive[] to be same as localEdcaParams
     psessionEntry->gLimEdcaParamsActive[EDCA_AC_BE] = plocalEdcaParams[EDCA_AC_BE];
     psessionEntry->gLimEdcaParamsActive[EDCA_AC_BK] = plocalEdcaParams[EDCA_AC_BK];
     psessionEntry->gLimEdcaParamsActive[EDCA_AC_VI] = plocalEdcaParams[EDCA_AC_VI];
     psessionEntry->gLimEdcaParamsActive[EDCA_AC_VO] = plocalEdcaParams[EDCA_AC_VO];
-
     /* An AC requires downgrade if the ACM bit is set, and the AC has not
      * yet been admitted in uplink or bi-directions.
      * If an AC requires downgrade, it will downgrade to the next beset AC
@@ -430,7 +385,6 @@
     {
         acAdmitted = ( (pMac->lim.gAcAdmitMask[SIR_MAC_DIRECTION_UPLINK] & (1 << ac)) >> ac );
         limLog(pMac, LOG1, FL("For AC[%d]: acm=%d,  acAdmit=%d \n"), ac, plocalEdcaParams[ac].aci.acm, acAdmitted);
-
         if ( (plocalEdcaParams[ac].aci.acm == 1) && (acAdmitted == 0) )
         {
             limLog(pMac, LOG1, FL("We need to downgrade AC %d!! "), ac);
@@ -475,7 +429,6 @@
     return;
  }
 
-
 /** ---------------------------------------------------------
 \fn      limSetLinkState
 \brief   LIM sends a message to WDA to set the link state
@@ -489,20 +442,16 @@
 {
     tSirMsgQ msg;
     tSirRetStatus retCode;
-
     msg.type = WDA_SET_LINK_STATE;
     msg.bodyval = (tANI_U32) state;
     msg.bodyptr = NULL;
-
     MTRACE(macTraceMsgTx(pMac, 0, msg.type));
     retCode = wdaPostCtrlMsg(pMac, &msg);
     if (retCode != eSIR_SUCCESS)
         limLog(pMac, LOGP, FL("Posting link state %d failed, reason = %x \n"), retCode);
-
     return retCode;
 }
 #endif //0
-
 tSirRetStatus limSetLinkState(tpAniSirGlobal pMac, tSirLinkState state,tSirMacAddr bssId, 
                               tSirMacAddr selfMacAddr, tpSetLinkStateCallback callback, 
                               void *callbackArg) 
@@ -510,7 +459,6 @@
     tSirMsgQ msgQ;
     tSirRetStatus retCode;
     tpLinkStateParams pLinkStateParams = NULL;
-
     // Allocate memory.
     if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
           (void **) &pLinkStateParams,
@@ -518,29 +466,24 @@
     {
         limLog( pMac, LOGP,
         FL( "Unable to PAL allocate memory while sending Set Link State\n" ));
-
         retCode = eSIR_SME_RESOURCES_UNAVAILABLE;
         return retCode;
     }
-
     palZeroMemory( pMac->hHdd, (tANI_U8 *) pLinkStateParams, sizeof(tLinkStateParams));
-
     pLinkStateParams->state        = state;
     pLinkStateParams->callback     = callback;
     pLinkStateParams->callbackArg  = callbackArg;
      
-
     /* Copy Mac address */
     sirCopyMacAddr(pLinkStateParams->bssid,bssId);
     sirCopyMacAddr(pLinkStateParams->selfMacAddr, selfMacAddr);
 
-
     msgQ.type = WDA_SET_LINK_STATE;
     msgQ.reserved = 0;
     msgQ.bodyptr = pLinkStateParams;
     msgQ.bodyval = 0;
     
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
 
     retCode = (tANI_U32)wdaPostCtrlMsg(pMac, &msgQ);
     if (retCode != eSIR_SUCCESS)
@@ -548,10 +491,8 @@
         palFreeMemory(pMac, (void*)pLinkStateParams);
         limLog(pMac, LOGP, FL("Posting link state %d failed, reason = %x \n"), retCode);
     }
-
     return retCode;
 }
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
 extern tSirRetStatus limSetLinkStateFT(tpAniSirGlobal pMac, tSirLinkState 
 state,tSirMacAddr bssId, tSirMacAddr selfMacAddr, int ft, tpPESession psessionEntry)
@@ -559,7 +500,6 @@
     tSirMsgQ msgQ;
     tSirRetStatus retCode;
     tpLinkStateParams pLinkStateParams = NULL;
-
     // Allocate memory.
     if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
           (void **) &pLinkStateParams,
@@ -567,28 +507,23 @@
     {
         limLog( pMac, LOGP,
         FL( "Unable to PAL allocate memory while sending Set Link State\n" ));
-
         retCode = eSIR_SME_RESOURCES_UNAVAILABLE;
         return retCode;
     }
-
     palZeroMemory( pMac->hHdd, (tANI_U8 *) pLinkStateParams, sizeof(tLinkStateParams));
-
     pLinkStateParams->state = state;
-
     /* Copy Mac address */
     sirCopyMacAddr(pLinkStateParams->bssid,bssId);
     sirCopyMacAddr(pLinkStateParams->selfMacAddr, selfMacAddr);
     pLinkStateParams->ft = 1;
     pLinkStateParams->session = psessionEntry;
 
-
     msgQ.type = WDA_SET_LINK_STATE;
     msgQ.reserved = 0;
     msgQ.bodyptr = pLinkStateParams;
     msgQ.bodyval = 0;
     
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 
     retCode = (tANI_U32)wdaPostCtrlMsg(pMac, &msgQ);
     if (retCode != eSIR_SUCCESS)
@@ -596,13 +531,10 @@
         palFreeMemory(pMac, (void*)pLinkStateParams);
         limLog(pMac, LOGP, FL("Posting link state %d failed, reason = %x \n"), retCode);
     }
-
     return retCode;
 }
 #endif
 
-
-
 /** ---------------------------------------------------------
 \fn      limSendSetTxPowerReq
 \brief   LIM sends a WDA_SET_TX_POWER_REQ message to WDA 
@@ -614,18 +546,14 @@
 {
     tSirRetStatus  retCode = eSIR_SUCCESS;
     tSirMsgQ       msgQ;
-
     if (NULL == pTxPowerReq)
         return retCode;
-
     msgQ.type = WDA_SET_TX_POWER_REQ;
     msgQ.reserved = 0;
     msgQ.bodyptr = pTxPowerReq;
     msgQ.bodyval = 0;
-
     PELOGW(limLog(pMac, LOGW, FL( "Sending WDA_SET_TX_POWER_REQ to WDA"));)
-
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
     if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
     {
         limLog( pMac, LOGP, FL("Posting WDA_SET_TX_POWER_REQ to WDA failed, reason=%X"), retCode );
@@ -637,7 +565,6 @@
     }
     return retCode;
 }
-
 /** ---------------------------------------------------------
 \fn      limSendGetTxPowerReq
 \brief   LIM sends a WDA_GET_TX_POWER_REQ message to WDA
@@ -649,18 +576,14 @@
 {
     tSirRetStatus  retCode = eSIR_SUCCESS;
     tSirMsgQ       msgQ;
-
     if (NULL == pTxPowerReq)
         return retCode;
-
     msgQ.type = WDA_GET_TX_POWER_REQ;
     msgQ.reserved = 0;
     msgQ.bodyptr = pTxPowerReq;
     msgQ.bodyval = 0;
-
     PELOGW(limLog(pMac, LOGW, FL( "Sending WDA_GET_TX_POWER_REQ to WDA"));)
-
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
     if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
     {
         limLog( pMac, LOGP, FL("Posting WDA_GET_TX_POWER_REQ to WDA failed, reason=%X"), retCode );
@@ -672,7 +595,6 @@
     }
     return retCode;
 }
-
 /** ---------------------------------------------------------
 \fn      limSendBeaconFilterInfo
 \brief   LIM sends beacon filtering info to WDA
@@ -690,7 +612,6 @@
     tpBeaconFilterIe   pIe;
     tpPESession psessionEntry = &pMac->lim.gpSession[0];  //TBD-RAJESH get the sessionEntry from the caller
 
-
     msgSize = sizeof(tBeaconFilterMsg) + sizeof(beaconFilterTable);
     if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
           (void **) &pBeaconFilterMsg, msgSize) )
@@ -700,18 +621,14 @@
         return retCode;
     }
     palZeroMemory( pMac->hHdd, (tANI_U8 *) pBeaconFilterMsg, msgSize);
-
     // Fill in capability Info and mask
     //TBD-RAJESH get the BSS capability from session.
     //Don't send this message if no active Infra session is found.
     pBeaconFilterMsg->capabilityInfo = psessionEntry->limCurrentBssCaps;
     pBeaconFilterMsg->capabilityMask = CAPABILITY_FILTER_MASK;
-
     pBeaconFilterMsg->beaconInterval = (tANI_U16) psessionEntry->beaconParams.beaconInterval;
-
     // Fill in number of IEs in beaconFilterTable
     pBeaconFilterMsg->ieNum = (tANI_U16) (sizeof(beaconFilterTable) / sizeof(tBeaconFilterIe));
-
     //Fill message with info contained in the beaconFilterTable
     ptr = (tANI_U8 *)pBeaconFilterMsg + sizeof(tBeaconFilterMsg);
     for(i=0; i < (pBeaconFilterMsg->ieNum); i++)
@@ -725,14 +642,12 @@
         pIe->byte.ref =  beaconFilterTable[i].byte.ref; 
         ptr += sizeof(tBeaconFilterIe);
     }
-
     msgQ.type = WDA_BEACON_FILTER_IND;
     msgQ.reserved = 0;
     msgQ.bodyptr = pBeaconFilterMsg;
     msgQ.bodyval = 0;
-
     limLog( pMac, LOG3, FL( "Sending WDA_BEACON_FILTER_IND..." ));
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
     if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
     {
         palFreeMemory(pMac->hHdd, pBeaconFilterMsg);
@@ -741,7 +656,5 @@
             retCode );
         return retCode;
     }
-
     return retCode;
 }
-
diff --git a/CORE/MAC/src/pe/lim/limSendMessages.h b/CORE/MAC/src/pe/lim/limSendMessages.h
index 3871659..71b07ed 100644
--- a/CORE/MAC/src/pe/lim/limSendMessages.h
+++ b/CORE/MAC/src/pe/lim/limSendMessages.h
@@ -34,26 +34,22 @@
 #ifndef __LIM_SEND_MESSAGES_H
 #define __LIM_SEND_MESSAGES_H
 
-
-
 #include "aniGlobal.h"
 #include "limTypes.h"
 #include "halMsgApi.h"
 #include "sirParams.h"    
-
 tSirRetStatus limSendCFParams(tpAniSirGlobal pMac, tANI_U8 bssIdx, tANI_U8 cfpCount, tANI_U8 cfpPeriod);
 tSirRetStatus limSendBeaconParams(tpAniSirGlobal pMac, 
                                   tpUpdateBeaconParams pUpdatedBcnParams,
                                   tpPESession  psessionEntry );
-
 //tSirRetStatus limSendBeaconParams(tpAniSirGlobal pMac, tpUpdateBeaconParams pUpdatedBcnParams);
 #if defined WLAN_FEATURE_VOWIFI  
 tSirRetStatus limSendSwitchChnlParams(tpAniSirGlobal pMac, tANI_U8 chnlNumber, 
-                                      tSirMacHTSecondaryChannelOffset secondaryChnlOffset, 
+                                      ePhyChanBondState secondaryChnlOffset, 
                                       tPowerdBm maxTxPower,tANI_U8 peSessionId);
 #else
 tSirRetStatus limSendSwitchChnlParams(tpAniSirGlobal pMac, tANI_U8 chnlNumber, 
-                                      tSirMacHTSecondaryChannelOffset secondaryChnlOffset, 
+                                      ePhyChanBondState secondaryChnlOffset, 
                                       tANI_U8 localPwrConstraint,tANI_U8 peSessionId);
 #endif
 tSirRetStatus limSendEdcaParams(tpAniSirGlobal pMac, tSirMacEdcaParamRecord *pUpdatedEdcaParams, tANI_U16 bssIdx, tANI_BOOLEAN highPerformance);
@@ -66,9 +62,7 @@
 #endif
 tSirRetStatus limSendSetTxPowerReq(tpAniSirGlobal pMac, tpSirSetTxPowerReq pTxPowerReq);
 tSirRetStatus limSendGetTxPowerReq(tpAniSirGlobal pMac, tpSirGetTxPowerReq pTxPowerReq);
-
 void limSetActiveEdcaParams(tpAniSirGlobal pMac, tSirMacEdcaParamRecord *plocalEdcaParams, tpPESession psessionEntry);
-
 #define CAPABILITY_FILTER_MASK  0x73CF
 #define ERP_FILTER_MASK         0xF8
 #define EDCA_FILTER_MASK        0xF0
@@ -78,8 +72,6 @@
 #define HT_BYTE5_FILTER_MASK    0xFD
 #define DS_PARAM_CHANNEL_MASK   0x0
 
-
 tSirRetStatus limSendBeaconFilterInfo(tpAniSirGlobal pMac);
 
-
 #endif
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index 1d1ccd0..1ceed6b 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -123,7 +123,7 @@
     mmhMsg.type = msgType;
     mmhMsg.bodyptr = pSirSmeRsp;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
    {
@@ -201,7 +201,7 @@
     mmhMsg.type = pSirSmeJoinRsp->messageType;
     mmhMsg.bodyptr = pSirSmeJoinRsp;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg,  ePROT);
 }
 
@@ -377,7 +377,7 @@
                 palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames + psessionEntry->bcnLen + psessionEntry->assocReqLen + psessionEntry->assocRspLen, psessionEntry->ricData, pSirSmeJoinRsp->parsedRicRspLen);
                 palFreeMemory(pMac->hHdd, psessionEntry->ricData);
                 psessionEntry->ricData = NULL;
-                PELOG1(limLog(pMac, LOG1, FL("RicLength=%d\n"), psessionEntry->parsedRicRspLen);)
+                PELOG1(limLog(pMac, LOG1, FL("RicLength=%d\n"), pSirSmeJoinRsp->parsedRicRspLen);)
             }
 #endif
 #ifdef FEATURE_WLAN_CCX            
@@ -409,9 +409,23 @@
     
     if(IS_MCC_SUPPORTED && limIsLinkSuspended( pMac ) )
     {
+        ePhyChanBondState htSecondaryChannelOffset;
         if( psessionEntry && psessionEntry->limSmeState == eLIM_SME_LINK_EST_STATE )
         {
-            peSetResumeChannel( pMac, psessionEntry->currentOperChannel, 0);
+            
+#ifdef WLAN_FEATURE_11AC
+            if (psessionEntry->vhtCapability)
+            {
+               /*Get 11ac cbState from 11n cbState*/
+                 htSecondaryChannelOffset = limGet11ACPhyCBState(pMac, 
+                                    psessionEntry->currentOperChannel,
+                                    psessionEntry->htSecondaryChannelOffset);
+                peSetResumeChannel( pMac, psessionEntry->currentOperChannel, htSecondaryChannelOffset);
+            }
+            else {
+#endif
+            peSetResumeChannel( pMac, psessionEntry->currentOperChannel, psessionEntry->htSecondaryChannelOffset);
+        }
         }
         else
         {
@@ -571,7 +585,7 @@
     mmhMsg.type = msgType;
     mmhMsg.bodyptr = pSirSmeRsp;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
     limDiagEventReport(pMac, WLAN_PE_DIAG_START_BSS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
@@ -685,7 +699,7 @@
 #endif
                 mmhMsg.bodyptr = pSirSmeScanRsp;
                 mmhMsg.bodyval = 0;
-                MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+                MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
                 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
                 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeScanRsp, allocLength))
                 {
@@ -755,7 +769,7 @@
         mmhMsg.type = eWNI_SME_SCAN_RSP;
         mmhMsg.bodyptr = pSirSmeScanRsp;
         mmhMsg.bodyval = 0;
-        MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+        MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
         limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
         PELOG2(limLog(pMac, LOG2, FL("statusCode : eSIR_SME_SUCCESS\n"));)
     }
@@ -824,7 +838,7 @@
     mmhMsg.bodyptr = pSirSmeScanRsp;
     mmhMsg.bodyval = 0;
 
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
     limDiagEventReport(pMac, WLAN_PE_DIAG_SCAN_RSP_EVENT, NULL, (tANI_U16)resultCode, 0);
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -834,6 +848,77 @@
 
 }  /*** limPostSmeScanRspMessage ***/
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+/**
+ * limSendSmeOemDataRsp()
+ *
+ *FUNCTION:
+ * This function is called by limProcessSmeReqMessages() to send
+ * eWNI_SME_OEM_DATA_RSP message to applications above MAC
+ * Software.
+ *
+ *PARAMS:
+ *
+ *LOGIC:
+ *
+ *ASSUMPTIONS:
+ * NA
+ *
+ *NOTE:
+ * NA
+ *
+ * @param pMac         Pointer to Global MAC structure
+ * @param pMsgBuf      Indicates the mlm message
+ * @param resultCode   Indicates the result of previously issued
+ *                     eWNI_SME_OEM_DATA_RSP message
+ *
+ * @return None
+ */
+
+void limSendSmeOemDataRsp(tpAniSirGlobal pMac, tANI_U32* pMsgBuf, tSirResultCodes resultCode)
+{
+    tSirMsgQ                      mmhMsg;
+    tSirOemDataRsp*               pSirSmeOemDataRsp=NULL;
+    tLimMlmOemDataRsp*            pMlmOemDataRsp=NULL;
+    tANI_U16                      msgLength;
+
+    
+    //get the pointer to the mlm message
+    pMlmOemDataRsp = (tLimMlmOemDataRsp*)(pMsgBuf);
+
+    msgLength = sizeof(tSirOemDataRsp);
+
+    //now allocate memory for the char buffer
+    if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd, (void**)&pSirSmeOemDataRsp, msgLength))
+    {
+        limLog(pMac, LOGP, FL("call to palAllocateMemory failed for pSirSmeOemDataRsp\n"));
+        return;
+    }
+
+#if defined (ANI_LITTLE_BYTE_ENDIAN)
+    sirStoreU16N((tANI_U8*)&pSirSmeOemDataRsp->length, msgLength);
+    sirStoreU16N((tANI_U8*)&pSirSmeOemDataRsp->messageType, eWNI_SME_OEM_DATA_RSP);
+#else
+    pSirSmeOemDataRsp->length = msgLength;
+    pSirSmeOemDataRsp->messageType = eWNI_SME_OEM_DATA_RSP;
+#endif
+
+    palCopyMemory(pMac->hHdd, pSirSmeOemDataRsp->oemDataRsp, pMlmOemDataRsp->oemDataRsp, OEM_DATA_RSP_SIZE);
+
+    //Now free the memory from MLM Rsp Message
+    palFreeMemory(pMac->hHdd, pMlmOemDataRsp);
+
+    mmhMsg.type = eWNI_SME_OEM_DATA_RSP;
+    mmhMsg.bodyptr = pSirSmeOemDataRsp;
+    mmhMsg.bodyval = 0;
+
+    limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
+
+    return;
+}  /*** limSendSmeOemDataRsp ***/
+
+#endif
 
 
 /**
@@ -925,7 +1010,7 @@
     mmhMsg.bodyptr = pMsg;
     mmhMsg.bodyval = 0;
 
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
 
     limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
 }
@@ -1110,7 +1195,10 @@
     if( IS_MCC_SUPPORTED && limIsLinkSuspended( pMac ) )
     {
         //Resume on the first active session channel.
-        peSetResumeChannel( pMac, peGetActiveSessionChannel( pMac ), 0);
+        tANI_U8 resumeChannel;
+        ePhyChanBondState resumePhyCbState;
+        peGetActiveSessionChannel( pMac, &resumeChannel, &resumePhyCbState );
+        peSetResumeChannel( pMac, resumeChannel, resumePhyCbState );
 
         limResumeLink( pMac, limSendSmeDisassocDeauthNtfPostResume, 
                                               (tANI_U32*) pMsg );
@@ -1195,7 +1283,7 @@
     mmhMsg.bodyptr = pSirSmeDisassocInd;
     mmhMsg.bodyval = 0;
 
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
     limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_IND_EVENT, psessionEntry, 0, (tANI_U16)pStaDs->mlmStaContext.disassocReason); 
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -1291,7 +1379,7 @@
     mmhMsg.bodyptr = pSirSmeDeauthInd;
     mmhMsg.bodyval = 0;
 
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
     limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_IND_EVENT, psessionEntry, 0, pStaDs->mlmStaContext.cleanupTrigger);
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -1453,7 +1541,10 @@
     if( IS_MCC_SUPPORTED && limIsLinkSuspended( pMac ) )
     {
         //Resume on the first active session channel.
-        peSetResumeChannel( pMac, peGetActiveSessionChannel( pMac ), 0);
+        tANI_U8 resumeChannel;
+        ePhyChanBondState resumePhyCbState;
+        peGetActiveSessionChannel( pMac, &resumeChannel, &resumePhyCbState );
+        peSetResumeChannel( pMac, resumeChannel, resumePhyCbState );
 
         limResumeLink( pMac, limSendSmeDisassocDeauthNtfPostResume, 
                                               (tANI_U32*) pMsg );
@@ -1608,7 +1699,7 @@
     }
 
 
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     if (eSIR_SUCCESS != limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT))
     {
         palFreeMemory(pMac->hHdd, (void *) pSirSmeWmStatusChangeNtf);
@@ -1692,7 +1783,7 @@
     mmhMsg.type = eWNI_SME_SETCONTEXT_RSP;
     mmhMsg.bodyptr = pSirSmeSetContextRsp;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
     limDiagEventReport(pMac, WLAN_PE_DIAG_SETCONTEXT_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
@@ -1775,7 +1866,7 @@
     mmhMsg.type = eWNI_SME_REMOVEKEY_RSP;
     mmhMsg.bodyptr = pSirSmeRemoveKeyRsp;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
 } /*** end limSendSmeSetContextRsp() ***/
 
@@ -1916,7 +2007,7 @@
     msgQ.type = eWNI_SME_NEIGHBOR_BSS_IND;
     msgQ.bodyptr = pNewBssInd;
     msgQ.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
     limSysProcessMmhMsgApi(pMac, &msgQ, ePROT);
 } /*** end limSendSmeNeighborBssInd() ***/
 
@@ -1960,7 +2051,7 @@
     mmhMsg.type = eWNI_SME_ADDTS_RSP;
     mmhMsg.bodyptr = rsp;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
     limDiagEventReport(pMac, WLAN_PE_DIAG_ADDTS_RSP_EVENT, psessionEntry, 0, 0);
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -1995,7 +2086,7 @@
     mmhMsg.type = eWNI_SME_ADDTS_IND;
     mmhMsg.bodyptr = rsp;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
 }
 
@@ -2040,7 +2131,7 @@
     mmhMsg.type = eWNI_SME_DELTS_RSP;
     mmhMsg.bodyptr = rsp;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
     limDiagEventReport(pMac, WLAN_PE_DIAG_DELTS_RSP_EVENT, psessionEntry, (tANI_U16)status, 0);
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -2080,7 +2171,7 @@
     mmhMsg.type = eWNI_SME_DELTS_IND;
     mmhMsg.bodyptr = rsp;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
     limDiagEventReport(pMac, WLAN_PE_DIAG_DELTS_IND_EVENT, psessionEntry, 0, 0);
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -2143,7 +2234,7 @@
 
     mmhMsg.bodyptr = stats;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);                                                  
 
     return;
@@ -2202,7 +2293,7 @@
 
     mmhMsg.bodyptr = stats;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);                                                  
 
     return;
@@ -2251,7 +2342,7 @@
     mmhMsg.type    = msgType;
 //    mmhMsg.bodyval = (tANI_U32) pNewPeerInd;
     mmhMsg.bodyptr = pNewPeerInd;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
     
 }
@@ -2297,7 +2388,7 @@
     mmhMsg.bodyval = 0;
   
     PELOG1(limLog(pMac, LOG1, FL("Sending eWNI_PMC_EXIT_BMPS_IND to SME. \n"));)        
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
     limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_BMPS_IND_EVENT, peGetValidPowerSaveSession(pMac), 0, (tANI_U16)reasonCode);
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -2363,7 +2454,7 @@
     mmhMsg.type = eWNI_SME_FT_AGGR_QOS_RSP;
     mmhMsg.bodyptr = aggrQosRsp;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
 
     return;
@@ -2388,7 +2479,7 @@
     mmhMsg.type = eWNI_SME_PRE_SWITCH_CHL_IND;
     mmhMsg.bodyptr = NULL;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
 
     return;
@@ -2412,7 +2503,7 @@
     mmhMsg.type = eWNI_SME_POST_SWITCH_CHL_IND;
     mmhMsg.bodyptr = NULL;
     mmhMsg.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
 
     return;
@@ -2441,7 +2532,7 @@
     PELOG1(limLog(pMac, LOG1, FL("msgType %s peerMacAddr %02x-%02x-%02x-%02x-%02x-%02x"
                 "sme session id %d\n"),"eWNI_SME_MAX_ASSOC_EXCEEDED", peerMacAddr[0], peerMacAddr[1],
                 peerMacAddr[2], peerMacAddr[3], peerMacAddr[4], peerMacAddr[5], smesessionId);)
-    MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
     limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
 
     return;
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.h b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.h
index d5e8050..8554d9b 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.h
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.h
@@ -89,6 +89,9 @@
                tANI_U8 *beacon,tANI_U16 beaconLen, tANI_U16 msgType, tANI_U8 sessionId);
 void limSendExitBmpsInd(tpAniSirGlobal pMac, tExitBmpsReason reasonCode);
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+void limSendSmeOemDataRsp(tpAniSirGlobal pMac, tANI_U32* pMsgBuf, tSirResultCodes resultCode);
+#endif
 
 void limSendSmePreChannelSwitchInd(tpAniSirGlobal pMac);
 void limSendSmePostChannelSwitchInd(tpAniSirGlobal pMac);
diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c
index 456f9d6..f9df7ec 100644
--- a/CORE/MAC/src/pe/lim/limSerDesUtils.c
+++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c
@@ -187,14 +187,6 @@
     if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
         return eSIR_FAILURE;
 
-    // Extract the TITAN capability info
-    // NOTE - titanHtCaps is now DWORD aligned
-    pBssDescription->titanHtCaps = limGetU32( pBuf );
-    pBuf += sizeof(tANI_U32);
-    len  -= sizeof(tANI_U32);
-    if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
-        return eSIR_FAILURE;
-
     //pass the timestamp
     pBssDescription->nReceivedTime = limGetU32( pBuf );
     pBuf += sizeof(tANI_TIMESTAMP);
@@ -593,17 +585,13 @@
     pBuf       += sizeof(tSirMacAddr);
     bssInfoLen += sizeof(tSirMacAddr);
    PELOG3(limLog(pMac, LOG3,
-       FL("Copying new NeighborWds node:channel is %d, TITAN HT Caps are %1d, wniIndicator is %d, bssType is %d, bssId is "),
-       pBssInfo->channelId, pBssInfo->titanHtCaps, pBssInfo->wniIndicator,
-       pBssInfo->bssType);
+       FL("Copying new NeighborWds node:channel is %d, wniIndicator is %d, bssType is %d, bssId is "),
+       pBssInfo->channelId, pBssInfo->wniIndicator, pBssInfo->bssType);
     limPrintMacAddr(pMac, pBssInfo->bssId, LOG3);)
 
     *pBuf++ = pBssInfo->channelId;
     bssInfoLen++;
 
-    *pBuf++ = pBssInfo->titanHtCaps;
-    bssInfoLen++;
-
     limCopyU32(pBuf, pBssInfo->wniIndicator);
     pBuf       += sizeof(tANI_U32);
     bssInfoLen += sizeof(tANI_U32);
@@ -1366,7 +1354,7 @@
     len--;
 
     // Extract CB secondary channel info
-    pStartBssReq->cbMode = (tAniCBSecondaryMode)limGetU32( pBuf );
+    pStartBssReq->cbMode = (ePhyChanBondState)limGetU32( pBuf );
     pBuf += sizeof( tANI_U32 );
     len -= sizeof( tANI_U32 );
 
@@ -1789,6 +1777,12 @@
     if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
         return eSIR_FAILURE;
 
+    // Extract cbMode
+    pJoinReq->cbMode = *pBuf++;
+    len--;
+    if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
+        return eSIR_FAILURE;
+
     // Extract uapsdPerAcBitmask
     pJoinReq->uapsdPerAcBitmask = *pBuf++;
     len--;
@@ -2193,11 +2187,6 @@
 
 #endif
 
-    // Copy the new TITAN capabilities
-    *pBuf = pAssocInd->titanHtCaps;
-    pBuf++;
-    mLen++;
-
     limCopyU32(pBuf, pAssocInd->spectrumMgtIndicator);
     pBuf += sizeof(tAniBool);
     mLen += sizeof(tAniBool);
@@ -2766,11 +2755,6 @@
     mLen += sizeof(tANI_U32);
 #endif
 
-    // Copy the new TITAN capabilities
-    *pBuf = pReassocInd->titanHtCaps;
-    pBuf++;
-    mLen++;
-
     limCopyU32(pBuf, pReassocInd->spectrumMgtIndicator);
     pBuf += sizeof(tAniBool);
     mLen += sizeof(tAniBool);
@@ -3425,7 +3409,7 @@
         pMac->lim.htCapabilityPresentInBeacon = 1;
     else
         pMac->lim.htCapabilityPresentInBeacon = 0;
-    if (neighborBssInfo.localPowerConstraints && pMac->lim.gLim11hEnable)
+    if (neighborBssInfo.localPowerConstraints && pSessionEntry->lim11hEnable)
     {
         localPowerConstraints = neighborBssInfo.localPowerConstraints;
     }
diff --git a/CORE/MAC/src/pe/lim/limSession.c b/CORE/MAC/src/pe/lim/limSession.c
index 3d3a553..6348bf8 100644
--- a/CORE/MAC/src/pe/lim/limSession.c
+++ b/CORE/MAC/src/pe/lim/limSession.c
@@ -152,7 +152,11 @@
 #endif
             *sessionId = i;
 
-            pMac->lim.gpSession[i].gLimPhyMode = WNI_CFG_PHY_MODE_11G; //TODO :Check with the team what should be default mode 
+            pMac->lim.gpSession[i].gLimPhyMode = WNI_CFG_PHY_MODE_11G; //TODO :Check with the team what should be default mode
+            /* Initialize CB mode variables when session is created */
+            pMac->lim.gpSession[i].htSupportedChannelWidthSet = 0;
+            pMac->lim.gpSession[i].htRecommendedTxWidthSet = 0;
+            pMac->lim.gpSession[i].htSecondaryChannelOffset = 0;
             return(&pMac->lim.gpSession[i]);
         }
     }
@@ -262,7 +266,7 @@
        }
     }
 
-    limLog(pMac, LOG4, FL("Session lookup fails for StaId: \n "));
+    limLog(pMac, LOG4, FL("Session lookup fails for StaId: %d\n "), staid);
     return(NULL);
 }
 
@@ -280,9 +284,24 @@
 void peDeleteSession(tpAniSirGlobal pMac, tpPESession psessionEntry)
 {
     tANI_U16 i = 0;
+    tANI_U16 n;
+    TX_TIMER *timer_ptr;
 
     limLog(pMac, LOGW, FL("Trying to delete a session %d.\n "), psessionEntry->peSessionId);
 
+    for (n = 0; n < pMac->lim.maxStation; n++)
+    {
+        timer_ptr = &pMac->lim.limTimers.gpLimCnfWaitTimer[n];
+
+        if(psessionEntry->peSessionId == timer_ptr->sessionId)
+        {
+            if(VOS_TRUE == tx_timer_running(timer_ptr))
+            {
+                tx_timer_deactivate(timer_ptr);
+            }
+        }
+    }
+    
     if(psessionEntry->pLimStartBssReq != NULL)
     {
         palFreeMemory( pMac->hHdd, psessionEntry->pLimStartBssReq );
@@ -404,7 +423,9 @@
          }
       }
    }   
-   
+
+   limLog(pMac, LOG1, FL("Session lookup fails for Peer StaId: \n "));
+   limPrintMacAddr(pMac, sa, LOG1);
    return NULL;
 }
 
diff --git a/CORE/MAC/src/pe/lim/limSessionUtils.c b/CORE/MAC/src/pe/lim/limSessionUtils.c
index a07d0c9..bc53e77 100644
--- a/CORE/MAC/src/pe/lim/limSessionUtils.c
+++ b/CORE/MAC/src/pe/lim/limSessionUtils.c
@@ -20,11 +20,9 @@
  */
 
 /**=========================================================================
-  
-  \file  limSessionUtils.c
-  
-  \brief implementation for lim Session Utility  APIs
 
+  \file  limSessionUtils.c
+  \brief implementation for lim Session Utility  APIs
   \author Sunit Bhatia
   
   Copyright 2008 (c) Qualcomm, Incorporated.  All Rights Reserved.
@@ -40,8 +38,63 @@
 #include "limSessionUtils.h"
 #include "limUtils.h"
 
+/*--------------------------------------------------------------------------
+  \brief peGetVhtCapable() - Returns the Vht capable from a valid session.
+
+  This function itrates the session Table and returns the VHT capable from first valid session
+   if no sessions are valid/present  it returns FALSE
+    
+  \param pMac                   - pointer to global adapter context
+  \return                           - channel to scan from valid session else zero.
+  
+  \sa
+  
+  --------------------------------------------------------------------------*/
+tANI_U8 peGetVhtCapable(tpAniSirGlobal pMac)
+
+{
+#ifdef WLAN_FEATURE_11AC
+    tANI_U8 i;
+    //assumption here is that all the sessions will be on the same channel.
+    //This function will not work, once we have multiple channel support.
+    for(i =0; i < pMac->lim.maxBssId; i++)
+    {
+        if(pMac->lim.gpSession[i].valid)
+        {
+            return(pMac->lim.gpSession[i].vhtCapability);  
+        }
+    }
+#endif
+    return FALSE;
+}
+/*--------------------------------------------------------------------------
+  \brief peGetCurrentChannel() - Returns the  channel number for scanning, 
+                                from a valid session.
+   This function itrates the session Table and returns the channel number 
+   from first valid session if no sessions are valid/present  it returns zero
+
+  \param pMac                   - pointer to global adapter context
+  \return                       - channel to scan from valid session else zero.
+  \sa
+  --------------------------------------------------------------------------*/
+tANI_U8 peGetCurrentChannel(tpAniSirGlobal pMac)
+{
+    tANI_U8 i;
+    //assumption here is that all the sessions will be on the same channel.
+    //This function will not work, once we have multiple channel support.
+    for(i =0; i < pMac->lim.maxBssId; i++)
+    {
+        if(pMac->lim.gpSession[i].valid)
+        {
+            return(pMac->lim.gpSession[i].currentOperChannel);
+        }
+    }
+    return(HAL_INVALID_CHANNEL_ID);
+}
+
 
 /*--------------------------------------------------------------------------
+
   \brief peValidateJoinReq() - validates the Join request .
 
   This function is called to validate the Join Request for a BT-AMP station. If start BSS session is present
@@ -179,7 +232,7 @@
           //Skip the sessionId that is to be joined.
           continue;
         }
-        //if snother ession is valid and it is on different channel
+        //if another ession is valid and it is on different channel
         //it is an off channel operation.
         if( (pMac->lim.gpSession[i].valid) && 
             (pMac->lim.gpSession[i].currentOperChannel != 
@@ -193,22 +246,156 @@
 
 }
 
+/*--------------------------------------------------------------------------
+  \brief peGetActiveSessionChannel() - Gets the operating channel of first  
+                                    valid session. Returns 0 if there is no
+									valid session.
+
+  \param pMac                   - pointer to global adapter context
+  
+  \return tANI_U8               - operating channel.
+  
+  \sa
+  --------------------------------------------------------------------------*/
+void
+peGetActiveSessionChannel (tpAniSirGlobal pMac, tANI_U8* resumeChannel, ePhyChanBondState* resumePhyCbState)
+{
+    tANI_U8 i;
+
+    // Initialize the pointers passed to INVALID values in case we don't find a valid session
+    *resumeChannel = 0;
+    *resumePhyCbState = 0;
+    for(i =0; i < pMac->lim.maxBssId; i++)
+    {
+        if(pMac->lim.gpSession[i].valid)
+        {
+            *resumeChannel = pMac->lim.gpSession[i].currentOperChannel;
+            *resumePhyCbState = pMac->lim.gpSession[i].htSecondaryChannelOffset;
+            
+#ifdef WLAN_FEATURE_11AC
+            if ((pMac->lim.gpSession[i].vhtCapability))
+            {
+               /*Get 11ac cbState from 11n cbState*/
+                *resumePhyCbState = limGet11ACPhyCBState(pMac, 
+                                    pMac->lim.gpSession[i].currentOperChannel,
+                                    pMac->lim.gpSession[i].htSecondaryChannelOffset);
+            }
+#endif
+        }
+    }
+    return;
+}
+
+/*--------------------------------------------------------------------------
+  \brief limIsChanSwitchRunning() - Check if channel switch is running on any  
+                                    valid session.
+
+  \param pMac                   - pointer to global adapter context
+  
+  \return tANI_U8               - 1 - if chann switching running.
+                                  0 - if chann switching is not running. 
+  
+  \sa
+  --------------------------------------------------------------------------*/
 tANI_U8
-peGetActiveSessionChannel (tpAniSirGlobal pMac)
+limIsChanSwitchRunning (tpAniSirGlobal pMac)
 {
     tANI_U8 i;
 
     for(i =0; i < pMac->lim.maxBssId; i++)
     {
-        //if snother ession is valid and it is on different channel
-        //it is an off channel operation.
-        if(pMac->lim.gpSession[i].valid)
+        if(pMac->lim.gpSession[i].valid && 
+            pMac->lim.gpSession[i].gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING)
         {
-            return pMac->lim.gpSession[i].currentOperChannel;
+            return 1;
         }
     }
-
     return 0;
+}
+/*--------------------------------------------------------------------------
+  \brief limIsInQuietDuration() - Check if channel quieting is running on any  
+                                    valid session.
 
+  \param pMac                   - pointer to global adapter context
+  
+  \return tANI_U8               - 1 - if chann quiet running.
+                                  0 - if chann quiet is not running. 
+  
+  \sa
+  --------------------------------------------------------------------------*/
+tANI_U8
+limIsInQuietDuration (tpAniSirGlobal pMac)
+{
+    tANI_U8 i;
+
+    for(i =0; i < pMac->lim.maxBssId; i++)
+    {
+        if(pMac->lim.gpSession[i].valid && 
+            pMac->lim.gpSession[i].gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING)
+        {
+            return 1;
+        }
+    }
+    return 0;
+}
+/*--------------------------------------------------------------------------
+  \brief limIsQuietBegin() - Check if channel quieting is begining on any  
+                                    valid session.
+
+  \param pMac                   - pointer to global adapter context
+  
+  \return tANI_U8               - 1 - if chann quiet running.
+                                  0 - if chann quiet is not running. 
+  
+  \sa
+  --------------------------------------------------------------------------*/
+tANI_U8
+limIsQuietBegin (tpAniSirGlobal pMac)
+{
+    tANI_U8 i;
+
+    for(i =0; i < pMac->lim.maxBssId; i++)
+    {
+        if(pMac->lim.gpSession[i].valid && 
+            pMac->lim.gpSession[i].gLimSpecMgmt.quietState == eLIM_QUIET_BEGIN)
+        {
+            return 1;
+        }
+    }
+    return 0;
 }
 
+/*--------------------------------------------------------------------------
+  \brief limIsInMCC() - Check if Device is in MCC.
+
+  \param pMac                   - pointer to global adapter context
+  
+  \return tANI_U8               - TRUE - if in MCC.
+                                  FALSE - NOT in MCC. 
+  
+  \sa
+  --------------------------------------------------------------------------*/
+tANI_U8
+limIsInMCC (tpAniSirGlobal pMac)
+{
+    tANI_U8 i;
+    tANI_U8 chan = 0;
+
+    for(i = 0; i < pMac->lim.maxBssId; i++)
+    {
+        //if another session is valid and it is on different channel
+        //it is an off channel operation.
+        if( (pMac->lim.gpSession[i].valid) )
+        { 
+            if( chan == 0 )
+            {
+                chan = pMac->lim.gpSession[i].currentOperChannel;
+            } 
+            else if( chan != pMac->lim.gpSession[i].currentOperChannel)
+            {
+                return TRUE; 
+            }        
+        }
+    }
+    return FALSE;
+}
diff --git a/CORE/MAC/src/pe/lim/limSessionUtils.h b/CORE/MAC/src/pe/lim/limSessionUtils.h
index 4127827..47484b0 100644
--- a/CORE/MAC/src/pe/lim/limSessionUtils.h
+++ b/CORE/MAC/src/pe/lim/limSessionUtils.h
@@ -58,6 +58,20 @@
 /*------------------------------------------------------------------------- 
   Function declarations and documenation
   ------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------
+  
+          \brief peGetVhtCapable() - Returns the Vht capable from a valid session.
+ 
+          This function itrates the session Table and returns the VHT capable from first valid session
+          if no sessions are valid/present  it returns FALSE
+
+         \param pMac	                - pointer to global adapter context
+          \return                        - channel to scan from valid session else zero.
+          
+          \sa
+           
+ --------------------------------------------------------------------------*/
+   tANI_U8 peGetVhtCapable(tpAniSirGlobal pMac);
 
 
 /*--------------------------------------------------------------------------
@@ -130,7 +144,68 @@
 isLimSessionOffChannel(tpAniSirGlobal pMac, tANI_U8 sessionId);
 /* --------------------------------------------------------------------------*/
 
+/*--------------------------------------------------------------------------
+  \brief peGetActiveSessionChannel() - Gets the first valid sessions primary and secondary
+                                        channel. If not found returns invalid channel ID (=0)
+  \param pMac              - pointer to global adapter context
+  \param resumeChannel     - Primary channel of the first valid session. This is an output argument.
+  \return resumePhyCbState - Secondary channel of the first valid session. This is an output argument.
+--------------------------------------------------------------------------*/
+void
+peGetActiveSessionChannel(tpAniSirGlobal pMac, tANI_U8* resumeChannel, ePhyChanBondState* resumePhyCbState);
+
+/*--------------------------------------------------------------------------
+  \brief limIsChanSwitchRunning() - Check if channel switch is running on any  
+                                    valid session.
+
+  \param pMac                   - pointer to global adapter context
+  
+  \return tANI_U8               - 1 - if chann switching running.
+                                  0 - if chann switching is not running. 
+  
+  \sa
+  --------------------------------------------------------------------------*/
 tANI_U8
-peGetActiveSessionChannel( tpAniSirGlobal pMac );
+limIsChanSwitchRunning (tpAniSirGlobal pMac);
+
+/*--------------------------------------------------------------------------
+  \brief limIsInQuietDuration() - Check if channel quieting is running on any  
+                                    valid session.
+
+  \param pMac                   - pointer to global adapter context
+  
+  \return tANI_U8               - 1 - if chann quiet running.
+                                  0 - if chann quiet is not running. 
+  
+  \sa
+  --------------------------------------------------------------------------*/
+tANI_U8
+limIsInQuietDuration (tpAniSirGlobal pMac);
+
+/*--------------------------------------------------------------------------
+  \brief limIsQuietBegin() - Check if channel quieting is begining on any  
+                                    valid session.
+
+  \param pMac                   - pointer to global adapter context
+  
+  \return tANI_U8               - 1 - if chann quiet running.
+                                  0 - if chann quiet is not running. 
+  
+  \sa
+  --------------------------------------------------------------------------*/
+tANI_U8
+limIsQuietBegin (tpAniSirGlobal pMac);
+/*--------------------------------------------------------------------------
+  \brief limIsInMCC() - Check if Device is in MCC.
+
+  \param pMac                   - pointer to global adapter context
+  
+  \return tANI_U8               - TRUE - if in MCC.
+                                  FALSE - NOT in MCC. 
+  
+  \sa
+  --------------------------------------------------------------------------*/
+tANI_U8
+limIsInMCC (tpAniSirGlobal pMac);
 #endif //#if !defined( __LIM_SESSION_UTILS_H )
 
diff --git a/CORE/MAC/src/pe/lim/limSmeReqUtils.c b/CORE/MAC/src/pe/lim/limSmeReqUtils.c
index f0a687e..653a76d 100644
--- a/CORE/MAC/src/pe/lim/limSmeReqUtils.c
+++ b/CORE/MAC/src/pe/lim/limSmeReqUtils.c
@@ -836,6 +836,22 @@
         goto end;
     }
 
+    /*
+       Reject Join Req if the Self Mac Address and 
+       the Ap's Mac Address is same
+    */
+    if( palEqualMemory( pMac->hHdd, (tANI_U8* ) pJoinReq->selfMacAddr, 
+                       (tANI_U8 *) pJoinReq->bssDescription.bssId, 
+                       (tANI_U8) (sizeof(tSirMacAddr))))
+    {
+        // Log the event
+        limLog(pMac, LOGE,
+               FL("received SME_JOIN_REQ with Self Mac and BSSID Same\n"));
+
+        valid = false;
+        goto end;
+    }
+
 end:
     return valid;
 } /*** end limIsSmeJoinReqValid() ***/
diff --git a/CORE/MAC/src/pe/lim/limTimerUtils.c b/CORE/MAC/src/pe/lim/limTimerUtils.c
index fd0b2a5..e2003cf 100644
--- a/CORE/MAC/src/pe/lim/limTimerUtils.c
+++ b/CORE/MAC/src/pe/lim/limTimerUtils.c
@@ -895,7 +895,7 @@
 {
     tANI_U32    val=0, val1=0;
 
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, timerId));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, NO_SESSION, timerId));
 
     switch (timerId)
     {
@@ -920,6 +920,7 @@
                        FL("Unable to deactivate min channel timer\n"));
             }
 
+#if 0
             // If a background was triggered via Quiet BSS,
             // then we need to adjust the MIN and MAX channel
             // timer's accordingly to the Quiet duration that
@@ -933,6 +934,7 @@
             }
             else
             {
+#endif
                 if(pMac->lim.gpLimMlmScanReq)
                 {
                     val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->minChannelTime);
@@ -943,7 +945,9 @@
                     //No need to change min timer. This is not a scan
                     break;
                 }
+#if 0
             }
+#endif
 
             if (tx_timer_change(&pMac->lim.limTimers.gLimMinChannelTimer,
                                 val, 0) != TX_SUCCESS)
@@ -993,6 +997,7 @@
             // was specified
             if (pMac->lim.gLimSystemRole != eLIM_AP_ROLE)
             {
+#if 0
 
                 if( eLIM_QUIET_RUNNING == pMac->lim.gLimSpecMgmt.quietState &&
                     pMac->lim.gLimTriggerBackgroundScanDuringQuietBss )
@@ -1003,6 +1008,7 @@
                 }
                 else
                 {
+#endif
                     if(pMac->lim.gpLimMlmScanReq)
                     {
                         val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->maxChannelTime);
@@ -1013,7 +1019,9 @@
                         //No need to change max timer. This is not a scan
                         break;
                     }
+#if 0
                 }
+#endif
             }
 #endif
 #if defined(ANI_PRODUCT_TYPE_AP)
@@ -1415,6 +1423,7 @@
             break;
 
 #endif
+#if 0
         case eLIM_CHANNEL_SWITCH_TIMER:
             if (tx_timer_deactivate(&pMac->lim.limTimers.gLimChannelSwitchTimer) != eSIR_SUCCESS)
             {
@@ -1430,6 +1439,7 @@
                 return;
             }
             break;
+#endif
 
         case eLIM_LEARN_DURATION_TIMER:
 #ifdef ANI_PRODUCT_TYPE_AP
@@ -1484,6 +1494,7 @@
 #endif
             break;
 
+#if 0
         case eLIM_QUIET_BSS_TIMER:
             if (TX_SUCCESS !=
             tx_timer_deactivate(&pMac->lim.limTimers.gLimQuietBssTimer))
@@ -1519,7 +1530,7 @@
                     FL( "Unable to change gLimQuietTimer! Will still attempt to re-activate anyway...\n" ));
             }
             break;
-
+#endif
 
 #ifdef WLAN_SOFTAP_FEATURE
 #if 0
@@ -1635,7 +1646,7 @@
 {
     tANI_U32    val, val1;
 
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_HEART_BEAT_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, psessionEntry->peSessionId, eLIM_HEART_BEAT_TIMER));
 
     if (tx_timer_deactivate(&pMac->lim.limTimers.gLimHeartBeatTimer) != TX_SUCCESS)
         limLog(pMac, LOGP, FL("Fail to deactivate HeartBeatTimer \n"));
@@ -1679,7 +1690,7 @@
     PELOG3(limLog(pMac, LOG3, FL("Rxed Heartbeat. Count=%d\n"), psessionEntry->LimRxedBeaconCntDuringHB);)
 
     limHeartBeatDeactivateAndChangeTimer(pMac, psessionEntry);
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_HEART_BEAT_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_HEART_BEAT_TIMER));
 
     //only start the hearbeat-timer if the timeout value is non-zero
     if(pMac->lim.limTimers.gLimHeartBeatTimer.initScheduleTimeInMsecs > 0) {
@@ -1850,7 +1861,7 @@
 limDeactivateAndChangePerStaIdTimer(tpAniSirGlobal pMac, tANI_U32 timerId, tANI_U16 staId)
 {
     tANI_U32    val;
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, timerId));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, NO_SESSION, timerId));
 
     switch (timerId)
     {
@@ -1995,7 +2006,7 @@
 
 void limActivateCnfTimer(tpAniSirGlobal pMac, tANI_U16 staId, tpPESession psessionEntry)
 {
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_CNF_WAIT_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_CNF_WAIT_TIMER));
     pMac->lim.limTimers.gpLimCnfWaitTimer[staId].sessionId = psessionEntry->peSessionId;
     if (tx_timer_activate(&pMac->lim.limTimers.gpLimCnfWaitTimer[staId])
                 != TX_SUCCESS)
@@ -2027,7 +2038,7 @@
 
 void limActivateAuthRspTimer(tpAniSirGlobal pMac, tLimPreAuthNode *pAuthNode)
 {
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_AUTH_RESP_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_AUTH_RESP_TIMER));
     if (tx_timer_activate(&pAuthNode->timer) != TX_SUCCESS)
     {
         /// Could not activate auth rsp timer.
diff --git a/CORE/MAC/src/pe/lim/limTypes.h b/CORE/MAC/src/pe/lim/limTypes.h
index cebffee..3f08943 100644
--- a/CORE/MAC/src/pe/lim/limTypes.h
+++ b/CORE/MAC/src/pe/lim/limTypes.h
@@ -100,6 +100,10 @@
 #define LIM_MLM_REMOVEKEY_REQ  LIM_MLM_MSG_START + 39
 #define LIM_MLM_REMOVEKEY_CNF  LIM_MLM_MSG_START + 40
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+#define LIM_MLM_OEM_DATA_REQ            LIM_MLM_MSG_START + 41
+#define LIM_MLM_OEM_DATA_CNF            LIM_MLM_MSG_START + 42
+#endif
 
 #define LIM_HASH_ADD            0
 #define LIM_HASH_UPDATE         1
@@ -174,7 +178,7 @@
     tANI_U8               dtimPeriod;
     tSirMacCfParamSet     cfParamSet;
     tSirMacChanNum        channelNumber;
-    tAniCBSecondaryMode   cbMode;
+    ePhyChanBondState     cbMode;
     tANI_U16              atimWindow;
     tSirMacRateSet        rateSet;
     tANI_U8               sessionId; //Added For BT-AMP Support   
@@ -244,8 +248,6 @@
     tSirRSNie            rsnIE;
     tSirAddie            addIE; // additional IE recevied from the peer, which possibly includes WSC IE and/or P2P IE.
     tSirMacCapabilityInfo capabilityInfo;
-    tAniTitanHtCapabilityInfo titanHtCaps;
-
     tAniBool                spectrumMgtIndicator;
     tSirMacPowerCapInfo     powerCap;
     tSirSupChnl             supportedChannels;
@@ -300,8 +302,6 @@
     tSirRSNie            rsnIE;
     tSirAddie            addIE; // additional IE recevied from the peer, which can be WSC IE and/or P2P IE.
     tSirMacCapabilityInfo capabilityInfo;
-    tAniTitanHtCapabilityInfo titanHtCaps;
-
     tAniBool                spectrumMgtIndicator;
     tSirMacPowerCapInfo     powerCap;
     tSirSupChnl             supportedChannels;
@@ -647,11 +647,8 @@
 
 void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data);
 
-// Function to handle CB CFG parameter updates
-void handleCBCFGChange( tpAniSirGlobal pMac, tANI_U32 cfgId );
-
 // Function to handle HT and HT IE CFG parameter intializations
-void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac);
+void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry);
 
 // Function to handle CFG parameter updates
 void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32);
@@ -675,7 +672,6 @@
 // Function to cleanup LMM state machine
 void limCleanupLmm(tpAniSirGlobal);
 
-
 // Management frame handling functions
 void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
 void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *);
@@ -734,8 +730,8 @@
 void limContinueChannelScan(tpAniSirGlobal);
 tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
 
-#if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && defined(ANI_PRODUCT_TYPE_AP)
-tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8);
+#if 1 //(WNI_POLARIS_FW_PACKAGE == ADVANCED) && defined(ANI_PRODUCT_TYPE_AP)
+tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
 #endif
 
 #if defined WLAN_FEATURE_VOWIFI
@@ -789,11 +785,15 @@
 void limSetScanMode(tpAniSirGlobal pMac);
 
 /// Function that Switches the Channel and sets the CB Mode 
-void limSetChannel(tpAniSirGlobal pMac, tANI_U32 titanHtcap, tANI_U8 channel, tPowerdBm maxTxPower, tANI_U8 peSessionId);
+void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
 
 /// Function that completes channel scan
 void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/// Funtion that sets system into meas mode for oem data req
+void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
+#endif
 
 #ifdef ANI_SUPPORT_11H
 /// Function that sends Measurement Report action frame
@@ -811,11 +811,6 @@
 void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
 void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
 void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
-#ifdef ANI_PRODUCT_TYPE_AP
-void limProcessApMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
-void limProcessApMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
-void limProcessApMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
-#endif
 void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
 void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
 void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
@@ -1077,7 +1072,7 @@
 void limSendSmeMgmtFrameInd(
                     tpAniSirGlobal pMac, tANI_U8 frameType,
                     tANI_U8  *frame, tANI_U32 frameLen, tANI_U16 sessionId,
-                    tANI_U32 rxChan);
+                    tANI_U32 rxChan, tpPESession psessionEntry);
 void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
 void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
 void limAbortRemainOnChan(tpAniSirGlobal pMac);
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index ea634e9..d0f8d04 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -442,6 +442,12 @@
             return "eWNI_SME_SYS_READY_IND\n";
         case eWNI_SME_SCAN_REQ:
             return "eWNI_SME_SCAN_REQ\n";
+#ifdef FEATURE_OEM_DATA_SUPPORT
+        case eWNI_SME_OEM_DATA_REQ:
+            return "eWNI_SME_OEM_DATA_REQ\n";
+        case eWNI_SME_OEM_DATA_RSP:
+            return "eWNI_SME_OEM_DATA_RSP\n";
+#endif
         case eWNI_SME_SCAN_RSP:
             return "eWNI_SME_SCAN_RSP\n";
         case eWNI_SME_JOIN_REQ:
@@ -539,10 +545,6 @@
         case eWNI_SME_DELTS_IND:
             return "eWNI_SME_DELTS_IND\n";
 
-        case SIR_LIM_RESUME_ACTIVITY_NTF:
-            return "SIR_LIM_RESUME_ACTIVITY_NTF\n";
-        case SIR_LIM_SUSPEND_ACTIVITY_REQ:
-            return "SIR_LIM_SUSPEND_ACTIVITY_REQ\n";
         case WDA_SUSPEND_ACTIVITY_RSP:
             return "WDA_SUSPEND_ACTIVITY_RSP\n";
         case SIR_LIM_RETRY_INTERRUPT_MSG:
@@ -571,22 +573,10 @@
             return "SIR_LIM_REASSOC_FAIL_TIMEOUT\n";
         case SIR_LIM_HEART_BEAT_TIMEOUT:
             return "SIR_LIM_HEART_BEAT_TIMEOUT\n";
-#ifdef ANI_PRODUCT_TYPE_AP
-        case SIR_LIM_PREAUTH_CLNUP_TIMEOUT:
-            return "SIR_LIM_PREAUTH_CLNUP_TIMEOUT\n";
-#endif
         case SIR_LIM_ADDTS_RSP_TIMEOUT:
             return "SIR_LIM_ADDTS_RSP_TIMEOUT\n";
         case SIR_LIM_CHANNEL_SCAN_TIMEOUT:
             return "SIR_LIM_CHANNEL_SCAN_TIMEOUT\n";
-#if defined(ANI_PRODUCT_TYPE_AP) && (WNI_POLARIS_FW_PACKAGE == ADVANCED)
-        case SIR_LIM_MEASUREMENT_IND_TIMEOUT:
-            return "SIR_LIM_MEASUREMENT_IND_TIMEOUT\n";
-        case SIR_LIM_LEARN_INTERVAL_TIMEOUT:
-            return "SIR_LIM_LEARN_INTERVAL_TIMEOUT\n";
-        case SIR_LIM_LEARN_DURATION_TIMEOUT:
-            return "SIR_LIM_LEARN_DURATION_TIMEOUT\n";
-#endif
         case SIR_LIM_LINK_TEST_DURATION_TIMEOUT:
             return "SIR_LIM_LINK_TEST_DURATION_TIMEOUT\n";
         case SIR_LIM_HASH_MISS_THRES_TIMEOUT:
@@ -895,7 +885,7 @@
 void
 limInitMlm(tpAniSirGlobal pMac)
 {
-    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
+    MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, NO_SESSION, pMac->lim.gLimMlmState));
 
     /// Initialize scan result hash table
     limReInitScanResults(pMac); //sep26th review
@@ -1358,7 +1348,7 @@
     **/
     if (pMac->lim.gLimDeferredMsgQ.size > 0)
     {
-        PELOGW(limLog(pMac, LOGW, FL("%d Deferred messages (type 0x%x, scan %d, sme %d, mlme %d, addts %d)\n"),
+        PELOGW(limLog(pMac, LOGW, FL("%d Deferred messages (type 0x%x, scan %d, global sme %d, global mlme %d, addts %d)\n"),
                pMac->lim.gLimDeferredMsgQ.size, limMsg->type,
                limIsSystemInScanState(pMac),
                pMac->lim.gLimSmeState, pMac->lim.gLimMlmState,
@@ -1467,7 +1457,7 @@
            pMac->lim.gLimDeferredMsgQ.size, pMac->lim.gLimDeferredMsgQ.read,
            msg->type);)
 
-   PELOG1(limLog(pMac, LOG1, FL("DQ msg -- scan %d, sme %d, mlme %d, addts %d\n"),
+   PELOG1(limLog(pMac, LOG1, FL("DQ msg -- scan %d, global sme %d, global mlme %d, addts %d\n"),
            limIsSystemInScanState(pMac),
            pMac->lim.gLimSmeState, pMac->lim.gLimMlmState,
            pMac->lim.gLimAddtsSent);)
@@ -1898,7 +1888,7 @@
     {
         //We are 11N. we need to protect from 11A and Ht20. we don't need any other protection in 5 GHZ.
         //HT20 case is common between both the bands and handled down as common code.
-        if(true == psessionEntry->htCapabality)
+        if(true == psessionEntry->htCapability)
         {
             //we are 11N and 11A station is joining.        
             //protection from 11A required.            
@@ -1915,7 +1905,7 @@
 
         //We are 11G. Check if we need protection from 11b Stations.
         if ((phyMode == WNI_CFG_PHY_MODE_11G) &&
-              (false == psessionEntry->htCapabality))
+              (false == psessionEntry->htCapability))
         {
 
             if (pStaDs->erpEnabled== eHAL_CLEAR)
@@ -1928,7 +1918,7 @@
         }
 
         //HT station.
-        if (true == psessionEntry->htCapabality)
+        if (true == psessionEntry->htCapability)
         {
             //check if we need protection from 11b station
             if ((pStaDs->erpEnabled == eHAL_CLEAR) &&
@@ -1953,7 +1943,7 @@
     }
 
     //we are HT and HT station is joining. This code is common for both the bands.
-    if((true == psessionEntry->htCapabality) &&
+    if((true == psessionEntry->htCapability) &&
         (true == pStaDs->mlmStaContext.htCapability))
     {
         if(!pStaDs->htGreenfield)
@@ -2144,18 +2134,21 @@
     tpDphHashNode    pStaDs;
     tANI_U32 phyMode;
     tANI_U32 val;
-    tANI_U32 cShortSlot;
     tANI_U16 i;
 
     // check whether to enable protection or not
     pStaDs = dphLookupHashEntry(pMac, peerMacAddr, &tmpAid, &psessionEntry->dph.dphHashTable);
     limGetPhyMode(pMac, &phyMode, psessionEntry);
 
+    /* Only in case of softap in 11g mode, slot time might change depending on the STA being added. In 11a case, it should
+     * be always 1 and in 11b case, it should be always 0
+     */
     if (pStaDs != NULL && phyMode == WNI_CFG_PHY_MODE_11G)
     {
-        if (wlan_cfgGetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, &cShortSlot) != eSIR_SUCCESS)
-            limLog(pMac, LOGP, FL("unable to get short slot time\n"));
-
+        /* Only when the new STA has short slot time disabled, we need to change softap's overall slot time settings
+         * else the default for softap is always short slot enabled. When the last long slot STA leaves softAP, we take care of
+         * it in limDecideShortSlot
+         */
         if (pStaDs->shortSlotTimeEnabled == eHAL_CLEAR)
         {
             PELOG1(limLog(pMac, LOG1, FL("Short Slot Time is not enabled in Assoc Req from "));
@@ -2234,27 +2227,28 @@
             wlan_cfgGetInt(pMac, WNI_CFG_11G_SHORT_SLOT_TIME_ENABLED, &val);
 
 #ifdef WLAN_SOFTAP_FEATURE
+            /* Here we check if we are AP role and short slot enabled (both admin and oper modes) but we have atleast one STA connected with
+             * only long slot enabled, we need to change our beacon/pb rsp to broadcast short slot disabled
+             */
             if ( (psessionEntry->limSystemRole == eLIM_AP_ROLE) && 
-                 (val && psessionEntry->gLimNoShortSlotParams.numNonShortSlotSta && cShortSlot))
+                 (val && psessionEntry->gLimNoShortSlotParams.numNonShortSlotSta && psessionEntry->shortSlotTimeSupported))
             {
                 // enable long slot time
                 pBeaconParams->fShortSlotTime = false;
                 pBeaconParams->paramChangeBitmap |= PARAM_SHORT_SLOT_TIME_CHANGED;
                 PELOG1(limLog(pMac, LOG1, FL("Disable short slot time. Enable long slot time.\n"));)
-                if (cfgSetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, false) != eSIR_SUCCESS)
-                    PELOGE(limLog(pMac, LOGE,   FL("could not update short slot time at CFG\n"));)
+                psessionEntry->shortSlotTimeSupported = false;
             }
             else if ( psessionEntry->limSystemRole != eLIM_AP_ROLE)
 #endif            
             {
-                if (val && pMac->lim.gLimNoShortSlotParams.numNonShortSlotSta && cShortSlot)
+                if (val && pMac->lim.gLimNoShortSlotParams.numNonShortSlotSta && psessionEntry->shortSlotTimeSupported)
                 {
                     // enable long slot time
                     pBeaconParams->fShortSlotTime = false;
                     pBeaconParams->paramChangeBitmap |= PARAM_SHORT_SLOT_TIME_CHANGED;
                     PELOG1(limLog(pMac, LOG1, FL("Disable short slot time. Enable long slot time.\n"));)
-                    if (cfgSetInt(pMac, WNI_CFG_SHORT_SLOT_TIME, false) != eSIR_SUCCESS)
-                        PELOGE(limLog(pMac, LOGE,   FL("could not update short slot time at CFG\n"));)
+                    psessionEntry->shortSlotTimeSupported = false;
                  }
             }
         }
@@ -2414,7 +2408,7 @@
             }
         }
         //following code block is only for HT station.
-        if((psessionEntry->htCapabality) &&
+        if((psessionEntry->htCapability) &&
               (pBeaconStruct->HTInfo.present))
         {
             tDot11fIEHTInfo htInfo = pBeaconStruct->HTInfo;
@@ -2457,7 +2451,7 @@
     }
 
     //protection related factors other than HT operating mode. Applies to 2.4 GHZ as well as 5 GHZ.
-    if((psessionEntry->htCapabality) &&
+    if((psessionEntry->htCapability) &&
           (pBeaconStruct->HTInfo.present))
     {
         tDot11fIEHTInfo htInfo = pBeaconStruct->HTInfo;
@@ -2492,7 +2486,7 @@
     if(SIR_BAND_5_GHZ == rfBand)
     {
         //we are HT capable.
-        if((true == psessionEntry->htCapabality) &&
+        if((true == psessionEntry->htCapability) &&
             (pBeaconStruct->HTInfo.present))
         {
             //we are HT capable, AP's HT OPMode is mixed / overlap legacy ==> need protection from 11A.        
@@ -2542,7 +2536,7 @@
          }
 
         //following code block is only for HT station.
-        if((psessionEntry->htCapabality) &&
+        if((psessionEntry->htCapability) &&
               (pBeaconStruct->HTInfo.present))
         {
           
@@ -2586,7 +2580,7 @@
     }
 
     //following code block is only for HT station. ( 2.4 GHZ as well as 5 GHZ)
-    if((psessionEntry->htCapabality) &&
+    if((psessionEntry->htCapability) &&
           (pBeaconStruct->HTInfo.present))
     {
         tDot11fIEHTInfo htInfo = pBeaconStruct->HTInfo;    
@@ -2648,7 +2642,7 @@
 {
     tpPESession psessionEntry = NULL;
 #if defined(ANI_PRODUCT_TYPE_CLIENT) || defined(ANI_AP_CLIENT_SDK)
-    tANI_U8    channel = pMac->lim.gLimChannelSwitch.primaryChannel;   // This is received and stored from channelSwitch Action frame
+    tANI_U8    channel; // This is received and stored from channelSwitch Action frame
    
     if((psessionEntry = peFindSessionBySessionId(pMac, pMac->lim.limTimers.gLimChannelSwitchTimer.sessionId))== NULL) 
     {
@@ -2661,6 +2655,7 @@
         PELOGW(limLog(pMac, LOGW, "Channel switch can be done only in STA role, Current Role = %d\n", psessionEntry->limSystemRole);)
         return;
     }
+    channel = psessionEntry->gLimChannelSwitch.primaryChannel;
     /*
      *  This potentially can create issues if the function tries to set
      * channel while device is in power-save, hence putting an extra check
@@ -2673,10 +2668,10 @@
     }
          
     // Restore Channel Switch parameters to default
-    pMac->lim.gLimChannelSwitch.switchTimeoutValue = 0;
+    psessionEntry->gLimChannelSwitch.switchTimeoutValue = 0;
 
     /* Channel-switch timeout has occurred. reset the state */
-    pMac->lim.gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_END;
+    psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_END;
     
     /* Check if the AP is switching to a channel that we support.
      * Else, just don't bother to switch. Indicate HDD to look for a 
@@ -2700,28 +2695,28 @@
                         eSIR_MAC_UNSPEC_FAILURE_REASON);
         return;
     }
-    switch(pMac->lim.gLimChannelSwitch.state)
+    switch(psessionEntry->gLimChannelSwitch.state)
     {
         case eLIM_CHANNEL_SWITCH_PRIMARY_ONLY:
             PELOGW(limLog(pMac, LOGW, FL("CHANNEL_SWITCH_PRIMARY_ONLY \n"));)
-            limSwitchPrimaryChannel(pMac, pMac->lim.gLimChannelSwitch.primaryChannel,psessionEntry);
-            pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_IDLE;
+            limSwitchPrimaryChannel(pMac, psessionEntry->gLimChannelSwitch.primaryChannel,psessionEntry);
+            psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_IDLE;
             break;
 
         case eLIM_CHANNEL_SWITCH_SECONDARY_ONLY:
             PELOGW(limLog(pMac, LOGW, FL("CHANNEL_SWITCH_SECONDARY_ONLY \n"));)
-            limSwitchPrimarySecondaryChannel(pMac,
+            limSwitchPrimarySecondaryChannel(pMac, psessionEntry,
                                              psessionEntry->currentOperChannel,
-                                             pMac->lim.gLimChannelSwitch.secondarySubBand);
-            pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_IDLE;
+                                             psessionEntry->gLimChannelSwitch.secondarySubBand);
+            psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_IDLE;
             break;
 
         case eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY:
             PELOGW(limLog(pMac, LOGW, FL("CHANNEL_SWITCH_PRIMARY_AND_SECONDARY\n"));)
-            limSwitchPrimarySecondaryChannel(pMac,
-                                             pMac->lim.gLimChannelSwitch.primaryChannel,
-                                             pMac->lim.gLimChannelSwitch.secondarySubBand);
-            pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_IDLE;
+            limSwitchPrimarySecondaryChannel(pMac, psessionEntry,
+                                             psessionEntry->gLimChannelSwitch.primaryChannel,
+                                             psessionEntry->gLimChannelSwitch.secondarySubBand);
+            psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_IDLE;
             break;
 
         case eLIM_CHANNEL_SWITCH_IDLE:
@@ -2734,7 +2729,7 @@
             return;  /* Please note, this is 'return' and not 'break' */
     }
 #endif
-    }
+}
 
 /**
  * limUpdateChannelSwitch()
@@ -2754,18 +2749,11 @@
 {
 
     tANI_U16                         beaconPeriod;
-    tANI_U32                         val;
     tChannelSwitchPropIEStruct       *pPropChnlSwitch;
     tDot11fIEChanSwitchAnn           *pChnlSwitch;
 
  
-
-    if (wlan_cfgGetInt(pMac, WNI_CFG_BEACON_INTERVAL, &val) != eSIR_SUCCESS)
-    {
-        limLog(pMac, LOGP, FL("Could not retrieve Beacon interval\n"));
-        return;
-    }
-    beaconPeriod = (tANI_U16) val;
+    beaconPeriod = psessionEntry->beaconParams.beaconInterval;
 
     /* STA either received proprietary channel switch IE or 802.11h
      * standard channel switch IE.
@@ -2776,53 +2764,42 @@
 
         /* Add logic to determine which change this is:  */
         /*      primary, secondary, both.  For now assume both. */
-        pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
-        pMac->lim.gLimChannelSwitch.primaryChannel = pPropChnlSwitch->primaryChannel;
-        pMac->lim.gLimChannelSwitch.secondarySubBand = (tAniCBSecondaryMode)pPropChnlSwitch->subBand;
-        pMac->lim.gLimChannelSwitch.switchCount = pPropChnlSwitch->channelSwitchCount;
-        pMac->lim.gLimChannelSwitch.switchTimeoutValue =
+        psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
+        psessionEntry->gLimChannelSwitch.primaryChannel = pPropChnlSwitch->primaryChannel;
+        psessionEntry->gLimChannelSwitch.secondarySubBand = (ePhyChanBondState)pPropChnlSwitch->subBand;
+        psessionEntry->gLimChannelSwitch.switchCount = pPropChnlSwitch->channelSwitchCount;
+        psessionEntry->gLimChannelSwitch.switchTimeoutValue =
                  SYS_MS_TO_TICKS(beaconPeriod)* (pPropChnlSwitch->channelSwitchCount);
-        pMac->lim.gLimChannelSwitch.switchMode = pPropChnlSwitch->mode;
+        psessionEntry->gLimChannelSwitch.switchMode = pPropChnlSwitch->mode;
     }
     else
     {
        pChnlSwitch = &(pBeacon->channelSwitchIE);
-       pMac->lim.gLimChannelSwitch.primaryChannel = pChnlSwitch->newChannel;
-       pMac->lim.gLimChannelSwitch.switchCount = pChnlSwitch->switchCount;
-       pMac->lim.gLimChannelSwitch.switchTimeoutValue =
+       psessionEntry->gLimChannelSwitch.primaryChannel = pChnlSwitch->newChannel;
+       psessionEntry->gLimChannelSwitch.switchCount = pChnlSwitch->switchCount;
+       psessionEntry->gLimChannelSwitch.switchTimeoutValue =
                  SYS_MS_TO_TICKS(beaconPeriod)* (pChnlSwitch->switchCount);
-       pMac->lim.gLimChannelSwitch.switchMode = pChnlSwitch->switchMode; 
+       psessionEntry->gLimChannelSwitch.switchMode = pChnlSwitch->switchMode; 
 
         /* Only primary channel switch element is present */
-        pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_ONLY;
-        pMac->lim.gLimChannelSwitch.secondarySubBand = eANI_CB_SECONDARY_NONE;
+        psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_ONLY;
+        psessionEntry->gLimChannelSwitch.secondarySubBand = PHY_SINGLE_CHANNEL_CENTERED;
 
         /* Do not bother to look and operate on extended channel switch element
          * if our own channel-bonding state is not enabled
          */
-        if(GET_CB_ADMIN_STATE(pMac->lim.gCbState))
+        if (psessionEntry->htSupportedChannelWidthSet)
         {
             if (pBeacon->extChannelSwitchPresent)
             {
-                switch(pBeacon->extChannelSwitchIE.secondaryChannelOffset)
+                if ((pBeacon->extChannelSwitchIE.secondaryChannelOffset == PHY_DOUBLE_CHANNEL_LOW_PRIMARY) || 
+                    (pBeacon->extChannelSwitchIE.secondaryChannelOffset == PHY_DOUBLE_CHANNEL_HIGH_PRIMARY))
                 {
-                    case eHT_SECONDARY_CHANNEL_OFFSET_UP:
-                        pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
-                        pMac->lim.gLimChannelSwitch.secondarySubBand = eANI_CB_SECONDARY_UP;
-                        break;
-
-                    case eHT_SECONDARY_CHANNEL_OFFSET_DOWN:
-                        pMac->lim.gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
-                        pMac->lim.gLimChannelSwitch.secondarySubBand = eANI_CB_SECONDARY_DOWN;
-                        break;
-
-                    case eHT_SECONDARY_CHANNEL_OFFSET_NONE:
-                    default:
-                        /* Nothing to be done here as of now!! */
-                        break;
+                    psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
+                    psessionEntry->gLimChannelSwitch.secondarySubBand = pBeacon->extChannelSwitchIE.secondaryChannelOffset;
                 }
-           }
-       }
+            }
+        }
     }
 
     if (eSIR_SUCCESS != limStartChannelSwitch(pMac, psessionEntry))
@@ -2831,11 +2808,12 @@
     }
 
     limLog(pMac, LOGW,
-        FL("primary chl %d, subband %d, count  %d (%d ticks) \n"),
-        pMac->lim.gLimChannelSwitch.primaryChannel,
-        pMac->lim.gLimChannelSwitch.secondarySubBand,
-        pMac->lim.gLimChannelSwitch.switchCount,
-        pMac->lim.gLimChannelSwitch.switchTimeoutValue);
+        FL("session %d primary chl %d, subband %d, count  %d (%d ticks) \n"),
+        psessionEntry->peSessionId,
+        psessionEntry->gLimChannelSwitch.primaryChannel,
+        psessionEntry->gLimChannelSwitch.secondarySubBand,
+        psessionEntry->gLimChannelSwitch.switchCount,
+        psessionEntry->gLimChannelSwitch.switchTimeoutValue);
     return;
 }
 
@@ -2864,7 +2842,7 @@
         return;
         
     PELOGW(limLog(pMac, LOGW, FL("Received a beacon without channel switch IE\n"));)
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_CHANNEL_SWITCH_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, psessionEntry->peSessionId, eLIM_CHANNEL_SWITCH_TIMER));
 
     if (tx_timer_deactivate(&pMac->lim.limTimers.gLimChannelSwitchTimer) != eSIR_SUCCESS)
     {
@@ -2894,17 +2872,17 @@
     if (psessionEntry->limSystemRole != eLIM_STA_ROLE)
         return;
 
-    if (pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_BEGIN) 
+    if (psessionEntry->gLimSpecMgmt.quietState == eLIM_QUIET_BEGIN) 
     {
-         MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_QUIET_TIMER));
+         MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, psessionEntry->peSessionId, eLIM_QUIET_TIMER));
         if (tx_timer_deactivate(&pMac->lim.limTimers.gLimQuietTimer) != TX_SUCCESS)
         {
             PELOGE(limLog(pMac, LOGE, FL("tx_timer_deactivate failed\n"));)
         }
     }
-    else if (pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING)
+    else if (psessionEntry->gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING)
     {
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_QUIET_BSS_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, psessionEntry->peSessionId, eLIM_QUIET_BSS_TIMER));
         if (tx_timer_deactivate(&pMac->lim.limTimers.gLimQuietBssTimer) != TX_SUCCESS)
         {
             PELOGE(limLog(pMac, LOGE, FL("tx_timer_deactivate failed\n"));)
@@ -2913,14 +2891,14 @@
          * If the channel switch is already running in silent mode, dont resume the
          * transmission. Channel switch timer when timeout, transmission will be resumed.
          */
-        if(!((pMac->lim.gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING) &&
-                (pMac->lim.gLimChannelSwitch.switchMode == eSIR_CHANSW_MODE_SILENT)))
+        if(!((psessionEntry->gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING) &&
+                (psessionEntry->gLimChannelSwitch.switchMode == eSIR_CHANSW_MODE_SILENT)))
         {
             limFrameTransmissionControl(pMac, eLIM_TX_ALL, eLIM_RESUME_TX);
-            limRestorePreQuietState(pMac);
+            limRestorePreQuietState(pMac, psessionEntry);
         }
     }
-    pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
+    psessionEntry->gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
 #endif
 }
 
@@ -2955,25 +2933,40 @@
  */
 void limProcessQuietTimeout(tpAniSirGlobal pMac)
 {
-#ifdef GEN6_TODO
     //fetch the sessionEntry based on the sessionId
     //priority - MEDIUM
-    tpPESession sessionEntry;
+    tpPESession psessionEntry;
 
-    if((sessionEntry = peFindSessionBySessionId(pMac, pMac->lim.limTimers.gLimQuietTimer.sessionId))== NULL) 
+    if((psessionEntry = peFindSessionBySessionId(pMac, pMac->lim.limTimers.gLimQuietTimer.sessionId))== NULL) 
     {
-        limLog(pMac, LOGP,FL("Session Does not exist for given sessionID\n"));
+        limLog(pMac, LOGE,FL("Session Does not exist for given sessionID\n"));
         return;
     }
-#endif
 
-  PELOG1(limLog(pMac, LOG1, FL("quietState = %d\n"), pMac->lim.gLimSpecMgmt.quietState);)
-  switch( pMac->lim.gLimSpecMgmt.quietState )
+  PELOG1(limLog(pMac, LOG1, FL("quietState = %d\n"), psessionEntry->gLimSpecMgmt.quietState);)
+  switch( psessionEntry->gLimSpecMgmt.quietState )
   {
     case eLIM_QUIET_BEGIN:
       // Time to Stop data traffic for quietDuration
-      limDeactivateAndChangeTimer(pMac, eLIM_QUIET_BSS_TIMER);
-      MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_QUIET_BSS_TIMER));
+      //limDeactivateAndChangeTimer(pMac, eLIM_QUIET_BSS_TIMER);
+      if (TX_SUCCESS !=
+      tx_timer_deactivate(&pMac->lim.limTimers.gLimQuietBssTimer))
+      {
+          limLog( pMac, LOGE,
+            FL("Unable to de-activate gLimQuietBssTimer! Will attempt to activate anyway...\n"));
+      }
+
+      // gLimQuietDuration appears to be in units of ticks
+      // Use it as is
+      if (TX_SUCCESS !=
+          tx_timer_change( &pMac->lim.limTimers.gLimQuietBssTimer,
+            psessionEntry->gLimSpecMgmt.quietDuration,
+            0))
+      {
+          limLog( pMac, LOGE,
+            FL("Unable to change gLimQuietBssTimer! Will still attempt to activate anyway...\n"));
+      }
+      MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_QUIET_BSS_TIMER));
 #ifdef GEN6_TODO
         /* revisit this piece of code to assign the appropriate sessionId below
          * priority - HIGH
@@ -2989,7 +2982,7 @@
       else
       {
         // Transition to eLIM_QUIET_RUNNING
-        pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_RUNNING;
+        psessionEntry->gLimSpecMgmt.quietState = eLIM_QUIET_RUNNING;
 
         /* If we have sta bk scan triggered and trigger bk scan actually started successfully, */
         /* print message, otherwise, stop data traffic and stay quiet */
@@ -3007,7 +3000,7 @@
 
            limLog( pMac, LOG2,
                 FL("Quiet BSS: STA shutting down for %d ticks\n"),
-                pMac->lim.gLimSpecMgmt.quietDuration );
+                psessionEntry->gLimSpecMgmt.quietDuration );
         }
       }
       break;
@@ -3063,57 +3056,57 @@
  */
 void limProcessQuietBssTimeout( tpAniSirGlobal pMac )
 {
-    tpPESession sessionEntry;
+    tpPESession psessionEntry;
 
-    if((sessionEntry = peFindSessionBySessionId(pMac, pMac->lim.limTimers.gLimQuietBssTimer.sessionId))== NULL) 
+    if((psessionEntry = peFindSessionBySessionId(pMac, pMac->lim.limTimers.gLimQuietBssTimer.sessionId))== NULL) 
     {
         limLog(pMac, LOGP,FL("Session Does not exist for given sessionID\n"));
         return;
     }
 
-  PELOG1(limLog(pMac, LOG1, FL("quietState = %d\n"), pMac->lim.gLimSpecMgmt.quietState);)
-  if (eLIM_AP_ROLE == sessionEntry->limSystemRole)
+  PELOG1(limLog(pMac, LOG1, FL("quietState = %d\n"), psessionEntry->gLimSpecMgmt.quietState);)
+  if (eLIM_AP_ROLE == psessionEntry->limSystemRole)
   {
 #ifdef ANI_PRODUCT_TYPE_AP
     if (!pMac->sys.gSysEnableLearnMode)
     {
-        pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_END;
+        psessionEntry->gLimSpecMgmt.quietState = eLIM_QUIET_END;
         return;
     }
 
-    if( eLIM_QUIET_INIT == pMac->lim.gLimSpecMgmt.quietState )
+    if( eLIM_QUIET_INIT == psessionEntry->gLimSpecMgmt.quietState )
     {
         //QuietCount = 0 is reserved
-        pMac->lim.gLimSpecMgmt.quietCount  = 2;
+        psessionEntry->gLimSpecMgmt.quietCount  = 2;
         // In ms.
-        pMac->lim.gLimSpecMgmt.quietDuration = 
+        psessionEntry->gLimSpecMgmt.quietDuration = 
         pMac->lim.gpLimMeasReq->measDuration.shortChannelScanDuration;
         // TU is in multiples of 1024 (2^10) us.
-        pMac->lim.gLimSpecMgmt.quietDuration_TU = 
-            SYS_MS_TO_TU(pMac->lim.gLimSpecMgmt.quietDuration); 
+        psessionEntry->gLimSpecMgmt.quietDuration_TU = 
+            SYS_MS_TO_TU(psessionEntry->gLimSpecMgmt.quietDuration); 
         // Transition to eLIM_QUIET_BEGIN
         limLog( pMac, LOG2, FL("Quiet BSS state = eLIM_QUIET_BEGIN\n"));
-        pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_BEGIN;
+        psessionEntry->gLimSpecMgmt.quietState = eLIM_QUIET_BEGIN;
     }
 #endif
   }
   else
   {
     // eLIM_STA_ROLE
-    switch( pMac->lim.gLimSpecMgmt.quietState )
+    switch( psessionEntry->gLimSpecMgmt.quietState )
     {
       case eLIM_QUIET_RUNNING:
         // Transition to eLIM_QUIET_INIT
-        pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
+        psessionEntry->gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
 
         if( !pMac->lim.gLimTriggerBackgroundScanDuringQuietBss || (glimTriggerBackgroundScanDuringQuietBss_Status == eSIR_FALSE) )
         {
           // Resume data traffic only if channel switch is not running in silent mode.
-          if (!((pMac->lim.gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING) &&
-                  (pMac->lim.gLimChannelSwitch.switchMode == eSIR_CHANSW_MODE_SILENT)))
+          if (!((psessionEntry->gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING) &&
+                  (psessionEntry->gLimChannelSwitch.switchMode == eSIR_CHANSW_MODE_SILENT)))
           {
               limFrameTransmissionControl(pMac, eLIM_TX_ALL, eLIM_RESUME_TX);
-              limRestorePreQuietState(pMac);
+              limRestorePreQuietState(pMac, psessionEntry);
           }
       
           /* Reset status flag */
@@ -3141,8 +3134,8 @@
         PELOG2(limLog(pMac, LOG2, FL("Quiet state not in RUNNING\n"));)
         /* If the quiet period has ended, then resume the frame transmission */
         limFrameTransmissionControl(pMac, eLIM_TX_ALL, eLIM_RESUME_TX);
-        limRestorePreQuietState(pMac);
-        pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
+        limRestorePreQuietState(pMac, psessionEntry);
+        psessionEntry->gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
         break;
 
       default:
@@ -3244,8 +3237,8 @@
         return;
     
    PELOG1(limLog(pMac, LOG1, FL("Quiet state = %d, Quiet Count = %d\n"),
-        pMac->lim.gLimSpecMgmt.quietState, pQuietIE->count);)
-    if (!pMac->lim.gLim11hEnable)
+        psessionEntry->gLimSpecMgmt.quietState, pQuietIE->count);)
+    if (!psessionEntry->lim11hEnable)
         return;
     // The (Titan) AP is requesting this (Titan) STA to
     // honor this Quiet IE REQ and shut-off Tx/Rx. If we're
@@ -3267,26 +3260,26 @@
         beaconPeriod = (tANI_U16) val;
 
      /* (qd * 2^10)/1000 */
-    pMac->lim.gLimSpecMgmt.quietDuration_TU = pQuietIE->duration;
+    psessionEntry->gLimSpecMgmt.quietDuration_TU = pQuietIE->duration;
     // The STA needs to shut-off Tx/Rx "for" this interval (in milliSeconds)
     /* Need to convert from TU to system TICKS */
-    pMac->lim.gLimSpecMgmt.quietDuration = SYS_MS_TO_TICKS(
-                           SYS_TU_TO_MS(pMac->lim.gLimSpecMgmt.quietDuration_TU));
+    psessionEntry->gLimSpecMgmt.quietDuration = SYS_MS_TO_TICKS(
+                           SYS_TU_TO_MS(psessionEntry->gLimSpecMgmt.quietDuration_TU));
 
-    if (pMac->lim.gLimSpecMgmt.quietDuration_TU == 0)
+    if (psessionEntry->gLimSpecMgmt.quietDuration_TU == 0)
     {
         PELOG1(limLog(pMac, LOG1, FL("Zero duration in quiet IE\n"));)
         return;
     }
     
     // The STA needs to shut-off Tx/Rx "after" this interval
-    pMac->lim.gLimSpecMgmt.quietTimeoutValue =
+    psessionEntry->gLimSpecMgmt.quietTimeoutValue =
               (beaconPeriod * pQuietIE->count) + pQuietIE->offset;
 
     limLog( pMac, LOG2,
         FL( "STA shut-off will begin in %d milliseconds & last for %d ticks\n"),
-        pMac->lim.gLimSpecMgmt.quietTimeoutValue,
-        pMac->lim.gLimSpecMgmt.quietDuration );
+        psessionEntry->gLimSpecMgmt.quietTimeoutValue,
+        psessionEntry->gLimSpecMgmt.quietDuration );
 
     /* Disable, Stop background scan if enabled and running */
     limDeactivateAndChangeTimer(pMac, eLIM_BACKGROUND_SCAN_TIMER);
@@ -3308,7 +3301,7 @@
         }
         else
         {
-            limRestorePreQuietState(pMac);
+            limRestorePreQuietState(pMac, psessionEntry);
         }
     }
     else
@@ -3319,7 +3312,7 @@
     }
     
     // Transition to eLIM_QUIET_BEGIN
-    pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_BEGIN;
+    psessionEntry->gLimSpecMgmt.quietState = eLIM_QUIET_BEGIN;
 #endif
 }
 
@@ -3348,17 +3341,29 @@
     // First, de-activate Timer, if its already active
     limCancelDot11hQuiet(pMac, psessionEntry);
     
-    limDeactivateAndChangeTimer(pMac, eLIM_QUIET_TIMER);
-    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_QUIET_TIMER));
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, sessionId, eLIM_QUIET_TIMER));
+    if( TX_SUCCESS != tx_timer_deactivate(&pMac->lim.limTimers.gLimQuietTimer))
+    {
+        limLog( pMac, LOGE,
+            FL( "Unable to deactivate gLimQuietTimer! Will still attempt to re-activate anyway...\n" ));
+    }
+
+    // Set the NEW timeout value, in ticks
+    if( TX_SUCCESS != tx_timer_change( &pMac->lim.limTimers.gLimQuietTimer,
+                      SYS_MS_TO_TICKS(psessionEntry->gLimSpecMgmt.quietTimeoutValue), 0))
+    {
+        limLog( pMac, LOGE,
+            FL( "Unable to change gLimQuietTimer! Will still attempt to re-activate anyway...\n" ));
+    }
     
     pMac->lim.limTimers.gLimQuietTimer.sessionId = sessionId;
     if( TX_SUCCESS != tx_timer_activate(&pMac->lim.limTimers.gLimQuietTimer))
     {
         limLog( pMac, LOGE,
             FL("Unable to activate gLimQuietTimer! STA cannot honor Quiet BSS!\n"));
-        limRestorePreQuietState(pMac);
+        limRestorePreQuietState(pMac, psessionEntry);
 
-        pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
+        psessionEntry->gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
         return;
     }
 #endif
@@ -3468,59 +3473,6 @@
     schEdcaProfileUpdate(pMac, psessionEntry);
 }
 
-/** -------------------------------------------------------------
-\fn limGetHtCbAdminState
-\brief provides CB Admin state
-\param     tpAniSirGlobal    pMac
-\param     tDot11fIEHTCaps htCaps,
-\param     tANI_U8 *titanHtCaps 
-\return     none
-  -------------------------------------------------------------*/
-void limGetHtCbAdminState( tpAniSirGlobal pMac,
-        tDot11fIEHTCaps htCaps,
-        tANI_U8 *titanHtCaps )
-{
-    // Extract secondary channel info wrt Channel Bonding
-    if(htCaps.supportedChannelWidthSet)
-        SME_SET_CB_ADMIN_STATE( *titanHtCaps, eHAL_SET );    
-    else
-        SME_SET_CB_ADMIN_STATE( *titanHtCaps, eHAL_CLEAR);
-    
-
-  // And the final TITAN HT capabilities bitmap is...
-  limLog( pMac, LOG2,
-      FL("TITAN HT capabilities in BSS Description = %1d\n"),
-        *titanHtCaps);
-}
-/** -------------------------------------------------------------
-\fn limGetHtCbOpState
-\brief provides CB operational state
-\param     tpAniSirGlobal    pMac
-\param     tDot11fIEHTInfo htInfo,
-\param     tANI_U8 *titanHtCaps
-\return     none
-  -------------------------------------------------------------*/
-void limGetHtCbOpState( tpAniSirGlobal pMac,
-        tDot11fIEHTInfo htInfo,
-        tANI_U8 *titanHtCaps )
-{
-    // Extract secondary channel info wrt Channel Bonding
-    if(htInfo.secondaryChannelOffset)
-    {
-      if(PHY_DOUBLE_CHANNEL_LOW_PRIMARY == htInfo.secondaryChannelOffset)
-          SME_SET_CB_OPER_STATE( *titanHtCaps,
-            eANI_CB_SECONDARY_UP );
-      else if(PHY_DOUBLE_CHANNEL_HIGH_PRIMARY == htInfo.secondaryChannelOffset)
-          SME_SET_CB_OPER_STATE( *titanHtCaps,
-            eANI_CB_SECONDARY_DOWN );
-    }
-
-  // And the final TITAN HT capabilities bitmap is...
-  limLog( pMac, LOG2,
-      FL("TITAN HT capabilities in BSS Description = %1d\n"),
-        *titanHtCaps);
-}
-
 /**
  * limSwitchChannelCback()
  *
@@ -3541,9 +3493,6 @@
    tSirMsgQ    mmhMsg = {0};
    tSirSmeSwitchChannelInd *pSirSmeSwitchChInd;
 
-   PELOG1(limLog(pMac, LOG1,FL("Sending message %s with reasonCode %s\n"),
-                    limMsgStr(msgType), limResultCodeStr(resultCode));)
-
    psessionEntry->currentOperChannel = psessionEntry->currentReqChannel; 
    
    /* We need to restore pre-channelSwitch state on the STA */
@@ -3562,14 +3511,14 @@
   
    pSirSmeSwitchChInd->messageType = eWNI_SME_SWITCH_CHL_REQ;
    pSirSmeSwitchChInd->length = sizeof(tSirSmeSwitchChannelInd);
-   pSirSmeSwitchChInd->newChannelId = pMac->lim.gLimChannelSwitch.primaryChannel;
+   pSirSmeSwitchChInd->newChannelId = psessionEntry->gLimChannelSwitch.primaryChannel;
    pSirSmeSwitchChInd->sessionId = psessionEntry->smeSessionId;
    //BSS ID
    palCopyMemory( pMac->hHdd, pSirSmeSwitchChInd->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
    mmhMsg.bodyptr = pSirSmeSwitchChInd;
    mmhMsg.bodyval = 0;
    
-   MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+   MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
    
 #if defined( FEATURE_WLAN_INTEGRATED_SOC )
    SysProcessMmhMsg(pMac, &mmhMsg);
@@ -3611,7 +3560,7 @@
     pMac->lim.gpchangeChannelData = NULL;
 
 #if defined WLAN_FEATURE_VOWIFI  
-    limSendSwitchChnlParams(pMac, newChannel, eHT_SECONDARY_CHANNEL_OFFSET_NONE,
+    limSendSwitchChnlParams(pMac, newChannel, PHY_SINGLE_CHANNEL_CENTERED,
                                                    psessionEntry->maxTxPower, psessionEntry->peSessionId);
 #else
     if(wlan_cfgGetInt(pMac, WNI_CFG_LOCAL_POWER_CONSTRAINT, &localPwrConstraint) != eSIR_SUCCESS)
@@ -3619,7 +3568,7 @@
         limLog( pMac, LOGP, FL( "Unable to read Local Power Constraint from cfg\n" ));
         return;
     }
-    limSendSwitchChnlParams(pMac, newChannel, eHT_SECONDARY_CHANNEL_OFFSET_NONE,
+    limSendSwitchChnlParams(pMac, newChannel, PHY_SINGLE_CHANNEL_CENTERED,
                                                    (tPowerdBm)localPwrConstraint, psessionEntry->peSessionId);
 #endif
     return;
@@ -3644,13 +3593,12 @@
  *                       - eANI_CB_SECONDARY_DOWN
  * @return NONE
  */
-void limSwitchPrimarySecondaryChannel(tpAniSirGlobal pMac, tANI_U8 newChannel, tAniCBSecondaryMode subband)
+void limSwitchPrimarySecondaryChannel(tpAniSirGlobal pMac, tpPESession psessionEntry, tANI_U8 newChannel, ePhyChanBondState subband)
 {
 #if !defined WLAN_FEATURE_VOWIFI  
     tANI_U32 localPwrConstraint;
 #endif
 
-    tpPESession psessionEntry =  &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry?????
 #if !defined WLAN_FEATURE_VOWIFI  
     if(wlan_cfgGetInt(pMac, WNI_CFG_LOCAL_POWER_CONSTRAINT, &localPwrConstraint) != eSIR_SUCCESS) {
         limLog( pMac, LOGP, FL( "Unable to get Local Power Constraint from cfg\n" ));
@@ -3658,95 +3606,36 @@
     }
 #endif
 
-    switch(subband)
-    {
-        case eANI_CB_SECONDARY_NONE:
-            PELOGW(limLog(pMac, LOGW, FL("Disable CB SECONDARY\n"));)
-            /* If CB was on, turn it off, otherwise, do nothing */
-            if(GET_CB_OPER_STATE(pMac->lim.gCbState))
-            {
-                /* Turn off CB in HW and SW.  SW and HW cbstate must match!  Otherwise, will hit ASSERT case */
-                SET_CB_OPER_STATE(pMac->lim.gCbState, eHAL_CLEAR);
-                /* Clean up station entry if we're not STA */
-            }
-            if (cfgSetInt(pMac, WNI_CFG_CB_SECONDARY_CHANNEL_STATE, WNI_CFG_CB_SECONDARY_CHANNEL_STATE_NONE) != eSIR_SUCCESS)
-                limLog(pMac, LOGP, FL("cfgSetInt WNI_CFG_CB_SECONDARY_CHANNEL_STATE failed \n"));
-
 #if defined WLAN_FEATURE_VOWIFI  
-            limSendSwitchChnlParams(pMac, newChannel, eHT_SECONDARY_CHANNEL_OFFSET_NONE, psessionEntry->maxTxPower, psessionEntry->peSessionId);
+                limSendSwitchChnlParams(pMac, newChannel, subband, psessionEntry->maxTxPower, psessionEntry->peSessionId);
 #else
-            //Send Message to HAL to update the channel
-            limSendSwitchChnlParams(pMac, newChannel, eHT_SECONDARY_CHANNEL_OFFSET_NONE, (tPowerdBm)localPwrConstraint, psessionEntry->peSessionId);
+                limSendSwitchChnlParams(pMac, newChannel, subband, (tPowerdBm)localPwrConstraint, psessionEntry->peSessionId);
 #endif
-            break;
 
-        case eANI_CB_SECONDARY_UP:
-            PELOGW(limLog(pMac, LOGW, FL("Switch CB SECONDARY to UP.\n"));)
-            SET_CB_SEC_CHANNEL(pMac->lim.gCbState, eHAL_SET);
-            if (cfgSetInt(pMac, WNI_CFG_CB_SECONDARY_CHANNEL_STATE, WNI_CFG_CB_SECONDARY_CHANNEL_STATE_HIGHER) != eSIR_SUCCESS)
-                limLog(pMac, LOGP, FL("cfgSetInt WNI_CFG_CB_SECONDARY_CHANNEL_STATE failed \n"));
-
-            /* If CB was off, turn it on, otherwise, do nothing */
-            if(!GET_CB_OPER_STATE(pMac->lim.gCbState))
-            {
-                /* Turn on CB in HW and SW.  SW and HW cbstate must match!  Otherwise, will hit ASSERT case */
-                SET_CB_OPER_STATE(pMac->lim.gCbState, eHAL_SET);
-            }
-            //Send Message to HAL to update the channel
-            //enums for secondary channel offset for Titan and 11n are different
-#if defined WLAN_FEATURE_VOWIFI  
-            limSendSwitchChnlParams(pMac, newChannel, eHT_SECONDARY_CHANNEL_OFFSET_UP, psessionEntry->maxTxPower, psessionEntry->peSessionId);
-#else
-            limSendSwitchChnlParams(pMac, newChannel, eHT_SECONDARY_CHANNEL_OFFSET_UP, (tPowerdBm)localPwrConstraint, psessionEntry->peSessionId);
-#endif
-            break;
-
-        case eANI_CB_SECONDARY_DOWN:
-            PELOGW(limLog(pMac, LOGW, FL("Switch CB SECONDARY to LOWER.\n"));)
-            SET_CB_SEC_CHANNEL(pMac->lim.gCbState, eHAL_CLEAR);
-            if (cfgSetInt(pMac, WNI_CFG_CB_SECONDARY_CHANNEL_STATE, WNI_CFG_CB_SECONDARY_CHANNEL_STATE_LOWER) != eSIR_SUCCESS)
-                limLog(pMac, LOGP, FL("cfgSetInt WNI_CFG_CB_SECONDARY_CHANNEL_STATE failed \n"));
-            /* If CB was off, turn it on, otherwise, do nothing */
-            if(!GET_CB_OPER_STATE(pMac->lim.gCbState))
-            {
-                /* Turn on CB in HW and SW.  SW and HW cbstate must match!  Otherwise, will hit ASSERT case */
-                SET_CB_OPER_STATE(pMac->lim.gCbState, eHAL_SET);
-                /* Update station entry if we're not STA */
-            }
-            //Send Message to HAL to update the channel
-            //enums for secondary channel offset for Titan and 11n are different
-#if defined WLAN_FEATURE_VOWIFI  
-            limSendSwitchChnlParams(pMac, newChannel, eHT_SECONDARY_CHANNEL_OFFSET_NONE, psessionEntry->maxTxPower, psessionEntry->peSessionId);
-#else
-            limSendSwitchChnlParams(pMac, newChannel, eHT_SECONDARY_CHANNEL_OFFSET_DOWN, (tPowerdBm)localPwrConstraint, psessionEntry->peSessionId);
-#endif
-            break;
-
-        case eANI_DONOT_USE_SECONDARY_MODE:
-            break;
-    }
-
-
-    // We should only be changing primary and secondary channels on the fly
-    // if this is 11h enabled.
-    if (
-#if 0
-        pMac->lim.gLim11hEnable &&
-#endif
-        psessionEntry->currentOperChannel != newChannel)
+    // Store the new primary and secondary channel in session entries if different
+    if (psessionEntry->currentOperChannel != newChannel)
     {
         limLog(pMac, LOGW,
             FL("switch old chnl %d --> new chnl %d \n"),
             psessionEntry->currentOperChannel, newChannel);
-
-        #if 0
-
-        if (cfgSetInt(pMac, WNI_CFG_CURRENT_CHANNEL, newChannel) != eSIR_SUCCESS)
-            limLog(pMac, LOGP, FL("set CURRENT_CHANNEL at CFG fail.\n"));
-        #endif // TO SUPPORT BT-AMP
-
         psessionEntry->currentOperChannel = newChannel;
     }
+    if (psessionEntry->htSecondaryChannelOffset != subband)
+    {
+        limLog(pMac, LOGW,
+            FL("switch old sec chnl %d --> new sec chnl %d \n"),
+            psessionEntry->htSecondaryChannelOffset, subband);
+        psessionEntry->htSecondaryChannelOffset = subband;
+        if (psessionEntry->htSecondaryChannelOffset == PHY_SINGLE_CHANNEL_CENTERED)
+        {
+            psessionEntry->htSupportedChannelWidthSet = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
+        }
+        else
+        {
+            psessionEntry->htSupportedChannelWidthSet = WNI_CFG_CHANNEL_BONDING_MODE_ENABLE;
+        }
+        psessionEntry->htRecommendedTxWidthSet = psessionEntry->htSupportedChannelWidthSet;
+    }
 
     return;
 }
@@ -3847,7 +3736,7 @@
     if (psessionEntry->limSystemRole != eLIM_STA_ROLE)
         return bScanTriggered;
     
-    if( !pMac->lim.gLim11hEnable )
+    if( !psessionEntry->lim11hEnable )
     {
         tSirMacChanNum bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
         tANI_U32 len = WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN;
@@ -4035,7 +3924,7 @@
       break;
 
     case eHT_SUPPORTED_CHANNEL_WIDTH_SET:
-      retVal = (tANI_U8) macHTCapabilityInfo.supportedChannelWidthSet;
+      retVal = (tANI_U8) psessionEntry->htSupportedChannelWidthSet;
       break;
 
     case eHT_ADVANCED_CODING:
@@ -4083,11 +3972,11 @@
       break;
 
     case eHT_RECOMMENDED_TX_WIDTH_SET:
-      retVal = pMac->lim.gHTRecommendedTxWidthSet;
+      retVal = psessionEntry->htRecommendedTxWidthSet;
       break;
 
     case eHT_EXTENSION_CHANNEL_OFFSET:
-      retVal = pMac->lim.gHTSecondaryChannelOffset;
+      retVal = psessionEntry->htSecondaryChannelOffset;
       break;
 
     case eHT_OP_MODE:
@@ -4126,20 +4015,6 @@
   return retVal;
 }
 
-#if 0
-void limSetBssid(tpAniSirGlobal pMac, tANI_U8 *bssId)
-{
-    palCopyMemory( pMac->hHdd, pMac->lim.gLimBssid, bssId, sizeof(tSirMacAddr));
-    return;
-}
-
-void limGetBssid(tpAniSirGlobal pMac, tANI_U8 *bssId)
-{
-    palCopyMemory( pMac->hHdd, bssId, pMac->lim.gLimBssid, sizeof(tSirMacAddr));
-    return;
-}
-
-#endif
 void limGetMyMacAddr(tpAniSirGlobal pMac, tANI_U8 *mac)
 {
     palCopyMemory( pMac->hHdd, mac, pMac->lim.gLimMyMacAddr, sizeof(tSirMacAddr));
@@ -4177,7 +4052,8 @@
         else
         {
             //normal protection config check
-            if(!pMac->lim.cfgProtection.fromlla)
+            if (( psessionEntry != NULL ) && (psessionEntry->limSystemRole == eLIM_AP_ROLE) &&
+                (!psessionEntry->cfgProtection.fromlla))
             {
                 // protection disabled.
                 PELOG3(limLog(pMac, LOG3, FL("protection from 11a is disabled\n"));)
@@ -4190,7 +4066,7 @@
         //If we are AP and HT capable, we need to set the HT OP mode
         //appropriately.
         if(((eLIM_AP_ROLE == psessionEntry->limSystemRole)||(eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole))&&
-              (true == psessionEntry->htCapabality))
+              (true == psessionEntry->htCapability))
         {
             if(overlap)
             {
@@ -4210,6 +4086,7 @@
                 if(eSIR_HT_OP_MODE_MIXED != pMac->lim.gHTOperMode)
                 {
                     pMac->lim.gHTOperMode = eSIR_HT_OP_MODE_MIXED;
+                    psessionEntry->htOperMode = eSIR_HT_OP_MODE_MIXED;
                     limEnableHtRifsProtection(pMac, true, overlap, pBeaconParams,psessionEntry);
                     limEnableHtOBSSProtection(pMac,  true, overlap, pBeaconParams,psessionEntry);         
                     
@@ -4238,7 +4115,7 @@
                 pMac->lim.gLimOverlap11aParams.protectionEnabled = false;
 
                 //We need to take care of HT OP mode iff we are HT AP.
-                if(psessionEntry->htCapabality)
+                if(psessionEntry->htCapability)
                 {
                    // no HT op mode change if any of the overlap protection enabled.
                     if(!(pMac->lim.gLimOverlap11aParams.protectionEnabled ||
@@ -4277,16 +4154,19 @@
 
                 {
                         pMac->lim.gHTOperMode = eSIR_HT_OP_MODE_OVERLAP_LEGACY;
+                        psessionEntry->htOperMode = eSIR_HT_OP_MODE_OVERLAP_LEGACY;
                         limEnableHtRifsProtection(pMac, true, overlap, pBeaconParams,psessionEntry);
                 }
                 else if(psessionEntry->gLimHt20Params.protectionEnabled)
                 {
                         pMac->lim.gHTOperMode = eSIR_HT_OP_MODE_NO_LEGACY_20MHZ_HT;
+                        psessionEntry->htOperMode = eSIR_HT_OP_MODE_NO_LEGACY_20MHZ_HT;
                         limEnableHtRifsProtection(pMac, false, overlap, pBeaconParams,psessionEntry);
                 }
                 else
                 {
                         pMac->lim.gHTOperMode = eSIR_HT_OP_MODE_PURE;
+                        psessionEntry->htOperMode = eSIR_HT_OP_MODE_PURE;
                         limEnableHtRifsProtection(pMac, false, overlap, pBeaconParams,psessionEntry);
                 }
             }
@@ -4369,7 +4249,7 @@
             {
                 psessionEntry->gLimOlbcParams.protectionEnabled = true;
                 PELOGE(limLog(pMac, LOGE, FL("protection from olbc is enabled\n"));)
-                if(true == psessionEntry->htCapabality)
+                if(true == psessionEntry->htCapability)
                 {
                     if((eSIR_HT_OP_MODE_OVERLAP_LEGACY != psessionEntry->htOperMode) &&
                             (eSIR_HT_OP_MODE_MIXED != psessionEntry->htOperMode))
@@ -4388,7 +4268,7 @@
             {
                 psessionEntry->gLim11bParams.protectionEnabled = true;
                 PELOGE(limLog(pMac, LOGE, FL("protection from 11b is enabled\n"));)
-                if(true == psessionEntry->htCapabality)
+                if(true == psessionEntry->htCapability)
                 {
                     if(eSIR_HT_OP_MODE_MIXED != psessionEntry->htOperMode)
                     {
@@ -4399,10 +4279,10 @@
                 }
             }
         }else if ((eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole) &&
-                (true == psessionEntry->htCapabality))
+                (true == psessionEntry->htCapability))
 #else
             if(((eLIM_AP_ROLE == psessionEntry->limSystemRole)|| (eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole)) &&
-                    (true == psessionEntry->htCapabality))
+                    (true == psessionEntry->htCapability))
 #endif
             {
                 if(overlap)
@@ -4454,7 +4334,7 @@
                 psessionEntry->gLimOlbcParams.protectionEnabled = false;
 
                 //We need to take care of HT OP mode if we are HT AP.
-                if(psessionEntry->htCapabality)
+                if(psessionEntry->htCapability)
                 {
                     // no HT op mode change if any of the overlap protection enabled.
                     if(!(psessionEntry->gLimOverlap11gParams.protectionEnabled ||
@@ -4532,7 +4412,7 @@
                 psessionEntry->gLimOlbcParams.protectionEnabled = false;
 
                     //We need to take care of HT OP mode iff we are HT AP.
-                    if(psessionEntry->htCapabality)
+                    if(psessionEntry->htCapability)
                     {
                         // no HT op mode change if any of the overlap protection enabled.
                         if(!(pMac->lim.gLimOverlap11gParams.protectionEnabled ||
@@ -4617,7 +4497,7 @@
 limEnableHtProtectionFrom11g(tpAniSirGlobal pMac, tANI_U8 enable,
     tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry)
 {
-    if(!psessionEntry->htCapabality)
+    if(!psessionEntry->htCapability)
         return eSIR_SUCCESS; // protection from 11g is only for HT stations.
 
     //overlapping protection configuration check.
@@ -4917,7 +4797,7 @@
 {
 
 
-    if(!psessionEntry->htCapabality)
+    if(!psessionEntry->htCapability)
         return eSIR_SUCCESS; // this protection  is only for HT stations.
 
     //overlapping protection configuration check.
@@ -5009,7 +4889,7 @@
 limEnableHT20Protection(tpAniSirGlobal pMac, tANI_U8 enable,
     tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry)
 {
-    if(!psessionEntry->htCapabality)
+    if(!psessionEntry->htCapability)
         return eSIR_SUCCESS; // this protection  is only for HT stations.
 
         //overlapping protection configuration check.
@@ -5237,7 +5117,7 @@
 limEnableHTNonGfProtection(tpAniSirGlobal pMac, tANI_U8 enable,
     tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry)
 {
-    if(!psessionEntry->htCapabality)
+    if(!psessionEntry->htCapability)
         return eSIR_SUCCESS; // this protection  is only for HT stations.
 
         //overlapping protection configuration check.
@@ -5320,7 +5200,7 @@
 limEnableHTLsigTxopProtection(tpAniSirGlobal pMac, tANI_U8 enable,
     tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry)
 {
-    if(!psessionEntry->htCapabality)
+    if(!psessionEntry->htCapability)
         return eSIR_SUCCESS; // this protection  is only for HT stations.
 
         //overlapping protection configuration check.
@@ -5405,7 +5285,7 @@
 limEnableHtRifsProtection(tpAniSirGlobal pMac, tANI_U8 enable,
     tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry)
 {
-    if(!psessionEntry->htCapabality)
+    if(!psessionEntry->htCapability)
         return eSIR_SUCCESS; // this protection  is only for HT stations.
 
 
@@ -5597,7 +5477,7 @@
         if(VOS_IS_STATUS_SUCCESS(vosStatus))
         {
             mHdr = WDA_GET_RX_MAC_HEADER(pRxBd);
-            MTRACE(macTrace(pMac, TRACE_CODE_TX_COMPLETE, 0, mHdr->fc.subType);)
+            MTRACE(macTrace(pMac, TRACE_CODE_TX_COMPLETE, NO_SESSION, mHdr->fc.subType);)
 
         }   
     }
@@ -5635,7 +5515,7 @@
                                   tANI_U8          bssIdx,
                                   tpPESession      psessionEntry)
 {
-    tSirMacHTSecondaryChannelOffset secondaryChnlOffset = eHT_SECONDARY_CHANNEL_OFFSET_NONE;
+    ePhyChanBondState secondaryChnlOffset = PHY_SINGLE_CHANNEL_CENTERED;
 #if !defined WLAN_FEATURE_VOWIFI  
     tANI_U32 localPwrConstraint;
 #endif
@@ -5655,20 +5535,13 @@
     }
 #endif
 
-    if ( pMac->lim.gHTSecondaryChannelOffset != ( tANI_U8 ) pHTInfo->secondaryChannelOffset ||
-         pMac->lim.gHTRecommendedTxWidthSet  != ( tANI_U8 ) pHTInfo->recommendedTxWidthSet )
+    if ( psessionEntry->htSecondaryChannelOffset != ( tANI_U8 ) pHTInfo->secondaryChannelOffset ||
+         psessionEntry->htRecommendedTxWidthSet  != ( tANI_U8 ) pHTInfo->recommendedTxWidthSet )
     {
-        pMac->lim.gHTSecondaryChannelOffset = ( tSirMacHTSecondaryChannelOffset ) pHTInfo->secondaryChannelOffset;
-        pMac->lim.gHTRecommendedTxWidthSet  = ( tANI_U8 ) pHTInfo->recommendedTxWidthSet;
-        //Also update the Proprietary(Titan) CB mode settings, as this setting is used during 
-        //background scanning to set the original channel and CB mode as part of finish scan.
-        setupCBState( pMac,  limGetAniCBState(pMac->lim.gHTSecondaryChannelOffset));
-
-        // If the Channel Width is 20Mhz, set the channel offset to
-        // NONE.  If the Channel Width is 40Mhz, set the channel offset
-        // to what ever is present in beacon.
-        if ( eHT_CHANNEL_WIDTH_40MHZ == pMac->lim.gHTRecommendedTxWidthSet )
-            secondaryChnlOffset = (tSirMacHTSecondaryChannelOffset)pHTInfo->secondaryChannelOffset;
+        psessionEntry->htSecondaryChannelOffset = ( ePhyChanBondState ) pHTInfo->secondaryChannelOffset;
+        psessionEntry->htRecommendedTxWidthSet  = ( tANI_U8 ) pHTInfo->recommendedTxWidthSet;
+        if ( eHT_CHANNEL_WIDTH_40MHZ == psessionEntry->htRecommendedTxWidthSet )
+            secondaryChnlOffset = (ePhyChanBondState)pHTInfo->secondaryChannelOffset;
 
         // Notify HAL
         limLog( pMac, LOGW,  FL( "Channel Information in HT IE change"
@@ -5676,7 +5549,7 @@
         limLog( pMac, LOGW,  FL( "Primary Channel: %d, Secondary Chan"
                                  "nel Offset: %d, Channel Width: %d\n" ),
                 pHTInfo->primaryChannel, secondaryChnlOffset,
-                pMac->lim.gHTRecommendedTxWidthSet );
+                psessionEntry->htRecommendedTxWidthSet );
 
 #if defined WLAN_FEATURE_VOWIFI  
         limSendSwitchChnlParams( pMac, ( tANI_U8 ) pHTInfo->primaryChannel,
@@ -5750,15 +5623,15 @@
 void limUpdateStaRunTimeHTInfo( tpAniSirGlobal  pMac,
                                 tDot11fIEHTInfo *pHTInfo , tpPESession psessionEntry)
 {
-    if ( pMac->lim.gHTSecondaryChannelOffset != ( tANI_U8)pHTInfo->secondaryChannelOffset)
+    if ( psessionEntry->htSecondaryChannelOffset != ( tANI_U8)pHTInfo->secondaryChannelOffset)
     {
-        pMac->lim.gHTSecondaryChannelOffset = ( tSirMacHTSecondaryChannelOffset )pHTInfo->secondaryChannelOffset;
+        psessionEntry->htSecondaryChannelOffset = ( ePhyChanBondState )pHTInfo->secondaryChannelOffset;
         // Send change notification to HAL
     }
 
-    if ( pMac->lim.gHTRecommendedTxWidthSet != ( tANI_U8 )pHTInfo->recommendedTxWidthSet )
+    if ( psessionEntry->htRecommendedTxWidthSet != ( tANI_U8 )pHTInfo->recommendedTxWidthSet )
     {
-        pMac->lim.gHTRecommendedTxWidthSet = ( tANI_U8 )pHTInfo->recommendedTxWidthSet;
+        psessionEntry->htRecommendedTxWidthSet = ( tANI_U8 )pHTInfo->recommendedTxWidthSet;
         // Send change notification to HAL
     }
 
@@ -6000,7 +5873,7 @@
            psessionEntry->gLimEdcaParams[upToAc(tsinfo->traffic.userPrio)].aci.acm)
       {
         //send message to HAL to delete TS
-        if(eSIR_SUCCESS != limSendHalMsgDelTs(pMac, pSta->staIndex, tspecIdx, pDeltsReq->req))
+        if(eSIR_SUCCESS != limSendHalMsgDelTs(pMac, pSta->staIndex, tspecIdx, pDeltsReq->req, psessionEntry->peSessionId))
         {
           limLog(pMac, LOGW, FL("DelTs with UP %d failed in limSendHalMsgDelTs - ignoring request\n"),
                            tsinfo->traffic.userPrio);
@@ -6035,7 +5908,7 @@
     msg.bodyptr = pHalCB;
     msg.bodyval = 0;
     
-    MTRACE(macTraceMsgTx(pMac, 0, msg.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msg.type));
     if(eSIR_SUCCESS != wdaPostCtrlMsg(pMac, &msg))
     {
         palFreeMemory(pMac->hHdd, pHalCB);
@@ -6084,7 +5957,7 @@
     }
        
     //if we are not HT capable we don't need to handle BA timeout indication from HAL.
-    if( (baCandidateCnt  > pMac->lim.maxStation) || !psessionEntry->htCapabality )
+    if( (baCandidateCnt  > pMac->lim.maxStation) || !psessionEntry->htCapability )
     {
         palFreeMemory(pMac->hHdd, limMsg->bodyptr);
         return;
@@ -6194,6 +6067,7 @@
 if((psessionEntry = peFindSessionByBssid(pMac,pDelTsParam->bssId,&sessionId))== NULL)
     {
          limLog(pMac, LOGE,FL("session does not exist for given BssId\n"));
+         palFreeMemory(pMac->hHdd, (void *)(limMsg->bodyptr));
          return;
     }
 
@@ -6664,7 +6538,7 @@
   //defer any other message until we get response back.
   SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
 
-  MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+  MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
     limDiagEventReport(pMac, WLAN_PE_DIAG_HAL_ADDBA_REQ_EVENT, psessionEntry, 0, 0);
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -6757,7 +6631,7 @@
   limLog( pMac, LOGW,
       FL( "Sending SIR_HAL_DELBA_IND..." ));
 
-  MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+  MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT 
     limDiagEventReport(pMac, WLAN_PE_DIAG_HAL_DELBA_IND_EVENT, psessionEntry, 0, 0);
 #endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -6837,7 +6711,7 @@
 
     limLog( pMac, LOG2, FL( "Sending WDA_SET_MIMOPS_REQ..." ));
 
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
     retCode = wdaPostCtrlMsg( pMac, &msgQ );
     if (eSIR_SUCCESS != retCode)
     {
@@ -7089,7 +6963,7 @@
     msgQ.reserved = 0;
     msgQ.type = WDA_TRANSMISSION_CONTROL_IND;
 
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
     if(wdaPostCtrlMsg( pMac, &msgQ) != eSIR_SUCCESS)
     {
         palFreeMemory(pMac->hHdd, (void *) pTxCtrlMsg);
@@ -7139,7 +7013,7 @@
         return retCode;
     
     /* Channel switch should be ready for the next time */
-    pMac->lim.gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_INIT;
+    psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_INIT;
 
     /* Restore the frame transmission, all the time. */
     limFrameTransmissionControl(pMac, eLIM_TX_ALL, eLIM_RESUME_TX);
@@ -7161,7 +7035,7 @@
 
         if (val > 0 && TX_TIMER_VALID(pMac->lim.limTimers.gLimBackgroundScanTimer))
         {
-            MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_BACKGROUND_SCAN_TIMER));
+            MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_BACKGROUND_SCAN_TIMER));
             if(tx_timer_activate(&pMac->lim.limTimers.gLimBackgroundScanTimer) != TX_SUCCESS)
             {
                 limLog(pMac, LOGP, FL("Could not restart background scan timer, doing LOGP"));
@@ -7174,7 +7048,7 @@
     /* Enable heartbeat timer */
     if (TX_TIMER_VALID(pMac->lim.limTimers.gLimHeartBeatTimer))
     {
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_HEART_BEAT_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_HEART_BEAT_TIMER));
         if(limActivateHearBeatTimer(pMac) != TX_SUCCESS)
         {
             limLog(pMac, LOGP, FL("Could not restart heartbeat timer, doing LOGP"));
@@ -7193,7 +7067,7 @@
 \param pMac
 \return NONE
 ---------------------------------------------*/
-tSirRetStatus limRestorePreQuietState(tpAniSirGlobal pMac)
+tSirRetStatus limRestorePreQuietState(tpAniSirGlobal pMac, tpPESession psessionEntry)
 {
 
     tSirRetStatus retCode = eSIR_SUCCESS;
@@ -7204,10 +7078,10 @@
              return retCode;
  
     /* Quiet should be ready for the next time */
-    pMac->lim.gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
+    psessionEntry->gLimSpecMgmt.quietState = eLIM_QUIET_INIT;
 
     /* Restore the frame transmission, all the time. */
-    if (pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING)
+    if (psessionEntry->gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING)
         limFrameTransmissionControl(pMac, eLIM_TX_ALL, eLIM_RESUME_TX);
 
 
@@ -7225,7 +7099,7 @@
 
         if (val > 0 && TX_TIMER_VALID(pMac->lim.limTimers.gLimBackgroundScanTimer))
         {
-            MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_BACKGROUND_SCAN_TIMER));
+            MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_BACKGROUND_SCAN_TIMER));
             if(tx_timer_activate(&pMac->lim.limTimers.gLimBackgroundScanTimer) != TX_SUCCESS)
             {
                 limLog(pMac, LOGP, FL("Could not restart background scan timer, doing LOGP"));
@@ -7238,7 +7112,7 @@
     /* Enable heartbeat timer */
     if (TX_TIMER_VALID(pMac->lim.limTimers.gLimHeartBeatTimer))
     {
-        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, 0, eLIM_HEART_BEAT_TIMER));
+        MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_HEART_BEAT_TIMER));
         if(limActivateHearBeatTimer(pMac) != TX_SUCCESS)
         {
             limLog(pMac, LOGP, FL("Could not restart heartbeat timer, doing LOGP"));
@@ -7277,7 +7151,7 @@
         return;
      
     /* Flag to indicate 11h channel switch in progress */
-    pMac->lim.gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_RUNNING;
+    psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_RUNNING;
 
     /* Disable, Stop background scan if enabled and running */
     limDeactivateAndChangeTimer(pMac, eLIM_BACKGROUND_SCAN_TIMER);
@@ -7539,6 +7413,7 @@
     if((psessionEntry = peFindSessionBySessionId(pMac,pAddStaParams->sessionId))==NULL)
     {
         limLog(pMac, LOGP,FL("Session Does not exist for given sessionID\n"));
+        palFreeMemory(pMac, pAddStaParams);
         return;
     }
     if (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE)
@@ -7734,6 +7609,7 @@
    {
       /// Buffer not available. Log error
       limLog(pMac, LOGP, FL("call to palAllocateMemory failed for Add Sta self RSP\n"));
+      palFreeMemory( pMac->hHdd, (tANI_U8 *)pAddStaSelfParams);
       return;
    }
 
@@ -7750,7 +7626,7 @@
    mmhMsg.type = eWNI_SME_ADD_STA_SELF_RSP;
    mmhMsg.bodyptr = pRsp;
    mmhMsg.bodyval = 0;
-   MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+   MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
    limSysProcessMmhMsgApi(pMac, &mmhMsg,  ePROT);
 
 }
@@ -7769,6 +7645,7 @@
    {
       /// Buffer not available. Log error
       limLog(pMac, LOGP, FL("call to palAllocateMemory failed for Add Sta self RSP\n"));
+      palFreeMemory( pMac->hHdd, (tANI_U8 *)pDelStaSelfParams);
       return;
    }
 
@@ -7785,7 +7662,7 @@
    mmhMsg.type = eWNI_SME_DEL_STA_SELF_RSP;
    mmhMsg.bodyptr = pRsp;
    mmhMsg.bodyval = 0;
-   MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+   MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
    limSysProcessMmhMsgApi(pMac, &mmhMsg,  ePROT);
 
 }
@@ -7982,19 +7859,20 @@
     return 0;
         
 }
-void peSetResumeChannel(tpAniSirGlobal pMac, tANI_U16 channel, tANI_U8 cbState)
+
+void peSetResumeChannel(tpAniSirGlobal pMac, tANI_U16 channel, ePhyChanBondState phyCbState)
 {
 
    pMac->lim.gResumeChannel = channel;
-   //TODO : Save Cb State also.
-
+   pMac->lim.gResumePhyCbState = phyCbState;
 }
+
 /*--------------------------------------------------------------------------
   
   \brief peGetResumeChannel() - Returns the  channel number for scanning, from a valid session.
 
-  This function itrates the session Table and returns the channel number from first valid session
-   if no sessions are valid/present  it returns zero
+  This function returns the channel to resume to during link resume. channel id of 0 means HAL will
+  resume to previous channel before link suspend
     
   \param pMac                   - pointer to global adapter context
   \return                           - channel to scan from valid session else zero.
@@ -8002,28 +7880,28 @@
   \sa
   
   --------------------------------------------------------------------------*/
-
-tANI_U8 peGetResumeChannel(tpAniSirGlobal pMac)
-
+void peGetResumeChannel(tpAniSirGlobal pMac, tANI_U8* resumeChannel, ePhyChanBondState* resumePhyCbState)
 {
 
     //Rationale - this could be the suspend/resume for assoc and it is essential that
     //the new BSS is active for some time. Other BSS was anyway suspended.
     //TODO: Comeup with a better alternative. Sending NULL with PM=0 on other BSS means
     //there will be trouble. But since it is sent on current channel, it will be missed by peer
-    //and hence shpuld be ok. Need to discuss this further
-    if( !IS_MCC_SUPPORTED )    
+    //and hence should be ok. Need to discuss this further
+    if( !limIsInMCC(pMac) )    
     {
         //Get current active session channel
-        return peGetActiveSessionChannel(pMac);
+        peGetActiveSessionChannel(pMac, resumeChannel, resumePhyCbState);
     }
     else
     {
-        return pMac->lim.gResumeChannel;
+        *resumeChannel = pMac->lim.gResumeChannel;
+        *resumePhyCbState = pMac->lim.gResumePhyCbState;
     }
-
+    return;
 }
 
+
 #endif
 
 tANI_BOOLEAN limIsconnectedOnDFSChannel(tANI_U8 currentChannel)
diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h
index 1aa6355..c8dd8bd 100644
--- a/CORE/MAC/src/pe/lim/limUtils.h
+++ b/CORE/MAC/src/pe/lim/limUtils.h
@@ -193,10 +193,8 @@
 
 void limStartQuietTimer(tpAniSirGlobal pMac, tANI_U8 sessionId);
 void limUpdateQuietIEFromBeacon(tpAniSirGlobal, tDot11fIEQuiet *, tpPESession);
-void limGetHtCbAdminState(tpAniSirGlobal pMac, tDot11fIEHTCaps htCaps, tANI_U8 * titanHtCaps);
-void limGetHtCbOpState(tpAniSirGlobal pMac, tDot11fIEHTInfo htInfo, tANI_U8 * titanHtCaps);
 void limSwitchPrimaryChannel(tpAniSirGlobal, tANI_U8,tpPESession);
-void limSwitchPrimarySecondaryChannel(tpAniSirGlobal, tANI_U8, tAniCBSecondaryMode);
+void limSwitchPrimarySecondaryChannel(tpAniSirGlobal, tpPESession, tANI_U8, ePhyChanBondState);
 tAniBool limTriggerBackgroundScanDuringQuietBss(tpAniSirGlobal);
 void limUpdateStaRunTimeHTSwtichChnlParams(tpAniSirGlobal pMac, tDot11fIEHTInfo *pRcvdHTInfo, tANI_U8 bssIdx);
 void limUpdateStaRunTimeHTCapability(tpAniSirGlobal pMac, tDot11fIEHTCaps *pHTCaps);
@@ -206,7 +204,7 @@
 tAniBool limIsChannelValidForChannelSwitch(tpAniSirGlobal pMac, tANI_U8 channel);
 void limFrameTransmissionControl(tpAniSirGlobal pMac, tLimQuietTxMode type, tLimControlTx mode);
 tSirRetStatus limRestorePreChannelSwitchState(tpAniSirGlobal pMac, tpPESession psessionEntry);
-tSirRetStatus limRestorePreQuietState(tpAniSirGlobal pMac);
+tSirRetStatus limRestorePreQuietState(tpAniSirGlobal pMac, tpPESession psessionEntry);
 
 void limPrepareFor11hChannelSwitch(tpAniSirGlobal pMac, tpPESession psessionEntry);
 void limSwitchChannelCback(tpAniSirGlobal pMac, eHalStatus status, 
@@ -464,13 +462,13 @@
 void limDiagEventReport(tpAniSirGlobal pMac, tANI_U16 eventType, tpPESession pSessionEntry, tANI_U16 status, tANI_U16 reasonCode);
 #endif /* FEATURE_WLAN_DIAG_SUPPORT */
 
-void peSetResumeChannel(tpAniSirGlobal pMac, tANI_U16 channel, tANI_U8 cbState);
+void peSetResumeChannel(tpAniSirGlobal pMac, tANI_U16 channel, ePhyChanBondState cbState);
 /*--------------------------------------------------------------------------
   
   \brief peGetResumeChannel() - Returns the  channel number for scanning, from a valid session.
 
-  This function itrates the session Table and returns the channel number from first valid session
-   if no sessions are valid it returns 0
+  This function returns the channel to resume to during link resume. channel id of 0 means HAL will
+  resume to previous channel before link suspend
     
   \param pMac                   - pointer to global adapter context
   \return                            - channel to scan from valid session else zero.
@@ -478,7 +476,6 @@
   \sa
   
   --------------------------------------------------------------------------*/
-tANI_U8 peGetResumeChannel(tpAniSirGlobal pMac);
-
+void peGetResumeChannel(tpAniSirGlobal pMac, tANI_U8* resumeChannel, ePhyChanBondState* resumePhyCbState);
 
 #endif /* __LIM_UTILS_H */
diff --git a/CORE/MAC/src/pe/pmm/pmmApi.c b/CORE/MAC/src/pe/pmm/pmmApi.c
index 2070549..79a4d12 100644
--- a/CORE/MAC/src/pe/pmm/pmmApi.c
+++ b/CORE/MAC/src/pe/pmm/pmmApi.c
@@ -246,7 +246,7 @@
             /* Disable heartbeat timer as well */
             if(pMac->lim.limTimers.gLimHeartBeatTimer.pMac)
             {
-                MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, 0, eLIM_HEART_BEAT_TIMER));
+                MTRACE(macTrace(pMac, TRACE_CODE_TIMER_DEACTIVATE, NO_SESSION, eLIM_HEART_BEAT_TIMER));
                 tx_timer_deactivate(&pMac->lim.limTimers.gLimHeartBeatTimer);
             }
         }
@@ -428,8 +428,8 @@
     if ( ((pMac->pmm.gPmmState != ePMM_STATE_READY) &&
          (pMac->pmm.gPmmState != ePMM_STATE_BMPS_WAKEUP)) ||
          limIsSystemInScanState(pMac) ||
-         (pMac->lim.gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING) ||
-         (pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING))
+         limIsChanSwitchRunning(pMac) ||
+         limIsInQuietDuration(pMac) )
     {
         PELOGE(pmmLog(pMac, LOGE, 
             FL("pmmBmps: BMPS Request received in invalid state PMM=%d, SME=%d, rejecting the initpwrsave request\n"), 
@@ -524,6 +524,7 @@
     tSirRetStatus  retStatus = eSIR_SUCCESS;
     tpExitBmpsParams  pExitBmpsParams;
     tSirMsgQ msgQ;
+    tpPESession psessionEntry;
     tANI_U8  currentOperatingChannel = limGetCurrentOperatingChannel(pMac);
 
     if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pExitBmpsParams, sizeof(*pExitBmpsParams)) )
@@ -533,6 +534,12 @@
         return retStatus;
     }
 
+    if((psessionEntry = peGetValidPowerSaveSession(pMac)) == NULL )
+    {
+        retStatus = eSIR_FAILURE;
+        return retStatus;
+    }
+
     palZeroMemory( pMac->hHdd, (tANI_U8 *)pExitBmpsParams, sizeof(*pExitBmpsParams));
     msgQ.type = WDA_EXIT_BMPS_REQ;
     msgQ.reserved = 0;
@@ -550,11 +557,13 @@
              limIsconnectedOnDFSChannel(currentOperatingChannel))))
         pExitBmpsParams->sendDataNull = 1;
 
+    pExitBmpsParams->bssIdx = psessionEntry->bssIdx;
+   
     /* we need to defer any incoming messages until we
      * get a WDA_EXIT_BMPS_RSP from HAL.
      */
     SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
     retStatus = wdaPostCtrlMsg( pMac, &msgQ);
     if( eSIR_SUCCESS != retStatus )
     {
@@ -679,7 +688,7 @@
      */
     SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
 
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
     if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
     {
         palFreeMemory(pMac->hHdd, pBmpsParams);
@@ -724,7 +733,7 @@
     if(pMac->lim.gLimSmeState != eLIM_SME_IDLE_STATE  )
     {
         pmmLog(pMac, LOGE,
-            FL("pmmCfg: Power Save Configuration received in invalid state %d"),
+            FL("pmmCfg: Power Save Configuration received in invalid global sme state %d"),
             pMac->lim.gLimSmeState);
         retCode = eSIR_SME_INVALID_STATE;
         goto returnFailure;
@@ -785,7 +794,7 @@
     msgQ.bodyval = 0;
 
     PELOG1(pmmLog( pMac, LOG1, FL( "pmmBmps: Sending WDA_PWR_SAVE_CFG to HAL"));)
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
     if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
     {
         pmmLog( pMac, LOGP,
@@ -902,7 +911,15 @@
     pMac->sys.gSysEnableScanMode = true;
 
     // send response to PMC
-    limSendSmeRsp(pMac, eWNI_PMC_EXIT_BMPS_RSP, retStatus, 0, 0);
+   if(IS_SLM_SESSIONIZED )
+   {
+       limSendSmeRsp(pMac, eWNI_PMC_EXIT_BMPS_RSP, retStatus, 
+                  psessionEntry->smeSessionId, psessionEntry->transactionId);
+   }
+   else
+   {
+       limSendSmeRsp(pMac, eWNI_PMC_EXIT_BMPS_RSP, retStatus, 0, 0);
+   }
 
     if ( pMac->pmm.gPmmExitBmpsReasonCode == eSME_MISSED_BEACON_IND_RCVD)
     {
@@ -1493,11 +1510,11 @@
          ((pMac->lim.gLimSmeState != eLIM_SME_IDLE_STATE) &&
           (pMac->lim.gLimSmeState != eLIM_SME_JOIN_FAILURE_STATE)) ||
          (pMac->lim.gLimMlmState != eLIM_MLM_IDLE_STATE) ||
-         (pMac->lim.gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING) ||
-         (pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING))
+         limIsChanSwitchRunning (pMac) ||
+         limIsInQuietDuration (pMac) )
     {
         PELOGE(pmmLog(pMac, LOGE, 
-              FL("pmmImps: PMM State = %d, MLM State = %d, SME State = %d, rejecting the sleep mode request\n"),
+              FL("pmmImps: PMM State = %d, Global MLM State = %d, Global SME State = %d, rejecting the sleep mode request\n"),
               pMac->pmm.gPmmState, pMac->lim.gLimMlmState, pMac->lim.gLimSmeState);)
 
         resultCode = eSIR_SME_INVALID_PMM_STATE;
@@ -1783,7 +1800,7 @@
          limIsSystemInScanState(pMac) )
     {
         PELOGE(pmmLog(pMac, LOGE,
-            FL("pmmUapsd: PMM State = %d, MLM State = %d, SME State = %d, rejecting the sleep mode request\n"),
+            FL("pmmUapsd: PMM State = %d, Global MLM State = %d, Global SME State = %d, rejecting the sleep mode request\n"),
             pMac->pmm.gPmmState, pMac->lim.gLimMlmState, pMac->lim.gLimSmeState);)
 
         resultCode = eSIR_SME_INVALID_PMM_STATE;
@@ -1829,11 +1846,16 @@
     tpUapsdParams    pUapsdRspMsg;
     tSirResultCodes  retStatus = eSIR_SME_SUCCESS;
 
+    tANI_U8 PowersavesessionId;
+    tpPESession psessionEntry;
+
     /* we need to process all the deferred messages enqueued since
      * the initiating the SIR_HAL_ENTER_UAPSD_REQ.
      */
     SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
 
+    /* Copy the power save sessionId to the local variable */
+    PowersavesessionId = pMac->pmm.sessionId;
 
     if (NULL == limMsg->bodyptr)
     {
@@ -1843,6 +1865,12 @@
 
     pUapsdRspMsg = (tpUapsdParams)(limMsg->bodyptr);
 
+    if((psessionEntry = peFindSessionBySessionId(pMac,PowersavesessionId))==NULL)
+    {
+        limLog(pMac, LOGP,FL("Session Does not exist for given sessionID\n"));
+        return;
+    }
+
     if(pMac->pmm.gPmmState != ePMM_STATE_UAPSD_WT_SLEEP_RSP)
     {
         PELOGE(pmmLog(pMac, LOGE,
@@ -1866,7 +1894,16 @@
         retStatus = eSIR_SME_UAPSD_REQ_FAILED;
     }
 
-    limSendSmeRsp(pMac, eWNI_PMC_ENTER_UAPSD_RSP, retStatus, 0, 0);    
+    if(IS_SLM_SESSIONIZED )
+    {
+        limSendSmeRsp(pMac, eWNI_PMC_ENTER_UAPSD_RSP, retStatus, 
+                        psessionEntry->smeSessionId, psessionEntry->transactionId);
+    }
+    else
+    {
+        limSendSmeRsp(pMac, eWNI_PMC_ENTER_UAPSD_RSP, retStatus, 0, 0);
+    }
+
     return;
 }
 
@@ -1948,6 +1985,8 @@
 void pmmExitUapsdResponseHandler(tpAniSirGlobal pMac, eHalStatus rspStatus)
 {
     tSirResultCodes resultCode = eSIR_SME_SUCCESS;
+    tANI_U8 PowersavesessionId;
+    tpPESession psessionEntry;
 
     /* we need to process all the deferred messages enqueued since
      * the initiating the SIR_HAL_EXIT_UAPSD_REQ.
@@ -1963,6 +2002,13 @@
         return;
     }
 
+    PowersavesessionId = pMac->pmm.sessionId;
+    if((psessionEntry = peFindSessionBySessionId(pMac,PowersavesessionId))==NULL)
+    {
+        limLog(pMac, LOGP,FL("Session Does not exist for given sessionID\n"));
+        return;
+    }
+
     switch(rspStatus)
     {
         case eHAL_STATUS_SUCCESS:
@@ -1978,7 +2024,16 @@
     }
 
     pMac->pmm.gPmmState = ePMM_STATE_BMPS_SLEEP;
-    limSendSmeRsp(pMac, eWNI_PMC_EXIT_UAPSD_RSP, resultCode, 0, 0);
+
+    if(IS_SLM_SESSIONIZED)
+    {
+        limSendSmeRsp(pMac, eWNI_PMC_EXIT_UAPSD_RSP, resultCode, psessionEntry->smeSessionId,
+                      psessionEntry->transactionId);
+    }
+    else
+    {
+        limSendSmeRsp(pMac, eWNI_PMC_EXIT_UAPSD_RSP, resultCode, 0, 0);
+    }
     return;
 }
 
@@ -2424,7 +2479,7 @@
      * WDA_ENTER_IMPS_REQ or WDA_EXIT_IMPS_RSP from HAL.
      */
     SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
     retStatus = wdaPostCtrlMsg(pMac, &msgQ);
     if ( eSIR_SUCCESS != retStatus )
     {
@@ -2456,6 +2511,7 @@
     tANI_U8  uapsdDeliveryMask = 0;
     tANI_U8  uapsdTriggerMask = 0;
     tSirMsgQ msgQ;
+    tpPESession pSessionEntry;
 
     if (SIR_PM_SLEEP_MODE == mode)
     {
@@ -2465,6 +2521,13 @@
             retStatus = eSIR_MEM_ALLOC_FAILED;
             return retStatus;
         }
+
+        if((pSessionEntry = peGetValidPowerSaveSession(pMac)) == NULL )
+        {
+            PELOGW(pmmLog(pMac, LOGW, FL("pmmUapsd :palAllocateMemory() failed\n"));)
+            retStatus = eSIR_FAILURE;
+            return retStatus;
+        }
         palZeroMemory( pMac->hHdd, (tANI_U8 *)pUapsdParams, sizeof(tUapsdParams));
         msgQ.type = WDA_ENTER_UAPSD_REQ;
         msgQ.bodyptr = pUapsdParams;
@@ -2480,6 +2543,8 @@
         pUapsdParams->beTriggerEnabled = LIM_UAPSD_GET(ACBE, uapsdTriggerMask);
         pUapsdParams->viTriggerEnabled = LIM_UAPSD_GET(ACVI, uapsdTriggerMask);
         pUapsdParams->voTriggerEnabled = LIM_UAPSD_GET(ACVO, uapsdTriggerMask);
+        pUapsdParams->bssIdx = pSessionEntry->bssIdx;
+
         PELOGE(pmmLog(pMac, LOGE, 
                       FL("UAPSD Mask:  static = 0x%x, DeliveryEnabled = 0x%x, TriggerEnabled = 0x%x \n"),
             pMac->lim.gUapsdPerAcBitmask,
@@ -2514,7 +2579,7 @@
 
     msgQ.reserved = 0;
     msgQ.bodyval = 0;
-    MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+    MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
     retStatus = wdaPostCtrlMsg(pMac, &msgQ);
     if ( eSIR_SUCCESS != retStatus )
     {
diff --git a/CORE/MAC/src/pe/rrm/rrmApi.c b/CORE/MAC/src/pe/rrm/rrmApi.c
index 6363f17..5ac52ba 100644
--- a/CORE/MAC/src/pe/rrm/rrmApi.c
+++ b/CORE/MAC/src/pe/rrm/rrmApi.c
@@ -163,7 +163,7 @@
 
    PELOGW(limLog(pMac, LOGW, FL( "Sending WDA_SET_MAX_TX_POWER_REQ to HAL"));)
 
-      MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+      MTRACE(macTraceMsgTx(pMac, pSessionEntry->peSessionId, msgQ.type));
    if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
    {
       limLog( pMac, LOGP, FL("Posting WDA_SET_MAX_TX_POWER_REQ to HAL failed, reason=%X"), retCode );
@@ -380,7 +380,7 @@
    //Send request to SME.
    mmhMsg.type    = pSmeNeighborRpt->messageType;
    mmhMsg.bodyptr = pSmeNeighborRpt;
-   MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+   MTRACE(macTraceMsgTx(pMac, pSessionEntry->peSessionId, mmhMsg.type));
    status = limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
 
    return status;
@@ -607,7 +607,7 @@
    //Send request to SME.
    mmhMsg.type    = eWNI_SME_BEACON_REPORT_REQ_IND;
    mmhMsg.bodyptr = pSmeBcnReportReq;
-   MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
+   MTRACE(macTraceMsgTx(pMac, pSessionEntry->peSessionId, mmhMsg.type));
    return limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
 }
 
diff --git a/CORE/MAC/src/pe/sch/schApi.c b/CORE/MAC/src/pe/sch/schApi.c
index 8d90e5e..fa85478 100644
--- a/CORE/MAC/src/pe/sch/schApi.c
+++ b/CORE/MAC/src/pe/sch/schApi.c
@@ -341,7 +341,7 @@
     psessionEntry->bcnLen = size;
   }
 
-  MTRACE(macTraceMsgTx(pMac, 0, msgQ.type));
+  MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
   if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
   {
     schLog( pMac, LOGE,
diff --git a/CORE/MAC/src/pe/sch/schBeaconGen.c b/CORE/MAC/src/pe/sch/schBeaconGen.c
index 23b85c3..0921d00 100644
--- a/CORE/MAC/src/pe/sch/schBeaconGen.c
+++ b/CORE/MAC/src/pe/sch/schBeaconGen.c
@@ -303,14 +303,14 @@
         PopulateDot11fEDCAParamSet( pMac, &bcn2.EDCAParamSet, psessionEntry);
     }
 
-    if(pMac->lim.gLim11hEnable)
+    if(psessionEntry->lim11hEnable)
     {
       PopulateDot11fPowerConstraints( pMac, &bcn2.PowerConstraints );
       PopulateDot11fTPCReport( pMac, &bcn2.TPCReport, psessionEntry);
     }
 
 #ifdef ANI_PRODUCT_TYPE_AP
-    if( pMac->lim.gLim11hEnable && (eLIM_QUIET_RUNNING == pMac->lim.gLimSpecMgmt.quietState))
+    if( psessionEntry->lim11hEnable && (eLIM_QUIET_RUNNING == psessionEntry->gLimSpecMgmt.quietState))
     {
       PopulateDot11fQuiet( pMac, &bcn2.Quiet );
     }
@@ -321,28 +321,38 @@
      * populate the 802.11h channel switch IE in its Beacons and Probe
      * Responses.
      */
-    if ( (pMac->lim.gLim11hEnable) &&
-         (pMac->lim.gLimChannelSwitch.switchCount != 0) &&
-         (pMac->lim.gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING))
+    if ( (psessionEntry->lim11hEnable) &&
+         (psessionEntry->gLimChannelSwitch.switchCount != 0) &&
+         (psessionEntry->gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING))
 
     {
-      PopulateDot11fChanSwitchAnn( pMac, &bcn2.ChanSwitchAnn );
-      PopulateDot11fExtChanSwitchAnn(pMac, &bcn2.ExtChanSwitchAnn);
+      PopulateDot11fChanSwitchAnn( pMac, &bcn2.ChanSwitchAnn, psessionEntry );
+      PopulateDot11fExtChanSwitchAnn(pMac, &bcn2.ExtChanSwitchAnn, psessionEntry );
     }
 #endif
 
     if (psessionEntry->dot11mode != WNI_CFG_DOT11_MODE_11B)
         PopulateDot11fERPInfo( pMac, &bcn2.ERPInfo, psessionEntry );
 
-    if(psessionEntry->htCapabality)
+    if(psessionEntry->htCapability)
     {
-        PopulateDot11fHTCaps( pMac, &bcn2.HTCaps );
+        PopulateDot11fHTCaps( pMac, psessionEntry, &bcn2.HTCaps );
 #ifdef WLAN_SOFTAP_FEATURE
         PopulateDot11fHTInfo( pMac, &bcn2.HTInfo, psessionEntry );
 #else
         PopulateDot11fHTInfo( pMac, &bcn2.HTInfo );
 #endif
     }
+#ifdef WLAN_FEATURE_11AC
+    if(psessionEntry->vhtCapability)
+    {        
+        limLog( pMac, LOGW, FL("Populate VHT IEs in Beacon\n"));
+        PopulateDot11fVHTCaps( pMac, &bcn2.VHTCaps );
+        PopulateDot11fVHTOperation( pMac, &bcn2.VHTOperation);
+        // we do not support multi users yet
+        //PopulateDot11fVHTExtBssLoad( pMac, &bcn2.VHTExtBssLoad);
+    }
+#endif
 
     PopulateDot11fExtSuppRates( pMac, POPULATE_DOT11F_RATES_OPERATIONAL,
                                 &bcn2.ExtSuppRates, psessionEntry );
@@ -628,6 +638,30 @@
                             sizeof(beacon2->HTInfo));
     }
 
+#ifdef WLAN_FEATURE_11AC
+    if(beacon2->VHTCaps.present)
+    {
+        SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_CAPABILITIES_EID);
+        palCopyMemory(pMac->hHdd,(void *)&prb_rsp->VHTCaps,
+                            (void *)&beacon2->VHTCaps,
+                            sizeof(beacon2->VHTCaps));
+    }
+    if(beacon2->VHTOperation.present)
+    {
+        SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_OPERATION_EID);
+        palCopyMemory(pMac->hHdd,(void *)&prb_rsp->VHTOperation,
+                            (void *)&beacon2->VHTOperation,
+                            sizeof(beacon2->VHTOperation));
+    }
+    if(beacon2->VHTExtBssLoad.present)
+    {
+        SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_EXT_BSS_LOAD_EID);
+        palCopyMemory(pMac->hHdd,(void *)&prb_rsp->VHTExtBssLoad,
+                            (void *)&beacon2->VHTExtBssLoad,
+                            sizeof(beacon2->VHTExtBssLoad));
+    }
+#endif
+
     //WMM IE
     if(beacon2->WMMParams.present)
     {
@@ -957,12 +991,12 @@
                     limSwitchPrimaryChannel(pMac, pMac->lim.gLimChannelSwitch.primaryChannel);
                     break;
                 case eLIM_CHANNEL_SWITCH_SECONDARY_ONLY:
-                    limSwitchPrimarySecondaryChannel(pMac,
+                    limSwitchPrimarySecondaryChannel(pMac, psessionEntry,
                                              psessionEntry->currentOperChannel,
                                              pMac->lim.gLimChannelSwitch.secondarySubBand);
                     break;
                 case eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY:
-                    limSwitchPrimarySecondaryChannel(pMac,
+                    limSwitchPrimarySecondaryChannel(pMac, psessionEntry,
                                              pMac->lim.gLimChannelSwitch.primaryChannel,
                                              pMac->lim.gLimChannelSwitch.secondarySubBand);
                     break;
diff --git a/CORE/MAC/src/pe/sch/schBeaconProcess.c b/CORE/MAC/src/pe/sch/schBeaconProcess.c
index abcfd62..1157847 100644
--- a/CORE/MAC/src/pe/sch/schBeaconProcess.c
+++ b/CORE/MAC/src/pe/sch/schBeaconProcess.c
@@ -85,7 +85,7 @@
 
     if(SIR_BAND_5_GHZ == rfBand)
     {
-        if (psessionEntry->htCapabality)
+        if (psessionEntry->htCapability)
         {
             if (pBcnStruct->channelNumber == psessionEntry->currentOperChannel)
             {
@@ -122,7 +122,7 @@
     {
         //We are 11G AP.
         if ((phyMode == WNI_CFG_PHY_MODE_11G) &&
-              (false == psessionEntry->htCapabality))
+              (false == psessionEntry->htCapability))
         {
             if (pBcnStruct->channelNumber == psessionEntry->currentOperChannel)        
             {
@@ -149,7 +149,7 @@
             }
         }        
         // handling the case when HT AP has overlapping legacy BSS.
-        else if(psessionEntry->htCapabality)
+        else if(psessionEntry->htCapability)
         {             
             if (pBcnStruct->channelNumber == psessionEntry->currentOperChannel)
             {
@@ -396,8 +396,8 @@
 
 
 
-        MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT_TSF, 0, pBeacon->timeStamp[0]);)
-        MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT_TSF, 0, pBeacon->timeStamp[1]);)
+        MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT_TSF, psessionEntry->peSessionId, pBeacon->timeStamp[0]);)
+        MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT_TSF, psessionEntry->peSessionId, pBeacon->timeStamp[1]);)
 
         /* Read beacon interval session Entry */
         bi = psessionEntry->beaconParams.beaconInterval;
@@ -472,7 +472,7 @@
             sendProbeReq = TRUE;
     }
 
-    if ( pMac->lim.htCapability && pBeacon->HTInfo.present )
+    if ( psessionEntry->htCapability && pBeacon->HTInfo.present )
     {
         limUpdateStaRunTimeHTSwitchChnlParams( pMac, &pBeacon->HTInfo, bssIdx,psessionEntry);
     }
@@ -485,8 +485,8 @@
         {
             limUpdateQuietIEFromBeacon(pMac, &(pBeacon->quietIE), psessionEntry);
         }
-        else if ((pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_BEGIN) ||
-             (pMac->lim.gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING))
+        else if ((psessionEntry->gLimSpecMgmt.quietState == eLIM_QUIET_BEGIN) ||
+             (psessionEntry->gLimSpecMgmt.quietState == eLIM_QUIET_RUNNING))
         {
             PELOG1(limLog(pMac, LOG1, FL("Received a beacon without Quiet IE\n"));)
             limCancelDot11hQuiet(pMac, psessionEntry);
@@ -498,7 +498,7 @@
         {
             limUpdateChannelSwitch(pMac, pBeacon, psessionEntry);
         }
-        else if (pMac->lim.gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING)
+        else if (psessionEntry->gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING)
         {
             limCancelDot11hChannelSwitch(pMac, psessionEntry);
         }   
@@ -520,7 +520,7 @@
              {
                 limLog( pMac, LOG1, "RegMax = %d, lpc = %d, MaxTx = %d", regMax, localConstraint, maxTxPower );
                 limLog( pMac, LOG1, "Local power constraint change..updating new maxTx power to HAL");
-                if( limSendSetMaxTxPowerReq ( pMac, maxTxPower, psessionEntry ) == eHAL_STATUS_SUCCESS )
+                if( limSendSetMaxTxPowerReq ( pMac, maxTxPower, psessionEntry ) == eSIR_SUCCESS )
                    psessionEntry->maxTxPower = maxTxPower;
              }
            }
@@ -569,9 +569,6 @@
             psessionEntry->bssId, psessionEntry->currentOperChannel,psessionEntry->selfMacAddr,
             psessionEntry->dot11mode, 0, NULL);
 
-   PELOG2(schLog(pMac, LOG2, "Received Beacon's SeqNum=%d\n",
-           (pMh->seqControl.seqNumHi << 4) | (pMh->seqControl.seqNumLo));)
-
     if(beaconParams.paramChangeBitmap)
     {
         PELOGW(schLog(pMac, LOGW, FL("Beacon for session[%d] got changed. \n"), psessionEntry->peSessionId);)
diff --git a/CORE/SAP/inc/sapApi.h b/CORE/SAP/inc/sapApi.h
index 6c9953e..5ecc24b 100644
--- a/CORE/SAP/inc/sapApi.h
+++ b/CORE/SAP/inc/sapApi.h
@@ -148,7 +148,10 @@
     eSAP_DOT11_MODE_11g_ONLY = 0x0080,
     eSAP_DOT11_MODE_11n_ONLY = 0x0100,
     eSAP_DOT11_MODE_11b_ONLY = 0x0400,
-
+#ifdef WLAN_FEATURE_11AC
+    eSAP_DOT11_MODE_11ac     = 0x1000,
+    eSAP_DOT11_MODE_11ac_ONLY = 0x2000
+#endif
 } eSapPhyMode;
 
 typedef enum {
@@ -1375,7 +1378,7 @@
   SIDE EFFECTS   
 ============================================================================*/
 VOS_STATUS WLANSAP_SendAction( v_PVOID_t pvosGCtx, const tANI_U8 *pBuf, 
-                               tANI_U32 len );
+                               tANI_U32 len, tANI_U16 wait );
 
 /*==========================================================================
 
diff --git a/CORE/SAP/src/sapModule.c b/CORE/SAP/src/sapModule.c
index ffa755e..0210cdb 100644
--- a/CORE/SAP/src/sapModule.c
+++ b/CORE/SAP/src/sapModule.c
@@ -497,11 +497,9 @@
     }
     else
     {
-        VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR, 
+        VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_FATAL, 
                "WLANSAP_pmcFullPwrReqCB: PMC failed to put the chip in Full power\n");
 
-        //ASSERT
-        VOS_ASSERT(0);
     }
 
 }// WLANSAP_pmcFullPwrReqCB
@@ -2001,7 +1999,7 @@
   SIDE EFFECTS   
 ============================================================================*/
 VOS_STATUS WLANSAP_SendAction( v_PVOID_t pvosGCtx, const tANI_U8 *pBuf,
-                               tANI_U32 len )
+                               tANI_U32 len, tANI_U16 wait )
 {
     ptSapContext  pSapCtx = NULL;
     v_PVOID_t hHal = NULL;
@@ -2025,7 +2023,7 @@
             return VOS_STATUS_E_FAULT;
         }
 
-        halStatus = sme_sendAction( hHal, pSapCtx->sessionId, pBuf, len );
+        halStatus = sme_sendAction( hHal, pSapCtx->sessionId, pBuf, len, 0 , 0);
 
         if ( eHAL_STATUS_SUCCESS == halStatus )
         {
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index 6856670..b8391ed 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -128,9 +128,13 @@
     eCSR_DOT11_MODE_TAURUS_ONLY = 0x0200,
     eCSR_DOT11_MODE_11b_ONLY = 0x0400,
     eCSR_DOT11_MODE_11a_ONLY = 0x0800,
+#ifdef WLAN_FEATURE_11AC
+    eCSR_DOT11_MODE_11ac     = 0x1000,
+    eCSR_DOT11_MODE_11ac_ONLY = 0x2000,
+#endif
     //This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL except when it starts IBSS in 11B of 2.4GHz
     //It is for CSR internal use
-    eCSR_DOT11_MODE_AUTO = 0x1000,
+    eCSR_DOT11_MODE_AUTO = 0x4000,
 
     eCSR_NUM_PHY_MODE = 16,     //specify the number of maximum bits for phyMode
 }eCsrPhyMode;
@@ -244,6 +248,7 @@
     eCsrRequestType requestType;    //11d scan or full scan
 #ifdef WLAN_FEATURE_P2P
     tANI_BOOLEAN p2pSearch;
+    tANI_BOOLEAN skipDfsChnlInP2pSearch;
 #endif
 }tCsrScanRequest;
 
@@ -495,6 +500,8 @@
 #endif
     // peer rejected assoc because max assoc limit reached. callback gets pointer to peer
     eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED,
+    //Assoc rejected due to concurrent session running on a different channel
+    eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL,
 }eCsrRoamResult;
 
 
@@ -626,6 +633,8 @@
 #define CSR_CB_CHANNEL_GAP 4
 #define CSR_CB_CENTER_CHANNEL_OFFSET    2
 #define CSR_MAX_24GHz_CHANNEL_NUMBER ( SIR_11B_CHANNEL_END )
+#define CSR_MIN_5GHz_CHANNEL_NUMBER  ( SIR_11A_CHANNEL_BEGIN )
+#define CSR_MAX_5GHz_CHANNEL_NUMBER  ( SIR_11A_CHANNEL_END )
 
 // WEP keysize (in bits)...
 typedef enum  
@@ -837,6 +846,7 @@
     tCsrEncryptionList mcEncryptionInfo;
     eCsrCBChoice CBMode; //up, down or auto
     tANI_U8 operationChannel;
+    tANI_U16   beaconInterval;
     tCsrKeys Keys;
     // meaningless on connect. It's an OUT param from CSR's point of view
     // During assoc response carries the ACM bit-mask i.e. what
@@ -883,8 +893,8 @@
 typedef struct tagCsrConfigParam
 {
     tANI_U32 FragmentationThreshold;
-    tANI_U32 channelBondingMode24GHz;
-    tANI_U32 channelBondingMode5GHz;
+    tANI_U32 channelBondingMode24GHz;   // keep this tANI_U32. This gets converted to ePhyChannelBondState
+    tANI_U32 channelBondingMode5GHz;    // in csrChangeDefaultConfigParam using convertCBIniValueToPhyCBState
     eCsrPhyMode phyMode;
     eCsrBand eBand;
     tANI_U32 RTSThreshold;
@@ -988,6 +998,14 @@
 
     //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
     tANI_BOOLEAN fScanTwice;
+#ifdef WLAN_FEATURE_11AC
+    tANI_U32  nVhtChannelWidth;
+#endif
+
+    /*
+    * To enable/disable scanning only 2.4Ghz channels on first scan
+    */
+    tANI_BOOLEAN fFirstScanOnly2GChnl;
 
 }tCsrConfigParam;   
 
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h
index 09468f9..8d9b406 100644
--- a/CORE/SME/inc/csrInternal.h
+++ b/CORE/SME/inc/csrInternal.h
@@ -89,10 +89,16 @@
     eCSR_CFG_DOT11_MODE_11N,   
     eCSR_CFG_DOT11_MODE_POLARIS,    
     eCSR_CFG_DOT11_MODE_TITAN,    
+#ifdef WLAN_FEATURE_11AC
+    eCSR_CFG_DOT11_MODE_11AC,
+#endif
 #ifdef WLAN_SOFTAP_FEATURE
     eCSR_CFG_DOT11_MODE_11G_ONLY,    
     eCSR_CFG_DOT11_MODE_11N_ONLY,   
 #endif 
+#ifdef WLAN_FEATURE_11AC
+    eCSR_CFG_DOT11_MODE_11AC_ONLY,
+#endif 
     //This value can never set to CFG. It is for CSR's internal use
     eCSR_CFG_DOT11_MODE_AUTO,
 }eCsrCfgDot11Mode;  //Used to determine what to set to the WNI_CFG_DOT11_MODE
@@ -201,6 +207,7 @@
     eCsrStartIbss,
     eCsrStartIbssSameIbss,
     eCsrReassocToSelfNoCapChange,
+    eCsrStopRoamingDueToConcurrency,
     
 }eCsrJoinState;
 
@@ -306,7 +313,7 @@
     tANI_U32 uJoinTimeOut;
     tSirMacCapabilityInfo BssCap;
     tANI_BOOLEAN f11hSupport;
-    tAniCBSecondaryMode cbMode;
+    ePhyChanBondState cbMode;
 }tBssConfigParam;
 
 
@@ -315,7 +322,7 @@
     tSirMacSSid         ssId;
     tCsrBssid           bssid;    //this is the BSSID for the party we want to join (only use for IBSS or WDS)
     tSirNwType          sirNwType;
-    tAniCBSecondaryMode cbMode;
+    ePhyChanBondState   cbMode;
     tSirMacRateSet      operationalRateSet;
     tSirMacRateSet      extendedRateSet;
     tANI_U8             operationChn;
@@ -561,10 +568,15 @@
     tANI_BOOLEAN addTSWhenACMIsOff;
 
     tANI_BOOLEAN fValidateList;
-    tANI_BOOLEAN concurrencyEnabled;
+#ifndef BMPS_WORKAROUND_NOT_NEEDED
+    tANI_BOOLEAN doBMPSWorkaround;
+#endif
 
     //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
     tANI_BOOLEAN fScanTwice;
+#ifdef WLAN_FEATURE_11AC
+    tANI_U32  nVhtChannelWidth;
+#endif
 
 }tCsrConfig;
 
@@ -661,6 +673,11 @@
     * (apprx 1.3 sec) */
     tANI_BOOLEAN fEnableDFSChnlScan;
 
+    /*
+    * To enable/disable scanning only 2.4Ghz channels on first scan
+    */
+    tANI_BOOLEAN fFirstScanOnly2GChnl;
+
     tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
 
 #ifdef WLAN_AP_STA_CONCURRENCY
@@ -909,10 +926,19 @@
         ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
         (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
         
+#ifdef WLAN_FEATURE_11AC
+#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
+        ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
+        (eCSR_DOT11_MODE_11ac & (phyMode)) || \
+        (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
+        (eCSR_DOT11_MODE_AUTO & (phyMode)))
+#else
 #define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
         ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
         (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
         (eCSR_DOT11_MODE_AUTO & (phyMode)))
+#endif
+
 
 // this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
 // it is NOT operating in the 5.0 GHz band.
@@ -948,7 +974,7 @@
         (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
 
 #define CSR_IS_CHANNEL_5GHZ(chnNum) \
-        ((chnNum) > CSR_MAX_24GHz_CHANNEL_NUMBER)
+        (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
 
 #define CSR_IS_CHANNEL_24GHZ(chnNum) \
         (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
@@ -1010,11 +1036,16 @@
 tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
 tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
 tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
+tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
+#ifndef BMPS_WORKAROUND_NOT_NEEDED
+tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
+#endif
 tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
 tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
 tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
 eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
-tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId);
+tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
+                                                  tSirBssDescription *pBssDesc);
 #ifdef WLAN_SOFTAP_FEATURE
 tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
 #endif
@@ -1185,8 +1216,9 @@
 tANI_BOOLEAN csrRoamIsCCXAssoc(tpAniSirGlobal pMac);
 #endif
 
-
+#ifndef BMPS_WORKAROUND_NOT_NEEDED
 void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
+#endif
 #ifdef FEATURE_WLAN_LFR
 //Returns whether "Legacy Fast Roaming" is enabled...or not
 tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac);
diff --git a/CORE/SME/inc/csrSupport.h b/CORE/SME/inc/csrSupport.h
index d7257e7..3a2368e 100644
--- a/CORE/SME/inc/csrSupport.h
+++ b/CORE/SME/inc/csrSupport.h
@@ -799,6 +799,15 @@
                       tCsrRoamModifyProfileFields *pModProfileFields,
                       tANI_U32 *pRoamId, v_BOOL_t fForce);
 
+eHalStatus
+csrIsconcurrentsessionValid(tpAniSirGlobal pMac,tANI_U32 cursessionId,
+                                 tVOS_CON_MODE currBssPersona);
+
+//BeaconInterval valiadation for MCC support
+eHalStatus csrValidateBeaconInterval(tpAniSirGlobal pMac, tANI_U8 channelId, 
+                                     tANI_U16 *beaconInterval, tANI_U32 cursessionId,
+                                     tVOS_CON_MODE currBssPersona);
+
 #ifdef WLAN_FEATURE_VOWIFI_11R
 tANI_BOOLEAN csrIsProfile11r( tCsrRoamProfile *pProfile );
 tANI_BOOLEAN csrIsAuthType11r( eCsrAuthType AuthType );
diff --git a/CORE/SME/inc/measApi.h b/CORE/SME/inc/measApi.h
deleted file mode 100644
index 1e9b029..0000000
--- a/CORE/SME/inc/measApi.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- *
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
diff --git a/CORE/SME/inc/measInternal.h b/CORE/SME/inc/measInternal.h
deleted file mode 100644
index 1e9b029..0000000
--- a/CORE/SME/inc/measInternal.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- *
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
diff --git a/CORE/SME/inc/oemDataApi.h b/CORE/SME/inc/oemDataApi.h
new file mode 100644
index 0000000..0c665db
--- /dev/null
+++ b/CORE/SME/inc/oemDataApi.h
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+/** ------------------------------------------------------------------------- * 
+    ------------------------------------------------------------------------- *  
+
+  
+    \file oemDataApi.h
+  
+    Exports and types for the Common OEM DATA REQ/RSP Module interfaces.
+  
+    Copyright (C) 2010 Qualcomm Inc.
+  
+ 
+   ========================================================================== */
+
+#ifndef __OEM_DATA_API_H__
+#define __OEM_DATA_API_H__
+#include "sirApi.h"
+#include "sirMacProtDef.h"
+#include "csrLinkList.h"
+
+#ifndef OEM_DATA_REQ_SIZE
+#define OEM_DATA_REQ_SIZE 70
+#endif
+
+#ifndef OEM_DATA_RSP_SIZE
+#define OEM_DATA_RSP_SIZE 968
+#endif
+
+/*************************************************************************************************************
+  OEM DATA REQ/RSP - DATA STRUCTURES
+*************************************************************************************************************/
+
+/* Structure for defining req sent to the PE */
+typedef struct tagOemDataReq
+{
+    tANI_U8   sessionId;
+    tANI_U8   oemDataReq[OEM_DATA_REQ_SIZE];
+} tOemDataReq, tOemDataReqConfig;
+
+/*************************************************************************************************************
+  OEM DATA RESPONSE - DATA STRUCTURES
+*************************************************************************************************************/
+typedef struct tagOemDataRsp
+{
+    tANI_U8   oemDataRsp[OEM_DATA_RSP_SIZE];
+} tOemDataRsp;
+
+/*************************************************************************************************************/
+
+typedef enum
+{
+    eOEM_DATA_REQ_SUCCESS=1,
+    eOEM_DATA_REQ_FAILURE,
+    eOEM_DATA_REQ_INVALID_MODE,
+} eOemDataReqStatus;
+
+/* ---------------------------------------------------------------------------
+    \fn oemData_OemDataReqOpen
+    \brief This function must be called before any API call to MEAS (OEM DATA REQ/RSP module)
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+
+eHalStatus oemData_OemDataReqOpen(tHalHandle hHal);
+
+/* ---------------------------------------------------------------------------
+    \fn oemData_OemDataReqClose
+    \brief This function must be called before closing the csr module
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+
+eHalStatus oemData_OemDataReqClose(tHalHandle hHal);
+
+/* HDD Callback function for the sme to callback when the oem data rsp is available */
+typedef eHalStatus (*oemData_OemDataReqCompleteCallback)(
+                                           tHalHandle, 
+                                           void* p2, 
+                                           tANI_U32 oemDataReqID, 
+                                           eOemDataReqStatus status);
+
+/* ---------------------------------------------------------------------------
+    \fn oemData_OemDataReq
+    \brief Request an OEM DATA RSP
+    \param sessionId - Id of session to be used
+    \param pOemDataReqID - pointer to an object to get back the request ID
+    \param callback - a callback function that is called upon finish
+    \param pContext - a pointer passed in for the callback
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+eHalStatus oemData_OemDataReq(tHalHandle, tANI_U8, tOemDataReqConfig *, tANI_U32 *pOemDataReqID, 
+                            oemData_OemDataReqCompleteCallback callback, void *pContext);
+
+/* ---------------------------------------------------------------------------
+    \fn sme_HandleOemDataRsp
+    \brief This function processes the oem data response obtained from the PE
+    \param pMsg - Pointer to the pSirSmeOemDataRsp
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8*);
+
+/* ---------------------------------------------------------------------------
+    \fn oemData_IsOemDataReqAllowed
+    \brief This function checks if oem data req/rsp can be performed in the 
+           current driver state
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+eHalStatus oemData_IsOemDataReqAllowed(tHalHandle hHal);
+
+#endif //_OEM_DATA_API_H__
+
+#endif //FEATURE_OEM_DATA_SUPPORT
diff --git a/CORE/SME/inc/oemDataInternal.h b/CORE/SME/inc/oemDataInternal.h
new file mode 100644
index 0000000..82c9197
--- /dev/null
+++ b/CORE/SME/inc/oemDataInternal.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+/** ------------------------------------------------------------------------- * 
+    ------------------------------------------------------------------------- *  
+
+  
+    \file oemDataInternal.h
+  
+    Exports and types for the Common OEM DATA REQ/RSP Module interfaces.
+  
+    Copyright (C) 2010 Qualcomm Inc.
+  
+   ========================================================================== */
+
+
+#ifndef __OEM_DATA_INTERNAL_H__
+#define __OEM_DATA_INTERNAL_H__
+
+#include "palTimer.h"
+#include "csrSupport.h"
+#include "vos_nvitem.h"
+#include "wlan_qct_tl.h"
+
+#include "oemDataApi.h"
+
+typedef struct tagOemDataStruct
+{
+    tANI_U32                         nextOemReqId; //a global req id
+    tANI_BOOLEAN                     oemDataReqActive; //indicates that currently a request has been posted and 
+                                                        //waiting for the response
+    oemData_OemDataReqCompleteCallback   callback; //callback function pointer for returning the response
+    void*                            pContext; //context of the original caller
+    tANI_U32                         oemDataReqID; //original request ID
+    tOemDataRsp*                     pOemDataRsp; //response
+    tOemDataReqConfig                oemDataReqConfig; //current oem data request
+    tANI_U8                          sessionId; //Session on which oem data req is active
+} tOemDataStruct;
+
+typedef struct tagOemDataCmd
+{
+    tANI_U32                            oemDataReqID;
+    oemData_OemDataReqCompleteCallback      callback;
+    void*                               pContext;
+    tOemDataReq                         oemDataReq;
+} tOemDataCmd;
+
+#endif //__OEM_DATA_INTERNAL_H__
+
+#endif //FEATURE_OEM_DATA_SUPPORT
diff --git a/CORE/SME/inc/p2p_Api.h b/CORE/SME/inc/p2p_Api.h
index 13276de..47449bc 100644
--- a/CORE/SME/inc/p2p_Api.h
+++ b/CORE/SME/inc/p2p_Api.h
@@ -476,7 +476,8 @@
 eHalStatus sme_updateP2pIe( tHalHandle hHal, void *p2pIe, 
                             tANI_U32 p2pIeLength );
 eHalStatus sme_sendAction( tHalHandle hHal, tANI_U8 sessionId,
-                           const tANI_U8 *pBuf, tANI_U32 len );
+                           const tANI_U8 *pBuf, tANI_U32 len,
+                           tANI_U16 wait, tANI_BOOLEAN noack);
 eHalStatus sme_CancelRemainOnChannel( tHalHandle hHal, tANI_U8 sessionId );
 eHalStatus sme_p2pOpen( tHalHandle hHal );
 eHalStatus p2pStop( tHalHandle hHal );
@@ -493,7 +494,8 @@
                                remainOnChanCallback callback, void *pContext);
 #endif
 eHalStatus p2pSendAction( tHalHandle hHal, tANI_U8 sessionId,
-                          const tANI_U8 *pBuf, tANI_U32 len );
+                          const tANI_U8 *pBuf, tANI_U32 len,
+                           tANI_U16 wait, tANI_BOOLEAN noack);
 eHalStatus p2pCancelRemainOnChannel( tHalHandle hHal, tANI_U8 sessionId );
 eHalStatus p2pSetPs( tHalHandle hHal, tP2pPsConfig *pNoA );
 #ifdef WLAN_FEATURE_P2P_INTERNAL
diff --git a/CORE/SME/inc/pmcApi.h b/CORE/SME/inc/pmcApi.h
index 05a7fff..fc01a98 100644
--- a/CORE/SME/inc/pmcApi.h
+++ b/CORE/SME/inc/pmcApi.h
@@ -420,7 +420,8 @@
 extern eHalStatus pmcExitWowl (tHalHandle hHal);
 
 
-extern eHalStatus pmcSetHostOffload (tHalHandle hHal, tpSirHostOffloadReq pRequest);
+extern eHalStatus pmcSetHostOffload (tHalHandle hHal, tpSirHostOffloadReq pRequest,
+                                          tANI_U8 *bssId);
 
 /* ---------------------------------------------------------------------------
     \fn pmcSetKeepAlive
@@ -431,7 +432,7 @@
             eHAL_STATUS_FAILURE  Cannot set the keepalive.
             eHAL_STATUS_SUCCESS  Request accepted. 
   ---------------------------------------------------------------------------*/
-extern eHalStatus pmcSetKeepAlive (tHalHandle hHal, tpSirKeepAliveReq pRequest);
+extern eHalStatus pmcSetKeepAlive (tHalHandle hHal, tpSirKeepAliveReq pRequest, tANI_U8 *bssId);
 
 extern tANI_BOOLEAN pmcValidateConnectState( tHalHandle hHal );
 
diff --git a/CORE/SME/inc/smeInside.h b/CORE/SME/inc/smeInside.h
index 742ac7d..c89f4eb 100644
--- a/CORE/SME/inc/smeInside.h
+++ b/CORE/SME/inc/smeInside.h
@@ -51,6 +51,9 @@
 #include "smeQosInternal.h"
 
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+#include "oemDataInternal.h"
+#endif
 
 #if defined WLAN_FEATURE_VOWIFI
 #include "sme_RrmApi.h"
@@ -114,6 +117,9 @@
         tRemoveKeyCmd removeKeyCmd;
         tGenericPmcCmd pmcCmd;
         tGenericQosCmd qosCmd;
+#ifdef FEATURE_OEM_DATA_SUPPORT
+        tOemDataCmd oemDataCmd;
+#endif
 #ifdef WLAN_FEATURE_P2P
         tRemainChlCmd remainChlCmd;
         tNoACmd NoACmd;
@@ -165,6 +171,9 @@
 eHalStatus sme_AcquireGlobalLock( tSmeStruct *psSme);
 eHalStatus sme_ReleaseGlobalLock( tSmeStruct *psSme);
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+eHalStatus oemData_ProcessOemDataReqCommand(tpAniSirGlobal pMac, tSmeCmd *pCommand);
+#endif
 
 eHalStatus csrProcessAddStaSessionCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand );
 eHalStatus csrProcessAddStaSessionRsp( tpAniSirGlobal pMac, tANI_U8 *pMsg);
@@ -181,7 +190,7 @@
             eHAL_STATUS_FAILURE  Cannot set the offload.
             eHAL_STATUS_SUCCESS  Request accepted. 
   ---------------------------------------------------------------------------*/
-eHalStatus pmcSetNSOffload (tHalHandle hHal, tpSirHostOffloadReq pRequest);
+eHalStatus pmcSetNSOffload (tHalHandle hHal, tpSirHostOffloadReq pRequest, tANI_U8 *bssId);
 #endif //WLAN_NS_OFFLOAD
 
 #ifdef FEATURE_WLAN_SCAN_PNO
diff --git a/CORE/SME/inc/smeInternal.h b/CORE/SME/inc/smeInternal.h
index 3d27d9b..2494651 100644
--- a/CORE/SME/inc/smeInternal.h
+++ b/CORE/SME/inc/smeInternal.h
@@ -80,6 +80,9 @@
     eSmeQosCommandMask = 0x40000,  //To identify Qos commands
     eSmeCommandAddTs,
     eSmeCommandDelTs,
+#ifdef FEATURE_OEM_DATA_SUPPORT
+    eSmeCommandOemDataReq = 0x80000, //To identify the oem data commands
+#endif
 #ifdef WLAN_FEATURE_P2P
     eSmeCommandRemainOnChannel,
     eSmeCommandNoAUpdate,
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index eed1638..8ccdf97 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -54,6 +54,9 @@
 #include "halFw.h"
 #endif
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+#include "oemDataApi.h"
+#endif
 
 #if defined WLAN_FEATURE_VOWIFI
 #include "smeRrmInternal.h"
@@ -1548,6 +1551,35 @@
                                         tANI_U32 *pNumItems );
 #endif /* FEATURE_WLAN_WAPI */
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/********************************************************************************************
+  Oem data related modifications
+*********************************************************************************************/
+/* ---------------------------------------------------------------------------
+    \fn sme_OemDataReq
+    \param sessionId - session id of session to be used for oem data req.
+    \param pOemDataReqID - pointer to an object to get back the request ID
+    \param callback - a callback function that is called upon finish
+    \param pContext - a pointer passed in for the callback
+    \return eHalStatus     
+  ---------------------------------------------------------------------------*/
+eHalStatus sme_OemDataReq(tHalHandle hHal, 
+                                       tANI_U8 sessionId,
+                                       tOemDataReqConfig *, 
+                                       tANI_U32 *pOemDataReqID, 
+                                       oemData_OemDataReqCompleteCallback callback, 
+                                       void *pContext);
+
+/* ---------------------------------------------------------------------------
+    \fn sme_getOemDataRsp
+    \param pOemDataRsp - A pointer to the response object
+    \param pOemDataReqID - pointer to an object to get back the request ID
+    \return eHalStatus     
+  ---------------------------------------------------------------------------*/
+eHalStatus sme_getOemDataRsp(tHalHandle hHal, 
+                                         tOemDataRsp **pOemDataRsp);
+
+#endif /*FEATURE_OEM_DATA_SUPPORT*/
 
 
 #ifdef WLAN_SOFTAP_FEATURE
@@ -1608,7 +1640,8 @@
     \param  pRequest -  Pointer to the offload request.
     \return eHalStatus
    ---------------------------------------------------------------------------*/
-eHalStatus sme_SetHostOffload (tHalHandle hHal, tpSirHostOffloadReq pRequest);
+eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
+                                    tpSirHostOffloadReq pRequest);
 
 /* ---------------------------------------------------------------------------
     \fn sme_SetKeepAlive
@@ -1617,7 +1650,8 @@
     \param  pRequest -  Pointer to the Keep Alive request.
     \return eHalStatus
   ---------------------------------------------------------------------------*/
-eHalStatus sme_SetKeepAlive (tHalHandle hHal, tpSirKeepAliveReq pRequest);
+eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
+                                  tpSirKeepAliveReq pRequest);
 
 
 /* ---------------------------------------------------------------------------
@@ -1906,7 +1940,8 @@
     \param  pRcvPktFilterCfg - Receive Packet Filter parameter
     \return eHalStatus   
   ---------------------------------------------------------------------------*/
-eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg);
+eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
+                                           tANI_U8 sessionId);
 
 /* ---------------------------------------------------------------------------
     \fn sme_GetFilterMatchCount
@@ -1928,7 +1963,8 @@
     \return eHalStatus   
   ---------------------------------------------------------------------------*/
 eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
-                                        tpSirRcvFltPktClearParam pRcvFltPktClearParam);
+                                        tpSirRcvFltPktClearParam pRcvFltPktClearParam,
+                                        tANI_U8  sessionId);
 #endif // WLAN_FEATURE_PACKET_FILTERING
 /* ---------------------------------------------------------------------------
 
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index c2c6059..3381d94 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -21,7 +21,7 @@
 
 /** ------------------------------------------------------------------------- * 
     ------------------------------------------------------------------------- *  
-
+  
   
     \file csrApiRoam.c
   
@@ -31,36 +31,27 @@
   
  
    ========================================================================== */
-
 /*===========================================================================
-
                       EDIT HISTORY FOR FILE
 
-
   This section contains comments describing changes made to the module.
   Notice that changes are listed in reverse chronological order.
 
-
-
   when            who                 what, where, why
 ----------       ---                --------------------------------------------------------
 06/03/10     js                     Added support to hostapd driven 
  *                                  deauth/disassoc/mic failure
-
 ===========================================================================*/
-
 #include "aniGlobal.h" //for tpAniSirGlobal
 #include "wlan_qct_wda.h"
-
 #ifdef FEATURE_WLAN_INTEGRATED_SOC
 #include "halMsgApi.h" //for HAL_STA_INVALID_IDX.
 #endif
-
 #ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
 #include "halPhyApi.h"
 #include "halInternal.h"
 #endif
-
+#include "limUtils.h"
 #include "palApi.h"
 #include "csrInsideApi.h"
 #include "smsDebug.h"
@@ -73,15 +64,12 @@
 #include "csrApi.h"
 #include "pmc.h"
 #include "vos_nvitem.h"
-
 #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
 #include "csrNeighborRoam.h"
 #endif /* WLAN_FEATURE_NEIGHBOR_ROAMING */
-
 #ifdef FEATURE_WLAN_CCX
 #include "csrCcx.h"
 #endif /* FEATURE_WLAN_CCX */
-
 #define CSR_NUM_IBSS_START_CHANNELS_50      4
 #define CSR_NUM_IBSS_START_CHANNELS_24      3
 #define CSR_DEF_IBSS_START_CHANNEL_50       36
@@ -93,7 +81,6 @@
   OBIWAN recommends [8 10]% : pick 9% 
 ---------------------------------------------------------------------------*/
 #define CSR_VCC_UL_MAC_LOSS_THRESHOLD 9
-
 /*---------------------------------------------------------------------------
   OBIWAN recommends -85dBm 
 ---------------------------------------------------------------------------*/
@@ -102,51 +89,43 @@
 #define CSR_MIN_GLOBAL_STAT_QUERY_PERIOD_IN_BMPS 2000 //ms
 #define CSR_MIN_TL_STAT_QUERY_PERIOD       500 //ms
 #define CSR_DIAG_LOG_STAT_PERIOD           3000 //ms
-
 //We use constatnt 4 here
 //This macro returns true when higher AC parameter is bigger than lower AC for a difference
 //The bigger the number, the less chance of TX
 //It must put lower AC as the first parameter.
 #define SME_DETECT_AC_WEIGHT_DIFF(loAC, hiAC)   (v_BOOL_t)(((hiAC) > (loAC)) ? (((hiAC)-(loAC)) > 4) : 0)
-
 //Flag to send/do not send disassoc frame over the air
 #define CSR_DONT_SEND_DISASSOC_OVER_THE_AIR 1
-
 #define RSSI_HACK_BMPS (-40)
+#define MAX_CB_VALUE_IN_INI (2)
+
 /*-------------------------------------------------------------------------- 
   Static Type declarations
   ------------------------------------------------------------------------*/
 static tChannelListWithPower csrRoamPowerTableFromEeprom[WNI_CFG_VALID_CHANNEL_LIST_LEN];
 static tChannelListWithPower csrRoamPowerTableFromEeprom40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN];
 static tCsrRoamSession       csrRoamRoamSession[CSR_ROAM_SESSION_MAX];
-
 /*-------------------------------------------------------------------------- 
   Type declarations
   ------------------------------------------------------------------------*/
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
-
 int diagAuthTypeFromCSRType(eCsrAuthType authType)
 {
     int n = AUTH_OPEN;
-
     switch(authType)
     {
     case eCSR_AUTH_TYPE_SHARED_KEY:
         n = AUTH_SHARED;
         break;
-
     case eCSR_AUTH_TYPE_WPA:
         n = AUTH_WPA_EAP;
         break;
-
     case eCSR_AUTH_TYPE_WPA_PSK:
         n = AUTH_WPA_PSK;
         break;
-
     case eCSR_AUTH_TYPE_RSN:
         n = AUTH_WPA2_EAP;
         break;
-
     case eCSR_AUTH_TYPE_RSN_PSK:
         n = AUTH_WPA2_PSK;
         break;
@@ -154,43 +133,34 @@
     case eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE:
         n = AUTH_WAPI_CERT;
         break;
-
     case eCSR_AUTH_TYPE_WAPI_WAI_PSK:
         n = AUTH_WAPI_PSK;
         break;
 #endif /* FEATURE_WLAN_WAPI */
-
     default:
         break;
     }
-
     return (n);
 }
-
 int diagEncTypeFromCSRType(eCsrEncryptionType encType)
 {
     int n = ENC_MODE_OPEN;
-
     switch(encType)
     {
     case eCSR_ENCRYPT_TYPE_WEP40_STATICKEY:
     case eCSR_ENCRYPT_TYPE_WEP40:
         n = ENC_MODE_WEP40;
         break;
-
     case eCSR_ENCRYPT_TYPE_WEP104_STATICKEY:
     case eCSR_ENCRYPT_TYPE_WEP104:
         n = ENC_MODE_WEP104;
         break;
-
     case eCSR_ENCRYPT_TYPE_TKIP:
         n = ENC_MODE_TKIP;
         break;
-
     case eCSR_ENCRYPT_TYPE_AES:
         n = ENC_MODE_AES;
         break;
-
 #ifdef FEATURE_WLAN_WAPI
     case eCSR_ENCRYPT_TYPE_WPI:
         n = ENC_MODE_SMS4;
@@ -199,15 +169,11 @@
     default:
         break;
     }
-
     return (n);
 }
-
 #endif //#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
-
 static const tANI_U8 csrStartIbssChannels50[ CSR_NUM_IBSS_START_CHANNELS_50 ] = { 36, 40,  44,  48}; 
 static const tANI_U8 csrStartIbssChannels24[ CSR_NUM_IBSS_START_CHANNELS_24 ] = { 1, 6, 11 };
-
 static void initConfigParam(tpAniSirGlobal pMac);
 static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pCommand,
                                        eCsrRoamCompleteResult Result, void *Context );
@@ -216,8 +182,8 @@
                                     tANI_BOOLEAN *pfSameIbss );
 static void csrRoamUpdateConnectedProfileFromNewBss( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirSmeNewBssInfo *pNewBss );
 static void csrRoamPrepareBssParams(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, 
-                                     tSirBssDescription *pBssDesc, tDot11fBeaconIEs *pIes);
-static tAniCBSecondaryMode csrGetCBModeFromIes(tpAniSirGlobal pMac, tANI_U8 primaryChn, tDot11fBeaconIEs *pIes);
+                                     tSirBssDescription *pBssDesc, tBssConfigParam *pBssConfig, tDot11fBeaconIEs *pIes);
+static ePhyChanBondState csrGetCBModeFromIes(tpAniSirGlobal pMac, tANI_U8 primaryChn, tDot11fBeaconIEs *pIes);
 eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
 static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 result );
 eHalStatus csrRoamOpen(tpAniSirGlobal pMac);
@@ -237,6 +203,7 @@
 static void csrRoamWaitForKeyTimeOutHandler(void *pv);
  
 static eHalStatus CsrInit11dInfo(tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo);
+static eHalStatus csrInitChannelPowerList( tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo);
 static eHalStatus csrRoamFreeConnectedInfo( tpAniSirGlobal pMac, tCsrRoamConnectedInfo *pConnectedInfo );
 eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, 
            tSirMacAddr peerMacAddr, tANI_U8 numKeys, tAniEdType edType, 
@@ -248,7 +215,6 @@
                                     tCsrRoamProfile *pProfile );
 void csrRoamStatisticsTimerHandler(void *pv);
 void csrRoamStatsGlobalClassDTimerHandler(void *pv);
-
 static void csrRoamLinkUp(tpAniSirGlobal pMac, tCsrBssid bssid);
 VOS_STATUS csrRoamVccTriggerRssiIndCallback(tHalHandle hHal, 
                                             v_U8_t  rssiNotification, 
@@ -260,15 +226,12 @@
     pStaEntry is no longer invalid upon the return of this function.
 */
 static void csrRoamRemoveStatListEntry(tpAniSirGlobal pMac, tListElem *pEntry);
-
 #ifdef WLAN_SOFTAP_FEATURE
 static eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile,tANI_U8 operationChn, eCsrBand *pBand );
 #else
 static eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, eCsrPhyMode phyModeIn, tANI_U8 operationChn, eCsrBand *pBand );
 #endif
 static eHalStatus csrRoamGetQosInfoFromBss(tpAniSirGlobal pMac, tSirBssDescription *pBssDesc);
-
-
 tCsrStatsClientReqInfo * csrRoamInsertEntryIntoList( tpAniSirGlobal pMac,
                                                      tDblLinkList *pStaList,
                                                      tCsrStatsClientReqInfo *pStaEntry);
@@ -277,7 +240,7 @@
                                                  tANI_U32 periodicity, tANI_BOOLEAN *pFound, tANI_U8 staId);
 void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask, 
                              tCsrStatsCallback callback, tANI_U8 staId, void *pContext);
-void csrRoamSaveStatsFromTl(tpAniSirGlobal pMac, WLANTL_TRANSFER_STA_TYPE tlStats);
+void csrRoamSaveStatsFromTl(tpAniSirGlobal pMac, WLANTL_TRANSFER_STA_TYPE *pTlStats);
 void csrRoamTlStatsTimerHandler(void *pv);
 void csrRoamPeStatsTimerHandler(void *pv);
 tListElem * csrRoamCheckClientReqList(tpAniSirGlobal pMac, tANI_U32 statsMask);
@@ -296,9 +259,7 @@
 void csrRoamJoinRetryTimerHandler(void *pv);
 #endif
 extern void SysProcessMmhMsg(tpAniSirGlobal pMac, tSirMsgQ* pMsg);
-
 extern void btampEstablishLogLinkHdlr(void* pMsg);
-
 static void csrSerDesUnpackDiassocRsp(tANI_U8 *pBuf, tSirSmeDisassocRsp *pRsp);
 
 //Initialize global variables
@@ -313,7 +274,6 @@
     return;
 }
 
-
 static void csrRoamDeInitGlobals(tpAniSirGlobal pMac)
 {
     if(pMac)
@@ -324,13 +284,11 @@
     }
     return;
 }
-
 eHalStatus csrOpen(tpAniSirGlobal pMac)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     static uNvTables nvTables;
     VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
-
     v_REGDOMAIN_t regId;
     tANI_U32 i;
     
@@ -338,7 +296,6 @@
     {
         /* Initialize CSR Roam Globals */
         csrRoamInitGlobals(pMac);
-
         for( i = 0; i < CSR_ROAM_SESSION_MAX; i++ )
            csrRoamStateChange( pMac, eCSR_ROAMING_STATE_STOP, i);
 
@@ -354,7 +311,6 @@
            break;
         if(!HAL_STATUS_SUCCESS(csrLLOpen(pMac->hHdd, &pMac->roam.roamCmdPendingList)))
            break;
-
         vosStatus = vos_nv_readDefaultCountryTable( &nvTables );
         if ( VOS_IS_STATUS_SUCCESS(vosStatus) )
         {
@@ -372,23 +328,18 @@
             //status = eHAL_STATUS_SUCCESS;
         }
         smsLog( pMac, LOGE, FL(" country Code from nvRam %s\n"), pMac->scan.countryCodeDefault );
-
         csrGetRegulatoryDomainForCountry(pMac, pMac->scan.countryCodeDefault, &regId);
-
         WDA_SetRegDomain(pMac, regId);
         pMac->scan.domainIdDefault = regId;
         pMac->scan.domainIdCurrent = pMac->scan.domainIdDefault;
-
         status = palCopyMemory(pMac->hHdd, pMac->scan.countryCodeCurrent, 
                          pMac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN);
         status = csrInitGetChannels( pMac );
-
     }while(0);
     
     return (status);
 }
 
-
 #ifdef WLAN_SOFTAP_FEATURE
 eHalStatus csrSetRegInfo(tHalHandle hHal,  tANI_U8 *apCntryCode)
 {
@@ -396,37 +347,30 @@
     tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
     v_REGDOMAIN_t regId;
     v_U8_t        cntryCodeLength;
-
     if(NULL == apCntryCode)
     {
        smsLog( pMac, LOGW, FL(" Invalid country Code Pointer\n") );
        return eHAL_STATUS_FAILURE;
     }
-
     smsLog( pMac, LOGW, FL(" country Code %s\n"), apCntryCode );
-
     /* To get correct Regulatory domain from NV table 
      * 2 character Country code should be used
      * 3rd charater is optional for indoor/outdoor setting */
     cntryCodeLength = strlen(apCntryCode);
-
     status = csrGetRegulatoryDomainForCountry(pMac, apCntryCode, &regId);
     if (status != eHAL_STATUS_SUCCESS)
     {
         smsLog( pMac, LOGE, FL("  fail to get regId for country Code %s\n"), apCntryCode );
         return status;
     }
-
     status = WDA_SetRegDomain(hHal, regId);
     if (status != eHAL_STATUS_SUCCESS)
     {
         smsLog( pMac, LOGE, FL("  fail to get regId for country Code %s\n"), apCntryCode );
         return status;
     }
-
     pMac->scan.domainIdDefault = regId;
     pMac->scan.domainIdCurrent = pMac->scan.domainIdDefault;
-
     /* Clear CC field */
     palFillMemory( pMac->hHdd,
                    pMac->scan.countryCodeDefault,
@@ -435,7 +379,6 @@
     /* Copy 2 or 3 bytes country code */
     palCopyMemory( pMac->hHdd, pMac->scan.countryCodeDefault, 
                 apCntryCode, cntryCodeLength );
-
     /* If 2 bytes country code, 3rd byte must be filled with space */
     if((WNI_CFG_COUNTRY_CODE_LEN - 1) == cntryCodeLength)
     {
@@ -444,23 +387,18 @@
                       1,
                       0x20 );
     }
-
     status = palCopyMemory(pMac->hHdd, pMac->scan.countryCodeCurrent, 
                                pMac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN);
     status = csrInitGetChannels( pMac );
-
     return status;
 }
-
 eHalStatus csrSetChannels(tHalHandle hHal,  tCsrConfigParam *pParam  )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
     tANI_U8   index = 0;
-
     palCopyMemory( pMac->hHdd, pParam->Csr11dinfo.countryCode, 
                    pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN );
-
     for ( index = 0; index < pMac->scan.base20MHzChannels.numChannels ; index++)
     {
         pParam->Csr11dinfo.Channels.channelList[index] = pMac->scan.base20MHzChannels.channelList[ index ];
@@ -473,7 +411,6 @@
     return status;
 }
 #endif
-
 eHalStatus csrClose(tpAniSirGlobal pMac)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -484,13 +421,10 @@
     csrLLClose(&pMac->roam.statsClientReqList);
     csrLLClose(&pMac->roam.peStatsReqList);
     csrLLClose(&pMac->roam.roamCmdPendingList);
-
     /* DeInit Globals */
     csrRoamDeInitGlobals(pMac);
-
     return (status);
 } 
-
 eHalStatus csrStart(tpAniSirGlobal pMac)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -524,15 +458,12 @@
            break;
         }
     }while(0);
-
 #if defined(ANI_LOGDUMP)
     csrDumpInit(pMac);
 #endif //#if defined(ANI_LOGDUMP)
-
     return (status);
 }
 
-
 eHalStatus csrStop(tpAniSirGlobal pMac)
 {
     tANI_U32 sessionId;
@@ -542,22 +473,18 @@
     {
         csrRoamCloseSession(pMac, sessionId, TRUE, NULL, NULL);
     }
-
     csrScanDisable(pMac);
     pMac->scan.fCancelIdleScan = eANI_BOOLEAN_FALSE;
     pMac->scan.fRestartIdleScan = eANI_BOOLEAN_FALSE;
-
     csrLLPurge( &pMac->roam.roamCmdPendingList, eANI_BOOLEAN_TRUE );
     
 #if   defined WLAN_FEATURE_NEIGHBOR_ROAMING
     csrNeighborRoamClose(pMac);
 #endif
     csrScanFlushResult(pMac); //Do we want to do this?
-
     // deregister from PMC since we register during csrStart()
     // (ignore status since there is nothing we can do if it fails)
     (void) pmcDeregisterPowerSaveCheck(pMac, csrCheckPSReady);
-
     //Reset the domain back to the deault
     pMac->scan.domainIdCurrent = pMac->scan.domainIdDefault;
     csrResetCountryInformation(pMac, eANI_BOOLEAN_TRUE);
@@ -571,49 +498,44 @@
     return (eHAL_STATUS_SUCCESS);
 }
 
-
 eHalStatus csrReady(tpAniSirGlobal pMac)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
-
     csrScanGetSupportedChannels( pMac );
     //WNI_CFG_VALID_CHANNEL_LIST should be set by this time
     //use it to init the background scan list
     csrInitBGScanChannelList(pMac);
     /* HDD issues the init scan */
     csrScanStartResultAgingTimer(pMac);
-
     //Store the AC weights in TL for later use
     WLANTL_GetACWeights(pMac->roam.gVosContext, pMac->roam.ucACWeights);
-
     status = csrInitChannelList( pMac );
     if ( ! HAL_STATUS_SUCCESS( status ) )
     {
        smsLog( pMac, LOGE, "csrInitChannelList failed during csrReady with status=%d\n",
                status );
     }
-
     return (status);
 }
-
 void csrSetDefaultDot11Mode( tpAniSirGlobal pMac )
 {
     v_U32_t wniDot11mode = 0;
-
     wniDot11mode = csrTranslateToWNICfgDot11Mode(pMac,pMac->roam.configParam.uCfgDot11Mode);
     ccmCfgSetInt(pMac, WNI_CFG_DOT11_MODE, wniDot11mode, NULL, eANI_BOOLEAN_FALSE);
 }
-
 void csrSetGlobalCfgs( tpAniSirGlobal pMac )
 {
+
     ccmCfgSetInt(pMac, WNI_CFG_FRAGMENTATION_THRESHOLD, csrGetFragThresh(pMac), NULL, eANI_BOOLEAN_FALSE);
     ccmCfgSetInt(pMac, WNI_CFG_RTS_THRESHOLD, csrGetRTSThresh(pMac), NULL, eANI_BOOLEAN_FALSE);
     ccmCfgSetInt(pMac, WNI_CFG_11D_ENABLED,
                         ((pMac->roam.configParam.Is11hSupportEnabled) ? pMac->roam.configParam.Is11dSupportEnabled : pMac->roam.configParam.Is11dSupportEnabled), 
                         NULL, eANI_BOOLEAN_FALSE);
     ccmCfgSetInt(pMac, WNI_CFG_11H_ENABLED, pMac->roam.configParam.Is11hSupportEnabled, NULL, eANI_BOOLEAN_FALSE);
-    //Enable channel bonding at init; for 2.4 Ghz we will update this CFG at start BSS or join 
-    ccmCfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE, WNI_CFG_CHANNEL_BONDING_MODE_ENABLE, NULL, eANI_BOOLEAN_FALSE);
+    /* For now we will just use the 5GHz CB mode ini parameter to decide whether CB supported or not in Probes when there is no session
+     * Once session is established we will use the session related params stored in PE session for CB mode
+     */
+    ccmCfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE, !!(pMac->roam.configParam.channelBondingMode5GHz), NULL, eANI_BOOLEAN_FALSE);
     ccmCfgSetInt(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, pMac->roam.configParam.HeartbeatThresh24, NULL, eANI_BOOLEAN_FALSE);
     
     //Update the operating mode to configured value during initialization,
@@ -621,13 +543,11 @@
     csrSetDefaultDot11Mode( pMac );    
 }
 
-
 eHalStatus csrRoamOpen(tpAniSirGlobal pMac)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tANI_U32 i;
     tCsrRoamSession *pSession;
-
     do
     {
         for( i = 0; i < CSR_ROAM_SESSION_MAX; i++ )
@@ -636,7 +556,6 @@
             pSession->roamingTimerInfo.pMac = pMac;
             pSession->roamingTimerInfo.sessionId = CSR_SESSION_ID_INVALID;
         }
-
         pMac->roam.WaitForKeyTimerInfo.pMac = pMac;
         pMac->roam.WaitForKeyTimerInfo.sessionId = CSR_SESSION_ID_INVALID;
         status = palTimerAlloc(pMac->hHdd, &pMac->roam.hTimerWaitForKey, csrRoamWaitForKeyTimeOutHandler, 
@@ -646,7 +565,6 @@
         smsLog(pMac, LOGE, FL("cannot allocate memory for WaitForKey time out timer\n"));
         break;
       }
-
       status = palTimerAlloc(pMac->hHdd, &pMac->roam.tlStatsReqInfo.hTlStatsTimer, csrRoamTlStatsTimerHandler, pMac);
       if(!HAL_STATUS_SUCCESS(status))
       {
@@ -654,49 +572,38 @@
          return eHAL_STATUS_FAILURE;
       }
     }while (0);
-
     return (status);
 }
 
-
 eHalStatus csrRoamClose(tpAniSirGlobal pMac)
 {
     tANI_U32 sessionId;
-
     for(sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++)
     {
         csrRoamCloseSession(pMac, sessionId, TRUE, NULL, NULL);
     }
-
     palTimerStop(pMac->hHdd, pMac->roam.hTimerWaitForKey);
     palTimerFree(pMac->hHdd, pMac->roam.hTimerWaitForKey);
-
     palTimerStop(pMac->hHdd, pMac->roam.tlStatsReqInfo.hTlStatsTimer);
     palTimerFree(pMac->hHdd, pMac->roam.tlStatsReqInfo.hTlStatsTimer);
-
     return (eHAL_STATUS_SUCCESS);
 }
 
-
 eHalStatus csrRoamStart(tpAniSirGlobal pMac)
 {
     (void)pMac;
-
     return (eHAL_STATUS_SUCCESS);
 }
 
-
 void csrRoamStop(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
    csrRoamStopRoamingTimer(pMac, sessionId);
    /* deregister the clients requesting stats from PE/TL & also stop the corresponding timers*/
    csrRoamDeregStatisticsReq(pMac);
 }
-
 eHalStatus csrRoamGetConnectState(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrConnectState *pState)
 {
     eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
-
     if( pState )
     {
         status = eHAL_STATUS_SUCCESS;
@@ -705,8 +612,6 @@
     return (status);
 }
 
-
-
 eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamConnectedProfile *pProfile)
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
@@ -754,10 +659,8 @@
                     pProfile->MDID.mobilityDomain = 0;
                 }
 #endif
-
 #ifdef FEATURE_WLAN_CCX
                 pProfile->isCCXAssoc = pSession->connectedProfile.isCCXAssoc;
-
                 if (csrIsAuthTypeCCX(pSession->connectedProfile.AuthType))
                 {
                     palCopyMemory( pMac->hHdd, pProfile->ccxCckmInfo.krk, 
@@ -775,8 +678,6 @@
     return (status);
 }
 
-
-
 eHalStatus csrRoamGetConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamConnectedProfile *pProfile)
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
@@ -788,10 +689,8 @@
             status = csrRoamCopyConnectProfile(pMac, sessionId, pProfile);
         }
     }
-
     return (status);
 }
-
 eHalStatus csrRoamFreeConnectProfile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pProfile)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -805,11 +704,9 @@
     return (status);
 }
 
-
 static eHalStatus csrRoamFreeConnectedInfo( tpAniSirGlobal pMac, tCsrRoamConnectedInfo *pConnectedInfo )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
-
     if( pConnectedInfo->pbFrames )
     {
         palFreeMemory( pMac->hHdd, pConnectedInfo->pbFrames );
@@ -825,59 +722,50 @@
 #ifdef FEATURE_WLAN_CCX
     pConnectedInfo->nTspecIeLength = 0;
 #endif    
-
-
     return ( status );
 }
 
-
     
                 
+                
 void csrReleaseCommandRoam(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
     csrReinitRoamCmd(pMac, pCommand);
     csrReleaseCommand( pMac, pCommand );
 }
 
-
 void csrReleaseCommandScan(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
     csrReinitScanCmd(pMac, pCommand);
     csrReleaseCommand( pMac, pCommand );
 }
 
-
 void csrReleaseCommandWmStatusChange(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
     csrReinitWmStatusChangeCmd(pMac, pCommand);
     csrReleaseCommand( pMac, pCommand );
 }
 
-
 void csrReinitSetKeyCmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
     palZeroMemory(pMac->hHdd, &pCommand->u.setKeyCmd, sizeof(tSetKeyCmd));
 }
 
-
 void csrReinitRemoveKeyCmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
     palZeroMemory(pMac->hHdd, &pCommand->u.removeKeyCmd, sizeof(tRemoveKeyCmd));
 }
 
-
 void csrReleaseCommandSetKey(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
     csrReinitSetKeyCmd(pMac, pCommand);
     csrReleaseCommand( pMac, pCommand );
 }
-
 void csrReleaseCommandRemoveKey(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
     csrReinitRemoveKeyCmd(pMac, pCommand);
     csrReleaseCommand( pMac, pCommand );
 }
-
 void csrAbortCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand, tANI_BOOLEAN fStopping )
 {
 
@@ -896,7 +784,6 @@
             }
             csrReleaseCommandScan( pMac, pCommand );
             break;
-
         case eSmeCommandRoam:
             csrReleaseCommandRoam( pMac, pCommand );
             break;
@@ -921,21 +808,17 @@
     }
 }
 
-
-
 void csrRoamSubstateChange( tpAniSirGlobal pMac, eCsrRoamSubState NewSubstate, tANI_U32 sessionId)
 {
     smsLog( pMac, LOG1, "   CSR RoamSubstate: [ %d <== %d ]\n", NewSubstate, pMac->roam.curSubState[sessionId]);
 
-
     if(pMac->roam.curSubState[sessionId] == NewSubstate)
     {
        return;
-                }
+    }
     pMac->roam.curSubState[sessionId] = NewSubstate;
 }
 
-
 eCsrRoamState csrRoamStateChange( tpAniSirGlobal pMac, eCsrRoamState NewRoamState, tANI_U8 sessionId)
 {
     eCsrRoamState PreviousState;
@@ -957,11 +840,9 @@
     return( PreviousState );
 }
 
-
 void csrAssignRssiForCategory(tpAniSirGlobal pMac, tANI_U8 catOffset)
 {
     int i;
-
     if(catOffset)
     {
         pMac->roam.configParam.bCatRssiOffset = catOffset;
@@ -972,14 +853,13 @@
     }
 }
 
-
 static void initConfigParam(tpAniSirGlobal pMac)
 {
     int i;
-
     pMac->roam.configParam.agingCount = CSR_AGING_COUNT;
     pMac->roam.configParam.channelBondingMode24GHz = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
     pMac->roam.configParam.channelBondingMode5GHz = WNI_CFG_CHANNEL_BONDING_MODE_ENABLE;
+
     pMac->roam.configParam.phyMode = eCSR_DOT11_MODE_TAURUS;
     pMac->roam.configParam.eBand = eCSR_BAND_ALL;
     pMac->roam.configParam.uCfgDot11Mode = eCSR_CFG_DOT11_MODE_TAURUS;
@@ -989,7 +869,7 @@
     pMac->roam.configParam.Is11dSupportEnabled = eANI_BOOLEAN_FALSE;
     pMac->roam.configParam.Is11dSupportEnabledOriginal = eANI_BOOLEAN_FALSE;
     pMac->roam.configParam.Is11eSupportEnabled = eANI_BOOLEAN_TRUE;
-    pMac->roam.configParam.Is11hSupportEnabled = eANI_BOOLEAN_FALSE;
+    pMac->roam.configParam.Is11hSupportEnabled = eANI_BOOLEAN_TRUE;
     pMac->roam.configParam.RTSThreshold = 2346;
     pMac->roam.configParam.shortSlotTime = eANI_BOOLEAN_TRUE;
     pMac->roam.configParam.WMMSupportMode = eCsrRoamWmmAuto;
@@ -1008,23 +888,19 @@
     pMac->roam.configParam.nRoamingTime = CSR_DEFAULT_ROAMING_TIME;
     pMac->roam.configParam.fEnforce11dChannels = eANI_BOOLEAN_FALSE;
     pMac->roam.configParam.fSupplicantCountryCodeHasPriority = eANI_BOOLEAN_FALSE;
-
     pMac->roam.configParam.fEnforceCountryCodeMatch = eANI_BOOLEAN_FALSE;
     pMac->roam.configParam.fEnforceDefaultDomain = eANI_BOOLEAN_FALSE;
     pMac->roam.configParam.nActiveMaxChnTime = CSR_ACTIVE_MAX_CHANNEL_TIME;
     pMac->roam.configParam.nActiveMinChnTime = CSR_ACTIVE_MIN_CHANNEL_TIME;
     pMac->roam.configParam.nPassiveMaxChnTime = CSR_PASSIVE_MAX_CHANNEL_TIME;
     pMac->roam.configParam.nPassiveMinChnTime = CSR_PASSIVE_MIN_CHANNEL_TIME;
-
     pMac->roam.configParam.IsIdleScanEnabled = TRUE; //enable the idle scan by default
     pMac->roam.configParam.nTxPowerCap = CSR_MAX_TX_POWER;
     pMac->roam.configParam.statsReqPeriodicity = CSR_MIN_GLOBAL_STAT_QUERY_PERIOD;
     pMac->roam.configParam.statsReqPeriodicityInPS = CSR_MIN_GLOBAL_STAT_QUERY_PERIOD_IN_BMPS;
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
     pMac->roam.configParam.csr11rConfig.IsFTResourceReqSupported = 0;
 #endif
-
 #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
     pMac->roam.configParam.neighborRoamConfig.nMaxNeighborRetries = 3;
     pMac->roam.configParam.neighborRoamConfig.nNeighborLookupRssiThreshold = 120;
@@ -1038,22 +914,26 @@
     pMac->roam.configParam.neighborRoamConfig.neighborScanChanList.channelList[2] = 11;
     pMac->roam.configParam.neighborRoamConfig.nNeighborResultsRefreshPeriod = 20000; //20 seconds
 #endif
+#ifdef WLAN_FEATURE_11AC
+     pMac->roam.configParam.nVhtChannelWidth = WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ + 1;
+#endif
 
     pMac->roam.configParam.addTSWhenACMIsOff = 0;
     pMac->roam.configParam.fScanTwice = eANI_BOOLEAN_FALSE;
-}
+#ifndef BMPS_WORKAROUND_NOT_NEEDED
+    pMac->roam.configParam.doBMPSWorkaround = 0;
+#endif
 
+}
 eCsrBand csrGetCurrentBand(tHalHandle hHal)
 {
     tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
     return pMac->roam.configParam.bandCapability;
 }
-
 eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand)
 {
     tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
     eHalStatus status = eHAL_STATUS_SUCCESS;
-    
     if (CSR_IS_PHY_MODE_A_ONLY(pMac) &&
             (eBand == eCSR_BAND_24))
     {
@@ -1064,7 +944,6 @@
             pMac->roam.configParam.uCfgDot11Mode, eBand);
         return eHAL_STATUS_INVALID_PARAMETER;
     }
-
     if ((CSR_IS_PHY_MODE_B_ONLY(pMac) ||
                 CSR_IS_PHY_MODE_G_ONLY(pMac)) &&
             (eBand == eCSR_BAND_5G))
@@ -1076,7 +955,6 @@
             pMac->roam.configParam.uCfgDot11Mode, eBand);
         return eHAL_STATUS_INVALID_PARAMETER;
     }
-
     VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, 
             "Band changed to %u (0 - ALL, 1 - 2.4 GHZ, 2 - 5GHZ)\n", eBand);
     pMac->roam.configParam.eBand = eBand; 
@@ -1087,6 +965,118 @@
         csrInitChannelList( hHal );
     return status;
 }
+/* The funcns csrConvertCBIniValueToPhyCBState and csrConvertPhyCBStateToIniValue have been
+ * introduced to convert the ini value to the ENUM used in csr and MAC for CB state
+ * Ideally we should have kept the ini value and enum value same and representing the same
+ * cb values as in 11n standard i.e. 
+ * Set to 1 (SCA) if the secondary channel is above the primary channel 
+ * Set to 3 (SCB) if the secondary channel is below the primary channel 
+ * Set to 0 (SCN) if no secondary channel is present 
+ * However, since our driver is already distributed we will keep the ini definition as it is which is:
+ * 0 - secondary none
+ * 1 - secondary LOW
+ * 2 - secondary HIGH
+ * and convert to enum value used within the driver in csrChangeDefaultConfigParam using this funcn
+ * The enum values are as follows:
+ * PHY_SINGLE_CHANNEL_CENTERED          = 0
+ * PHY_DOUBLE_CHANNEL_LOW_PRIMARY   = 1
+ * PHY_DOUBLE_CHANNEL_HIGH_PRIMARY  = 3
+ */
+ePhyChanBondState csrConvertCBIniValueToPhyCBState(v_U32_t cbIniValue)
+{
+
+   ePhyChanBondState phyCbState;
+   switch (cbIniValue) {
+      // secondary none
+      case 0:
+        phyCbState = PHY_SINGLE_CHANNEL_CENTERED;
+        break;
+      // secondary LOW
+      case 1:
+        phyCbState = PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
+        break;
+      // secondary HIGH
+      case 2:
+        phyCbState = PHY_DOUBLE_CHANNEL_LOW_PRIMARY;
+        break;
+#ifdef WLAN_FEATURE_11AC
+      case 3:
+        phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED; 
+        break;
+      case 4:
+        phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED;
+        break;
+      case 5:
+        phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED;
+        break; 
+      case 6:
+        phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW;
+        break;
+      case 7:
+        phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW;
+        break; 
+      case 8:
+        phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH;
+        break;
+      case 9:
+        phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH;
+        break; 
+#endif 
+      default:
+        // If an invalid value is passed, disable CHANNEL BONDING
+        phyCbState = PHY_SINGLE_CHANNEL_CENTERED;
+        break;
+   }
+   return phyCbState;
+}
+
+v_U32_t csrConvertPhyCBStateToIniValue(ePhyChanBondState phyCbState)
+{
+
+   v_U32_t cbIniValue;
+   switch (phyCbState) {
+      // secondary none
+      case PHY_SINGLE_CHANNEL_CENTERED:
+        cbIniValue = 0;
+        break;
+      // secondary LOW
+      case PHY_DOUBLE_CHANNEL_HIGH_PRIMARY:
+        cbIniValue = 1;
+        break;
+      // secondary HIGH
+      case PHY_DOUBLE_CHANNEL_LOW_PRIMARY:
+        cbIniValue = 2;
+        break;
+#ifdef WLAN_FEATURE_11AC
+      case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED:
+        cbIniValue = 3;
+        break;
+      case PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED:
+        cbIniValue = 4;
+        break;
+      case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED:
+        cbIniValue = 5;
+        break;
+      case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW:
+        cbIniValue = 6;
+        break;
+      case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW:
+        cbIniValue = 7;
+        break;
+      case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH:
+        cbIniValue = 8;
+        break;
+      case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH:
+        cbIniValue = 9;
+        break;
+#endif
+      default:
+        // return some invalid value
+        cbIniValue = 10;
+        break;
+   }
+   return cbIniValue;
+}
 
 eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
 {
@@ -1102,8 +1092,20 @@
         pMac->roam.configParam.Is11hSupportEnabled = pParam->Is11hSupportEnabled;
 
         pMac->roam.configParam.fenableMCCMode = pParam->fEnableMCCMode;
-        pMac->roam.configParam.channelBondingMode24GHz = pParam->channelBondingMode24GHz;
-        pMac->roam.configParam.channelBondingMode5GHz = pParam->channelBondingMode5GHz;
+        /* channelBondingMode5GHz plays a dual role right now
+         * INFRA STA will use this non zero value as CB enabled and SOFTAP will use this non-zero value to determine the secondary channel offset
+         * This is how channelBondingMode5GHz works now and this is kept intact to avoid any cfg.ini change
+         */
+        if (pParam->channelBondingMode24GHz > MAX_CB_VALUE_IN_INI)
+        {
+            smsLog( pMac, LOGW, "Invalid CB value from ini in 2.4GHz band %d, CB DISABLED\n", pParam->channelBondingMode24GHz); 
+        }
+        pMac->roam.configParam.channelBondingMode24GHz = csrConvertCBIniValueToPhyCBState(pParam->channelBondingMode24GHz);
+        if (pParam->channelBondingMode5GHz > MAX_CB_VALUE_IN_INI)
+        {
+            smsLog( pMac, LOGW, "Invalid CB value from ini in 5GHz band %d, CB DISABLED\n", pParam->channelBondingMode5GHz); 
+        }
+        pMac->roam.configParam.channelBondingMode5GHz = csrConvertCBIniValueToPhyCBState(pParam->channelBondingMode5GHz);
         pMac->roam.configParam.RTSThreshold = pParam->RTSThreshold;
         pMac->roam.configParam.phyMode = pParam->phyMode;
         pMac->roam.configParam.shortSlotTime = pParam->shortSlotTime;
@@ -1116,7 +1118,6 @@
         pMac->roam.configParam.bandCapability = pParam->bandCapability;
         pMac->roam.configParam.cbChoice = pParam->cbChoice;
         pMac->roam.configParam.bgScanInterval = pParam->bgScanInterval;
-
         //if HDD passed down non zero values then only update,
         //otherwise keep using the defaults
         if(pParam->nActiveMaxChnTime)
@@ -1140,7 +1141,6 @@
         {
             //Change the unit from second to microsecond
             tANI_U32 impsSleepTime = pParam->impsSleepTime * PAL_TIMER_TO_SEC_UNIT;
-
             if(CSR_IDLE_SCAN_NO_PS_INTERVAL_MIN <= impsSleepTime)
             {
                 pMac->roam.configParam.impsSleepTime = impsSleepTime;
@@ -1168,17 +1168,14 @@
         {
             pMac->roam.configParam.agingCount = pParam->nScanResultAgeCount;
         }
-
         if(pParam->scanAgeTimeNCNPS)
         {
             pMac->roam.configParam.scanAgeTimeNCNPS = pParam->scanAgeTimeNCNPS;  
         }
-
         if(pParam->scanAgeTimeNCPS)
         {
             pMac->roam.configParam.scanAgeTimeNCPS = pParam->scanAgeTimeNCPS;   
         }
-
         if(pParam->scanAgeTimeCNPS)
         {
             pMac->roam.configParam.scanAgeTimeCNPS = pParam->scanAgeTimeCNPS;   
@@ -1194,16 +1191,13 @@
         pMac->roam.configParam.fSupplicantCountryCodeHasPriority = pParam->fSupplicantCountryCodeHasPriority;
         pMac->roam.configParam.fEnforceCountryCodeMatch = pParam->fEnforceCountryCodeMatch;
         pMac->roam.configParam.fEnforceDefaultDomain = pParam->fEnforceDefaultDomain;
-
         pMac->roam.configParam.vccRssiThreshold = pParam->vccRssiThreshold;
         pMac->roam.configParam.vccUlMacLossThreshold = pParam->vccUlMacLossThreshold;
-
         pMac->roam.configParam.IsIdleScanEnabled = pParam->IsIdleScanEnabled;
         pMac->roam.configParam.statsReqPeriodicity = pParam->statsReqPeriodicity;
         pMac->roam.configParam.statsReqPeriodicityInPS = pParam->statsReqPeriodicityInPS;
         //Assign this before calling CsrInit11dInfo
         pMac->roam.configParam.nTxPowerCap = pParam->nTxPowerCap;
-
         if( csrIs11dSupported( pMac ) )
         {
             status = CsrInit11dInfo(pMac, &pParam->Csr11dinfo);
@@ -1212,16 +1206,23 @@
         {
             pMac->scan.curScanType = eSIR_ACTIVE_SCAN;
         }
+
+        /* Initialize the power + channel information if 11h is enabled.
+        If 11d is enabled this information has already been initialized */
+        if( csrIs11hSupported( pMac ) && !csrIs11dSupported( pMac ) )
+        {
+            csrInitChannelPowerList(pMac, &pParam->Csr11dinfo);
+        }
+
+
 #ifdef WLAN_FEATURE_VOWIFI_11R 
         palCopyMemory( pMac->hHdd, &pMac->roam.configParam.csr11rConfig, &pParam->csr11rConfig, sizeof(tCsr11rConfigParams) );
         smsLog( pMac, LOG1, "IsFTResourceReqSupp = %d\n", pMac->roam.configParam.csr11rConfig.IsFTResourceReqSupported); 
 #endif
-
 #if  defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
         pMac->roam.configParam.isFastTransitionEnabled = pParam->isFastTransitionEnabled;
         pMac->roam.configParam.RoamRssiDiff = pParam->RoamRssiDiff;
 #endif
-
 #ifdef FEATURE_WLAN_LFR 
         pMac->roam.configParam.isFastRoamIniFeatureEnabled = pParam->isFastRoamIniFeatureEnabled;
 #endif
@@ -1229,10 +1230,8 @@
 #ifdef FEATURE_WLAN_CCX 
         pMac->roam.configParam.isCcxIniFeatureEnabled = pParam->isCcxIniFeatureEnabled;
 #endif
-
 #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
         palCopyMemory( pMac->hHdd, &pMac->roam.configParam.neighborRoamConfig, &pParam->neighborRoamConfig, sizeof(tCsrNeighborRoamConfigParams) );
-
         smsLog( pMac, LOG1, "nNeighborScanTimerPerioid = %d\n", pMac->roam.configParam.neighborRoamConfig.nNeighborScanTimerPeriod);
         smsLog( pMac, LOG1, "nNeighborReassocRssiThreshold = %d\n", pMac->roam.configParam.neighborRoamConfig.nNeighborReassocRssiThreshold);  
         smsLog( pMac, LOG1, "nNeighborLookupRssiThreshold = %d\n", pMac->roam.configParam.neighborRoamConfig.nNeighborLookupRssiThreshold);  
@@ -1240,11 +1239,9 @@
         smsLog( pMac, LOG1, "nNeighborScanMaxChanTime = %d\n", pMac->roam.configParam.neighborRoamConfig.nNeighborScanMaxChanTime);
         smsLog( pMac, LOG1, "nMaxNeighborRetries = %d\n", pMac->roam.configParam.neighborRoamConfig.nMaxNeighborRetries); 
         smsLog( pMac, LOG1, "nNeighborResultsRefreshPeriod = %d\n", pMac->roam.configParam.neighborRoamConfig.nNeighborResultsRefreshPeriod); 
-
         {
            int i;
            smsLog( pMac, LOG1, FL("Num of Channels in CFG Channel List: %d\n"), pMac->roam.configParam.neighborRoamConfig.neighborScanChanList.numChannels); 
-
            for( i=0; i< pMac->roam.configParam.neighborRoamConfig.neighborScanChanList.numChannels; i++)
            {
               smsLog( pMac, LOG1, "%d ", pMac->roam.configParam.neighborRoamConfig.neighborScanChanList.channelList[i] );
@@ -1252,22 +1249,32 @@
            smsLog( pMac, LOG1, "\n");
         }
 #endif
-
         pMac->roam.configParam.addTSWhenACMIsOff = pParam->addTSWhenACMIsOff;
         pMac->scan.fValidateList = pParam->fValidateList;
         pMac->scan.fEnableBypass11d = pParam->fEnableBypass11d;
         pMac->scan.fEnableDFSChnlScan = pParam->fEnableDFSChnlScan;
         pMac->roam.configParam.fScanTwice = pParam->fScanTwice;
+        pMac->scan.fFirstScanOnly2GChnl = pParam->fFirstScanOnly2GChnl;
+        /* This parameter is not available in cfg and not passed from upper layers. Instead it is initialized here
+         * This paramtere is used in concurrency to determine if there are concurrent active sessions.
+         * Is used as a temporary fix to disconnect all active sessions when BMPS enabled so the active session if Infra STA
+         * will automatically connect back and resume BMPS since resume BMPS is not working when moving from concurrent to
+         * single session
+         */
+#ifndef BMPS_WORKAROUND_NOT_NEEDED
+       pMac->roam.configParam.doBMPSWorkaround = 0;
+#endif
+#ifdef WLAN_FEATURE_11AC
+        pMac->roam.configParam.nVhtChannelWidth = pParam->nVhtChannelWidth;
+#endif
     }
     
     return status;
 }
 
-
 eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
 {
     eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
-
     if(pParam)
     {
         pParam->WMMSupportMode = pMac->roam.configParam.WMMSupportMode;
@@ -1276,8 +1283,8 @@
         pParam->Is11dSupportEnabled = pMac->roam.configParam.Is11dSupportEnabled;
         pParam->Is11dSupportEnabledOriginal = pMac->roam.configParam.Is11dSupportEnabledOriginal;
         pParam->Is11hSupportEnabled = pMac->roam.configParam.Is11hSupportEnabled;
-        pParam->channelBondingMode24GHz = pMac->roam.configParam.channelBondingMode24GHz;
-        pParam->channelBondingMode5GHz = pMac->roam.configParam.channelBondingMode5GHz;
+        pParam->channelBondingMode24GHz = csrConvertPhyCBStateToIniValue(pMac->roam.configParam.channelBondingMode24GHz);
+        pParam->channelBondingMode5GHz = csrConvertPhyCBStateToIniValue(pMac->roam.configParam.channelBondingMode5GHz);
         pParam->RTSThreshold = pMac->roam.configParam.RTSThreshold;
         pParam->phyMode = pMac->roam.configParam.phyMode;
         pParam->shortSlotTime = pMac->roam.configParam.shortSlotTime;
@@ -1290,12 +1297,10 @@
         pParam->bandCapability = pMac->roam.configParam.bandCapability;
         pParam->cbChoice = pMac->roam.configParam.cbChoice;
         pParam->bgScanInterval = pMac->roam.configParam.bgScanInterval;
-
         pParam->nActiveMaxChnTime = pMac->roam.configParam.nActiveMaxChnTime;
         pParam->nActiveMinChnTime = pMac->roam.configParam.nActiveMinChnTime;
         pParam->nPassiveMaxChnTime = pMac->roam.configParam.nPassiveMaxChnTime;
         pParam->nPassiveMinChnTime = pMac->roam.configParam.nPassiveMinChnTime;
-
         //Change the unit from microsecond to second
         pParam->impsSleepTime = pMac->roam.configParam.impsSleepTime / PAL_TIMER_TO_SEC_UNIT;
         pParam->eBand = pMac->roam.configParam.eBand;
@@ -1312,38 +1317,37 @@
         pParam->fEnforceDefaultDomain = pMac->roam.configParam.fEnforceDefaultDomain;        
         pParam->vccRssiThreshold = pMac->roam.configParam.vccRssiThreshold;
         pParam->vccUlMacLossThreshold = pMac->roam.configParam.vccUlMacLossThreshold;
-
         pParam->IsIdleScanEnabled = pMac->roam.configParam.IsIdleScanEnabled;
         pParam->nTxPowerCap = pMac->roam.configParam.nTxPowerCap;
         pParam->statsReqPeriodicity = pMac->roam.configParam.statsReqPeriodicity;
         pParam->statsReqPeriodicityInPS = pMac->roam.configParam.statsReqPeriodicityInPS;
-
         pParam->addTSWhenACMIsOff = pMac->roam.configParam.addTSWhenACMIsOff;
         pParam->fValidateList = pMac->roam.configParam.fValidateList;
         pParam->fEnableBypass11d = pMac->scan.fEnableBypass11d;
         pParam->fEnableDFSChnlScan = pMac->scan.fEnableDFSChnlScan;
         pParam->fScanTwice = pMac->roam.configParam.fScanTwice;
+        pParam->fFirstScanOnly2GChnl = pMac->scan.fFirstScanOnly2GChnl;
 
 #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
         palCopyMemory( pMac->hHdd, &pParam->neighborRoamConfig, &pMac->roam.configParam.neighborRoamConfig, sizeof(tCsrNeighborRoamConfigParams) );
 #endif
+#ifdef WLAN_FEATURE_11AC
+        pParam->nVhtChannelWidth = pMac->roam.configParam.nVhtChannelWidth;
+#endif
 
         csrSetChannels(pMac, pParam);
 
         status = eHAL_STATUS_SUCCESS;
     }
-
     return (status);
 }
 
-
 eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI_BOOLEAN *pfRestartNeeded)
 {
     eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
     tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
     tANI_BOOLEAN fRestartNeeded = eANI_BOOLEAN_FALSE;
     eCsrPhyMode newPhyMode = eCSR_DOT11_MODE_AUTO;
-
     do
     {
         if(eCSR_BAND_24 == eBand)
@@ -1443,10 +1447,8 @@
                 newPhyMode = eCSR_DOT11_MODE_AUTO;
             }
         }
-
         //Done validating
         status = eHAL_STATUS_SUCCESS;
-
         //Now we need to check whether a restart is needed.
         if(eBand != pMac->roam.configParam.eBand)
         {
@@ -1458,9 +1460,7 @@
             fRestartNeeded = eANI_BOOLEAN_TRUE;
             break;
         }
-
     }while(0);
-
     if(HAL_STATUS_SUCCESS(status))
     {
         pMac->roam.configParam.eBand = eBand;
@@ -1470,16 +1470,13 @@
             *pfRestartNeeded = fRestartNeeded;
         }
     }
-
     return (status);
 }
     
-
 void csrPruneChannelListForMode( tpAniSirGlobal pMac, tCsrChannel *pChannelList )
 {
     tANI_U8 Index;
     tANI_U8 cChannels;
-
     // for dual band NICs, don't need to trim the channel list....
     if ( !CSR_IS_OPEARTING_DUAL_BAND( pMac ) )
     {
@@ -1496,7 +1493,6 @@
                     cChannels++;
                 }
             }
-
             // Cleanup the rest of channels.   Note we only need to clean up the channels if we had
             // to trim the list.  Calling palZeroMemory() with a 0 size is going to throw asserts on 
             // the debug builds so let's be a bit smarter about that.  Zero out the reset of the channels
@@ -1524,7 +1520,6 @@
                     cChannels++;
                 }
             }
-
             // Cleanup the rest of channels.   Note we only need to clean up the channels if we had
             // to trim the list.  Calling palZeroMemory() with a 0 size is going to throw asserts on 
             // the debug builds so let's be a bit smarter about that.  Zero out the reset of the channels
@@ -1541,9 +1536,7 @@
             pChannelList->numChannels = cChannels;
         }
     }
-
 }
-
 #ifdef WLAN_SOFTAP_FEATURE
 #define INFRA_AP_DEFAULT_CHANNEL 6
 eHalStatus csrIsValidChannel(tpAniSirGlobal pMac, tANI_U8 chnNum)
@@ -1560,7 +1553,6 @@
     return status;
 }
 #endif
-
 eHalStatus csrInitGetChannels(tpAniSirGlobal pMac)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -1568,7 +1560,7 @@
     VOS_STATUS vosStatus;
     tANI_U8 Index = 0;
     tANI_U8 num40MHzChannelsFound = 0;
-
+    
     
     //TODO: this interface changed to include the 40MHz channel list
     // this needs to be tied into the adapter structure somehow and referenced appropriately for CB operation
@@ -1610,16 +1602,13 @@
         }
         pMac->scan.base40MHzChannels.numChannels = num40MHzChannelsFound;
     }
-
     return (status);  
 }
 
-
 eHalStatus csrInitChannelList( tHalHandle hHal )
 {
     tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
     eHalStatus status = eHAL_STATUS_SUCCESS;
-
     csrPruneChannelListForMode(pMac, &pMac->scan.baseChannels);
     csrPruneChannelListForMode(pMac, &pMac->scan.base20MHzChannels);
     // Apply the base channel list, power info, and set the Country code...
@@ -1627,20 +1616,16 @@
  
     return (status);
 }
-
-
 eHalStatus csrChangeConfigParams(tpAniSirGlobal pMac, 
                                  tCsrUpdateConfigParam *pUpdateConfigParam)
 {
    eHalStatus status = eHAL_STATUS_FAILURE;
    tCsr11dinfo *ps11dinfo = NULL;
-
    ps11dinfo = &pUpdateConfigParam->Csr11dinfo;
    status = CsrInit11dInfo(pMac, ps11dinfo);
    return status;
 }
 
-
 static eHalStatus CsrInit11dInfo(tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo)
 {
   eHalStatus status = eHAL_STATUS_FAILURE;
@@ -1654,7 +1639,6 @@
   {
      return (status);
   }
-
   if ( ps11dinfo->Channels.numChannels && ( WNI_CFG_VALID_CHANNEL_LIST_LEN >= ps11dinfo->Channels.numChannels ) ) 
   {
     pMac->scan.base20MHzChannels.numChannels = ps11dinfo->Channels.numChannels;
@@ -1667,12 +1651,10 @@
      //No change
      return (eHAL_STATUS_SUCCESS);
   }
-
   //legacy maintenance
   status = palCopyMemory(pMac->hHdd, pMac->scan.countryCodeDefault, 
                          ps11dinfo->countryCode, WNI_CFG_COUNTRY_CODE_LEN);
   if(!HAL_STATUS_SUCCESS(status)) return (status);
-
   //Tush: at csropen get this initialized with default, during csr reset if this 
   // already set with some value no need initilaize with default again
   if(0 == pMac->scan.countryCodeCurrent[0])
@@ -1681,12 +1663,62 @@
                          ps11dinfo->countryCode, WNI_CFG_COUNTRY_CODE_LEN);
      if(!HAL_STATUS_SUCCESS(status)) return (status);
   }
-
   // need to add the max power channel list
   if(HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd, (void **)&pChanInfo, sizeof(tSirMacChanInfo) * WNI_CFG_VALID_CHANNEL_LIST_LEN)))
   {
       palZeroMemory(pMac->hHdd, pChanInfo, sizeof(tSirMacChanInfo) * WNI_CFG_VALID_CHANNEL_LIST_LEN);
       pChanInfoStart = pChanInfo;
+      for(index = 0; index < ps11dinfo->Channels.numChannels; index++)
+      {
+        pChanInfo->firstChanNum = ps11dinfo->ChnPower[index].firstChannel;
+        pChanInfo->numChannels  = ps11dinfo->ChnPower[index].numChannels;
+        pChanInfo->maxTxPower   = CSR_ROAM_MIN( ps11dinfo->ChnPower[index].maxtxPower, pMac->roam.configParam.nTxPowerCap );
+        pChanInfo++;
+        count++;
+      }
+      if(count)
+      {
+          csrSaveToChannelPower2G_5G( pMac, count * sizeof(tSirMacChanInfo), pChanInfoStart );
+      }
+      palFreeMemory(pMac->hHdd, pChanInfoStart);
+  }
+  //Only apply them to CFG when not in STOP state. Otherwise they will be applied later
+  if( HAL_STATUS_SUCCESS(status) )
+  {
+      for( index = 0; index < CSR_ROAM_SESSION_MAX; index++ )
+      {
+          if((CSR_IS_SESSION_VALID(pMac, index)) && CSR_IS_ROAM_STOP(pMac, index))
+          {
+              applyConfig = FALSE;
+          }
+    }
+
+    if(TRUE == applyConfig)
+    {
+        // Apply the base channel list, power info, and set the Country code...
+        csrApplyChannelPowerCountryInfo( pMac, &pMac->scan.base20MHzChannels, pMac->scan.countryCodeCurrent );
+    }
+
+  }
+  return (status);
+}
+/* Initialize the Channel + Power List in the local cache and in the CFG */
+eHalStatus csrInitChannelPowerList( tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo)
+{
+  tANI_U8  index;
+  tANI_U32 count=0;
+  tSirMacChanInfo *pChanInfo;
+  tSirMacChanInfo *pChanInfoStart;
+
+  if(!ps11dinfo || !pMac)
+  {
+     return eHAL_STATUS_FAILURE;
+  }
+
+  if(HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd, (void **)&pChanInfo, sizeof(tSirMacChanInfo) * WNI_CFG_VALID_CHANNEL_LIST_LEN)))
+  {
+      palZeroMemory(pMac->hHdd, pChanInfo, sizeof(tSirMacChanInfo) * WNI_CFG_VALID_CHANNEL_LIST_LEN);
+      pChanInfoStart = pChanInfo;
 
       for(index = 0; index < ps11dinfo->Channels.numChannels; index++)
       {
@@ -1703,26 +1735,7 @@
       palFreeMemory(pMac->hHdd, pChanInfoStart);
   }
 
-  //Only apply them to CFG when not in STOP state. Otherwise they will be applied later
-  if( HAL_STATUS_SUCCESS(status) )
-  {
-      for( index = 0; index < CSR_ROAM_SESSION_MAX; index++ )
-      {
-          if((CSR_IS_SESSION_VALID(pMac, index)) && CSR_IS_ROAM_STOP(pMac, index))
-          {
-              applyConfig = FALSE;
-          }
-    }
-
-    if(TRUE == applyConfig)
-    {
-        // Apply the base channel list, power info, and set the Country code...
-        csrApplyChannelPowerCountryInfo( pMac, &pMac->scan.base20MHzChannels, pMac->scan.countryCodeCurrent );
-    }
-
-  }
-
-  return (status);
+  return eHAL_STATUS_SUCCESS;
 }
 
 //pCommand may be NULL
@@ -1745,7 +1758,6 @@
     {
         pNextEntry = csrLLNext( &pMac->sme.smeCmdPendingList, pEntry, LL_ACCESS_NOLOCK );
         pDupCommand = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
-
         // Remove the previous command if..
         // - the new roam command is for the same RoamReason...
         // - the new roam command is a NewProfileList.
@@ -1787,7 +1799,6 @@
     }
     csrLLClose(&localList);
 }
-
 eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pRoamInfo, 
                                tANI_U32 roamId, eRoamCmdStatus u1, eCsrRoamResult u2)
 {
@@ -1796,7 +1807,6 @@
     WLAN_VOS_DIAG_EVENT_DEF(connectionStatus, vos_event_wlan_status_payload_type);
 #endif
     tCsrRoamSession *pSession;
-
     if( CSR_IS_SESSION_VALID( pMac, sessionId) )
     {
         pSession = CSR_GET_SESSION( pMac, sessionId );
@@ -1807,12 +1817,10 @@
        VOS_ASSERT(0);
        return eHAL_STATUS_FAILURE;
     }
-
     if(eCSR_ROAM_ASSOCIATION_COMPLETION == u1 && pRoamInfo)
     {
         smsLog(pMac, LOGW, " Assoc complete result = %d statusCode = %d reasonCode = %d\n", u2, pRoamInfo->statusCode, pRoamInfo->reasonCode);
     }
-
     if ( (pSession == NULL) ||
         (eANI_BOOLEAN_FALSE == pSession->sessionActive) )
     {
@@ -1850,7 +1858,6 @@
           connectionStatus.rssi = pRoamInfo->pBssDesc->rssi * (-1);
           connectionStatus.channel = pRoamInfo->pBssDesc->channelId;
        }
-
        connectionStatus.qosCapability = pRoamInfo->u.pConnectedProfile->qosConnection;
        connectionStatus.authType = (v_U8_t)diagAuthTypeFromCSRType(pRoamInfo->u.pConnectedProfile->AuthType);
        connectionStatus.encryptionType = (v_U8_t)diagEncTypeFromCSRType(pRoamInfo->u.pConnectedProfile->EncryptionType);
@@ -1858,40 +1865,34 @@
        connectionStatus.reason = eCSR_REASON_UNSPECIFIED;
        WLAN_VOS_DIAG_EVENT_REPORT(&connectionStatus, EVENT_WLAN_STATUS);
     }
-
     if((eCSR_ROAM_MIC_ERROR_IND == u1) || (eCSR_ROAM_RESULT_MIC_FAILURE == u2))
     {
        connectionStatus.eventId = eCSR_WLAN_STATUS_DISCONNECT;
        connectionStatus.reason = eCSR_REASON_MIC_ERROR;
        WLAN_VOS_DIAG_EVENT_REPORT(&connectionStatus, EVENT_WLAN_STATUS);
     }
-
     if(eCSR_ROAM_RESULT_FORCED == u2)
     {
        connectionStatus.eventId = eCSR_WLAN_STATUS_DISCONNECT;
        connectionStatus.reason = eCSR_REASON_USER_REQUESTED;
        WLAN_VOS_DIAG_EVENT_REPORT(&connectionStatus, EVENT_WLAN_STATUS);
     }
-
     if(eCSR_ROAM_RESULT_DISASSOC_IND == u2)
     {
        connectionStatus.eventId = eCSR_WLAN_STATUS_DISCONNECT;
        connectionStatus.reason = eCSR_REASON_DISASSOC;
        WLAN_VOS_DIAG_EVENT_REPORT(&connectionStatus, EVENT_WLAN_STATUS);
     }
-
     if(eCSR_ROAM_RESULT_DEAUTH_IND == u2)
     {
        connectionStatus.eventId = eCSR_WLAN_STATUS_DISCONNECT;
        connectionStatus.reason = eCSR_REASON_DEAUTH;
        WLAN_VOS_DIAG_EVENT_REPORT(&connectionStatus, EVENT_WLAN_STATUS);
     }
-
 #endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
     
     return (status);
 }
-
 // Returns whether handoff is currently in progress or not
 tANI_BOOLEAN csrRoamIsHandoffInProgress(tpAniSirGlobal pMac)
 {
@@ -1900,9 +1901,7 @@
 #else
     return eANI_BOOLEAN_FALSE;
 #endif
-
 }
-
 eHalStatus csrRoamIssueDisassociate( tpAniSirGlobal pMac, tANI_U32 sessionId,
                                      eCsrRoamSubState NewSubstate, tANI_BOOLEAN fMICFailure )
 {   
@@ -1930,26 +1929,23 @@
     {
         reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON;
     }    
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
     if ( (csrRoamIsHandoffInProgress(pMac)) && 
          (NewSubstate != eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF))
     {
         tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
         palCopyMemory(pMac->hHdd, &bssId, pNeighborRoamInfo->csrNeighborRoamProfile.BSSIDs.bssid, sizeof(tSirMacAddr));
-
     } else 
 #endif
     if(pSession->pConnectBssDesc)
     {
         palCopyMemory(pMac->hHdd, &bssId, pSession->pConnectBssDesc->bssId, sizeof(tCsrBssid));
     }
-
+    
     
     smsLog( pMac, LOGE, "CSR Attempting to Disassociate Bssid= %02x-%02x-%02x-%02x-%02x-%02x subState = %d\n", 
                   bssId[ 0 ], bssId[ 1 ], bssId[ 2 ],
                   bssId[ 3 ], bssId[ 4 ], bssId[ 5 ], NewSubstate );    
-
     csrRoamSubstateChange( pMac, NewSubstate, sessionId);
 
     status = csrSendMBDisassocReqMsg( pMac, sessionId, bssId, reasonCode );    
@@ -1957,7 +1953,6 @@
     if(HAL_STATUS_SUCCESS(status)) 
     {
         csrRoamLinkDown(pMac, sessionId);
-
 #ifndef WLAN_MDM_CODE_REDUCTION_OPT
         //no need to tell QoS that we are disassociating, it will be taken care off in assoc req for HO
         if(eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF != NewSubstate)
@@ -1967,14 +1962,10 @@
         }
 #endif
      }
-
     return (status);
 }
-
 #ifdef WLAN_SOFTAP_FEATURE
 
-
-
 /* ---------------------------------------------------------------------------
     \fn csrRoamIssueDisassociateStaCmd
     \brief csr function that HDD calls to disassociate a associated station
@@ -2017,7 +2008,6 @@
 }
 
 
-
 /* ---------------------------------------------------------------------------
     \fn csrRoamIssueDeauthSta
     \brief csr function that HDD calls to delete a associated station
@@ -2058,9 +2048,6 @@
 
     return status;
 }
-
-
-
 eHalStatus
 csrRoamIssueTkipCounterMeasures( tpAniSirGlobal pMac, tANI_U32 sessionId,
                                     tANI_BOOLEAN bEnable )
@@ -2068,13 +2055,11 @@
     eHalStatus status = eHAL_STATUS_FAILURE;
     tCsrBssid bssId = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if (!pSession)
     {
         smsLog( pMac, LOGE, "csrRoamIssueTkipCounterMeasures:CSR Session not found\n");
         return (status);
     }
-
     if (pSession->pConnectBssDesc)
     {
         palCopyMemory(pMac->hHdd, &bssId, pSession->pConnectBssDesc->bssId, sizeof(tCsrBssid));
@@ -2084,15 +2069,12 @@
         smsLog( pMac, LOGE, "csrRoamIssueTkipCounterMeasures:Connected BSS Description in CSR Session not found\n");
         return (status);
     }
-
     smsLog( pMac, LOG2, "CSR issuing tkip counter measures for Bssid = %02x-%02x-%02x-%02x-%02x-%02x, Enable = %d\n", 
                   bssId[ 0 ], bssId[ 1 ], bssId[ 2 ],
                   bssId[ 3 ], bssId[ 4 ], bssId[ 5 ] , bEnable);
-
     status = csrSendMBTkipCounterMeasuresReqMsg( pMac, sessionId, bEnable, bssId );
     return (status);
 }
-
 eHalStatus
 csrRoamGetAssociatedStas( tpAniSirGlobal pMac, tANI_U32 sessionId,
                             VOS_MODULE_ID modId,  void *pUsrContext,
@@ -2101,13 +2083,11 @@
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tCsrBssid bssId = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if (!pSession)
     {
         smsLog( pMac, LOGE, "csrRoamGetAssociatedStas:CSR Session not found\n");
         return (status);
     }
-
     if(pSession->pConnectBssDesc)
     {
         palCopyMemory( pMac->hHdd, &bssId, pSession->pConnectBssDesc->bssId, sizeof(tCsrBssid) );
@@ -2117,15 +2097,12 @@
         smsLog( pMac, LOGE, "csrRoamGetAssociatedStas:Connected BSS Description in CSR Session not found\n");
         return (status);
     }
-
     smsLog( pMac, LOG2, "CSR getting associated stations for Bssid = %02x-%02x-%02x-%02x-%02x-%02x\n",
                   bssId[ 0 ], bssId[ 1 ], bssId[ 2 ],
                   bssId[ 3 ], bssId[ 4 ], bssId[ 5 ] );
-
     status = csrSendMBGetAssociatedStasReqMsg( pMac, sessionId, modId, bssId, pUsrContext, pfnSapEventCallback, pAssocStasBuf );
     return (status);
 }
-
 eHalStatus
 csrRoamGetWpsSessionOverlap( tpAniSirGlobal pMac, tANI_U32 sessionId,
                              void *pUsrContext, void *pfnSapEventCallback, v_MACADDR_t pRemoveMac )
@@ -2139,7 +2116,6 @@
         smsLog( pMac, LOGE, "csrRoamGetWpsSessionOverlap:CSR Session not found\n");
         return (status);
     }
-
     if(pSession->pConnectBssDesc)
     {
         palCopyMemory( pMac->hHdd, &bssId, pSession->pConnectBssDesc->bssId, sizeof(tCsrBssid) );
@@ -2149,7 +2125,6 @@
         smsLog( pMac, LOGE, "csrRoamGetWpsSessionOverlap:Connected BSS Description in CSR Session not found\n");
         return (status);
     }
-
     smsLog( pMac, LOG2, "CSR getting WPS Session Overlap for Bssid = %02x-%02x-%02x-%02x-%02x-%02x\n",
                   bssId[ 0 ], bssId[ 1 ], bssId[ 2 ],
                   bssId[ 3 ], bssId[ 4 ], bssId[ 5 ] );
@@ -2158,9 +2133,7 @@
             
     return (status);
 }
-
 #endif
-
 eHalStatus csrRoamIssueDeauth( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamSubState NewSubstate )
 {   
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -2171,11 +2144,9 @@
     {
         palCopyMemory(pMac->hHdd, &bssId, pSession->pConnectBssDesc->bssId, sizeof(tCsrBssid));
     }
-
     smsLog( pMac, LOG2, "CSR Attempting to Deauth Bssid= %02x-%02x-%02x-%02x-%02x-%02x\n", 
                   bssId[ 0 ], bssId[ 1 ], bssId[ 2 ],
                   bssId[ 3 ], bssId[ 4 ], bssId[ 5 ] );    
-
     csrRoamSubstateChange( pMac, NewSubstate, sessionId);
     
     status = csrSendMBDeauthReqMsg( pMac, sessionId, bssId, eSIR_MAC_DISASSOC_LEAVING_BSS_REASON );    
@@ -2183,8 +2154,6 @@
     return (status);
 }
 
-
-
 eHalStatus csrRoamSaveConnectedBssDesc( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDesc )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -2221,18 +2190,16 @@
     return (status);
 }
 
-
 eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, 
                                     tSirBssDescription *pBssDesc, tBssConfigParam *pBssConfig,
                                     tDot11fBeaconIEs *pIes)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     eCsrCfgDot11Mode cfgDot11Mode;
-
 #if defined(VOSS_ENABLED)
     VOS_ASSERT( pIes != NULL );
 #endif
-    
+
     do
     {
         palCopyMemory(pMac->hHdd, &pBssConfig->BssCap, &pBssDesc->capabilityInfo, sizeof(tSirMacCapabilityInfo));
@@ -2283,7 +2250,6 @@
                 pBssConfig->uCfgDot11Mode = eCSR_CFG_DOT11_MODE_11A;
             }
         }
-
         //Qos
         if ((pBssConfig->uCfgDot11Mode != eCSR_CFG_DOT11_MODE_11N) &&
                 (pMac->roam.configParam.WMMSupportMode == eCsrRoamWmmNoQos))
@@ -2303,11 +2269,9 @@
             case eCSR_AUTH_TYPE_OPEN_SYSTEM:
                 pBssConfig->authType = eSIR_OPEN_SYSTEM;
                 break;
-
             case eCSR_AUTH_TYPE_SHARED_KEY:
                 pBssConfig->authType = eSIR_SHARED_KEY;
                 break;
-
             case eCSR_AUTH_TYPE_AUTOSWITCH:
                 pBssConfig->authType = eSIR_AUTO_SWITCH;
                 break;
@@ -2343,11 +2307,11 @@
         }
         //Join timeout
         // if we find a BeaconInterval in the BssDescription, then set the Join Timeout to 
-        // be 3 x the BeaconInterval.                          
+        // be 10 x the BeaconInterval.                          
         if ( pBssDesc->beaconInterval )
         {
             //Make sure it is bigger than the minimal
-            pBssConfig->uJoinTimeOut = CSR_ROAM_MAX(3 * pBssDesc->beaconInterval, CSR_JOIN_FAILURE_TIMEOUT_MIN);
+            pBssConfig->uJoinTimeOut = CSR_ROAM_MAX(10 * pBssDesc->beaconInterval, CSR_JOIN_FAILURE_TIMEOUT_MIN);
         }
         else 
         {
@@ -2356,11 +2320,9 @@
         //validate CB
         pBssConfig->cbMode = csrGetCBModeFromIes(pMac, pBssDesc->channelId, pIes);
     }while(0);
-
     return (status);
 }
 
-
 static eHalStatus csrRoamPrepareBssConfigFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, 
                                                      tBssConfigParam *pBssConfig, tSirBssDescription *pBssDesc)
 {
@@ -2379,7 +2341,6 @@
         //SSID must present
         return eHAL_STATUS_FAILURE;
     }
-
     //Settomg up the capabilities
     if( csrIsBssTypeIBSS(pProfile->BSSType) )
     {
@@ -2393,25 +2354,21 @@
     {
         pBssConfig->BssCap.privacy = 1;
     }
-
     pBssConfig->eBand = pMac->roam.configParam.eBand;
     //phymode
     if(pProfile->ChannelInfo.ChannelList)
     {
        operationChannel = pProfile->ChannelInfo.ChannelList[0];
     }
-
 #ifdef WLAN_SOFTAP_FEATURE
     pBssConfig->uCfgDot11Mode = csrRoamGetPhyModeBandForBss(pMac, pProfile, operationChannel, 
                                         &pBssConfig->eBand);
 #else
-
     pBssConfig->uCfgDot11Mode = csrRoamGetPhyModeBandForBss(pMac, (eCsrPhyMode)pProfile->phyMode, operationChannel, 
                                         &pBssConfig->eBand);
 #endif
     //QOS
     //Is this correct to always set to this //***
-
     if ( pBssConfig->BssCap.ess == 1 ) 
     {
 #ifdef WLAN_SOFTAP_FEATURE
@@ -2429,7 +2386,6 @@
     } else {
              qAPisEnabled = TRUE;
     }
-
     if (( eCsrRoamWmmNoQos != pMac->roam.configParam.WMMSupportMode && qAPisEnabled) ||
           (( eCSR_CFG_DOT11_MODE_11N == pBssConfig->uCfgDot11Mode && qAPisEnabled) ||
              ( eCSR_CFG_DOT11_MODE_TAURUS == pBssConfig->uCfgDot11Mode ) ) //For 11n, need QoS
@@ -2450,11 +2406,9 @@
         case eCSR_AUTH_TYPE_OPEN_SYSTEM:
             pBssConfig->authType = eSIR_OPEN_SYSTEM;
             break;
-
         case eCSR_AUTH_TYPE_SHARED_KEY:
             pBssConfig->authType = eSIR_SHARED_KEY;
             break;
-
         case eCSR_AUTH_TYPE_AUTOSWITCH:
             pBssConfig->authType = eSIR_AUTO_SWITCH;
             break;
@@ -2482,10 +2436,9 @@
     }
     //Join timeout
     pBssConfig->uJoinTimeOut = CSR_JOIN_FAILURE_TIMEOUT_DEFAULT;
-    
+
     return (status);
 }
-
 static eHalStatus csrRoamGetQosInfoFromBss(tpAniSirGlobal pMac, tSirBssDescription *pBssDesc)
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
@@ -2498,7 +2451,6 @@
          //err msg
          VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, 
                    "csrRoamGetQosInfoFromBss() failed\n");
-
          break;
       }
       //check if the AP is QAP & it supports APSD
@@ -2507,14 +2459,11 @@
          return eHAL_STATUS_SUCCESS;
       }
    } while (0);
-
    return status;
 }
 
-
 void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy )
 {
-
     // !! Note:  the only difference between this function and the csrSetCfgPrivacyFromProfile() is the 
     // setting of the privacy CFG based on the advertised privacy setting from the AP for WPA associations. 
     // See !!Note: below in this function...
@@ -2559,7 +2508,6 @@
                         
             // Set the Wep default key ID.
             WepDefaultKeyId = pProfile->Keys.defaultIndex;
-
             // Wep key size if 5 bytes (40 bits).
             WepKeyLength = WNI_CFG_WEP_KEY_LENGTH_5;            
             
@@ -2603,7 +2551,6 @@
             {
                 Key3Length = 0;
             }      
-
             break;
         
         case eCSR_ENCRYPT_TYPE_WEP104_STATICKEY:
@@ -2684,7 +2631,6 @@
             Key3Length = 0;        
           
             break;     
-
         default:
             PrivacyEnabled = 0;
             RsnEnabled = 0;
@@ -2701,7 +2647,6 @@
     ccmCfgSetInt(pMac, WNI_CFG_WEP_DEFAULT_KEYID, WepDefaultKeyId, NULL, eANI_BOOLEAN_FALSE);
 }
 
-
 static void csrSetCfgSsid( tpAniSirGlobal pMac, tSirMacSSid *pSSID )
 {
     tANI_U32 len = 0;
@@ -2712,58 +2657,46 @@
     ccmCfgSetStr(pMac, WNI_CFG_SSID, (tANI_U8 *)pSSID->ssId, len, NULL, eANI_BOOLEAN_FALSE);
 }
 
-
 eHalStatus csrSetQosToCfg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrMediaAccessType qosType )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tANI_U32 QoSEnabled;
     tANI_U32 WmeEnabled;
-
     // set the CFG enable/disable variables based on the qosType being configured...
     switch( qosType )
     {
-
         case eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p:
             QoSEnabled = FALSE;
             WmeEnabled = TRUE;
             break;
-
         case eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP:
             QoSEnabled = FALSE;
             WmeEnabled = TRUE;
             break;
-
         case eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify:
             QoSEnabled = FALSE;
             WmeEnabled = TRUE;
             break;
-
         case eCSR_MEDIUM_ACCESS_11e_eDCF:
             QoSEnabled = TRUE;
             WmeEnabled = FALSE;
             break;
-
         case eCSR_MEDIUM_ACCESS_11e_HCF:
             QoSEnabled = TRUE;
             WmeEnabled = FALSE;
             break;
-
         default:
         case eCSR_MEDIUM_ACCESS_DCF:
             QoSEnabled = FALSE;
             WmeEnabled = FALSE;
             break;
-
     }
     //save the WMM setting for later use
     pMac->roam.roamSession[sessionId].fWMMConnection = (tANI_BOOLEAN)WmeEnabled;
-
     status = ccmCfgSetInt(pMac, WNI_CFG_QOS_ENABLED, QoSEnabled, NULL, eANI_BOOLEAN_FALSE);
     status = ccmCfgSetInt(pMac, WNI_CFG_WME_ENABLED, WmeEnabled, NULL, eANI_BOOLEAN_FALSE);
-
     return (status);
 }
-
 static eHalStatus csrGetRateSet( tpAniSirGlobal pMac,  tCsrRoamProfile *pProfile, eCsrPhyMode phyMode, tSirBssDescription *pBssDesc,
                            tDot11fBeaconIEs *pIes, tSirMacRateSet *pOpRateSet, tSirMacRateSet *pExRateSet)
 {
@@ -2771,10 +2704,8 @@
     int i;
     eCsrCfgDot11Mode cfgDot11Mode;
     tANI_U8 *pDstRate;
-
     palZeroMemory(pMac->hHdd, pOpRateSet, sizeof(tSirMacRateSet));
     palZeroMemory(pMac->hHdd, pExRateSet, sizeof(tSirMacRateSet));
-
 #if defined(VOSS_ENABLED)
     VOS_ASSERT( pIes != NULL );
 #endif
@@ -2782,14 +2713,12 @@
     if( NULL != pIes )
     {
         csrIsPhyModeMatch( pMac, phyMode, pBssDesc, pProfile, &cfgDot11Mode, pIes );
-
         // Originally, we thought that for 11a networks, the 11a rates are always
         // in the Operational Rate set & for 11b and 11g networks, the 11b rates
         // appear in the Operational Rate set.  Consequently, in either case, we
         // would blindly put the rates we support into our Operational Rate set
         // (including the basic rates, which we have already verified are
         // supported earlier in the roaming decision).
-
         // However, it turns out that this is not always the case.  Some AP's
         // (e.g. D-Link DI-784) ram 11g rates into the Operational Rate set,
         // too.  Now, we're a little more careful:
@@ -2805,7 +2734,6 @@
                 }
             }
         }
-
         if ( eCSR_CFG_DOT11_MODE_11G == cfgDot11Mode || 
              eCSR_CFG_DOT11_MODE_11N == cfgDot11Mode ||
              eCSR_CFG_DOT11_MODE_TAURUS == cfgDot11Mode ||
@@ -2851,22 +2779,18 @@
     tANI_U32 PropRatesEnable = 0;
     tANI_U8 MCSRateIdxSet[ SIZE_OF_SUPPORTED_MCS_SET ];
     tANI_U32 MCSRateLength = 0;
-
 #if defined(VOSS_ENABLED)
     VOS_ASSERT( pIes != NULL );
 #endif
-
     if( NULL != pIes )
     {
         csrIsPhyModeMatch( pMac, phyMode, pBssDesc, pProfile, &cfgDot11Mode, pIes );
-
         // Originally, we thought that for 11a networks, the 11a rates are always
         // in the Operational Rate set & for 11b and 11g networks, the 11b rates
         // appear in the Operational Rate set.  Consequently, in either case, we
         // would blindly put the rates we support into our Operational Rate set
         // (including the basic rates, which we have already verified are
         // supported earlier in the roaming decision).
-
         // However, it turns out that this is not always the case.  Some AP's
         // (e.g. D-Link DI-784) ram 11g rates into the Operational Rate set,
         // too.  Now, we're a little more careful:
@@ -2883,7 +2807,6 @@
                 }
             }
         }
-
         if ( eCSR_CFG_DOT11_MODE_11G == cfgDot11Mode || 
              eCSR_CFG_DOT11_MODE_11N == cfgDot11Mode ||
              eCSR_CFG_DOT11_MODE_TAURUS == cfgDot11Mode ||
@@ -2906,7 +2829,6 @@
                 }
             }
         }
-
         // Enable proprietary MAC features if peer node is Airgo node and STA
         // user wants to use them
         if( pIes->Airgo.present && pMac->roam.configParam.ProprietaryRatesEnabled )
@@ -2917,7 +2839,6 @@
         {
             PropRatesEnable = 0;
         }
-
         // For ANI network companions, we need to populate the proprietary rate
         // set with any proprietary rates we found in the beacon, only if user
         // allows them...
@@ -2935,7 +2856,6 @@
             // No proprietary modes...
             ProprietaryOperationalRatesLength = 0;
         }
-
         /* Get MCS Rate */
         pDstRate = MCSRateIdxSet;
         if ( pIes->HTCaps.present )
@@ -2949,7 +2869,6 @@
               }
            }
         }
-
         // Set the operational rate set CFG variables...
         ccmCfgSetStr(pMac, WNI_CFG_OPERATIONAL_RATE_SET, OperationalRates, 
                         OperationalRatesLength, NULL, eANI_BOOLEAN_FALSE);
@@ -2968,7 +2887,6 @@
     }
 }
 
-
 static void csrSetCfgRateSetFromProfile( tpAniSirGlobal pMac,
                                          tCsrRoamProfile *pProfile  )
 {
@@ -2982,7 +2900,6 @@
                                                    SIR_MAC_RATE_36,
                                                    SIR_MAC_RATE_48,
                                                        SIR_MAC_RATE_54  } } };
-
     tSirMacRateSetIE DefaultSupportedRates11b = {  SIR_MAC_RATESET_EID, 
                                                    { 4, 
                                                      { SIR_MAC_RATE_1, 
@@ -3005,12 +2922,10 @@
     tANI_U32 ProprietaryOperationalRatesLength = 0;
     tANI_U32 PropRatesEnable = 0;
     tANI_U8 operationChannel = 0; 
-
     if(pProfile->ChannelInfo.ChannelList)
     {
        operationChannel = pProfile->ChannelInfo.ChannelList[0];
     }
-
 #ifdef WLAN_SOFTAP_FEATURE
     cfgDot11Mode = csrRoamGetPhyModeBandForBss( pMac, pProfile, operationChannel, &eBand );
 #else
@@ -3032,7 +2947,6 @@
                          
         // Nothing in the Extended rate set.
         ExtendedOperationalRatesLength = 0;
-
         // populate proprietary rates if user allows them
         if ( pMac->roam.configParam.ProprietaryRatesEnabled ) 
         {
@@ -3094,7 +3008,6 @@
             ProprietaryOperationalRatesLength = 0;         
         }    
     }  
-
     // set this to 1 if prop. rates need to be advertised in to the IBSS beacon and user wants to use them
     if ( ProprietaryOperationalRatesLength && pMac->roam.configParam.ProprietaryRatesEnabled ) 
     {
@@ -3114,12 +3027,11 @@
                     ProprietaryOperationalRates, 
                     ProprietaryOperationalRatesLength, NULL, eANI_BOOLEAN_FALSE);
     ccmCfgSetInt(pMac, WNI_CFG_PROPRIETARY_ANI_FEATURES_ENABLED, PropRatesEnable, NULL, eANI_BOOLEAN_FALSE);
-
 }
-
 void csrRoamCcmCfgSetCallback(tHalHandle hHal, tANI_S32 result)
 {
     tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+
     tListElem *pEntry = csrLLPeekHead(&pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK);
     tANI_U32 sessionId;
     tSmeCmd *pCommand = NULL;
@@ -3138,7 +3050,6 @@
     }
 }
 
-
 //This function is very dump. It is here because PE still need WNI_CFG_PHY_MODE
 tANI_U32 csrRoamGetPhyModeFromDot11Mode(eCsrCfgDot11Mode dot11Mode, eCsrBand band)
 {
@@ -3151,11 +3062,30 @@
         if(eCSR_BAND_24 == band)
             return (WNI_CFG_PHY_MODE_11G);
     }
-
     return (WNI_CFG_PHY_MODE_11A);
 }
-
         
+        
+#ifdef WLAN_FEATURE_11AC
+ePhyChanBondState csrGetHTCBStateFromVHTCBState(ePhyChanBondState aniCBMode)
+{
+    switch ( aniCBMode )
+    {
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW:
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED:
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH:
+            return PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW:
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED:
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH:
+            return PHY_DOUBLE_CHANNEL_LOW_PRIMARY;
+        case PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED:
+	    default :
+            return PHY_SINGLE_CHANNEL_CENTERED;
+    }
+}
+#endif
+
 //pIes may be NULL
 eHalStatus csrRoamSetBssConfigCfg(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
                           tSirBssDescription *pBssDesc, tBssConfigParam *pBssConfig,
@@ -3193,7 +3123,6 @@
     csrSetCfgPrivacy(pMac, pProfile, (tANI_BOOLEAN)pBssConfig->BssCap.privacy );
     //short slot time
     ccmCfgSetInt(pMac, WNI_CFG_11G_SHORT_SLOT_TIME_ENABLED, pBssConfig->uShortSlotTime, NULL, eANI_BOOLEAN_FALSE);
-
 #ifdef WLAN_SOFTAP_FEATURE
     //11d
     ccmCfgSetInt(pMac, WNI_CFG_11D_ENABLED,
@@ -3205,6 +3134,7 @@
     */
     ccmCfgSetInt(pMac, WNI_CFG_LOCAL_POWER_CONSTRAINT, pBssConfig->uPowerLimit, NULL, eANI_BOOLEAN_FALSE);
     //CB
+
     if(CSR_IS_INFRA_AP(pProfile) || CSR_IS_WDS_AP(pProfile))
     {
         channel = pProfile->operationChannel;
@@ -3224,10 +3154,22 @@
         }
         else
         {
-           //cfgCb = pBssConfig->cbMode;
-           cfgCb = pMac->roam.configParam.channelBondingMode5GHz;
+           cfgCb = pBssConfig->cbMode;
         }
     }
+#ifdef WLAN_FEATURE_11AC
+    if(cfgCb > 2 )
+    {
+	if(!WDA_getFwWlanFeatCaps(DOT11AC)) {
+            cfgCb = csrGetHTCBStateFromVHTCBState(cfgCb);
+	}
+	else 
+	{
+            ccmCfgSetInt(pMac, WNI_CFG_VHT_CHANNEL_WIDTH,  pMac->roam.configParam.nVhtChannelWidth, NULL, eANI_BOOLEAN_FALSE);
+	}
+    }
+    else
+#endif
     ccmCfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE, cfgCb, NULL, eANI_BOOLEAN_FALSE);
     //Rate
     //Fixed Rate
@@ -3244,19 +3186,15 @@
     csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_CONFIG, sessionId );
 
     ccmCfgSetInt(pMac, WNI_CFG_JOIN_FAILURE_TIMEOUT, pBssConfig->uJoinTimeOut, (tCcmCfgSetCallback)csrRoamCcmCfgSetCallback, eANI_BOOLEAN_FALSE);
-
     return (status);
 }
 
-
-
 eHalStatus csrRoamStopNetwork( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, 
                                tSirBssDescription *pBssDesc, tDot11fBeaconIEs *pIes)
 {
     eHalStatus status;
     tBssConfigParam *pBssConfig;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     status = palAllocateMemory(pMac->hHdd, (void **)&pBssConfig, sizeof(tBssConfigParam)); 
     if(HAL_STATUS_SUCCESS(status))
     {
@@ -3265,6 +3203,8 @@
         if(HAL_STATUS_SUCCESS(status))
         {
             pSession->bssParams.uCfgDot11Mode = pBssConfig->uCfgDot11Mode;
+            /* This will allow to pass cbMode during join req */
+            pSession->bssParams.cbMode= pBssConfig->cbMode;
             //For IBSS, we need to prepare some more information
             if( csrIsBssTypeIBSS(pProfile->BSSType) || CSR_IS_WDS( pProfile )
 #ifdef WLAN_SOFTAP_FEATURE
@@ -3272,7 +3212,7 @@
 #endif
             )
             {
-                csrRoamPrepareBssParams(pMac, sessionId, pProfile, pBssDesc, pIes);
+                csrRoamPrepareBssParams(pMac, sessionId, pProfile, pBssDesc, pBssConfig, pIes);
             }
             // If we are in an IBSS, then stop the IBSS...
             ////Not worry about WDS connection for now
@@ -3327,7 +3267,6 @@
     return (status);
 }
 
-
 eCsrJoinState csrRoamJoin( tpAniSirGlobal pMac, tANI_U32 sessionId, 
                            tCsrScanResultInfo *pScanResult, tCsrRoamProfile *pProfile )
 {
@@ -3336,7 +3275,6 @@
     tSirBssDescription *pBssDesc = &pScanResult->BssDescriptor;
     tDot11fBeaconIEs *pIesLocal = (tDot11fBeaconIEs *)( pScanResult->pvIes ); //This may be NULL
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if( CSR_IS_WDS_STA( pProfile ) )
     {
         status = csrRoamStartWds( pMac, sessionId, pProfile, pBssDesc );
@@ -3377,13 +3315,13 @@
                 else
                 {
                     tBssConfigParam bssConfig;
-
                     //The key changes
                     palZeroMemory(pMac->hHdd, &bssConfig, sizeof(bssConfig));
                     status = csrRoamPrepareBssConfig(pMac, pProfile, pBssDesc, &bssConfig, pIesLocal);
                     if(HAL_STATUS_SUCCESS(status))
                     {
                         pSession->bssParams.uCfgDot11Mode = bssConfig.uCfgDot11Mode;
+                        pSession->bssParams.cbMode = bssConfig.cbMode;
                         //Reapply the config including Keys so reassoc is happening.
                         status = csrRoamSetBssConfigCfg(pMac, sessionId, pProfile, pBssDesc, &bssConfig, pIesLocal);
                         if(!HAL_STATUS_SUCCESS(status))
@@ -3433,23 +3371,19 @@
             palFreeMemory(pMac->hHdd, pIesLocal);
         }
     }
-
     return( eRoamState );
 }
 
-
 eHalStatus csrRoamShouldRoam(tpAniSirGlobal pMac, tANI_U32 sessionId, 
                              tSirBssDescription *pBssDesc, tANI_U32 roamId)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tCsrRoamInfo roamInfo;
-
     palZeroMemory(pMac->hHdd, &roamInfo, sizeof(tCsrRoamInfo));
     roamInfo.pBssDesc = pBssDesc;
     status = csrRoamCallCallback(pMac, sessionId, &roamInfo, roamId, eCSR_ROAM_SHOULD_ROAM, eCSR_ROAM_RESULT_NONE);
     return (status);
 }
-
 //In case no matching BSS is found, use whatever default we can find
 static void csrRoamAssignDefaultParam( tpAniSirGlobal pMac, tSmeCmd *pCommand )
 {
@@ -3495,7 +3429,7 @@
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     tCsrRoamProfile *pProfile = &pCommand->u.roamCmd.roamProfile;
     tANI_U8  concurrentChannel = 0;
-    
+
     do  
     {
         // Check for Cardbus eject condition, before trying to Roam to any BSS
@@ -3535,16 +3469,15 @@
                 while(pCommand->u.roamCmd.pRoamBssEntry)
                 {
                     pScanResult = GET_BASE_ADDR(pCommand->u.roamCmd.pRoamBssEntry, tCsrScanResult, Link);
-
                     /*If concurrency enabled take the concurrent connected channel first. */
                     /* Valid multichannel concurrent sessions exempted */
-                    if (vos_concurrent_sessions_running() && !csrIsValidMcConcurrentSession(pMac, sessionId))
+                    if (vos_concurrent_sessions_running() && 
+                        !csrIsValidMcConcurrentSession(pMac, sessionId, &pScanResult->Result.BssDescriptor))
                     {
                         concurrentChannel = 
                             csrGetConcurrentOperationChannel(pMac);
                         VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, "%s: "
                                 " csr Concurrent Channel = %d", __FUNCTION__, concurrentChannel);
-
                         if ((concurrentChannel) && 
                                 (concurrentChannel == 
                                  pScanResult->Result.BssDescriptor.channelId))
@@ -3556,14 +3489,8 @@
                                     FL("Concurrent channel match =%d"),
                                     concurrentChannel);
                             concurrentChannel = 0; 
-
                         }
                     }
-                    if ((vos_concurrent_sessions_running()) && 
-                         csrIsAnySessionInConnectState( pMac ))
-                    {
-                        pMac->roam.configParam.concurrencyEnabled = 1;
-                    }
 
                     if (!concurrentChannel)
                     {
@@ -3576,6 +3503,10 @@
                             break;
                         }
                      }
+                     else
+                     {
+                         eRoamState = eCsrStopRoamingDueToConcurrency;
+                     }
                     pCommand->u.roamCmd.pRoamBssEntry = csrLLNext(&pBSSList->List, pCommand->u.roamCmd.pRoamBssEntry, LL_ACCESS_LOCK);
                     if(NULL == pCommand->u.roamCmd.pRoamBssEntry)
                     {
@@ -3607,7 +3538,6 @@
             if(pScanResult)
             {
                 tDot11fBeaconIEs *pIesLocal = (tDot11fBeaconIEs *)pScanResult->Result.pvIes;
-
                 if( !pIesLocal && (!HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(pMac, &pScanResult->Result.BssDescriptor, &pIesLocal))) )
                 {
                     smsLog(pMac, LOGE, FL(" cannot parse IEs\n"));
@@ -3623,12 +3553,10 @@
                     CSR_IS_UAPSD_BSS(pIesLocal) )
                 {
 #ifndef WLAN_MDM_CODE_REDUCTION_OPT
-
                     acm_mask = sme_QosGetACMMask(pMac, &pScanResult->Result.BssDescriptor, 
                          pIesLocal);
                     pCommand->u.roamCmd.roamProfile.uapsd_mask &= ~(acm_mask);
 #endif /* WLAN_MDM_CODE_REDUCTION_OPT*/
-
                 }
                 else
                 {
@@ -3648,14 +3576,12 @@
             csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, 
                                  eCSR_ROAM_ASSOCIATION_START, eCSR_ROAM_RESULT_NONE );
         }
-
         if ( NULL == pCommand->u.roamCmd.pRoamBssEntry ) 
         {
             // If this is a start IBSS profile, then we need to start the IBSS.
             if ( CSR_IS_START_IBSS(pProfile) ) 
             {
                 tANI_BOOLEAN fSameIbss = eANI_BOOLEAN_FALSE;
-
                 // Attempt to start this IBSS...
                 csrRoamAssignDefaultParam( pMac, pCommand );
                 status = csrRoamStartIbss( pMac, sessionId, pProfile, &fSameIbss );
@@ -3733,7 +3659,6 @@
         }
         
     } while( 0 );
-
     if( (eCsrStopRoaming == eRoamState) && (CSR_IS_INFRASTRUCTURE( pProfile )) )
     {
         //Need to indicate association_completion if association_start has been done
@@ -3750,24 +3675,21 @@
     return( eRoamState );
 }
 
-
 static eHalStatus csrRoam( tpAniSirGlobal pMac, tSmeCmd *pCommand )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     eCsrJoinState RoamState;
     tANI_U32 sessionId = pCommand->sessionId;
     
-    smsLog(pMac, LOG2, FL("is called\n"));
     //***if( hddIsRadioStateOn( pAdapter ) )
     {
         // Attept to join a Bss...
         RoamState = csrRoamJoinNextBss( pMac, pCommand, eANI_BOOLEAN_FALSE );
-    
+
         // if nothing to join..
-        if ( eCsrStopRoaming == RoamState ) 
+        if (( eCsrStopRoaming == RoamState ) || ( eCsrStopRoamingDueToConcurrency == RoamState))
         {
             tANI_BOOLEAN fComplete = eANI_BOOLEAN_FALSE;
-
             // and if connected in Infrastructure mode...
             if ( csrIsConnStateInfra(pMac, sessionId) ) 
             {
@@ -3809,7 +3731,14 @@
             if(fComplete)
             {
                // ... otherwise, we can complete the Roam command here.
-               csrRoamComplete( pMac, eCsrNothingToJoin, NULL );
+               if(eCsrStopRoamingDueToConcurrency == RoamState)
+               {
+                   csrRoamComplete( pMac, eCsrJoinFailureDueToConcurrency, NULL );
+               }
+               else
+               {
+                   csrRoamComplete( pMac, eCsrNothingToJoin, NULL );
+               }
             }    
        }
        else if ( eCsrReassocToSelfNoCapChange == RoamState )
@@ -3824,7 +3753,6 @@
     
     return status;
 }
-
 eHalStatus csrProcessFTReassocRoamCommand ( tpAniSirGlobal pMac, tSmeCmd *pCommand )
 {
     tANI_U32 sessionId;
@@ -3832,10 +3760,8 @@
     tCsrScanResult *pScanResult = NULL;
     tSirBssDescription *pBssDesc = NULL;
     eHalStatus status = eHAL_STATUS_SUCCESS;
-
     sessionId = pCommand->sessionId;
     pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if(CSR_IS_ROAMING(pSession) && pSession->fCancelRoaming)
     {
         //the roaming is cancelled. Simply complete the command
@@ -3843,7 +3769,6 @@
         csrRoamComplete(pMac, eCsrNothingToJoin, NULL); 
         return eHAL_STATUS_FAILURE;
     }
-
     if (pCommand->u.roamCmd.pRoamBssEntry)
     {
         pScanResult = GET_BASE_ADDR(pCommand->u.roamCmd.pRoamBssEntry, tCsrScanResult, Link);
@@ -3856,13 +3781,11 @@
         csrRoamComplete(pMac, eCsrNothingToJoin, NULL); 
         return eHAL_STATUS_FAILURE;
     }
-
     status = csrRoamIssueReassociate(pMac, sessionId, pBssDesc, 
         (tDot11fBeaconIEs *)( pScanResult->Result.pvIes ), &pCommand->u.roamCmd.roamProfile);
     return status;
 }
 
-
 eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -3876,7 +3799,6 @@
         csrFreeRoamProfile(pMac, sessionId);
         status = csrRoamProcessDisassocDeauth( pMac, pCommand, TRUE, FALSE );
         break;
-
      case eCsrSmeIssuedDisassocForHandoff:
         //Not to free pMac->roam.pCurRoamProfile (via csrFreeRoamProfile) because it is needed after disconnect
 #if 0 // TODO : Confirm this change
@@ -3886,23 +3808,19 @@
 #endif
 
         break;
-
     case eCsrForcedDisassocMICFailure:
         csrFreeRoamProfile(pMac, sessionId);
         status = csrRoamProcessDisassocDeauth( pMac, pCommand, TRUE, TRUE );
         break;
-
     case eCsrForcedDeauth:
         csrFreeRoamProfile(pMac, sessionId);
         status = csrRoamProcessDisassocDeauth( pMac, pCommand, FALSE, FALSE );
         break;
-
     case eCsrHddIssuedReassocToSameAP:
     case eCsrSmeIssuedReassocToSameAP:
     {
         tDot11fBeaconIEs *pIes = NULL;
 
-
         if( pSession->pConnectBssDesc )
         {
             status = csrGetParsedBssDescriptionIEs(pMac, pSession->pConnectBssDesc, &pIes);
@@ -3915,7 +3833,6 @@
                 roamInfo.reasonCode = eCsrRoamReasonStaCapabilityChanged;
                 csrRoamCallCallback(pMac, pSession->sessionId, &roamInfo, 0, eCSR_ROAM_ROAMING_START, eCSR_ROAM_RESULT_NONE);
                 pSession->roamingReason = eCsrReassocRoaming;
-
                 roamInfo.pBssDesc = pSession->pConnectBssDesc;
                 roamInfo.pProfile = &pCommand->u.roamCmd.roamProfile;
                 pSession->bRefAssocStartCnt++;
@@ -3931,17 +3848,16 @@
         }
         break;
     }
-
     case eCsrCapsChange:
         smsLog(pMac, LOGE, FL("received eCsrCapsChange \n"));
         csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINING, sessionId );
         status = csrRoamIssueDisassociate( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, FALSE); 
         break;
-
     case eCsrSmeIssuedFTReassoc:
         smsLog(pMac, LOGE, FL("received FT Reassoc Req \n"));
         status = csrProcessFTReassocRoamCommand(pMac, pCommand);
         break;
+
     case eCsrStopBss:
        csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINING, sessionId);
        status = csrRoamIssueStopBss( pMac, sessionId, eCSR_ROAM_SUBSTATE_STOP_BSS_REQ );
@@ -3982,11 +3898,9 @@
         status = csrRoam( pMac, pCommand );
         break;
     }
-
     return (status);
 }
 
-
 void csrReinitRoamCmd(tpAniSirGlobal pMac, tSmeCmd *pCommand) 
 {
     if(pCommand->u.roamCmd.fReleaseBssList)
@@ -4005,25 +3919,20 @@
     palZeroMemory(pMac->hHdd, &pCommand->u.roamCmd, sizeof(tRoamCmd));
 }
 
-
 void csrReinitWmStatusChangeCmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
     palZeroMemory(pMac->hHdd, &pCommand->u.wmStatusChangeCmd, sizeof(tWmStatusChangeCmd));
 }
-
 void csrRoamComplete( tpAniSirGlobal pMac, eCsrRoamCompleteResult Result, void *Context )
 {
     tListElem *pEntry;
     tSmeCmd *pCommand;
     tANI_BOOLEAN fReleaseCommand = eANI_BOOLEAN_TRUE;
-
     smsLog( pMac, LOG2, "roamQ: Roam Completion ...\n" );
-
     pEntry = csrLLPeekHead( &pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK );
     if ( pEntry )
     {
         pCommand = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
-
         // If the head of the queue is Active and it is a ROAM command, remove
         // and put this on the Free queue.
         if ( eSmeCommandRoam == pCommand->command )
@@ -4058,22 +3967,18 @@
     {
         smsLog( pMac, LOGW, "CSR: Roam Completion called but NO commands are ACTIVE ...\n" );
     }
-
     if( fReleaseCommand )
     {
         smeProcessPendingQueue( pMac );
     }
 }
 
-
 void csrResetPMKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId )
 {
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     palZeroMemory( pMac->hHdd, &(pSession->PmkidCandidateInfo[0]), sizeof(tPmkidCandidateInfo) * CSR_MAX_PMKID_ALLOWED );
     pSession->NumPmkidCandidate = 0;
 }
-
 #ifdef FEATURE_WLAN_WAPI
 void csrResetBKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId )
 {
@@ -4082,11 +3987,8 @@
     pSession->NumBkidCandidate = 0;
 }
 #endif /* FEATURE_WLAN_WAPI */
-
 extern tANI_U8 csrWpaOui[][ CSR_WPA_OUI_SIZE ];
 
-
-
 static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrAuthType authType, 
                                          tSirBssDescription *pSirBssDesc,
                                          tDot11fBeaconIEs *pIes)
@@ -4094,7 +3996,6 @@
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     tDot11fBeaconIEs *pIesLocal = pIes;
-
     if((eCSR_AUTH_TYPE_WPA == authType) ||
         (eCSR_AUTH_TYPE_WPA_PSK == authType) ||
         (eCSR_AUTH_TYPE_RSN == authType) ||
@@ -4111,7 +4012,6 @@
 #endif /* FEATURE_WLAN_WAPI */
         )
     {
-
         if( !pIesLocal && (!HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(pMac, pSirBssDesc, &pIesLocal))) )
         {
             smsLog(pMac, LOGE, FL(" cannot parse IEs\n"));
@@ -4120,7 +4020,6 @@
         {
             tANI_U32 nIeLen;
             tANI_U8 *pIeBuf;
-
             if((eCSR_AUTH_TYPE_RSN == authType) ||
 #if defined WLAN_FEATURE_VOWIFI_11R
                 (eCSR_AUTH_TYPE_FT_RSN == authType) ||
@@ -4241,7 +4140,6 @@
     }
                       palCopyMemory(pMac->hHdd, pIeBuf, &pIesLocal->WAPI.unicast_cipher_suite_count, 2);
                       pIeBuf += 2;
-
                       if( pIesLocal->WAPI.unicast_cipher_suite_count )
                       {
                          //copy pwise_cipher_suites
@@ -4260,7 +4158,6 @@
                       }
                       pSession->nWapiRspIeLength = nIeLen + 2; 
                    }
-
                 }
           }
 #endif /* FEATURE_WLAN_WAPI */
@@ -4271,18 +4168,14 @@
         }
     }
     }
-
     return (status);
 }
 
-
-
 static void csrCheckAndUpdateACWeight( tpAniSirGlobal pMac, tDot11fBeaconIEs *pIEs )
 {
     v_U8_t bACWeights[WLANTL_MAX_AC];
     v_U8_t paramBk, paramBe, paramVi, paramVo;
     v_BOOL_t fWeightChange = VOS_FALSE;
-
     //Compare two ACs' EDCA parameters, from low to high (BK, BE, VI, VO)
     //The "formula" is, if lower AC's AIFSN+CWMin is bigger than a fixed amount
     //of the higher AC one, make the higher AC has the same weight as the lower AC.
@@ -4336,7 +4229,6 @@
         }
     }
 }
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
 //Returns whether the current association is a 11r assoc or not
 tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac)
@@ -4348,7 +4240,6 @@
 #endif
 }
 #endif
-
 #ifdef FEATURE_WLAN_CCX
 //Returns whether the current association is a CCX assoc or not
 tANI_BOOLEAN csrRoamIsCCXAssoc(tpAniSirGlobal pMac)
@@ -4360,7 +4251,6 @@
 #endif
 }
 #endif
-
 #ifdef FEATURE_WLAN_LFR
 //Returns whether "Legacy Fast Roaming" is currently enabled...or not
 tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac)
@@ -4393,9 +4283,7 @@
     tSirSmeStartBssRsp  *pSmeStartBssRsp = NULL;
 #endif
 
-
     smsLog( pMac, LOG1, FL("Processing ROAM results...\n"));
-
     switch( Result )
     {
         case eCsrJoinSuccess:
@@ -4423,7 +4311,6 @@
                 palFreeMemory(pMac->hHdd, pSession->pWpaRsnRspIE);
                 pSession->pWpaRsnRspIE = NULL;
             }
-
 #ifdef FEATURE_WLAN_WAPI
             if(pSession->pWapiRspIE)
             {
@@ -4449,7 +4336,6 @@
             {
                 pSession->connectState = eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED;
             }
-
             //Use the last connected bssdesc for reassoc-ing to the same AP.
             //NOTE: What to do when reassoc to a different AP???
             if( (eCsrHddIssuedReassocToSameAP == pCommand->u.roamCmd.roamReason) ||
@@ -4478,9 +4364,7 @@
             }
             if( pSirBssDesc )
             {
-
                 roamInfo.staId = HAL_STA_INVALID_IDX;
-
                 csrRoamSaveConnectedInfomation(pMac, sessionId, pProfile, pSirBssDesc, pIes);
                     //Save WPA/RSN IE
                 csrRoamSaveSecurityRspIE(pMac, sessionId, pProfile->negotiatedAuthType, pSirBssDesc, pIes);
@@ -4493,7 +4377,6 @@
                 // Moving even save profile above so that below mentioned conditon is also met.
                 // JEZ100225: Moved to after saving the profile. Fix needed in main/latest
                 csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINED, sessionId );
-
                 // Make sure the Set Context is issued before link indication to NDIS.  After link indication is 
                 // made to NDIS, frames could start flowing.  If we have not set context with LIM, the frames
                 // will be dropped for the security context may not be set properly. 
@@ -4525,11 +4408,9 @@
                 {
                     //Need to wait for supplicant authtication
                     roamInfo.fAuthRequired = eANI_BOOLEAN_TRUE;
-
                     //Set the subestate to WaitForKey in case authentiation is needed
                     csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY, sessionId );
 
-
                     if(pProfile->bWPSAssociation)
                     {
                         key_timeout_interval = CSR_WAIT_FOR_WPS_KEY_TIMEOUT_PERIOD;
@@ -4552,12 +4433,10 @@
                 
                 assocInfo.pBssDesc = pSirBssDesc; //could be NULL
                 assocInfo.pProfile = pProfile;
-
                 if(Context)
                 {
                     tSirSmeJoinRsp *pJoinRsp = (tSirSmeJoinRsp *)Context;
                     tANI_U32 len;
-
                     csrRoamFreeConnectedInfo( pMac, &pSession->connectedInfo );
                     len = pJoinRsp->assocReqLength + pJoinRsp->assocRspLength + pJoinRsp->beaconLength;
 #ifdef WLAN_FEATURE_VOWIFI_11R
@@ -4622,8 +4501,6 @@
                 // copying the frames 
                 sme_QosCsrEventInd(pMac, (v_U8_t)sessionId, ind_qos, &assocInfo);
 #endif
-
-
                 roamInfo.pBssDesc = pSirBssDesc;
                 roamInfo.statusCode = pSession->joinFailStatusCode.statusCode;
                 roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode;
@@ -4631,7 +4508,6 @@
                 acm_mask = sme_QosGetACMMask(pMac, pSirBssDesc, NULL);
 #endif /* WLAN_MDM_CODE_REDUCTION_OPT*/
                 pSession->connectedProfile.acm_mask = acm_mask;
-
 #ifdef FEATURE_WLAN_UAPSD_FW_TRG_FRAMES
                 //start UAPSD if uapsd_mask is not 0 because HDD will configure for trigger frame
                 //It may be better to let QoS do this????
@@ -4642,16 +4518,20 @@
                     pmcStartUapsd( pMac, NULL, NULL );
                 }
 #endif
-
                 roamInfo.u.pConnectedProfile = &pSession->connectedProfile;
                 if( pSession->bRefAssocStartCnt > 0 )
                 {
                     pSession->bRefAssocStartCnt--;
+#ifndef BMPS_WORKAROUND_NOT_NEEDED
+                    if(  csrIsConcurrentSessionRunning( pMac ) )
+                    {
+                       pMac->roam.configParam.doBMPSWorkaround = 1;
+                    }
+#endif
                     csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, eCSR_ROAM_ASSOCIATION_COMPLETION, eCSR_ROAM_RESULT_ASSOCIATED);
                 }
                 
                 csrRoamCompletion(pMac, sessionId, NULL, pCommand, eCSR_ROAM_RESULT_NONE, eANI_BOOLEAN_TRUE);
-
                 // reset the PMKID candidate list
                 csrResetPMKIDCandidateList( pMac, sessionId );
                 //Update TL's AC weight base on the current EDCA parameters
@@ -4672,7 +4552,6 @@
             {
                 smsLog(pMac, LOGW, "  Roam command doesn't have a BSS desc\n");
             }
-
             csrScanCancelIdleScan(pMac);
             //Not to signal link up because keys are yet to be set.
             //The linkup function will overwrite the sub-state that we need to keep at this point.
@@ -4680,7 +4559,6 @@
             {
                 csrRoamLinkUp(pMac, pSession->connectedProfile.bssid);
             }
-
             //Check if BMPS is required and start the BMPS retry timer.  Timer period is large
             //enough to let security and DHCP handshake succeed before entry into BMPS
             if (pmcShouldBmpsTimerRun(pMac))
@@ -4692,10 +4570,8 @@
                 }
                 smsLog(pMac, LOG2, FL("BMPS Retry Timer already running or started"));
             }
-
             break;
 
-
         case eCsrStartBssSuccess:
             // on the StartBss Response, LIM is returning the Bss Description that we
             // are beaconing.  Add this Bss Description to our scan results and
@@ -4756,7 +4632,6 @@
                 }
                 //We are doen with the IEs so free it
                 palFreeMemory(pMac->hHdd, pIes);
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
                 {
                     vos_log_ibss_pkt_type *pIbssLog;
@@ -4790,7 +4665,6 @@
 #endif //#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
                 //Only set context for non-WDS_STA. We don't even need it for WDS_AP. But since the encryption
                 //is WPA2-PSK so it won't matter.
-
 #ifdef WLAN_SOFTAP_FEATURE
                 if( CSR_IS_ENC_TYPE_STATIC( pProfile->negotiatedUCEncryptionType ) && !CSR_IS_INFRA_AP( pSession->pCurRoamProfile ))
                 {
@@ -4860,6 +4734,12 @@
 #ifdef WLAN_SOFTAP_FEATURE
                 roamInfo.staId = (tANI_U8)pSmeStartBssRsp->staId;
 #endif
+#ifndef BMPS_WORKAROUND_NOT_NEEDED
+                if(  csrIsConcurrentSessionRunning( pMac ) )
+                {
+                   pMac->roam.configParam.doBMPSWorkaround = 1;
+                }
+#endif
                 csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, roamStatus, roamResult );
             }
     
@@ -4883,14 +4763,11 @@
                 csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, 
                                         eCSR_ROAM_WDS_IND, eCSR_ROAM_RESULT_WDS_STOPPED );
             }
-
             break;
-
         case eCsrStartBssFailure:
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
             {
                 vos_log_ibss_pkt_type *pIbssLog;
-
                 WLAN_VOS_DIAG_LOG_ALLOC(pIbssLog, vos_log_ibss_pkt_type, LOG_WLAN_IBSS_C);
                 if(pIbssLog)
                 {
@@ -4899,7 +4776,6 @@
                 }
             }
 #endif //#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
-
             roamStatus = eCSR_ROAM_IBSS_IND;
             roamResult = eCSR_ROAM_RESULT_IBSS_STARTED;
             if( CSR_IS_WDS( pProfile ) )
@@ -4928,7 +4804,6 @@
             csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, roamStatus, roamResult );
             csrSetDefaultDot11Mode( pMac );
             break;
-
         case eCsrSilentlyStopRoaming:
             // We are here because we try to start the same IBSS
             //No message to PE
@@ -4946,9 +4821,7 @@
             //HDD may be mistakenly mark to disconnected state.
             csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, 
                                         eCSR_ROAM_IBSS_IND, eCSR_ROAM_RESULT_NONE );
-
             break;
-
         case eCsrSilentlyStopRoamingSaveState:
             //We are here because we try to connect to the same AP
             //No message to PE
@@ -4963,7 +4836,6 @@
             {
                 palCopyMemory(pMac->hHdd, &roamInfo.bssid, &roamInfo.pBssDesc->bssId, sizeof(tCsrBssid));
             }
-
             roamInfo.statusCode = pSession->joinFailStatusCode.statusCode;
             roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode;
             roamInfo.nBeaconLength = pSession->connectedInfo.nBeaconLength;
@@ -4980,7 +4852,6 @@
                                         eCSR_ROAM_ASSOCIATION_COMPLETION, eCSR_ROAM_RESULT_ASSOCIATED);
             csrRoamCompletion(pMac, sessionId, NULL, pCommand, eCSR_ROAM_RESULT_ASSOCIATED, eANI_BOOLEAN_TRUE);
             break;
-
         case eCsrReassocFailure:
 #ifndef WLAN_MDM_CODE_REDUCTION_OPT
             sme_QosCsrEventInd(pMac, (tANI_U8)sessionId, SME_QOS_CSR_REASSOC_FAILURE, NULL);
@@ -4999,9 +4870,9 @@
                                     eCSR_ROAM_RESULT_WDS_NOT_ASSOCIATED);
             //Need to issue stop_bss
             break;
-
         case eCsrJoinFailure:
         case eCsrNothingToJoin:
+        case eCsrJoinFailureDueToConcurrency:
         default:
         {
             smsLog(pMac, LOGW, FL("receives no association indication\n"));
@@ -5020,6 +4891,7 @@
                 // If this transition is because of an 802.11 OID, then we transition
                 // back to INIT state so we sit waiting for more OIDs to be issued and
                 // we don't start the IDLE timer.
+                case eCsrSmeIssuedFTReassoc:
                 case eCsrSmeIssuedAssocToSimilarAP:
                 case eCsrHddIssued:
                     csrRoamStateChange( pMac, eCSR_ROAMING_STATE_IDLE, sessionId );
@@ -5027,27 +4899,31 @@
                     roamInfo.pBssDesc = pCommand->u.roamCmd.pLastRoamBss;
                     roamInfo.statusCode = pSession->joinFailStatusCode.statusCode;
                     roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode;
-
                     /* Defeaturize this later if needed */
 #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
                     /* If Join fails while Handoff is in progress, indicate disassociated event to supplicant to reconnect */
                     if (csrRoamIsHandoffInProgress(pMac))
                     {
-                        csrRoamCallCallback(pMac, sessionId, NULL, pCommand->u.roamCmd.roamId, eCSR_ROAM_DISASSOCIATED, eCSR_ROAM_RESULT_FORCED);
                         /* Should indicate neighbor roam algorithm about the connect failure here */
                         csrNeighborRoamIndicateConnect(pMac, (tANI_U8)sessionId, VOS_STATUS_E_FAILURE);
                     }
-                    else
 #endif
-                    {
                         if(pSession->bRefAssocStartCnt > 0)
                         {
                             pSession->bRefAssocStartCnt--;
-                            csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, 
+                            if(eCsrJoinFailureDueToConcurrency == Result)
+                            {
+                                csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, 
+                                                eCSR_ROAM_ASSOCIATION_COMPLETION, 
+                                                eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL);
+                            }
+                            else
+                            {
+                                csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, 
                                                 eCSR_ROAM_ASSOCIATION_COMPLETION, 
                                                 eCSR_ROAM_RESULT_FAILURE);
+                            }
                         }
-                    }
                     smsLog(pMac, LOG1, FL("  roam(reason %d) failed\n"), pCommand->u.roamCmd.roamReason);
 #ifndef WLAN_MDM_CODE_REDUCTION_OPT
                     sme_QosCsrEventInd(pMac, (tANI_U8)sessionId, SME_QOS_CSR_DISCONNECT_IND, NULL);
@@ -5063,7 +4939,6 @@
                     }
 #endif
                     break;
-
                 case eCsrHddIssuedReassocToSameAP:
                 case eCsrSmeIssuedReassocToSameAP:
                     csrRoamStateChange( pMac, eCSR_ROAMING_STATE_IDLE, sessionId);
@@ -5158,23 +5033,18 @@
                     csrScanHandleFailedLostlink3(pMac, sessionId);
                     break;
             }
-
             break;
         }
     }
-
     return ( fReleaseCommand );
 }
 
-
 eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
-
     return (status);
 }
 
-
 eHalStatus csrRoamCopyProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pDstProfile, tCsrRoamProfile *pSrcProfile)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -5237,7 +5107,6 @@
             palCopyMemory(pMac->hHdd, pDstProfile->pWAPIReqIE, pSrcProfile->pWAPIReqIE, pSrcProfile->nWAPIReqIELength);
         }
 #endif /* FEATURE_WLAN_WAPI */
-
         if(pSrcProfile->nAddIEScanLength)
         {
             status = palAllocateMemory(pMac->hHdd,
@@ -5250,7 +5119,6 @@
             palCopyMemory(pMac->hHdd, pDstProfile->pAddIEScan, pSrcProfile->pAddIEScan,
                 pSrcProfile->nAddIEScanLength);
         }
-
         if(pSrcProfile->nAddIEAssocLength)
         {
             status = palAllocateMemory(pMac->hHdd,
@@ -5263,7 +5131,6 @@
             palCopyMemory(pMac->hHdd, pDstProfile->pAddIEAssoc, pSrcProfile->pAddIEAssoc,
                 pSrcProfile->nAddIEAssocLength);
         }
-
         if(pSrcProfile->ChannelInfo.ChannelList)
         {
             status = palAllocateMemory(pMac->hHdd, (void **)&pDstProfile->ChannelInfo.ChannelList, pSrcProfile->ChannelInfo.numOfChannels);
@@ -5274,7 +5141,6 @@
             pDstProfile->ChannelInfo.numOfChannels = pSrcProfile->ChannelInfo.numOfChannels;
             palCopyMemory(pMac->hHdd, pDstProfile->ChannelInfo.ChannelList, pSrcProfile->ChannelInfo.ChannelList, pSrcProfile->ChannelInfo.numOfChannels);
         }
-
         pDstProfile->AuthType = pSrcProfile->AuthType;
         pDstProfile->EncryptionType = pSrcProfile->EncryptionType;
         pDstProfile->mcEncryptionType = pSrcProfile->mcEncryptionType;
@@ -5298,7 +5164,6 @@
         /*Save the WPS info*/
         pDstProfile->bWPSAssociation = pSrcProfile->bWPSAssociation;
         pDstProfile->uapsd_mask = pSrcProfile->uapsd_mask;
-
         pDstProfile->beaconInterval = pSrcProfile->beaconInterval;
 #ifdef WLAN_SOFTAP_FEATURE
         pDstProfile->privacy           = pSrcProfile->privacy;
@@ -5313,9 +5178,7 @@
         pDstProfile->wps_state         = pSrcProfile->wps_state;
         pDstProfile->ieee80211d        = pSrcProfile->ieee80211d;
 #endif
-
         palCopyMemory(pMac->hHdd, &pDstProfile->Keys, &pSrcProfile->Keys, sizeof(pDstProfile->Keys));
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
         if (pSrcProfile->MDID.mdiePresent)
         {
@@ -5323,7 +5186,6 @@
             pDstProfile->MDID.mobilityDomain = pSrcProfile->MDID.mobilityDomain;
         }
 #endif
-
     }while(0);
     
     if(!HAL_STATUS_SUCCESS(status))
@@ -5334,7 +5196,6 @@
     
     return (status);
 }
-
 eHalStatus csrRoamCopyConnectedProfile(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pDstProfile )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -5364,7 +5225,6 @@
             pDstProfile->SSIDs.SSIDList[0].ssidHidden = pSrcProfile->ssidHidden;
             palCopyMemory(pMac->hHdd, &pDstProfile->SSIDs.SSIDList[0].SSID, &pSrcProfile->SSID, sizeof(tSirMacSSid));
         }
-
         status = palAllocateMemory(pMac->hHdd, (void **)&pDstProfile->ChannelInfo.ChannelList, 1);
         if(!HAL_STATUS_SUCCESS(status))
         {
@@ -5372,7 +5232,6 @@
         }
         pDstProfile->ChannelInfo.numOfChannels = 1;
         pDstProfile->ChannelInfo.ChannelList[0] = pSrcProfile->operationChannel;
-
         pDstProfile->AuthType.numEntries = 1;
         pDstProfile->AuthType.authType[0] = pSrcProfile->AuthType;
         pDstProfile->negotiatedAuthType = pSrcProfile->AuthType;
@@ -5404,7 +5263,6 @@
     return (status);
 }
 
-
 eHalStatus csrRoamIssueConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, 
                                 tScanResultHandle hBSSList, 
                                 eCsrRoamReason reason, tANI_U32 roamId, tANI_BOOLEAN fImediate,
@@ -5455,11 +5313,9 @@
         //We need to free the BssList when the command is done
         pCommand->u.roamCmd.fReleaseBssList = eANI_BOOLEAN_TRUE;
         pCommand->u.roamCmd.fUpdateCurRoamProfile = eANI_BOOLEAN_TRUE;
-
         VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
                   FL("CSR PERSONA=%d"),
                   pCommand->u.roamCmd.roamProfile.csrPersona);
-
         status = csrQueueSmeCommand(pMac, pCommand, fImediate);
         if( !HAL_STATUS_SUCCESS( status ) )
         {
@@ -5470,7 +5326,6 @@
     
     return (status);
 }
-
 eHalStatus csrRoamIssueReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
                                tCsrRoamModifyProfileFields *pMmodProfileFields,
                                eCsrRoamReason reason, tANI_U32 roamId, tANI_BOOLEAN fImediate)
@@ -5490,22 +5345,18 @@
         csrScanAbortMacScanNotForConnect(pMac);
         if(pProfile)
         {
-
            //This is likely trying to reassoc to different profile
            pCommand->u.roamCmd.fReleaseProfile = eANI_BOOLEAN_FALSE;
            //make a copy of the profile
            status = csrRoamCopyProfile(pMac, &pCommand->u.roamCmd.roamProfile, pProfile);
            pCommand->u.roamCmd.fUpdateCurRoamProfile = eANI_BOOLEAN_TRUE;
-
         }
         else
         {
             status = csrRoamCopyConnectedProfile(pMac, sessionId, &pCommand->u.roamCmd.roamProfile);
             //how to update WPA/WPA2 info in roamProfile??
             pCommand->u.roamCmd.roamProfile.uapsd_mask = pMmodProfileFields->uapsd_mask;
-
         }
-
         if(HAL_STATUS_SUCCESS(status))
         {
            pCommand->u.roamCmd.fReleaseProfile = eANI_BOOLEAN_TRUE;
@@ -5519,7 +5370,6 @@
         pCommand->u.roamCmd.hBSSList = CSR_INVALID_SCANRESULT_HANDLE; 
         pCommand->u.roamCmd.fReleaseBssList = eANI_BOOLEAN_FALSE;
         pCommand->u.roamCmd.fReassoc = eANI_BOOLEAN_TRUE;
-
         status = csrQueueSmeCommand(pMac, pCommand, fImediate);
         if( !HAL_STATUS_SUCCESS( status ) )
     {
@@ -5528,18 +5378,15 @@
             csrReleaseCommandRoam( pMac, pCommand );
     }
     }
-
     return (status);
 }
 
-
 eHalStatus csrRoamConnectWithBSSList(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, 
                                      tScanResultHandle hBssListIn, tANI_U32 *pRoamId)
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
     tScanResultHandle hBSSList;
     tANI_U32 roamId = 0;
-
     status = csrScanCopyResultList(pMac, hBssListIn, &hBSSList);
     if(HAL_STATUS_SUCCESS(status))
     {
@@ -5556,11 +5403,9 @@
             csrScanResultPurge(pMac, hBSSList);
         }
     }
-
     return (status);
 }
 
-
 eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, 
                           tScanResultHandle hBssListIn, tANI_U32 *pRoamId)
 {
@@ -5570,16 +5415,13 @@
     tANI_U32 roamId = 0;
     tANI_BOOLEAN fCallCallback = eANI_BOOLEAN_FALSE;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if (NULL == pProfile)
     {
         smsLog(pMac, LOGP, FL("No profile specified"));
         return eHAL_STATUS_FAILURE;
     }
-
     smsLog(pMac, LOG1, FL("called  BSSType = %d authtype = %d  encryType = %d\n"),
                 pProfile->BSSType, pProfile->AuthType.authType[0], pProfile->EncryptionType.encryptionType[0]);
-
     if( CSR_IS_WDS( pProfile ) && 
         !HAL_STATUS_SUCCESS( status = csrIsBTAMPAllowed( pMac, pProfile->operationChannel ) ) )
     {
@@ -5590,14 +5432,12 @@
     csrScanCancelIdleScan(pMac);
     //Only abort the scan if it is not used for other roam/connect purpose
     csrScanAbortMacScan(pMac);
-
 #ifdef WLAN_SOFTAP_FEATURE
     if (!vos_concurrent_sessions_running() && (VOS_STA_SAP_MODE == pProfile->csrPersona))//In case of AP mode we do not want idle mode scan
     {
         csrScanDisable(pMac);
     }
 #endif
-
     csrRoamRemoveDuplicateCommand(pMac, sessionId, NULL, eCsrHddIssued);
     //Check whether ssid changes
     if(csrIsConnStateConnected(pMac, sessionId))
@@ -5658,7 +5498,6 @@
                 {
                     pScanFilter->bWPSAssociation = 0;
                 }
-
                 do
                 {
                     if( (pProfile && CSR_IS_WDS_AP( pProfile ) )
@@ -5674,14 +5513,12 @@
                         {
                             fCallCallback = eANI_BOOLEAN_TRUE;
                         }
-
                         break;
                     }
                     status = csrScanGetResult(pMac, pScanFilter, &hBSSList);
                     smsLog(pMac, LOGE, "************ csrScanGetResult Status ********* %d\n", status);
                     if(HAL_STATUS_SUCCESS(status))
                     {
-
                         status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList, eCsrHddIssued, 
                                                     roamId, eANI_BOOLEAN_FALSE, eANI_BOOLEAN_FALSE);
                         if(!HAL_STATUS_SUCCESS(status))
@@ -5736,7 +5573,6 @@
    
     return (status);
 }                         
-
 eHalStatus csrRoamReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
                           tCsrRoamModifyProfileFields modProfileFields,
                           tANI_U32 *pRoamId)
@@ -5745,20 +5581,17 @@
    tANI_BOOLEAN fCallCallback = eANI_BOOLEAN_TRUE;
    tANI_U32 roamId = 0;
    tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
    if (NULL == pProfile)
    {
       smsLog(pMac, LOGP, FL("No profile specified"));
       return eHAL_STATUS_FAILURE;
    }
-
    smsLog(pMac, LOG1, FL("called  BSSType = %d authtype = %d  encryType = %d\n"), pProfile->BSSType, pProfile->AuthType.authType[0], pProfile->EncryptionType.encryptionType[0]);
    csrRoamCancelRoaming(pMac, sessionId);
    csrScanRemoveFreshScanCommand(pMac, sessionId);
    csrScanCancelIdleScan(pMac);
    csrScanAbortMacScanNotForConnect(pMac);
    csrRoamRemoveDuplicateCommand(pMac, sessionId, NULL, eCsrHddIssuedReassocToSameAP);
-
    if(csrIsConnStateConnected(pMac, sessionId))
    {
       if(pProfile)
@@ -5789,7 +5622,6 @@
    {
       smsLog(pMac, LOG1, FL("Not connected! No need to reassoc\n"));
    }
-
    if(!fCallCallback)
    {
       roamId = GET_NEXT_ROAM_ID(&pMac->roam);
@@ -5798,20 +5630,16 @@
          *pRoamId = roamId;
       }
 
-
       status = csrRoamIssueReassoc(pMac, sessionId, pProfile, &modProfileFields, 
                                    eCsrHddIssuedReassocToSameAP, roamId, eANI_BOOLEAN_FALSE);
-
    }
    else
    {
       status = csrRoamCallCallback(pMac, sessionId, NULL, roamId, 
                                    eCSR_ROAM_FAILED, eCSR_ROAM_RESULT_FAILURE);
    }
-
    return status;
 }
-
 eHalStatus csrRoamJoinLastProfile(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
@@ -5820,7 +5648,6 @@
     tANI_U32 roamId;
     tCsrRoamProfile *pProfile = NULL;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     do
     {
         if(pSession->pCurRoamProfile)
@@ -5887,14 +5714,11 @@
         csrReleaseProfile(pMac, pProfile);
         palFreeMemory(pMac->hHdd, pProfile);
     }
-
     return (status);
 }
-
 eHalStatus csrRoamReconnect(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
-
     if(csrIsConnStateConnected(pMac, sessionId))
     {
         status = csrRoamIssueDisassociateCmd(pMac, sessionId, eCSR_DISCONNECT_REASON_UNSPECIFIED);
@@ -5903,15 +5727,12 @@
             status = csrRoamJoinLastProfile(pMac, sessionId);
         }
     }
-
     return (status);
 }
 
-
 eHalStatus csrRoamConnectToLastProfile(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
-
     smsLog(pMac, LOGW, FL("is called\n"));
     csrRoamCancelRoaming(pMac, sessionId);
     csrRoamRemoveDuplicateCommand(pMac, sessionId, NULL, eCsrHddIssued);
@@ -5919,11 +5740,9 @@
     {
         status = csrRoamJoinLastProfile(pMac, sessionId);
     }
-
     return (status);
 }
 
-
 eHalStatus csrRoamProcessDisassocDeauth( tpAniSirGlobal pMac, tSmeCmd *pCommand, tANI_BOOLEAN fDisassoc, tANI_BOOLEAN fMICFailure )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -6003,28 +5822,23 @@
     return (status);
 }
 
-
 /* This is been removed from latest code base */
 /*
 static eHalStatus csrRoamProcessStopBss( tpAniSirGlobal pMac, tSmeCmd *pCommand )
 {
     eHalStatus status;
     tANI_U32 sessionId = pCommand->sessionId;
-
     csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINING );
     status = csrRoamIssueStopBss( pMac, sessionId, eCSR_ROAM_SUBSTATE_STOP_BSS_REQ );
-
     return ( status );
 }
 */
 
-
 eHalStatus csrRoamIssueDisassociateCmd( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDisconnectReason reason )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tSmeCmd *pCommand;
         tANI_BOOLEAN fHighPriority = eANI_BOOLEAN_FALSE;
-
     do
     {
         smsLog( pMac, LOGE, FL("  reason = %d\n"), reason );
@@ -6048,29 +5862,23 @@
         case eCSR_DISCONNECT_REASON_MIC_ERROR:
             pCommand->u.roamCmd.roamReason = eCsrForcedDisassocMICFailure;
             break;
-
         case eCSR_DISCONNECT_REASON_DEAUTH:
             pCommand->u.roamCmd.roamReason = eCsrForcedDeauth;
             break;
-
         case eCSR_DISCONNECT_REASON_HANDOFF:
             fHighPriority = eANI_BOOLEAN_TRUE;
             pCommand->u.roamCmd.roamReason = eCsrSmeIssuedDisassocForHandoff;
             break;
-
         case eCSR_DISCONNECT_REASON_UNSPECIFIED:
         case eCSR_DISCONNECT_REASON_DISASSOC:
             pCommand->u.roamCmd.roamReason = eCsrForcedDisassoc;
             break;
-
         case eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE:
             pCommand->u.roamCmd.roamReason = eCsrSmeIssuedIbssJoinFailure;
             break;
-
         case eCSR_DISCONNECT_REASON_IBSS_LEAVE:
             pCommand->u.roamCmd.roamReason = eCsrForcedIbssLeave;
             break;
-
         default:
             break;
         }
@@ -6081,16 +5889,13 @@
             csrReleaseCommandRoam( pMac, pCommand );
         }
     } while( 0 );
-
     return( status );
 }
 
-
 eHalStatus csrRoamIssueStopBssCmd( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_BOOLEAN fHighPriority )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tSmeCmd *pCommand;
-
     pCommand = csrGetCommandBuffer( pMac );
     if ( NULL != pCommand ) 
     {
@@ -6115,11 +5920,9 @@
         smsLog( pMac, LOGE, FL(" fail to get command buffer\n") );
         status = eHAL_STATUS_RESOURCES;
     }
-
     return ( status );
 }
 
-
 eHalStatus csrRoamDisconnectInternal(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDisconnectReason reason)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -6139,15 +5942,12 @@
         smsLog(pMac, LOG2, FL("called\n"));
         status = csrRoamIssueDisassociateCmd(pMac, sessionId, reason);
     }
-
     return (status);
 }
 
-
 eHalStatus csrRoamDisconnect(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDisconnectReason reason)
 {
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     csrRoamCancelRoaming(pMac, sessionId);
     pSession->ibss_join_pending = FALSE;
     csrRoamStopIbssJoinTimer(pMac, sessionId);
@@ -6156,7 +5956,6 @@
     return (csrRoamDisconnectInternal(pMac, sessionId, reason));
 }
 
-
 eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, 
                                           tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes)
 {
@@ -6177,6 +5976,8 @@
     pConnectProfile->BSSType = pProfile->BSSType;
     pConnectProfile->modifyProfileFields.uapsd_mask = pProfile->uapsd_mask;
     pConnectProfile->operationChannel = pSirBssDesc->channelId;
+    pConnectProfile->beaconInterval = pSirBssDesc->beaconInterval;
+
     palCopyMemory(pMac->hHdd, &pConnectProfile->Keys, &pProfile->Keys, sizeof(tCsrKeys));
     //Save bssid
     csrGetBssIdBssDesc(pMac, pSirBssDesc, &pConnectProfile->bssid);
@@ -6217,7 +6018,6 @@
         
         //Save the bss desc
         status = csrRoamSaveConnectedBssDesc(pMac, sessionId, pSirBssDesc);
-
            if( CSR_IS_QOS_BSS(pIesTemp) )
            {
               pConnectProfile->qap = TRUE;
@@ -6226,7 +6026,6 @@
            {
               pConnectProfile->qap = FALSE;
            }
-
         if ( NULL == pIes )
         {
             //Free memory if it allocated locally
@@ -6255,20 +6054,16 @@
     return (status);
 }
 
-
-
 static void csrRoamJoinRspProcessor( tpAniSirGlobal pMac, tSirSmeJoinRsp *pSmeJoinRsp )
 {
    tListElem *pEntry = NULL;
    tSmeCmd *pCommand = NULL;
-
    //The head of the active list is the request we sent
    pEntry = csrLLPeekHead(&pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK);
    if(pEntry)
    {
        pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link);
    }
-
    if ( eSIR_SME_SUCCESS == pSmeJoinRsp->statusCode ) 
    {
             if(pCommand && eCsrSmeIssuedAssocToSimilarAP == pCommand->u.roamCmd.roamReason)
@@ -6290,7 +6085,6 @@
         {
             roamId = pCommand->u.roamCmd.roamId;
         }
-
         pSession->joinFailStatusCode.statusCode = pSmeJoinRsp->statusCode;
         pSession->joinFailStatusCode.reasonCode = pSmeJoinRsp->protStatusCode;
         smsLog( pMac, LOGW, "SmeJoinReq failed with statusCode= 0x%08lX [%d]\n", pSmeJoinRsp->statusCode, pSmeJoinRsp->statusCode );
@@ -6327,32 +6121,26 @@
     } /*else: ( eSIR_SME_SUCCESS == pSmeJoinRsp->statusCode ) */
 }
 
-
 eHalStatus csrRoamIssueJoin( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pSirBssDesc, 
                              tDot11fBeaconIEs *pIes,
                              tCsrRoamProfile *pProfile, tANI_U32 roamId )
 {
     eHalStatus status;
-
     smsLog( pMac, LOG1, "Attempting to Join Bssid= %02x-%02x-%02x-%02x-%02x-%02x\n", 
                   pSirBssDesc->bssId[ 0 ],pSirBssDesc->bssId[ 1 ],pSirBssDesc->bssId[ 2 ],
                   pSirBssDesc->bssId[ 3 ],pSirBssDesc->bssId[ 4 ],pSirBssDesc->bssId[ 5 ] );
     
     // Set the roaming substate to 'join attempt'...
     csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId);
-
     // attempt to Join this BSS...
     status = csrSendJoinReqMsg( pMac, sessionId, pSirBssDesc, pProfile, pIes );
-
     return (status);
 }
 
-
 static eHalStatus csrRoamIssueReassociate( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pSirBssDesc, 
                               tDot11fBeaconIEs *pIes, tCsrRoamProfile *pProfile)
 {
     csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINING, sessionId);
-
     // Set the roaming substate to 'join attempt'...
     csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId );
 
@@ -6362,8 +6150,6 @@
     return csrSendSmeReassocReqMsg( pMac, sessionId, pSirBssDesc, pIes, pProfile );
 }
 
-
-
 void csrRoamReissueRoamCommand(tpAniSirGlobal pMac)
 {
     tListElem *pEntry;
@@ -6403,7 +6189,6 @@
  
 #endif                  
 
-
                 if( !HAL_STATUS_SUCCESS( csrRoamIssueStopBss( pMac, sessionId, eCSR_ROAM_SUBSTATE_STOP_BSS_REQ ) ) )
                 {
                     smsLog(pMac, LOGE, " Failed to reissue stop_bss command for WDS after disassociated\n");
@@ -6427,13 +6212,11 @@
     }
 }
 
-
 tANI_BOOLEAN csrIsRoamCommandWaitingForSession(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     tANI_BOOLEAN fRet = eANI_BOOLEAN_FALSE;
     tListElem *pEntry;
     tSmeCmd *pCommand = NULL;
-
     //alwasy lock active list before locking pending list
     csrLLLock( &pMac->sme.smeCmdActiveList );
     pEntry = csrLLPeekHead(&pMac->sme.smeCmdActiveList, LL_ACCESS_NOLOCK);
@@ -6462,16 +6245,13 @@
         csrLLUnlock(&pMac->sme.smeCmdPendingList);
     }
     csrLLUnlock( &pMac->sme.smeCmdActiveList );
-
     return (fRet);
 }
 
-
 tANI_BOOLEAN csrIsRoamCommandWaiting(tpAniSirGlobal pMac)
 {
     tANI_BOOLEAN fRet = eANI_BOOLEAN_FALSE;
     tANI_U32 i;
-
     for( i = 0; i < CSR_ROAM_SESSION_MAX; i++ )
     {
         if( CSR_IS_SESSION_VALID( pMac, i ) && ( fRet = csrIsRoamCommandWaitingForSession( pMac, i ) ) )
@@ -6479,15 +6259,12 @@
             break;
         }
     }
-
     return ( fRet );
 }
 
-
 tANI_BOOLEAN csrIsCommandWaiting(tpAniSirGlobal pMac)
 {
     tANI_BOOLEAN fRet = eANI_BOOLEAN_FALSE;
-
     //alwasy lock active list before locking pending list
     csrLLLock( &pMac->sme.smeCmdActiveList );
     fRet = csrLLIsListEmpty(&pMac->sme.smeCmdActiveList, LL_ACCESS_NOLOCK);
@@ -6496,17 +6273,14 @@
         fRet = csrLLIsListEmpty(&pMac->sme.smeCmdPendingList, LL_ACCESS_LOCK);
     }
     csrLLUnlock( &pMac->sme.smeCmdActiveList );
-
     return (fRet);
 }
 
-
 tANI_BOOLEAN csrIsScanForRoamCommandActive( tpAniSirGlobal pMac )
 {
     tANI_BOOLEAN fRet = eANI_BOOLEAN_FALSE;
     tListElem *pEntry;
     tCsrCmd *pCommand;
-
     //alwasy lock active list before locking pending list
     csrLLLock( &pMac->sme.smeCmdActiveList );
     pEntry = csrLLPeekHead(&pMac->sme.smeCmdActiveList, LL_ACCESS_NOLOCK);
@@ -6522,10 +6296,8 @@
         }
     }
     csrLLUnlock( &pMac->sme.smeCmdActiveList );
-
     return (fRet);
 }
-
 eHalStatus csrRoamIssueReassociateCmd( tpAniSirGlobal pMac, tANI_U32 sessionId )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -6533,7 +6305,6 @@
     tANI_BOOLEAN fHighPriority = eANI_BOOLEAN_TRUE;
     tANI_BOOLEAN fRemoveCmd = FALSE;
     tListElem *pEntry; 
-
     // Delete the old assoc command. All is setup for reassoc to be serialized
     pEntry = csrLLPeekHead( &pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK );
     if ( pEntry )
@@ -6562,13 +6333,11 @@
             }
         }
     }
-
     if(NULL == pCommand)
     {
         smsLog( pMac, LOGE, FL(" fail to get command buffer as expected based on previous connect roam command\n") );
         return eHAL_STATUS_RESOURCES;
     }
-
     do 
     {
         //Change the substate in case it is wait-for-key
@@ -6580,7 +6349,6 @@
         pCommand->command = eSmeCommandRoam;
         pCommand->sessionId = (tANI_U8)sessionId;
         pCommand->u.roamCmd.roamReason = eCsrSmeIssuedFTReassoc;
-
         status = csrQueueSmeCommand(pMac, pCommand, fHighPriority);
         if( !HAL_STATUS_SUCCESS( status ) )
         {
@@ -6589,7 +6357,6 @@
         }
     } while( 0 );
 
-
     return( status );
 }
 static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 result )
@@ -6600,7 +6367,6 @@
     tSmeCmd *pCommand = NULL;
     tANI_U32 sessionId;
     tCsrRoamSession *pSession;
-
     if(NULL == pEntry)
     {
         smsLog(pMac, LOGW, "   CFG_CNF with active list empty\n");
@@ -6657,7 +6423,6 @@
                 if ( csrIsInfraBssDesc( pBssDesc ) )
                 {
                     tDot11fBeaconIEs *pIesLocal = (tDot11fBeaconIEs *)pScanResult->Result.pvIes;
-
                     if(pIesLocal || (HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(pMac, pBssDesc, &pIesLocal))) )
                     {
                     // ..and currently in an Infrastructure connection....
@@ -6704,7 +6469,6 @@
                         }
                         else
 #endif
-
 #ifdef FEATURE_WLAN_CCX
                         if (csrRoamIsHandoffInProgress(pMac) && 
                                                 csrRoamIsCCXAssoc(pMac))
@@ -6773,7 +6537,6 @@
     }//we have active entry
 }
 
-
 static void csrRoamRoamingStateAuthRspProcessor( tpAniSirGlobal pMac, tSirSmeAuthRsp *pSmeAuthRsp )
 {
     //No one is sending eWNI_SME_AUTH_REQ to PE.
@@ -6784,7 +6547,6 @@
         // Successfully authenticated with a new Bss.  Attempt to stop the current Bss and
         // join the new one...
         /***pBssDesc = profGetRoamingBssDesc( pAdapter, &pHddProfile );
-
         roamStopNetwork( pAdapter, &pBssDesc->SirBssDescription );***/
     }
     else {
@@ -6795,7 +6557,6 @@
     }
 }
 
-
 static void csrRoamRoamingStateReassocRspProcessor( tpAniSirGlobal pMac, tpSirSmeJoinRsp pSmeJoinRsp )
 {
     eCsrRoamCompleteResult result;
@@ -6807,7 +6568,6 @@
     {
         smsLog( pMac, LOGW, "CSR SmeReassocReq Successful\n" );
         result = eCsrReassocSuccess;
-
         /* Defeaturize this part later if needed */
 #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
         /* Since the neighbor roam algorithm uses reassoc req for handoff instead of join, 
@@ -6855,14 +6615,11 @@
     }
 }
 
-
 static void csrRoamRoamingStateStopBssRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSmeRsp)
 {
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
     {
         vos_log_ibss_pkt_type *pIbssLog;
-
         WLAN_VOS_DIAG_LOG_ALLOC(pIbssLog, vos_log_ibss_pkt_type, LOG_WLAN_IBSS_C);
         if(pIbssLog)
         {
@@ -6875,7 +6632,6 @@
         }
     }
 #endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
-
     pMac->roam.roamSession[pSmeRsp->sessionId].connectState = eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED;
     if(CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ( pMac, pSmeRsp->sessionId))
     {
@@ -6887,7 +6643,6 @@
     }
 }
 
-
 void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisassocRsp *pSmeRsp )
 {
     tSirResultCodes statusCode;
@@ -6904,6 +6659,7 @@
 #endif
     tANI_U32 sessionId;
     tCsrRoamSession *pSession;
+
     tSirSmeDisassocRsp SmeDisassocRsp;
 
     csrSerDesUnpackDiassocRsp((tANI_U8 *)pSmeRsp, &SmeDisassocRsp);
@@ -6916,7 +6672,6 @@
     {
         pMac->roam.roamSession[sessionId].connectState = eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED;
     }
-
     pSession = CSR_GET_SESSION( pMac, sessionId );
     if ( CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN( pMac, sessionId ) )
     {
@@ -6932,7 +6687,6 @@
         } 
         csrRoamComplete( pMac, eCsrNothingToJoin, NULL );
     }
-
     else if ( CSR_IS_ROAM_SUBSTATE_DISASSOC_HO( pMac, sessionId ) )
     {
        smsLog( pMac, LOGE, "CSR SmeDisassocReq due to HO\n" );
@@ -6941,11 +6695,11 @@
         if ( pEntry )
         {
             pCommand = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
-
             // If the head of the queue is Active and it is a ROAM command, remove
             // and put this on the Free queue.
             if ( eSmeCommandRoam == pCommand->command )
             {
+
                 //we need to process the result first before removing it from active list because state changes 
                 //still happening insides roamQProcessRoamResults so no other roam command should be issued
                 fRemoveCmd = csrLLRemoveEntry( &pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK );
@@ -6954,7 +6708,6 @@
                     csrReleaseProfile(pMac, &pCommand->u.roamCmd.roamProfile);
                     pCommand->u.roamCmd.fReleaseProfile = eANI_BOOLEAN_FALSE;
                 }
-
                 if( fRemoveCmd )
                 {
                     csrReleaseCommandRoam( pMac, pCommand );
@@ -6974,13 +6727,12 @@
         {
             smsLog( pMac, LOGW, "CSR: Roam Completion called but NO commands are ACTIVE ...\n" );
         }
-
         //notify HDD for handoff, providing the BSSID too
         roamInfo.reasonCode = eCsrRoamReasonBetterAP;
 
         palCopyMemory(pMac->hHdd, roamInfo.bssid, pMac->roam.neighborRoamInfo.csrNeighborRoamProfile.BSSIDs.bssid, sizeof(tSirMacAddr));
 
-        csrRoamCallCallback(pMac,sessionId, &roamInfo, 0, eCSR_ROAM_ROAMING_START, eCSR_ROAM_RESULT_NONE);
+            csrRoamCallCallback(pMac,sessionId, &roamInfo, 0, eCSR_ROAM_ROAMING_START, eCSR_ROAM_RESULT_NONE);
 
         status = palAllocateMemory(pMac->hHdd, (void **)&pScanFilter, sizeof(tCsrScanResultFilter));
         if(HAL_STATUS_SUCCESS(status))
@@ -7030,12 +6782,12 @@
         }
         if( pScanFilter )
         {
+
             csrFreeScanFilter(pMac, pScanFilter);
             palFreeMemory( pMac->hHdd, pScanFilter );
         }
-
-
 #endif
+
     } //else if ( CSR_IS_ROAM_SUBSTATE_DISASSOC_HO( pMac ) )
     else if ( CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL( pMac, sessionId ) )
     {
@@ -7064,14 +6816,11 @@
         //We are not done yet. Get the data and continue roaming
         csrRoamReissueRoamCommand(pMac);
     }
-
 }
 
-
 static void csrRoamRoamingStateDeauthRspProcessor( tpAniSirGlobal pMac, tSirSmeDeauthRsp *pSmeRsp )
 {
     tSirResultCodes statusCode;
-
     //No one is sending eWNI_SME_DEAUTH_REQ to PE.
     smsLog(pMac, LOGW, FL("is no-op\n"));
     statusCode = csrGetDeAuthRspStatusCode( pSmeRsp );
@@ -7096,7 +6845,6 @@
     }
 }
 
-
 static void csrRoamRoamingStateStartBssRspProcessor( tpAniSirGlobal pMac, tSirSmeStartBssRsp *pSmeStartBssRsp )
 {
     eCsrRoamCompleteResult result;
@@ -7119,7 +6867,6 @@
 #endif
 }
 
-
 /*
   We need to be careful on whether to cast pMsgBuf (pSmeRsp) to other type of strucutres.
   It depends on how the message is constructed. If the message is sent by limSendSmeRsp,
@@ -7134,9 +6881,7 @@
     tCsrRoamInfo roamInfo;
         // TODO Session Id need to be acquired in this function
         tANI_U32 sessionId = 0;
-
     pSmeRsp = (tSirSmeRsp *)pMsgBuf;
-
     smsLog( pMac, LOG2, "Message %d[0x%04X] received in substate %d\n",
                 pSmeRsp->messageType, pSmeRsp->messageType,
                 pMac->roam.curSubState[pSmeRsp->sessionId] );
@@ -7214,9 +6959,7 @@
             {
                 csrRoamingStateConfigCnfProcessor( pMac, ((tCsrCfgSetRsp *)pSmeRsp)->respStatus );
             }
-
             break;
-
         //In case CSR issues STOP_BSS, we need to tell HDD about peer departed becasue PE is removing them
         case eWNI_SME_IBSS_PEER_DEPARTED_IND:
             pIbssPeerInd = (tSmeIbssPeerInd*)pSmeRsp;
@@ -7230,7 +6973,6 @@
                                 eCSR_ROAM_CONNECT_STATUS_UPDATE, 
                                 eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED);
             break;
-
         default:
             smsLog( pMac, LOG1, "Unexpected message type = %d[0x%X] received in substate %d\n",
                       pSmeRsp->messageType, pSmeRsp->messageType,
@@ -7245,11 +6987,9 @@
     }
 }
 
-
 void csrRoamJoinedStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
 {
     tSirSmeRsp *pSirMsg = (tSirSmeRsp *)pMsgBuf;
-
     switch (pSirMsg->messageType) 
     {
        case eWNI_SME_GET_STATISTICS_RSP:
@@ -7265,31 +7005,22 @@
             tCsrRoamInfo *pRoamInfo = NULL;
             tANI_U32 sessionId;
             eHalStatus status;
-
             smsLog( pMac, LOG1, FL("ASSOCIATION confirmation can be given to upper layer \n"));
-
             palZeroMemory(pMac->hHdd, &roamInfo, sizeof(tCsrRoamInfo));
             pRoamInfo = &roamInfo;
-
             pUpperLayerAssocCnf = (tSirSmeAssocIndToUpperLayerCnf *)pMsgBuf;
             status = csrRoamGetSessionIdFromBSSID( pMac, (tCsrBssid *)pUpperLayerAssocCnf->bssId, &sessionId );
             pSession = CSR_GET_SESSION(pMac, sessionId);
-
             pRoamInfo->statusCode = eSIR_SME_SUCCESS; //send the status code as Success 
             pRoamInfo->u.pConnectedProfile = &pSession->connectedProfile;
-
             pRoamInfo->staId = (tANI_U8)pUpperLayerAssocCnf->aid;
             pRoamInfo->rsnIELen = (tANI_U8)pUpperLayerAssocCnf->rsnIE.length;
             pRoamInfo->prsnIE = pUpperLayerAssocCnf->rsnIE.rsnIEdata;
-
             pRoamInfo->addIELen = (tANI_U8)pUpperLayerAssocCnf->addIE.length;
             pRoamInfo->paddIE = pUpperLayerAssocCnf->addIE.addIEdata;           
-
             palCopyMemory(pMac->hHdd, pRoamInfo->peerMac, pUpperLayerAssocCnf->peerMacAddr, sizeof(tSirMacAddr));
             palCopyMemory(pMac->hHdd, &pRoamInfo->bssid, pUpperLayerAssocCnf->bssId, sizeof(tCsrBssid));
-
             pRoamInfo->wmmEnabledSta = pUpperLayerAssocCnf->wmmEnabledSta;
-
             if(CSR_IS_INFRA_AP(pRoamInfo->u.pConnectedProfile) )
             {
                 pMac->roam.roamSession[sessionId].connectState = eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED;
@@ -7303,19 +7034,15 @@
                 status = csrRoamCallCallback(pMac, sessionId, pRoamInfo, 0, eCSR_ROAM_WDS_IND, eCSR_ROAM_RESULT_WDS_ASSOCIATION_IND);//Sta
             }
 
-
         }
         break;
 #endif
-
        default:
           csrRoamCheckForLinkStatusChange( pMac, pSirMsg );
           break;
     }
-
 }
 
-
 eHalStatus csrRoamIssueSetContextReq( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrEncryptionType EncryptType, 
                                      tSirBssDescription *pBssDescription,
                                 tSirMacAddr *bssId, tANI_BOOLEAN addKey,
@@ -7339,7 +7066,6 @@
            addKey )     
     {
         tCsrRoamSetKey setKey;
-
         setKey.encType = EncryptType;
         setKey.keyDirection = aniKeyDirection;    //Tx, Rx or Tx-and-Rx
         palCopyMemory( pMac->hHdd, &setKey.peerMac, bssId, sizeof(tCsrBssid) );   
@@ -7352,11 +7078,9 @@
         }
         status = csrRoamIssueSetKeyCommand( pMac, sessionId, &setKey, 0 );
     }
-
     return (status);
 }
 
-
 static eHalStatus csrRoamIssueSetKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessionId, 
                                              tCsrRoamSetKey *pSetKey, tANI_U32 roamId )
 {
@@ -7458,6 +7182,7 @@
             break;
         }
 #endif /* FEATURE_WLAN_CCX */
+
 #ifdef WLAN_FEATURE_11W
         //Check for 11w BIP
         else if ( eCSR_ENCRYPT_TYPE_AES_CMAC == pSetKey->encType )
@@ -7488,7 +7213,6 @@
             smsLog( pMac, LOGE, FL(" fail to send message status = %d\n"), status );
         }
     } while (0);
-
     // Free the command if there has been a failure, or it is a 
     // "local" operation like the set CCX CCKM KRK key.
     if( (!HAL_STATUS_SUCCESS( status ) && ( NULL != pCommand )) 
@@ -7499,18 +7223,15 @@
     {
         csrReleaseCommandSetKey( pMac, pCommand );
     }
-
     return( status );
 }
 
-
 eHalStatus csrRoamIssueRemoveKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessionId,
                                          tCsrRoamRemoveKey *pRemoveKey, tANI_U32 roamId )
 {
     eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
     tSmeCmd *pCommand = NULL;
     tANI_BOOLEAN fImediate = eANI_BOOLEAN_TRUE;
-
     do
     {
         if( !csrIsSetKeyAllowed(pMac, sessionId) ) 
@@ -7537,7 +7258,6 @@
             //in this case, put it to the end of the Q incase there is a set key pending.
             fImediate = eANI_BOOLEAN_FALSE;
         }
-
         smsLog( pMac, LOGE, FL("keyType=%d, keyId=%d, PeerMac=%02x, %02x, %02x, %02x, %02x, %02x\n"),       
             pRemoveKey->encType, pRemoveKey->keyId,
             pCommand->u.removeKeyCmd.peerMac[0],
@@ -7546,7 +7266,6 @@
             pCommand->u.removeKeyCmd.peerMac[3], 
             pCommand->u.removeKeyCmd.peerMac[4],
             pCommand->u.removeKeyCmd.peerMac[5]);
-
         status = csrQueueSmeCommand(pMac, pCommand, fImediate);
         if( !HAL_STATUS_SUCCESS( status ) )
         {
@@ -7554,16 +7273,13 @@
             break;
         }
     } while (0);
-
     if( !HAL_STATUS_SUCCESS( status ) && ( NULL != pCommand ) )
     {
         csrReleaseCommandRemoveKey( pMac, pCommand );
     }
-
     return (status );
 }
 
-
 eHalStatus csrRoamProcessSetKeyCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
 {
     eHalStatus status;
@@ -7571,11 +7287,9 @@
     tAniEdType edType = csrTranslateEncryptTypeToEdType( pCommand->u.setKeyCmd.encType );
     tANI_BOOLEAN fUnicast = ( pCommand->u.setKeyCmd.peerMac[0] == 0xFF ) ? eANI_BOOLEAN_FALSE : eANI_BOOLEAN_TRUE;
     tANI_U32 sessionId = pCommand->sessionId;
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     WLAN_VOS_DIAG_EVENT_DEF(setKeyEvent, vos_event_wlan_security_payload_type);
-
     if(eCSR_ENCRYPT_TYPE_NONE != edType)
     {
         palZeroMemory(pMac->hHdd, &setKeyEvent, sizeof(vos_event_wlan_security_payload_type));
@@ -7595,7 +7309,6 @@
         if(CSR_IS_ENC_TYPE_STATIC(edType))
         {
             tANI_U32 defKeyId;
-
             //It has to be static WEP here
             if(HAL_STATUS_SUCCESS(ccmCfgGetInt(pMac, WNI_CFG_WEP_DEFAULT_KEYID, &defKeyId)))
             {
@@ -7610,7 +7323,6 @@
         WLAN_VOS_DIAG_EVENT_REPORT(&setKeyEvent, EVENT_WLAN_SECURITY);
     }
 #endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
-
     if( csrIsSetKeyAllowed(pMac, sessionId) )
     {
         status = csrSendMBSetContextReqMsg( pMac, sessionId, 
@@ -7630,7 +7342,6 @@
     {
         smsLog( pMac, LOGE, FL("  error status %d\n"), status );
         csrRoamCallCallback( pMac, sessionId, NULL, pCommand->u.setKeyCmd.roamId, eCSR_ROAM_SET_KEY_COMPLETE, eCSR_ROAM_RESULT_FAILURE);
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
         if(eCSR_ENCRYPT_TYPE_NONE != edType)
         {
@@ -7646,13 +7357,10 @@
             WLAN_VOS_DIAG_EVENT_REPORT(&setKeyEvent, EVENT_WLAN_SECURITY);
         }
 #endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
-
     }
-
     return ( status );
 }
 
-
 eHalStatus csrRoamProcessRemoveKeyCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
 {
     eHalStatus status;
@@ -7660,11 +7368,9 @@
     tANI_U16 wMsgLen = sizeof(tSirSmeRemoveKeyReq);
     tANI_U8 *p;
     tANI_U32 sessionId = pCommand->sessionId;
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     WLAN_VOS_DIAG_EVENT_DEF(removeKeyEvent, vos_event_wlan_security_payload_type);
-
     palZeroMemory(pMac->hHdd, &removeKeyEvent, sizeof(vos_event_wlan_security_payload_type));
     removeKeyEvent.eventId = WLAN_SECURITY_EVENT_REMOVE_KEY_REQ;
     removeKeyEvent.encryptionModeMulticast = (v_U8_t)diagEncTypeFromCSRType(pSession->connectedProfile.mcEncryptionType);
@@ -7674,7 +7380,6 @@
     removeKeyEvent.authMode = (v_U8_t)diagAuthTypeFromCSRType(pSession->connectedProfile.AuthType);
     WLAN_VOS_DIAG_EVENT_REPORT(&removeKeyEvent, EVENT_WLAN_SECURITY);
 #endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
-
     if( csrIsSetKeyAllowed(pMac, sessionId) )
     {
         status = palAllocateMemory( pMac->hHdd, (void **)&pMsg, wMsgLen );
@@ -7690,7 +7395,6 @@
         palZeroMemory(pMac->hHdd, pMsg, wMsgLen);
         pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_REMOVEKEY_REQ);
                 pMsg->length = pal_cpu_to_be16(wMsgLen);
-
         pMsg->sessionId = (tANI_U8)sessionId;
         pMsg->transactionId = 0;
         p = (tANI_U8 *)pMsg + sizeof(pMsg->messageType) + sizeof(pMsg->length) +
@@ -7719,28 +7423,21 @@
         *p = pCommand->u.removeKeyCmd.keyId;
         p++;
         *p = (pCommand->u.removeKeyCmd.peerMac[0] == 0xFF ) ? 0 : 1;
-
         status = palSendMBMessage(pMac->hHdd, pMsg);
     }
-
     if( !HAL_STATUS_SUCCESS( status ) )
     {
         smsLog( pMac, LOGE, FL(" error status \n"), status );
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
         removeKeyEvent.eventId = WLAN_SECURITY_EVENT_REMOVE_KEY_RSP;
         removeKeyEvent.status = WLAN_SECURITY_STATUS_FAILURE;;
         WLAN_VOS_DIAG_EVENT_REPORT(&removeKeyEvent, EVENT_WLAN_SECURITY);
 #endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
-
         csrRoamCallCallback( pMac, sessionId, NULL, pCommand->u.removeKeyCmd.roamId, eCSR_ROAM_REMOVE_KEY_COMPLETE, eCSR_ROAM_RESULT_FAILURE);
     }
-
     return ( status );
 }
 
-
-
 eHalStatus csrRoamSetKey( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 roamId )
 {
     eHalStatus status;
@@ -7753,11 +7450,9 @@
     {
         status = csrRoamIssueSetKeyCommand( pMac, sessionId, pSetKey, roamId );
     }
-
     return ( status );
 }
 
-
 /*
    Prepare a filter base on a profile for parsing the scan results.
    Upon successful return, caller MUST call csrFreeScanFilter on 
@@ -7826,14 +7521,12 @@
                  {
                          smsLog(pMac, LOG1, FL("process a channel (%d) that is invalid\n"), pProfile->ChannelInfo.ChannelList[index]);
                  }
-
             }
             }
             else
             {
                 break;
             }
-
         }
         else 
         {
@@ -7866,10 +7559,8 @@
              }
         }
 #endif /* FEATURE_WLAN_WAPI */
-
         /*Save the WPS info*/
         pScanFilter->bWPSAssociation = pProfile->bWPSAssociation;
-
         if( pProfile->countryCode[0] )
         {
             //This causes the matching function to use countryCode as one of the criteria.
@@ -7894,13 +7585,11 @@
     return(status);
 }
 
-
 tANI_BOOLEAN csrRoamIssueWmStatusChange( tpAniSirGlobal pMac, tANI_U32 sessionId,
                                          eCsrRoamWmStatusChangeTypes Type, tSirSmeRsp *pSmeRsp )
 {
     tANI_BOOLEAN fCommandQueued = eANI_BOOLEAN_FALSE;
     tSmeCmd *pCommand;
-
     do
     {
         // Validate the type is ok...
@@ -7940,16 +7629,12 @@
             csrReleaseCommandWmStatusChange( pMac, pCommand );
         }
 
-
         /* AP has issued Dissac/Deauth, Set the operating mode value to configured value */
         csrSetDefaultDot11Mode( pMac );
-
     } while( 0 );
-
     return( fCommandQueued );
 }
 
-
 static void csrUpdateRssi(tpAniSirGlobal pMac, void* pMsg)
 {
     v_S7_t  rssi = 0;
@@ -7982,6 +7667,27 @@
     }
     return;
 }
+static void csrRoamRssiIndHdlr(tpAniSirGlobal pMac, void* pMsg)
+{
+    WLANTL_TlIndicationReq *pTlRssiInd = (WLANTL_TlIndicationReq*)pMsg;
+    if(pTlRssiInd)
+    {
+        if(NULL != pTlRssiInd->tlCallback)
+        {
+            ((WLANTL_RSSICrossThresholdCBType)(pTlRssiInd->tlCallback))
+            (pTlRssiInd->pAdapter, pTlRssiInd->rssiNotification, pTlRssiInd->pUserCtxt);
+        }
+        else
+        {
+            smsLog( pMac, LOGE, FL("pTlRssiInd->tlCallback is NULL\n"));                
+        }
+    }
+    else
+    {
+        smsLog( pMac, LOGE, FL("pTlRssiInd is NULL\n"));    
+    }
+    return;
+}
 
 void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
 {
@@ -8002,7 +7708,6 @@
     tCsrRoamSession *pSession = NULL;
     tpSirSmeSwitchChannelInd pSwitchChnInd;
     tSmeMaxAssocInd *pSmeMaxAssocInd;
-
 #if defined ANI_PRODUCT_TYPE_AP
     pSirMsg->messageType = pal_be16_to_cpu(pSirMsg->messageType);
     pSirMsg->length = pal_be16_to_cpu(pSirMsg->length);
@@ -8012,9 +7717,7 @@
     pSirMsg->length = (pSirMsg->length);
     pSirMsg->statusCode = (pSirMsg->statusCode);
 #endif
-
     palZeroMemory(pMac->hHdd, &roamInfo, sizeof(roamInfo));
-
     switch( pSirMsg->messageType ) 
     {
         case eWNI_SME_ASSOC_IND:
@@ -8044,7 +7747,6 @@
                 
                 pRoamInfo->addIELen = (tANI_U8)pAssocInd->addIE.length;
                 pRoamInfo->paddIE =  pAssocInd->addIE.addIEdata;
-
                     palCopyMemory(pMac->hHdd, pRoamInfo->peerMac, pAssocInd->peerMacAddr, sizeof(tSirMacAddr));
                     palCopyMemory(pMac->hHdd, &pRoamInfo->bssid, pAssocInd->bssId, sizeof(tCsrBssid));
 #ifdef WLAN_SOFTAP_FEATURE
@@ -8077,7 +7779,6 @@
                     
                     /* send a message to CSR itself just to avoid the EAPOL frames going
                      * OTA before association response */
-
                     if(CSR_IS_WDS_AP( pRoamInfo->u.pConnectedProfile))
                 {
                     status = csrSendAssocIndToUpperLayerCnfMsg(pMac, pAssocInd, status, sessionId);
@@ -8093,10 +7794,8 @@
                 }
             }
             break;
-
         case eWNI_SME_DISASSOC_IND:
             smsLog( pMac, LOGE, FL("DISASSOCIATION Indication from MAC\n"));
-
             // Check if AP dis-associated us because of MIC failure. If so,
             // then we need to take action immediately and not wait till the
             // the WmStatusChange requests is pushed and processed
@@ -8132,7 +7831,6 @@
                 {
                     pSession->connectState = eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED;
                 }
-
 #ifndef WLAN_MDM_CODE_REDUCTION_OPT
                 sme_QosCsrEventInd(pMac, (v_U8_t)sessionId, SME_QOS_CSR_DISCONNECT_IND, NULL);
 #endif
@@ -8157,7 +7855,6 @@
 #endif                
             }
             break;
-
         case eWNI_SME_DEAUTH_IND:
             smsLog( pMac, LOG1, FL("DEAUTHENTICATION Indication from MAC\n"));
             pDeauthInd = (tpSirSmeDeauthInd)pSirMsg;
@@ -8192,7 +7889,6 @@
                 {
                     pSession->connectState = eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED;
                 }
-
 #ifndef WLAN_MDM_CODE_REDUCTION_OPT
                 sme_QosCsrEventInd(pMac, (v_U8_t)sessionId, SME_QOS_CSR_DISCONNECT_IND, NULL);
 #endif
@@ -8244,7 +7940,6 @@
                 if( CSR_IS_SESSION_VALID(pMac, sessionId) )
                 {                    
                     pSession = CSR_GET_SESSION(pMac, sessionId);
-
                     if ( CSR_IS_INFRA_AP(&pSession->connectedProfile) )
                     {
                         pRoamInfo = &roamInfo;
@@ -8268,7 +7963,6 @@
                 if( CSR_IS_SESSION_VALID(pMac, sessionId) )
                 {                    
                     pSession = CSR_GET_SESSION(pMac, sessionId);
-
                     if ( CSR_IS_INFRA_AP(&pSession->connectedProfile) )
                     {
                         pRoamInfo = &roamInfo;
@@ -8282,13 +7976,11 @@
             }
 #endif
             break;
-
         case eWNI_SME_MIC_FAILURE_IND:
             {
                 tpSirSmeMicFailureInd pMicInd = (tpSirSmeMicFailureInd)pSirMsg;
                 tCsrRoamInfo roamInfo, *pRoamInfo = NULL;
                 eCsrRoamResult result = eCSR_ROAM_RESULT_MIC_ERROR_UNICAST;
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
                 {
                     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
@@ -8305,7 +7997,6 @@
                     WLAN_VOS_DIAG_EVENT_REPORT(&secEvent, EVENT_WLAN_SECURITY);
                 }
 #endif//FEATURE_WLAN_DIAG_SUPPORT_CSR
-
                 status = csrRoamGetSessionIdFromBSSID( pMac, (tCsrBssid *)pMicInd->bssId, &sessionId );
                 if( HAL_STATUS_SUCCESS( status ) )
                 {
@@ -8324,13 +8015,11 @@
                 }
             }
             break;
-
 #ifdef WLAN_SOFTAP_FEATURE
         case eWNI_SME_WPS_PBC_PROBE_REQ_IND:
             {
                 tpSirSmeProbeReqInd pProbeReqInd = (tpSirSmeProbeReqInd)pSirMsg;
                 tCsrRoamInfo roamInfo;
-
                 smsLog( pMac, LOG1, FL("WPS PBC Probe request Indication from SME\n"));
            
                 status = csrRoamGetSessionIdFromBSSID( pMac, (tCsrBssid *)pProbeReqInd->bssId, &sessionId );
@@ -8345,7 +8034,6 @@
             break;        
 #endif
             
-
         case eWNI_SME_WM_STATUS_CHANGE_NTF:
             pStatusChangeMsg = (tSirSmeWmStatusChangeNtf *)pSirMsg;
             switch( pStatusChangeMsg->statusChangeCode ) 
@@ -8370,7 +8058,6 @@
                         roamStatus = eCSR_ROAM_CONNECT_STATUS_UPDATE;
                     }
                     break;
-
                 case eSIR_SME_IBSS_INACTIVE:
                     sessionId = csrFindIbssSession( pMac );
                     if( CSR_SESSION_ID_INVALID != sessionId )
@@ -8381,7 +8068,6 @@
                         roamStatus = eCSR_ROAM_CONNECT_STATUS_UPDATE;
                     }
                     break;
-
                 case eSIR_SME_JOINED_NEW_BSS:    // IBSS coalescing.
                     sessionId = csrFindIbssSession( pMac );
                     if( CSR_SESSION_ID_INVALID != sessionId )
@@ -8389,12 +8075,10 @@
                         pSession = CSR_GET_SESSION( pMac, sessionId );
                         // update the connection state information
                         pNewBss = &pStatusChangeMsg->statusChangeInfo.newBssInfo;
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
                         {
                             vos_log_ibss_pkt_type *pIbssLog;
                             tANI_U32 bi;
-
                             WLAN_VOS_DIAG_LOG_ALLOC(pIbssLog, vos_log_ibss_pkt_type, LOG_WLAN_IBSS_C);
                             if(pIbssLog)
                             {
@@ -8417,7 +8101,6 @@
                             }
                         }
 #endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
-
                         csrRoamUpdateConnectedProfileFromNewBss( pMac, sessionId, pNewBss );
                         csrRoamIssueSetContextReq( pMac, sessionId, pSession->connectedProfile.EncryptionType, 
                                                     pSession->pConnectBssDesc,
@@ -8443,7 +8126,6 @@
                     }
                     smsLog(pMac, LOGW, "CSR:  eSIR_SME_JOINED_NEW_BSS received from PE\n");
                     break;
-
                 // detection by LIM that the capabilities of the associated AP have changed.
                 case eSIR_SME_AP_CAPS_CHANGED:
                     pApNewCaps = &pStatusChangeMsg->statusChangeInfo.apNewCaps;
@@ -8461,21 +8143,17 @@
                     roamStatus = eCSR_ROAM_FAILED;
                     result = eCSR_ROAM_RESULT_NONE;
                     break;
-
             }  // end switch on statusChangeCode
             if(eCSR_ROAM_RESULT_NONE != result)
             {
                 csrRoamCallCallback(pMac, sessionId, pRoamInfo, 0, roamStatus, result);
             }
             break;
-
         case eWNI_SME_IBSS_NEW_PEER_IND:
             pIbssPeerInd = (tSmeIbssPeerInd *)pSirMsg;
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
             {
                 vos_log_ibss_pkt_type *pIbssLog;
-
                 WLAN_VOS_DIAG_LOG_ALLOC(pIbssLog, vos_log_ibss_pkt_type, LOG_WLAN_IBSS_C);
                 if(pIbssLog)
                 {
@@ -8485,7 +8163,6 @@
                 }
             }
 #endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
-
             sessionId = csrFindIbssSession( pMac );
             if( CSR_SESSION_ID_INVALID != sessionId )
             {
@@ -8564,13 +8241,11 @@
                 }
             }
             break;
-
         case eWNI_SME_IBSS_PEER_DEPARTED_IND:
             pIbssPeerInd = (tSmeIbssPeerInd*)pSirMsg;
             sessionId = csrFindIbssSession( pMac );
             if( CSR_SESSION_ID_INVALID != sessionId )
             {
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
                 {
                     vos_log_ibss_pkt_type *pIbssLog;
@@ -8587,7 +8262,6 @@
                     }
                 }
 #endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
-
                 smsLog(pMac, LOGW, "CSR: Peer departed notification from LIM\n");
                 roamInfo.staId = (tANI_U8)pIbssPeerInd->staId;
                 roamInfo.ucastSig = (tANI_U8)pIbssPeerInd->ucastSig;
@@ -8597,7 +8271,6 @@
                         eCSR_ROAM_CONNECT_STATUS_UPDATE, eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED);
             }
             break;
-
         case eWNI_SME_SETCONTEXT_RSP:
             {
                 tSirSmeSetContextRsp *pRsp = (tSirSmeSetContextRsp *)pSirMsg;
@@ -8656,17 +8329,17 @@
                         if( eSIR_SME_SUCCESS == pRsp->statusCode )
                         {
                             palCopyMemory( pMac, &roamInfo.peerMac, &pRsp->peerMacAddr, sizeof(tCsrBssid) );
-                            //Make sure we install the GTK before indicating to HDD as authenticated
-                            //This is to prevent broadcast packets go out after PTK and before GTK.
-                            if( palEqualMemory( pMac->hHdd, &Broadcastaddr, pRsp->peerMacAddr, 
-                                        sizeof(tSirMacAddr) ) )
-                            {
-                                result = eCSR_ROAM_RESULT_AUTHENTICATED;
-                            }
-                            else
-                            {
-                            result = eCSR_ROAM_RESULT_NONE;
-                            }
+                                //Make sure we install the GTK before indicating to HDD as authenticated
+                                //This is to prevent broadcast packets go out after PTK and before GTK.
+                                if( palEqualMemory( pMac->hHdd, &Broadcastaddr, pRsp->peerMacAddr, 
+                                           sizeof(tSirMacAddr) ) )
+                                {
+                                    result = eCSR_ROAM_RESULT_AUTHENTICATED;
+                                }
+                                else
+                                {
+                                    result = eCSR_ROAM_RESULT_NONE;
+                                }
                             pRoamInfo = &roamInfo;
                         }
                         else
@@ -8678,11 +8351,9 @@
                         }
                         csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.setKeyCmd.roamId, 
                                             eCSR_ROAM_SET_KEY_COMPLETE, result);
-
                         // Indicate SME_QOS that the SET_KEY is completed, so that SME_QOS
                         // can go ahead and initiate the TSPEC if any are pending
                         sme_QosCsrEventInd(pMac, (v_U8_t)sessionId, SME_QOS_CSR_SET_KEY_SUCCESS_IND, NULL);
-
 #ifdef FEATURE_WLAN_CCX
                         //Send Adjacent AP repot to new AP.
                         if (result == eCSR_ROAM_RESULT_AUTHENTICATED &&
@@ -8695,7 +8366,6 @@
                             pSession->isPrevApInfoValid = FALSE;
                         }
 #endif
-
                         if( csrLLRemoveEntry( &pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK ) )
                         {
                             csrReleaseCommandSetKey( pMac, pCommand );
@@ -8710,11 +8380,9 @@
                 {
                     smsLog( pMac, LOGE, "CSR: SetKey Completion called but NO commands are ACTIVE ...\n" );
                 }
-
                 smeProcessPendingQueue( pMac );
             }
             break;
-
         case eWNI_SME_REMOVEKEY_RSP:
             {
                 tSirSmeRemoveKeyRsp *pRsp = (tSirSmeRemoveKeyRsp *)pSirMsg;
@@ -8729,7 +8397,6 @@
                     {                
                         sessionId = pCommand->sessionId;
                         pSession = CSR_GET_SESSION( pMac, sessionId );
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
                         {
                             WLAN_VOS_DIAG_EVENT_DEF(removeKeyEvent, vos_event_wlan_security_payload_type);
@@ -8749,7 +8416,6 @@
                             WLAN_VOS_DIAG_EVENT_REPORT(&removeKeyEvent, EVENT_WLAN_SECURITY);
                         }
 #endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
-
                         if( eSIR_SME_SUCCESS == pRsp->statusCode )
                         {
                             palCopyMemory( pMac, &roamInfo.peerMac, &pRsp->peerMacAddr, sizeof(tCsrBssid) );
@@ -8776,28 +8442,23 @@
                 {
                     smsLog( pMac, LOGW, "CSR: SetKey Completion called but NO commands are ACTIVE ...\n" );
                 }
-
                 smeProcessPendingQueue( pMac );
             }
             break;
-
         case eWNI_SME_GET_STATISTICS_RSP:
             smsLog( pMac, LOGW, FL("Stats rsp from PE\n"));
             csrRoamStatsRspProcessor( pMac, pSirMsg );
             break;
-
         case eWNI_SME_GET_RSSI_REQ:
             smsLog( pMac, LOGW, FL("GetRssiReq from self\n"));
             csrUpdateRssi( pMac, pSirMsg );
             break;
 
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
         case eWNI_SME_FT_PRE_AUTH_RSP:
             csrRoamFTPreAuthRspProcessor( pMac, (tpSirFTPreAuthRsp)pSirMsg );
             break;
 #endif
-
         case eWNI_SME_MAX_ASSOC_EXCEEDED:
             pSmeMaxAssocInd = (tSmeMaxAssocInd*)pSirMsg;
             smsLog( pMac, LOG1, FL("send indication that max assoc have been reached and the new peer cannot be accepted\n"));          
@@ -8812,15 +8473,16 @@
             smsLog( pMac, LOG1, FL("Establish logical link req from HCI serialized through MC thread\n"));
             btampEstablishLogLinkHdlr( pSirMsg );
             break;
+        case eWNI_SME_RSSI_IND:
+            smsLog( pMac, LOG1, FL("RSSI indication from TL serialized through MC thread\n"));
+            csrRoamRssiIndHdlr( pMac, pSirMsg );
+        break;
 
         default:
             break;
-
     }  // end switch on message type
-
 }
 
-
 void csrCallRoamingCompletionCallback(tpAniSirGlobal pMac, tCsrRoamSession *pSession, 
                                       tCsrRoamInfo *pRoamInfo, tANI_U32 roamId, eCsrRoamResult roamResult)
 {
@@ -8847,17 +8509,14 @@
 eHalStatus csrRoamStartRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamingReason roamingReason)
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
-
     if(CSR_IS_LOSTLINK_ROAMING(roamingReason) && 
         (eANI_BOOLEAN_FALSE == pMac->roam.roamSession[sessionId].fCancelRoaming))
     {
         status = csrScanRequestLostLink1( pMac, sessionId );
     }
-
     return(status);
 }
 
-
 //return a boolean to indicate whether roaming completed or continue.
 tANI_BOOLEAN csrRoamCompleteRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId, 
                                     tANI_BOOLEAN fForce, eCsrRoamResult roamResult)
@@ -8866,7 +8525,6 @@
     tANI_TIMESTAMP roamTime = (tANI_TIMESTAMP)(pMac->roam.configParam.nRoamingTime * PAL_TICKS_PER_SECOND);
     tANI_TIMESTAMP curTime = (tANI_TIMESTAMP)palGetTickCount(pMac->hHdd);
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     //Check whether time is up
     if(pSession->fCancelRoaming || fForce || 
        ((curTime - pSession->roamingStartTime) > roamTime) ||
@@ -8913,15 +8571,12 @@
             fCompleted = eANI_BOOLEAN_FALSE;
         }
     }
-
     return(fCompleted);
 }
 
-
 void csrRoamCancelRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if(CSR_IS_ROAMING(pSession))
     {
         smsLog(pMac, LOGW, "   Cancelling roaming\n");
@@ -8943,7 +8598,6 @@
     }
 }
 
-
 void csrRoamRoamingTimerHandler(void *pv)
 {
     tCsrTimerInfo *pInfo = (tCsrTimerInfo *)pv;
@@ -8961,7 +8615,6 @@
     }
 }
 
-
 eHalStatus csrRoamStartRoamingTimer(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 interval)
 {
     eHalStatus status;
@@ -8974,18 +8627,15 @@
     return (status);
 }
 
-
 eHalStatus csrRoamStopRoamingTimer(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     return (palTimerStop(pMac->hHdd, pMac->roam.roamSession[sessionId].hTimerRoaming));
 }
 
-
 void csrRoamWaitForKeyTimeOutHandler(void *pv)
 {
     tCsrTimerInfo *pInfo = (tCsrTimerInfo *)pv;
     tpAniSirGlobal pMac = pInfo->pMac;
-
     if( CSR_IS_WAIT_FOR_KEY( pMac, pInfo->sessionId ) )
     {
         smsLog(pMac, LOGW, " SME pre-auth state timeout. \n ");
@@ -8995,7 +8645,6 @@
     
 }
 
-
 eHalStatus csrRoamStartWaitForKeyTimer(tpAniSirGlobal pMac, tANI_U32 interval)
 {
     eHalStatus status;
@@ -9006,13 +8655,11 @@
     return (status);
 }
 
-
 eHalStatus csrRoamStopWaitForKeyTimer(tpAniSirGlobal pMac)
 {
     return (palTimerStop(pMac->hHdd, pMac->roam.hTimerWaitForKey));
 }
 
-
 void csrRoamIbssJoinTimerHandler(void *pv)
 {
     tCsrTimerInfo *pInfo = (tCsrTimerInfo *)pv;
@@ -9026,9 +8673,7 @@
     //csrRoamCallCallback(pMac, sessionId, NULL, 0, eCSR_ROAM_IBS_IND, eCSR_ROAM_RESULT_IBSS_JOIN_FAILED);
     // Send an IBSS stop request to PE
     csrRoamDisconnectInternal(pMac, sessionId, reason);
-
 }
-
 eHalStatus csrRoamStartIbssJoinTimer(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 interval)
 {
     eHalStatus status;
@@ -9040,12 +8685,10 @@
     
     return (status);
 }
-
 eHalStatus csrRoamStopIbssJoinTimer(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     return (palTimerStop(pMac->hHdd, pMac->roam.roamSession[sessionId].hTimerIbssJoining));
 }
-
 void csrRoamCompletion(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pRoamInfo, tSmeCmd *pCommand, 
                         eCsrRoamResult roamResult, tANI_BOOLEAN fSuccess)
 {
@@ -9059,7 +8702,6 @@
         VOS_ASSERT( sessionId == pCommand->sessionId );
 #endif
     }
-
     if(eCSR_ROAM_ROAMING_COMPLETION == roamStatus)
     {
         //if success, force roaming completion
@@ -9073,7 +8715,6 @@
     }
 }
 
-
 eHalStatus csrRoamLostLink( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 type, tSirSmeRsp *pSirMsg)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -9085,7 +8726,6 @@
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     //Only need to roam for infra station. In this case P2P client will roam as well
     tANI_BOOLEAN fToRoam = CSR_IS_INFRASTRUCTURE(&pSession->connectedProfile);
-
     pSession->fCancelRoaming = eANI_BOOLEAN_FALSE;
     if ( eWNI_SME_DISASSOC_IND == type )
     {
@@ -9121,7 +8761,6 @@
     {
         status = csrSendMBDeauthCnfMsg(pMac, pDeauthIndMsg);
     }
-
     if(!HAL_STATUS_SUCCESS(status))
     {
        //If fail to send confirmation to PE, not to trigger roaming
@@ -9135,16 +8774,16 @@
 #ifdef WLAN_SOFTAP_FEATURE
     if( eWNI_SME_DISASSOC_IND == type)
     {
-        //staMacAddr
-        palCopyMemory(pMac->hHdd, roamInfo.peerMac, pDisassocIndMsg->peerMacAddr, sizeof(tSirMacAddr));
-        roamInfo.staId = (tANI_U8)pDisassocIndMsg->staId;
-    }
+            //staMacAddr
+            palCopyMemory(pMac->hHdd, roamInfo.peerMac, pDisassocIndMsg->peerMacAddr, sizeof(tSirMacAddr));
+            roamInfo.staId = (tANI_U8)pDisassocIndMsg->staId;
+        }
     else if( eWNI_SME_DEAUTH_IND == type )
     {
-        //staMacAddr
-        palCopyMemory(pMac->hHdd, roamInfo.peerMac, pDeauthIndMsg->peerMacAddr, sizeof(tSirMacAddr));
-        roamInfo.staId = (tANI_U8)pDeauthIndMsg->staId;
-    }
+            //staMacAddr
+            palCopyMemory(pMac->hHdd, roamInfo.peerMac, pDeauthIndMsg->peerMacAddr, sizeof(tSirMacAddr));
+            roamInfo.staId = (tANI_U8)pDeauthIndMsg->staId;
+        }
 #endif
     smsLog(pMac, LOGW, FL("roamInfo.staId (%d)\n"), roamInfo.staId);
     csrRoamCallCallback(pMac, sessionId, &roamInfo, 0, eCSR_ROAM_LOSTLINK, result);
@@ -9171,7 +8810,7 @@
                 {
                    roamInfo.reasonCode = eCsrRoamReasonSmeIssuedForLostLink;
                 }
-                pRoamInfo = &roamInfo;
+                    pRoamInfo = &roamInfo;
                 pSession->roamingReason = ( eWNI_SME_DEAUTH_IND == type ) ? 
                         eCsrLostlinkRoamingDeauth : eCsrLostlinkRoamingDisassoc;
                 pSession->roamingStartTime = (tANI_TIMESTAMP)palGetTickCount(pMac->hHdd);
@@ -9189,7 +8828,6 @@
             fToRoam = eANI_BOOLEAN_FALSE;
         }
     }
-
     if(!fToRoam)
     {
        if( eWNI_SME_DISASSOC_IND == type)
@@ -9217,7 +8855,6 @@
     return (status);
 }
 
-
 eHalStatus csrRoamLostLinkAfterhandoffFailure( tpAniSirGlobal pMac,tANI_U32 sessionId)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -9225,7 +8862,6 @@
     tSmeCmd *pCommand = NULL;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     pSession->fCancelRoaming =  eANI_BOOLEAN_FALSE;
-
     //Only remove the connected BSS in infrastructure mode
     csrRoamRemoveConnectedBssFromScanCache(pMac, &pSession->connectedProfile);
     if(pMac->roam.configParam.nRoamingTime)
@@ -9249,7 +8885,6 @@
                  }
              }
           }
-
           smsLog( pMac, LOGW, "Lost link roaming started ...\n");
        }
     }
@@ -9261,12 +8896,10 @@
     
     return (status);
 }
-
 void csrRoamWmStatusChangeComplete( tpAniSirGlobal pMac )
 {
     tListElem *pEntry;
     tSmeCmd *pCommand;
-
     pEntry = csrLLPeekHead( &pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK );
     if ( pEntry )
     {
@@ -9294,29 +8927,24 @@
     {
         smsLog( pMac, LOGW, "CSR: WmStatusChange Completion called but NO commands are ACTIVE ...\n" );
     }
-
     smeProcessPendingQueue( pMac );
 }
 
-
 void csrRoamProcessWmStatusChangeCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
     tSirSmeRsp *pSirSmeMsg;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, pCommand->sessionId );
-
     switch ( pCommand->u.wmStatusChangeCmd.Type )
     {
         case eCsrDisassociated:
             pSirSmeMsg = (tSirSmeRsp *)&pCommand->u.wmStatusChangeCmd.u.DisassocIndMsg;
             status = csrRoamLostLink(pMac, pCommand->sessionId, eWNI_SME_DISASSOC_IND, pSirSmeMsg);
             break;
-
         case eCsrDeauthenticated:
             pSirSmeMsg = (tSirSmeRsp *)&pCommand->u.wmStatusChangeCmd.u.DeauthIndMsg;
             status = csrRoamLostLink(pMac, pCommand->sessionId, eWNI_SME_DEAUTH_IND, pSirSmeMsg);
             break;
-
         default:
             smsLog(pMac, LOGW, FL("gets an unknown command %d\n"), pCommand->u.wmStatusChangeCmd.Type);
             break;
@@ -9330,13 +8958,11 @@
             smsLog(pMac, LOGE, FL("  failed to issue stopBSS command\n"));
         }
     }
-
     // Lost Link just triggers a roaming sequence.  We can complte the Lost Link
     // command here since there is nothing else to do.
     csrRoamWmStatusChangeComplete( pMac );
 }
 
-
 //This function returns band and mode information.
 //The only tricky part is that if phyMode is set to 11abg, this function may return eCSR_CFG_DOT11_MODE_11B
 //instead of eCSR_CFG_DOT11_MODE_11G if everything is set to auto-pick.
@@ -9348,7 +8974,6 @@
                                                      tANI_U8 operationChn, eCsrBand *pBand )
 #endif
 {
-
 #ifdef WLAN_SOFTAP_FEATURE
     eCsrPhyMode phyModeIn = (eCsrPhyMode)pProfile->phyMode;
     eCsrCfgDot11Mode cfgDot11Mode = csrGetCfgDot11ModeFromCsrPhyMode(pProfile, phyModeIn, 
@@ -9369,7 +8994,6 @@
     if( (eCSR_CFG_DOT11_MODE_AUTO == pMac->roam.configParam.uCfgDot11Mode) ||
         (eCSR_CFG_DOT11_MODE_ABG == pMac->roam.configParam.uCfgDot11Mode) ||
         (eCSR_CFG_DOT11_MODE_AUTO == cfgDot11Mode) || (eCSR_CFG_DOT11_MODE_ABG == cfgDot11Mode) )
-
 #endif
     {
         switch( pMac->roam.configParam.uCfgDot11Mode )
@@ -9470,21 +9094,18 @@
      smsLog(pMac, LOGE, FL("  Switching to Dot11B mode \n"));
      cfgDot11Mode = eCSR_CFG_DOT11_MODE_11B;
    }
-
     return( cfgDot11Mode );
 }
 
-
 eHalStatus csrRoamIssueStopBss( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamSubState NewSubstate )
 {
     eHalStatus status;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
+    
     
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
     {
         vos_log_ibss_pkt_type *pIbssLog;
-
         WLAN_VOS_DIAG_LOG_ALLOC(pIbssLog, vos_log_ibss_pkt_type, LOG_WLAN_IBSS_C);
         if(pIbssLog)
         {
@@ -9493,7 +9114,6 @@
         }
     }
 #endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
-
     pSession->ibss_join_pending = FALSE;
     csrRoamStopIbssJoinTimer(pMac, sessionId );
     // Set the roaming substate to 'stop Bss request'...
@@ -9505,7 +9125,6 @@
     return (status);
 }
 
-
 //pNumChan is a caller allocated space with the sizeof pChannels
 eHalStatus csrGetCfgValidChannels(tpAniSirGlobal pMac, tANI_U8 *pChannels, tANI_U32 *pNumChan)
 {
@@ -9515,7 +9134,6 @@
                   pNumChan));
 }
 
-
 tANI_BOOLEAN csrRoamIsChannelValid( tpAniSirGlobal pMac, tANI_U8 channel )
 {
     tANI_BOOLEAN fValid = FALSE;
@@ -9537,12 +9155,10 @@
     return fValid;
 }
 
-
 tANI_BOOLEAN csrRoamIsValid40MhzChannel(tpAniSirGlobal pMac, tANI_U8 channel)
 {
     tANI_BOOLEAN fValid = eANI_BOOLEAN_FALSE;
     tANI_U8 i;
-
     for(i = 0; i < pMac->scan.base40MHzChannels.numChannels; i++)
     {
         if(channel == pMac->scan.base40MHzChannels.channelList[i])
@@ -9551,18 +9167,15 @@
             break;
         }
     }
-
     return (fValid);
 }
 
-
 //This function check and validate whether the NIC can do CB (40MHz)
-static tAniCBSecondaryMode csrGetCBModeFromIes(tpAniSirGlobal pMac, tANI_U8 primaryChn, tDot11fBeaconIEs *pIes)
+ static ePhyChanBondState csrGetCBModeFromIes(tpAniSirGlobal pMac, tANI_U8 primaryChn, tDot11fBeaconIEs *pIes)
 {
-    tAniCBSecondaryMode eRet = eANI_CB_SECONDARY_NONE;
+    ePhyChanBondState eRet = PHY_SINGLE_CHANNEL_CENTERED;
     tANI_U8 centerChn;
     tANI_U32 ChannelBondingMode;
-
     if(CSR_IS_CHANNEL_24GHZ(primaryChn))
     {
         ChannelBondingMode = pMac->roam.configParam.channelBondingMode24GHz;
@@ -9578,39 +9191,44 @@
         {
             if(pIes->HTInfo.present)
             {
-                if(PHY_DOUBLE_CHANNEL_LOW_PRIMARY == pIes->HTInfo.secondaryChannelOffset)
-                {
-                    eRet = eANI_CB_SECONDARY_UP;
-                    centerChn = primaryChn + CSR_CB_CENTER_CHANNEL_OFFSET;
-                }
-                else if(PHY_DOUBLE_CHANNEL_HIGH_PRIMARY == pIes->HTInfo.secondaryChannelOffset)
-                {
-                    eRet = eANI_CB_SECONDARY_DOWN;
-                    centerChn = primaryChn - CSR_CB_CENTER_CHANNEL_OFFSET;
-                }
+                /* This is called during INFRA STA/CLIENT and should use the merged value of 
+                 * supported channel width and recommended tx width as per standard
+                 */
+                smsLog(pMac, LOG1, "scws %u rtws %u sco %u\n",
+                    pIes->HTCaps.supportedChannelWidthSet,
+                    pIes->HTInfo.recommendedTxWidthSet,
+                    pIes->HTInfo.secondaryChannelOffset);
+
+                if (pIes->HTInfo.recommendedTxWidthSet == eHT_CHANNEL_WIDTH_40MHZ)
+                    eRet = (ePhyChanBondState)pIes->HTInfo.secondaryChannelOffset;
                 else
-                {
-                    //PHY_SINGLE_CHANNEL_CENTERED
-                    centerChn = primaryChn;
-                    eRet = eANI_CB_SECONDARY_NONE;
+                    eRet = PHY_SINGLE_CHANNEL_CENTERED;
+                switch (eRet) {
+                    case PHY_DOUBLE_CHANNEL_LOW_PRIMARY:
+                        centerChn = primaryChn + CSR_CB_CENTER_CHANNEL_OFFSET;
+                        break;
+                    case PHY_DOUBLE_CHANNEL_HIGH_PRIMARY:
+                        centerChn = primaryChn - CSR_CB_CENTER_CHANNEL_OFFSET;
+                        break;
+                    case PHY_SINGLE_CHANNEL_CENTERED:
+                    default:
+                        centerChn = primaryChn;
+                        break;
                 }
-                if((eANI_CB_SECONDARY_NONE != eRet) && !csrRoamIsValid40MhzChannel(pMac, centerChn))
+                if((PHY_SINGLE_CHANNEL_CENTERED != eRet) && !csrRoamIsValid40MhzChannel(pMac, centerChn))
                 {
-                    smsLog(pMac, LOGW, "  Invalid center channel (%d), disable 40MHz mode\n", centerChn);
-                    eRet = eANI_CB_SECONDARY_NONE;
+                    smsLog(pMac, LOGE, "  Invalid center channel (%d), disable 40MHz mode\n", centerChn);
+                    //eRet = PHY_SINGLE_CHANNEL_CENTERED;
                 }
             }
         }
     }
-
     return eRet;
 }
-
 tANI_BOOLEAN csrIsEncryptionInList( tpAniSirGlobal pMac, tCsrEncryptionList *pCipherList, eCsrEncryptionType encryptionType )
 {
     tANI_BOOLEAN fFound = FALSE;
     tANI_U32 idx;
-
     for( idx = 0; idx < pCipherList->numEntries; idx++ )
     {
         if( pCipherList->encryptionType[idx] == encryptionType )
@@ -9619,15 +9237,12 @@
             break;
         }
     }
-
     return fFound;
 }
-
 tANI_BOOLEAN csrIsAuthInList( tpAniSirGlobal pMac, tCsrAuthList *pAuthList, eCsrAuthType authType )
 {
     tANI_BOOLEAN fFound = FALSE;
     tANI_U32 idx;
-
     for( idx = 0; idx < pAuthList->numEntries; idx++ )
     {
         if( pAuthList->authType[idx] == authType )
@@ -9636,10 +9251,8 @@
             break;
         }
     }
-
     return fFound;
 }
-
 tANI_BOOLEAN csrIsSameProfile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pProfile1, tCsrRoamProfile *pProfile2)
 {
     tANI_BOOLEAN fCheck = eANI_BOOLEAN_FALSE;
@@ -9700,12 +9313,10 @@
     return (fCheck);
 }
 
-
 tANI_BOOLEAN csrRoamIsSameProfileKeys(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pConnProfile, tCsrRoamProfile *pProfile2)
 {
     tANI_BOOLEAN fCheck = eANI_BOOLEAN_FALSE;
     int i;
-
     do
     {
         //Only check for static WEP
@@ -9731,14 +9342,11 @@
             fCheck = eANI_BOOLEAN_TRUE;
         }
     }while(0);
-
     return (fCheck);
 }
 
-
 //IBSS
 
-
 tANI_U8 csrRoamGetIbssStartChannelNumber50( tpAniSirGlobal pMac )
 {
     tANI_U8 channel = 0;     
@@ -9768,7 +9376,6 @@
                 }
             }
         }
-
         // this is rare, but if it does happen, we find anyone in 11a bandwidth and return the first 11a channel found!
         if (!fFound)    
         {
@@ -9786,7 +9393,6 @@
     return( channel );    
 }
 
-
 tANI_U8 csrRoamGetIbssStartChannelNumber24( tpAniSirGlobal pMac )
 {
     tANI_U8 channel = 1;
@@ -9822,7 +9428,6 @@
     return( channel );    
 }
 
-
 static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, 
                                       tCsrRoamStartBssParams *pParam )
 {
@@ -9856,21 +9461,17 @@
         VOS_ASSERT(0);
     }
 #endif
-
     switch( cfgDot11Mode )
     {
         case eCSR_CFG_DOT11_MODE_11G:
             nwType = eSIR_11G_NW_TYPE;
             break;
-
         case eCSR_CFG_DOT11_MODE_11B:
             nwType = eSIR_11B_NW_TYPE;
             break;   
-
         case eCSR_CFG_DOT11_MODE_11A:
             nwType = eSIR_11A_NW_TYPE;
             break;
-
         default:
         case eCSR_CFG_DOT11_MODE_11N:
         case eCSR_CFG_DOT11_MODE_TAURUS:
@@ -9936,7 +9537,6 @@
             pParam->operationalRateSet.rate[1] = SIR_MAC_RATE_2 | CSR_DOT11_BASIC_RATE_MASK;
             pParam->operationalRateSet.rate[2] = SIR_MAC_RATE_5_5 | CSR_DOT11_BASIC_RATE_MASK;
             pParam->operationalRateSet.rate[3] = SIR_MAC_RATE_11 | CSR_DOT11_BASIC_RATE_MASK;
-
             if ( eCSR_OPERATING_CHANNEL_ANY == operationChannel ) 
             {
                 channel = csrRoamGetIbssStartChannelNumber24( pMac );
@@ -9947,7 +9547,6 @@
             }
             
             break;     
-
         case eSIR_11G_NW_TYPE:
 #ifdef WLAN_FEATURE_P2P
             /* For P2P Client and P2P GO, disable 11b rates */ 
@@ -9970,14 +9569,12 @@
 #endif            
             {
             pParam->operationalRateSet.numRates = 4;
-
             pParam->operationalRateSet.rate[0] = SIR_MAC_RATE_1 | CSR_DOT11_BASIC_RATE_MASK;
             pParam->operationalRateSet.rate[1] = SIR_MAC_RATE_2 | CSR_DOT11_BASIC_RATE_MASK;
             pParam->operationalRateSet.rate[2] = SIR_MAC_RATE_5_5 | CSR_DOT11_BASIC_RATE_MASK;
             pParam->operationalRateSet.rate[3] = SIR_MAC_RATE_11 | CSR_DOT11_BASIC_RATE_MASK;
                
             pParam->extendedRateSet.numRates = 8;
-
                         pParam->extendedRateSet.rate[0] = SIR_MAC_RATE_6;
             pParam->extendedRateSet.rate[1] = SIR_MAC_RATE_9;
             pParam->extendedRateSet.rate[2] = SIR_MAC_RATE_12;
@@ -10003,7 +9600,6 @@
     pParam->sirNwType = nwType;
 }
 
-
 static void csrRoamGetBssStartParmsFromBssDesc( tpAniSirGlobal pMac, tSirBssDescription *pBssDesc, 
                                                  tDot11fBeaconIEs *pIes, tCsrRoamStartBssParams *pParam )
 {
@@ -10011,7 +9607,7 @@
     if( pParam )
     {
         pParam->sirNwType = pBssDesc->nwType;
-        pParam->cbMode = eANI_CB_SECONDARY_NONE;
+        pParam->cbMode = PHY_SINGLE_CHANNEL_CENTERED;
         pParam->operationChn = pBssDesc->channelId;
         palCopyMemory( pMac->hHdd, &pParam->bssid, pBssDesc->bssId, sizeof(tCsrBssid) );
     
@@ -10035,7 +9631,6 @@
                 palCopyMemory(pMac->hHdd, pParam->ssId.ssId, pIes->SSID.ssid, pParam->ssId.length);
             }
             pParam->cbMode = csrGetCBModeFromIes(pMac, pParam->operationChn, pIes);
-
         }
         else
         {
@@ -10045,7 +9640,6 @@
     }
 }
 
-
 static void csrRoamDetermineMaxRateForAdHoc( tpAniSirGlobal pMac, tSirMacRateSet *pSirRateSet )
 {
     tANI_U8 MaxRate = 0;
@@ -10065,7 +9659,6 @@
     return;
 }
 
-
 //this function finds a valid secondary channel for channel bonding with "channel".
 //Param: channel -- primary channel, caller must validate it
 //       cbChoice -- CB directory
@@ -10073,7 +9666,6 @@
 static tANI_U8 csrRoamGetSecondaryChannel(tpAniSirGlobal pMac, tANI_U8 channel, eCsrCBChoice cbChoice)
 {
     tANI_U8 chnUp = 0, chnDown = 0, chnRet = 0;
-
     switch (cbChoice)
     {
     case eCSR_CB_OFF:
@@ -10095,7 +9687,6 @@
         chnDown = channel - CSR_CB_CHANNEL_GAP;
         break;
     }
-
     //if CB_UP or auto, try channel up first
     if(chnUp && CSR_IS_SAME_BAND_CHANNELS(chnUp, channel) && csrRoamIsChannelValid(pMac, chnUp))
     {
@@ -10114,26 +9705,21 @@
             chnRet = chnDown;
         }
     }
-
     return chnRet;
 }
 
-
 eHalStatus csrRoamIssueStartBss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamStartBssParams *pParam, 
                                  tCsrRoamProfile *pProfile, tSirBssDescription *pBssDesc, tANI_U32 roamId )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     eCsrBand eBand;
-
     // Set the roaming substate to 'Start BSS attempt'...
     csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId );
-
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
     //Need to figure out whether we need to log WDS???
     if( CSR_IS_IBSS( pProfile ) )
     {
         vos_log_ibss_pkt_type *pIbssLog;
-
         WLAN_VOS_DIAG_LOG_ALLOC(pIbssLog, vos_log_ibss_pkt_type, LOG_WLAN_IBSS_C);
         if(pIbssLog)
         {
@@ -10165,7 +9751,6 @@
     pParam->nRSNIELength = (tANI_U16)pProfile->nRSNReqIELength;
     pParam->pRSNIE = pProfile->pRSNReqIE;
 
-
 #ifdef WLAN_SOFTAP_FEATURE
     pParam->privacy           = pProfile->privacy;
     pParam->fwdWPSPBCProbeReq = pProfile->fwdWPSPBCProbeReq;   
@@ -10181,14 +9766,12 @@
             pParam->operationChn = INFRA_AP_DEFAULT_CHANNEL;                   
         }  
     }
-
     pParam->protEnabled     = pProfile->protEnabled;
     pParam->obssProtEnabled = pProfile->obssProtEnabled;
     pParam->ht_protection   = pProfile->cfg_protection;
     pParam->wps_state       = pProfile->wps_state;
 #endif
     
-
 #ifdef WLAN_SOFTAP_FEATURE
     pParam->uCfgDot11Mode = csrRoamGetPhyModeBandForBss(pMac, pProfile, pParam->operationChn /* pProfile->operationChannel*/, 
                                         &eBand);
@@ -10199,19 +9782,16 @@
     pParam->bssPersona = pProfile->csrPersona;
     // When starting an IBSS, start on the channel from the Profile.
     status = csrSendMBStartBssReqMsg( pMac, sessionId, pProfile->BSSType, pParam, pBssDesc );
-
     return (status);
 }
 
-
 static void csrRoamPrepareBssParams(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, 
-                                     tSirBssDescription *pBssDesc, tDot11fBeaconIEs *pIes)
+                                     tSirBssDescription *pBssDesc, tBssConfigParam *pBssConfig, tDot11fBeaconIEs *pIes)
 {
     tANI_U8 Channel, SecondChn;
-    tAniCBSecondaryMode cbMode = eANI_CB_SECONDARY_NONE;
+    ePhyChanBondState cbMode = PHY_SINGLE_CHANNEL_CENTERED;
     eCsrCBChoice cbChoice;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if( pBssDesc )
     {
         csrRoamGetBssStartParmsFromBssDesc( pMac, pBssDesc, pIes, &pSession->bssParams );
@@ -10226,7 +9806,6 @@
     else
     {
         csrRoamGetBssStartParms(pMac, pProfile, &pSession->bssParams);
-
         //Use the first SSID
         if(pProfile->SSIDs.numOfSSIDs)
         {
@@ -10248,7 +9827,6 @@
         }
     }
     Channel = pSession->bssParams.operationChn;
-
     //Set operating channel in pProfile which will be used 
     //in csrRoamSetBssConfigCfg() to determine channel bonding
     //mode and will be configured in CFG later 
@@ -10262,6 +9840,20 @@
     {
   
         csrRoamDetermineMaxRateForAdHoc( pMac, &pSession->bssParams.operationalRateSet );
+        if (CSR_IS_INFRA_AP(pProfile))
+        {
+            if(CSR_IS_CHANNEL_24GHZ(Channel))
+            {
+                cbMode = pMac->roam.configParam.channelBondingMode24GHz;
+            }
+            else
+            {
+                cbMode = pMac->roam.configParam.channelBondingMode5GHz;
+            }
+            smsLog(pMac, LOG1, "##softap cbMode %d\n", cbMode);
+            pBssConfig->cbMode = cbMode;
+            pSession->bssParams.cbMode = cbMode;
+        }
 
         if( CSR_IS_START_IBSS( pProfile ) )
         {
@@ -10286,7 +9878,6 @@
             }
             else {
                 tANI_U32 ChannelBondingMode;
-
                 if(CSR_IS_CHANNEL_24GHZ(Channel))
                 {
                     ChannelBondingMode = pMac->roam.configParam.channelBondingMode24GHz;
@@ -10295,38 +9886,34 @@
                 {
                     ChannelBondingMode = pMac->roam.configParam.channelBondingMode5GHz;
                 }
-
                 //now we have a valid channel
                 if(WNI_CFG_CHANNEL_BONDING_MODE_DISABLE != ChannelBondingMode)
                 {
                     //let's pick a secondard channel
                     SecondChn = csrRoamGetSecondaryChannel(pMac, Channel, cbChoice);
-
                     if(SecondChn > Channel)
                     {
-                        cbMode = eANI_CB_SECONDARY_UP;
+                        cbMode = PHY_DOUBLE_CHANNEL_LOW_PRIMARY;
                     }
                     else if(SecondChn && SecondChn < Channel)
                     {
-                        cbMode =eANI_CB_SECONDARY_DOWN;
+                        cbMode = PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
                     }
                     else
                     {
-                        cbMode = eANI_CB_SECONDARY_NONE;
+                        cbMode = PHY_SINGLE_CHANNEL_CENTERED;
                     }
                     pSession->bssParams.cbMode = cbMode;
                 }
                 else
                 {
-                    pSession->bssParams.cbMode = eANI_CB_SECONDARY_NONE;
+                    pSession->bssParams.cbMode = PHY_SINGLE_CHANNEL_CENTERED;
                 }
             }
         }
     }
 }
 
-
-
 static eHalStatus csrRoamStartIbss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, 
                                     tANI_BOOLEAN *pfSameIbss )
 {
@@ -10367,7 +9954,7 @@
                 //save dotMode
                 pMac->roam.roamSession[sessionId].bssParams.uCfgDot11Mode = pBssConfig->uCfgDot11Mode;
                 //Prepare some more parameters for this IBSS
-                csrRoamPrepareBssParams(pMac, sessionId, pProfile, NULL, NULL);
+                csrRoamPrepareBssParams(pMac, sessionId, pProfile, NULL, pBssConfig, NULL);
                 status = csrRoamSetBssConfigCfg(pMac, sessionId, pProfile, NULL, pBssConfig, NULL);
             }
             
@@ -10382,12 +9969,10 @@
     return( status );
 }
 
-
 static void csrRoamUpdateConnectedProfileFromNewBss( tpAniSirGlobal pMac, tANI_U32 sessionId, 
                                                      tSirSmeNewBssInfo *pNewBss )
 {
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if( pNewBss )
     {
         // Set the operating channel.
@@ -10396,18 +9981,15 @@
         palCopyMemory( pMac->hHdd, &pSession->connectedProfile.bssid, 
                       &(pNewBss->bssId), sizeof( tCsrBssid ) );    
     }
-
     return;
 }
 
-
 #ifdef FEATURE_WLAN_WAPI
 eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
                                  tANI_U32 numItems )
 {
    eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
    tCsrRoamSession *pSession;
-
    if(!CSR_IS_SESSION_VALID( pMac, sessionId ))
    {
        smsLog(pMac, LOGE, FL("  Invalid session ID\n"));
@@ -10426,22 +10008,18 @@
                            sizeof(tBkidCacheInfo) * numItems );
        }
    }
-
    return (status);
 }
-
 eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
                                 tBkidCacheInfo *pBkidCache)
 {
    eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
    tCsrRoamSession *pSession;
-
    if(!CSR_IS_SESSION_VALID( pMac, sessionId ))
    {
        smsLog(pMac, LOGE, FL("  Invalid session ID\n"));
        return status;
    }
-
    pSession = CSR_GET_SESSION( pMac, sessionId );
    if(pNum && pBkidCache)
    {
@@ -10464,24 +10042,18 @@
            status = eHAL_STATUS_SUCCESS;
        }
    }
-
    return (status);
-
 }
-
 tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
    return (pMac->roam.roamSession[sessionId].NumBkidCache);
-
 }
 #endif /* FEATURE_WLAN_WAPI */
-
 eHalStatus csrRoamSetPMKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
                                  tPmkidCacheInfo *pPMKIDCache, tANI_U32 numItems )
 {
     eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     smsLog(pMac, LOGW, "csrRoamSetPMKIDCache called, numItems = %d\n", numItems);
     if(numItems <= CSR_MAX_PMKID_ALLOWED)
     {
@@ -10500,7 +10072,6 @@
             WLAN_VOS_DIAG_EVENT_REPORT(&secEvent, EVENT_WLAN_SECURITY);
         }
 #endif//FEATURE_WLAN_DIAG_SUPPORT_CSR
-
         status = eHAL_STATUS_SUCCESS;
         //numItems may be 0 to clear the cache
         pSession->NumPmkidCache = (tANI_U16)numItems;
@@ -10510,22 +10081,18 @@
                             sizeof(tPmkidCacheInfo) * numItems );
         }
     }
-
     return (status);
 }
 
-
 tANI_U32 csrRoamGetNumPMKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     return (pMac->roam.roamSession[sessionId].NumPmkidCache);
 }
 
-
 eHalStatus csrRoamGetPMKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache)
 {
     eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if(pNum && pPmkidCache)
     {
         if(pSession->NumPmkidCache == 0)
@@ -10547,17 +10114,14 @@
             status = eHAL_STATUS_SUCCESS;
         }
     }
-
     return (status);
 }
 
-
 eHalStatus csrRoamGetWpaRsnReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf)
 {
     eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
     tANI_U32 len;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if(pLen)
     {
         len = *pLen;
@@ -10570,17 +10134,14 @@
             }
         }
     }
-
     return (status);
 }
 
-
 eHalStatus csrRoamGetWpaRsnRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf)
 {
     eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
     tANI_U32 len;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if(pLen)
     {
         len = *pLen;
@@ -10593,10 +10154,8 @@
             }
         }
     }
-
     return (status);
 }
-
 #ifdef FEATURE_WLAN_WAPI
 eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf)
 {
@@ -10615,16 +10174,13 @@
             }
         }
     }
-
     return (status);
 }
-
 eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf)
 {
     eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
     tANI_U32 len;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if(pLen)
     {
         len = *pLen;
@@ -10637,26 +10193,21 @@
             }
         }
     }
-
     return (status);
 }
 #endif /* FEATURE_WLAN_WAPI */
-
 eRoamCmdStatus csrGetRoamCompleteStatus(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     eRoamCmdStatus retStatus = eCSR_ROAM_CONNECT_COMPLETION;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     if(CSR_IS_ROAMING(pSession))
     {
         retStatus = eCSR_ROAM_ROAMING_COMPLETION;
         pSession->fRoaming = eANI_BOOLEAN_FALSE;
     }
-
     return (retStatus);
 }
 
-
 //This function remove the connected BSS from te cached scan result
 eHalStatus csrRoamRemoveConnectedBssFromScanCache(tpAniSirGlobal pMac,
                                                   tCsrRoamConnectedProfile *pConnProfile)
@@ -10667,7 +10218,6 @@
     tCsrScanResult *pResult;
         tDot11fBeaconIEs *pIes;
     tANI_BOOLEAN fMatch;
-
     if(!(csrIsMacAddressZero(pMac, &pConnProfile->bssid) ||
             csrIsMacAddressBroadcast(pMac, &pConnProfile->bssid)))
     {
@@ -10701,7 +10251,6 @@
             pScanFilter->bWPSAssociation = eANI_BOOLEAN_FALSE;
             pScanFilter->countryCode[0] = 0;
             pScanFilter->phyMode = eCSR_DOT11_MODE_TAURUS;
-
             csrLLLock(&pMac->scan.scanResultList);
             pEntry = csrLLPeekHead( &pMac->scan.scanResultList, LL_ACCESS_NOLOCK );
             while( pEntry ) 
@@ -10739,15 +10288,11 @@
     return (status);
 }
 
-
-
 //BT-AMP
-
 eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tANI_U32 sessionId;
-
     for( sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++ )
     {
         if( CSR_IS_SESSION_VALID( pMac, sessionId ) )
@@ -10772,17 +10317,14 @@
             }
         }
     }
-
     return ( status );
 }
 
-
 static eHalStatus csrRoamStartWds( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, tSirBssDescription *pBssDesc )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     tBssConfigParam bssConfig;
-
     if ( csrIsConnStateIbss( pMac, sessionId ) ) 
     { 
         status = csrRoamIssueStopBss( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING );
@@ -10818,9 +10360,8 @@
                 palZeroMemory(pMac->hHdd, pSession->pCurRoamProfile, sizeof(tCsrRoamProfile));
                 csrRoamCopyProfile(pMac, pSession->pCurRoamProfile, pProfile);
             }
-
             //Prepare some more parameters for this WDS
-            csrRoamPrepareBssParams(pMac, sessionId, pProfile, NULL, NULL);
+            csrRoamPrepareBssParams(pMac, sessionId, pProfile, NULL, &bssConfig, NULL);
             status = csrRoamSetBssConfigCfg(pMac, sessionId, pProfile, NULL, &bssConfig, NULL);
         }
     }
@@ -10828,10 +10369,8 @@
     return( status );
 }
 
-
 ////////////////////Mail box
 
-
 //pBuf is caller allocated memory point to &(tSirSmeJoinReq->rsnIE.rsnIEdata[ 0 ]) + pMsg->rsnIE.length;
 //or &(tSirSmeReassocReq->rsnIE.rsnIEdata[ 0 ]) + pMsg->rsnIE.length;
 static void csrPrepareJoinReassocReqBuffer( tpAniSirGlobal pMac, 
@@ -10844,16 +10383,13 @@
     tANI_BOOLEAN found = FALSE;
     tANI_U32 size = 0;
         tANI_U16 i;
-
     // plug in neighborhood occupancy info (i.e. BSSes on primary or secondary channels)
     *pBuf++ = (tANI_U8)FALSE;  //tAniTitanCBNeighborInfo->cbBssFoundPri
     *pBuf++ = (tANI_U8)FALSE;  //tAniTitanCBNeighborInfo->cbBssFoundSecDown
     *pBuf++ = (tANI_U8)FALSE;  //tAniTitanCBNeighborInfo->cbBssFoundSecUp
-
     // 802.11h
     //We can do this because it is in HOST CPU order for now.
     pAP_capabilityInfo = (tSirMacCapabilityInfo *)&pBssDescription->capabilityInfo;
-
         //tell the target AP my 11H capability only if both AP and STA support 11H and the channel being used is 11a
         if ( csrIs11hSupported( pMac ) && pAP_capabilityInfo->spectrumMgt && eSIR_11A_NW_TYPE == pBssDescription->nwType )   
         {  
@@ -10867,13 +10403,11 @@
     pBuf += sizeof(tAniBool);
     *pBuf++ = MIN_STA_PWR_CAP_DBM; // it is for pMsg->powerCap.minTxPower = 0;
         found = csrSearchChannelListForTxPower(pMac, pBssDescription, &channelGroup);
-
     // This is required for 11k test VoWiFi Ent: Test 2.
     // We need the power capabilities for Assoc Req. 
     // This macro is provided by the halPhyCfg.h. We pick our
     // max and min capability by the halPhy provided macros
     *pBuf++ = MAX_STA_PWR_CAP_DBM;
-
     size = sizeof(pMac->roam.validChannelList);
     if(HAL_STATUS_SUCCESS(csrGetCfgValidChannels(pMac, (tANI_U8 *)pMac->roam.validChannelList, &size)))
     { 
@@ -10889,7 +10423,6 @@
         smsLog(pMac, LOGE, FL("can not find any valid channel\n"));
         *pBuf++ = 0;  //tSirSupChnl->numChnl
     }                                                                                                                     
-
     //Check whether it is ok to enter UAPSD
 #ifndef WLAN_MDM_CODE_REDUCTION_OPT
     if( btcIsReadyForUapsd(pMac) )
@@ -10905,15 +10438,12 @@
     }
 #endif /* WLAN_MDM_CODE_REDUCTION_OPT*/
   
-
     // move the entire BssDescription into the join request.
     palCopyMemory( pMac->hHdd, pBuf, pBssDescription, 
                     pBssDescription->length + sizeof( pBssDescription->length ) );
-
     pBuf += pBssDescription->length + sizeof( pBssDescription->length );   // update to new location
 }
 
-
 /* 
   * The communication between HDD and LIM is thru mailbox (MB).
   * Both sides will access the data structure "tSirSmeJoinReq".
@@ -10934,7 +10464,6 @@
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     tANI_U32 dwTmp;
     tANI_U8 wpaRsnIE[DOT11F_IE_RSN_MAX_LEN];    //RSN MAX is bigger than WPA MAX
-
     do {
         pSession->joinFailStatusCode.statusCode = eSIR_SME_SUCCESS;
         pSession->joinFailStatusCode.reasonCode = 0;
@@ -10949,23 +10478,19 @@
         msgLen = sizeof( tSirSmeJoinReq ) - sizeof( *pBssDescription ) + 
             pBssDescription->length + sizeof( pBssDescription->length ) +
             sizeof( tCsrWpaIe ) + sizeof( tCsrWpaAuthIe ) + sizeof( tANI_U16 ); // add in the size of the WPA IE that we may build.
-
         status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, msgLen);
         if ( !HAL_STATUS_SUCCESS(status) ) break;
         palZeroMemory(pMac->hHdd, pMsg, msgLen);
         pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_JOIN_REQ);
         pMsg->length = pal_cpu_to_be16(msgLen);
         pBuf = &pMsg->sessionId;
-
         // sessionId
         *pBuf = (tANI_U8)sessionId;
         pBuf++;
-
         // transactionId
         *pBuf = 0;
         *( pBuf + 1 ) = 0;
         pBuf += sizeof(tANI_U16);
-
         // ssId
         if( pIes->SSID.present && pIes->SSID.num_ssid )
         {
@@ -10980,7 +10505,6 @@
             *pBuf = 0;
             pBuf++;
         }
-
         // selfMacAddr
         palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, &pSession->selfMacAddr, sizeof(tSirMacAddr) );
         pBuf += sizeof(tSirMacAddr);
@@ -10992,23 +10516,24 @@
         // dot11mode
         *pBuf = (tANI_U8)csrTranslateToWNICfgDot11Mode( pMac, pSession->bssParams.uCfgDot11Mode );
         pBuf++;
-
         //Persona
         *pBuf = (tANI_U8)pProfile->csrPersona;
         pBuf++;
+        //CBMode
+        *pBuf = (tANI_U8)pSession->bssParams.cbMode;
+        pBuf++;
 
         VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
-                  FL("CSR PERSONA=%d"), pProfile->csrPersona);
-        
+                  FL("CSR PERSONA=%d CSR CbMode %d"), pProfile->csrPersona, pSession->bssParams.cbMode);
+
         // uapsdPerAcBitmask
         *pBuf = pProfile->uapsd_mask;
         pBuf++;
 
-
+    
     
 #if (WNI_POLARIS_FW_PACKAGE == ADVANCED)        
 #endif /*(WNI_POLARIS_FW_PACKAGE == ADVANCED)*/
-
         status = csrGetRateSet(pMac, pProfile, (eCsrPhyMode)pProfile->phyMode, pBssDescription, pIes, &OpRateSet, &ExRateSet);
         if (HAL_STATUS_SUCCESS(status) ) 
         {
@@ -11030,7 +10555,6 @@
             *pBuf++ = 0;
             *pBuf++ = 0;
         }
-
         // rsnIE
         if ( csrIsProfileWpa( pProfile ) )
         {
@@ -11052,7 +10576,6 @@
                     (tCsrWapiIe *)( wpaRsnIE ) );
         }
 #endif /* FEATURE_WLAN_WAPI */
-
         else
         {
             ieLen = 0;
@@ -11130,7 +10653,6 @@
             *(pBuf + 1) = 0;
             pBuf += 2;
         }
-
 #ifdef FEATURE_WLAN_CCX
         // Never include the cckmIE in an Join Request
         //length is two bytes
@@ -11138,12 +10660,10 @@
         *(pBuf + 1) = 0;
         pBuf += 2;
 #endif 
-
         // addIEScan
         if(pProfile->nAddIEScanLength && pProfile->pAddIEScan)
         {
             ieLen = pProfile->nAddIEScanLength;
-
             if(ieLen > pSession->nAddIEScanLength)
             {
                 if(pSession->pAddIEScan && pSession->nAddIEScanLength)
@@ -11175,12 +10695,10 @@
             *(pBuf + 1) = 0;
             pBuf += 2;
         }
-
         // addIEAssoc
         if(pProfile->nAddIEAssocLength && pProfile->pAddIEAssoc)
         {
             ieLen = pProfile->nAddIEAssocLength;
-
             if(ieLen > pSession->nAddIEAssocLength)
             {
                 if(pSession->pAddIEAssoc && pSession->nAddIEAssocLength)
@@ -11212,15 +10730,12 @@
             *(pBuf + 1) = 0;
             pBuf += 2;
         }
-
         dwTmp = pal_cpu_to_be32( csrTranslateEncryptTypeToEdType( pProfile->negotiatedUCEncryptionType) );
         palCopyMemory( pMac->hHdd, pBuf, &dwTmp, sizeof(tANI_U32) );
         pBuf += sizeof(tANI_U32);        
-
         dwTmp = pal_cpu_to_be32( csrTranslateEncryptTypeToEdType( pProfile->negotiatedMCEncryptionType) );
         palCopyMemory( pMac->hHdd, pBuf, &dwTmp, sizeof(tANI_U32) );
         pBuf += sizeof(tANI_U32);        
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
         if (csrIsProfile11r( pProfile ) )
         {
@@ -11237,7 +10752,6 @@
             pBuf += sizeof(tAniBool);        
         }
 #endif
-
 #ifdef FEATURE_WLAN_CCX
         /* A profile can not be both CCX and 11R. But an 802.11R AP
          * may be advertising support for CCX as well. So if we are 
@@ -11276,7 +10790,6 @@
             pBuf += sizeof(tCCXTspecInfo);
         }
 #endif
-
 #if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
         // Fill in isFastTransitionEnabled
         if (pMac->roam.configParam.isFastTransitionEnabled
@@ -11296,7 +10809,6 @@
             pBuf += sizeof(tAniBool);        
         }
 #endif
-
 #ifdef FEATURE_WLAN_LFR
         if(csrRoamIsFastRoamEnabled(pMac))
         {
@@ -11315,7 +10827,6 @@
         //BssDesc
         csrPrepareJoinReassocReqBuffer( pMac, pBssDescription, pBuf, 
                 (tANI_U8)pProfile->uapsd_mask);
-
         status = palSendMBMessage(pMac->hHdd, pMsg );    
         if(!HAL_STATUS_SUCCESS(status)) 
         {
@@ -11332,7 +10843,6 @@
     return( status );
 }
 
-
 eHalStatus csrSendSmeReassocReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDescription, 
                                     tDot11fBeaconIEs *pIes, tCsrRoamProfile *pProfile )
 {
@@ -11346,14 +10856,12 @@
     tSirMacRateSet ExRateSet;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     tANI_U8 wpaRsnIE[DOT11F_IE_RSN_MAX_LEN];    //RSN MAX is bigger than WPA MAX
-
     /* To satisfy klockworks */
     if (pBssDescription == NULL)
     {
         smsLog(pMac, LOGE, FL(" pBssDescription is NULL\n"));
         return eHAL_STATUS_FAILURE;
     }
-
     do {
         // There are a number of variable length fields to consider.  First, the tSirSmeJoinReq
         // includes a single bssDescription.   bssDescription includes a single tANI_U32 for the 
@@ -11400,19 +10908,20 @@
         // dot11mode
         *pBuf = (tANI_U8)csrTranslateToWNICfgDot11Mode( pMac, pSession->bssParams.uCfgDot11Mode );
         pBuf++;
-
         //Persona
         *pBuf = (tANI_U8)pProfile->csrPersona;
         pBuf++;
+        //CBMode
+        *pBuf = (tANI_U8)pSession->bssParams.cbMode;
+        pBuf++;
 
-        VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL, FL("CSR PERSONA=%d\n"), pProfile->csrPersona);
-        
+        VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
+            FL("CSR PERSONA=%d CSR CBMode=%u\n"), pProfile->csrPersona, pSession->bssParams.cbMode);
+
         // uapsdPerAcBitmask
         *pBuf = pProfile->uapsd_mask;
         pBuf++;
 
-
-
         status = csrGetRateSet(pMac, pProfile, (eCsrPhyMode)pProfile->phyMode, 
                         pBssDescription, pIes, &OpRateSet, &ExRateSet);
         if (HAL_STATUS_SUCCESS(status) ) 
@@ -11439,7 +10948,6 @@
             *pBuf++ = 0;
             *pBuf++ = 0;
         }
-
                 // rsnIE
         if ( csrIsProfileWpa( pProfile ) )
                 {
@@ -11473,7 +10981,6 @@
                  smsLog(pMac, LOGE, FL(" WPA RSN IE length :%d is more than DOT11F_IE_RSN_MAX_LEN, resetting to %d\n"), ieLen, DOT11F_IE_RSN_MAX_LEN);
                  ieLen = DOT11F_IE_RSN_MAX_LEN;
              }
-
             //Check whether we need to allocate more memory
             if(ieLen > pSession->nWpaRsnReqIeLength)
             {
@@ -11506,7 +11013,6 @@
             *(pBuf + 1) = 0;
             pBuf += 2;
                 }
-
 #ifdef FEATURE_WLAN_CCX
         // cckmIE
         if( csrIsProfileCCX( pProfile ) )
@@ -11543,12 +11049,10 @@
             pBuf += 2;
         }
 #endif /* FEATURE_WLAN_CCX */
-
         // addIEScan
         if(pProfile->nAddIEScanLength && pProfile->pAddIEScan)
         {
             ieLen = pProfile->nAddIEScanLength;
-
             if(ieLen > pSession->nAddIEScanLength)
             {
                 if(pSession->pAddIEScan && pSession->nAddIEScanLength)
@@ -11580,12 +11084,10 @@
             *(pBuf + 1) = 0;
             pBuf += 2;
         }
-
         // addIEAssoc
         if(pProfile->nAddIEAssocLength && pProfile->pAddIEAssoc)
         {
             ieLen = pProfile->nAddIEAssocLength;
-
             if(ieLen > pSession->nAddIEAssocLength)
             {
                 if(pSession->pAddIEAssoc && pSession->nAddIEAssocLength)
@@ -11617,7 +11119,6 @@
             *(pBuf + 1) = 0;
             pBuf += 2;
         }
-
         //Unmask any AC in reassoc that is ACM-set
         uapsd_mask = (v_U8_t)pProfile->uapsd_mask;
         if( uapsd_mask && ( NULL != pBssDescription ) )
@@ -11642,13 +11143,11 @@
         dwTmp = pal_cpu_to_be32( csrTranslateEncryptTypeToEdType( pProfile->negotiatedMCEncryptionType) );
         palCopyMemory( pMac->hHdd, pBuf, &dwTmp, sizeof(tANI_U32) );
         pBuf += sizeof(tANI_U32);        
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
         // is11Rconnection;
         dwTmp = csrIsProfile11r( pProfile )?  pal_cpu_to_be32(TRUE) : 0; 
         palCopyMemory( pMac->hHdd, pBuf, &dwTmp, sizeof(tAniBool) );
         pBuf += sizeof(tAniBool);        
-
 #ifdef FEATURE_WLAN_CCX
         //isCCXconnection;
         //CCKM profile, ccxversion ie present, not 11r and ini file has CCX enabled
@@ -11666,7 +11165,6 @@
         pBuf += sizeof(tAniBool);        
 #endif // FEATURE_WLAN_CCX
 #endif // WLAN_FEATURE_VOWIFI_11R
-
 #ifdef FEATURE_WLAN_CCX
         if ((csrIsProfileCCX(pProfile) || 
              ((pIes->CCXVersion.present) 
@@ -11679,13 +11177,11 @@
             && (pMac->roam.configParam.isCcxIniFeatureEnabled))
         {
            tCCXTspecInfo ccxTspec;
-
            // CCX Tspec information
            palZeroMemory(pMac->hHdd, &ccxTspec, sizeof(tCCXTspecInfo));
            ccxTspec.numTspecs = sme_QosCCxRetrieveTspecInfo(pMac, sessionId, (tTspecInfo *) &ccxTspec.tspec[0]);
            *pBuf = ccxTspec.numTspecs;
            pBuf += sizeof(tANI_U8);
-
            // Copy the TSPEC information only if present
            if (ccxTspec.numTspecs) {
                palCopyMemory(pMac->hHdd, pBuf, (void*)&ccxTspec.tspec[0], (ccxTspec.numTspecs*sizeof(tTspecInfo)));
@@ -11704,7 +11200,6 @@
             }
         }
 #endif // FEATURE_WLAN_CCX
-
 #if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
         // Fill in isFastTransitionEnabled
         if (pMac->roam.configParam.isFastTransitionEnabled
@@ -11724,7 +11219,6 @@
             pBuf += sizeof(tAniBool);        
         }
 #endif
-
 #ifdef FEATURE_WLAN_LFR
         if(csrRoamIsFastRoamEnabled(pMac))
         {
@@ -11748,12 +11242,9 @@
 #endif
         status = palSendMBMessage( pMac->hHdd, pMsg );
     } while( 0 );
-
     return( status );
-
 }
 
-
 //
 eHalStatus csrSendMBDisassocReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirMacAddr bssId, tANI_U16 reasonCode )
 {
@@ -11766,14 +11257,12 @@
     if (!CSR_IS_SESSION_VALID( pMac, sessionId ))
         return eHAL_STATUS_FAILURE;
 #endif
-
     do {
         status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, sizeof( tSirSmeDisassocReq ));
         if ( !HAL_STATUS_SUCCESS(status) ) break;
         palZeroMemory(pMac->hHdd, pMsg, sizeof( tSirSmeDisassocReq ));
         pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_DISASSOC_REQ);
         pMsg->length = pal_cpu_to_be16((tANI_U16)sizeof( tSirSmeDisassocReq ));
-
         pBuf = &pMsg->sessionId;
         // sessionId
         *pBuf++ = (tANI_U8)sessionId;
@@ -11790,7 +11279,6 @@
             // Set the bssid address before sending the message to LIM
             status = palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, pSession->selfMacAddr, sizeof( tSirMacAddr ) );
             pBuf = pBuf + sizeof ( tSirMacAddr );
-
             // Set the peer MAC address before sending the message to LIM
             status = palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, bssId, sizeof( tSirMacAddr ) ); //perMacAddr is passed as bssId for softAP
             pBuf = pBuf + sizeof ( tSirMacAddr );
@@ -11801,7 +11289,6 @@
             // Set the peer MAC address before sending the message to LIM
             status = palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, bssId, sizeof( tSirMacAddr ) );
             pBuf = pBuf + sizeof ( tSirMacAddr );
-
             status = palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, bssId, sizeof( pMsg->bssId ) );
             pBuf = pBuf + sizeof ( tSirMacAddr );
 #ifdef WLAN_SOFTAP_FEATURE
@@ -11812,7 +11299,6 @@
             palFreeMemory(pMac->hHdd, pMsg);
             break;
         }
-
         // reasonCode
         wTmp = pal_cpu_to_be16(reasonCode);
         status = palCopyMemory( pMac->hHdd, pBuf, &wTmp, sizeof(tANI_U16) );
@@ -11822,7 +11308,6 @@
             break;
         }
         pBuf += sizeof(tANI_U16);
-
         /* The state will be DISASSOC_HANDOFF only when we are doing handoff. 
                     Here we should not send the disassoc over the air to the AP */
         if ( CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId)
@@ -11835,19 +11320,15 @@
         }
         pBuf += sizeof(tANI_U8);
         status = palSendMBMessage( pMac->hHdd, pMsg );
-
     } while( 0 );
-
     return( status );
 }
-
 #ifdef WLAN_SOFTAP_FEATURE
 eHalStatus csrSendMBTkipCounterMeasuresReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_BOOLEAN bEnable, tSirMacAddr bssId )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tSirSmeTkipCntrMeasReq *pMsg;
     tANI_U8 *pBuf;
-
     do
     {
         status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, sizeof( tSirSmeTkipCntrMeasReq ));
@@ -11855,7 +11336,6 @@
         palZeroMemory(pMac->hHdd, pMsg, sizeof( tSirSmeTkipCntrMeasReq ));
         pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_TKIP_CNTR_MEAS_REQ);
         pMsg->length = pal_cpu_to_be16((tANI_U16)sizeof( tSirSmeTkipCntrMeasReq ));
-
         pBuf = &pMsg->sessionId;
         // sessionId
         *pBuf++ = (tANI_U8)sessionId;
@@ -11873,14 +11353,10 @@
             palFreeMemory(pMac->hHdd, pMsg);
             break;
         }
-
         status = palSendMBMessage( pMac->hHdd, pMsg );
-
     } while( 0 );
-
     return( status );
 }
-
 eHalStatus
 csrSendMBGetAssociatedStasReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId,
                                     VOS_MODULE_ID modId, tSirMacAddr bssId,
@@ -11891,49 +11367,38 @@
     tSirSmeGetAssocSTAsReq *pMsg;
     tANI_U8 *pBuf = NULL, *wTmpBuf = NULL;
     tANI_U32 dwTmp;
-
     do
     {
         status = palAllocateMemory( pMac->hHdd, (void **)&pMsg, sizeof( tSirSmeGetAssocSTAsReq ) );
         if (!HAL_STATUS_SUCCESS(status)) break;
         palZeroMemory( pMac->hHdd, pMsg, sizeof( tSirSmeGetAssocSTAsReq ) );
         pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_GET_ASSOC_STAS_REQ);
-
         pBuf = (tANI_U8 *)&pMsg->bssId;
         wTmpBuf = pBuf;
-
         // bssId
         palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, bssId, sizeof(tSirMacAddr) );
         pBuf += sizeof(tSirMacAddr);
-
         // modId 
         dwTmp = pal_cpu_to_be16((tANI_U16)modId);
         palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U16));
         pBuf += sizeof(tANI_U16);
-
         // pUsrContext
         dwTmp = pal_cpu_to_be32((tANI_U32)pUsrContext);
         palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U32));
         pBuf += sizeof(tANI_U32);
-
         // pfnSapEventCallback
         dwTmp = pal_cpu_to_be32((tANI_U32)pfnSapEventCallback);
         palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U32));
         pBuf += sizeof(tANI_U32);
-
         // pAssocStasBuf
         dwTmp = pal_cpu_to_be32((tANI_U32)pAssocStasBuf);
         palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U32));
         pBuf += sizeof(tANI_U32);
-
         pMsg->length = pal_cpu_to_be16((tANI_U16)(sizeof(tANI_U32 ) + (pBuf - wTmpBuf)));//msg_header + msg
-
         status = palSendMBMessage( pMac->hHdd, pMsg );
     } while( 0 );
-
     return( status );
         }
-
 eHalStatus
 csrSendMBGetWPSPBCSessions( tpAniSirGlobal pMac, tANI_U32 sessionId,
                             tSirMacAddr bssId, void *pUsrContext, void *pfnSapEventCallback,v_MACADDR_t pRemoveMac)
@@ -11942,45 +11407,34 @@
     tSirSmeGetWPSPBCSessionsReq *pMsg;
     tANI_U8 *pBuf = NULL, *wTmpBuf = NULL;
     tANI_U32 dwTmp;
-
     do
         {
         status = palAllocateMemory( pMac->hHdd, (void **)&pMsg, sizeof(tSirSmeGetWPSPBCSessionsReq) );
         if (!HAL_STATUS_SUCCESS(status)) break;
         palZeroMemory( pMac->hHdd, pMsg, sizeof( tSirSmeGetWPSPBCSessionsReq ) );
         pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_GET_WPSPBC_SESSION_REQ);
-
         pBuf = (tANI_U8 *)&pMsg->pUsrContext;
         wTmpBuf = pBuf;
-
         // pUsrContext
         dwTmp = pal_cpu_to_be32((tANI_U32)pUsrContext);
         palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U32));
         pBuf += sizeof(tANI_U32);
-
         // pSapEventCallback
         dwTmp = pal_cpu_to_be32((tANI_U32)pfnSapEventCallback);
         palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U32));
         pBuf += sizeof(tANI_U32);
-
         // bssId
         palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, bssId, sizeof(tSirMacAddr) );
         pBuf += sizeof(tSirMacAddr);
-
         // MAC Address of STA in WPS session
         palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, pRemoveMac.bytes, sizeof(v_MACADDR_t));
         pBuf += sizeof(v_MACADDR_t);
-
         pMsg->length = pal_cpu_to_be16((tANI_U16)(sizeof(tANI_U32 ) + (pBuf - wTmpBuf)));//msg_header + msg
-
         status = palSendMBMessage( pMac->hHdd, pMsg );
-
     } while( 0 );
-
     return( status );
 }
 #endif
-
 eHalStatus csrSendMBDeauthReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirMacAddr bssId, tANI_U16 reasonCode )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -11990,7 +11444,6 @@
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     if (!CSR_IS_SESSION_VALID( pMac, sessionId ))
         return eHAL_STATUS_FAILURE;
-
     do {
         status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, sizeof( tSirSmeDeauthReq ));
         if ( !HAL_STATUS_SUCCESS(status) ) break;
@@ -12005,7 +11458,6 @@
         *pBuf = 0;
         *(pBuf + 1 ) = 0;
         pBuf += sizeof(tANI_U16);
-
         if ((pSession->pCurRoamProfile != NULL)  && (
 #ifdef WLAN_SOFTAP_FEATURE
              (CSR_IS_INFRA_AP(pSession->pCurRoamProfile)) || 
@@ -12020,7 +11472,6 @@
             // Set the BSSID before sending the message to LIM
             status = palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, bssId, sizeof( pMsg->peerMacAddr ) );
             pBuf =  pBuf + sizeof(tSirMacAddr);
-
         }
         if(!HAL_STATUS_SUCCESS(status))
         {
@@ -12043,18 +11494,14 @@
             break;
         }
         status = palSendMBMessage( pMac->hHdd, pMsg );
-
     } while( 0 );
-
     return( status );
 }
 
-
 eHalStatus csrSendMBDisassocCnfMsg( tpAniSirGlobal pMac, tpSirSmeDisassocInd pDisassocInd )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tSirSmeDisassocCnf *pMsg;
-
     do {
         status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, sizeof( tSirSmeDisassocCnf ));
         if ( !HAL_STATUS_SUCCESS(status) ) break;
@@ -12076,20 +11523,15 @@
             break;
         }
 //To test reconn ends
-
         status = palSendMBMessage( pMac->hHdd, pMsg );
-
     } while( 0 );
-
     return( status );
 }
 
-
 eHalStatus csrSendMBDeauthCnfMsg( tpAniSirGlobal pMac, tpSirSmeDeauthInd pDeauthInd )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tSirSmeDeauthCnf *pMsg;
-
     do {
         status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, sizeof( tSirSmeDeauthCnf ));
         if ( !HAL_STATUS_SUCCESS(status) ) break;
@@ -12109,14 +11551,10 @@
             palFreeMemory(pMac->hHdd, pMsg);
             break;
         }
-
         status = palSendMBMessage( pMac->hHdd, pMsg );
-
     } while( 0 );
-
     return( status );
 }
-
 eHalStatus csrSendAssocCnfMsg( tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocInd, eHalStatus Halstatus )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -12124,14 +11562,12 @@
     tANI_U8 *pBuf;
     tSirResultCodes statusCode;
     tANI_U16 wTmp;
-
     do {
         status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, sizeof( tSirSmeAssocCnf ));
         if ( !HAL_STATUS_SUCCESS(status) ) break;
         palZeroMemory(pMac->hHdd, pMsg, sizeof( tSirSmeAssocCnf ));
                 pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_ASSOC_CNF);
                 pMsg->length = pal_cpu_to_be16((tANI_U16)sizeof( tSirSmeAssocCnf ));
-
         pBuf = (tANI_U8 *)&pMsg->statusCode;
         if(HAL_STATUS_SUCCESS(Halstatus))
             statusCode = (tSirResultCodes)pal_cpu_to_be32(eSIR_SME_SUCCESS);
@@ -12154,19 +11590,15 @@
         pBuf += sizeof (tSirMacAddr);
         // alternateChannelId
         *pBuf = 11;
-
         status = palSendMBMessage( pMac->hHdd, pMsg );
         if(!HAL_STATUS_SUCCESS(status))
         {
             //pMsg is freed by palSendMBMessage
             break;
         }
-
     } while( 0 );
-
     return( status );
 }
-
 #ifdef WLAN_SOFTAP_FEATURE
 eHalStatus csrSendAssocIndToUpperLayerCnfMsg(   tpAniSirGlobal pMac, 
                                                 tpSirSmeAssocInd pAssocInd, 
@@ -12179,11 +11611,11 @@
     tANI_U8 *pBuf;
     tSirResultCodes statusCode;
     tANI_U16 wTmp;
-
     do {
         status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, sizeof( tSirSmeAssocIndToUpperLayerCnf ));
         if ( !HAL_STATUS_SUCCESS(status) ) break;
         palZeroMemory(pMac->hHdd, pMsg, sizeof( tSirSmeAssocIndToUpperLayerCnf ));
+
         pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_UPPER_LAYER_ASSOC_CNF);
         pMsg->length = pal_cpu_to_be16((tANI_U16)sizeof( tSirSmeAssocIndToUpperLayerCnf ));
 
@@ -12212,37 +11644,28 @@
         // alternateChannelId
         *pBuf = 11;
         pBuf += sizeof (tANI_U8);
-
         // Instead of copying roam Info, we just copy only WmmEnabled , RsnIE information
         //Wmm
         *pBuf = pAssocInd->wmmEnabledSta;
         pBuf += sizeof (tANI_U8);
-
         //RSN IE
         status = palCopyMemory(pMac->hHdd, (tSirRSNie *)pBuf, &pAssocInd->rsnIE, sizeof(tSirRSNie));
         pBuf += sizeof (tSirRSNie);
-
         //Additional IE
         status = palCopyMemory(pMac->hHdd, (void *)pBuf, &pAssocInd->addIE, sizeof(tSirAddie));
         pBuf += sizeof (tSirAddie);
-
         //reassocReq
         *pBuf = pAssocInd->reassocReq;
         pBuf += sizeof (tANI_U8);
-
         msgQ.type = eWNI_SME_UPPER_LAYER_ASSOC_CNF;
         msgQ.bodyptr = pMsg;
         msgQ.bodyval = 0;
-
         SysProcessMmhMsg(pMac, &msgQ);
-
     } while( 0 );
-
     return( status );
 }
 #endif
 
-
 eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId ,
             tSirMacAddr peerMacAddr, tANI_U8 numKeys, tAniEdType edType, 
             tANI_BOOLEAN fUnicast, tAniKeyDirection aniKeyDirection,
@@ -12257,11 +11680,8 @@
     tANI_U8 *pBuf;
     tANI_U8 *p;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     do {
-
         if( ( 1 != numKeys ) && ( 0 != numKeys ) ) break;
-
         // all of these fields appear in every SET_CONTEXT message.  Below we'll add in the size for each 
         // key set. Since we only support upto one key, we always allocate memory for 1 key
         msgLen  = sizeof( tANI_U16) + sizeof( tANI_U16 ) + sizeof( tSirMacAddr ) +
@@ -12274,7 +11694,6 @@
         palZeroMemory(pMac->hHdd, pMsg, msgLen);
                 pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_SETCONTEXT_REQ);
                 pMsg->length = pal_cpu_to_be16(msgLen);
-
         //sessionId
         pBuf = &pMsg->sessionId;
         *pBuf = (tANI_U8)sessionId;
@@ -12296,31 +11715,25 @@
         pBuf += sizeof(tSirMacAddr);
 
         p = pBuf;
-
                 // Set the pMsg->keyMaterial.length field (this length is defined as all data that follows the edType field
                 // in the tSirKeyMaterial keyMaterial; field).
                 //
                 // !!NOTE:  This keyMaterial.length contains the length of a MAX size key, though the keyLength can be 
                 // shorter than this max size.  Is LIM interpreting this ok ?
                 p = pal_set_U16( p, pal_cpu_to_be16((tANI_U16)( sizeof( pMsg->keyMaterial.numKeys ) + ( numKeys * sizeof( pMsg->keyMaterial.key ) ) )) );
-
                 // set pMsg->keyMaterial.edType
         tmpEdType = (tAniEdType)pal_cpu_to_be32(edType);
         palCopyMemory( pMac->hHdd, p, (tANI_U8 *)&tmpEdType, sizeof(tAniEdType) );
         p += sizeof( pMsg->keyMaterial.edType );
-
         // set the pMsg->keyMaterial.numKeys field
         *p = numKeys;
         p += sizeof( pMsg->keyMaterial.numKeys );   
-
         // set pSirKey->keyId = keyId;
         *p = keyId;
         p += sizeof( pMsg->keyMaterial.key[ 0 ].keyId );
-
         // set pSirKey->unicast = (tANI_U8)fUnicast;
         *p = (tANI_U8)fUnicast;
         p += sizeof( pMsg->keyMaterial.key[ 0 ].unicast );
-
                 // set pSirKey->keyDirection = aniKeyDirection;
         tmpDirection = (tAniKeyDirection)pal_cpu_to_be32(aniKeyDirection);
         palCopyMemory( pMac->hHdd, p, (tANI_U8 *)&tmpDirection, sizeof(tAniKeyDirection) );
@@ -12328,14 +11741,11 @@
         //    pSirKey->keyRsc = ;;
         palCopyMemory( pMac->hHdd, p, pKeyRsc, CSR_MAX_RSC_LEN );
         p += sizeof( pMsg->keyMaterial.key[ 0 ].keyRsc );
-
                 // set pSirKey->paeRole
                 *p = paeRole;   // 0 is Supplicant
                 p++;
-
                 // set pSirKey->keyLength = keyLength;
                 p = pal_set_U16( p, pal_cpu_to_be16(keyLength) );
-
         if ( keyLength && pKey ) 
         {   
             palCopyMemory( pMac->hHdd, p, pKey, keyLength ); 
@@ -12347,16 +11757,11 @@
                 pKey[9], pKey[10], pKey[11], pKey[12], pKey[13], pKey[14], pKey[15]);
             }
         }
-
         status = palSendMBMessage(pMac->hHdd, pMsg);
-
     } while( 0 );
-
     return( status );
 }
 
-
-
 eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamBssType bssType, 
                                     tCsrRoamStartBssParams *pParam, tSirBssDescription *pBssDesc )
 {
@@ -12367,11 +11772,10 @@
     tANI_U16 msgLen, wTmp;
     tANI_U32 dwTmp;
     tSirNwType nwType;
-    tAniCBSecondaryMode cbMode;
+    ePhyChanBondState cbMode;
 #ifdef WLAN_SOFTAP_FEATURE
     tANI_U32 authType;
 #endif
-
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     do {
         pSession->joinFailStatusCode.statusCode = eSIR_SME_SUCCESS;
@@ -12379,14 +11783,10 @@
         msgLen = sizeof(tSirSmeStartBssReq);
         status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, msgLen);
         if ( !HAL_STATUS_SUCCESS(status) ) break;
-
         palZeroMemory(pMac->hHdd, pMsg, msgLen);
         pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_START_BSS_REQ);
-
         pBuf = &pMsg->sessionId;
-
         wTmpBuf = pBuf;
-
         //sessionId
         *pBuf = (tANI_U8)sessionId;
         pBuf++;
@@ -12394,7 +11794,6 @@
         *pBuf = 0;
         *(pBuf + 1) = 0;
         pBuf += sizeof(tANI_U16);
-
         // bssid 
         palCopyMemory( pMac->hHdd, pBuf, pParam->bssid, sizeof(tSirMacAddr) );
         pBuf += sizeof(tSirMacAddr);
@@ -12416,6 +11815,22 @@
         {
             wTmp = pal_cpu_to_be16( WNI_CFG_BEACON_INTERVAL_STADEF );
         }
+        if(csrIsconcurrentsessionValid (pMac, sessionId, 
+                                   pParam->bssPersona) 
+                                   == eHAL_STATUS_SUCCESS )
+        {    
+           csrValidateBeaconInterval(pMac, pParam->operationChn, &wTmp, sessionId,
+                                      pParam->bssPersona);
+           //Update the beacon Interval 
+           pParam->beaconInterval = wTmp;
+        }
+        else
+        {
+            smsLog( pMac,LOGE, FL("****Start BSS failed persona already exists***\n"));
+            status = eHAL_STATUS_FAILURE;
+            return status;
+        }
+
         palCopyMemory( pMac->hHdd, pBuf, &wTmp, sizeof( tANI_U16 ) ); 
         pBuf += sizeof(tANI_U16);
         // dot11mode
@@ -12439,14 +11854,13 @@
             *pBuf = 0;
             pBuf++;        
         }
-
         // set the channel Id
         *pBuf = pParam->operationChn;
         pBuf++;
         //What should we really do for the cbmode.
-        cbMode = (tAniCBSecondaryMode)pal_cpu_to_be32(pParam->cbMode);
-        palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&cbMode, sizeof(tAniCBSecondaryMode) );
-        pBuf += sizeof(tAniCBSecondaryMode);
+        cbMode = (ePhyChanBondState)pal_cpu_to_be32(pParam->cbMode);
+        palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&cbMode, sizeof(ePhyChanBondState) );
+        pBuf += sizeof(ePhyChanBondState);
 
 #ifdef WLAN_SOFTAP_FEATURE
         // Set privacy
@@ -12456,47 +11870,39 @@
         //Set Uapsd 
         *pBuf = pParam->ApUapsdEnable;
         pBuf++;
-
         //Set SSID hidden
         *pBuf = pParam->ssidHidden;
         pBuf++;
-
         *pBuf = (tANI_U8)pParam->fwdWPSPBCProbeReq;
         pBuf++;
         
         //Ht protection Enable/Disable
         *pBuf = (tANI_U8)pParam->protEnabled;
         pBuf++;
-
         //Enable Beacons to Receive for OBSS protection Enable/Disable
         *pBuf = (tANI_U8)pParam->obssProtEnabled;
         pBuf++;
-
         //set cfg related to protection
         wTmp = pal_cpu_to_be16( pParam->ht_protection );
         palCopyMemory( pMac->hHdd, pBuf, &wTmp, sizeof( tANI_U16 ) ); 
         pBuf += sizeof(tANI_U16);
-
         // Set Auth type
         authType = pal_cpu_to_be32(pParam->authType);
         palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&authType, sizeof(tANI_U32));
         pBuf += sizeof(tANI_U32);
-
         // Set DTIM
         dwTmp = pal_cpu_to_be32(pParam->dtimPeriod);
         palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U32));
         pBuf += sizeof(tANI_U32);
-
         // Set wps_state
         *pBuf = pParam->wps_state;
         pBuf++;
-
 #endif
         //Persona
         *pBuf = (tANI_U8)pParam->bssPersona;
         pBuf++;
         
-
+        
         
         // set RSN IE 
         if( pParam->nRSNIELength > sizeof(pMsg->rsnIE.rsnIEdata) )
@@ -12517,10 +11923,8 @@
         nwType = (tSirNwType)pal_cpu_to_be32(pParam->sirNwType);
         palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&nwType, sizeof(tSirNwType) );
         pBuf += sizeof(tSirNwType);
-
         *pBuf = pParam->operationalRateSet.numRates; //tSirMacRateSet->numRates
         pBuf++;
-
         palCopyMemory( pMac->hHdd, pBuf, pParam->operationalRateSet.rate, pParam->operationalRateSet.numRates );
         pBuf += pParam->operationalRateSet.numRates ;
         *pBuf++ = pParam->extendedRateSet.numRates;
@@ -12529,18 +11933,14 @@
             palCopyMemory( pMac->hHdd, pBuf, pParam->extendedRateSet.rate, pParam->extendedRateSet.numRates );
             pBuf += pParam->extendedRateSet.numRates;
         }
-
         msgLen = (tANI_U16)(sizeof(tANI_U32 ) + (pBuf - wTmpBuf)); //msg_header + msg
         pMsg->length = pal_cpu_to_be16(msgLen);
         
         status = palSendMBMessage(pMac->hHdd, pMsg);
-
     } while( 0 );
-
   return( status );
 }
 
-
 eHalStatus csrSendMBStopBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId )
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
@@ -12548,7 +11948,6 @@
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     tANI_U8 *pBuf;
     tANI_U16 msgLen;
-
     do {
         status = palAllocateMemory(pMac, (void **)&pMsg, sizeof(tSirSmeStopBssReq));
         if ( !HAL_STATUS_SUCCESS(status) ) break;
@@ -12577,7 +11976,6 @@
        pBuf += sizeof(tSirMacAddr);
        msgLen = sizeof(tANI_U16) + sizeof(tANI_U16) + 1 + sizeof(tANI_U16) + sizeof(tSirResultCodes) + sizeof(tSirMacAddr);
        pMsg->length =  pal_cpu_to_be16(msgLen);
-
        status =  palSendMBMessage( pMac->hHdd, pMsg );
 #if 0            
         status = palAllocateMemory(pMac, (void **)&pMsg, sizeof(tSirSmeStopBssReq));
@@ -12602,20 +12000,16 @@
                 status = palSendMBMessage( pMac->hHdd, pMsg );
 #endif                
         } while( 0 );
-
     return( status );
 }
 
-
 eHalStatus csrReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, 
                       tCsrRoamModifyProfileFields *pModProfileFields,
                       tANI_U32 *pRoamId, v_BOOL_t fForce)
 {
-
    eHalStatus status = eHAL_STATUS_FAILURE;
    tANI_U32 roamId = 0;
    tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
    if((csrIsConnStateConnected(pMac, sessionId)) &&
       (fForce || (!palEqualMemory(pMac->hHdd, &pModProfileFields, 
                        &pSession->connectedProfile.modifyProfileFields, 
@@ -12627,34 +12021,27 @@
          *pRoamId = roamId;
       }
 
-
       status = csrRoamIssueReassoc(pMac, sessionId, NULL, pModProfileFields, 
                                    eCsrSmeIssuedReassocToSameAP, roamId, 
                                    eANI_BOOLEAN_FALSE);
-
    }
-
    return status;
 }
-
 static eHalStatus csrRoamSessionOpened(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tCsrRoamInfo roamInfo;
-
     palZeroMemory(pMac->hHdd, &roamInfo, sizeof(tCsrRoamInfo));
     status = csrRoamCallCallback(pMac, sessionId, &roamInfo, 0,
                             eCSR_ROAM_SESSION_OPENED, eCSR_ROAM_RESULT_NONE);
     return (status);
 }
-
 eHalStatus csrProcessAddStaSessionRsp( tpAniSirGlobal pMac, tANI_U8 *pMsg)
 {
    eHalStatus                         status = eHAL_STATUS_SUCCESS;
    tListElem                          *pEntry = NULL;
    tSmeCmd                            *pCommand = NULL;
    tSirSmeAddStaSelfRsp               *pRsp;
-
    do
    {
       if(pMsg == NULL)
@@ -12663,7 +12050,6 @@
          status = eHAL_STATUS_FAILURE;
          break;
       }
-
       pEntry = csrLLPeekHead( &pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK );
       if(pEntry)
       {
@@ -12673,9 +12059,7 @@
             pRsp = (tSirSmeAddStaSelfRsp*)pMsg;
             smsLog( pMac, LOG1, "Add Sta rsp status = %d\n", pRsp->status );
             //Nothing to be done. May be indicate the self sta addition success by calling session callback (TODO).
-
             csrRoamSessionOpened(pMac, pCommand->sessionId);
-
             //Remove this command out of the active list
             if(csrLLRemoveEntry(&pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK))
             {
@@ -12700,33 +12084,23 @@
          break;
       }
    } while(0);
-
    return status;
-
 }
-
 eHalStatus csrSendMBAddSelfStaReqMsg( tpAniSirGlobal pMac, tSirMacAddr macAddr )
 {
    tSirSmeAddStaSelfReq *pMsg;
    tANI_U16 msgLen;
    eHalStatus status = eHAL_STATUS_FAILURE;
-
    do {
-
       msgLen  = sizeof( tANI_U16 ) + sizeof( tANI_U16 ) + sizeof( tSirMacAddr ) /*+
          sizeof( tSirBssType )*/;
-
       status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, msgLen);
       if ( !HAL_STATUS_SUCCESS(status) ) break;
-
       palZeroMemory(pMac->hHdd, pMsg, msgLen);
-
       pMsg->mesgType = pal_cpu_to_be16((tANI_U16)eWNI_SME_ADD_STA_SELF_REQ);
       pMsg->mesgLen = pal_cpu_to_be16(msgLen);
-
       // self station address
       palCopyMemory( pMac->hHdd, (tANI_U8 *)pMsg->selfMacAddr, (tANI_U8 *)macAddr, sizeof(tSirMacAddr) );
-
         smsLog( pMac, LOGE, FL("selfMac=%02x, %02x, %02x, %02x, %02x, %02x\n"),       
             pMsg->selfMacAddr[0],
             pMsg->selfMacAddr[1],
@@ -12735,17 +12109,13 @@
             pMsg->selfMacAddr[4],
             pMsg->selfMacAddr[5]);
       status = palSendMBMessage(pMac->hHdd, pMsg);
-
    } while( 0 );
-
    return( status );
 }
-
 eHalStatus csrIssueAddStaForSessionReq(tpAniSirGlobal pMac, tANI_U32 sessionId, tSirMacAddr sessionMacAddr)
 {
    eHalStatus status = eHAL_STATUS_SUCCESS;
    tSmeCmd *pCommand;
-
    pCommand = csrGetCommandBuffer(pMac);
    if(NULL == pCommand)
    {
@@ -12756,7 +12126,6 @@
       pCommand->command = eSmeCommandAddStaSession;
       pCommand->sessionId = (tANI_U8)sessionId;
       palCopyMemory( pMac->hHdd, pCommand->u.addStaSessionCmd.selfMacAddr, sessionMacAddr, sizeof( tSirMacAddr ) );
-
       status = csrQueueSmeCommand(pMac, pCommand, TRUE);
       if( !HAL_STATUS_SUCCESS( status ) )
       {
@@ -12764,23 +12133,19 @@
          smsLog( pMac, LOGE, FL(" fail to send message status = %d\n"), status );
       }
    }
-
    return (status);
 }
-
 eHalStatus csrProcessAddStaSessionCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
 {
    return csrSendMBAddSelfStaReqMsg( pMac, 
          pCommand->u.addStaSessionCmd.selfMacAddr );
 }
-
 eHalStatus csrRoamOpenSession( tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext,
                           tANI_U8 *pSelfMacAddr, tANI_U8 *pbSessionId )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tANI_U32 i;
     tCsrRoamSession *pSession;
-
     *pbSessionId = CSR_SESSION_ID_INVALID;
     for( i = 0; i < CSR_ROAM_SESSION_MAX; i++ )
     {
@@ -12794,7 +12159,6 @@
             pSession->pContext = pContext;
             palCopyMemory( pMac->hHdd, &pSession->selfMacAddr, pSelfMacAddr, sizeof(tCsrBssid) );
             *pbSessionId = (tANI_U8)i;
-
             status = palTimerAlloc(pMac->hHdd, &pSession->hTimerRoaming, csrRoamRoamingTimerHandler, 
                                     &pSession->roamingTimerInfo);
             if(!HAL_STATUS_SUCCESS(status))
@@ -12813,7 +12177,6 @@
 #endif
             pSession->ibssJoinTimerInfo.pMac = pMac;
             pSession->ibssJoinTimerInfo.sessionId = CSR_SESSION_ID_INVALID;
-
             status = palTimerAlloc(pMac->hHdd, &pSession->hTimerIbssJoining, csrRoamIbssJoinTimerHandler, 
                                     &pSession->ibssJoinTimerInfo);
             if(!HAL_STATUS_SUCCESS(status))
@@ -12830,17 +12193,14 @@
         //No session is available
         status = eHAL_STATUS_RESOURCES;
     }
-
     return ( status );
 }
-
 eHalStatus csrProcessDelStaSessionRsp( tpAniSirGlobal pMac, tANI_U8 *pMsg)
 {
    eHalStatus                         status = eHAL_STATUS_SUCCESS;
    tListElem                          *pEntry = NULL;
    tSmeCmd                            *pCommand = NULL;
    tSirSmeDelStaSelfRsp               *pRsp;
-
    do
    {
       if(pMsg == NULL)
@@ -12849,7 +12209,6 @@
          status = eHAL_STATUS_FAILURE;
          break;
       }
-
       pEntry = csrLLPeekHead( &pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK );
       if(pEntry)
       {
@@ -12857,13 +12216,10 @@
          if(eSmeCommandDelStaSession == pCommand->command)
          {
             tANI_U8 sessionId = pCommand->sessionId;
-
             pRsp = (tSirSmeDelStaSelfRsp*)pMsg;
             smsLog( pMac, LOG1, "Del Sta rsp status = %d\n", pRsp->status );
-
             //This session is done.
             csrCleanupSession(pMac, sessionId);
-
             if(pCommand->u.delStaSessionCmd.callback)
             {
                  
@@ -12908,40 +12264,28 @@
          break;
       }
    } while(0);
-
    return status;
-
 }
-
 eHalStatus csrSendMBDelSelfStaReqMsg( tpAniSirGlobal pMac, tSirMacAddr macAddr )
 {
    tSirSmeDelStaSelfReq *pMsg;
    tANI_U16 msgLen;
    eHalStatus status = eHAL_STATUS_FAILURE;
-
    do {
-
       msgLen  = sizeof( tANI_U16 ) + sizeof( tANI_U16 ) + sizeof( tSirMacAddr ) /*+
          sizeof( tSirBssType )*/;
-
       status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, msgLen);
       if ( !HAL_STATUS_SUCCESS(status) ) break;
    
       palZeroMemory(pMac->hHdd, pMsg, msgLen);
-
       pMsg->mesgType = pal_cpu_to_be16((tANI_U16)eWNI_SME_DEL_STA_SELF_REQ);
       pMsg->mesgLen = pal_cpu_to_be16(msgLen);
-
       // self station address
       palCopyMemory( pMac->hHdd, (tANI_U8 *)pMsg->selfMacAddr, (tANI_U8 *)macAddr, sizeof(tSirMacAddr) );
-
       status = palSendMBMessage(pMac->hHdd, pMsg);
-
    } while( 0 );
-
    return( status );
 }
-
 eHalStatus csrIssueDelStaForSessionReq(tpAniSirGlobal pMac, tANI_U32 sessionId,
                                        tSirMacAddr sessionMacAddr,
                                        csrRoamSessionCloseCallback callback,
@@ -12949,7 +12293,6 @@
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
    tSmeCmd *pCommand;
-
    pCommand = csrGetCommandBuffer(pMac);
    if(NULL == pCommand)
    {
@@ -12962,7 +12305,6 @@
       pCommand->u.delStaSessionCmd.callback = callback;
       pCommand->u.delStaSessionCmd.pContext = pContext;
       palCopyMemory( pMac->hHdd, pCommand->u.delStaSessionCmd.selfMacAddr, sessionMacAddr, sizeof( tSirMacAddr ) );
-
       status = csrQueueSmeCommand(pMac, pCommand, TRUE);
       if( !HAL_STATUS_SUCCESS( status ) )
       {
@@ -12970,16 +12312,13 @@
          smsLog( pMac, LOGE, FL(" fail to send message status = %d\n"), status );
       }
    }
-
    return (status);
 }
-
 eHalStatus csrProcessDelStaSessionCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
 {
    return csrSendMBDelSelfStaReqMsg( pMac, 
          pCommand->u.delStaSessionCmd.selfMacAddr );
 }
-
 static void purgeCsrSessionCmdList(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     tDblLinkList *pList = &pMac->roam.roamCmdPendingList;
@@ -12993,7 +12332,6 @@
         smsLog(pMac, LOGE, FL(" failed to open list"));
         return;
     }
-
     csrLLLock(pList);
     pEntry = csrLLPeekHead(pList, LL_ACCESS_NOLOCK);
     while(pEntry != NULL)
@@ -13019,13 +12357,11 @@
     csrLLClose(&localList);
 }
 
-
 void csrCleanupSession(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     if( CSR_IS_SESSION_VALID( pMac, sessionId ) )
     {
         tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
         csrRoamStop(pMac, sessionId);
         csrFreeConnectBssDesc(pMac, sessionId);
         csrRoamFreeConnectProfile( pMac, &pSession->connectedProfile );
@@ -13041,14 +12377,12 @@
     }
 }
 
-
 eHalStatus csrRoamCloseSession( tpAniSirGlobal pMac, tANI_U32 sessionId,
                                 tANI_BOOLEAN fSync, 
                                 csrRoamSessionCloseCallback callback,
                                 void *pContext )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
-
     if( CSR_IS_SESSION_VALID( pMac, sessionId ) )
     {
         tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
@@ -13068,15 +12402,12 @@
     {
         status = eHAL_STATUS_INVALID_PARAMETER;
     }
-
     return ( status );
 }
 
-
 static void csrInitSession( tpAniSirGlobal pMac, tANI_U32 sessionId )
 {
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     pSession->sessionActive = eANI_BOOLEAN_FALSE;
     pSession->sessionId = CSR_SESSION_ID_INVALID;
     pSession->callback = NULL;
@@ -13116,29 +12447,24 @@
     }
     pSession->nWapiRspIeLength = 0;
 #endif /* FEATURE_WLAN_WAPI */
-
     if(pSession->pAddIEScan)
     {
         palFreeMemory(pMac->hHdd, pSession->pAddIEScan);
         pSession->pAddIEScan = NULL;
     }
     pSession->nAddIEScanLength = 0;
-
     if(pSession->pAddIEAssoc)
     {
         palFreeMemory(pMac->hHdd, pSession->pAddIEAssoc);
         pSession->pAddIEAssoc = NULL;
 }
     pSession->nAddIEAssocLength = 0;
-
 }
 
-
 eHalStatus csrRoamGetSessionIdFromBSSID( tpAniSirGlobal pMac, tCsrBssid *bssid, tANI_U32 *pSessionId )
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
     tANI_U32 i;
-
     for( i = 0; i < CSR_ROAM_SESSION_MAX; i++ )
     {
         if( CSR_IS_SESSION_VALID( pMac, i ) )
@@ -13152,18 +12478,15 @@
             }
         }
     }
-
     return( status );
 }
 
-
 //This function assumes that we only support one IBSS session. We cannot use BSSID to identify 
 //session because for IBSS, the bssid changes.
 static tANI_U32 csrFindIbssSession( tpAniSirGlobal pMac )
 {
     tANI_U32 i, nRet = CSR_SESSION_ID_INVALID;
     tCsrRoamSession *pSession;
-
     for( i = 0; i < CSR_ROAM_SESSION_MAX; i++ )
     {
         if( CSR_IS_SESSION_VALID( pMac, i ) )
@@ -13177,55 +12500,43 @@
             }
         }
     }
-
     return (nRet);
 }
-
 static void csrRoamLinkUp(tpAniSirGlobal pMac, tCsrBssid bssid)
 {
    /* Update the current BSS info in ho control block based on connected 
       profile info from pmac global structure                              */
    
-
    smsLog(pMac, LOGW, " csrRoamLinkUp: WLAN link UP with AP= %02x-%02x-%02x-%02x-%02x-%02x\n", 
           bssid[ 0 ], bssid[ 1 ], bssid[ 2 ],
           bssid[ 3 ], bssid[ 4 ], bssid[ 5 ] );
-
    /* Check for user misconfig of RSSI trigger threshold                  */
    pMac->roam.configParam.vccRssiThreshold =
       ( 0 == pMac->roam.configParam.vccRssiThreshold ) ? 
       CSR_VCC_RSSI_THRESHOLD : pMac->roam.configParam.vccRssiThreshold;
    pMac->roam.vccLinkQuality = eCSR_ROAM_LINK_QUAL_POOR_IND;
-
     /* Check for user misconfig of UL MAC Loss trigger threshold           */
    pMac->roam.configParam.vccUlMacLossThreshold =
       ( 0 == pMac->roam.configParam.vccUlMacLossThreshold ) ? 
       CSR_VCC_UL_MAC_LOSS_THRESHOLD : pMac->roam.configParam.vccUlMacLossThreshold;
-
 #if   defined WLAN_FEATURE_NEIGHBOR_ROAMING
     {
         tANI_U32 sessionId = 0;
-
         /* Indicate the neighbor roal algorithm about the connect indication */
         csrRoamGetSessionIdFromBSSID(pMac, (tCsrBssid *)bssid, &sessionId);
         csrNeighborRoamIndicateConnect(pMac, sessionId, VOS_STATUS_SUCCESS);
     }
 #endif
-
 }
 
-
 static void csrRoamLinkDown(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
    tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
    //Only to handle the case for Handover on infra link
    if( eCSR_BSS_TYPE_INFRASTRUCTURE != pSession->connectedProfile.BSSType )
    {
       return;
    }
-
-
    /* deregister the clients requesting stats from PE/TL & also stop the corresponding timers*/
    csrRoamDeregStatisticsReq(pMac);
    pMac->roam.vccLinkQuality = eCSR_ROAM_LINK_QUAL_POOR_IND;
@@ -13234,16 +12545,23 @@
    csrNeighborRoamIndicateDisconnect(pMac, sessionId);
 #endif
    
+#ifndef BMPS_WORKAROUND_NOT_NEEDED
+   if(csrIsInfraApStarted( pMac ) &&  pMac->roam.configParam.doBMPSWorkaround)
+   {
+       pMac->roam.configParam.doBMPSWorkaround = 0;
+   }
+#endif
+   
 }
 
-
 void csrRoamTlStatsTimerHandler(void *pv)
 {
    tpAniSirGlobal pMac = PMAC_STRUCT( pv );
    eHalStatus status;
-
    pMac->roam.tlStatsReqInfo.timerRunning = FALSE;
 
+   smsLog(pMac, LOG1, FL(" TL stat timer is no-op. It needs to support multiple stations"));
+
 #if 0
    // TODO Persession .???
    //req TL for stats
@@ -13273,7 +12591,6 @@
       }
    }
 }
-
 void csrRoamPeStatsTimerHandler(void *pv)
 {
    tCsrPeStatsReqInfo *pPeStatsReqListEntry = (tCsrPeStatsReqInfo *)pv;
@@ -13281,7 +12598,6 @@
    tpAniSirGlobal pMac = pPeStatsReqListEntry->pMac;
    VOS_STATUS vosStatus;
    tPmcPowerState powerState;
-
    pPeStatsReqListEntry->timerRunning = FALSE;
    if( pPeStatsReqListEntry->timerStopFailed == TRUE )
    {
@@ -13341,18 +12657,15 @@
             smsLog(pMac, LOGE, FL("csrRoamPeStatsTimerHandler:cannot start hPeStatsTimer timer\n"));
             return;
          }
-
          pPeStatsReqListEntry->timerRunning = TRUE;
 
       }
 
    }
 }
-
 void csrRoamStatsClientTimerHandler(void *pv)
 {
    tCsrStatsClientReqInfo *pStaEntry = (tCsrStatsClientReqInfo *)pv;
-
    if(VOS_TIMER_STATE_STOPPED == vos_timer_getCurrentState(&pStaEntry->timer))
    {
 #if 0
@@ -13363,7 +12676,6 @@
        if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) ) 
        {
           smsLog(pStaEntry->pMac, LOGE, FL("csrGetStatistics:cannot start StatsClient timer\n"));
-
        }
 #endif       
    }
@@ -13376,7 +12688,6 @@
 
 
 
-
 eHalStatus csrSendMBStatsReqMsg( tpAniSirGlobal pMac, tANI_U32 statsMask, tANI_U8 staId)
 {
    tAniGetPEStatsReq *pMsg;
@@ -13392,17 +12703,13 @@
    pMsg->msgLen = (tANI_U16)sizeof(tAniGetPEStatsReq);
    pMsg->staId = staId;
    pMsg->statsMask = statsMask;
-
    status = palSendMBMessage(pMac->hHdd, pMsg );    
-
    if(!HAL_STATUS_SUCCESS(status))
    {
       smsLog(pMac, LOG1, " csrSendMBStatsReqMsg: failed to send down the stats req \n");
    }
-
    return status;
 }
-
 void csrRoamStatsRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg)
 {
    tAniGetPEStatsRsp *pSmeStatsRsp;
@@ -13417,23 +12724,19 @@
    v_PVOID_t  pvosGCtx;
    v_S7_t     rssi = 0;
    tANI_U32   *pRssi = NULL;
-
    pSmeStatsRsp = (tAniGetPEStatsRsp *)pSirMsg;
    if(pSmeStatsRsp->rc)
    {
       smsLog( pMac, LOGW, FL("csrRoamStatsRspProcessor:stats rsp from PE shows failure\n"));
       goto post_update;
    }
-
    tempMask = pSmeStatsRsp->statsMask;
    pStats = ((tANI_U8 *)&pSmeStatsRsp->statsMask) + sizeof(pSmeStatsRsp->statsMask);
-
    /* subtract all statistics from this length, and after processing the entire 
     * 'stat' part of the message, if the length is not zero, then rssi is piggy packed 
     * in this 'stats' message.
     */
    length = pSmeStatsRsp->msgLen - sizeof(tAniGetPEStatsRsp);
-
    //new stats info from PE, fill up the stats strucutres in PMAC
    while(tempMask)
    {
@@ -13452,7 +12755,6 @@
             pStats += sizeof(tCsrSummaryStatsInfo);
             length -= sizeof(tCsrSummaryStatsInfo);
             break;
-
          case eCsrGlobalClassAStats:
             smsLog( pMac, LOG1, FL("csrRoamStatsRspProcessor:ClassA stats\n"));
             status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.classAStatsInfo, 
@@ -13464,7 +12766,6 @@
             pStats += sizeof(tCsrGlobalClassAStatsInfo);
             length -= sizeof(tCsrGlobalClassAStatsInfo);
             break;
-
          case eCsrGlobalClassBStats:
             smsLog( pMac, LOG1, FL("csrRoamStatsRspProcessor:ClassB stats\n"));
             status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.classBStatsInfo, 
@@ -13476,7 +12777,6 @@
             pStats += sizeof(tCsrGlobalClassBStatsInfo);
             length -= sizeof(tCsrGlobalClassBStatsInfo);
             break;
-
          case eCsrGlobalClassCStats:
             smsLog( pMac, LOG1, FL("csrRoamStatsRspProcessor:ClassC stats\n"));
             status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.classCStatsInfo, 
@@ -13488,7 +12788,6 @@
             pStats += sizeof(tCsrGlobalClassCStatsInfo);
             length -= sizeof(tCsrGlobalClassCStatsInfo);
             break;
-
          case eCsrPerStaStats:
             smsLog( pMac, LOG1, FL("csrRoamStatsRspProcessor:PerSta stats\n"));
             if( CSR_MAX_STA > pSmeStatsRsp->staId )
@@ -13509,14 +12808,11 @@
             pStats += sizeof(tCsrPerStaStatsInfo);
             length -= sizeof(tCsrPerStaStatsInfo);
             break;
-
          default:
             smsLog( pMac, LOGW, FL("csrRoamStatsRspProcessor:unknown stats type\n"));
             break;
-
          }
       }
-
       tempMask >>=1;
       counter++;
    }
@@ -13532,7 +12828,6 @@
        rssi = RSSI_HACK_BMPS;
    }
    WDA_UpdateRssiBmps(pvosGCtx, pSmeStatsRsp->staId, rssi);
-
 post_update:   
    //make sure to update the pe stats req list 
    pEntry = csrRoamFindInPeStatsReqList(pMac, pSmeStatsRsp->statsMask);
@@ -13546,9 +12841,7 @@
    pEntry = csrRoamCheckClientReqList(pMac, pSmeStatsRsp->statsMask);
    if(pEntry)
    {
-
       pTempStaEntry = GET_BASE_ADDR( pEntry, tCsrStatsClientReqInfo, link );
-
       if(pTempStaEntry->timerExpired)
       {
          //send up the stats report
@@ -13557,51 +12850,39 @@
          //also remove from the client list
          csrRoamRemoveStatListEntry(pMac, pEntry);
          pTempStaEntry = NULL;
-
       }
    }
-
 }
-
 tListElem * csrRoamFindInPeStatsReqList(tpAniSirGlobal pMac, tANI_U32  statsMask)
 {
    tListElem *pEntry = NULL;
    tCsrPeStatsReqInfo *pTempStaEntry = NULL;
-
    pEntry = csrLLPeekHead( &pMac->roam.peStatsReqList, LL_ACCESS_LOCK );
-
    if(!pEntry)
    {
       //list empty
       smsLog(pMac, LOGW, "csrRoamFindInPeStatsReqList: List empty, no request to PE\n");
       return NULL;
    }
-
    while( pEntry )
    {
       pTempStaEntry = GET_BASE_ADDR( pEntry, tCsrPeStatsReqInfo, link );
-
       if(pTempStaEntry->statsMask == statsMask)
       {
          smsLog(pMac, LOGW, "csrRoamFindInPeStatsReqList: match found\n");
          break;
       }
-
       pEntry = csrLLNext( &pMac->roam.peStatsReqList, pEntry, LL_ACCESS_NOLOCK );
    }
-
    return pEntry;
 }
 
-
 tListElem * csrRoamChecknUpdateClientReqList(tpAniSirGlobal pMac, tCsrStatsClientReqInfo *pStaEntry,
                                              tANI_BOOLEAN update)
 {
    tListElem *pEntry;
    tCsrStatsClientReqInfo *pTempStaEntry;
-
    pEntry = csrLLPeekHead( &pMac->roam.statsClientReqList, LL_ACCESS_LOCK );
-
    if(!pEntry)
    {
       //list empty
@@ -13609,37 +12890,30 @@
              "upper layer client(s)\n");
       return NULL;
    }
-
    while( pEntry )
    {
       pTempStaEntry = GET_BASE_ADDR( pEntry, tCsrStatsClientReqInfo, link );
-
       if((pTempStaEntry->requesterId == pStaEntry->requesterId) && 
          (pTempStaEntry->statsMask == pStaEntry->statsMask))
       {
          smsLog(pMac, LOGW, "csrRoamChecknUpdateClientReqList: match found\n");
          if(update)
          {
-         pTempStaEntry->periodicity = pStaEntry->periodicity;
-         pTempStaEntry->callback = pStaEntry->callback;
-         pTempStaEntry->pContext = pStaEntry->pContext;
+            pTempStaEntry->periodicity = pStaEntry->periodicity;
+            pTempStaEntry->callback = pStaEntry->callback;
+            pTempStaEntry->pContext = pStaEntry->pContext;
          }
          break;
       }
-
       pEntry = csrLLNext( &pMac->roam.statsClientReqList, pEntry, LL_ACCESS_NOLOCK );
    }
-
    return pEntry;
 }
-
 tListElem * csrRoamCheckClientReqList(tpAniSirGlobal pMac, tANI_U32 statsMask)
 {
    tListElem *pEntry;
    tCsrStatsClientReqInfo *pTempStaEntry;
-
    pEntry = csrLLPeekHead( &pMac->roam.statsClientReqList, LL_ACCESS_LOCK );
-
    if(!pEntry)
    {
       //list empty
@@ -13647,25 +12921,18 @@
              "upper layer client(s)\n");
       return NULL;
    }
-
    while( pEntry )
    {
       pTempStaEntry = GET_BASE_ADDR( pEntry, tCsrStatsClientReqInfo, link );
-
       if((pTempStaEntry->statsMask & ~(1 << eCsrGlobalClassDStats))  == statsMask)
       {
          smsLog(pMac, LOGW, "csrRoamCheckClientReqList: match found\n");
-
          break;
       }
-
       pEntry = csrLLNext( &pMac->roam.statsClientReqList, pEntry, LL_ACCESS_NOLOCK );
    }
-
    return pEntry;
 }
-
-
 eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
                                                  csrRoamLinkQualityIndCallback   callback,  
                                                  void                           *pContext)
@@ -13679,32 +12946,25 @@
    else
    {
      smsLog(pMac, LOGW, "csrRoamRegisterLinkQualityIndCallback: indication callback being registered");
-
      /* do we need to invoke the callback to notify client of initial value ??  */
    }
    return eHAL_STATUS_SUCCESS;
 }
-
 void csrRoamVccTrigger(tpAniSirGlobal pMac)
 {
    eCsrRoamLinkQualityInd newVccLinkQuality;
    tANI_U32 ul_mac_loss = 0;
    tANI_U32 ul_mac_loss_trigger_threshold;
-
  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
    /*-------------------------------------------------------------------------
      Link quality is currently binary based on OBIWAN recommended triggers
-
      Check for a change in link quality and notify client if necessary
    -------------------------------------------------------------------------*/
    ul_mac_loss_trigger_threshold = 
       pMac->roam.configParam.vccUlMacLossThreshold;
-
    VOS_ASSERT( ul_mac_loss_trigger_threshold != 0 );
-
    smsLog(pMac, LOGW, "csrRoamVccTrigger: UL_MAC_LOSS_THRESHOLD is %d\n", 
           ul_mac_loss_trigger_threshold );
-
    if(ul_mac_loss_trigger_threshold < ul_mac_loss)
    {
       smsLog(pMac, LOGW, "csrRoamVccTrigger: link quality is POOR \n");
@@ -13715,10 +12975,8 @@
       smsLog(pMac, LOGW, "csrRoamVccTrigger: link quality is GOOD\n");
       newVccLinkQuality = eCSR_ROAM_LINK_QUAL_GOOD_IND;
    }
-
    smsLog(pMac, LOGW, "csrRoamVccTrigger: link qual : *** UL_MAC_LOSS %d *** ",
           ul_mac_loss);
-
    if(newVccLinkQuality != pMac->roam.vccLinkQuality)
    {
       smsLog(pMac, LOGW, "csrRoamVccTrigger: link quality changed: trigger necessary\n");
@@ -13733,12 +12991,9 @@
          //event: EVENT_WLAN_VCC
       }
    }
-
    pMac->roam.vccLinkQuality = newVccLinkQuality;
 
-
 }
-
 VOS_STATUS csrRoamVccTriggerRssiIndCallback(tHalHandle hHal, 
                                             v_U8_t  rssiNotification, 
                                             void * context)
@@ -13750,7 +13005,6 @@
    VOS_STATUS status = VOS_STATUS_SUCCESS;
    /*-------------------------------------------------------------------------
      Link quality is currently binary based on OBIWAN recommended triggers
-
      Check for a change in link quality and notify client if necessary
    -------------------------------------------------------------------------*/
    smsLog(pMac, LOGW, "csrRoamVccTriggerRssiIndCallback: RSSI trigger threshold is %d\n", 
@@ -13760,7 +13014,6 @@
       smsLog(pMac, LOGW, "csrRoamVccTriggerRssiIndCallback: ignoring the indication as we are not connected\n");
       return VOS_STATUS_SUCCESS;
    }
-
    if(WLANTL_HO_THRESHOLD_DOWN == rssiNotification)
    {
       smsLog(pMac, LOGW, "csrRoamVccTriggerRssiIndCallback: link quality is POOR\n");
@@ -13776,11 +13029,9 @@
       smsLog(pMac, LOGW, "csrRoamVccTriggerRssiIndCallback: unknown rssi notification %d\n", rssiNotification);
       //Set to this so the code below won't do anything
       newVccLinkQuality = pMac->roam.vccLinkQuality;    
-
       VOS_ASSERT(0);
    }
 
-
    if(newVccLinkQuality != pMac->roam.vccLinkQuality)
    {
       smsLog(pMac, LOGW, "csrRoamVccTriggerRssiIndCallback: link quality changed: trigger necessary\n");
@@ -13788,28 +13039,21 @@
       {
          smsLog(pMac, LOGW, "csrRoamVccTriggerRssiIndCallback: link quality indication %d\n",
                 newVccLinkQuality);
-
         /* we now invoke the callback once to notify client of initial value   */
         pMac->roam.linkQualityIndInfo.callback( newVccLinkQuality, 
                                                 pMac->roam.linkQualityIndInfo.context );
          //event: EVENT_WLAN_VCC
       }
    }
-
    pMac->roam.vccLinkQuality = newVccLinkQuality;
-
    return status;
 }
-
-
 tCsrStatsClientReqInfo * csrRoamInsertEntryIntoList( tpAniSirGlobal pMac,
                                                      tDblLinkList *pStaList,
                                                      tCsrStatsClientReqInfo *pStaEntry)
 {
    tCsrStatsClientReqInfo *pNewStaEntry = NULL;
-
    eHalStatus  status;
-
    //if same entity requested for same set of stats with different periodicity & 
    // callback update it
    if(NULL == csrRoamChecknUpdateClientReqList(pMac, pStaEntry, TRUE))
@@ -13823,7 +13067,6 @@
          return NULL;
       }
    
-
       pNewStaEntry->callback = pStaEntry->callback;
       pNewStaEntry->pContext = pStaEntry->pContext;
       pNewStaEntry->periodicity = pStaEntry->periodicity;
@@ -13839,15 +13082,12 @@
    return pNewStaEntry;
 }
 
-
 tCsrPeStatsReqInfo * csrRoamInsertEntryIntoPeStatsReqList( tpAniSirGlobal pMac,
                                                            tDblLinkList *pStaList,
                                                            tCsrPeStatsReqInfo *pStaEntry)
 {
    tCsrPeStatsReqInfo *pNewStaEntry = NULL;
-
    eHalStatus  status;
-
    status = palAllocateMemory(pMac->hHdd, (void **)&pNewStaEntry, sizeof(tCsrPeStatsReqInfo));
    if (!HAL_STATUS_SUCCESS(status))
    {
@@ -13856,7 +13096,6 @@
       return NULL;
    }
    
-
    pNewStaEntry->hPeStatsTimer = pStaEntry->hPeStatsTimer;
    pNewStaEntry->numClient = pStaEntry->numClient;
    pNewStaEntry->periodicity = pStaEntry->periodicity;
@@ -13867,11 +13106,8 @@
    pNewStaEntry->rspPending = pStaEntry->rspPending;
    
    csrLLInsertTail( pStaList, &pNewStaEntry->link, LL_ACCESS_LOCK  );
-
    return pNewStaEntry;
 }
-
-
 eHalStatus csrGetRssi(tpAniSirGlobal pMac, 
                             tCsrRssiCallback callback, 
                             tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext)
@@ -13888,7 +13124,6 @@
       smsLog(pMac, LOGE, " csrGetRssi: failed to allocate mem for req \n");
       return status;
    }
-
    csrRoamGetSessionIdFromBSSID(pMac, (tCsrBssid *)bssId, &sessionId);
 
    pMsg->msgType = pal_cpu_to_be16((tANI_U16)eWNI_SME_GET_RSSI_REQ);
@@ -13898,11 +13133,9 @@
    pMsg->rssiCallback = callback;
    pMsg->pDevContext = pContext;
    pMsg->pVosContext = pVosContext;
-
    msg.type = eWNI_SME_GET_RSSI_REQ;
    msg.bodyptr = pMsg;
    msg.reserved = 0;
-
    if(VOS_STATUS_SUCCESS != vos_mq_post_message(VOS_MQ_ID_SME, &msg))
    {
        smsLog(pMac, LOGE, " csrGetRssi failed to post msg to self \n");   
@@ -13912,7 +13145,6 @@
    smsLog(pMac, LOG2, FL("returned"));      
    return status;
 }
-
 eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId, 
                             tANI_U32 statsMask, 
                             tCsrStatsCallback callback, 
@@ -13927,20 +13159,19 @@
    eHalStatus status = eHAL_STATUS_SUCCESS;
    tANI_BOOLEAN insertInClientList = FALSE;
    VOS_STATUS vosStatus;
+   WLANTL_TRANSFER_STA_TYPE *pTlStats;
 
    if( csrIsAllSessionDisconnected(pMac) )
    {
       //smsLog(pMac, LOGW, "csrGetStatistics: wrong state curState(%d) not connected\n", pMac->roam.curState);
       return eHAL_STATUS_FAILURE;
    }
-
    if((!statsMask) && (!callback))
    {
       //msg
       smsLog(pMac, LOGW, "csrGetStatistics: statsMask & callback empty in the request\n");
       return eHAL_STATUS_FAILURE;
    }
-
    //for the search list method for deregister
    staEntry.requesterId = requesterId;
    staEntry.statsMask = statsMask;
@@ -13961,12 +13192,12 @@
          pStaEntry = GET_BASE_ADDR( pEntry, tCsrStatsClientReqInfo, link );
          if(NULL != pStaEntry->pPeStaEntry)
          {
-         pStaEntry->pPeStaEntry->numClient--;
-         //check if we need to delete the entry from peStatsReqList too
-         if(!pStaEntry->pPeStaEntry->numClient)
-         {
-            csrRoamRemoveEntryFromPeStatsReqList(pMac, pStaEntry->pPeStaEntry);
-         }
+            pStaEntry->pPeStaEntry->numClient--;
+            //check if we need to delete the entry from peStatsReqList too
+            if(!pStaEntry->pPeStaEntry->numClient)
+            {
+               csrRoamRemoveEntryFromPeStatsReqList(pMac, pStaEntry->pPeStaEntry);
+            }
          }
 
          //check if we need to stop the tl stats timer too 
@@ -13986,14 +13217,12 @@
             pMac->roam.tlStatsReqInfo.timerRunning = FALSE;
          }
          vos_timer_stop( &pStaEntry->timer );
-
          // Destroy the vos timer...      
          vosStatus = vos_timer_destroy( &pStaEntry->timer );
          if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
          {
             smsLog(pMac, LOGE, FL("csrGetStatistics:failed to destroy Client req timer\n"));
          }
-
          csrRoamRemoveStatListEntry(pMac, pEntry);
          pStaEntry = NULL;
          return eHAL_STATUS_SUCCESS;
@@ -14017,7 +13246,6 @@
       staEntry.timerExpired = FALSE;
    
    
-
       //if periodic report requested with non cached result from PE/TL
       if(periodicity)
       {
@@ -14067,19 +13295,27 @@
                
                if(!pMac->roam.tlStatsReqInfo.timerRunning)
                {
-#if 0
-                                   // TODO Session Specific info connectedInfo
-                  //req TL for class D stats
-                  if(WLANTL_GetStatistics(pMac->roam.gVosContext, &tlStats, pMac->roam.connectedInfo.staId))
+                  pTlStats = (WLANTL_TRANSFER_STA_TYPE *)vos_mem_malloc(sizeof(WLANTL_TRANSFER_STA_TYPE));
+                  if(NULL != pTlStats)
                   {
-                     smsLog(pMac, LOGE, FL("csrGetStatistics:couldn't get the stats from TL\n"));
+                     //req TL for class D stats
+                     if(WLANTL_GetStatistics(pMac->roam.gVosContext, pTlStats, staId))
+                     {
+                        smsLog(pMac, LOGE, FL("csrGetStatistics:couldn't get the stats from TL\n"));
+                     }
+                     else
+                     {
+                        //save in SME
+                        csrRoamSaveStatsFromTl(pMac, pTlStats);
+                     }
+                     vos_mem_free(pTlStats);
+                     pTlStats = NULL;
                   }
                   else
                   {
-                     //save in SME
-                     csrRoamSaveStatsFromTl(pMac, tlStats);
+                     smsLog(pMac, LOGE, FL("cannot allocate memory for TL stat"));
                   }
-#endif
+
                   if(pMac->roam.tlStatsReqInfo.periodicity)
                   {
                      //start timer
@@ -14114,23 +13350,29 @@
             //right away
             staEntry.timerExpired = TRUE;
             insertInClientList = TRUE;
-
          }
          if(statsMask & (1 << eCsrGlobalClassDStats))
          {
-#if 0
-                         // TODO : Per Session info connectedInfo
-            //req TL for class D stats
-            if(WLANTL_GetStatistics(pMac->roam.gVosContext, &tlStats, pMac->roam.connectedInfo.staId))
+            pTlStats = (WLANTL_TRANSFER_STA_TYPE *)vos_mem_malloc(sizeof(WLANTL_TRANSFER_STA_TYPE));
+            if(NULL != pTlStats)
             {
-               smsLog(pMac, LOGE, FL("csrGetStatistics:couldn't get the stats from TL\n"));
+               //req TL for class D stats
+               if(!VOS_IS_STATUS_SUCCESS(WLANTL_GetStatistics(pMac->roam.gVosContext, pTlStats, staId)))
+               {
+                  smsLog(pMac, LOGE, FL("csrGetStatistics:couldn't get the stats from TL\n"));
+               }
+               else
+               {
+                  //save in SME
+                  csrRoamSaveStatsFromTl(pMac, pTlStats);
+               }
+               vos_mem_free(pTlStats);
+               pTlStats = NULL;
             }
             else
             {
-               //save in SME
-               csrRoamSaveStatsFromTl(pMac, tlStats);
+               smsLog(pMac, LOGE, FL("cannot allocate memory for TL stat"));
             }
-#endif
 
          }
          //if looking for stats from TL only 
@@ -14139,9 +13381,7 @@
             //return the stats
             csrRoamReportStatistics(pMac, statsMask, callback, staId, pContext);
          }
-
       }
-
       if(insertInClientList)
       {
          pStaEntry = csrRoamInsertEntryIntoList(pMac, &pMac->roam.statsClientReqList, &staEntry); 
@@ -14151,6 +13391,7 @@
             smsLog(pMac, LOGW, "csrGetStatistics: Failed to insert req in statsClientReqList\n");
             return eHAL_STATUS_FAILURE;
          }
+         pStaEntry->periodicity = periodicity;
          //Init & start timer if needed
          if(periodicity)
          {
@@ -14167,16 +13408,12 @@
                smsLog(pMac, LOGE, FL("csrGetStatistics:cannot start StatsClient timer\n"));
                return eHAL_STATUS_FAILURE;
             }
-
          }
-
       }
-
    }
    return eHAL_STATUS_SUCCESS;
 }
 
-
 tCsrPeStatsReqInfo * csrRoamCheckPeStatsReqList(tpAniSirGlobal pMac, tANI_U32  statsMask, 
                                                 tANI_U32 periodicity, tANI_BOOLEAN *pFound, tANI_U8 staId)
 {
@@ -14202,7 +13439,6 @@
       {
          pTempStaEntry->periodicity = periodicity;
       }
-
       pTempStaEntry->numClient++;
          found = TRUE;
    }
@@ -14224,7 +13460,6 @@
          return NULL;
       }
    }
-
    pmcQueryPowerState(pMac, &powerState, NULL, NULL);
    if(ePMC_FULL_POWER == powerState)
    {
@@ -14268,11 +13503,9 @@
                smsLog(pMac, LOGE, FL("csrRoamCheckPeStatsReqList:cannot init hPeStatsTimer timer\n"));
                return NULL;
             }
-
          }
          //start timer
          smsLog(pMac, LOG1, "csrRoamCheckPeStatsReqList:peStatsTimer period %d\n", pTempStaEntry->periodicity);
-
          vosStatus = vos_timer_start( &pTempStaEntry->hPeStatsTimer, pTempStaEntry->periodicity );
          if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) ) 
          {
@@ -14282,12 +13515,10 @@
          pTempStaEntry->timerRunning = TRUE;
       }
    }
-
    *pFound = found;
    return pTempStaEntry;
 }
 
-
 /*
     pStaEntry is no longer invalid upon the return of this function.
 */
@@ -14298,10 +13529,9 @@
         if(csrLLRemoveEntry(&pMac->roam.statsClientReqList, pEntry, LL_ACCESS_LOCK))
         {
             palFreeMemory(pMac->hHdd, GET_BASE_ADDR( pEntry, tCsrStatsClientReqInfo, link ));
+            }
         }
     }
-}
-
 
 void csrRoamRemoveEntryFromPeStatsReqList(tpAniSirGlobal pMac, tCsrPeStatsReqInfo *pPeStaEntry)
 {
@@ -14309,18 +13539,15 @@
    tCsrPeStatsReqInfo *pTempStaEntry;
    VOS_STATUS vosStatus;
    pEntry = csrLLPeekHead( &pMac->roam.peStatsReqList, LL_ACCESS_LOCK );
-
    if(!pEntry)
    {
       //list empty
       smsLog(pMac, LOGW, "csrRoamRemoveEntryFromPeStatsReqList: List empty, no stats req for PE\n");
       return;
    }
-
    while( pEntry )
    {
       pTempStaEntry = GET_BASE_ADDR( pEntry, tCsrPeStatsReqInfo, link );
-
       if( pTempStaEntry && pTempStaEntry->statsMask == pPeStaEntry->statsMask)
       {
          smsLog(pMac, LOGW, "csrRoamRemoveEntryFromPeStatsReqList: match found\n");
@@ -14349,7 +13576,7 @@
                // memory for the PE stat entry in the timer CB.
                pTempStaEntry->timerStopFailed = TRUE;
             }
-         }
+         } 
 
          if(csrLLRemoveEntry(&pMac->roam.peStatsReqList, pEntry, LL_ACCESS_LOCK))
          {
@@ -14365,35 +13592,33 @@
          pEntry = csrLLNext( &pMac->roam.peStatsReqList, pEntry, LL_ACCESS_NOLOCK );
       }
    }
-
    return;
 }
 
 
-void csrRoamSaveStatsFromTl(tpAniSirGlobal pMac, WLANTL_TRANSFER_STA_TYPE tlStats)
+void csrRoamSaveStatsFromTl(tpAniSirGlobal pMac, WLANTL_TRANSFER_STA_TYPE *pTlStats)
 {
 
-   pMac->roam.classDStatsInfo.num_rx_bytes_crc_ok = tlStats.rxBcntCRCok;
-   pMac->roam.classDStatsInfo.rx_bc_byte_cnt = tlStats.rxBCBcnt;
-   pMac->roam.classDStatsInfo.rx_bc_frm_cnt = tlStats.rxBCFcnt;
-   pMac->roam.classDStatsInfo.rx_byte_cnt = tlStats.rxBcnt;
-   pMac->roam.classDStatsInfo.rx_mc_byte_cnt = tlStats.rxMCBcnt;
-   pMac->roam.classDStatsInfo.rx_mc_frm_cnt = tlStats.rxMCFcnt;
-   pMac->roam.classDStatsInfo.rx_rate = tlStats.rxRate;
+   pMac->roam.classDStatsInfo.num_rx_bytes_crc_ok = pTlStats->rxBcntCRCok;
+   pMac->roam.classDStatsInfo.rx_bc_byte_cnt = pTlStats->rxBCBcnt;
+   pMac->roam.classDStatsInfo.rx_bc_frm_cnt = pTlStats->rxBCFcnt;
+   pMac->roam.classDStatsInfo.rx_byte_cnt = pTlStats->rxBcnt;
+   pMac->roam.classDStatsInfo.rx_mc_byte_cnt = pTlStats->rxMCBcnt;
+   pMac->roam.classDStatsInfo.rx_mc_frm_cnt = pTlStats->rxMCFcnt;
+   pMac->roam.classDStatsInfo.rx_rate = pTlStats->rxRate;
    //?? need per AC
-   pMac->roam.classDStatsInfo.rx_uc_byte_cnt[0] = tlStats.rxUCBcnt;
-   pMac->roam.classDStatsInfo.rx_uc_frm_cnt = tlStats.rxUCFcnt;
-   pMac->roam.classDStatsInfo.tx_bc_byte_cnt = tlStats.txBCBcnt;
-   pMac->roam.classDStatsInfo.tx_bc_frm_cnt = tlStats.txBCFcnt;
-   pMac->roam.classDStatsInfo.tx_mc_byte_cnt = tlStats.txMCBcnt;
-   pMac->roam.classDStatsInfo.tx_mc_frm_cnt = tlStats.txMCFcnt;
+   pMac->roam.classDStatsInfo.rx_uc_byte_cnt[0] = pTlStats->rxUCBcnt;
+   pMac->roam.classDStatsInfo.rx_uc_frm_cnt = pTlStats->rxUCFcnt;
+   pMac->roam.classDStatsInfo.tx_bc_byte_cnt = pTlStats->txBCBcnt;
+   pMac->roam.classDStatsInfo.tx_bc_frm_cnt = pTlStats->txBCFcnt;
+   pMac->roam.classDStatsInfo.tx_mc_byte_cnt = pTlStats->txMCBcnt;
+   pMac->roam.classDStatsInfo.tx_mc_frm_cnt = pTlStats->txMCFcnt;
    //?? need per AC
-   pMac->roam.classDStatsInfo.tx_uc_byte_cnt[0] = tlStats.txUCBcnt;
-   pMac->roam.classDStatsInfo.tx_uc_frm_cnt = tlStats.txUCFcnt;
+   pMac->roam.classDStatsInfo.tx_uc_byte_cnt[0] = pTlStats->txUCBcnt;
+   pMac->roam.classDStatsInfo.tx_uc_frm_cnt = pTlStats->txUCFcnt;
 
 }
 
-
 void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask, 
                              tCsrStatsCallback callback, tANI_U8 staId, void *pContext)
 {
@@ -14402,7 +13627,6 @@
    tANI_U32 tempMask = 0;
    tANI_U8 counter = 0;
    eHalStatus status = eHAL_STATUS_FAILURE;
-
    if(!callback)
    {
       smsLog(pMac, LOGE, FL("csrRoamReportStatistics:cannot report callback NULL\n"));
@@ -14413,11 +13637,8 @@
       smsLog(pMac, LOGE, FL("csrRoamReportStatistics:cannot report statsMask is 0\n"));
       return;
    }
-
    pStats = stats;
-
    tempMask = statsMask;
-
    while(tempMask)
    {
       if(tempMask & 1)
@@ -14435,7 +13656,6 @@
             }
             pStats += sizeof(tCsrSummaryStatsInfo);
             break;
-
          case eCsrGlobalClassAStats:
             smsLog( pMac, LOG1, FL("csrRoamReportStatistics:ClassA stats\n"));
             status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classAStatsInfo, 
@@ -14445,9 +13665,7 @@
                smsLog( pMac, LOG1, FL("csrRoamReportStatistics:failed to copy ClassA stats\n"));
             }
             pStats += sizeof(tCsrGlobalClassAStatsInfo);
-
             break;
-
          case eCsrGlobalClassBStats:
             smsLog( pMac, LOG1, FL("csrRoamReportStatistics:ClassB stats\n"));
             status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classBStatsInfo, 
@@ -14457,9 +13675,7 @@
                smsLog( pMac, LOG1, FL("csrRoamReportStatistics:failed to copy ClassB stats\n"));
             }
             pStats += sizeof(tCsrGlobalClassBStatsInfo);
-
             break;
-
          case eCsrGlobalClassCStats:
             smsLog( pMac, LOG1, FL("csrRoamReportStatistics:ClassC stats\n"));
             status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classCStatsInfo, 
@@ -14469,9 +13685,7 @@
                smsLog( pMac, LOG1, FL("csrRoamReportStatistics:failed to copy ClassC stats\n"));
             }
             pStats += sizeof(tCsrGlobalClassCStatsInfo);
-
             break;
-
          case eCsrGlobalClassDStats:
             smsLog( pMac, LOG1, FL("csrRoamReportStatistics:ClassD stats\n"));
             status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classDStatsInfo, 
@@ -14481,9 +13695,7 @@
                smsLog( pMac, LOG1, FL("csrRoamReportStatistics:failed to copy ClassD stats\n"));
             }
             pStats += sizeof(tCsrGlobalClassDStatsInfo);
-
             break;
-
          case eCsrPerStaStats:
             smsLog( pMac, LOG1, FL("csrRoamReportStatistics:PerSta stats\n"));
             status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.perStaStatsInfo[staId], 
@@ -14493,26 +13705,18 @@
                smsLog( pMac, LOG1, FL("csrRoamReportStatistics:failed to copy PerSta stats\n"));
             }
             pStats += sizeof(tCsrPerStaStatsInfo);
-
             break;
-
          default:
             smsLog( pMac, LOG1, FL("csrRoamReportStatistics:unknown stats type\n"));
             break;
-
          }
       }
-
       tempMask >>=1;
       counter++;
    }
-
    callback(stats, pContext );
-
 }
 
-
-
 eHalStatus csrRoamDeregStatisticsReq(tpAniSirGlobal pMac)
 {
    tListElem *pEntry = NULL;
@@ -14521,7 +13725,6 @@
    eHalStatus status = eHAL_STATUS_SUCCESS;
    VOS_STATUS vosStatus;
    pEntry = csrLLPeekHead( &pMac->roam.statsClientReqList, LL_ACCESS_LOCK );
-
    if(!pEntry)
    {
       //list empty
@@ -14529,7 +13732,6 @@
              "upper layer client(s)\n");
       return status;
    }
-
    while( pEntry )
    {
       if(pPrevEntry)
@@ -14540,19 +13742,16 @@
                                  pTempStaEntry->staId, pTempStaEntry->pContext);
          csrRoamRemoveStatListEntry(pMac, pPrevEntry);
       }
-
       pTempStaEntry = GET_BASE_ADDR( pEntry, tCsrStatsClientReqInfo, link );
-
       if (pTempStaEntry->pPeStaEntry)  //pPeStaEntry can be NULL
       {
-      pTempStaEntry->pPeStaEntry->numClient--;
-      //check if we need to delete the entry from peStatsReqList too
-      if(!pTempStaEntry->pPeStaEntry->numClient)
-      {
-         csrRoamRemoveEntryFromPeStatsReqList(pMac, pTempStaEntry->pPeStaEntry);
+         pTempStaEntry->pPeStaEntry->numClient--;
+         //check if we need to delete the entry from peStatsReqList too
+         if(!pTempStaEntry->pPeStaEntry->numClient)
+         {
+            csrRoamRemoveEntryFromPeStatsReqList(pMac, pTempStaEntry->pPeStaEntry);
+         }
       }
-      }
-
       //check if we need to stop the tl stats timer too 
       pMac->roam.tlStatsReqInfo.numClient--;
       if(!pMac->roam.tlStatsReqInfo.numClient)
@@ -14569,24 +13768,21 @@
          pMac->roam.tlStatsReqInfo.periodicity = 0;
          pMac->roam.tlStatsReqInfo.timerRunning = FALSE;
       }
-
       if (pTempStaEntry->periodicity)
       {
           //While creating StaEntry in csrGetStatistics,
           //Initializing and starting timer only when periodicity is set. 
           //So Stop and Destroy timer only when periodicity is set.
           
-
-      vos_timer_stop( &pTempStaEntry->timer );
-
-      // Destroy the vos timer...      
-      vosStatus = vos_timer_destroy( &pTempStaEntry->timer );
-      if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
-      {
-         smsLog(pMac, LOGE, FL("csrRoamDeregStatisticsReq:failed to destroy Client req timer\n"));
+          vos_timer_stop( &pTempStaEntry->timer );
+          // Destroy the vos timer...      
+          vosStatus = vos_timer_destroy( &pTempStaEntry->timer );
+          if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
+          {
+              smsLog(pMac, LOGE, FL("csrRoamDeregStatisticsReq:failed to destroy Client req timer\n"));
+          }
       }
-      }
-
+      
       
       pPrevEntry = pEntry;
       pEntry = csrLLNext( &pMac->roam.statsClientReqList, pEntry, LL_ACCESS_NOLOCK );
@@ -14600,12 +13796,10 @@
                                  pTempStaEntry->staId, pTempStaEntry->pContext);
       csrRoamRemoveStatListEntry(pMac, pPrevEntry);
    }
-
    return status;
    
 }
 
-
 eHalStatus csrIsFullPowerNeeded( tpAniSirGlobal pMac, tSmeCmd *pCommand, 
                                    tRequestFullPowerReason *pReason,
                                    tANI_BOOLEAN *pfNeedPower )
@@ -14616,7 +13810,6 @@
     eHalStatus status = eHAL_STATUS_SUCCESS;
         // TODO : Session info unavailable
         tANI_U32 sessionId = 0;
-
     if( pfNeedPower )
     {
         *pfNeedPower = eANI_BOOLEAN_FALSE;
@@ -14626,10 +13819,8 @@
         {
                 return eHAL_STATUS_SUCCESS;
         }
-
     //Check PMC state first
     pmcState = pmcGetPmcState( pMac );
-
     switch( pmcState )
     {
     case REQUEST_IMPS:
@@ -14645,7 +13836,6 @@
                 //Internal process, no need for full power
                 fNeedFullPower = eANI_BOOLEAN_FALSE;
                 break;
-
             default:
                 //Other scans are real scan, ask for power
                 fNeedFullPower = eANI_BOOLEAN_TRUE;
@@ -14658,7 +13848,6 @@
             fNeedFullPower = eANI_BOOLEAN_TRUE;
         }
         break;
-
     case REQUEST_BMPS:
     case BMPS:
     case REQUEST_START_UAPSD:
@@ -14671,7 +13860,6 @@
             tScanResultList *pBSSList = (tScanResultList *)pCommand->u.roamCmd.hBSSList;
             tCsrScanResult *pScanResult;
             tListElem *pEntry;
-
             switch ( pCommand->u.roamCmd.roamReason )
             {
             case eCsrForcedDisassoc:
@@ -14685,11 +13873,9 @@
             case eCsrSmeIssuedReassocToSameAP:
                 fNeedFullPower = eANI_BOOLEAN_TRUE;
                 break;
-
             case eCsrCapsChange:
                 fNeedFullPower = eANI_BOOLEAN_TRUE;
                 break;
-
             default:
                 //Check whether the profile is already connected. If so, no need for full power
                 //Note: IBSS is ignored for now because we don't support powersave in IBSS
@@ -14738,7 +13924,6 @@
             reason = eSME_LINK_DISCONNECTED_BY_OTHER;
         }
         break;
-
     case REQUEST_STOP_UAPSD:
     case REQUEST_EXIT_WOWL:
         if( eSmeCommandRoam == pCommand->command )
@@ -14755,7 +13940,6 @@
             }
                 }
         break;
-
     case STOPPED:
     case REQUEST_STANDBY:
     case STANDBY:
@@ -14764,15 +13948,12 @@
         smsLog( pMac, LOGE, FL( "  cannot process because PMC is in stopped/standby state %d\n" ), pmcState );
         status = eHAL_STATUS_FAILURE;
         break;
-
     case FULL_POWER:
     case REQUEST_FULL_POWER:
     default:
         //No need to ask for full power. This has to be FULL_POWER state
         break;
-
     } //switch
-
     if( pReason )
     {
         *pReason = reason;
@@ -14781,41 +13962,32 @@
     {
         *pfNeedPower = fNeedFullPower;
     }
-
     return ( status );
 }
 
-
 static eHalStatus csrRequestFullPower( tpAniSirGlobal pMac, tSmeCmd *pCommand )
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tANI_BOOLEAN fNeedFullPower = eANI_BOOLEAN_FALSE;
     tRequestFullPowerReason reason = eSME_REASON_OTHER;
-
     status = csrIsFullPowerNeeded( pMac, pCommand, &reason, &fNeedFullPower );
-
     if( fNeedFullPower && HAL_STATUS_SUCCESS( status ) )
     {
         status = pmcRequestFullPower(pMac, csrFullPowerCallback, pMac, reason);
     }
-
     return ( status );
 }
 
-
 tSmeCmd *csrGetCommandBuffer( tpAniSirGlobal pMac )
 {
     tSmeCmd *pCmd = smeGetCommandBuffer( pMac );
-
     if( pCmd )
     {
         pMac->roam.sPendingCommands++;
     }
-
     return ( pCmd );
 }
 
-
 void csrReleaseCommand(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
    if (pMac->roam.sPendingCommands > 0)
@@ -14832,12 +14004,10 @@
    }
 }
 
-
 //Return SUCCESS is the command is queued, failed
 eHalStatus csrQueueSmeCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand, tANI_BOOLEAN fHighPriority )
 {
     eHalStatus status;
-
     if( (eSmeCommandScan == pCommand->command) && pMac->scan.fDropScanCmd )
     {
         smsLog(pMac, LOGW, FL(" drop scan (scan reason %d) command"),
@@ -14851,7 +14021,6 @@
     if( HAL_STATUS_SUCCESS( status ) )
     {
         tANI_BOOLEAN fNoCmdPending;
-
         //make sure roamCmdPendingList is not empty first
         fNoCmdPending = csrLLIsListEmpty( &pMac->roam.roamCmdPendingList, eANI_BOOLEAN_FALSE );
         if( fNoCmdPending )
@@ -14890,11 +14059,8 @@
         //release the command.
         smsLog( pMac, LOGE, FL( "  cannot queue command %d\n" ), pCommand->command );
     }
-
     return ( status );
-
 }
-
 #ifdef WLAN_SOFTAP_FEATURE
 eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs* pAPWPSIES )
 {
@@ -14909,7 +14075,6 @@
         return eHAL_STATUS_FAILURE;
     }
 
-
     do
     {
         status = palAllocateMemory( pMac->hHdd, (void **)&pMsg, sizeof(tSirUpdateAPWPSIEsReq) );
@@ -14919,55 +14084,42 @@
 
         pBuf = (tANI_U8 *)&pMsg->transactionId;
         wTmpBuf = pBuf;
-
         // transactionId
         *pBuf = 0;
         *( pBuf + 1 ) = 0;
         pBuf += sizeof(tANI_U16);
-
         // bssId
         palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, &pSession->selfMacAddr, sizeof(tSirMacAddr) );
         pBuf += sizeof(tSirMacAddr);
-
         //sessionId
         *pBuf++ = (tANI_U8)sessionId;
-
         // APWPSIEs
         palCopyMemory( pMac->hHdd, (tSirAPWPSIEs *)pBuf, pAPWPSIES, sizeof(tSirAPWPSIEs));
         pBuf += sizeof(tSirAPWPSIEs);
-
         pMsg->length = pal_cpu_to_be16((tANI_U16)(sizeof(tANI_U32) + (pBuf - wTmpBuf))); //msg_header + msg
-
         status = palSendMBMessage(pMac->hHdd, pMsg);
-
     } while( 0 );
-
     return ( status );
 }
-
 eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tSirUpdateAPWPARSNIEsReq *pMsg;
     tANI_U8 *pBuf = NULL, *wTmpBuf = NULL;
-
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
     if (NULL == pSession)
     {
         smsLog( pMac, LOGE, FL( "  Session does not exist for session id %d" ), sessionId);
         return eHAL_STATUS_FAILURE;
     }
-
     do
     {
         status = palAllocateMemory( pMac->hHdd, (void **)&pMsg, sizeof(tSirUpdateAPWPARSNIEsReq) );
         if (!HAL_STATUS_SUCCESS(status)) break;
         palZeroMemory( pMac->hHdd, pMsg, sizeof( tSirUpdateAPWPARSNIEsReq ) );
         pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_SET_APWPARSNIEs_REQ);
-
         pBuf = (tANI_U8 *)&pMsg->transactionId;
         wTmpBuf = pBuf;
-
         // transactionId
         *pBuf = 0;
         *( pBuf + 1 ) = 0;
@@ -14976,23 +14128,17 @@
         // bssId
         palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, &pSession->selfMacAddr, sizeof(tSirMacAddr) );
         pBuf += sizeof(tSirMacAddr);
-
         // sessionId
         *pBuf++ = (tANI_U8)sessionId;
     
         // APWPARSNIEs
         palCopyMemory( pMac->hHdd, (tSirRSNie *)pBuf, pAPSirRSNie, sizeof(tSirRSNie));
         pBuf += sizeof(tSirRSNie);
-
         pMsg->length = pal_cpu_to_be16((tANI_U16)(sizeof(tANI_U32 ) + (pBuf - wTmpBuf))); //msg_header + msg
-
     status = palSendMBMessage(pMac->hHdd, pMsg);
-
     } while( 0 );
-
     return ( status );
 }
-
 #endif //#ifdef WLAN_SOFTAP_FEATURE
 
 #ifdef WLAN_FEATURE_VOWIFI_11R
@@ -15003,7 +14149,6 @@
     tpSirFTPreAuthReq pftPreAuthReq;
     tANI_U16 auth_req_len = 0;
     tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
     auth_req_len = sizeof(tSirFTPreAuthReq);
     pftPreAuthReq = (tpSirFTPreAuthReq)vos_mem_malloc(auth_req_len);
     if (pftPreAuthReq == NULL)
@@ -15011,10 +14156,8 @@
         smsLog(pMac, LOGE, FL("Memory allocation for FT Preauth request failed"));
         return eHAL_STATUS_RESOURCES;
     }
-
     // Save the SME Session ID here. We need it while processing the preauth response
     pMac->ft.ftSmeContext.smeSessionId = sessionId;
-
     vos_mem_zero(pftPreAuthReq, auth_req_len);
 
     pftPreAuthReq->pbssDescription = (tpSirBssDescription)vos_mem_malloc(
@@ -15024,12 +14167,9 @@
 
     pftPreAuthReq->preAuthchannelNum = pBssDescription->channelId;
 
-
     palCopyMemory(pMac->hHdd, (void *)&pftPreAuthReq->currbssId, (void *)pSession->connectedProfile.bssid, sizeof(tSirMacAddr));
-
     palCopyMemory(pMac->hHdd, (void *)&pftPreAuthReq->preAuthbssId, (void *)pBssDescription->bssId, sizeof(tSirMacAddr));  
 
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
     if (csrRoamIs11rAssoc(pMac))
     {
@@ -15042,15 +14182,11 @@
     {
         pftPreAuthReq->ft_ies_length = 0; 
     }
-
     vos_mem_copy(pftPreAuthReq->pbssDescription, pBssDescription, pBssDescription->length);
-
     pftPreAuthReq->length = pal_cpu_to_be16(sizeof(tSirFTPreAuthReq) + sizeof(pBssDescription->length) +
                                                     pBssDescription->length); 
-
     return palSendMBMessage(pMac->hHdd, pftPreAuthReq);
 }
-
 /*--------------------------------------------------------------------------
  * This will receive and process the FT Pre Auth Rsp from the current 
  * associated ap. 
@@ -15069,22 +14205,17 @@
 #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
     smsLog( pMac, LOGE, FL("Preauth response status code %d"), pFTPreAuthRsp->status); 
 #endif
-
 #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING    
     csrNeighborRoamPreauthRspHandler(pMac, (VOS_STATUS)pFTPreAuthRsp->status);
 #endif
-
     /* The below function calls/timers should be invoked only if the pre-auth is successful */
     if (VOS_STATUS_SUCCESS != (VOS_STATUS)pFTPreAuthRsp->status)
         return;
-
     // Implies a success
     pMac->ft.ftSmeContext.FTState = eFT_AUTH_COMPLETE;
-
     // Indicate SME QoS module the completion of Preauth success. This will trigger the creation of RIC IEs
     pMac->ft.ftSmeContext.psavedFTPreAuthRsp = pFTPreAuthRsp;
     sme_QosCsrEventInd(pMac, pMac->ft.ftSmeContext.smeSessionId, SME_QOS_CSR_PREAUTH_SUCCESS_IND, NULL);
-
     /* Start the pre-auth reassoc interval timer with a period of 400ms. When this expires, 
      * actual transition from the current to handoff AP is triggered */
     status = palTimerStart(pMac->hHdd, pMac->ft.ftSmeContext.preAuthReassocIntvlTimer,
@@ -15095,7 +14226,6 @@
         smsLog(pMac, LOGE, FL("Preauth reassoc interval timer start failed to start with status %d\n"), status);
         return;
     }
-
     // Save the received response
     palCopyMemory(pMac->hHdd, (void *)&pMac->ft.ftSmeContext.preAuthbssId, (void *)pFTPreAuthRsp->preAuthbssId, sizeof(tCsrBssid));
     if (csrRoamIs11rAssoc(pMac))
@@ -15103,7 +14233,6 @@
                         eCSR_ROAM_FT_RESPONSE, eCSR_ROAM_RESULT_NONE);
 
     // Currently we dont do anything special for CCX connection.
-
 #ifdef FEATURE_WLAN_LFR
     // If Legacy Fast Roaming is enabled, signal the supplicant  
     // So he can send us a PMK-ID for this candidate AP.
@@ -15141,7 +14270,6 @@
         }
     }
 }
-
 eHalStatus csrRoamStartJoinRetryTimer(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 interval)
 {
     eHalStatus status = eHAL_STATUS_FAILURE;
@@ -15167,7 +14295,6 @@
     
     return (status);
 }
-
 eHalStatus csrRoamStopJoinRetryTimer(tpAniSirGlobal pMac, tANI_U32 sessionId)
 {
     smsLog(pMac, LOGE, " csrRoamStopJoinRetryTimer \n ");
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c
index b60c0da..477e635 100644
--- a/CORE/SME/src/csr/csrApiScan.c
+++ b/CORE/SME/src/csr/csrApiScan.c
@@ -102,6 +102,7 @@
 #ifdef WLAN_AP_STA_CONCURRENCY
 static void csrStaApConcTimerHandler(void *);
 #endif
+tANI_BOOLEAN csrIsSupportedChannel(tpAniSirGlobal pMac, tANI_U8 channelId);
 eHalStatus csrScanChannels( tpAniSirGlobal pMac, tSmeCmd *pCommand );
 void csrSetCfgValidChannelList( tpAniSirGlobal pMac, tANI_U8 *pChannelList, tANI_U8 NumChannels );
 void csrSaveTxPowerToCfg( tpAniSirGlobal pMac, tDblLinkList *pList, tANI_U32 cfgId );
@@ -492,6 +493,42 @@
 }
 #endif
 
+/* ---------------------------------------------------------------------------
+    \fn csrScan2GOnyRequest
+    \brief This function will update the scan request with only 
+           2.4GHz valid cahnnel list.
+    \param pMac
+    \param pScanCmd
+    \param pScanRequest
+    \return None
+  -------------------------------------------------------------------------------*/
+static void csrScan2GOnyRequest(tpAniSirGlobal pMac,tSmeCmd *pScanCmd, 
+                                tCsrScanRequest *pScanRequest)
+{
+    tANI_U8 index, channelId, channelListSize = 0;
+    tANI_U8 channelList2G[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
+    static tANI_U8 validchannelList[CSR_MAX_2_4_GHZ_SUPPORTED_CHANNELS] = {0};
+
+    VOS_ASSERT(pScanCmd && pScanRequest);
+
+    if (pScanCmd->u.scanCmd.scanID ||
+       (eCSR_SCAN_REQUEST_FULL_SCAN != pScanRequest->requestType))
+           return;
+
+    //Contsruct valid Supported 2.4 GHz Channel List
+    for( index = 0; index < ARRAY_SIZE(channelList2G); index++ )
+    {
+        channelId = channelList2G[index];
+        if ( csrIsSupportedChannel( pMac, channelId ) )
+        {
+            validchannelList[channelListSize++] = channelId;
+        }
+    }
+
+    pScanRequest->ChannelInfo.numOfChannels = channelListSize;
+    pScanRequest->ChannelInfo.ChannelList = validchannelList;
+}
+
 eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId, 
               tCsrScanRequest *pScanRequest, tANI_U32 *pScanRequestID, 
               csrScanCompleteCallback callback, void *pContext)
@@ -623,6 +660,7 @@
                             scanReq.maxChnTime = pMac->roam.configParam.nActiveMaxChnTime;
                             scanReq.minChnTime = pMac->roam.configParam.nActiveMinChnTime;
                         }
+
                         status = csrScanCopyRequest(pMac, &p11dScanCmd->u.scanCmd.u.scanRequest, &scanReq);
                         //Free the channel list
                         palFreeMemory( pMac->hHdd, pChnInfo->ChannelList );
@@ -652,6 +690,15 @@
                         break;
                     }
                 }
+
+                //Scan only 2G Channels if set in ini file
+                //This is mainly to reduce the First Scan duration
+                //Once we turn on Wifi
+                if(pMac->scan.fFirstScanOnly2GChnl)
+                {
+                    csrScan2GOnyRequest(pMac, pScanCmd, pScanRequest);
+                }
+
                 status = csrScanCopyRequest(pMac, &pScanCmd->u.scanCmd.u.scanRequest, pScanRequest);
                 if(HAL_STATUS_SUCCESS(status))
                 {
@@ -2391,6 +2438,14 @@
             }
         }
 
+        else if( csrIs11hSupported( pMac ) && pIesLocal->Country.present && 
+                 !pMac->roam.configParam.fSupplicantCountryCodeHasPriority )
+        {
+             /* If 11h is supported, store the power information received in the Country IE */
+            csrSaveToChannelPower2G_5G( pMac, pIesLocal->Country.num_triplets * sizeof(tSirMacChanInfo), 
+                                        (tSirMacChanInfo *)(&pIesLocal->Country.triplets[0]) );
+        }
+
         // append to main list
         csrScanAddResult(pMac, pBssDescription, pIesLocal);
         if( (pBssDescription->Result.pvIes == NULL) && pIesLocal )
@@ -2513,7 +2568,7 @@
  * Save the channelList into the ultimate storage as the final stage of channel 
  * Input: pCountryInfo -- the country code (e.g. "USI"), channel list, and power limit are all stored inside this data structure
  */
-void csrSaveToChannelPower2G_5G( tpAniSirGlobal pMac, tANI_U32 tableSize, tSirMacChanInfo *channelTable )
+eHalStatus csrSaveToChannelPower2G_5G( tpAniSirGlobal pMac, tANI_U32 tableSize, tSirMacChanInfo *channelTable )
 {
     tANI_U32 i = tableSize / sizeof( tSirMacChanInfo );
     tSirMacChanInfo *pChannelInfo;
@@ -2534,16 +2589,27 @@
             pChannelSet->numChannels = pChannelInfo->numChannels;
 
             // Now set the inter-channel offset based on the frequency band the channel set lies in
-            if( CSR_IS_CHANNEL_24GHZ(pChannelSet->firstChannel) )
+            if( (CSR_IS_CHANNEL_24GHZ(pChannelSet->firstChannel)) &&
+                    ((pChannelSet->firstChannel + pChannelSet->numChannels) <= CSR_MAX_24GHz_CHANNEL_NUMBER) )
+
             {
                 pChannelSet->interChannelOffset = 1;
                 f2GHzInfoFound = TRUE;
             }
-            else
+            else if ( (CSR_IS_CHANNEL_5GHZ(pChannelSet->firstChannel)) &&
+                ((pChannelSet->firstChannel + (pChannelSet->numChannels * 4)) <= CSR_MAX_5GHz_CHANNEL_NUMBER) )
             {
                 pChannelSet->interChannelOffset = 4;
                 f2GHzInfoFound = FALSE;
             }
+            else
+            {
+                smsLog( pMac, LOGW, FL("Invalid Channel Present in Country IE"),
+                        pChannelSet->firstChannel);
+                palFreeMemory(pMac->hHdd, pChannelSet);
+                return eHAL_STATUS_FAILURE;
+            }
+
             pChannelSet->txPower = CSR_ROAM_MIN( pChannelInfo->maxTxPower, pMac->roam.configParam.nTxPowerCap );
 
             if( f2GHzInfoFound )
@@ -2592,7 +2658,7 @@
         pChannelInfo++;                // move to next entry
     }
 
-    return;
+    return eHAL_STATUS_SUCCESS;
 }
 
 
@@ -3256,8 +3322,13 @@
         smsLog(pMac, LOGE, FL("  %d sets each one is %d\n"), pIesLocal->Country.num_triplets, sizeof(tSirMacChanInfo));
         // save the channel/power information from the Channel IE.
         //sizeof(tSirMacChanInfo) has to be 3
-        csrSaveToChannelPower2G_5G( pMac, pIesLocal->Country.num_triplets * sizeof(tSirMacChanInfo), 
-                                        (tSirMacChanInfo *)(&pIesLocal->Country.triplets[0]) );
+        if (eHAL_STATUS_SUCCESS != csrSaveToChannelPower2G_5G( pMac, pIesLocal->Country.num_triplets * sizeof(tSirMacChanInfo),
+                    (tSirMacChanInfo *)(&pIesLocal->Country.triplets[0]) ))
+        {
+            fRet = eANI_BOOLEAN_FALSE;
+            return fRet;
+        }
+
         // set the indicator of the channel where the country IE was found...
         pMac->scan.channelOf11dInfo = pSirBssDesc->channelId;
         // Populate both band channel lists based on what we found in the country information...
@@ -3305,7 +3376,15 @@
 
     // Now check if we gathered any domain/country specific information
     // If so, we should update channel list and apply Tx power settings
-    csrApplyCountryInformation( pMac, FALSE );
+    if( csrIs11dSupported(pMac) )
+    {
+        csrApplyCountryInformation( pMac, FALSE );
+    }
+    else if( csrIs11hSupported(pMac) && !pMac->roam.configParam.fSupplicantCountryCodeHasPriority) 
+    {
+        // If llh is enabled, store the channel + power information gathered  in the cfg
+        csrApplyPower2Current( pMac );
+    }     
 }
 
 
@@ -3759,19 +3838,41 @@
     tANI_BOOLEAN fMatch = FALSE;
     tSirMacCapabilityInfo *pCap1, *pCap2;
     tDot11fBeaconIEs *pIes1 = NULL;
+    tDot11fBeaconIEs *pIesTemp = pIes2;
 
     pCap1 = (tSirMacCapabilityInfo *)&pSirBssDesc1->capabilityInfo;
     pCap2 = (tSirMacCapabilityInfo *)&pSirBssDesc2->capabilityInfo;
     if(pCap1->ess == pCap2->ess)
     {
         if (pCap1->ess && 
-                csrIsMacAddressEqual( pMac, (tCsrBssid *)pSirBssDesc1->bssId, (tCsrBssid *)pSirBssDesc2->bssId))
+                csrIsMacAddressEqual( pMac, (tCsrBssid *)pSirBssDesc1->bssId, (tCsrBssid *)pSirBssDesc2->bssId)&&
+                (pSirBssDesc1->channelId == pSirBssDesc2->channelId))
         {
             fMatch = TRUE;
+            // Check for SSID match, if exists
+            do
+            {
+                if(!HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(pMac, pSirBssDesc1, &pIes1)))
+                {
+                    break;
+                }
+                if( NULL == pIesTemp )
+                {
+                    if(!HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(pMac, pSirBssDesc2, &pIesTemp)))
+                    {
+                        break;
+                    }
+                }
+                if(pIes1->SSID.present && pIesTemp->SSID.present)
+                {
+                    fMatch = csrIsSsidMatch(pMac, pIes1->SSID.ssid, pIes1->SSID.num_ssid, 
+                                            pIesTemp->SSID.ssid, pIesTemp->SSID.num_ssid, eANI_BOOLEAN_TRUE);
+                } 
+            }while(0);
+
         }
         else if (pCap1->ibss && (pSirBssDesc1->channelId == pSirBssDesc2->channelId))
         {
-            tDot11fBeaconIEs *pIesTemp = pIes2;
 
             do
             {
@@ -3793,11 +3894,6 @@
                                             pIesTemp->SSID.ssid, pIesTemp->SSID.num_ssid, eANI_BOOLEAN_TRUE);
                 }
             }while(0);
-            if( (NULL == pIes2) && pIesTemp )
-            {
-                //locally allocated
-                palFreeMemory(pMac->hHdd, pIesTemp);
-            }
         }
 #if defined WLAN_FEATURE_P2P
         /* In case of P2P devices, ess and ibss will be set to zero */
@@ -3813,6 +3909,12 @@
     {
         palFreeMemory(pMac->hHdd, pIes1);
     }
+    
+    if( (NULL == pIes2) && pIesTemp )
+    {
+        //locally allocated
+        palFreeMemory(pMac->hHdd, pIesTemp);
+    }
 
     return( fMatch );
 }
@@ -3850,6 +3952,12 @@
         case eCSR_DOT11_MODE_11n_ONLY:
             fAllowed = (tANI_BOOLEAN)((eCSR_DOT11_MODE_11n == phyMode) || (eCSR_DOT11_MODE_TAURUS == phyMode));
             break;
+
+#ifdef WLAN_FEATURE_11AC
+         case eCSR_DOT11_MODE_11ac_ONLY:
+             fAllowed = (tANI_BOOLEAN)((eCSR_DOT11_MODE_11ac == phyMode) || (eCSR_DOT11_MODE_TAURUS == phyMode));
+             break;
+#endif
         case eCSR_DOT11_MODE_11b_ONLY:
             fAllowed = (tANI_BOOLEAN)(eCSR_DOT11_MODE_11b == phyMode);
             break;
@@ -3857,6 +3965,9 @@
             fAllowed = (tANI_BOOLEAN)(eCSR_DOT11_MODE_11a == phyMode);
             break;
         case eCSR_DOT11_MODE_11n:
+#ifdef WLAN_FEATURE_11AC
+        case eCSR_DOT11_MODE_11ac:
+#endif
         case eCSR_DOT11_MODE_TAURUS:
         default:
             fAllowed = eANI_BOOLEAN_TRUE;
@@ -4479,6 +4590,7 @@
             }
 #ifdef WLAN_FEATURE_P2P
             pMsg->p2pSearch = pScanReq->p2pSearch;
+            pMsg->skipDfsChnlInP2pSearch = pScanReq->skipDfsChnlInP2pSearch;
 #endif
 
         }while(0);
@@ -4965,6 +5077,7 @@
             }//Allocate memory for SSID List
 #ifdef WLAN_FEATURE_P2P
             pDstReq->p2pSearch = pSrcReq->p2pSearch;
+            pDstReq->skipDfsChnlInP2pSearch = pSrcReq->skipDfsChnlInP2pSearch;
 #endif
 
         }
@@ -5807,7 +5920,7 @@
                 break;
             pScanCmd->u.scanCmd.roamId = roamId;
             pScanCmd->command = eSmeCommandScan;
-            pScanCmd->sessionId = (tANI_U8)sessionId; 
+            pScanCmd->sessionId = (tANI_U8)sessionId;
             pScanCmd->u.scanCmd.callback = NULL;
             pScanCmd->u.scanCmd.pContext = NULL;
             pScanCmd->u.scanCmd.reason = eCsrScanForSsid;
@@ -5817,7 +5930,31 @@
             pScanCmd->u.scanCmd.u.scanRequest.maxChnTime = pMac->roam.configParam.nActiveMaxChnTime;
             pScanCmd->u.scanCmd.u.scanRequest.minChnTime = pMac->roam.configParam.nActiveMinChnTime;
             pScanCmd->u.scanCmd.u.scanRequest.BSSType = pProfile->BSSType;
-            pScanCmd->u.scanCmd.u.scanRequest.uIEFieldLen = 0;
+            // To avoid 11b rate in probe request Set p2pSearch flag as 1 for P2P Client Mode
+            if(VOS_P2P_CLIENT_MODE == pProfile->csrPersona)
+            {
+                pScanCmd->u.scanCmd.u.scanRequest.p2pSearch = 1;
+            }
+            if(pProfile->pAddIEScan)
+            {
+                status = palAllocateMemory(pMac->hHdd,
+                                (void **)&pScanCmd->u.scanCmd.u.scanRequest.pIEField,
+                                pProfile->nAddIEScanLength);
+                palZeroMemory(pMac->hHdd, pScanCmd->u.scanCmd.u.scanRequest.pIEField, pProfile->nAddIEScanLength);
+                if(HAL_STATUS_SUCCESS(status))
+                {
+                    palCopyMemory(pMac->hHdd, pScanCmd->u.scanCmd.u.scanRequest.pIEField, pProfile->pAddIEScan, pProfile->nAddIEScanLength);
+                    pScanCmd->u.scanCmd.u.scanRequest.uIEFieldLen = pProfile->nAddIEScanLength;
+                }
+                else
+                {
+                    smsLog(pMac, LOGE, "No memory for scanning IE fields\n");
+                }
+            } //Allocate memory for IE field
+            else
+            {
+                pScanCmd->u.scanCmd.u.scanRequest.uIEFieldLen = 0;
+            }
             if(pProfile->BSSIDs.numOfBSSIDs == 1)
             {
                 palCopyMemory(pMac->hHdd, pScanCmd->u.scanCmd.u.scanRequest.bssid, pProfile->BSSIDs.bssid, sizeof(tCsrBssid));
@@ -6480,3 +6617,4 @@
 
 
 
+
diff --git a/CORE/SME/src/csr/csrInsideApi.h b/CORE/SME/src/csr/csrInsideApi.h
index b4e3437..90d6b22 100644
--- a/CORE/SME/src/csr/csrInsideApi.h
+++ b/CORE/SME/src/csr/csrInsideApi.h
@@ -51,6 +51,8 @@
 
 #define CSR_MAX_NUM_SUPPORTED_CHANNELS 55
 
+#define CSR_MAX_2_4_GHZ_SUPPORTED_CHANNELS 14
+
 #define CSR_MAX_BSS_SUPPORT            100
 
 //This number minus 1 means the number of times a channel is scanned before a BSS is remvoed from
@@ -76,7 +78,7 @@
 #define CSR_SCAN_AGING_TIME_CONNECT_NO_PS 150        //150 seconds
 #define CSR_SCAN_AGING_TIME_CONNECT_W_PS 600         //600 seconds
 #define CSR_JOIN_FAILURE_TIMEOUT_DEFAULT ( 3000 )
-#define CSR_JOIN_FAILURE_TIMEOUT_MIN   (300)  //minimal value
+#define CSR_JOIN_FAILURE_TIMEOUT_MIN   (1000)  //minimal value
 //These are going against the signed RSSI (tANI_S8) so it is between -+127
 #define CSR_BEST_RSSI_VALUE         (-30)   //RSSI >= this is in CAT4
 #define CSR_DEFAULT_RSSI_DB_GAP     30 //every 30 dbm for one category
@@ -126,6 +128,7 @@
     eCsrSilentlyStopRoaming,
     eCsrSilentlyStopRoamingSaveState,
     eCsrJoinWdsFailure,
+    eCsrJoinFailureDueToConcurrency,
     
 }eCsrRoamCompleteResult;
 
@@ -351,6 +354,7 @@
 tANI_U32 csrTranslateToWNICfgDot11Mode(tpAniSirGlobal pMac, eCsrCfgDot11Mode csrDot11Mode);
 void csrSaveChannelPowerForBand( tpAniSirGlobal pMac, tANI_BOOLEAN fPopulate5GBand );
 void csrApplyChannelPowerCountryInfo( tpAniSirGlobal pMac, tCsrChannel *pChannelList, tANI_U8 *countryCode);
+void csrApplyPower2Current( tpAniSirGlobal pMac );
 void csrAssignRssiForCategory(tpAniSirGlobal pMac, tANI_U8 catOffset);
 tANI_BOOLEAN csrIsMacAddressZero( tpAniSirGlobal pMac, tCsrBssid *pMacAddr );
 tANI_BOOLEAN csrIsMacAddressBroadcast( tpAniSirGlobal pMac, tCsrBssid *pMacAddr );
@@ -366,7 +370,7 @@
 #ifdef FEATURE_WLAN_WAPI
 void csrResetBKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId );
 #endif /* FEATURE_WLAN_WAPI */
-void csrSaveToChannelPower2G_5G( tpAniSirGlobal pMac, tANI_U32 tableSize, tSirMacChanInfo *channelTable );
+eHalStatus csrSaveToChannelPower2G_5G( tpAniSirGlobal pMac, tANI_U32 tableSize, tSirMacChanInfo *channelTable );
 //Get the list of the base channels to scan for passively 11d info
 eHalStatus csrScanGetSupportedChannels( tpAniSirGlobal pMac );
 //To check whether a country code matches the one in the IE
diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c
index c1d710e..e2919d1 100644
--- a/CORE/SME/src/csr/csrNeighborRoam.c
+++ b/CORE/SME/src/csr/csrNeighborRoam.c
@@ -375,7 +375,15 @@
 
     /* Abort any ongoing BG scans */
     if (eANI_BOOLEAN_TRUE == pNeighborRoamInfo->scanRspPending)
+    {
+        if( pMac->roam.neighborRoamInfo.neighborRoamState != eCSR_NEIGHBOR_ROAM_STATE_CONNECTED)
+        {
+            smsLog(pMac, LOGE, FL("Connected during scan state and we didn't"
+                                    "transition to state"));
+            VOS_ASSERT(0);
+        }
         csrScanAbortMacScan(pMac);
+    }
 
     pNeighborRoamInfo->scanRspPending = eANI_BOOLEAN_FALSE;
     
@@ -1133,11 +1141,13 @@
     vos_mem_zero(&pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo, sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT);
 #endif
 
+    /* Transition to CONNECTED state */
+    CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED)
+
     /* Reset all the necessary variables before transitioning to the CONNECTED state */
     csrNeighborRoamResetConnectedStateControlInfo(pMac);
 
-    /* Transition to CONNECTED state */
-    CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED)
+   
     /* Re-register Neighbor Lookup threshold callback with TL */
     NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Registering DOWN event neighbor lookup callback with TL for RSSI = %d"), pNeighborRoamInfo->currentNeighborLookupThreshold * (-1)); 
     vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext, (v_S7_t)pNeighborRoamInfo->currentNeighborLookupThreshold * (-1),
@@ -1722,25 +1732,11 @@
         {
             if (pNeighborBssDesc->pNeighborBssDescription->channel)
             {
-                // Make sure to add only if its the same band
-                if ((pNeighborRoamInfo->currAPoperationChannel <= (RF_CHAN_14+1)) &&
-                    (pNeighborBssDesc->pNeighborBssDescription->channel <= (RF_CHAN_14+1)))
-                {
                         VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, 
                                 "%s: [INFOLOG] Adding %d to Neighbor channel list\n", __func__,
                                 pNeighborBssDesc->pNeighborBssDescription->channel);
                         channelList[numChannels] = pNeighborBssDesc->pNeighborBssDescription->channel;
                         numChannels++;
-                }
-                else if ((pNeighborRoamInfo->currAPoperationChannel >= RF_CHAN_128) &&
-                    (pNeighborBssDesc->pNeighborBssDescription->channel >= RF_CHAN_128))
-                {
-                        VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, 
-                                "%s: [INFOLOG] Adding %d to Neighbor channel list\n", __func__,
-                                pNeighborBssDesc->pNeighborBssDescription->channel);
-                        channelList[numChannels] = pNeighborBssDesc->pNeighborBssDescription->channel;
-                        numChannels++;
-                }
             }
         }
             
@@ -1762,27 +1758,12 @@
             {
                 if (pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[i])
                 {
-                    // Make sure to add only if its the same band
-                    if ((pNeighborRoamInfo->currAPoperationChannel <= (RF_CHAN_14+1)) &&
-                        (pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[i] <= (RF_CHAN_14+1)))
-                    {
                             VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, 
                                     "%s: [INFOLOG] Adding extra %d to Neighbor channel list\n", __func__,
                             pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[i]);
                             channelList[numChannels] = 
                             pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[i];
                             numChannels++;
-                    }
-                    if ((pNeighborRoamInfo->currAPoperationChannel >= RF_CHAN_128) &&
-                         (pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[i] >= RF_CHAN_128))
-                    {
-                            VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, 
-                                    "%s: [INFOLOG] Adding extra %d to Neighbor channel list\n", __func__,
-                                pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[i]);
-                            channelList[numChannels] = 
-                                pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[i];
-                            numChannels++;
-                    }
                 }
             }
         }
@@ -1961,25 +1942,11 @@
         {
             if (pNeighborRoamInfo->cfgParams.channelInfo.ChannelList[i])
             {
-                // Make sure to add only if its the same band
-                if ((pNeighborRoamInfo->currAPoperationChannel <= (RF_CHAN_14+1)) &&
-                    (pNeighborRoamInfo->cfgParams.channelInfo.ChannelList[i] <= (RF_CHAN_14+1)))
-                {
                         VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, 
                                 "%s: [INFOLOG] Adding %d to Neighbor channel list\n", __func__,
                                 pNeighborRoamInfo->cfgParams.channelInfo.ChannelList[i]);
                         channelList[numOfChannels] = pNeighborRoamInfo->cfgParams.channelInfo.ChannelList[i];
                         numOfChannels++;
-                }
-                if ((pNeighborRoamInfo->currAPoperationChannel >= RF_CHAN_128) &&
-                    (pNeighborRoamInfo->cfgParams.channelInfo.ChannelList[i] >= RF_CHAN_128))
-                {
-                        VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, 
-                                "%s: [INFOLOG] Adding %d to Neighbor channel list\n", __func__,
-                                pNeighborRoamInfo->cfgParams.channelInfo.ChannelList[i]);
-                        channelList[numOfChannels] = pNeighborRoamInfo->cfgParams.channelInfo.ChannelList[i];
-                        numOfChannels++;
-                }
             }
         }
 
@@ -2096,12 +2063,13 @@
 
     pNeighborRoamInfo->currentNeighborLookupThreshold = pNeighborRoamInfo->cfgParams.neighborLookupThreshold;
     
-    /* Reset all the neighbor roam info control variables. Free all the allocated memory. It is like we are just associated now */
-    csrNeighborRoamResetConnectedStateControlInfo(pMac);
-
     /* Recheck whether the below check is needed. */
     if (pNeighborRoamInfo->neighborRoamState != eCSR_NEIGHBOR_ROAM_STATE_CONNECTED)
         CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED)
+
+    /* Reset all the neighbor roam info control variables. Free all the allocated memory. It is like we are just associated now */
+    csrNeighborRoamResetConnectedStateControlInfo(pMac);
+
     
     NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Registering DOWN event neighbor lookup callback with TL. RSSI = %d,"), pNeighborRoamInfo->currentNeighborLookupThreshold * (-1));
     /* Register Neighbor Lookup threshold callback with TL for DOWN event now */
diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c
index 37f3780..079becc 100644
--- a/CORE/SME/src/csr/csrUtil.c
+++ b/CORE/SME/src/csr/csrUtil.c
@@ -44,6 +44,8 @@
 #include "csrInsideApi.h"
 #include "smsDebug.h"
 #include "smeQosInternal.h"
+#include "wlan_qct_wda.h"
+
 #ifdef FEATURE_WLAN_CCX
 #include "vos_utils.h"
 #include "csrCcx.h"
@@ -1166,7 +1168,6 @@
 
 extern const tRfChannelProps rfChannels[NUM_RF_CHANNELS];
 
-
 ////////////////////////////////////////////////////////////////////////
 
 /**
@@ -1374,6 +1375,19 @@
         csrIsConnStateDisconnectedWds( pMac, sessionId ) );
 }
 
+tANI_BOOLEAN csrIsConnStateAp( tpAniSirGlobal pMac,  tANI_U32 sessionId )
+{
+    tCsrRoamSession *pSession;
+    pSession = CSR_GET_SESSION(pMac, sessionId);
+    if (!pSession)
+        return eANI_BOOLEAN_FALSE;
+    if ( CSR_IS_INFRA_AP(&pSession->connectedProfile) )
+    {
+        return eANI_BOOLEAN_TRUE;
+    }
+    return eANI_BOOLEAN_FALSE;
+}
+
 tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac )
 {
     tANI_U32 i;
@@ -1381,8 +1395,10 @@
 
     for( i = 0; i < CSR_ROAM_SESSION_MAX; i++ )
     {
-        if( CSR_IS_SESSION_VALID( pMac, i ) && 
-            ( csrIsConnStateInfra( pMac, i ) || csrIsConnStateIbss( pMac, i ) ) )
+        if( CSR_IS_SESSION_VALID( pMac, i ) &&
+            ( csrIsConnStateInfra( pMac, i )
+            || csrIsConnStateIbss( pMac, i )
+            || csrIsConnStateAp( pMac, i) ) )
         {
             fRc = eANI_BOOLEAN_TRUE;
             break;
@@ -1550,6 +1566,56 @@
     return ( fRc );
 }
 
+tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac )
+{
+    tANI_U32 sessionId, noOfCocurrentSession = 0;
+    eCsrConnectState connectState;
+
+    tANI_BOOLEAN fRc = eANI_BOOLEAN_FALSE;
+
+    for( sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++ )
+    {
+        if( CSR_IS_SESSION_VALID( pMac, sessionId ) )
+        {
+           connectState =  pMac->roam.roamSession[sessionId].connectState;
+           if( (eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED == connectState) ||
+               (eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED == connectState) ||
+               (eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED == connectState) )
+           {
+              ++noOfCocurrentSession;
+           }
+        }
+    }
+
+    // More than one session is Up and Running
+    if(noOfCocurrentSession > 1)
+    {
+        fRc = eANI_BOOLEAN_TRUE;
+    }
+
+    return ( fRc );
+}
+
+#ifndef BMPS_WORKAROUND_NOT_NEEDED
+tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac )
+{
+    tANI_U32 sessionId;
+    tANI_BOOLEAN fRc = eANI_BOOLEAN_FALSE;
+
+    for( sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++ )
+    {
+        if( CSR_IS_SESSION_VALID( pMac, sessionId ) && (csrIsConnStateConnectedInfraAp(pMac, sessionId)) )
+        {
+            fRc = eANI_BOOLEAN_TRUE;
+            break;
+        }
+    }
+
+    return ( fRc );
+
+}
+#endif
+
 tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId )
 {
     return ( csrIsConnStateConnectedWds( pMac, sessionId ) );
@@ -1561,23 +1627,24 @@
     return (eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED == pMac->roam.roamSession[sessionId].connectState);
 }
 
-tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId)
+tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
+                                                  tSirBssDescription *pBssDesc)
 {
     tCsrRoamSession *pSession = NULL;
     tANI_U8 Index = 0, ConnId = 0;
+    eAniBoolean status = eANI_BOOLEAN_FALSE;
+
     tVOS_CON_MODE Mode[CSR_ROAM_SESSION_MAX];
 
     //Check for MCC support
     if (!pMac->roam.configParam.fenableMCCMode)
     {
-        return eANI_BOOLEAN_FALSE;
+        return status;
     }
 
-    for( Index = 0; Index < CSR_ROAM_SESSION_MAX; Index++ ) 
-        Mode[Index] = VOS_MAX_NO_OF_MODE;
- 
     for( Index = 0; Index < CSR_ROAM_SESSION_MAX; Index++ )
     {
+        Mode[Index] = VOS_MAX_NO_OF_MODE;
         if( CSR_IS_SESSION_VALID( pMac, Index ) )
         {
             pSession = CSR_GET_SESSION( pMac, Index );
@@ -1596,7 +1663,8 @@
         switch (Mode[Index+1])
         {
             case VOS_P2P_CLIENT_MODE :
-              return eANI_BOOLEAN_TRUE;
+                status = eANI_BOOLEAN_TRUE;
+                break;
             case VOS_MAX_NO_OF_MODE :
             default :
                  break;
@@ -1607,14 +1675,44 @@
         switch (Mode[Index +1])
         {
             case VOS_STA_MODE :
-                return eANI_BOOLEAN_TRUE;
+                status = eANI_BOOLEAN_TRUE;
+                break;
+
             case VOS_MAX_NO_OF_MODE :
             default :
                 break;
          }
     }
 
-    return eANI_BOOLEAN_FALSE;
+    //Validate BeaconInterval
+    if( CSR_IS_SESSION_VALID( pMac, sessionId ) )
+    {
+        pSession = CSR_GET_SESSION( pMac, sessionId );
+        if (NULL != pSession->pCurRoamProfile)
+        {
+            if(csrIsconcurrentsessionValid (pMac, sessionId, 
+                                       pSession->pCurRoamProfile->csrPersona) 
+                                       == eHAL_STATUS_SUCCESS )
+            {
+                if(csrValidateBeaconInterval( pMac, pBssDesc->channelId, 
+                               &pBssDesc->beaconInterval, sessionId, 
+                               pSession->pCurRoamProfile->csrPersona) 
+                               != eHAL_STATUS_SUCCESS)
+                {
+                    status = eANI_BOOLEAN_FALSE;
+                }
+                else
+                {
+                    status = eANI_BOOLEAN_TRUE;
+                }
+            }
+            else
+            {
+                status = eANI_BOOLEAN_FALSE;
+            }
+         }
+     }
+    return status;
 }
 
 static tSirMacCapabilityInfo csrGetBssCapabilities( tSirBssDescription *pSirBssDesc )
@@ -1985,11 +2083,18 @@
             break;
 
         case eSIR_11N_NW_TYPE:
-        default:
             phyMode = eCSR_DOT11_MODE_11n;
             break;
+#ifdef WLAN_FEATURE_11AC
+        case eSIR_11AC_NW_TYPE:
+        default:
+            phyMode = eCSR_DOT11_MODE_11ac;
+#else
+        default:
+            phyMode = eCSR_DOT11_MODE_11n;
+#endif
+            break;
     }
-
     return( phyMode );
 }
 
@@ -2041,6 +2146,15 @@
        ret = WNI_CFG_DOT11_MODE_11N_ONLY;
        break;
 #endif
+
+#ifdef WLAN_FEATURE_11AC
+     case eCSR_CFG_DOT11_MODE_11AC_ONLY:
+        ret = WNI_CFG_DOT11_MODE_11AC_ONLY;
+        break;
+     case eCSR_CFG_DOT11_MODE_11AC:
+        ret = WNI_CFG_DOT11_MODE_11AC;
+       break;
+#endif
     default:
         smsLog(pMac, LOGW, FL("doesn't expect %d as csrDo11Mode\n"), csrDot11Mode);
         if(eCSR_BAND_24 == pMac->roam.configParam.eBand)
@@ -2081,6 +2195,13 @@
         {
             phyMode = eCSR_DOT11_MODE_11n;
         }
+
+#ifdef WLAN_FEATURE_11AC
+        if ( pIes->VHTCaps.present && (eCSR_DOT11_MODE_TAURUS != phyMode))
+        {
+             phyMode = eCSR_DOT11_MODE_11ac;
+        }
+#endif
         *pPhyMode = phyMode;
     }
 
@@ -2190,9 +2311,19 @@
                 cfgDot11Mode = eCSR_CFG_DOT11_MODE_11A;
                 break;
             case eCSR_DOT11_MODE_11n:
+#ifdef WLAN_FEATURE_11AC
+            case eCSR_DOT11_MODE_11ac:
+#endif
+                cfgDot11Mode = eCSR_CFG_DOT11_MODE_11N;
+                break;
+
             case eCSR_DOT11_MODE_TAURUS:
             default:
+#ifdef WLAN_FEATURE_11AC
+                cfgDot11Mode = eCSR_CFG_DOT11_MODE_11AC;
+#else
                 cfgDot11Mode = eCSR_CFG_DOT11_MODE_11N;
+#endif
                 break;
             }
             break;
@@ -2202,9 +2333,44 @@
             {
                 fMatch = TRUE;
                 cfgDot11Mode = eCSR_CFG_DOT11_MODE_11N;
+
+            }
+
+            break;
+#ifdef WLAN_FEATURE_11AC
+        case eCSR_DOT11_MODE_11ac:
+            fMatch = TRUE;
+            switch(bssPhyMode)
+            {
+            case eCSR_DOT11_MODE_11g:
+                cfgDot11Mode = eCSR_CFG_DOT11_MODE_11G;
+                break;
+            case eCSR_DOT11_MODE_11b:
+                cfgDot11Mode = eCSR_CFG_DOT11_MODE_11B;
+                break;
+            case eCSR_DOT11_MODE_11a:
+                cfgDot11Mode = eCSR_CFG_DOT11_MODE_11A;
+                break;
+            case eCSR_DOT11_MODE_11n:
+                cfgDot11Mode = eCSR_CFG_DOT11_MODE_11N;
+                break;
+            case eCSR_DOT11_MODE_11ac:
+            case eCSR_DOT11_MODE_TAURUS:
+            default:
+                cfgDot11Mode = eCSR_CFG_DOT11_MODE_11AC;
+                break;
             }
             break;
 
+        case eCSR_DOT11_MODE_11ac_ONLY:
+            if((eCSR_DOT11_MODE_11ac == bssPhyMode) || (eCSR_DOT11_MODE_TAURUS == bssPhyMode))
+            {
+                fMatch = TRUE;
+                cfgDot11Mode = eCSR_CFG_DOT11_MODE_11AC;
+            }
+            break;
+#endif
+
         case eCSR_DOT11_MODE_TAURUS:
         default:
             fMatch = TRUE;
@@ -2222,20 +2388,32 @@
             case eCSR_DOT11_MODE_11n:
                 cfgDot11Mode = eCSR_CFG_DOT11_MODE_11N;
                 break;
+#ifdef WLAN_FEATURE_11AC
+            case eCSR_DOT11_MODE_11ac:
+                cfgDot11Mode = eCSR_CFG_DOT11_MODE_11AC;
+                break;
+#endif
             case eCSR_DOT11_MODE_TAURUS:
             default:
                 cfgDot11Mode = eCSR_CFG_DOT11_MODE_TAURUS;
                 break;
             }
             break;
-
     }
 
     if ( fMatch && pCfgDot11ModeToUse )
     {
-        *pCfgDot11ModeToUse = cfgDot11Mode;
+#ifdef WLAN_FEATURE_11AC
+        if(cfgDot11Mode == eCSR_CFG_DOT11_MODE_11AC && !WDA_getFwWlanFeatCaps(DOT11AC))
+        {
+            *pCfgDot11ModeToUse = eCSR_CFG_DOT11_MODE_11N;
+        }
+        else
+#endif
+        {
+            *pCfgDot11ModeToUse = cfgDot11Mode;
+        }
     }
-
     return( fMatch );
 }
 
@@ -2270,7 +2448,13 @@
                 }
                 else
                 {
+
+#ifdef WLAN_FEATURE_11AC
+                    phyMode = eCSR_DOT11_MODE_11ac;
+#else
                     phyMode = eCSR_DOT11_MODE_11n;
+#endif
+
                 }
             }
             else
@@ -2324,6 +2508,9 @@
                  */
                 if( (!CSR_IS_11n_ALLOWED( pProfile->negotiatedUCEncryptionType )) &&
                     ((eCSR_CFG_DOT11_MODE_11N == cfgDot11ModeToUse) ||
+#ifdef WLAN_FEATURE_11AC
+                     (eCSR_CFG_DOT11_MODE_11AC == cfgDot11ModeToUse) ||
+#endif
                      (eCSR_CFG_DOT11_MODE_TAURUS == cfgDot11ModeToUse)) )
                 {
                     //We cannot do 11n here
@@ -2350,6 +2537,16 @@
     eCsrCfgDot11Mode cfgDot11ModeToUse;
     eCsrBand eBand = pMac->roam.configParam.eBand;
 
+
+#ifdef WLAN_FEATURE_11AC
+    if ( (0 == phyMode) || (eCSR_DOT11_MODE_AUTO & phyMode) || (eCSR_DOT11_MODE_TAURUS & phyMode)
+       ||(eCSR_DOT11_MODE_11ac & phyMode))
+    {
+        cfgDot11ModeToUse = eCSR_CFG_DOT11_MODE_11AC;
+    }
+    else
+#endif
+
     if ( (0 == phyMode) || (eCSR_DOT11_MODE_AUTO & phyMode) || (eCSR_DOT11_MODE_TAURUS & phyMode))
     {
         cfgDot11ModeToUse = eCSR_CFG_DOT11_MODE_11N;
@@ -2490,6 +2687,214 @@
     return( fRSNProfile );
 }
 
+eHalStatus
+csrIsconcurrentsessionValid(tpAniSirGlobal pMac,tANI_U32 cursessionId,
+                                 tVOS_CON_MODE currBssPersona)
+{
+    tANI_U32 sessionId = 0;
+
+    for (sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++ )
+    {
+        if (cursessionId != sessionId )
+        {
+            if (!CSR_IS_SESSION_VALID( pMac, sessionId ))
+            {
+                continue;
+            }
+
+            switch (currBssPersona)
+            {
+                case VOS_STA_MODE:
+                    if(pMac->roam.roamSession[sessionId].pCurRoamProfile &&
+                      (pMac->roam.roamSession[sessionId].pCurRoamProfile->csrPersona 
+                                      == VOS_STA_MODE)) //check for P2P client mode
+                    {
+                        smsLog(pMac, LOGE, FL(" ****STA mode already exists ****\n"));
+                        return eHAL_STATUS_FAILURE;
+                    }
+                    break;
+
+                case VOS_STA_SAP_MODE:
+                    if(pMac->roam.roamSession[sessionId].bssParams.bssPersona
+                                      == VOS_STA_SAP_MODE)
+                    {
+                        smsLog(pMac, LOGE, FL(" ****SoftAP mode already exists ****\n"));
+                        return eHAL_STATUS_FAILURE;
+                    }
+                    
+                    else if(pMac->roam.roamSession[sessionId].bssParams.bssPersona
+                                      == VOS_P2P_GO_MODE)
+                    {
+                        smsLog(pMac, LOGE, FL(" ****Cannot start Multiple Beaconing Role ****\n"));
+                        return eHAL_STATUS_FAILURE;
+                    }
+                    break;
+
+                case VOS_P2P_CLIENT_MODE:
+                    if(pMac->roam.roamSession[sessionId].pCurRoamProfile &&
+                      (pMac->roam.roamSession[sessionId].pCurRoamProfile->csrPersona 
+                                                  == VOS_P2P_CLIENT_MODE)) //check for P2P client mode
+                    {
+                        smsLog(pMac, LOGE, FL(" ****CLIENT mode already exists ****\n"));
+                        return eHAL_STATUS_FAILURE;
+                    }
+                    break;
+
+                case VOS_P2P_GO_MODE:
+                    if(pMac->roam.roamSession[sessionId].bssParams.bssPersona
+                                      == VOS_P2P_GO_MODE)
+                    {
+                        smsLog(pMac, LOGE, FL(" ****P2P GO mode already exists ****\n"));
+                        return eHAL_STATUS_FAILURE;
+                    }
+                    else if(pMac->roam.roamSession[sessionId].bssParams.bssPersona
+                                      == VOS_STA_SAP_MODE)
+                    {
+                        smsLog(pMac, LOGE, FL(" ****Cannot start Multiple Beaconing Role ****\n"));
+                        return eHAL_STATUS_FAILURE;
+                    }
+                    break;
+
+                default :
+                    smsLog(pMac, LOGE, FL("***Persona not handled = %d*****\n"),currBssPersona);
+                    break;
+            }
+        }
+    }
+    return eHAL_STATUS_SUCCESS;
+
+}
+
+eHalStatus csrValidateBeaconInterval(tpAniSirGlobal pMac, tANI_U8 channelId, 
+                                     tANI_U16 *beaconInterval, tANI_U32 cursessionId,
+                                     tVOS_CON_MODE currBssPersona)
+{
+    tANI_U32 sessionId = 0;
+
+    //If MCC is not supported just break and return SUCCESS
+    if ( !IS_MCC_SUPPORTED && !pMac->roam.configParam.fenableMCCMode){
+        return eHAL_STATUS_FAILURE;
+    }
+
+    for (sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++ )
+    {
+        if (cursessionId != sessionId )
+        {
+            if (!CSR_IS_SESSION_VALID( pMac, sessionId ))
+            {
+                continue;
+            }
+
+            switch (currBssPersona)
+            {
+                case VOS_STA_MODE:
+                    if(pMac->roam.roamSession[sessionId].pCurRoamProfile &&
+                      (pMac->roam.roamSession[sessionId].pCurRoamProfile->csrPersona 
+                                      == VOS_P2P_CLIENT_MODE)) //check for P2P client mode
+                    {
+                        smsLog(pMac, LOG1, FL(" Beacon Interval Validation not required for STA/CLIENT\n"));
+                    }
+                    //IF SAP has started and STA wants to connect on different channel MCC should
+                    //MCC should not be enabled so making it false to enforce on same channel
+                    else if (pMac->roam.roamSession[sessionId].bssParams.bssPersona
+                                      == VOS_STA_SAP_MODE)
+                    {
+                        if (pMac->roam.roamSession[sessionId].bssParams.operationChn 
+                                                        != channelId )
+                        {
+                            smsLog(pMac, LOGE, FL("***MCC is not enabled for SAP +STA****\n"));
+                            return eHAL_STATUS_FAILURE;
+                        }
+                    }
+                    else if(pMac->roam.roamSession[sessionId].bssParams.bssPersona
+                                      == VOS_P2P_GO_MODE) //Check for P2P go scenario
+                    {
+                        if ((pMac->roam.roamSession[sessionId].bssParams.operationChn 
+                                != channelId ) &&
+                            (pMac->roam.roamSession[sessionId].bssParams.beaconInterval 
+                                != *beaconInterval))
+                        {
+                            smsLog(pMac, LOGE, FL("BeaconInteval is different cannot connect to prefered AP...\n"));
+                            return eHAL_STATUS_FAILURE;
+                        }
+                    }
+                    break;
+
+                case VOS_P2P_CLIENT_MODE:
+                    if(pMac->roam.roamSession[sessionId].pCurRoamProfile &&
+                      (pMac->roam.roamSession[sessionId].pCurRoamProfile->csrPersona 
+                                                                == VOS_STA_MODE)) //check for P2P client mode
+                    {
+                        smsLog(pMac, LOG1, FL(" Ignore Beacon Interval Validation...\n"));
+                    }
+                    //IF SAP has started and STA wants to connect on different channel MCC should
+                    //MCC should not be enabled so making it false to enforce on same channel
+                    else if (pMac->roam.roamSession[sessionId].bssParams.bssPersona
+                                      == VOS_STA_SAP_MODE)
+                    {
+                        if (pMac->roam.roamSession[sessionId].bssParams.operationChn 
+                                                        != channelId )
+                        {
+                            smsLog(pMac, LOGE, FL("***MCC is not enabled for SAP + CLIENT****\n"));
+                            return eHAL_STATUS_FAILURE;
+                        }
+                    }
+                    else if(pMac->roam.roamSession[sessionId].bssParams.bssPersona
+                                    == VOS_P2P_GO_MODE) //Check for P2P go scenario
+                    {
+                        if ((pMac->roam.roamSession[sessionId].bssParams.operationChn 
+                                != channelId ) &&
+                            (pMac->roam.roamSession[sessionId].bssParams.beaconInterval 
+                                != *beaconInterval))
+                        {
+                            smsLog(pMac, LOGE, FL("BeaconInteval is different cannot connect to P2P_GO network ...\n"));
+                            return eHAL_STATUS_FAILURE;
+                        }
+                    }
+                    break;
+
+                case VOS_P2P_GO_MODE :
+                    if(pMac->roam.roamSession[sessionId].pCurRoamProfile  && 
+                      ((pMac->roam.roamSession[sessionId].pCurRoamProfile->csrPersona 
+                            == VOS_P2P_CLIENT_MODE)
+                     || (pMac->roam.roamSession[sessionId].pCurRoamProfile->csrPersona 
+                            == VOS_STA_MODE))) //check for P2P_client scenario
+                    {
+                        if ((pMac->roam.roamSession[sessionId].connectedProfile.operationChannel 
+                               == 0 )&&
+                           (pMac->roam.roamSession[sessionId].connectedProfile.beaconInterval
+                               == 0))
+                        {
+                            continue;
+                        }
+
+                            
+                        if (csrIsConnStateConnectedInfra(pMac, sessionId) &&
+                           (pMac->roam.roamSession[sessionId].connectedProfile.operationChannel 
+                                != channelId ) &&
+                           (pMac->roam.roamSession[sessionId].connectedProfile.beaconInterval 
+                                != *beaconInterval))
+                        {
+                            /*
+                             * Updated beaconInterval should be used only when we are starting a new BSS 
+                             * not incase of client or STA case
+                             */
+                            *beaconInterval = 
+                                pMac->roam.roamSession[sessionId].connectedProfile.beaconInterval;
+                            return eHAL_STATUS_SUCCESS;
+                         }
+                    }
+                    break;
+
+                default :
+                    smsLog(pMac, LOG1, FL(" Persona not supported : %d\n"),currBssPersona);
+                    return eHAL_STATUS_FAILURE;
+            }
+        }
+    }
+
+    return eHAL_STATUS_SUCCESS;
+}
 
 #ifdef WLAN_FEATURE_VOWIFI_11R
 /* Function to return TRUE if the authtype is 11r */
@@ -5361,6 +5766,22 @@
     case eCSR_DOT11_MODE_AUTO:
         cfgDot11Mode = eCSR_CFG_DOT11_MODE_AUTO;
         break;
+
+#ifdef WLAN_FEATURE_11AC
+    case eCSR_DOT11_MODE_11ac:
+	if (!WDA_getFwWlanFeatCaps(DOT11AC))
+	{
+		cfgDot11Mode = eCSR_CFG_DOT11_MODE_11N;
+	}
+	else
+	{
+		cfgDot11Mode = eCSR_CFG_DOT11_MODE_11AC;
+	}
+        break;
+    case eCSR_DOT11_MODE_11ac_ONLY:
+        cfgDot11Mode = eCSR_CFG_DOT11_MODE_11AC_ONLY;
+        break;
+#endif
     default:
         //No need to assign anything here
         break;
@@ -5808,6 +6229,7 @@
    return (0);
 }
 
+#ifndef BMPS_WORKAROUND_NOT_NEEDED
 /* Disconnect all active sessions by sending disassoc. This is mainly used to disconnect the remaining session when we 
  * transition from concurrent sessions to a single session. The use case is Infra STA and wifi direct multiple sessions are up and 
  * P2P session is removed. The Infra STA session remains and should resume BMPS if BMPS is enabled by default. However, there
@@ -5827,3 +6249,4 @@
         }
     }
 }
+#endif
diff --git a/CORE/SME/src/meas/measApi.c b/CORE/SME/src/meas/measApi.c
deleted file mode 100644
index 1e9b029..0000000
--- a/CORE/SME/src/meas/measApi.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- *
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
diff --git a/CORE/SME/src/oemData/oemDataApi.c b/CORE/SME/src/oemData/oemDataApi.c
new file mode 100644
index 0000000..1020373
--- /dev/null
+++ b/CORE/SME/src/oemData/oemDataApi.c
@@ -0,0 +1,398 @@
+/*
+ * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/** ------------------------------------------------------------------------- * 
+    ------------------------------------------------------------------------- *  
+
+  
+    \file oemDataApi.c
+  
+    Implementation for the OEM DATA REQ/RSP interfaces.
+  
+    Copyright (C) 2010 Qualcomm Incorporated.
+  
+ 
+   ========================================================================== */
+#include "aniGlobal.h"
+#include "oemDataApi.h"
+#include "palApi.h"
+#include "smeInside.h"
+#include "smsDebug.h"
+
+#include "csrSupport.h"
+#include "wlan_qct_tl.h"
+
+#include "vos_diag_core_log.h"
+#include "vos_diag_core_event.h"
+
+/* ---------------------------------------------------------------------------
+    \fn oemData_OemDataReqOpen
+    \brief This function must be called before any API call to (OEM DATA REQ/RSP module)
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+
+eHalStatus oemData_OemDataReqOpen(tHalHandle hHal)
+{
+    eHalStatus status = eHAL_STATUS_SUCCESS;
+    tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+
+    do
+    {
+        //initialize all the variables to null
+        vos_mem_set(&(pMac->oemData), sizeof(tOemDataStruct), 0);
+        if(!HAL_STATUS_SUCCESS(status))
+        {
+            smsLog(pMac, LOGE, "oemData_OemDataReqOpen: Cannot allocate memory for the timer function\n");
+            break;
+        }
+    } while(0);
+
+    return status;
+}
+
+/* ---------------------------------------------------------------------------
+    \fn oemData_OemDataReqClose
+    \brief This function must be called before closing the csr module
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+
+eHalStatus oemData_OemDataReqClose(tHalHandle hHal)
+{
+    eHalStatus status = eHAL_STATUS_SUCCESS;
+    tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+
+    do
+    {
+        if(!HAL_STATUS_SUCCESS(status))
+        {
+            smsLog(pMac, LOGE, "oemData_OemDataReqClose: Failed in oemData_OemDataReqClose at StopTimers\n");
+            break;
+        }
+
+        if(pMac->oemData.pOemDataRsp != NULL)
+        {
+            vos_mem_free(pMac->oemData.pOemDataRsp);
+        }
+        
+        //initialize all the variables to null
+        vos_mem_set(&(pMac->oemData), sizeof(tOemDataStruct), 0);
+    } while(0);
+
+    return eHAL_STATUS_SUCCESS;
+}
+
+/* ---------------------------------------------------------------------------
+    \fn oemData_ReleaseOemDataReqCommand
+    \brief This function removes the oemDataCommand from the active list and 
+           and frees up any memory occupied by this
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+void oemData_ReleaseOemDataReqCommand(tpAniSirGlobal pMac, tSmeCmd *pOemDataCmd, eOemDataReqStatus oemDataReqStatus)
+{
+    //Do the callback
+    pOemDataCmd->u.oemDataCmd.callback(pMac, pOemDataCmd->u.oemDataCmd.pContext, pOemDataCmd->u.oemDataCmd.oemDataReqID, oemDataReqStatus);
+
+    //First take this command out of the active list
+    if(csrLLRemoveEntry(&pMac->sme.smeCmdActiveList, &pOemDataCmd->Link, LL_ACCESS_LOCK))
+    {
+        vos_mem_set(&(pOemDataCmd->u.oemDataCmd), sizeof(tOemDataCmd), 0);
+
+        //Now put this command back on the avilable command list
+        smeReleaseCommand(pMac, pOemDataCmd);
+    }
+    else
+    {
+        smsLog(pMac, LOGE, "OEM_DATA: **************** oemData_ReleaseOemDataReqCommand cannot release the command\n");
+    }
+}
+
+/* ---------------------------------------------------------------------------
+    \fn oemData_OemDataReq
+    \brief Request an OEM DATA RSP
+    \param sessionId - Id of session to be used
+    \param pOemDataReqID - pointer to an object to get back the request ID
+    \param callback - a callback function that is called upon finish
+    \param pContext - a pointer passed in for the callback
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+eHalStatus oemData_OemDataReq(tHalHandle hHal, 
+                                tANI_U8 sessionId,
+                                tOemDataReqConfig *oemDataReqConfig, 
+                                tANI_U32 *pOemDataReqID, 
+                                oemData_OemDataReqCompleteCallback callback, 
+                                void *pContext)
+{
+    eHalStatus status = eHAL_STATUS_SUCCESS;
+    tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+    tSmeCmd *pOemDataCmd = NULL;
+
+    do 
+    {
+        if( !CSR_IS_SESSION_VALID( pMac, sessionId ) )
+        {
+           status = eHAL_STATUS_FAILURE;
+           break;
+        }
+
+        pMac->oemData.oemDataReqConfig.sessionId = sessionId;
+        pMac->oemData.callback = callback;
+        pMac->oemData.pContext = pContext;
+        pMac->oemData.oemDataReqID = *(pOemDataReqID);
+    
+        vos_mem_copy((v_VOID_t*)(pMac->oemData.oemDataReqConfig.oemDataReq), (v_VOID_t*)(oemDataReqConfig->oemDataReq), OEM_DATA_REQ_SIZE);
+    
+        pMac->oemData.oemDataReqActive = eANI_BOOLEAN_FALSE;
+    
+        pOemDataCmd = smeGetCommandBuffer(pMac);
+    
+        //fill up the command before posting it.
+        if(pOemDataCmd)
+        {
+            pOemDataCmd->command = eSmeCommandOemDataReq;
+            pOemDataCmd->u.oemDataCmd.callback = callback;
+            pOemDataCmd->u.oemDataCmd.pContext = pContext;
+            pOemDataCmd->u.oemDataCmd.oemDataReqID = pMac->oemData.oemDataReqID;
+    
+            //set the oem data request
+            pOemDataCmd->u.oemDataCmd.oemDataReq.sessionId = pMac->oemData.oemDataReqConfig.sessionId;
+            vos_mem_copy((v_VOID_t*)(pOemDataCmd->u.oemDataCmd.oemDataReq.oemDataReq), 
+                                    (v_VOID_t*)(pMac->oemData.oemDataReqConfig.oemDataReq), OEM_DATA_REQ_SIZE);
+        }
+        else
+        {
+            status = eHAL_STATUS_FAILURE;
+            break;
+        }
+    
+        //now queue this command in the sme command queue
+        //Here since this is not interacting with the csr just push the command
+        //into the sme queue. Also push this command with the normal priority
+        smePushCommand(pMac, pOemDataCmd, eANI_BOOLEAN_FALSE);
+
+    } while(0);
+
+    if(!HAL_STATUS_SUCCESS(status) && pOemDataCmd)
+    {
+        oemData_ReleaseOemDataReqCommand(pMac, pOemDataCmd, eOEM_DATA_REQ_FAILURE);
+        pMac->oemData.oemDataReqActive = eANI_BOOLEAN_FALSE;
+    }
+
+    return status;
+}
+
+/* ---------------------------------------------------------------------------
+    \fn oemData_SendMBOemDataReq
+    \brief Request an OEM DATA REQ to be passed down to PE
+    \param pMac:
+    \param pOemDataReq: Pointer to the oem data request
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+eHalStatus oemData_SendMBOemDataReq(tpAniSirGlobal pMac, tOemDataReq *pOemDataReq)
+{
+    eHalStatus status = eHAL_STATUS_SUCCESS;
+    tSirOemDataReq* pMsg;
+    tANI_U16 msgLen;
+    tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, pOemDataReq->sessionId );
+
+    smsLog(pMac, LOGW, "OEM_DATA: entering Function %s\n", __FUNCTION__);
+    
+    msgLen = (tANI_U16)(sizeof(tSirOemDataReq));
+
+    status = palAllocateMemory(pMac->hHdd, (void**)&pMsg, msgLen);
+    if(HAL_STATUS_SUCCESS(status))
+    {
+        palZeroMemory(pMac->hHdd, pMsg, msgLen);
+        pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_OEM_DATA_REQ);
+        palCopyMemory(pMac->hHdd, pMsg->selfMacAddr, pSession->selfMacAddr, sizeof(tSirMacAddr) );
+        status = palCopyMemory(pMac->hHdd, pMsg->oemDataReq, pOemDataReq->oemDataReq, OEM_DATA_REQ_SIZE);
+        if(HAL_STATUS_SUCCESS(status))
+        {
+            smsLog(pMac, LOGW, "OEM_DATA: sending message to pe%s\n", __FUNCTION__);
+            status = palSendMBMessage(pMac->hHdd, pMsg);
+        }
+        else
+        {
+            palFreeMemory(pMac->hHdd, pMsg);
+        }
+    }
+
+    smsLog(pMac, LOGW, "OEM_DATA: exiting Function %s\n", __FUNCTION__);
+
+    return status;
+}
+
+/* ---------------------------------------------------------------------------
+    \fn oemData_ProcessOemDataReqCommand
+    \brief This function is called by the smeProcessCommand when the case hits
+           eSmeCommandOemDataReq
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+eHalStatus oemData_ProcessOemDataReqCommand(tpAniSirGlobal pMac, tSmeCmd *pOemDataReqCmd)
+{
+    eHalStatus status = eHAL_STATUS_SUCCESS;
+
+    //check if the system is in proper mode of operation for 
+    //oem data req/rsp to be functional. Currently, concurrency is not
+    //supported and the driver must be operational only as 
+    //STA for oem data req/rsp to be functional. We return an invalid 
+    //mode flag if it is operational as any one of the following
+    //in any of the active sessions
+    //1. AP Mode
+    //2. IBSS Mode
+    //3. BTAMP Mode ...
+
+    if(eHAL_STATUS_SUCCESS == oemData_IsOemDataReqAllowed(pMac))
+    {
+        smsLog(pMac, LOG1, "%s: OEM_DATA REQ allowed in the current mode\n", __FUNCTION__);
+        pMac->oemData.oemDataReqActive = eANI_BOOLEAN_TRUE;
+        status = oemData_SendMBOemDataReq(pMac, &(pOemDataReqCmd->u.oemDataCmd.oemDataReq));
+    }
+    else
+    {
+        smsLog(pMac, LOG1, "%s: OEM_DATA REQ not allowed in the current mode\n", __FUNCTION__);
+        oemData_ReleaseOemDataReqCommand(pMac, pOemDataReqCmd, eOEM_DATA_REQ_INVALID_MODE);
+        pMac->oemData.oemDataReqActive = eANI_BOOLEAN_FALSE;
+    }
+
+    return status;
+}
+
+/* ---------------------------------------------------------------------------
+    \fn sme_HandleOemDataRsp
+    \brief This function processes the oem data response obtained from the PE
+    \param pMsg - Pointer to the pSirOemDataRsp
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8* pMsg)
+{
+    eHalStatus                         status = eHAL_STATUS_SUCCESS;
+    tpAniSirGlobal                     pMac;
+    tListElem                          *pEntry = NULL;
+    tSmeCmd                            *pCommand = NULL;
+    tSirOemDataRsp*                    pOemDataRsp = NULL;
+    pMac = PMAC_STRUCT(hHal);
+
+    smsLog(pMac, LOG1, "%s: OEM_DATA Entering\n", __FUNCTION__);
+
+    do
+    {
+        if(pMsg == NULL)
+        {
+            smsLog(pMac, LOGE, "in %s msg ptr is NULL\n", __FUNCTION__);
+            status = eHAL_STATUS_FAILURE;
+            break;
+        }
+    
+        pEntry = csrLLPeekHead( &pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK );
+        if(pEntry)
+        {
+            pCommand = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
+            if(eSmeCommandOemDataReq == pCommand->command)
+            {
+                pOemDataRsp = (tSirOemDataRsp*)pMsg;
+
+                //make sure to acquire the lock before modifying the data
+                status = sme_AcquireGlobalLock(&pMac->sme);
+                if(!HAL_STATUS_SUCCESS(status))
+                {
+                    break;
+                }
+
+                if(pMac->oemData.pOemDataRsp != NULL)
+                {
+                    vos_mem_free(pMac->oemData.pOemDataRsp);
+                }
+                pMac->oemData.pOemDataRsp = (tOemDataRsp*)vos_mem_malloc(sizeof(tOemDataRsp));
+
+                if(pMac->oemData.pOemDataRsp == NULL)
+                {
+                    sme_ReleaseGlobalLock(&pMac->sme);
+                    smsLog(pMac, LOGE, "in %s vos_mem_malloc failed for pMac->oemData.pOemDataRsp\n", __FUNCTION__);
+                    status = eHAL_STATUS_FAILURE;
+                    break;
+                }
+
+                smsLog(pMac, LOGE, "Before memory copy\n"); 
+                vos_mem_copy((v_VOID_t*)(pMac->oemData.pOemDataRsp), (v_VOID_t*)(&pOemDataRsp->oemDataRsp), sizeof(tOemDataRsp));
+                smsLog(pMac, LOGE, "after memory copy\n");
+                sme_ReleaseGlobalLock(&pMac->sme);
+            }
+            else
+            {
+                smsLog(pMac, LOGE, "in %s eWNI_SME_OEM_DATA_RSP Received but NO REQs are ACTIVE ...\n",
+                    __FUNCTION__);
+                status = eHAL_STATUS_FAILURE;
+                break;
+            }
+        }
+        else
+        {
+            smsLog(pMac, LOGE, "in %s eWNI_SME_OEM_DATA_RSP Received but NO commands are ACTIVE ...\n", __FUNCTION__);
+            status = eHAL_STATUS_FAILURE;
+            break;
+        }
+
+        oemData_ReleaseOemDataReqCommand(pMac, pCommand, eHAL_STATUS_SUCCESS);
+        pMac->oemData.oemDataReqActive = eANI_BOOLEAN_FALSE;
+
+    } while(0);
+
+    return status;
+}
+
+/* ---------------------------------------------------------------------------
+    \fn oemData_IsOemDataReqAllowed
+    \brief This function checks if OEM DATA REQs can be performed in the 
+           current driver state
+    \return eHalStatus     
+  -------------------------------------------------------------------------------*/
+eHalStatus oemData_IsOemDataReqAllowed(tHalHandle hHal)
+{
+    eHalStatus status = eHAL_STATUS_SUCCESS;
+    tANI_U32 sessionId;
+
+    tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+
+    for(sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++)
+    {
+        if(CSR_IS_SESSION_VALID(pMac, sessionId))
+        {
+            if(csrIsConnStateIbss(pMac, sessionId) || csrIsBTAMP(pMac, sessionId) 
+#ifdef WLAN_SOFTAP_FEATURE
+               || csrIsConnStateConnectedInfraAp(pMac, sessionId)
+#endif
+               )
+            {
+                //co-exist with IBSS or BT-AMP or Soft-AP mode is not supported
+                smsLog(pMac, LOGW, "OEM DATA REQ is not allowed due to IBSS|BTAMP|SAP exist in session %d\n", sessionId);
+                status = eHAL_STATUS_CSR_WRONG_STATE;
+                break;
+            }
+        }
+    }
+
+    smsLog(pMac, LOG1, "Exiting oemData_IsOemDataReqAllowed with status %d\n", status);
+
+    return (status);
+}
+
+#endif /*FEATURE_OEM_DATA_SUPPORT*/
diff --git a/CORE/SME/src/p2p/p2p_Api.c b/CORE/SME/src/p2p/p2p_Api.c
index 057f013..c0948d1 100644
--- a/CORE/SME/src/p2p/p2p_Api.c
+++ b/CORE/SME/src/p2p/p2p_Api.c
@@ -766,7 +766,7 @@
 }
 
 eHalStatus p2pSendAction(tHalHandle hHal, tANI_U8 sessionId,
-         const tANI_U8 *pBuf, tANI_U32 len)
+         const tANI_U8 *pBuf, tANI_U32 len, tANI_U16 wait, tANI_BOOLEAN noack)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
@@ -783,9 +783,11 @@
         pMsg->type = pal_cpu_to_be16((tANI_U16)eWNI_SME_SEND_ACTION_FRAME_IND);
         pMsg->msgLen = pal_cpu_to_be16(msgLen);
         pMsg->sessionId = sessionId;
-        palCopyMemory( pMac->hHdd, pMsg->data, pBuf, len ); 
+        pMsg->noack = noack;
+        pMsg->wait = (tANI_U16)wait;
+        palCopyMemory( pMac->hHdd, pMsg->data, pBuf, len );
         status = palSendMBMessage(pMac->hHdd, pMsg);
-    }                             
+    }
 
     return( status );
 }
diff --git a/CORE/SME/src/pmc/pmc.c b/CORE/SME/src/pmc/pmc.c
index 36b2ad9..56e2d11 100644
--- a/CORE/SME/src/pmc/pmc.c
+++ b/CORE/SME/src/pmc/pmc.c
@@ -23,7 +23,7 @@
 *
 * Name:  pmc.c
 *
-* Description: 
+* Description:
       Power Management Control (PMC) processing routines.
 *
 * Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
@@ -329,7 +329,7 @@
             "eWNI_PMC_EXIT_IMPS_REQ\n");
             return eHAL_STATUS_FAILURE;
         }
-        
+
         return eHAL_STATUS_SUCCESS;
 
     /* Tell MAC to have device exit UAPSD mode first */
@@ -478,7 +478,7 @@
         }
     }
 
-    //Vote off RF supplies. Note RF supllies are not voted off if there is a 
+    //Vote off RF supplies. Note RF supllies are not voted off if there is a
     //pending request for full power already
     status = vos_chipVoteOffRFSupply(&callType, NULL, NULL);
     VOS_ASSERT( VOS_IS_STATUS_SUCCESS( status ) );
@@ -510,7 +510,7 @@
 eHalStatus pmcEnterRequestBmpsState (tHalHandle hHal)
 {
     tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-    
+
     smsLog(pMac, LOG2, FL("Entering pmcEnterRequestBmpsState\n"));
 
     /* Can enter Request BMPS State only from Full Power State. */
@@ -691,7 +691,7 @@
             if (!checkRoutine(pPowerSaveCheckEntry->checkContext))
             {
                 smsLog(pMac, LOGE, FL("pmcPowerSaveCheck fail!\n"));
-                bResult = FALSE; 
+                bResult = FALSE;
                 break;
             }
             else
@@ -727,7 +727,7 @@
     tSirPowerSaveCfg powerSaveConfig;
 
     smsLog(pMac, LOG2, FL("Entering pmcSendPowerSaveConfigMessage\n"));
-    
+
     palZeroMemory(pMac->hHdd, &(powerSaveConfig), sizeof(tSirPowerSaveCfg));
 
     switch (pMac->pmc.bmpsConfig.forwardBeacons)
@@ -752,27 +752,27 @@
     }
     powerSaveConfig.fEnablePwrSaveImmediately = pMac->pmc.bmpsConfig.setPmOnLastFrame;
     powerSaveConfig.fPSPoll = pMac->pmc.bmpsConfig.usePsPoll;
-    powerSaveConfig.fEnableBeaconEarlyTermination = 
+    powerSaveConfig.fEnableBeaconEarlyTermination =
         pMac->pmc.bmpsConfig.enableBeaconEarlyTermination;
-    powerSaveConfig.bcnEarlyTermWakeInterval = 
+    powerSaveConfig.bcnEarlyTermWakeInterval =
         pMac->pmc.bmpsConfig.bcnEarlyTermWakeInterval;
 
-    /* setcfg for listenInterval. Make sure CFG is updated because PE reads this 
+    /* setcfg for listenInterval. Make sure CFG is updated because PE reads this
        from CFG at the time of assoc or reassoc */
-    ccmCfgSetInt(pMac, WNI_CFG_LISTEN_INTERVAL, pMac->pmc.bmpsConfig.bmpsPeriod, 
+    ccmCfgSetInt(pMac, WNI_CFG_LISTEN_INTERVAL, pMac->pmc.bmpsConfig.bmpsPeriod,
         NULL, eANI_BOOLEAN_FALSE);
 
     if( pMac->pmc.pmcState == IMPS || pMac->pmc.pmcState == REQUEST_IMPS )
     {
         //Wake up the chip first
-        eHalStatus status = pmcDeferMsg( pMac, eWNI_PMC_PWR_SAVE_CFG, 
+        eHalStatus status = pmcDeferMsg( pMac, eWNI_PMC_PWR_SAVE_CFG,
                                     &powerSaveConfig, sizeof(tSirPowerSaveCfg) );
 
         if( eHAL_STATUS_PMC_PENDING == status )
         {
             return eHAL_STATUS_SUCCESS;
         }
-        else 
+        else
         {
             //either fail or already in full power
             if( !HAL_STATUS_SUCCESS( status ) )
@@ -784,13 +784,13 @@
     }
     /* Send a message so that FW System config is also updated and is in sync with
        the CFG.*/
-    if (pmcSendMessage(hHal, eWNI_PMC_PWR_SAVE_CFG, &powerSaveConfig, sizeof(tSirPowerSaveCfg)) 
+    if (pmcSendMessage(hHal, eWNI_PMC_PWR_SAVE_CFG, &powerSaveConfig, sizeof(tSirPowerSaveCfg))
         != eHAL_STATUS_SUCCESS)
     {
         smsLog(pMac, LOGE, FL("Send of eWNI_PMC_PWR_SAVE_CFG to PE failed\n"));
         return eHAL_STATUS_FAILURE;
     }
-   
+
     return eHAL_STATUS_SUCCESS;
 }
 
@@ -1053,12 +1053,12 @@
         return;
     }
 
-    if (pmcPowerSaveCheck(hHal)) 
+    if (pmcPowerSaveCheck(hHal))
     {
         smsLog(pMac, LOGW, FL("BMPS entry criteria satisfied. Requesting BMPS state"));
-        (void)pmcEnterRequestBmpsState(hHal);    
-    } 
-    else 
+        (void)pmcEnterRequestBmpsState(hHal);
+    }
+    else
     {
         /*Some module voted against Power Save. So timer should be restarted again to retry BMPS */
         smsLog(pMac, LOGE, FL("Power Save check failed. Retry BMPS again later"));
@@ -1150,7 +1150,7 @@
 *
 * Parameters:
 *    hHal - HAL handle for device
-*    callbackStatus - Success or Failure. 
+*    callbackStatus - Success or Failure.
 *
 * Returns:
 *    nothing
@@ -1261,9 +1261,9 @@
             //Not ready for UAPSD at this time, save it first and wake up the chip
             smsLog(pMac, LOGE, " PMC state = %d\n",pMac->pmc.pmcState);
             pMac->pmc.uapsdSessionRequired = TRUE;
-            /* While BTC traffic is going on, STA can be in BMPS 
+            /* While BTC traffic is going on, STA can be in BMPS
              * and need not go to Full Power */
-            //fFullPower = VOS_TRUE; 
+            //fFullPower = VOS_TRUE;
          }
 #endif /* WLAN_MDM_CODE_REDUCTION_OPT*/
          break;
@@ -1344,7 +1344,7 @@
       only way to inform modules if PMC resumed UAPSD power save mode
       on its own after full power mode */
    pmcDoDeviceStateUpdateCallbacks(hHal, UAPSD);
-   
+
    /* If we have a reqeust for full power pending then we have to go
    directly into full power. */
    if (pMac->pmc.requestFullPowerPending)
@@ -1449,7 +1449,7 @@
           (void)pmcStartTrafficTimer(hHal, pMac->pmc.bmpsConfig.trafficMeasurePeriod);
       return eHAL_STATUS_FAILURE;
    }
-   
+
    return eHAL_STATUS_SUCCESS;
 }
 
@@ -1513,7 +1513,7 @@
 * Name:  pmcDoStandbyCallbacks
 *
 * Description:
-*    Call the registered Standby callback routines 
+*    Call the registered Standby callback routines
 *
 * Parameters:
 *    hHal - HAL handle for device
@@ -1526,7 +1526,7 @@
 void pmcDoStandbyCallbacks (tHalHandle hHal, eHalStatus callbackStatus)
 {
    tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- 
+
    smsLog(pMac, LOG2, "PMC: entering pmcDoStandbyCallbacks\n");
 
    /* Call Standby callback routine. */
@@ -1553,7 +1553,7 @@
 tPmcState pmcGetPmcState (tHalHandle hHal)
 {
     tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-    return pMac->pmc.pmcState; 
+    return pMac->pmc.pmcState;
 }
 
 const char* pmcGetPmcStateStr(tPmcState state)
@@ -1654,7 +1654,7 @@
 
       case REQUEST_BMPS:
          smsLog(pMac, LOGW, "PMC: BMPS transaction going on. WOWL request "
-                    "will be buffered\n");         
+                    "will be buffered\n");
          break;
 
       case BMPS:
@@ -1678,7 +1678,7 @@
 
       case REQUEST_EXIT_WOWL:
          smsLog(pMac, LOGW, "PMC: Exit WOWL transaction going on. New WOWL request "
-                   "will be buffered\n");         
+                   "will be buffered\n");
          break;
 
       default:
@@ -1771,7 +1771,7 @@
 
         case REQUEST_ENTER_WOWL:
             smsLog(pMac, LOGP, "PMC: Rcvd exit WOWL even before enter WOWL was completed\n");
-            return eHAL_STATUS_FAILURE;   
+            return eHAL_STATUS_FAILURE;
 
         default:
             smsLog(pMac, LOGW, "PMC: Got exit WOWL in state %s. Nothing to do as already out of WOWL\n",
@@ -1798,7 +1798,7 @@
 void pmcDoEnterWowlCallbacks (tHalHandle hHal, eHalStatus callbackStatus)
 {
    tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- 
+
    smsLog(pMac, LOG2, "PMC: entering pmcDoWowlCallbacks\n");
 
    /* Call Wowl callback routine. */
@@ -1822,7 +1822,7 @@
         {
         case eWNI_PMC_WOWL_ADD_BCAST_PTRN:
             VOS_ASSERT( pDeferredMsg->size == sizeof(tSirWowlAddBcastPtrn) );
-            if (pmcSendMessage(pMac, eWNI_PMC_WOWL_ADD_BCAST_PTRN, 
+            if (pmcSendMessage(pMac, eWNI_PMC_WOWL_ADD_BCAST_PTRN,
                     &pDeferredMsg->u.wowlAddPattern, sizeof(tSirWowlAddBcastPtrn))
                     != eHAL_STATUS_SUCCESS)
             {
@@ -1832,7 +1832,7 @@
 
         case eWNI_PMC_WOWL_DEL_BCAST_PTRN:
             VOS_ASSERT( pDeferredMsg->size == sizeof(tSirWowlDelBcastPtrn) );
-            if (pmcSendMessage(pMac, eWNI_PMC_WOWL_DEL_BCAST_PTRN, 
+            if (pmcSendMessage(pMac, eWNI_PMC_WOWL_DEL_BCAST_PTRN,
                     &pDeferredMsg->u.wowlDelPattern, sizeof(tSirWowlDelBcastPtrn))
                     != eHAL_STATUS_SUCCESS)
             {
@@ -1842,8 +1842,8 @@
 
         case eWNI_PMC_PWR_SAVE_CFG:
             VOS_ASSERT( pDeferredMsg->size == sizeof(tSirPowerSaveCfg) );
-            if (pmcSendMessage(pMac, eWNI_PMC_PWR_SAVE_CFG, 
-                    &pDeferredMsg->u.powerSaveConfig, sizeof(tSirPowerSaveCfg)) 
+            if (pmcSendMessage(pMac, eWNI_PMC_PWR_SAVE_CFG,
+                    &pDeferredMsg->u.powerSaveConfig, sizeof(tSirPowerSaveCfg))
                 != eHAL_STATUS_SUCCESS)
             {
                 smsLog(pMac, LOGE, FL("Send of eWNI_PMC_PWR_SAVE_CFG to PE failed\n"));
@@ -1875,7 +1875,7 @@
     pDeferredMsg->size = (tANI_U16)size;
     if( pData )
     {
-        if( !HAL_STATUS_SUCCESS( palCopyMemory( pMac->hHdd, &pDeferredMsg->u.data, 
+        if( !HAL_STATUS_SUCCESS( palCopyMemory( pMac->hHdd, &pDeferredMsg->u.data,
                                     pData, size ) ) )
         {
             smsLog(pMac, LOGE, FL("Cannot copy pattern for callback context\n"));
@@ -1884,7 +1884,7 @@
         }
     }
     csrLLInsertTail( &pMac->pmc.deferredMsgList, &pDeferredMsg->link, eANI_BOOLEAN_TRUE );
-    //No callback is needed. The messages are put into deferred queue and be processed first 
+    //No callback is needed. The messages are put into deferred queue and be processed first
     //when enter full power is complete.
     status = pmcRequestFullPower( pMac, NULL, NULL, eSME_REASON_OTHER );
     if( eHAL_STATUS_PMC_PENDING != status )
@@ -1989,7 +1989,7 @@
 
 
 //These commands are not supposed to fail due to out of command buffer,
-//otherwise other commands are not executed and no command is released. It will be deadlock. 
+//otherwise other commands are not executed and no command is released. It will be deadlock.
 #define PMC_IS_COMMAND_CANNOT_FAIL(cmdType)\
     ( (eSmeCommandEnterStandby == (cmdType )) ||\
       (eSmeCommandExitImps == (cmdType )) ||\
@@ -1997,7 +1997,7 @@
       (eSmeCommandExitUapsd == (cmdType )) ||\
       (eSmeCommandExitWowl == (cmdType )) )
 
-eHalStatus pmcPrepareCommand( tpAniSirGlobal pMac, eSmeCommandType cmdType, void *pvParam, 
+eHalStatus pmcPrepareCommand( tpAniSirGlobal pMac, eSmeCommandType cmdType, void *pvParam,
                             tANI_U32 size, tSmeCmd **ppCmd )
 {
     eHalStatus status = eHAL_STATUS_RESOURCES;
@@ -2022,7 +2022,7 @@
                 status = palAllocateMemory(pMac->hHdd, (void **)&pCommand, sizeof(tSmeCmd));
                 if(!HAL_STATUS_SUCCESS(status))
                 {
-                    VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL, "%s fail to allocate memory for command (0x%X)", 
+                    VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL, "%s fail to allocate memory for command (0x%X)",
                         __FUNCTION__, cmdType);
                     pCommand = NULL;
                     break;
@@ -2102,7 +2102,7 @@
 }
 
 
-eHalStatus pmcIssueCommand( tpAniSirGlobal pMac, eSmeCommandType cmdType, void *pvParam, 
+eHalStatus pmcIssueCommand( tpAniSirGlobal pMac, eSmeCommandType cmdType, void *pvParam,
                             tANI_U32 size, tANI_BOOLEAN fPutToListHead )
 {
     eHalStatus status = eHAL_STATUS_RESOURCES;
@@ -2173,12 +2173,12 @@
                 if ( HAL_STATUS_SUCCESS( status ) )
                 {
                     pMac->pmc.pmcState = REQUEST_FULL_POWER;
-                    smsLog(pMac, LOGW, FL("eWNI_PMC_EXIT_IMPS_REQ sent to PE\n")); 
+                    smsLog(pMac, LOGW, FL("eWNI_PMC_EXIT_IMPS_REQ sent to PE\n"));
                     fRemoveCmd = eANI_BOOLEAN_FALSE;
                 }
                 else
                 {
-                    smsLog(pMac, LOGE, FL("eWNI_PMC_EXIT_IMPS_REQ fail to be sent to PE status %d\n"), status); 
+                    smsLog(pMac, LOGE, FL("eWNI_PMC_EXIT_IMPS_REQ fail to be sent to PE status %d\n"), status);
                     //Callbacks are called with success srarus, do we need to pass in real status??
                     pmcEnterFullPowerState(pMac);
                 }
@@ -2195,7 +2195,7 @@
                     /* Change PMC state */
                     pMac->pmc.pmcState = REQUEST_BMPS;
                     smsLog(pMac, LOGW, "PMC: Enter BMPS req done: Force XO Core ON\n");
-                    vstatus = vos_chipVoteXOCore(NULL, NULL, NULL, VOS_TRUE); 
+                    vstatus = vos_chipVoteXOCore(NULL, NULL, NULL, VOS_TRUE);
                     if ( !VOS_IS_STATUS_SUCCESS(vstatus) )
                     {
                         smsLog(pMac, LOGE, "Could not turn XO Core ON. Can't go to BMPS\n");
@@ -2219,8 +2219,8 @@
                                 smsLog(pMac, LOGE, "Could not cancel XO Core ON vote."
                                                    "Not returning failure."
                                                    "Power consumed will be high\n");
-                            }  
-                            
+                            }
+
                         }
                     }
                 }
@@ -2242,7 +2242,7 @@
             {
                 pMac->pmc.requestFullPowerPending = FALSE;
 
-                status = pmcSendMessage( pMac, eWNI_PMC_EXIT_BMPS_REQ, 
+                status = pmcSendMessage( pMac, eWNI_PMC_EXIT_BMPS_REQ,
                             &pCommand->u.pmcCmd.u.exitBmpsInfo, sizeof(tExitBmpsInfo) );
                 if ( HAL_STATUS_SUCCESS( status ) )
                 {
@@ -2314,7 +2314,7 @@
         case eSmeCommandEnterWowl:
             if( ( BMPS == pMac->pmc.pmcState ) || ( WOWL == pMac->pmc.pmcState ) )
             {
-                status = pmcSendMessage(pMac, eWNI_PMC_ENTER_WOWL_REQ, 
+                status = pmcSendMessage(pMac, eWNI_PMC_ENTER_WOWL_REQ,
                         &pCommand->u.pmcCmd.u.enterWowlInfo, sizeof(tSirSmeWowlEnterParams));
                 if ( HAL_STATUS_SUCCESS( status ) )
                 {
@@ -2357,14 +2357,14 @@
             if( FULL_POWER == pMac->pmc.pmcState )
             {
                //Disallow standby if concurrent sessions are present. Note that CSR would have
-               //caused the STA to disconnect the Infra session (if not already disconnected) because of 
+               //caused the STA to disconnect the Infra session (if not already disconnected) because of
                //standby request. But we are now failing the standby request because of concurrent session.
-               //So was the tearing of infra session wasteful if we were going to fail the standby request ? 
+               //So was the tearing of infra session wasteful if we were going to fail the standby request ?
                //Not really. This is beacuse if and when BT-AMP etc sessions are torn down we will transition
                //to IMPS/standby and still save power.
                if (csrIsIBSSStarted(pMac) || csrIsBTAMPStarted(pMac))
                {
-                  VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL, 
+                  VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL,
                       "WLAN: IBSS or BT-AMP session present. Cannot honor standby request");
 
                   pmcDoStandbyCallbacks(pMac, eHAL_STATUS_PMC_NOT_NOW);
@@ -2372,7 +2372,7 @@
                       (void)pmcStartTrafficTimer(pMac, pMac->pmc.bmpsConfig.trafficMeasurePeriod);
                   break;
                }
- 
+
                 // Stop traffic timer. Just making sure timer is not running
                 pmcStopTrafficTimer(pMac);
 
@@ -2418,7 +2418,7 @@
     if( !PMC_IS_READY(pMac) )
     {
         smsLog(pMac, LOGE, FL("Requesting IMPS when PMC not ready\n"));
-        smsLog(pMac, LOGE, FL("pmcReady = %d pmcState = %s\n"), 
+        smsLog(pMac, LOGE, FL("pmcReady = %d pmcState = %s\n"),
             pMac->pmc.pmcReady, pmcGetPmcStateStr(pMac->pmc.pmcState));
         return eHAL_STATUS_FAILURE;
     }
@@ -2451,7 +2451,7 @@
         smsLog(pMac, LOG2, FL("IMPS cannot be entered now\n"));
         return eHAL_STATUS_PMC_NOT_NOW;
     }
-    
+
     /* Check if already in IMPS. */
     if ((pMac->pmc.pmcState == REQUEST_IMPS) || (pMac->pmc.pmcState == IMPS) ||
         (pMac->pmc.pmcState == REQUEST_FULL_POWER))
@@ -2479,7 +2479,7 @@
    if( !PMC_IS_READY(pMac) )
    {
        smsLog(pMac, LOGE, FL("Requesting BMPS when PMC not ready\n"));
-       smsLog(pMac, LOGE, FL("pmcReady = %d pmcState = %s\n"), 
+       smsLog(pMac, LOGE, FL("pmcReady = %d pmcState = %s\n"),
            pMac->pmc.pmcReady, pmcGetPmcStateStr(pMac->pmc.pmcState));
        return eHAL_STATUS_FAILURE;
    }
@@ -2504,24 +2504,28 @@
       return eHAL_STATUS_PMC_NOT_NOW;
    }
 
-   smsLog(pMac, LOG1, FL("concurrency enabled %u\n"), pMac->roam.configParam.concurrencyEnabled);
-   if (pMac->roam.configParam.concurrencyEnabled)
+#ifndef BMPS_WORKAROUND_NOT_NEEDED
+   smsLog(pMac, LOG1, FL("doBMPSWorkaround %u\n"), pMac->roam.configParam.doBMPSWorkaround);
+   if (pMac->roam.configParam.doBMPSWorkaround)
    {
-      pMac->roam.configParam.concurrencyEnabled = 0;
-      smsLog(pMac, LOG1, FL("reset concurrency to disabled %u\n"), pMac->roam.configParam.concurrencyEnabled);
+      pMac->roam.configParam.doBMPSWorkaround = 0;
+      smsLog(pMac, LOG1, FL("reset doBMPSWorkaround to disabled %u\n"), pMac->roam.configParam.doBMPSWorkaround);
       csrDisconnectAllActiveSessions(pMac);
+      smsLog(pMac, LOGE, "PMC: doBMPSWorkaround was enabled. First Disconnect all sessions. pmcState %d\n", pMac->pmc.pmcState);
+      return eHAL_STATUS_FAILURE;
    }
+#endif
    return ( eHAL_STATUS_SUCCESS );
 }
 
 tANI_BOOLEAN pmcShouldBmpsTimerRun( tpAniSirGlobal pMac )
 {
-    /* Check if BMPS is enabled and if Auto BMPS Feature is still enabled 
+    /* Check if BMPS is enabled and if Auto BMPS Feature is still enabled
      * or there is a pending Uapsd request or HDD requested BMPS or there
-     * is a pending request for WoWL. In all these cases BMPS is required. 
+     * is a pending request for WoWL. In all these cases BMPS is required.
      * Otherwise just stop the timer and return.
      */
-    if (!(pMac->pmc.bmpsEnabled && (pMac->pmc.autoBmpsEntryEnabled || 
+    if (!(pMac->pmc.bmpsEnabled && (pMac->pmc.autoBmpsEntryEnabled ||
           pMac->pmc.uapsdSessionRequired || pMac->pmc.bmpsRequestedByHdd ||
           pMac->pmc.wowlModeRequired )))
     {
@@ -2529,7 +2533,16 @@
         return eANI_BOOLEAN_FALSE;
     }
 
-    /* Check if there is an Infra session. BMPS is possible only if there is 
+    if ((vos_concurrent_sessions_running()) &&
+        ((csrIsConcurrentInfraConnected( pMac ) ||
+        (vos_get_concurrency_mode()& VOS_SAP) ||
+        (vos_get_concurrency_mode()& VOS_P2P_GO))))
+    {
+        smsLog(pMac, LOG1, FL("Multiple Sessions/GO/SAP sessions . BMPS should not be started"));
+        return eANI_BOOLEAN_FALSE;
+    }
+
+    /* Check if there is an Infra session. BMPS is possible only if there is
      * an Infra session */
     if (!csrIsInfraConnected(pMac))
     {
@@ -2540,7 +2553,7 @@
 }
 
 
-#ifdef FEATURE_WLAN_DIAG_SUPPORT 
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
 
 #define PMC_DIAG_EVT_TIMER_INTERVAL ( 5000 )
 
diff --git a/CORE/SME/src/pmc/pmcApi.c b/CORE/SME/src/pmc/pmcApi.c
index ac4a73e..a8fe6f6 100644
--- a/CORE/SME/src/pmc/pmcApi.c
+++ b/CORE/SME/src/pmc/pmcApi.c
@@ -1624,8 +1624,10 @@
       smsLog(pMac, LOGW, "PMC: BT-AMP exists. BMPS cannot be entered\n");
       return eANI_BOOLEAN_FALSE;
    }
-   if ((vos_concurrent_sessions_running()) && 
-        csrIsConcurrentInfraConnected( pMac ))
+   if ((vos_concurrent_sessions_running()) &&
+       (csrIsConcurrentInfraConnected( pMac ) ||
+       (vos_get_concurrency_mode()& VOS_SAP) ||
+       (vos_get_concurrency_mode()& VOS_P2P_GO)))
    {
       smsLog(pMac, LOGW, "PMC: Multiple active sessions exists. BMPS cannot be entered\n");
       return eANI_BOOLEAN_FALSE;
@@ -2426,10 +2428,21 @@
             eHAL_STATUS_FAILURE  Cannot set the offload.
             eHAL_STATUS_SUCCESS  Request accepted. 
   ---------------------------------------------------------------------------*/
-eHalStatus pmcSetHostOffload (tHalHandle hHal, tpSirHostOffloadReq pRequest)
+eHalStatus pmcSetHostOffload (tHalHandle hHal, tpSirHostOffloadReq pRequest, tANI_U8 *bssId)
 {
     tpSirHostOffloadReq pRequestBuf;
     vos_msg_t msg;
+    tpPESession     psessionEntry;
+    tANI_U8   sessionId;
+    tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+
+    if((psessionEntry = peFindSessionByBssid( pMac, bssId,&sessionId)) == NULL )
+    {
+        VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: Unable to find"
+        "the psessionEntry for bssid : 0x%x:0x%x:0x%x:0x%x:0x%x:0x%x", 
+        __FUNCTION__,bssId[5],bssId[4],bssId[3],bssId[2],bssId[1],bssId[0]);
+        return eHAL_STATUS_FAILURE;
+    }
 
     VOS_TRACE( VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s: IP address = %d.%d.%d.%d", __FUNCTION__,
         pRequest->params.hostIpv4Addr[0], pRequest->params.hostIpv4Addr[1],
@@ -2443,6 +2456,8 @@
     }
     vos_mem_copy(pRequestBuf, pRequest, sizeof(tSirHostOffloadReq));
 
+    pRequestBuf->bssIdx = psessionEntry->bssIdx;
+
     msg.type = WDA_SET_HOST_OFFLOAD;
     msg.reserved = 0;
     msg.bodyptr = pRequestBuf;
@@ -2465,10 +2480,20 @@
             eHAL_STATUS_FAILURE  Cannot set the keepalive.
             eHAL_STATUS_SUCCESS  Request accepted. 
   ---------------------------------------------------------------------------*/
-eHalStatus pmcSetKeepAlive (tHalHandle hHal, tpSirKeepAliveReq pRequest)
+eHalStatus pmcSetKeepAlive (tHalHandle hHal, tpSirKeepAliveReq pRequest, tANI_U8 *bssId)
 {
     tpSirKeepAliveReq pRequestBuf;
     vos_msg_t msg;
+    tpPESession     psessionEntry;
+    tANI_U8   sessionId;
+    tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+    if((psessionEntry = peFindSessionByBssid( pMac, bssId,&sessionId)) == NULL )
+    {
+        VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: Unable to find"
+        "the psessionEntry for bssid : 0x%x:0x%x:0x%x:0x%x:0x%x:0x%x", 
+        __FUNCTION__,bssId[5],bssId[4],bssId[3],bssId[2],bssId[1],bssId[0]);
+        return eHAL_STATUS_FAILURE;
+    }
 
     VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_LOW, "%s: "
                   "WDA_SET_KEEP_ALIVE message", __FUNCTION__);
@@ -2482,7 +2507,9 @@
         return eHAL_STATUS_FAILED_ALLOC;
     }
     vos_mem_copy(pRequestBuf, pRequest, sizeof(tSirKeepAliveReq));
-    
+
+    pRequestBuf->bssIdx = psessionEntry->bssIdx;
+
     VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_LOW, "buff TP %d "
               "input TP %d ", pRequestBuf->timePeriod, pRequest->timePeriod);
 
@@ -2513,11 +2540,21 @@
             eHAL_STATUS_FAILURE  Cannot set the offload.
             eHAL_STATUS_SUCCESS  Request accepted. 
   ---------------------------------------------------------------------------*/
-eHalStatus pmcSetNSOffload (tHalHandle hHal, tpSirHostOffloadReq pRequest)
+eHalStatus pmcSetNSOffload (tHalHandle hHal, tpSirHostOffloadReq pRequest, tANI_U8 *bssId)
 {
     tpSirHostOffloadReq pRequestBuf;
     vos_msg_t msg;
     int i;
+    tpPESession     psessionEntry;
+    tANI_U8   sessionId;
+    tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+    if((psessionEntry = peFindSessionByBssid( pMac, bssId,&sessionId)) == NULL )
+    {
+        VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: Unable to find"
+        "the psessionEntry for bssid : 0x%x:0x%x:0x%x:0x%x:0x%x:0x%x", 
+        __FUNCTION__,bssId[5],bssId[4],bssId[3],bssId[2],bssId[1],bssId[0]);
+        return eHAL_STATUS_FAILURE;
+    }
 
     pRequestBuf = vos_mem_malloc(sizeof(tSirHostOffloadReq));
     if (NULL == pRequestBuf)
@@ -2527,6 +2564,8 @@
     }
     vos_mem_copy(pRequestBuf, pRequest, sizeof(tSirHostOffloadReq));
 
+    pRequestBuf->bssIdx = psessionEntry->bssIdx;
+
     msg.type = WDA_SET_NS_OFFLOAD;
     msg.reserved = 0;
     msg.bodyptr = pRequestBuf;
@@ -2737,7 +2776,7 @@
     
     if (IS_DOT11_MODE_HT(dot11mode))
     {
-       PopulateDot11fHTCaps( pMac, &pr.HTCaps );
+       PopulateDot11fHTCaps( pMac, NULL, &pr.HTCaps );
     }
     
     // That's it-- now we pack it.  First, how much space are we going to
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index e34b4e1..2dac130 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -398,6 +398,11 @@
         fFullPowerNeeded = ( ( eSmeCommandAddTs == pCommand->command ) ||
                     ( eSmeCommandDelTs ==  pCommand->command ) );
         if( fFullPowerNeeded ) break;
+#ifdef FEATURE_OEM_DATA_SUPPORT
+        fFullPowerNeeded = (pmcState == IMPS && 
+                                       eSmeCommandOemDataReq == pCommand->command);
+        if(fFullPowerNeeded) break;
+#endif
 #ifdef WLAN_FEATURE_P2P
         fFullPowerNeeded = (pmcState == IMPS && 
                             eSmeCommandRemainOnChannel == pCommand->command);
@@ -619,6 +624,12 @@
                             csrProcessDelStaSessionCommand( pMac, pCommand );
                             break;
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+                        case eSmeCommandOemDataReq:
+                            csrLLUnlock(&pMac->sme.smeCmdActiveList);
+                            oemData_ProcessOemDataReqCommand(pMac, pCommand);
+                            break;
+#endif
 #if defined WLAN_FEATURE_P2P
                         case eSmeCommandRemainOnChannel:
                             csrLLUnlock(&pMac->sme.smeCmdActiveList);
@@ -871,6 +882,14 @@
          break;
       }
 #endif
+#ifdef FEATURE_OEM_DATA_SUPPORT
+      status = oemData_OemDataReqOpen(pMac);
+      if ( ! HAL_STATUS_SUCCESS( status ) ) {
+         smsLog(pMac, LOGE,
+                "oemData_OemDataReqOpen failed during initialization with status=%d", status );
+         break;
+      }
+#endif
 
       if(!HAL_STATUS_SUCCESS((status = initSmeCmdList(pMac))))
           break;
@@ -1447,6 +1466,21 @@
              break;
 #endif
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+          //Handle the eWNI_SME_OEM_DATA_RSP:
+          case eWNI_SME_OEM_DATA_RSP:
+                if(pMsg->bodyptr)
+                {
+                        status = sme_HandleOemDataRsp(pMac, pMsg->bodyptr);
+                        vos_mem_free(pMsg->bodyptr);
+                }
+                else
+                {
+                        smsLog( pMac, LOGE, "Empty rsp message for oemData_ (eWNI_SME_OEM_DATA_RSP), nothing to process\n");
+                }
+                smeProcessPendingQueue( pMac );
+                break;
+#endif
 
           case eWNI_SME_ADD_STA_SELF_RSP:
                 if(pMsg->bodyptr)
@@ -1471,7 +1505,6 @@
                 }
                 break;
 #ifdef WLAN_FEATURE_P2P
-          //Handle the eWNI_SME_INNAV_MEAS_RSP:
           case eWNI_SME_REMAIN_ON_CHN_RSP:
                 if(pMsg->bodyptr)
                 {
@@ -1787,6 +1820,14 @@
       fail_status = status;
    }
 #endif
+#ifdef FEATURE_OEM_DATA_SUPPORT
+   status = oemData_OemDataReqClose(hHal);
+   if ( ! HAL_STATUS_SUCCESS( status ) ) {
+       smsLog( pMac, LOGE, "OEM DATA REQ close failed during sme close with status=%d\n", 
+              status );
+      fail_status = status;
+   }
+#endif
 
    status = ccmClose(hHal);
          if ( ! HAL_STATUS_SUCCESS( status ) ) {
@@ -4698,6 +4739,99 @@
 }
 #endif /* FEATURE_WLAN_WAPI */
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+/*****************************************************************************
+ OEM DATA related modifications and function additions
+ *****************************************************************************/
+
+/* ---------------------------------------------------------------------------
+    \fn sme_getOemDataRsp
+    \brief a wrapper function to obtain the OEM DATA RSP
+    \param pOemDataRsp - A pointer to the response object
+    \param pContext - a pointer passed in for the callback
+    \return eHalStatus     
+  ---------------------------------------------------------------------------*/
+eHalStatus sme_getOemDataRsp(tHalHandle hHal, 
+        tOemDataRsp **pOemDataRsp)
+{
+    eHalStatus status = eHAL_STATUS_SUCCESS;
+    tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+
+    do
+    {
+        //acquire the lock for the sme object
+        status = sme_AcquireGlobalLock(&pMac->sme);
+
+        if(!HAL_STATUS_SUCCESS(status))
+        {
+            break;
+        }
+
+        if(pMac->oemData.pOemDataRsp != NULL)
+        {
+            *pOemDataRsp = pMac->oemData.pOemDataRsp;
+        }
+        else
+        {
+            status = eHAL_STATUS_FAILURE;
+        }
+
+        //release the lock for the sme object
+        sme_ReleaseGlobalLock( &pMac->sme );
+
+    } while(0);
+
+    return status;
+}
+
+/* ---------------------------------------------------------------------------
+    \fn sme_OemDataReq
+    \brief a wrapper function for OEM DATA REQ
+    \param sessionId - session id to be used.
+    \param pOemDataReqId - pointer to an object to get back the request ID
+    \param callback - a callback function that is called upon finish
+    \param pContext - a pointer passed in for the callback
+    \return eHalStatus     
+  ---------------------------------------------------------------------------*/
+eHalStatus sme_OemDataReq(tHalHandle hHal, 
+        tANI_U8 sessionId,
+        tOemDataReqConfig *pOemDataReqConfig, 
+        tANI_U32 *pOemDataReqID, 
+        oemData_OemDataReqCompleteCallback callback, 
+        void *pContext)
+{
+    eHalStatus status = eHAL_STATUS_SUCCESS;
+    tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+
+    do
+    {
+        //acquire the lock for the sme object
+        status = sme_AcquireGlobalLock(&pMac->sme);
+        if(HAL_STATUS_SUCCESS(status))
+        {
+            tANI_U32 lOemDataReqId = pMac->oemData.oemDataReqID++; //let it wrap around
+
+            if(pOemDataReqID)
+            {
+               *pOemDataReqID = lOemDataReqId;
+            }
+            else
+               return eHAL_STATUS_FAILURE;
+
+            status = oemData_OemDataReq(hHal, sessionId, pOemDataReqConfig, pOemDataReqID, callback, pContext);
+
+            //release the lock for the sme object
+            sme_ReleaseGlobalLock( &pMac->sme );
+        }
+    } while(0);
+
+    smsLog(pMac, LOGW, "exiting function %s\n", __FUNCTION__);
+
+    return(status);
+}
+
+#endif /*FEATURE_OEM_DATA_SUPPORT*/
 
 /*--------------------------------------------------------------------------
 
@@ -4901,22 +5035,31 @@
     \param  pRequest -  Pointer to the offload request.
     \return eHalStatus
   ---------------------------------------------------------------------------*/
-eHalStatus sme_SetHostOffload (tHalHandle hHal, tpSirHostOffloadReq pRequest)
+eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId, 
+                                    tpSirHostOffloadReq pRequest)
 {
     tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
-    eHalStatus status;
+    eHalStatus status = eHAL_STATUS_FAILURE;
+    tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
+
+    if(pSession == NULL )
+    {
+        VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: "
+           "Unable to find the csrSession", __FUNCTION__);
+        return status;
+    }
 
     if ( eHAL_STATUS_SUCCESS == ( status = sme_AcquireGlobalLock( &pMac->sme ) ) )
     {
 #ifdef WLAN_NS_OFFLOAD
         if(SIR_IPV6_NS_OFFLOAD == pRequest->offloadType)
         {
-            status = pmcSetNSOffload( hHal, pRequest );
+            status = pmcSetNSOffload( hHal, pRequest ,pSession->connectedProfile.bssid);
         }
         else
 #endif //WLAN_NS_OFFLOAD
         {
-            status = pmcSetHostOffload (hHal, pRequest);
+            status = pmcSetHostOffload (hHal, pRequest, pSession->connectedProfile.bssid);
         }
         sme_ReleaseGlobalLock( &pMac->sme );
     }
@@ -4975,18 +5118,26 @@
     \param  pRequest -  Pointer to the Keep Alive request.
     \return eHalStatus
   ---------------------------------------------------------------------------*/
-eHalStatus sme_SetKeepAlive (tHalHandle hHal, tpSirKeepAliveReq pRequest)
+eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId, 
+                                 tpSirKeepAliveReq pRequest)
 {
     tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
     eHalStatus status;
+    tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
 
     VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: "
            "setting Keep alive in SME TP %d", __FUNCTION__,pRequest->timePeriod);
 
+    if(pSession == NULL )
+    {
+		VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: "
+           " Session not Found", __FUNCTION__);
+        return eHAL_STATUS_FAILURE;
+    }
 
     if ( eHAL_STATUS_SUCCESS == ( status = sme_AcquireGlobalLock( &pMac->sme ) ) )
     {
-        status = pmcSetKeepAlive (hHal, pRequest);
+        status = pmcSetKeepAlive (hHal, pRequest, pSession->connectedProfile.bssid);
         sme_ReleaseGlobalLock( &pMac->sme );
     }
 
@@ -5324,7 +5475,8 @@
   ---------------------------------------------------------------------------*/
 
 eHalStatus sme_sendAction(tHalHandle hHal, tANI_U8 sessionId,
-                          const tANI_U8 *pBuf, tANI_U32 len)
+                          const tANI_U8 *pBuf, tANI_U32 len,
+                          tANI_U16 wait, tANI_BOOLEAN noack)
 {
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
@@ -5333,7 +5485,7 @@
     status = sme_AcquireGlobalLock(&pMac->sme);
     if(HAL_STATUS_SUCCESS(status))
     {
-        p2pSendAction(hHal, sessionId, pBuf, len);
+        p2pSendAction(hHal, sessionId, pBuf, len, wait, noack);
         //release the lock for the sme object
         sme_ReleaseGlobalLock( &pMac->sme );
     }
@@ -5850,12 +6002,34 @@
 {
     tpSirRcvFltMcAddrList   pRequestBuf;
     vos_msg_t               msg;
+    tpAniSirGlobal          pMac = PMAC_STRUCT(hHal);
+    tANI_U8                 sessionId = 0;
+    tCsrRoamSession         *pSession = NULL;
 
     VOS_TRACE( VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s: "
                "ulMulticastAddrCnt=%d, multicastAddr[0]=%d", __FUNCTION__,
                pMulticastAddrs->ulMulticastAddrCnt,
                pMulticastAddrs->multicastAddr[0]);
-  
+
+    /*
+     *Find the connected Infra / P2P_client connected session
+     */
+     for( sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++ )
+     {
+         if( CSR_IS_SESSION_VALID( pMac, sessionId ) && 
+           ( csrIsConnStateInfra( pMac, sessionId )) )
+         {
+            pSession = CSR_GET_SESSION( pMac, sessionId );
+         }
+     }
+
+    if(pSession == NULL )
+    {
+        VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: Unable to find "
+            "the right session", __FUNCTION__);
+        return eHAL_STATUS_FAILURE;
+    }
+    
     pRequestBuf = vos_mem_malloc(sizeof(tSirRcvFltMcAddrList));
     if (NULL == pRequestBuf)
     {
@@ -5865,6 +6039,10 @@
     }
     vos_mem_copy(pRequestBuf, pMulticastAddrs, sizeof(tSirRcvFltMcAddrList));
 
+    vos_mem_copy(pRequestBuf->selfMacAddr, pSession->selfMacAddr, sizeof(tSirMacAddr));
+    vos_mem_copy(pRequestBuf->bssId, pSession->connectedProfile.bssid, 
+                 sizeof(tSirMacAddr));
+
     msg.type = WDA_8023_MULTICAST_LIST_REQ;
     msg.reserved = 0;
     msg.bodyptr = pRequestBuf;
@@ -5879,12 +6057,14 @@
     return eHAL_STATUS_SUCCESS;
 }
 
-eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg)
+eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg, 
+                                           tANI_U8 sessionId)
 {
     tpSirRcvPktFilterCfgType    pRequestBuf;
     v_SINT_t                allocSize;
     vos_msg_t               msg;
-    /*tpAniSirGlobal          pMac = PMAC_STRUCT(hHal);*/
+    tpAniSirGlobal          pMac = PMAC_STRUCT(hHal);
+    tCsrRoamSession         *pSession = CSR_GET_SESSION( pMac, sessionId );
     v_U8_t   idx=0;
 
     VOS_TRACE( VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s: filterType=%d, "
@@ -5895,7 +6075,7 @@
                       ((pRcvPktFilterCfg->numFieldParams - 1) * 
                       sizeof(tSirRcvPktFilterFieldParams));
     pRequestBuf = vos_mem_malloc(allocSize);
-    if (NULL == pRequestBuf)
+    if ((NULL == pRequestBuf) || (NULL == pSession))
     {
         VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: Not able to "
             "allocate memory for Receive Filter Set Filter request", __FUNCTION__);
@@ -5903,6 +6083,10 @@
     }
     vos_mem_copy(pRequestBuf, pRcvPktFilterCfg, allocSize);
 
+    vos_mem_copy( pRequestBuf->selfMacAddr, pSession->selfMacAddr, sizeof(tSirMacAddr));
+    vos_mem_copy( pRequestBuf->bssId, pSession->connectedProfile.bssid, 
+                          sizeof(tSirMacAddr));
+
     msg.type = WDA_RECEIVE_FILTER_SET_FILTER_REQ;
     msg.reserved = 0;
     msg.bodyptr = pRequestBuf;
@@ -5979,16 +6163,19 @@
     return (status);
 }
 
-eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal, tpSirRcvFltPktClearParam pRcvFltPktClearParam)
+eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal, tpSirRcvFltPktClearParam pRcvFltPktClearParam, 
+                                             tANI_U8 sessionId)
 {
     tpSirRcvFltPktClearParam pRequestBuf;
     vos_msg_t               msg;
+    tpAniSirGlobal          pMac = PMAC_STRUCT(hHal);
+    tCsrRoamSession         *pSession = CSR_GET_SESSION( pMac, sessionId );
 
     VOS_TRACE( VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s: filterId = %d", __FUNCTION__,
                pRcvFltPktClearParam->filterId);
   
     pRequestBuf = vos_mem_malloc(sizeof(tSirRcvFltPktClearParam));
-    if (NULL == pRequestBuf)
+    if ((NULL == pRequestBuf) || (NULL == pSession))
     {
         VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
             "%s: Not able to allocate memory for Receive Filter "
@@ -5997,6 +6184,10 @@
     }
     vos_mem_copy(pRequestBuf, pRcvFltPktClearParam, sizeof(tSirRcvFltPktClearParam));
 
+    vos_mem_copy( pRequestBuf->selfMacAddr, pSession->selfMacAddr, sizeof(tSirMacAddr));
+    vos_mem_copy( pRequestBuf->bssId, pSession->connectedProfile.bssid, 
+                          sizeof(tSirMacAddr));
+
     msg.type = WDA_RECEIVE_FILTER_CLEAR_FILTER_REQ;
     msg.reserved = 0;
     msg.bodyptr = pRequestBuf;
diff --git a/CORE/SYS/legacy/src/system/src/sysEntryFunc.c b/CORE/SYS/legacy/src/system/src/sysEntryFunc.c
index 7e215e2..bb64322 100644
--- a/CORE/SYS/legacy/src/system/src/sysEntryFunc.c
+++ b/CORE/SYS/legacy/src/system/src/sysEntryFunc.c
@@ -186,7 +186,7 @@
             if( (dropReason = limIsPktCandidateForDrop(pMac, pBd, subType)) != eMGMT_DROP_NO_DROP)
             {
                 PELOG1(sysLog(pMac, LOG1, FL("Mgmt Frame %d being dropped, reason: %d\n"), subType, dropReason);)
-                MTRACE(macTrace(pMac,   TRACE_CODE_RX_MGMT_DROP, 0, dropReason);)
+                MTRACE(macTrace(pMac,   TRACE_CODE_RX_MGMT_DROP, NO_SESSION, dropReason);)
                 goto fail;
             }
             //Post the message to PE Queue
diff --git a/CORE/SYS/legacy/src/utils/inc/utilsParser.h b/CORE/SYS/legacy/src/utils/inc/utilsParser.h
index c9c29d6..556d9eb 100644
--- a/CORE/SYS/legacy/src/utils/inc/utilsParser.h
+++ b/CORE/SYS/legacy/src/utils/inc/utilsParser.h
@@ -67,6 +67,9 @@
 #ifdef WLAN_FEATURE_P2P
 tSirRetStatus ConvertP2POpaque      (tpAniSirGlobal, tSirAddie*,                 tDot11fIEP2PIEOpaque*);
 #endif
+#ifdef WLAN_FEATURE_WFD
+tSirRetStatus ConvertWFDOpaque      (tpAniSirGlobal, tSirAddie*,                 tDot11fIEWFDIEOpaque*);
+#endif
 
 
 #endif
diff --git a/CORE/SYS/legacy/src/utils/src/dot11f.c b/CORE/SYS/legacy/src/utils/src/dot11f.c
index 9d18626..b2df4bd 100644
--- a/CORE/SYS/legacy/src/utils/src/dot11f.c
+++ b/CORE/SYS/legacy/src/utils/src/dot11f.c
@@ -33,7 +33,7 @@
   *
   *
   * This file was automatically generated by 'framesc'
-  * Tue May 15 13:12:01 2012 from the following file(s):
+  * Fri Aug 17 13:25:06 2012 from the following file(s):
   *
   * dot11f.frms
   * 
@@ -4528,10 +4528,112 @@
 #define SigIeTPCRequest ( 0x006c )
 
 
+tANI_U32 dot11fUnpackIeVHTCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVHTCaps *pDst)
+{
+    tANI_U32 status = DOT11F_PARSE_SUCCESS;
+    tANI_U32 tmp60__;
+    tANI_U16 tmp61__;
+    tANI_U16 tmp62__;
+    (void) pBuf; (void)ielen; /* Shutup the compiler */
+    if (pDst->present) status = DOT11F_DUPLICATE_IE;
+    pDst->present = 1;
+    framesntohl(pCtx, &tmp60__, pBuf, 0);
+    pBuf += 4;
+    ielen -= 4;
+    pDst->maxMPDULen = tmp60__ >> 0 & 0x3;
+    pDst->supportedChannelWidthSet = tmp60__ >> 2 & 0x3;
+    pDst->ldpcCodingCap = tmp60__ >> 4 & 0x1;
+    pDst->shortGI80MHz = tmp60__ >> 5 & 0x1;
+    pDst->shortGI160and80plus80MHz = tmp60__ >> 6 & 0x1;
+    pDst->txSTBC = tmp60__ >> 7 & 0x1;
+    pDst->rxSTBC = tmp60__ >> 8 & 0x7;
+    pDst->suBeamFormerCap = tmp60__ >> 11 & 0x1;
+    pDst->suBeamformeeCap = tmp60__ >> 12 & 0x1;
+    pDst->csnofBeamformerAntSup = tmp60__ >> 13 & 0x7;
+    pDst->numSoundingDim = tmp60__ >> 16 & 0x7;
+    pDst->muBeamformerCap = tmp60__ >> 19 & 0x1;
+    pDst->muBeamformeeCap = tmp60__ >> 20 & 0x1;
+    pDst->vhtTXOPPS = tmp60__ >> 21 & 0x1;
+    pDst->htcVHTCap = tmp60__ >> 22 & 0x1;
+    pDst->maxAMPDULenExp = tmp60__ >> 23 & 0x7;
+    pDst->vhtLinkAdaptCap = tmp60__ >> 26 & 0x3;
+    pDst->rxAntPattern = tmp60__ >> 28 & 0x1;
+    pDst->txAntPattern = tmp60__ >> 29 & 0x1;
+    pDst->reserved1 = tmp60__ >> 30 & 0x3;
+    framesntohs(pCtx, &pDst->rxMCSMap, pBuf, 0);
+    pBuf += 2;
+    ielen -= (tANI_U8)2;
+    framesntohs(pCtx, &tmp61__, pBuf, 0);
+    pBuf += 2;
+    ielen -= 2;
+    pDst->rxHighSupDataRate = tmp61__ >> 0 & 0x1fff;
+    pDst->reserved2 = tmp61__ >> 13 & 0x7;
+    framesntohs(pCtx, &pDst->txMCSMap, pBuf, 0);
+    pBuf += 2;
+    ielen -= (tANI_U8)2;
+    framesntohs(pCtx, &tmp62__, pBuf, 0);
+    pDst->txSupDataRate = tmp62__ >> 0 & 0x1fff;
+    pDst->reserved3 = tmp62__ >> 13 & 0x7;
+    (void)pCtx;
+    return status;
+} /* End dot11fUnpackIeVHTCaps. */
+
+#define SigIeVHTCaps ( 0x006d )
+
+
+tANI_U32 dot11fUnpackIeVHTExtBssLoad(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVHTExtBssLoad *pDst)
+{
+    tANI_U32 status = DOT11F_PARSE_SUCCESS;
+    (void) pBuf; (void)ielen; /* Shutup the compiler */
+    if (pDst->present) status = DOT11F_DUPLICATE_IE;
+    pDst->present = 1;
+    pDst->muMIMOCapStaCount = *pBuf;
+    pBuf += 1;
+    ielen -= (tANI_U8)1;
+    pDst->ssUnderUtil = *pBuf;
+    pBuf += 1;
+    ielen -= (tANI_U8)1;
+    pDst->FortyMHzUtil = *pBuf;
+    pBuf += 1;
+    ielen -= (tANI_U8)1;
+    pDst->EightyMHzUtil = *pBuf;
+    pBuf += 1;
+    ielen -= (tANI_U8)1;
+    pDst->OneSixtyMHzUtil = *pBuf;
+    (void)pCtx;
+    return status;
+} /* End dot11fUnpackIeVHTExtBssLoad. */
+
+#define SigIeVHTExtBssLoad ( 0x006e )
+
+
+tANI_U32 dot11fUnpackIeVHTOperation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVHTOperation *pDst)
+{
+    tANI_U32 status = DOT11F_PARSE_SUCCESS;
+    (void) pBuf; (void)ielen; /* Shutup the compiler */
+    if (pDst->present) status = DOT11F_DUPLICATE_IE;
+    pDst->present = 1;
+    pDst->chanWidth = *pBuf;
+    pBuf += 1;
+    ielen -= (tANI_U8)1;
+    pDst->chanCenterFreqSeg1 = *pBuf;
+    pBuf += 1;
+    ielen -= (tANI_U8)1;
+    pDst->chanCenterFreqSeg2 = *pBuf;
+    pBuf += 1;
+    ielen -= (tANI_U8)1;
+    framesntohs(pCtx, &pDst->basicMCSSet, pBuf, 0);
+    (void)pCtx;
+    return status;
+} /* End dot11fUnpackIeVHTOperation. */
+
+#define SigIeVHTOperation ( 0x006f )
+
+
 tANI_U32 dot11fUnpackIeWAPI(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWAPI *pDst)
 {
     tANI_U32 status = DOT11F_PARSE_SUCCESS;
-    tANI_U16 tmp60__;
+    tANI_U16 tmp63__;
     (void) pBuf; (void)ielen; /* Shutup the compiler */
     if (pDst->present) status = DOT11F_DUPLICATE_IE;
     pDst->present = 1;
@@ -4568,11 +4670,11 @@
     DOT11F_MEMCPY(pCtx, pDst->multicast_cipher_suite, pBuf, 4);
     pBuf += 4;
     ielen -= (tANI_U8)4;
-    framesntohs(pCtx, &tmp60__, pBuf, 0);
+    framesntohs(pCtx, &tmp63__, pBuf, 0);
     pBuf += 2;
     ielen -= 2;
-    pDst->preauth = tmp60__ >> 0 & 0x1;
-    pDst->reserved = tmp60__ >> 1 & 0x7fff;
+    pDst->preauth = tmp63__ >> 0 & 0x1;
+    pDst->reserved = tmp63__ >> 1 & 0x7fff;
     if ( ! ielen )
     {
         pDst->bkid_count = 0U;
@@ -4594,7 +4696,7 @@
     return status;
 } /* End dot11fUnpackIeWAPI. */
 
-#define SigIeWAPI ( 0x006d )
+#define SigIeWAPI ( 0x0070 )
 
 
 tANI_U32 dot11fUnpackIeWAPIOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWAPIOpaque *pDst)
@@ -4614,7 +4716,7 @@
     return status;
 } /* End dot11fUnpackIeWAPIOpaque. */
 
-#define SigIeWAPIOpaque ( 0x006e )
+#define SigIeWAPIOpaque ( 0x0071 )
 
 
 tANI_U32 dot11fUnpackIeWFATPC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWFATPC *pDst)
@@ -4631,13 +4733,33 @@
     return status;
 } /* End dot11fUnpackIeWFATPC. */
 
-#define SigIeWFATPC ( 0x006f )
+#define SigIeWFATPC ( 0x0072 )
+
+
+tANI_U32 dot11fUnpackIeWFDIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWFDIEOpaque *pDst)
+{
+    tANI_U32 status = DOT11F_PARSE_SUCCESS;
+    (void) pBuf; (void)ielen; /* Shutup the compiler */
+    if (pDst->present) status = DOT11F_DUPLICATE_IE;
+    pDst->present = 1;
+    pDst->num_data = (tANI_U8)( ielen );
+    if (ielen > 249){
+        pDst->present = 0;
+        return DOT11F_SKIPPED_BAD_IE;
+    }
+
+    DOT11F_MEMCPY(pCtx, pDst->data, pBuf, ( ielen ) );
+    (void)pCtx;
+    return status;
+} /* End dot11fUnpackIeWFDIEOpaque. */
+
+#define SigIeWFDIEOpaque ( 0x0073 )
 
 
 tANI_U32 dot11fUnpackIeWMMCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMCaps *pDst)
 {
     tANI_U32 status = DOT11F_PARSE_SUCCESS;
-    tANI_U8 tmp61__;
+    tANI_U8 tmp64__;
     (void) pBuf; (void)ielen; /* Shutup the compiler */
     if (pDst->present) status = DOT11F_DUPLICATE_IE;
     pDst->present = 1;
@@ -4649,76 +4771,76 @@
             pDst->present = 0;
             return ( status | DOT11F_BAD_FIXED_VALUE );
     }
-    tmp61__ = *pBuf;
-    pDst->reserved = tmp61__ >> 0 & 0xf;
-    pDst->qack = tmp61__ >> 4 & 0x1;
-    pDst->queue_request = tmp61__ >> 5 & 0x1;
-    pDst->txop_request = tmp61__ >> 6 & 0x1;
-    pDst->more_ack = tmp61__ >> 7 & 0x1;
+    tmp64__ = *pBuf;
+    pDst->reserved = tmp64__ >> 0 & 0xf;
+    pDst->qack = tmp64__ >> 4 & 0x1;
+    pDst->queue_request = tmp64__ >> 5 & 0x1;
+    pDst->txop_request = tmp64__ >> 6 & 0x1;
+    pDst->more_ack = tmp64__ >> 7 & 0x1;
     (void)pCtx;
     return status;
 } /* End dot11fUnpackIeWMMCaps. */
 
-#define SigIeWMMCaps ( 0x0070 )
+#define SigIeWMMCaps ( 0x0074 )
 
 
 tANI_U32 dot11fUnpackIeWMMInfoAp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMInfoAp *pDst)
 {
     tANI_U32 status = DOT11F_PARSE_SUCCESS;
-    tANI_U8 tmp62__;
+    tANI_U8 tmp65__;
     (void) pBuf; (void)ielen; /* Shutup the compiler */
     if (pDst->present) status = DOT11F_DUPLICATE_IE;
     pDst->present = 1;
     pDst->version = *pBuf;
     pBuf += 1;
     ielen -= (tANI_U8)1;
-    tmp62__ = *pBuf;
-    pDst->param_set_count = tmp62__ >> 0 & 0xf;
-    pDst->reserved = tmp62__ >> 4 & 0x7;
-    pDst->uapsd = tmp62__ >> 7 & 0x1;
+    tmp65__ = *pBuf;
+    pDst->param_set_count = tmp65__ >> 0 & 0xf;
+    pDst->reserved = tmp65__ >> 4 & 0x7;
+    pDst->uapsd = tmp65__ >> 7 & 0x1;
     (void)pCtx;
     return status;
 } /* End dot11fUnpackIeWMMInfoAp. */
 
-#define SigIeWMMInfoAp ( 0x0071 )
+#define SigIeWMMInfoAp ( 0x0075 )
 
 
 tANI_U32 dot11fUnpackIeWMMInfoStation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMInfoStation *pDst)
 {
     tANI_U32 status = DOT11F_PARSE_SUCCESS;
-    tANI_U8 tmp63__;
+    tANI_U8 tmp66__;
     (void) pBuf; (void)ielen; /* Shutup the compiler */
     if (pDst->present) status = DOT11F_DUPLICATE_IE;
     pDst->present = 1;
     pDst->version = *pBuf;
     pBuf += 1;
     ielen -= (tANI_U8)1;
-    tmp63__ = *pBuf;
-    pDst->acvo_uapsd = tmp63__ >> 0 & 0x1;
-    pDst->acvi_uapsd = tmp63__ >> 1 & 0x1;
-    pDst->acbk_uapsd = tmp63__ >> 2 & 0x1;
-    pDst->acbe_uapsd = tmp63__ >> 3 & 0x1;
-    pDst->reserved1 = tmp63__ >> 4 & 0x1;
-    pDst->max_sp_length = tmp63__ >> 5 & 0x3;
-    pDst->reserved2 = tmp63__ >> 7 & 0x1;
+    tmp66__ = *pBuf;
+    pDst->acvo_uapsd = tmp66__ >> 0 & 0x1;
+    pDst->acvi_uapsd = tmp66__ >> 1 & 0x1;
+    pDst->acbk_uapsd = tmp66__ >> 2 & 0x1;
+    pDst->acbe_uapsd = tmp66__ >> 3 & 0x1;
+    pDst->reserved1 = tmp66__ >> 4 & 0x1;
+    pDst->max_sp_length = tmp66__ >> 5 & 0x3;
+    pDst->reserved2 = tmp66__ >> 7 & 0x1;
     (void)pCtx;
     return status;
 } /* End dot11fUnpackIeWMMInfoStation. */
 
-#define SigIeWMMInfoStation ( 0x0072 )
+#define SigIeWMMInfoStation ( 0x0076 )
 
 
 tANI_U32 dot11fUnpackIeWMMParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMParams *pDst)
 {
     tANI_U32 status = DOT11F_PARSE_SUCCESS;
-    tANI_U8 tmp64__;
-    tANI_U8 tmp65__;
-    tANI_U8 tmp66__;
     tANI_U8 tmp67__;
     tANI_U8 tmp68__;
     tANI_U8 tmp69__;
     tANI_U8 tmp70__;
     tANI_U8 tmp71__;
+    tANI_U8 tmp72__;
+    tANI_U8 tmp73__;
+    tANI_U8 tmp74__;
     (void) pBuf; (void)ielen; /* Shutup the compiler */
     if (pDst->present) status = DOT11F_DUPLICATE_IE;
     pDst->present = 1;
@@ -4736,69 +4858,69 @@
     pDst->reserved2 = *pBuf;
     pBuf += 1;
     ielen -= (tANI_U8)1;
-    tmp64__ = *pBuf;
-    pBuf += 1;
-    ielen -= 1;
-    pDst->acbe_aifsn = tmp64__ >> 0 & 0xf;
-    pDst->acbe_acm = tmp64__ >> 4 & 0x1;
-    pDst->acbe_aci = tmp64__ >> 5 & 0x3;
-    pDst->unused1 = tmp64__ >> 7 & 0x1;
-    tmp65__ = *pBuf;
-    pBuf += 1;
-    ielen -= 1;
-    pDst->acbe_acwmin = tmp65__ >> 0 & 0xf;
-    pDst->acbe_acwmax = tmp65__ >> 4 & 0xf;
-    framesntohs(pCtx, &pDst->acbe_txoplimit, pBuf, 0);
-    pBuf += 2;
-    ielen -= (tANI_U8)2;
-    tmp66__ = *pBuf;
-    pBuf += 1;
-    ielen -= 1;
-    pDst->acbk_aifsn = tmp66__ >> 0 & 0xf;
-    pDst->acbk_acm = tmp66__ >> 4 & 0x1;
-    pDst->acbk_aci = tmp66__ >> 5 & 0x3;
-    pDst->unused2 = tmp66__ >> 7 & 0x1;
     tmp67__ = *pBuf;
     pBuf += 1;
     ielen -= 1;
-    pDst->acbk_acwmin = tmp67__ >> 0 & 0xf;
-    pDst->acbk_acwmax = tmp67__ >> 4 & 0xf;
-    framesntohs(pCtx, &pDst->acbk_txoplimit, pBuf, 0);
-    pBuf += 2;
-    ielen -= (tANI_U8)2;
+    pDst->acbe_aifsn = tmp67__ >> 0 & 0xf;
+    pDst->acbe_acm = tmp67__ >> 4 & 0x1;
+    pDst->acbe_aci = tmp67__ >> 5 & 0x3;
+    pDst->unused1 = tmp67__ >> 7 & 0x1;
     tmp68__ = *pBuf;
     pBuf += 1;
     ielen -= 1;
-    pDst->acvi_aifsn = tmp68__ >> 0 & 0xf;
-    pDst->acvi_acm = tmp68__ >> 4 & 0x1;
-    pDst->acvi_aci = tmp68__ >> 5 & 0x3;
-    pDst->unused3 = tmp68__ >> 7 & 0x1;
+    pDst->acbe_acwmin = tmp68__ >> 0 & 0xf;
+    pDst->acbe_acwmax = tmp68__ >> 4 & 0xf;
+    framesntohs(pCtx, &pDst->acbe_txoplimit, pBuf, 0);
+    pBuf += 2;
+    ielen -= (tANI_U8)2;
     tmp69__ = *pBuf;
     pBuf += 1;
     ielen -= 1;
-    pDst->acvi_acwmin = tmp69__ >> 0 & 0xf;
-    pDst->acvi_acwmax = tmp69__ >> 4 & 0xf;
-    framesntohs(pCtx, &pDst->acvi_txoplimit, pBuf, 0);
-    pBuf += 2;
-    ielen -= (tANI_U8)2;
+    pDst->acbk_aifsn = tmp69__ >> 0 & 0xf;
+    pDst->acbk_acm = tmp69__ >> 4 & 0x1;
+    pDst->acbk_aci = tmp69__ >> 5 & 0x3;
+    pDst->unused2 = tmp69__ >> 7 & 0x1;
     tmp70__ = *pBuf;
     pBuf += 1;
     ielen -= 1;
-    pDst->acvo_aifsn = tmp70__ >> 0 & 0xf;
-    pDst->acvo_acm = tmp70__ >> 4 & 0x1;
-    pDst->acvo_aci = tmp70__ >> 5 & 0x3;
-    pDst->unused4 = tmp70__ >> 7 & 0x1;
+    pDst->acbk_acwmin = tmp70__ >> 0 & 0xf;
+    pDst->acbk_acwmax = tmp70__ >> 4 & 0xf;
+    framesntohs(pCtx, &pDst->acbk_txoplimit, pBuf, 0);
+    pBuf += 2;
+    ielen -= (tANI_U8)2;
     tmp71__ = *pBuf;
     pBuf += 1;
     ielen -= 1;
-    pDst->acvo_acwmin = tmp71__ >> 0 & 0xf;
-    pDst->acvo_acwmax = tmp71__ >> 4 & 0xf;
+    pDst->acvi_aifsn = tmp71__ >> 0 & 0xf;
+    pDst->acvi_acm = tmp71__ >> 4 & 0x1;
+    pDst->acvi_aci = tmp71__ >> 5 & 0x3;
+    pDst->unused3 = tmp71__ >> 7 & 0x1;
+    tmp72__ = *pBuf;
+    pBuf += 1;
+    ielen -= 1;
+    pDst->acvi_acwmin = tmp72__ >> 0 & 0xf;
+    pDst->acvi_acwmax = tmp72__ >> 4 & 0xf;
+    framesntohs(pCtx, &pDst->acvi_txoplimit, pBuf, 0);
+    pBuf += 2;
+    ielen -= (tANI_U8)2;
+    tmp73__ = *pBuf;
+    pBuf += 1;
+    ielen -= 1;
+    pDst->acvo_aifsn = tmp73__ >> 0 & 0xf;
+    pDst->acvo_acm = tmp73__ >> 4 & 0x1;
+    pDst->acvo_aci = tmp73__ >> 5 & 0x3;
+    pDst->unused4 = tmp73__ >> 7 & 0x1;
+    tmp74__ = *pBuf;
+    pBuf += 1;
+    ielen -= 1;
+    pDst->acvo_acwmin = tmp74__ >> 0 & 0xf;
+    pDst->acvo_acwmax = tmp74__ >> 4 & 0xf;
     framesntohs(pCtx, &pDst->acvo_txoplimit, pBuf, 0);
     (void)pCtx;
     return status;
 } /* End dot11fUnpackIeWMMParams. */
 
-#define SigIeWMMParams ( 0x0073 )
+#define SigIeWMMParams ( 0x0077 )
 
 
 tANI_U32 dot11fUnpackIeWPA(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWPA *pDst)
@@ -4880,7 +5002,7 @@
     return status;
 } /* End dot11fUnpackIeWPA. */
 
-#define SigIeWPA ( 0x0074 )
+#define SigIeWPA ( 0x0078 )
 
 
 tANI_U32 dot11fUnpackIeWPAOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWPAOpaque *pDst)
@@ -4900,7 +5022,7 @@
     return status;
 } /* End dot11fUnpackIeWPAOpaque. */
 
-#define SigIeWPAOpaque ( 0x0075 )
+#define SigIeWPAOpaque ( 0x0079 )
 
 
     static const tTLVDefn TLVS_WSC[ ] = {
@@ -4938,7 +5060,7 @@
     return status;
 } /* End dot11fUnpackIeWSC. */
 
-#define SigIeWSC ( 0x0076 )
+#define SigIeWSC ( 0x007a )
 
 
     static const tTLVDefn TLVS_WscAssocReq[ ] = {
@@ -4957,7 +5079,7 @@
     return status;
 } /* End dot11fUnpackIeWscAssocReq. */
 
-#define SigIeWscAssocReq ( 0x0077 )
+#define SigIeWscAssocReq ( 0x007b )
 
 
     static const tTLVDefn TLVS_WscAssocRes[ ] = {
@@ -4976,7 +5098,7 @@
     return status;
 } /* End dot11fUnpackIeWscAssocRes. */
 
-#define SigIeWscAssocRes ( 0x0078 )
+#define SigIeWscAssocRes ( 0x007c )
 
 
     static const tTLVDefn TLVS_WscBeacon[ ] = {
@@ -5001,7 +5123,7 @@
     return status;
 } /* End dot11fUnpackIeWscBeacon. */
 
-#define SigIeWscBeacon ( 0x0079 )
+#define SigIeWscBeacon ( 0x007d )
 
 
     static const tTLVDefn TLVS_WscBeaconProbeRes[ ] = {
@@ -5034,7 +5156,7 @@
     return status;
 } /* End dot11fUnpackIeWscBeaconProbeRes. */
 
-#define SigIeWscBeaconProbeRes ( 0x007a )
+#define SigIeWscBeaconProbeRes ( 0x007e )
 
 
 tANI_U32 dot11fUnpackIeWscIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWscIEOpaque *pDst)
@@ -5054,7 +5176,7 @@
     return status;
 } /* End dot11fUnpackIeWscIEOpaque. */
 
-#define SigIeWscIEOpaque ( 0x007b )
+#define SigIeWscIEOpaque ( 0x007f )
 
 
     static const tTLVDefn TLVS_WscProbeReq[ ] = {
@@ -5085,7 +5207,7 @@
     return status;
 } /* End dot11fUnpackIeWscProbeReq. */
 
-#define SigIeWscProbeReq ( 0x007c )
+#define SigIeWscProbeReq ( 0x0080 )
 
 
     static const tTLVDefn TLVS_WscProbeRes[ ] = {
@@ -5118,7 +5240,7 @@
     return status;
 } /* End dot11fUnpackIeWscProbeRes. */
 
-#define SigIeWscProbeRes ( 0x007d )
+#define SigIeWscProbeRes ( 0x0081 )
 
 
     static const tTLVDefn TLVS_WscReassocRes[ ] = {
@@ -5137,7 +5259,7 @@
     return status;
 } /* End dot11fUnpackIeWscReassocRes. */
 
-#define SigIeWscReassocRes ( 0x007e )
+#define SigIeWscReassocRes ( 0x0082 )
 
 
     static const tFFDefn FFS_AddBAReq[] = {
@@ -5792,6 +5914,8 @@
         {offsetof(tDot11fAssocRequest, CCXRadMgmtCap), offsetof(tDot11fIECCXRadMgmtCap, present), 0, "CCXRadMgmtCap" , 0, 8, 8, SigIeCCXRadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_CCXRADMGMTCAP, 0, },
         {offsetof(tDot11fAssocRequest, CCXVersion), offsetof(tDot11fIECCXVersion, present), 0, "CCXVersion" , 0, 7, 7, SigIeCCXVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_CCXVERSION, 0, },
         {offsetof(tDot11fAssocRequest, P2PIEOpaque), offsetof(tDot11fIEP2PIEOpaque, present), 0, "P2PIEOpaque" , 0, 8, 255, SigIeP2PIEOpaque, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PIEOPAQUE, 0, },
+        {offsetof(tDot11fAssocRequest, WFDIEOpaque), offsetof(tDot11fIEWFDIEOpaque, present), 0, "WFDIEOpaque" , 0, 8, 255, SigIeWFDIEOpaque, {80, 111, 154, 10, 0}, 4, DOT11F_EID_WFDIEOPAQUE, 0, },
+        {offsetof(tDot11fAssocRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, },
     {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },    };
 
 tANI_U32 dot11fUnpackAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fAssocRequest *pFrm)
@@ -6308,6 +6432,50 @@
             FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("num_data: %d.\n"), pFrm->P2PIEOpaque.num_data);
             FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* ) pFrm->P2PIEOpaque.data, pFrm->P2PIEOpaque.num_data);
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("WFDIEOpaque:\n"));
+        if (!pFrm->WFDIEOpaque.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("num_data: %d.\n"), pFrm->WFDIEOpaque.num_data);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* ) pFrm->WFDIEOpaque.data, pFrm->WFDIEOpaque.num_data);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
     }
 #   endif // DOT11F_DUMP_FRAMES
     return status;
@@ -6343,6 +6511,8 @@
         {offsetof(tDot11fAssocResponse, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, },
         {offsetof(tDot11fAssocResponse, WscAssocRes), offsetof(tDot11fIEWscAssocRes, present), 0, "WscAssocRes" , 0, 6, 37, SigIeWscAssocRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCASSOCRES, 0, },
         {offsetof(tDot11fAssocResponse, P2PAssocRes), offsetof(tDot11fIEP2PAssocRes, present), 0, "P2PAssocRes" , 0, 6, 17, SigIeP2PAssocRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PASSOCRES, 0, },
+        {offsetof(tDot11fAssocResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, },
+        {offsetof(tDot11fAssocResponse, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, },
     {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },    };
 
 tANI_U32 dot11fUnpackAssocResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fAssocResponse *pFrm)
@@ -7344,6 +7514,52 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->P2PAssocRes.ExtendedListenTiming.availibilityInterval, 2);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
     }
 #   endif // DOT11F_DUMP_FRAMES
     return status;
@@ -7792,6 +8008,9 @@
         {offsetof(tDot11fBeacon, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, },
         {offsetof(tDot11fBeacon, WscBeacon), offsetof(tDot11fIEWscBeacon, present), 0, "WscBeacon" , 0, 6, 84, SigIeWscBeacon, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCBEACON, 0, },
         {offsetof(tDot11fBeacon, P2PBeacon), offsetof(tDot11fIEP2PBeacon, present), 0, "P2PBeacon" , 0, 6, 61, SigIeP2PBeacon, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PBEACON, 0, },
+        {offsetof(tDot11fBeacon, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, },
+        {offsetof(tDot11fBeacon, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, },
+        {offsetof(tDot11fBeacon, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, },
     {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },    };
 
 tANI_U32 dot11fUnpackBeacon(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fBeacon *pFrm)
@@ -8738,6 +8957,65 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* ) pFrm->P2PBeacon.NoticeOfAbsence.NoADesc, pFrm->P2PBeacon.NoticeOfAbsence.num_NoADesc);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("VHTExtBssLoad:\n"));
+        if (!pFrm->VHTExtBssLoad.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTExtBssLoad.muMIMOCapStaCount, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTExtBssLoad.ssUnderUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTExtBssLoad.FortyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTExtBssLoad.EightyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTExtBssLoad.OneSixtyMHzUtil, 1);
+        }
     }
 #   endif // DOT11F_DUMP_FRAMES
     return status;
@@ -8867,6 +9145,9 @@
         {offsetof(tDot11fBeacon2, CCXTrafStrmMet), offsetof(tDot11fIECCXTrafStrmMet, present), 0, "CCXTrafStrmMet" , 0, 10, 10, SigIeCCXTrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_CCXTRAFSTRMMET, 0, },
         {offsetof(tDot11fBeacon2, CCXTxmitPower), offsetof(tDot11fIECCXTxmitPower, present), 0, "CCXTxmitPower" , 0, 8, 8, SigIeCCXTxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_CCXTXMITPOWER, 0, },
         {offsetof(tDot11fBeacon2, P2PBeacon), offsetof(tDot11fIEP2PBeacon, present), 0, "P2PBeacon" , 0, 6, 61, SigIeP2PBeacon, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PBEACON, 0, },
+        {offsetof(tDot11fBeacon2, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, },
+        {offsetof(tDot11fBeacon2, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, },
+        {offsetof(tDot11fBeacon2, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, },
     {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },    };
 
 tANI_U32 dot11fUnpackBeacon2(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fBeacon2 *pFrm)
@@ -9669,6 +9950,65 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* ) pFrm->P2PBeacon.NoticeOfAbsence.NoADesc, pFrm->P2PBeacon.NoticeOfAbsence.num_NoADesc);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("VHTExtBssLoad:\n"));
+        if (!pFrm->VHTExtBssLoad.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTExtBssLoad.muMIMOCapStaCount, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTExtBssLoad.ssUnderUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTExtBssLoad.FortyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTExtBssLoad.EightyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTExtBssLoad.OneSixtyMHzUtil, 1);
+        }
     }
 #   endif // DOT11F_DUMP_FRAMES
     return status;
@@ -9718,6 +10058,9 @@
         {offsetof(tDot11fBeaconIEs, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, },
         {offsetof(tDot11fBeaconIEs, WscBeaconProbeRes), offsetof(tDot11fIEWscBeaconProbeRes, present), 0, "WscBeaconProbeRes" , 0, 6, 319, SigIeWscBeaconProbeRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCBEACONPROBERES, 0, },
         {offsetof(tDot11fBeaconIEs, P2PBeaconProbeRes), offsetof(tDot11fIEP2PBeaconProbeRes, present), 0, "P2PBeaconProbeRes" , 0, 6, 1150, SigIeP2PBeaconProbeRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PBEACONPROBERES, 0, },
+        {offsetof(tDot11fBeaconIEs, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, },
+        {offsetof(tDot11fBeaconIEs, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, },
+        {offsetof(tDot11fBeaconIEs, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, },
     {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },    };
 
 tANI_U32 dot11fUnpackBeaconIEs(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fBeaconIEs *pFrm)
@@ -10772,6 +11115,65 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* ) pFrm->P2PBeaconProbeRes.P2PGroupInfo.P2PClientInfoDesc, pFrm->P2PBeaconProbeRes.P2PGroupInfo.num_P2PClientInfoDesc);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("VHTExtBssLoad:\n"));
+        if (!pFrm->VHTExtBssLoad.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTExtBssLoad.muMIMOCapStaCount, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTExtBssLoad.ssUnderUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTExtBssLoad.FortyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTExtBssLoad.EightyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTExtBssLoad.OneSixtyMHzUtil, 1);
+        }
     }
 #   endif // DOT11F_DUMP_FRAMES
     return status;
@@ -12537,6 +12939,7 @@
         {offsetof(tDot11fProbeRequest, WscProbeReq), offsetof(tDot11fIEWscProbeReq, present), 0, "WscProbeReq" , 0, 6, 286, SigIeWscProbeReq, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCPROBEREQ, 0, },
         {offsetof(tDot11fProbeRequest, WFATPC), offsetof(tDot11fIEWFATPC, present), 0, "WFATPC" , 0, 9, 9, SigIeWFATPC, {0, 80, 242, 8, 0}, 5, DOT11F_EID_WFATPC, 0, },
         {offsetof(tDot11fProbeRequest, P2PProbeReq), offsetof(tDot11fIEP2PProbeReq, present), 0, "P2PProbeReq" , 0, 6, 43, SigIeP2PProbeReq, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PPROBEREQ, 0, },
+        {offsetof(tDot11fProbeRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, },
     {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },    };
 
 tANI_U32 dot11fUnpackProbeRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fProbeRequest *pFrm)
@@ -12907,6 +13310,40 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), ( tANI_U8* )&pFrm->P2PProbeReq.OperatingChannel.channel, 1);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
     }
 #   endif // DOT11F_DUMP_FRAMES
     return status;
@@ -12956,6 +13393,9 @@
         {offsetof(tDot11fProbeResponse, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, },
         {offsetof(tDot11fProbeResponse, WscProbeRes), offsetof(tDot11fIEWscProbeRes, present), 0, "WscProbeRes" , 0, 6, 319, SigIeWscProbeRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCPROBERES, 0, },
         {offsetof(tDot11fProbeResponse, P2PProbeRes), offsetof(tDot11fIEP2PProbeRes, present), 0, "P2PProbeRes" , 0, 6, 1141, SigIeP2PProbeRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PPROBERES, 0, },
+        {offsetof(tDot11fProbeResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, },
+        {offsetof(tDot11fProbeResponse, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, },
+        {offsetof(tDot11fProbeResponse, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, },
     {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },    };
 
 tANI_U32 dot11fUnpackProbeResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fProbeResponse *pFrm)
@@ -13987,6 +14427,65 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* ) pFrm->P2PProbeRes.P2PGroupInfo.P2PClientInfoDesc, pFrm->P2PProbeRes.P2PGroupInfo.num_P2PClientInfoDesc);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("VHTExtBssLoad:\n"));
+        if (!pFrm->VHTExtBssLoad.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTExtBssLoad.muMIMOCapStaCount, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTExtBssLoad.ssUnderUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTExtBssLoad.FortyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTExtBssLoad.EightyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTExtBssLoad.OneSixtyMHzUtil, 1);
+        }
     }
 #   endif // DOT11F_DUMP_FRAMES
     return status;
@@ -14359,6 +14858,8 @@
         {offsetof(tDot11fReAssocRequest, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), offsetof(tDot11fReAssocRequest, num_WMMTSPEC), "WMMTSPEC" , 4, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, },
         {offsetof(tDot11fReAssocRequest, CCXTrafStrmRateSet), offsetof(tDot11fIECCXTrafStrmRateSet, present), 0, "CCXTrafStrmRateSet" , 0, 7, 15, SigIeCCXTrafStrmRateSet, {0, 64, 150, 8, 0}, 4, DOT11F_EID_CCXTRAFSTRMRATESET, 0, },
         {offsetof(tDot11fReAssocRequest, P2PIEOpaque), offsetof(tDot11fIEP2PIEOpaque, present), 0, "P2PIEOpaque" , 0, 8, 255, SigIeP2PIEOpaque, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PIEOPAQUE, 0, },
+        {offsetof(tDot11fReAssocRequest, WFDIEOpaque), offsetof(tDot11fIEWFDIEOpaque, present), 0, "WFDIEOpaque" , 0, 8, 255, SigIeWFDIEOpaque, {80, 111, 154, 10, 0}, 4, DOT11F_EID_WFDIEOPAQUE, 0, },
+        {offsetof(tDot11fReAssocRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, },
     {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },    };
 
 tANI_U32 dot11fUnpackReAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fReAssocRequest *pFrm)
@@ -15250,6 +15751,50 @@
             FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("num_data: %d.\n"), pFrm->P2PIEOpaque.num_data);
             FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* ) pFrm->P2PIEOpaque.data, pFrm->P2PIEOpaque.num_data);
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("WFDIEOpaque:\n"));
+        if (!pFrm->WFDIEOpaque.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("num_data: %d.\n"), pFrm->WFDIEOpaque.num_data);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* ) pFrm->WFDIEOpaque.data, pFrm->WFDIEOpaque.num_data);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
     }
 #   endif // DOT11F_DUMP_FRAMES
     return status;
@@ -15286,6 +15831,8 @@
         {offsetof(tDot11fReAssocResponse, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, },
         {offsetof(tDot11fReAssocResponse, WscReassocRes), offsetof(tDot11fIEWscReassocRes, present), 0, "WscReassocRes" , 0, 6, 37, SigIeWscReassocRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCREASSOCRES, 0, },
         {offsetof(tDot11fReAssocResponse, P2PAssocRes), offsetof(tDot11fIEP2PAssocRes, present), 0, "P2PAssocRes" , 0, 6, 17, SigIeP2PAssocRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PASSOCRES, 0, },
+        {offsetof(tDot11fReAssocResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, },
+        {offsetof(tDot11fReAssocResponse, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, },
     {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },    };
 
 tANI_U32 dot11fUnpackReAssocResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fReAssocResponse *pFrm)
@@ -16294,6 +16841,52 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->P2PAssocRes.ExtendedListenTiming.availibilityInterval, 2);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
     }
 #   endif // DOT11F_DUMP_FRAMES
     return status;
@@ -17255,6 +17848,15 @@
                 case SigIeTPCRequest:
                         status |= dot11fUnpackIeTPCRequest(pCtx, pBufRemaining, len, ( tDot11fIETPCRequest* )(pFrm + pIe->offset + sizeof(tDot11fIETPCRequest)*countOffset) );
                             break;
+                case SigIeVHTCaps:
+                        status |= dot11fUnpackIeVHTCaps(pCtx, pBufRemaining, len, ( tDot11fIEVHTCaps* )(pFrm + pIe->offset + sizeof(tDot11fIEVHTCaps)*countOffset) );
+                            break;
+                case SigIeVHTExtBssLoad:
+                        status |= dot11fUnpackIeVHTExtBssLoad(pCtx, pBufRemaining, len, ( tDot11fIEVHTExtBssLoad* )(pFrm + pIe->offset + sizeof(tDot11fIEVHTExtBssLoad)*countOffset) );
+                            break;
+                case SigIeVHTOperation:
+                        status |= dot11fUnpackIeVHTOperation(pCtx, pBufRemaining, len, ( tDot11fIEVHTOperation* )(pFrm + pIe->offset + sizeof(tDot11fIEVHTOperation)*countOffset) );
+                            break;
                 case SigIeWAPI:
                         status |= dot11fUnpackIeWAPI(pCtx, pBufRemaining, len, ( tDot11fIEWAPI* )(pFrm + pIe->offset + sizeof(tDot11fIEWAPI)*countOffset) );
                             break;
@@ -17264,6 +17866,9 @@
                 case SigIeWFATPC:
                         status |= dot11fUnpackIeWFATPC(pCtx, pBufRemaining, len, ( tDot11fIEWFATPC* )(pFrm + pIe->offset + sizeof(tDot11fIEWFATPC)*countOffset) );
                             break;
+                case SigIeWFDIEOpaque:
+                        status |= dot11fUnpackIeWFDIEOpaque(pCtx, pBufRemaining, len, ( tDot11fIEWFDIEOpaque* )(pFrm + pIe->offset + sizeof(tDot11fIEWFDIEOpaque)*countOffset) );
+                            break;
                 case SigIeWMMCaps:
                         status |= dot11fUnpackIeWMMCaps(pCtx, pBufRemaining, len, ( tDot11fIEWMMCaps* )(pFrm + pIe->offset + sizeof(tDot11fIEWMMCaps)*countOffset) );
                             break;
@@ -19317,6 +19922,21 @@
                             byteCount = 0;
                             pIePresent = ( (tDot11fIETPCRequest* )(pFrm + pIe->offset + offset * i  ))->present;
                             break;
+                case SigIeVHTCaps:
+                            offset = sizeof(tDot11fIEVHTCaps);
+                            byteCount = 12;
+                            pIePresent = ( (tDot11fIEVHTCaps* )(pFrm + pIe->offset + offset * i  ))->present;
+                            break;
+                case SigIeVHTExtBssLoad:
+                            offset = sizeof(tDot11fIEVHTExtBssLoad);
+                            byteCount = 5;
+                            pIePresent = ( (tDot11fIEVHTExtBssLoad* )(pFrm + pIe->offset + offset * i  ))->present;
+                            break;
+                case SigIeVHTOperation:
+                            offset = sizeof(tDot11fIEVHTOperation);
+                            byteCount = 5;
+                            pIePresent = ( (tDot11fIEVHTOperation* )(pFrm + pIe->offset + offset * i  ))->present;
+                            break;
                 case SigIeWAPI:
                             offset = sizeof(tDot11fIEWAPI);
                             status |= dot11fGetPackedIEWAPI(pCtx, ( tDot11fIEWAPI* )(pFrm + pIe->offset + offset * i ), pnNeeded);
@@ -19331,6 +19951,11 @@
                             byteCount = 2;
                             pIePresent = ( (tDot11fIEWFATPC* )(pFrm + pIe->offset + offset * i  ))->present;
                             break;
+                case SigIeWFDIEOpaque:
+                            offset = sizeof(tDot11fIEWFDIEOpaque);
+                            byteCount = ((tDot11fIEWFDIEOpaque* )(pFrm + pIe->offset + sizeof(tDot11fIEWFDIEOpaque) * i ))->num_data;
+                            pIePresent = ( (tDot11fIEWFDIEOpaque* )(pFrm + pIe->offset + offset * i  ))->present;
+                            break;
                 case SigIeWMMCaps:
                             offset = sizeof(tDot11fIEWMMCaps);
                             byteCount = 2;
@@ -19649,13 +20274,13 @@
                                    tDot11fFfAddBAParameterSet *pSrc,
                                    tANI_U8 *pBuf)
 {
-    tANI_U16 tmp72__;
-    tmp72__ = 0U;
-    tmp72__ |= ( pSrc->amsduSupported << 0 );
-    tmp72__ |= ( pSrc->policy << 1 );
-    tmp72__ |= ( pSrc->tid << 2 );
-    tmp72__ |= ( pSrc->bufferSize << 6 );
-    frameshtons(pCtx, pBuf, tmp72__, 0);
+    tANI_U16 tmp75__;
+    tmp75__ = 0U;
+    tmp75__ |= ( pSrc->amsduSupported << 0 );
+    tmp75__ |= ( pSrc->policy << 1 );
+    tmp75__ |= ( pSrc->tid << 2 );
+    tmp75__ |= ( pSrc->bufferSize << 6 );
+    frameshtons(pCtx, pBuf, tmp75__, 0);
     (void)pCtx;
 } /* End dot11fPackFfAddBAParameterSet. */
 
@@ -19679,11 +20304,11 @@
                                            tDot11fFfBAStartingSequenceControl *pSrc,
                                            tANI_U8 *pBuf)
 {
-    tANI_U16 tmp73__;
-    tmp73__ = 0U;
-    tmp73__ |= ( pSrc->fragNumber << 0 );
-    tmp73__ |= ( pSrc->ssn << 4 );
-    frameshtons(pCtx, pBuf, tmp73__, 0);
+    tANI_U16 tmp76__;
+    tmp76__ = 0U;
+    tmp76__ |= ( pSrc->fragNumber << 0 );
+    tmp76__ |= ( pSrc->ssn << 4 );
+    frameshtons(pCtx, pBuf, tmp76__, 0);
     (void)pCtx;
 } /* End dot11fPackFfBAStartingSequenceControl. */
 
@@ -19707,25 +20332,25 @@
                               tDot11fFfCapabilities *pSrc,
                               tANI_U8 *pBuf)
 {
-    tANI_U16 tmp74__;
-    tmp74__ = 0U;
-    tmp74__ |= ( pSrc->ess << 0 );
-    tmp74__ |= ( pSrc->ibss << 1 );
-    tmp74__ |= ( pSrc->cfPollable << 2 );
-    tmp74__ |= ( pSrc->cfPollReq << 3 );
-    tmp74__ |= ( pSrc->privacy << 4 );
-    tmp74__ |= ( pSrc->shortPreamble << 5 );
-    tmp74__ |= ( pSrc->pbcc << 6 );
-    tmp74__ |= ( pSrc->channelAgility << 7 );
-    tmp74__ |= ( pSrc->spectrumMgt << 8 );
-    tmp74__ |= ( pSrc->qos << 9 );
-    tmp74__ |= ( pSrc->shortSlotTime << 10 );
-    tmp74__ |= ( pSrc->apsd << 11 );
-    tmp74__ |= ( pSrc->rrm << 12 );
-    tmp74__ |= ( pSrc->dsssOfdm << 13 );
-    tmp74__ |= ( pSrc->delayedBA << 14 );
-    tmp74__ |= ( pSrc->immediateBA << 15 );
-    frameshtons(pCtx, pBuf, tmp74__, 0);
+    tANI_U16 tmp77__;
+    tmp77__ = 0U;
+    tmp77__ |= ( pSrc->ess << 0 );
+    tmp77__ |= ( pSrc->ibss << 1 );
+    tmp77__ |= ( pSrc->cfPollable << 2 );
+    tmp77__ |= ( pSrc->cfPollReq << 3 );
+    tmp77__ |= ( pSrc->privacy << 4 );
+    tmp77__ |= ( pSrc->shortPreamble << 5 );
+    tmp77__ |= ( pSrc->pbcc << 6 );
+    tmp77__ |= ( pSrc->channelAgility << 7 );
+    tmp77__ |= ( pSrc->spectrumMgt << 8 );
+    tmp77__ |= ( pSrc->qos << 9 );
+    tmp77__ |= ( pSrc->shortSlotTime << 10 );
+    tmp77__ |= ( pSrc->apsd << 11 );
+    tmp77__ |= ( pSrc->rrm << 12 );
+    tmp77__ |= ( pSrc->dsssOfdm << 13 );
+    tmp77__ |= ( pSrc->delayedBA << 14 );
+    tmp77__ |= ( pSrc->immediateBA << 15 );
+    frameshtons(pCtx, pBuf, tmp77__, 0);
     (void)pCtx;
 } /* End dot11fPackFfCapabilities. */
 
@@ -19749,12 +20374,12 @@
                                    tDot11fFfDelBAParameterSet *pSrc,
                                    tANI_U8 *pBuf)
 {
-    tANI_U16 tmp75__;
-    tmp75__ = 0U;
-    tmp75__ |= ( pSrc->reserved << 0 );
-    tmp75__ |= ( pSrc->initiator << 11 );
-    tmp75__ |= ( pSrc->tid << 12 );
-    frameshtons(pCtx, pBuf, tmp75__, 0);
+    tANI_U16 tmp78__;
+    tmp78__ = 0U;
+    tmp78__ |= ( pSrc->reserved << 0 );
+    tmp78__ |= ( pSrc->initiator << 11 );
+    tmp78__ |= ( pSrc->tid << 12 );
+    frameshtons(pCtx, pBuf, tmp78__, 0);
     (void)pCtx;
 } /* End dot11fPackFfDelBAParameterSet. */
 
@@ -19850,12 +20475,12 @@
                                 tDot11fFfSMPowerModeSet *pSrc,
                                 tANI_U8 *pBuf)
 {
-    tANI_U8 tmp76__;
-    tmp76__ = 0U;
-    tmp76__ |= ( pSrc->PowerSave_En << 0 );
-    tmp76__ |= ( pSrc->Mode << 1 );
-    tmp76__ |= ( pSrc->reserved << 2 );
-    *pBuf = tmp76__;
+    tANI_U8 tmp79__;
+    tmp79__ = 0U;
+    tmp79__ |= ( pSrc->PowerSave_En << 0 );
+    tmp79__ |= ( pSrc->Mode << 1 );
+    tmp79__ |= ( pSrc->reserved << 2 );
+    *pBuf = tmp79__;
     (void)pCtx;
 } /* End dot11fPackFfSMPowerModeSet. */
 
@@ -19895,19 +20520,19 @@
                         tDot11fFfTSInfo *pSrc,
                         tANI_U8 *pBuf)
 {
-    tANI_U32 tmp77__;
-    tmp77__ = 0U;
-    tmp77__ |= ( pSrc->traffic_type << 0 );
-    tmp77__ |= ( pSrc->tsid << 1 );
-    tmp77__ |= ( pSrc->direction << 5 );
-    tmp77__ |= ( pSrc->access_policy << 7 );
-    tmp77__ |= ( pSrc->aggregation << 9 );
-    tmp77__ |= ( pSrc->psb << 10 );
-    tmp77__ |= ( pSrc->user_priority << 11 );
-    tmp77__ |= ( pSrc->tsinfo_ack_pol << 14 );
-    tmp77__ |= ( pSrc->schedule << 16 );
-    tmp77__ |= ( pSrc->unused << 17 );
-    frameshtonl(pCtx, pBuf, tmp77__, 0);
+    tANI_U32 tmp80__;
+    tmp80__ = 0U;
+    tmp80__ |= ( pSrc->traffic_type << 0 );
+    tmp80__ |= ( pSrc->tsid << 1 );
+    tmp80__ |= ( pSrc->direction << 5 );
+    tmp80__ |= ( pSrc->access_policy << 7 );
+    tmp80__ |= ( pSrc->aggregation << 9 );
+    tmp80__ |= ( pSrc->psb << 10 );
+    tmp80__ |= ( pSrc->user_priority << 11 );
+    tmp80__ |= ( pSrc->tsinfo_ack_pol << 14 );
+    tmp80__ |= ( pSrc->schedule << 16 );
+    tmp80__ |= ( pSrc->unused << 17 );
+    frameshtonl(pCtx, pBuf, tmp80__, 0);
     (void)pCtx;
 } /* End dot11fPackFfTSInfo. */
 
@@ -20004,7 +20629,7 @@
     tANI_U8* pTlvLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp78__;
+    tANI_U8 tmp81__;
     nNeeded += 3;
     if ( nNeeded > nBuf ) return DOT11F_BUFFER_OVERFLOW;
     while ( pSrc->present )
@@ -20013,10 +20638,10 @@
         pBuf += 1; *pnConsumed += 1;
         pTlvLen = pBuf;
         pBuf += 1; *pnConsumed += 1;
-        tmp78__ = 0U;
-        tmp78__ |= ( pSrc->minor << 0 );
-        tmp78__ |= ( pSrc->major << 4 );
-        *pBuf = tmp78__;
+        tmp81__ = 0U;
+        tmp81__ |= ( pSrc->minor << 0 );
+        tmp81__ |= ( pSrc->major << 4 );
+        *pBuf = tmp81__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
@@ -21225,7 +21850,7 @@
     tANI_U8* pTlvLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp79__;
+    tANI_U8 tmp82__;
     nNeeded += 5;
     if ( nNeeded > nBuf ) return DOT11F_BUFFER_OVERFLOW;
     while ( pSrc->present )
@@ -21234,10 +21859,10 @@
         pBuf += 2; *pnConsumed += 2;
         pTlvLen = pBuf;
         pBuf += 2; *pnConsumed += 2;
-        tmp79__ = 0U;
-        tmp79__ |= ( pSrc->minor << 0 );
-        tmp79__ |= ( pSrc->major << 4 );
-        *pBuf = tmp79__;
+        tmp82__ = 0U;
+        tmp82__ |= ( pSrc->minor << 0 );
+        tmp82__ |= ( pSrc->major << 4 );
+        *pBuf = tmp82__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
@@ -21443,7 +22068,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U16 tmp80__;
+    tANI_U16 tmp83__;
     nNeeded  +=  (pSrc->num_key + 11);
     while ( pSrc->present )
     {
@@ -21452,10 +22077,10 @@
         ++pBuf; ++(*pnConsumed);
         pIeLen = pBuf;
         ++pBuf; ++(*pnConsumed);
-        tmp80__ = 0U;
-        tmp80__ |= ( pSrc->keyId << 0 );
-        tmp80__ |= ( pSrc->reserved << 2 );
-        frameshtons(pCtx, pBuf, tmp80__, 0);
+        tmp83__ = 0U;
+        tmp83__ |= ( pSrc->keyId << 0 );
+        tmp83__ |= ( pSrc->reserved << 2 );
+        frameshtons(pCtx, pBuf, tmp83__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
@@ -21712,14 +22337,14 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp81__;
-    tANI_U8 tmp82__;
-    tANI_U8 tmp83__;
     tANI_U8 tmp84__;
     tANI_U8 tmp85__;
     tANI_U8 tmp86__;
     tANI_U8 tmp87__;
     tANI_U8 tmp88__;
+    tANI_U8 tmp89__;
+    tANI_U8 tmp90__;
+    tANI_U8 tmp91__;
     nNeeded  += 18;
     while ( pSrc->present )
     {
@@ -21734,76 +22359,76 @@
         *pBuf = pSrc->reserved;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp81__ = 0U;
-        tmp81__ |= ( pSrc->acbe_aifsn << 0 );
-        tmp81__ |= ( pSrc->acbe_acm << 4 );
-        tmp81__ |= ( pSrc->acbe_aci << 5 );
-        tmp81__ |= ( pSrc->unused1 << 7 );
-        *pBuf = tmp81__;
+        tmp84__ = 0U;
+        tmp84__ |= ( pSrc->acbe_aifsn << 0 );
+        tmp84__ |= ( pSrc->acbe_acm << 4 );
+        tmp84__ |= ( pSrc->acbe_aci << 5 );
+        tmp84__ |= ( pSrc->unused1 << 7 );
+        *pBuf = tmp84__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp82__ = 0U;
-        tmp82__ |= ( pSrc->acbe_min << 0 );
-        tmp82__ |= ( pSrc->acbe_max << 4 );
-        *pBuf = tmp82__;
+        tmp85__ = 0U;
+        tmp85__ |= ( pSrc->acbe_min << 0 );
+        tmp85__ |= ( pSrc->acbe_max << 4 );
+        *pBuf = tmp85__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
         frameshtons(pCtx, pBuf, pSrc->acbe_txoplimit, 0);
         *pnConsumed += 2;
         pBuf += 2;
-        tmp83__ = 0U;
-        tmp83__ |= ( pSrc->acbk_aifsn << 0 );
-        tmp83__ |= ( pSrc->acbk_acm << 4 );
-        tmp83__ |= ( pSrc->acbk_aci << 5 );
-        tmp83__ |= ( pSrc->unused2 << 7 );
-        *pBuf = tmp83__;
+        tmp86__ = 0U;
+        tmp86__ |= ( pSrc->acbk_aifsn << 0 );
+        tmp86__ |= ( pSrc->acbk_acm << 4 );
+        tmp86__ |= ( pSrc->acbk_aci << 5 );
+        tmp86__ |= ( pSrc->unused2 << 7 );
+        *pBuf = tmp86__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp84__ = 0U;
-        tmp84__ |= ( pSrc->acbk_min << 0 );
-        tmp84__ |= ( pSrc->acbk_max << 4 );
-        *pBuf = tmp84__;
+        tmp87__ = 0U;
+        tmp87__ |= ( pSrc->acbk_min << 0 );
+        tmp87__ |= ( pSrc->acbk_max << 4 );
+        *pBuf = tmp87__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
         frameshtons(pCtx, pBuf, pSrc->acbk_txoplimit, 0);
         *pnConsumed += 2;
         pBuf += 2;
-        tmp85__ = 0U;
-        tmp85__ |= ( pSrc->acvi_aifsn << 0 );
-        tmp85__ |= ( pSrc->acvi_acm << 4 );
-        tmp85__ |= ( pSrc->acvi_aci << 5 );
-        tmp85__ |= ( pSrc->unused3 << 7 );
-        *pBuf = tmp85__;
+        tmp88__ = 0U;
+        tmp88__ |= ( pSrc->acvi_aifsn << 0 );
+        tmp88__ |= ( pSrc->acvi_acm << 4 );
+        tmp88__ |= ( pSrc->acvi_aci << 5 );
+        tmp88__ |= ( pSrc->unused3 << 7 );
+        *pBuf = tmp88__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp86__ = 0U;
-        tmp86__ |= ( pSrc->acvi_min << 0 );
-        tmp86__ |= ( pSrc->acvi_max << 4 );
-        *pBuf = tmp86__;
+        tmp89__ = 0U;
+        tmp89__ |= ( pSrc->acvi_min << 0 );
+        tmp89__ |= ( pSrc->acvi_max << 4 );
+        *pBuf = tmp89__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
         frameshtons(pCtx, pBuf, pSrc->acvi_txoplimit, 0);
         *pnConsumed += 2;
         pBuf += 2;
-        tmp87__ = 0U;
-        tmp87__ |= ( pSrc->acvo_aifsn << 0 );
-        tmp87__ |= ( pSrc->acvo_acm << 4 );
-        tmp87__ |= ( pSrc->acvo_aci << 5 );
-        tmp87__ |= ( pSrc->unused4 << 7 );
-        *pBuf = tmp87__;
+        tmp90__ = 0U;
+        tmp90__ |= ( pSrc->acvo_aifsn << 0 );
+        tmp90__ |= ( pSrc->acvo_acm << 4 );
+        tmp90__ |= ( pSrc->acvo_aci << 5 );
+        tmp90__ |= ( pSrc->unused4 << 7 );
+        *pBuf = tmp90__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp88__ = 0U;
-        tmp88__ |= ( pSrc->acvo_min << 0 );
-        tmp88__ |= ( pSrc->acvo_max << 4 );
-        *pBuf = tmp88__;
+        tmp91__ = 0U;
+        tmp91__ |= ( pSrc->acvo_min << 0 );
+        tmp91__ |= ( pSrc->acvo_max << 4 );
+        *pBuf = tmp91__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
@@ -21991,7 +22616,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U16 tmp89__;
+    tANI_U16 tmp92__;
     nNeeded  += 6;
     while ( pSrc->present )
     {
@@ -22006,10 +22631,10 @@
         frameshtons(pCtx, pBuf, pSrc->baPolicy, 0);
         *pnConsumed += 2;
         pBuf += 2;
-        tmp89__ = 0U;
-        tmp89__ |= ( pSrc->baBufferSize << 0 );
-        tmp89__ |= ( pSrc->rsvd << 12 );
-        frameshtons(pCtx, pBuf, tmp89__, 0);
+        tmp92__ = 0U;
+        tmp92__ |= ( pSrc->baBufferSize << 0 );
+        tmp92__ |= ( pSrc->rsvd << 12 );
+        frameshtons(pCtx, pBuf, tmp92__, 0);
         *pnConsumed += 2;
         // fieldsEndFlag  = 1 
         nBuf -=  2 ;
@@ -22428,11 +23053,11 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp90__;
-    tANI_U8 tmp91__;
-    tANI_U8 tmp92__;
     tANI_U8 tmp93__;
     tANI_U8 tmp94__;
+    tANI_U8 tmp95__;
+    tANI_U8 tmp96__;
+    tANI_U8 tmp97__;
     nNeeded  += 5;
     while ( pSrc->present )
     {
@@ -22441,58 +23066,58 @@
         ++pBuf; ++(*pnConsumed);
         pIeLen = pBuf;
         ++pBuf; ++(*pnConsumed);
-        tmp90__ = 0U;
-        tmp90__ |= ( pSrc->LinkMeasurement << 0 );
-        tmp90__ |= ( pSrc->NeighborRpt << 1 );
-        tmp90__ |= ( pSrc->parallel << 2 );
-        tmp90__ |= ( pSrc->repeated << 3 );
-        tmp90__ |= ( pSrc->BeaconPassive << 4 );
-        tmp90__ |= ( pSrc->BeaconActive << 5 );
-        tmp90__ |= ( pSrc->BeaconTable << 6 );
-        tmp90__ |= ( pSrc->BeaconRepCond << 7 );
-        *pBuf = tmp90__;
-        *pnConsumed += 1;
-        pBuf += 1;
-        nBuf -=  1 ;
-        tmp91__ = 0U;
-        tmp91__ |= ( pSrc->FrameMeasurement << 0 );
-        tmp91__ |= ( pSrc->ChannelLoad << 1 );
-        tmp91__ |= ( pSrc->NoiseHistogram << 2 );
-        tmp91__ |= ( pSrc->statistics << 3 );
-        tmp91__ |= ( pSrc->LCIMeasurement << 4 );
-        tmp91__ |= ( pSrc->LCIAzimuth << 5 );
-        tmp91__ |= ( pSrc->TCMCapability << 6 );
-        tmp91__ |= ( pSrc->triggeredTCM << 7 );
-        *pBuf = tmp91__;
-        *pnConsumed += 1;
-        pBuf += 1;
-        nBuf -=  1 ;
-        tmp92__ = 0U;
-        tmp92__ |= ( pSrc->APChanReport << 0 );
-        tmp92__ |= ( pSrc->RRMMIBEnabled << 1 );
-        tmp92__ |= ( pSrc->operatingChanMax << 2 );
-        tmp92__ |= ( pSrc->nonOperatinChanMax << 5 );
-        *pBuf = tmp92__;
-        *pnConsumed += 1;
-        pBuf += 1;
-        nBuf -=  1 ;
         tmp93__ = 0U;
-        tmp93__ |= ( pSrc->MeasurementPilot << 0 );
-        tmp93__ |= ( pSrc->MeasurementPilotEnabled << 3 );
-        tmp93__ |= ( pSrc->NeighborTSFOffset << 4 );
-        tmp93__ |= ( pSrc->RCPIMeasurement << 5 );
-        tmp93__ |= ( pSrc->RSNIMeasurement << 6 );
-        tmp93__ |= ( pSrc->BssAvgAccessDelay << 7 );
+        tmp93__ |= ( pSrc->LinkMeasurement << 0 );
+        tmp93__ |= ( pSrc->NeighborRpt << 1 );
+        tmp93__ |= ( pSrc->parallel << 2 );
+        tmp93__ |= ( pSrc->repeated << 3 );
+        tmp93__ |= ( pSrc->BeaconPassive << 4 );
+        tmp93__ |= ( pSrc->BeaconActive << 5 );
+        tmp93__ |= ( pSrc->BeaconTable << 6 );
+        tmp93__ |= ( pSrc->BeaconRepCond << 7 );
         *pBuf = tmp93__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
         tmp94__ = 0U;
-        tmp94__ |= ( pSrc->BSSAvailAdmission << 0 );
-        tmp94__ |= ( pSrc->AntennaInformation << 1 );
-        tmp94__ |= ( pSrc->reserved << 2 );
+        tmp94__ |= ( pSrc->FrameMeasurement << 0 );
+        tmp94__ |= ( pSrc->ChannelLoad << 1 );
+        tmp94__ |= ( pSrc->NoiseHistogram << 2 );
+        tmp94__ |= ( pSrc->statistics << 3 );
+        tmp94__ |= ( pSrc->LCIMeasurement << 4 );
+        tmp94__ |= ( pSrc->LCIAzimuth << 5 );
+        tmp94__ |= ( pSrc->TCMCapability << 6 );
+        tmp94__ |= ( pSrc->triggeredTCM << 7 );
         *pBuf = tmp94__;
         *pnConsumed += 1;
+        pBuf += 1;
+        nBuf -=  1 ;
+        tmp95__ = 0U;
+        tmp95__ |= ( pSrc->APChanReport << 0 );
+        tmp95__ |= ( pSrc->RRMMIBEnabled << 1 );
+        tmp95__ |= ( pSrc->operatingChanMax << 2 );
+        tmp95__ |= ( pSrc->nonOperatinChanMax << 5 );
+        *pBuf = tmp95__;
+        *pnConsumed += 1;
+        pBuf += 1;
+        nBuf -=  1 ;
+        tmp96__ = 0U;
+        tmp96__ |= ( pSrc->MeasurementPilot << 0 );
+        tmp96__ |= ( pSrc->MeasurementPilotEnabled << 3 );
+        tmp96__ |= ( pSrc->NeighborTSFOffset << 4 );
+        tmp96__ |= ( pSrc->RCPIMeasurement << 5 );
+        tmp96__ |= ( pSrc->RSNIMeasurement << 6 );
+        tmp96__ |= ( pSrc->BssAvgAccessDelay << 7 );
+        *pBuf = tmp96__;
+        *pnConsumed += 1;
+        pBuf += 1;
+        nBuf -=  1 ;
+        tmp97__ = 0U;
+        tmp97__ |= ( pSrc->BSSAvailAdmission << 0 );
+        tmp97__ |= ( pSrc->AntennaInformation << 1 );
+        tmp97__ |= ( pSrc->reserved << 2 );
+        *pBuf = tmp97__;
+        *pnConsumed += 1;
         // fieldsEndFlag  = 1 
         nBuf -=  1 ;
         break;
@@ -22574,7 +23199,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U16 tmp95__;
+    tANI_U16 tmp98__;
     nNeeded  += 14;
     while ( pSrc->present )
     {
@@ -22583,12 +23208,12 @@
         ++pBuf; ++(*pnConsumed);
         pIeLen = pBuf;
         ++pBuf; ++(*pnConsumed);
-        tmp95__ = 0U;
-        tmp95__ |= ( pSrc->aggregation << 0 );
-        tmp95__ |= ( pSrc->tsid << 1 );
-        tmp95__ |= ( pSrc->direction << 5 );
-        tmp95__ |= ( pSrc->reserved << 7 );
-        frameshtons(pCtx, pBuf, tmp95__, 0);
+        tmp98__ = 0U;
+        tmp98__ |= ( pSrc->aggregation << 0 );
+        tmp98__ |= ( pSrc->tsid << 1 );
+        tmp98__ |= ( pSrc->direction << 5 );
+        tmp98__ |= ( pSrc->reserved << 7 );
+        frameshtons(pCtx, pBuf, tmp98__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
@@ -22788,9 +23413,9 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U16 tmp96__;
-    tANI_U8 tmp97__;
-    tANI_U16 tmp98__;
+    tANI_U16 tmp99__;
+    tANI_U8 tmp100__;
+    tANI_U16 tmp101__;
     nNeeded  += 55;
     while ( pSrc->present )
     {
@@ -22799,30 +23424,30 @@
         ++pBuf; ++(*pnConsumed);
         pIeLen = pBuf;
         ++pBuf; ++(*pnConsumed);
-        tmp96__ = 0U;
-        tmp96__ |= ( pSrc->traffic_type << 0 );
-        tmp96__ |= ( pSrc->tsid << 1 );
-        tmp96__ |= ( pSrc->direction << 5 );
-        tmp96__ |= ( pSrc->access_policy << 7 );
-        tmp96__ |= ( pSrc->aggregation << 9 );
-        tmp96__ |= ( pSrc->psb << 10 );
-        tmp96__ |= ( pSrc->user_priority << 11 );
-        tmp96__ |= ( pSrc->tsinfo_ack_pol << 14 );
-        frameshtons(pCtx, pBuf, tmp96__, 0);
+        tmp99__ = 0U;
+        tmp99__ |= ( pSrc->traffic_type << 0 );
+        tmp99__ |= ( pSrc->tsid << 1 );
+        tmp99__ |= ( pSrc->direction << 5 );
+        tmp99__ |= ( pSrc->access_policy << 7 );
+        tmp99__ |= ( pSrc->aggregation << 9 );
+        tmp99__ |= ( pSrc->psb << 10 );
+        tmp99__ |= ( pSrc->user_priority << 11 );
+        tmp99__ |= ( pSrc->tsinfo_ack_pol << 14 );
+        frameshtons(pCtx, pBuf, tmp99__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
-        tmp97__ = 0U;
-        tmp97__ |= ( pSrc->schedule << 0 );
-        tmp97__ |= ( pSrc->unused << 1 );
-        *pBuf = tmp97__;
+        tmp100__ = 0U;
+        tmp100__ |= ( pSrc->schedule << 0 );
+        tmp100__ |= ( pSrc->unused << 1 );
+        *pBuf = tmp100__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp98__ = 0U;
-        tmp98__ |= ( pSrc->size << 0 );
-        tmp98__ |= ( pSrc->fixed << 15 );
-        frameshtons(pCtx, pBuf, tmp98__, 0);
+        tmp101__ = 0U;
+        tmp101__ |= ( pSrc->size << 0 );
+        tmp101__ |= ( pSrc->fixed << 15 );
+        frameshtons(pCtx, pBuf, tmp101__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
@@ -22887,7 +23512,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U16 tmp99__;
+    tANI_U16 tmp102__;
     nNeeded  += 15;
     while ( pSrc->present )
     {
@@ -22909,12 +23534,12 @@
         *pBuf = pSrc->version;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp99__ = 0U;
-        tmp99__ |= ( pSrc->aggregation << 0 );
-        tmp99__ |= ( pSrc->tsid << 1 );
-        tmp99__ |= ( pSrc->direction << 5 );
-        tmp99__ |= ( pSrc->reserved << 7 );
-        frameshtons(pCtx, pBuf, tmp99__, 0);
+        tmp102__ = 0U;
+        tmp102__ |= ( pSrc->aggregation << 0 );
+        tmp102__ |= ( pSrc->tsid << 1 );
+        tmp102__ |= ( pSrc->direction << 5 );
+        tmp102__ |= ( pSrc->reserved << 7 );
+        frameshtons(pCtx, pBuf, tmp102__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
@@ -23153,9 +23778,9 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U16 tmp100__;
-    tANI_U8 tmp101__;
-    tANI_U16 tmp102__;
+    tANI_U16 tmp103__;
+    tANI_U8 tmp104__;
+    tANI_U16 tmp105__;
     nNeeded  += 38;
     while ( pSrc->present )
     {
@@ -23177,30 +23802,30 @@
         *pBuf = pSrc->version;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp100__ = 0U;
-        tmp100__ |= ( pSrc->traffic_type << 0 );
-        tmp100__ |= ( pSrc->tsid << 1 );
-        tmp100__ |= ( pSrc->direction << 5 );
-        tmp100__ |= ( pSrc->access_policy << 7 );
-        tmp100__ |= ( pSrc->aggregation << 9 );
-        tmp100__ |= ( pSrc->psb << 10 );
-        tmp100__ |= ( pSrc->user_priority << 11 );
-        tmp100__ |= ( pSrc->tsinfo_ack_pol << 14 );
-        frameshtons(pCtx, pBuf, tmp100__, 0);
+        tmp103__ = 0U;
+        tmp103__ |= ( pSrc->traffic_type << 0 );
+        tmp103__ |= ( pSrc->tsid << 1 );
+        tmp103__ |= ( pSrc->direction << 5 );
+        tmp103__ |= ( pSrc->access_policy << 7 );
+        tmp103__ |= ( pSrc->aggregation << 9 );
+        tmp103__ |= ( pSrc->psb << 10 );
+        tmp103__ |= ( pSrc->user_priority << 11 );
+        tmp103__ |= ( pSrc->tsinfo_ack_pol << 14 );
+        frameshtons(pCtx, pBuf, tmp103__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
-        tmp101__ = 0U;
-        tmp101__ |= ( pSrc->tsinfo_rsvd << 0 );
-        tmp101__ |= ( pSrc->burst_size_defn << 7 );
-        *pBuf = tmp101__;
+        tmp104__ = 0U;
+        tmp104__ |= ( pSrc->tsinfo_rsvd << 0 );
+        tmp104__ |= ( pSrc->burst_size_defn << 7 );
+        *pBuf = tmp104__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp102__ = 0U;
-        tmp102__ |= ( pSrc->size << 0 );
-        tmp102__ |= ( pSrc->fixed << 15 );
-        frameshtons(pCtx, pBuf, tmp102__, 0);
+        tmp105__ = 0U;
+        tmp105__ |= ( pSrc->size << 0 );
+        tmp105__ |= ( pSrc->fixed << 15 );
+        frameshtons(pCtx, pBuf, tmp105__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
@@ -23345,7 +23970,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp103__;
+    tANI_U8 tmp106__;
     nNeeded  += 2;
     while ( pSrc->present )
     {
@@ -23365,10 +23990,10 @@
         *pBuf = pSrc->mgmt_state;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp103__ = 0U;
-        tmp103__ |= ( pSrc->mbssid_mask << 0 );
-        tmp103__ |= ( pSrc->reserved << 3 );
-        *pBuf = tmp103__;
+        tmp106__ = 0U;
+        tmp106__ |= ( pSrc->mbssid_mask << 0 );
+        tmp106__ |= ( pSrc->reserved << 3 );
+        *pBuf = tmp106__;
         *pnConsumed += 1;
         // fieldsEndFlag  = 1 
         nBuf -=  1 ;
@@ -23728,14 +24353,14 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp104__;
-    tANI_U8 tmp105__;
-    tANI_U8 tmp106__;
     tANI_U8 tmp107__;
     tANI_U8 tmp108__;
     tANI_U8 tmp109__;
     tANI_U8 tmp110__;
     tANI_U8 tmp111__;
+    tANI_U8 tmp112__;
+    tANI_U8 tmp113__;
+    tANI_U8 tmp114__;
     nNeeded  += 18;
     while ( pSrc->present )
     {
@@ -23750,76 +24375,76 @@
         *pBuf = pSrc->reserved;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp104__ = 0U;
-        tmp104__ |= ( pSrc->acbe_aifsn << 0 );
-        tmp104__ |= ( pSrc->acbe_acm << 4 );
-        tmp104__ |= ( pSrc->acbe_aci << 5 );
-        tmp104__ |= ( pSrc->unused1 << 7 );
-        *pBuf = tmp104__;
+        tmp107__ = 0U;
+        tmp107__ |= ( pSrc->acbe_aifsn << 0 );
+        tmp107__ |= ( pSrc->acbe_acm << 4 );
+        tmp107__ |= ( pSrc->acbe_aci << 5 );
+        tmp107__ |= ( pSrc->unused1 << 7 );
+        *pBuf = tmp107__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp105__ = 0U;
-        tmp105__ |= ( pSrc->acbe_acwmin << 0 );
-        tmp105__ |= ( pSrc->acbe_acwmax << 4 );
-        *pBuf = tmp105__;
+        tmp108__ = 0U;
+        tmp108__ |= ( pSrc->acbe_acwmin << 0 );
+        tmp108__ |= ( pSrc->acbe_acwmax << 4 );
+        *pBuf = tmp108__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
         frameshtons(pCtx, pBuf, pSrc->acbe_txoplimit, 0);
         *pnConsumed += 2;
         pBuf += 2;
-        tmp106__ = 0U;
-        tmp106__ |= ( pSrc->acbk_aifsn << 0 );
-        tmp106__ |= ( pSrc->acbk_acm << 4 );
-        tmp106__ |= ( pSrc->acbk_aci << 5 );
-        tmp106__ |= ( pSrc->unused2 << 7 );
-        *pBuf = tmp106__;
+        tmp109__ = 0U;
+        tmp109__ |= ( pSrc->acbk_aifsn << 0 );
+        tmp109__ |= ( pSrc->acbk_acm << 4 );
+        tmp109__ |= ( pSrc->acbk_aci << 5 );
+        tmp109__ |= ( pSrc->unused2 << 7 );
+        *pBuf = tmp109__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp107__ = 0U;
-        tmp107__ |= ( pSrc->acbk_acwmin << 0 );
-        tmp107__ |= ( pSrc->acbk_acwmax << 4 );
-        *pBuf = tmp107__;
+        tmp110__ = 0U;
+        tmp110__ |= ( pSrc->acbk_acwmin << 0 );
+        tmp110__ |= ( pSrc->acbk_acwmax << 4 );
+        *pBuf = tmp110__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
         frameshtons(pCtx, pBuf, pSrc->acbk_txoplimit, 0);
         *pnConsumed += 2;
         pBuf += 2;
-        tmp108__ = 0U;
-        tmp108__ |= ( pSrc->acvi_aifsn << 0 );
-        tmp108__ |= ( pSrc->acvi_acm << 4 );
-        tmp108__ |= ( pSrc->acvi_aci << 5 );
-        tmp108__ |= ( pSrc->unused3 << 7 );
-        *pBuf = tmp108__;
+        tmp111__ = 0U;
+        tmp111__ |= ( pSrc->acvi_aifsn << 0 );
+        tmp111__ |= ( pSrc->acvi_acm << 4 );
+        tmp111__ |= ( pSrc->acvi_aci << 5 );
+        tmp111__ |= ( pSrc->unused3 << 7 );
+        *pBuf = tmp111__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp109__ = 0U;
-        tmp109__ |= ( pSrc->acvi_acwmin << 0 );
-        tmp109__ |= ( pSrc->acvi_acwmax << 4 );
-        *pBuf = tmp109__;
+        tmp112__ = 0U;
+        tmp112__ |= ( pSrc->acvi_acwmin << 0 );
+        tmp112__ |= ( pSrc->acvi_acwmax << 4 );
+        *pBuf = tmp112__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
         frameshtons(pCtx, pBuf, pSrc->acvi_txoplimit, 0);
         *pnConsumed += 2;
         pBuf += 2;
-        tmp110__ = 0U;
-        tmp110__ |= ( pSrc->acvo_aifsn << 0 );
-        tmp110__ |= ( pSrc->acvo_acm << 4 );
-        tmp110__ |= ( pSrc->acvo_aci << 5 );
-        tmp110__ |= ( pSrc->unused4 << 7 );
-        *pBuf = tmp110__;
+        tmp113__ = 0U;
+        tmp113__ |= ( pSrc->acvo_aifsn << 0 );
+        tmp113__ |= ( pSrc->acvo_acm << 4 );
+        tmp113__ |= ( pSrc->acvo_aci << 5 );
+        tmp113__ |= ( pSrc->unused4 << 7 );
+        *pBuf = tmp113__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp111__ = 0U;
-        tmp111__ |= ( pSrc->acvo_acwmin << 0 );
-        tmp111__ |= ( pSrc->acvo_acwmax << 4 );
-        *pBuf = tmp111__;
+        tmp114__ = 0U;
+        tmp114__ |= ( pSrc->acvo_acwmin << 0 );
+        tmp114__ |= ( pSrc->acvo_acwmax << 4 );
+        *pBuf = tmp114__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
@@ -23845,7 +24470,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp112__;
+    tANI_U8 tmp115__;
     nNeeded  += 1;
     while ( pSrc->present )
     {
@@ -23854,12 +24479,12 @@
         ++pBuf; ++(*pnConsumed);
         pIeLen = pBuf;
         ++pBuf; ++(*pnConsumed);
-        tmp112__ = 0U;
-        tmp112__ |= ( pSrc->non_erp_present << 0 );
-        tmp112__ |= ( pSrc->use_prot << 1 );
-        tmp112__ |= ( pSrc->barker_preamble << 2 );
-        tmp112__ |= ( pSrc->unused << 3 );
-        *pBuf = tmp112__;
+        tmp115__ = 0U;
+        tmp115__ |= ( pSrc->non_erp_present << 0 );
+        tmp115__ |= ( pSrc->use_prot << 1 );
+        tmp115__ |= ( pSrc->barker_preamble << 2 );
+        tmp115__ |= ( pSrc->unused << 3 );
+        *pBuf = tmp115__;
         *pnConsumed += 1;
         // fieldsEndFlag  = 1 
         nBuf -=  1 ;
@@ -24056,7 +24681,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U16 tmp113__;
+    tANI_U16 tmp116__;
     tANI_U32 status = DOT11F_PARSE_SUCCESS;
     status = dot11fGetPackedIEFTInfo(pCtx, pSrc, &nNeeded);
     if ( ! DOT11F_SUCCEEDED( status ) ) return status;
@@ -24067,10 +24692,10 @@
         ++pBuf; --nBuf; ++(*pnConsumed);
         pIeLen = pBuf;
         ++pBuf; --nBuf; ++(*pnConsumed);
-        tmp113__ = 0U;
-        tmp113__ |= ( pSrc->reserved << 0 );
-        tmp113__ |= ( pSrc->IECount << 8 );
-        frameshtons(pCtx, pBuf, tmp113__, 0);
+        tmp116__ = 0U;
+        tmp116__ |= ( pSrc->reserved << 0 );
+        tmp116__ |= ( pSrc->IECount << 8 );
+        frameshtons(pCtx, pBuf, tmp116__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
@@ -24142,11 +24767,11 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U16 tmp114__;
-    tANI_U8 tmp115__;
-    tANI_U16 tmp116__;
-    tANI_U32 tmp117__;
+    tANI_U16 tmp117__;
     tANI_U8 tmp118__;
+    tANI_U16 tmp119__;
+    tANI_U32 tmp120__;
+    tANI_U8 tmp121__;
     nNeeded  +=  (pSrc->num_rsvd + 26);
     while ( pSrc->present )
     {
@@ -24155,77 +24780,77 @@
         ++pBuf; ++(*pnConsumed);
         pIeLen = pBuf;
         ++pBuf; ++(*pnConsumed);
-        tmp114__ = 0U;
-        tmp114__ |= ( pSrc->advCodingCap << 0 );
-        tmp114__ |= ( pSrc->supportedChannelWidthSet << 1 );
-        tmp114__ |= ( pSrc->mimoPowerSave << 2 );
-        tmp114__ |= ( pSrc->greenField << 4 );
-        tmp114__ |= ( pSrc->shortGI20MHz << 5 );
-        tmp114__ |= ( pSrc->shortGI40MHz << 6 );
-        tmp114__ |= ( pSrc->txSTBC << 7 );
-        tmp114__ |= ( pSrc->rxSTBC << 8 );
-        tmp114__ |= ( pSrc->delayedBA << 10 );
-        tmp114__ |= ( pSrc->maximalAMSDUsize << 11 );
-        tmp114__ |= ( pSrc->dsssCckMode40MHz << 12 );
-        tmp114__ |= ( pSrc->psmp << 13 );
-        tmp114__ |= ( pSrc->stbcControlFrame << 14 );
-        tmp114__ |= ( pSrc->lsigTXOPProtection << 15 );
-        frameshtons(pCtx, pBuf, tmp114__, 0);
+        tmp117__ = 0U;
+        tmp117__ |= ( pSrc->advCodingCap << 0 );
+        tmp117__ |= ( pSrc->supportedChannelWidthSet << 1 );
+        tmp117__ |= ( pSrc->mimoPowerSave << 2 );
+        tmp117__ |= ( pSrc->greenField << 4 );
+        tmp117__ |= ( pSrc->shortGI20MHz << 5 );
+        tmp117__ |= ( pSrc->shortGI40MHz << 6 );
+        tmp117__ |= ( pSrc->txSTBC << 7 );
+        tmp117__ |= ( pSrc->rxSTBC << 8 );
+        tmp117__ |= ( pSrc->delayedBA << 10 );
+        tmp117__ |= ( pSrc->maximalAMSDUsize << 11 );
+        tmp117__ |= ( pSrc->dsssCckMode40MHz << 12 );
+        tmp117__ |= ( pSrc->psmp << 13 );
+        tmp117__ |= ( pSrc->stbcControlFrame << 14 );
+        tmp117__ |= ( pSrc->lsigTXOPProtection << 15 );
+        frameshtons(pCtx, pBuf, tmp117__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
-        tmp115__ = 0U;
-        tmp115__ |= ( pSrc->maxRxAMPDUFactor << 0 );
-        tmp115__ |= ( pSrc->mpduDensity << 2 );
-        tmp115__ |= ( pSrc->reserved1 << 5 );
-        *pBuf = tmp115__;
+        tmp118__ = 0U;
+        tmp118__ |= ( pSrc->maxRxAMPDUFactor << 0 );
+        tmp118__ |= ( pSrc->mpduDensity << 2 );
+        tmp118__ |= ( pSrc->reserved1 << 5 );
+        *pBuf = tmp118__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
         DOT11F_MEMCPY(pCtx, pBuf, pSrc->supportedMCSSet, 16);
         *pnConsumed += 16;
         pBuf += 16;
-        tmp116__ = 0U;
-        tmp116__ |= ( pSrc->pco << 0 );
-        tmp116__ |= ( pSrc->transitionTime << 1 );
-        tmp116__ |= ( pSrc->reserved2 << 3 );
-        tmp116__ |= ( pSrc->mcsFeedback << 8 );
-        tmp116__ |= ( pSrc->reserved3 << 10 );
-        frameshtons(pCtx, pBuf, tmp116__, 0);
+        tmp119__ = 0U;
+        tmp119__ |= ( pSrc->pco << 0 );
+        tmp119__ |= ( pSrc->transitionTime << 1 );
+        tmp119__ |= ( pSrc->reserved2 << 3 );
+        tmp119__ |= ( pSrc->mcsFeedback << 8 );
+        tmp119__ |= ( pSrc->reserved3 << 10 );
+        frameshtons(pCtx, pBuf, tmp119__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
-        tmp117__ = 0U;
-        tmp117__ |= ( pSrc->txBF << 0 );
-        tmp117__ |= ( pSrc->rxStaggeredSounding << 1 );
-        tmp117__ |= ( pSrc->txStaggeredSounding << 2 );
-        tmp117__ |= ( pSrc->rxZLF << 3 );
-        tmp117__ |= ( pSrc->txZLF << 4 );
-        tmp117__ |= ( pSrc->implicitTxBF << 5 );
-        tmp117__ |= ( pSrc->calibration << 6 );
-        tmp117__ |= ( pSrc->explicitCSITxBF << 8 );
-        tmp117__ |= ( pSrc->explicitUncompressedSteeringMatrix << 9 );
-        tmp117__ |= ( pSrc->explicitBFCSIFeedback << 10 );
-        tmp117__ |= ( pSrc->explicitUncompressedSteeringMatrixFeedback << 13 );
-        tmp117__ |= ( pSrc->explicitCompressedSteeringMatrixFeedback << 16 );
-        tmp117__ |= ( pSrc->csiNumBFAntennae << 19 );
-        tmp117__ |= ( pSrc->uncompressedSteeringMatrixBFAntennae << 21 );
-        tmp117__ |= ( pSrc->compressedSteeringMatrixBFAntennae << 23 );
-        tmp117__ |= ( pSrc->reserved4 << 25 );
-        frameshtonl(pCtx, pBuf, tmp117__, 0);
+        tmp120__ = 0U;
+        tmp120__ |= ( pSrc->txBF << 0 );
+        tmp120__ |= ( pSrc->rxStaggeredSounding << 1 );
+        tmp120__ |= ( pSrc->txStaggeredSounding << 2 );
+        tmp120__ |= ( pSrc->rxZLF << 3 );
+        tmp120__ |= ( pSrc->txZLF << 4 );
+        tmp120__ |= ( pSrc->implicitTxBF << 5 );
+        tmp120__ |= ( pSrc->calibration << 6 );
+        tmp120__ |= ( pSrc->explicitCSITxBF << 8 );
+        tmp120__ |= ( pSrc->explicitUncompressedSteeringMatrix << 9 );
+        tmp120__ |= ( pSrc->explicitBFCSIFeedback << 10 );
+        tmp120__ |= ( pSrc->explicitUncompressedSteeringMatrixFeedback << 13 );
+        tmp120__ |= ( pSrc->explicitCompressedSteeringMatrixFeedback << 16 );
+        tmp120__ |= ( pSrc->csiNumBFAntennae << 19 );
+        tmp120__ |= ( pSrc->uncompressedSteeringMatrixBFAntennae << 21 );
+        tmp120__ |= ( pSrc->compressedSteeringMatrixBFAntennae << 23 );
+        tmp120__ |= ( pSrc->reserved4 << 25 );
+        frameshtonl(pCtx, pBuf, tmp120__, 0);
         *pnConsumed += 4;
         pBuf += 4;
         nBuf -=  4 ;
-        tmp118__ = 0U;
-        tmp118__ |= ( pSrc->antennaSelection << 0 );
-        tmp118__ |= ( pSrc->explicitCSIFeedbackTx << 1 );
-        tmp118__ |= ( pSrc->antennaIndicesFeedbackTx << 2 );
-        tmp118__ |= ( pSrc->explicitCSIFeedback << 3 );
-        tmp118__ |= ( pSrc->antennaIndicesFeedback << 4 );
-        tmp118__ |= ( pSrc->rxAS << 5 );
-        tmp118__ |= ( pSrc->txSoundingPPDUs << 6 );
-        tmp118__ |= ( pSrc->reserved5 << 7 );
-        *pBuf = tmp118__;
+        tmp121__ = 0U;
+        tmp121__ |= ( pSrc->antennaSelection << 0 );
+        tmp121__ |= ( pSrc->explicitCSIFeedbackTx << 1 );
+        tmp121__ |= ( pSrc->antennaIndicesFeedbackTx << 2 );
+        tmp121__ |= ( pSrc->explicitCSIFeedback << 3 );
+        tmp121__ |= ( pSrc->antennaIndicesFeedback << 4 );
+        tmp121__ |= ( pSrc->rxAS << 5 );
+        tmp121__ |= ( pSrc->txSoundingPPDUs << 6 );
+        tmp121__ |= ( pSrc->reserved5 << 7 );
+        *pBuf = tmp121__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
@@ -24251,9 +24876,9 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp119__;
-    tANI_U16 tmp120__;
-    tANI_U16 tmp121__;
+    tANI_U8 tmp122__;
+    tANI_U16 tmp123__;
+    tANI_U16 tmp124__;
     nNeeded  +=  (pSrc->num_rsvd + 22);
     while ( pSrc->present )
     {
@@ -24265,35 +24890,35 @@
         *pBuf = pSrc->primaryChannel;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp119__ = 0U;
-        tmp119__ |= ( pSrc->secondaryChannelOffset << 0 );
-        tmp119__ |= ( pSrc->recommendedTxWidthSet << 2 );
-        tmp119__ |= ( pSrc->rifsMode << 3 );
-        tmp119__ |= ( pSrc->controlledAccessOnly << 4 );
-        tmp119__ |= ( pSrc->serviceIntervalGranularity << 5 );
-        *pBuf = tmp119__;
+        tmp122__ = 0U;
+        tmp122__ |= ( pSrc->secondaryChannelOffset << 0 );
+        tmp122__ |= ( pSrc->recommendedTxWidthSet << 2 );
+        tmp122__ |= ( pSrc->rifsMode << 3 );
+        tmp122__ |= ( pSrc->controlledAccessOnly << 4 );
+        tmp122__ |= ( pSrc->serviceIntervalGranularity << 5 );
+        *pBuf = tmp122__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp120__ = 0U;
-        tmp120__ |= ( pSrc->opMode << 0 );
-        tmp120__ |= ( pSrc->nonGFDevicesPresent << 2 );
-        tmp120__ |= ( pSrc->transmitBurstLimit << 3 );
-        tmp120__ |= ( pSrc->obssNonHTStaPresent << 4 );
-        tmp120__ |= ( pSrc->reserved << 5 );
-        frameshtons(pCtx, pBuf, tmp120__, 0);
+        tmp123__ = 0U;
+        tmp123__ |= ( pSrc->opMode << 0 );
+        tmp123__ |= ( pSrc->nonGFDevicesPresent << 2 );
+        tmp123__ |= ( pSrc->transmitBurstLimit << 3 );
+        tmp123__ |= ( pSrc->obssNonHTStaPresent << 4 );
+        tmp123__ |= ( pSrc->reserved << 5 );
+        frameshtons(pCtx, pBuf, tmp123__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
-        tmp121__ = 0U;
-        tmp121__ |= ( pSrc->basicSTBCMCS << 0 );
-        tmp121__ |= ( pSrc->dualCTSProtection << 7 );
-        tmp121__ |= ( pSrc->secondaryBeacon << 8 );
-        tmp121__ |= ( pSrc->lsigTXOPProtectionFullSupport << 9 );
-        tmp121__ |= ( pSrc->pcoActive << 10 );
-        tmp121__ |= ( pSrc->pcoPhase << 11 );
-        tmp121__ |= ( pSrc->reserved2 << 12 );
-        frameshtons(pCtx, pBuf, tmp121__, 0);
+        tmp124__ = 0U;
+        tmp124__ |= ( pSrc->basicSTBCMCS << 0 );
+        tmp124__ |= ( pSrc->dualCTSProtection << 7 );
+        tmp124__ |= ( pSrc->secondaryBeacon << 8 );
+        tmp124__ |= ( pSrc->lsigTXOPProtectionFullSupport << 9 );
+        tmp124__ |= ( pSrc->pcoActive << 10 );
+        tmp124__ |= ( pSrc->pcoPhase << 11 );
+        tmp124__ |= ( pSrc->reserved2 << 12 );
+        frameshtons(pCtx, pBuf, tmp124__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
@@ -24352,9 +24977,9 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp122__;
-    tANI_U8 tmp123__;
-    tANI_U8 tmp124__;
+    tANI_U8 tmp125__;
+    tANI_U8 tmp126__;
+    tANI_U8 tmp127__;
     tANI_U32 status = DOT11F_PARSE_SUCCESS;
     status = dot11fGetPackedIEMeasurementReport(pCtx, pSrc, &nNeeded);
     if ( ! DOT11F_SUCCEEDED( status ) ) return status;
@@ -24368,12 +24993,12 @@
         *pBuf = pSrc->token;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp122__ = 0U;
-        tmp122__ |= ( pSrc->late << 0 );
-        tmp122__ |= ( pSrc->incapable << 1 );
-        tmp122__ |= ( pSrc->refused << 2 );
-        tmp122__ |= ( pSrc->unused << 3 );
-        *pBuf = tmp122__;
+        tmp125__ = 0U;
+        tmp125__ |= ( pSrc->late << 0 );
+        tmp125__ |= ( pSrc->incapable << 1 );
+        tmp125__ |= ( pSrc->refused << 2 );
+        tmp125__ |= ( pSrc->unused << 3 );
+        *pBuf = tmp125__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
@@ -24393,14 +25018,14 @@
                     frameshtons(pCtx, pBuf, pSrc->report.Basic.meas_duration, 0);
                     *pnConsumed += 2;
                     pBuf += 2;
-                    tmp123__ = 0U;
-                    tmp123__ |= ( pSrc->report.Basic.bss << 0 );
-                    tmp123__ |= ( pSrc->report.Basic.ofdm_preamble << 1 );
-                    tmp123__ |= ( pSrc->report.Basic.unid_signal << 2 );
-                    tmp123__ |= ( pSrc->report.Basic.rader << 3 );
-                    tmp123__ |= ( pSrc->report.Basic.unmeasured << 4 );
-                    tmp123__ |= ( pSrc->report.Basic.unused << 5 );
-                    *pBuf = tmp123__;
+                    tmp126__ = 0U;
+                    tmp126__ |= ( pSrc->report.Basic.bss << 0 );
+                    tmp126__ |= ( pSrc->report.Basic.ofdm_preamble << 1 );
+                    tmp126__ |= ( pSrc->report.Basic.unid_signal << 2 );
+                    tmp126__ |= ( pSrc->report.Basic.rader << 3 );
+                    tmp126__ |= ( pSrc->report.Basic.unmeasured << 4 );
+                    tmp126__ |= ( pSrc->report.Basic.unused << 5 );
+                    *pBuf = tmp126__;
                     *pnConsumed += 1;
                     // fieldsEndFlag  = 1 
                     nBuf -=  1 ;
@@ -24467,10 +25092,10 @@
                     frameshtons(pCtx, pBuf, pSrc->report.Beacon.meas_duration, 0);
                     *pnConsumed += 2;
                     pBuf += 2;
-                    tmp124__ = 0U;
-                    tmp124__ |= ( pSrc->report.Beacon.condensed_PHY << 0 );
-                    tmp124__ |= ( pSrc->report.Beacon.reported_frame_type << 7 );
-                    *pBuf = tmp124__;
+                    tmp127__ = 0U;
+                    tmp127__ |= ( pSrc->report.Beacon.condensed_PHY << 0 );
+                    tmp127__ |= ( pSrc->report.Beacon.reported_frame_type << 7 );
+                    *pBuf = tmp127__;
                     *pnConsumed += 1;
                     pBuf += 1;
                     nBuf -=  1 ;
@@ -24519,7 +25144,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp125__;
+    tANI_U8 tmp128__;
     tANI_U32 status = DOT11F_PARSE_SUCCESS;
     status = dot11fGetPackedIEMeasurementRequest(pCtx, pSrc, &nNeeded);
     if ( ! DOT11F_SUCCEEDED( status ) ) return status;
@@ -24533,14 +25158,14 @@
         *pBuf = pSrc->measurement_token;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp125__ = 0U;
-        tmp125__ |= ( pSrc->parallel << 0 );
-        tmp125__ |= ( pSrc->enable << 1 );
-        tmp125__ |= ( pSrc->request << 2 );
-        tmp125__ |= ( pSrc->report << 3 );
-        tmp125__ |= ( pSrc->durationMandatory << 4 );
-        tmp125__ |= ( pSrc->unused << 5 );
-        *pBuf = tmp125__;
+        tmp128__ = 0U;
+        tmp128__ |= ( pSrc->parallel << 0 );
+        tmp128__ |= ( pSrc->enable << 1 );
+        tmp128__ |= ( pSrc->request << 2 );
+        tmp128__ |= ( pSrc->report << 3 );
+        tmp128__ |= ( pSrc->durationMandatory << 4 );
+        tmp128__ |= ( pSrc->unused << 5 );
+        *pBuf = tmp128__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
@@ -24629,7 +25254,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp126__;
+    tANI_U8 tmp129__;
     nNeeded  += 3;
     while ( pSrc->present )
     {
@@ -24641,11 +25266,11 @@
         frameshtons(pCtx, pBuf, pSrc->MDID, 0);
         *pnConsumed += 2;
         pBuf += 2;
-        tmp126__ = 0U;
-        tmp126__ |= ( pSrc->overDSCap << 0 );
-        tmp126__ |= ( pSrc->resourceReqCap << 1 );
-        tmp126__ |= ( pSrc->reserved << 2 );
-        *pBuf = tmp126__;
+        tmp129__ = 0U;
+        tmp129__ |= ( pSrc->overDSCap << 0 );
+        tmp129__ |= ( pSrc->resourceReqCap << 1 );
+        tmp129__ |= ( pSrc->reserved << 2 );
+        *pBuf = tmp129__;
         *pnConsumed += 1;
         // fieldsEndFlag  = 1 
         nBuf -=  1 ;
@@ -24668,8 +25293,8 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp127__;
-    tANI_U8 tmp128__;
+    tANI_U8 tmp130__;
+    tANI_U8 tmp131__;
     tANI_U32 status = DOT11F_PARSE_SUCCESS;
     status = dot11fGetPackedIENeighborReport(pCtx, pSrc, &nNeeded);
     if ( ! DOT11F_SUCCEEDED( status ) ) return status;
@@ -24683,24 +25308,24 @@
         DOT11F_MEMCPY(pCtx, pBuf, pSrc->bssid, 6);
         *pnConsumed += 6;
         pBuf += 6;
-        tmp127__ = 0U;
-        tmp127__ |= ( pSrc->APReachability << 0 );
-        tmp127__ |= ( pSrc->Security << 2 );
-        tmp127__ |= ( pSrc->KeyScope << 3 );
-        tmp127__ |= ( pSrc->SpecMgmtCap << 4 );
-        tmp127__ |= ( pSrc->QosCap << 5 );
-        tmp127__ |= ( pSrc->apsd << 6 );
-        tmp127__ |= ( pSrc->rrm << 7 );
-        *pBuf = tmp127__;
+        tmp130__ = 0U;
+        tmp130__ |= ( pSrc->APReachability << 0 );
+        tmp130__ |= ( pSrc->Security << 2 );
+        tmp130__ |= ( pSrc->KeyScope << 3 );
+        tmp130__ |= ( pSrc->SpecMgmtCap << 4 );
+        tmp130__ |= ( pSrc->QosCap << 5 );
+        tmp130__ |= ( pSrc->apsd << 6 );
+        tmp130__ |= ( pSrc->rrm << 7 );
+        *pBuf = tmp130__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp128__ = 0U;
-        tmp128__ |= ( pSrc->DelayedBA << 0 );
-        tmp128__ |= ( pSrc->ImmBA << 1 );
-        tmp128__ |= ( pSrc->MobilityDomain << 2 );
-        tmp128__ |= ( pSrc->reserved << 3 );
-        *pBuf = tmp128__;
+        tmp131__ = 0U;
+        tmp131__ |= ( pSrc->DelayedBA << 0 );
+        tmp131__ |= ( pSrc->ImmBA << 1 );
+        tmp131__ |= ( pSrc->MobilityDomain << 2 );
+        tmp131__ |= ( pSrc->reserved << 3 );
+        *pBuf = tmp131__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
@@ -25739,7 +26364,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp129__;
+    tANI_U8 tmp132__;
     nNeeded  += 1;
     while ( pSrc->present )
     {
@@ -25748,13 +26373,13 @@
         ++pBuf; ++(*pnConsumed);
         pIeLen = pBuf;
         ++pBuf; ++(*pnConsumed);
-        tmp129__ = 0U;
-        tmp129__ |= ( pSrc->reserved << 0 );
-        tmp129__ |= ( pSrc->txopreq << 1 );
-        tmp129__ |= ( pSrc->qreq << 2 );
-        tmp129__ |= ( pSrc->qack << 3 );
-        tmp129__ |= ( pSrc->count << 4 );
-        *pBuf = tmp129__;
+        tmp132__ = 0U;
+        tmp132__ |= ( pSrc->reserved << 0 );
+        tmp132__ |= ( pSrc->txopreq << 1 );
+        tmp132__ |= ( pSrc->qreq << 2 );
+        tmp132__ |= ( pSrc->qack << 3 );
+        tmp132__ |= ( pSrc->count << 4 );
+        *pBuf = tmp132__;
         *pnConsumed += 1;
         // fieldsEndFlag  = 1 
         nBuf -=  1 ;
@@ -25777,7 +26402,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp130__;
+    tANI_U8 tmp133__;
     nNeeded  += 1;
     while ( pSrc->present )
     {
@@ -25786,15 +26411,15 @@
         ++pBuf; ++(*pnConsumed);
         pIeLen = pBuf;
         ++pBuf; ++(*pnConsumed);
-        tmp130__ = 0U;
-        tmp130__ |= ( pSrc->more_data_ack << 0 );
-        tmp130__ |= ( pSrc->max_sp_length << 1 );
-        tmp130__ |= ( pSrc->qack << 3 );
-        tmp130__ |= ( pSrc->acbe_uapsd << 4 );
-        tmp130__ |= ( pSrc->acbk_uapsd << 5 );
-        tmp130__ |= ( pSrc->acvi_uapsd << 6 );
-        tmp130__ |= ( pSrc->acvo_uapsd << 7 );
-        *pBuf = tmp130__;
+        tmp133__ = 0U;
+        tmp133__ |= ( pSrc->more_data_ack << 0 );
+        tmp133__ |= ( pSrc->max_sp_length << 1 );
+        tmp133__ |= ( pSrc->qack << 3 );
+        tmp133__ |= ( pSrc->acbe_uapsd << 4 );
+        tmp133__ |= ( pSrc->acbk_uapsd << 5 );
+        tmp133__ |= ( pSrc->acvi_uapsd << 6 );
+        tmp133__ |= ( pSrc->acvo_uapsd << 7 );
+        *pBuf = tmp133__;
         *pnConsumed += 1;
         // fieldsEndFlag  = 1 
         nBuf -=  1 ;
@@ -25912,7 +26537,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U16 tmp131__;
+    tANI_U16 tmp134__;
     tANI_U32 status = DOT11F_PARSE_SUCCESS;
     status = dot11fGetPackedIERSN(pCtx, pSrc, &nNeeded);
     if ( ! DOT11F_SUCCEEDED( status ) ) return status;
@@ -25947,13 +26572,13 @@
         DOT11F_MEMCPY(pCtx, pBuf, &( pSrc->akm_suites ), ( pSrc->akm_suite_count * 4 ));
         *pnConsumed += ( pSrc->akm_suite_count * 4 );
         pBuf += ( pSrc->akm_suite_count * 4 );
-        tmp131__ = 0U;
-        tmp131__ |= ( pSrc->preauth << 0 );
-        tmp131__ |= ( pSrc->no_pwise << 1 );
-        tmp131__ |= ( pSrc->PTKSA_replay_counter << 2 );
-        tmp131__ |= ( pSrc->GTKSA_replay_counter << 4 );
-        tmp131__ |= ( pSrc->reserved << 6 );
-        frameshtons(pCtx, pBuf, tmp131__, 0);
+        tmp134__ = 0U;
+        tmp134__ |= ( pSrc->preauth << 0 );
+        tmp134__ |= ( pSrc->no_pwise << 1 );
+        tmp134__ |= ( pSrc->PTKSA_replay_counter << 2 );
+        tmp134__ |= ( pSrc->GTKSA_replay_counter << 4 );
+        tmp134__ |= ( pSrc->reserved << 6 );
+        frameshtons(pCtx, pBuf, tmp134__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
@@ -26195,6 +26820,162 @@
     return DOT11F_PARSE_SUCCESS;
 } /* End dot11fPackIeTPCRequest. */
 
+tANI_U32 dot11fPackIeVHTCaps(tpAniSirGlobal pCtx,
+                             tDot11fIEVHTCaps *pSrc,
+                             tANI_U8 *pBuf,
+                             tANI_U32 nBuf,
+                             tANI_U32 *pnConsumed)
+{
+    tANI_U8* pIeLen = 0;
+    tANI_U32 nConsumedOnEntry = *pnConsumed;
+    tANI_U32 nNeeded = 0U;
+    tANI_U32 tmp135__;
+    tANI_U16 tmp136__;
+    tANI_U16 tmp137__;
+    nNeeded  += 12;
+    while ( pSrc->present )
+    {
+        if ( nNeeded > nBuf ) return DOT11F_BUFFER_OVERFLOW;
+        *pBuf = 191;
+        ++pBuf; ++(*pnConsumed);
+        pIeLen = pBuf;
+        ++pBuf; ++(*pnConsumed);
+        tmp135__ = 0U;
+        tmp135__ |= ( pSrc->maxMPDULen << 0 );
+        tmp135__ |= ( pSrc->supportedChannelWidthSet << 2 );
+        tmp135__ |= ( pSrc->ldpcCodingCap << 4 );
+        tmp135__ |= ( pSrc->shortGI80MHz << 5 );
+        tmp135__ |= ( pSrc->shortGI160and80plus80MHz << 6 );
+        tmp135__ |= ( pSrc->txSTBC << 7 );
+        tmp135__ |= ( pSrc->rxSTBC << 8 );
+        tmp135__ |= ( pSrc->suBeamFormerCap << 11 );
+        tmp135__ |= ( pSrc->suBeamformeeCap << 12 );
+        tmp135__ |= ( pSrc->csnofBeamformerAntSup << 13 );
+        tmp135__ |= ( pSrc->numSoundingDim << 16 );
+        tmp135__ |= ( pSrc->muBeamformerCap << 19 );
+        tmp135__ |= ( pSrc->muBeamformeeCap << 20 );
+        tmp135__ |= ( pSrc->vhtTXOPPS << 21 );
+        tmp135__ |= ( pSrc->htcVHTCap << 22 );
+        tmp135__ |= ( pSrc->maxAMPDULenExp << 23 );
+        tmp135__ |= ( pSrc->vhtLinkAdaptCap << 26 );
+        tmp135__ |= ( pSrc->rxAntPattern << 28 );
+        tmp135__ |= ( pSrc->txAntPattern << 29 );
+        tmp135__ |= ( pSrc->reserved1 << 30 );
+        frameshtonl(pCtx, pBuf, tmp135__, 0);
+        *pnConsumed += 4;
+        pBuf += 4;
+        nBuf -=  4 ;
+        frameshtons(pCtx, pBuf, pSrc->rxMCSMap, 0);
+        *pnConsumed += 2;
+        pBuf += 2;
+        tmp136__ = 0U;
+        tmp136__ |= ( pSrc->rxHighSupDataRate << 0 );
+        tmp136__ |= ( pSrc->reserved2 << 13 );
+        frameshtons(pCtx, pBuf, tmp136__, 0);
+        *pnConsumed += 2;
+        pBuf += 2;
+        nBuf -=  2 ;
+        frameshtons(pCtx, pBuf, pSrc->txMCSMap, 0);
+        *pnConsumed += 2;
+        pBuf += 2;
+        tmp137__ = 0U;
+        tmp137__ |= ( pSrc->txSupDataRate << 0 );
+        tmp137__ |= ( pSrc->reserved3 << 13 );
+        frameshtons(pCtx, pBuf, tmp137__, 0);
+        *pnConsumed += 2;
+        // fieldsEndFlag  = 1 
+        nBuf -=  2 ;
+        break;
+    }
+    (void)pCtx;
+    if (pIeLen)
+    {
+        *pIeLen = *pnConsumed - nConsumedOnEntry - 2;
+    }
+    return DOT11F_PARSE_SUCCESS;
+} /* End dot11fPackIeVHTCaps. */
+
+tANI_U32 dot11fPackIeVHTExtBssLoad(tpAniSirGlobal pCtx,
+                                   tDot11fIEVHTExtBssLoad *pSrc,
+                                   tANI_U8 *pBuf,
+                                   tANI_U32 nBuf,
+                                   tANI_U32 *pnConsumed)
+{
+    tANI_U8* pIeLen = 0;
+    tANI_U32 nConsumedOnEntry = *pnConsumed;
+    tANI_U32 nNeeded = 0U;
+    nNeeded  += 5;
+    while ( pSrc->present )
+    {
+        if ( nNeeded > nBuf ) return DOT11F_BUFFER_OVERFLOW;
+        *pBuf = 193;
+        ++pBuf; ++(*pnConsumed);
+        pIeLen = pBuf;
+        ++pBuf; ++(*pnConsumed);
+        *pBuf = pSrc->muMIMOCapStaCount;
+        *pnConsumed += 1;
+        pBuf += 1;
+        *pBuf = pSrc->ssUnderUtil;
+        *pnConsumed += 1;
+        pBuf += 1;
+        *pBuf = pSrc->FortyMHzUtil;
+        *pnConsumed += 1;
+        pBuf += 1;
+        *pBuf = pSrc->EightyMHzUtil;
+        *pnConsumed += 1;
+        pBuf += 1;
+        *pBuf = pSrc->OneSixtyMHzUtil;
+        *pnConsumed += 1;
+        // fieldsEndFlag = 1 
+        break;
+    }
+    (void)pCtx;
+    if (pIeLen)
+    {
+        *pIeLen = *pnConsumed - nConsumedOnEntry - 2;
+    }
+    return DOT11F_PARSE_SUCCESS;
+} /* End dot11fPackIeVHTExtBssLoad. */
+
+tANI_U32 dot11fPackIeVHTOperation(tpAniSirGlobal pCtx,
+                                  tDot11fIEVHTOperation *pSrc,
+                                  tANI_U8 *pBuf,
+                                  tANI_U32 nBuf,
+                                  tANI_U32 *pnConsumed)
+{
+    tANI_U8* pIeLen = 0;
+    tANI_U32 nConsumedOnEntry = *pnConsumed;
+    tANI_U32 nNeeded = 0U;
+    nNeeded  += 5;
+    while ( pSrc->present )
+    {
+        if ( nNeeded > nBuf ) return DOT11F_BUFFER_OVERFLOW;
+        *pBuf = 192;
+        ++pBuf; ++(*pnConsumed);
+        pIeLen = pBuf;
+        ++pBuf; ++(*pnConsumed);
+        *pBuf = pSrc->chanWidth;
+        *pnConsumed += 1;
+        pBuf += 1;
+        *pBuf = pSrc->chanCenterFreqSeg1;
+        *pnConsumed += 1;
+        pBuf += 1;
+        *pBuf = pSrc->chanCenterFreqSeg2;
+        *pnConsumed += 1;
+        pBuf += 1;
+        frameshtons(pCtx, pBuf, pSrc->basicMCSSet, 0);
+        *pnConsumed += 2;
+        // fieldsEndFlag = 1 
+        break;
+    }
+    (void)pCtx;
+    if (pIeLen)
+    {
+        *pIeLen = *pnConsumed - nConsumedOnEntry - 2;
+    }
+    return DOT11F_PARSE_SUCCESS;
+} /* End dot11fPackIeVHTOperation. */
+
 tANI_U32 dot11fPackIeWAPI(tpAniSirGlobal pCtx,
                           tDot11fIEWAPI *pSrc,
                           tANI_U8 *pBuf,
@@ -26204,7 +26985,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U16 tmp132__;
+    tANI_U16 tmp138__;
     tANI_U32 status = DOT11F_PARSE_SUCCESS;
     status = dot11fGetPackedIEWAPI(pCtx, pSrc, &nNeeded);
     if ( ! DOT11F_SUCCEEDED( status ) ) return status;
@@ -26233,10 +27014,10 @@
         DOT11F_MEMCPY(pCtx, pBuf, pSrc->multicast_cipher_suite, 4);
         *pnConsumed += 4;
         pBuf += 4;
-        tmp132__ = 0U;
-        tmp132__ |= ( pSrc->preauth << 0 );
-        tmp132__ |= ( pSrc->reserved << 1 );
-        frameshtons(pCtx, pBuf, tmp132__, 0);
+        tmp138__ = 0U;
+        tmp138__ |= ( pSrc->preauth << 0 );
+        tmp138__ |= ( pSrc->reserved << 1 );
+        frameshtons(pCtx, pBuf, tmp138__, 0);
         *pnConsumed += 2;
         pBuf += 2;
         nBuf -=  2 ;
@@ -26332,6 +27113,44 @@
     return DOT11F_PARSE_SUCCESS;
 } /* End dot11fPackIeWFATPC. */
 
+tANI_U32 dot11fPackIeWFDIEOpaque(tpAniSirGlobal pCtx,
+                                 tDot11fIEWFDIEOpaque *pSrc,
+                                 tANI_U8 *pBuf,
+                                 tANI_U32 nBuf,
+                                 tANI_U32 *pnConsumed)
+{
+    tANI_U8* pIeLen = 0;
+    tANI_U32 nConsumedOnEntry = *pnConsumed;
+    tANI_U32 nNeeded = 0U;
+    nNeeded  +=  pSrc->num_data;
+    while ( pSrc->present )
+    {
+        if ( nNeeded > nBuf ) return DOT11F_BUFFER_OVERFLOW;
+        *pBuf = 221;
+        ++pBuf; ++(*pnConsumed);
+        pIeLen = pBuf;
+        ++pBuf; ++(*pnConsumed);
+        *pBuf = 0x50;
+        ++pBuf; ++(*pnConsumed);
+        *pBuf = 0x6f;
+        ++pBuf; ++(*pnConsumed);
+        *pBuf = 0x9a;
+        ++pBuf; ++(*pnConsumed);
+        *pBuf = 0xa;
+        ++pBuf; ++(*pnConsumed);
+        DOT11F_MEMCPY(pCtx, pBuf, &( pSrc->data ), pSrc->num_data);
+        *pnConsumed += pSrc->num_data;
+        // fieldsEndFlag = 1 
+        break;
+    }
+    (void)pCtx;
+    if (pIeLen)
+    {
+        *pIeLen = *pnConsumed - nConsumedOnEntry - 2;
+    }
+    return DOT11F_PARSE_SUCCESS;
+} /* End dot11fPackIeWFDIEOpaque. */
+
 tANI_U32 dot11fPackIeWMMCaps(tpAniSirGlobal pCtx,
                              tDot11fIEWMMCaps *pSrc,
                              tANI_U8 *pBuf,
@@ -26341,7 +27160,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp133__;
+    tANI_U8 tmp139__;
     nNeeded  += 2;
     while ( pSrc->present )
     {
@@ -26363,13 +27182,13 @@
         *pBuf = pSrc->version;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp133__ = 0U;
-        tmp133__ |= ( pSrc->reserved << 0 );
-        tmp133__ |= ( pSrc->qack << 4 );
-        tmp133__ |= ( pSrc->queue_request << 5 );
-        tmp133__ |= ( pSrc->txop_request << 6 );
-        tmp133__ |= ( pSrc->more_ack << 7 );
-        *pBuf = tmp133__;
+        tmp139__ = 0U;
+        tmp139__ |= ( pSrc->reserved << 0 );
+        tmp139__ |= ( pSrc->qack << 4 );
+        tmp139__ |= ( pSrc->queue_request << 5 );
+        tmp139__ |= ( pSrc->txop_request << 6 );
+        tmp139__ |= ( pSrc->more_ack << 7 );
+        *pBuf = tmp139__;
         *pnConsumed += 1;
         // fieldsEndFlag  = 1 
         nBuf -=  1 ;
@@ -26392,7 +27211,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp134__;
+    tANI_U8 tmp140__;
     nNeeded  += 2;
     while ( pSrc->present )
     {
@@ -26414,11 +27233,11 @@
         *pBuf = pSrc->version;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp134__ = 0U;
-        tmp134__ |= ( pSrc->param_set_count << 0 );
-        tmp134__ |= ( pSrc->reserved << 4 );
-        tmp134__ |= ( pSrc->uapsd << 7 );
-        *pBuf = tmp134__;
+        tmp140__ = 0U;
+        tmp140__ |= ( pSrc->param_set_count << 0 );
+        tmp140__ |= ( pSrc->reserved << 4 );
+        tmp140__ |= ( pSrc->uapsd << 7 );
+        *pBuf = tmp140__;
         *pnConsumed += 1;
         // fieldsEndFlag  = 1 
         nBuf -=  1 ;
@@ -26441,7 +27260,7 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp135__;
+    tANI_U8 tmp141__;
     nNeeded  += 2;
     while ( pSrc->present )
     {
@@ -26463,15 +27282,15 @@
         *pBuf = pSrc->version;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp135__ = 0U;
-        tmp135__ |= ( pSrc->acvo_uapsd << 0 );
-        tmp135__ |= ( pSrc->acvi_uapsd << 1 );
-        tmp135__ |= ( pSrc->acbk_uapsd << 2 );
-        tmp135__ |= ( pSrc->acbe_uapsd << 3 );
-        tmp135__ |= ( pSrc->reserved1 << 4 );
-        tmp135__ |= ( pSrc->max_sp_length << 5 );
-        tmp135__ |= ( pSrc->reserved2 << 7 );
-        *pBuf = tmp135__;
+        tmp141__ = 0U;
+        tmp141__ |= ( pSrc->acvo_uapsd << 0 );
+        tmp141__ |= ( pSrc->acvi_uapsd << 1 );
+        tmp141__ |= ( pSrc->acbk_uapsd << 2 );
+        tmp141__ |= ( pSrc->acbe_uapsd << 3 );
+        tmp141__ |= ( pSrc->reserved1 << 4 );
+        tmp141__ |= ( pSrc->max_sp_length << 5 );
+        tmp141__ |= ( pSrc->reserved2 << 7 );
+        *pBuf = tmp141__;
         *pnConsumed += 1;
         // fieldsEndFlag  = 1 
         nBuf -=  1 ;
@@ -26494,14 +27313,14 @@
     tANI_U8* pIeLen = 0;
     tANI_U32 nConsumedOnEntry = *pnConsumed;
     tANI_U32 nNeeded = 0U;
-    tANI_U8 tmp136__;
-    tANI_U8 tmp137__;
-    tANI_U8 tmp138__;
-    tANI_U8 tmp139__;
-    tANI_U8 tmp140__;
-    tANI_U8 tmp141__;
     tANI_U8 tmp142__;
     tANI_U8 tmp143__;
+    tANI_U8 tmp144__;
+    tANI_U8 tmp145__;
+    tANI_U8 tmp146__;
+    tANI_U8 tmp147__;
+    tANI_U8 tmp148__;
+    tANI_U8 tmp149__;
     nNeeded  += 19;
     while ( pSrc->present )
     {
@@ -26529,76 +27348,76 @@
         *pBuf = pSrc->reserved2;
         *pnConsumed += 1;
         pBuf += 1;
-        tmp136__ = 0U;
-        tmp136__ |= ( pSrc->acbe_aifsn << 0 );
-        tmp136__ |= ( pSrc->acbe_acm << 4 );
-        tmp136__ |= ( pSrc->acbe_aci << 5 );
-        tmp136__ |= ( pSrc->unused1 << 7 );
-        *pBuf = tmp136__;
+        tmp142__ = 0U;
+        tmp142__ |= ( pSrc->acbe_aifsn << 0 );
+        tmp142__ |= ( pSrc->acbe_acm << 4 );
+        tmp142__ |= ( pSrc->acbe_aci << 5 );
+        tmp142__ |= ( pSrc->unused1 << 7 );
+        *pBuf = tmp142__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp137__ = 0U;
-        tmp137__ |= ( pSrc->acbe_acwmin << 0 );
-        tmp137__ |= ( pSrc->acbe_acwmax << 4 );
-        *pBuf = tmp137__;
+        tmp143__ = 0U;
+        tmp143__ |= ( pSrc->acbe_acwmin << 0 );
+        tmp143__ |= ( pSrc->acbe_acwmax << 4 );
+        *pBuf = tmp143__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
         frameshtons(pCtx, pBuf, pSrc->acbe_txoplimit, 0);
         *pnConsumed += 2;
         pBuf += 2;
-        tmp138__ = 0U;
-        tmp138__ |= ( pSrc->acbk_aifsn << 0 );
-        tmp138__ |= ( pSrc->acbk_acm << 4 );
-        tmp138__ |= ( pSrc->acbk_aci << 5 );
-        tmp138__ |= ( pSrc->unused2 << 7 );
-        *pBuf = tmp138__;
+        tmp144__ = 0U;
+        tmp144__ |= ( pSrc->acbk_aifsn << 0 );
+        tmp144__ |= ( pSrc->acbk_acm << 4 );
+        tmp144__ |= ( pSrc->acbk_aci << 5 );
+        tmp144__ |= ( pSrc->unused2 << 7 );
+        *pBuf = tmp144__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp139__ = 0U;
-        tmp139__ |= ( pSrc->acbk_acwmin << 0 );
-        tmp139__ |= ( pSrc->acbk_acwmax << 4 );
-        *pBuf = tmp139__;
+        tmp145__ = 0U;
+        tmp145__ |= ( pSrc->acbk_acwmin << 0 );
+        tmp145__ |= ( pSrc->acbk_acwmax << 4 );
+        *pBuf = tmp145__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
         frameshtons(pCtx, pBuf, pSrc->acbk_txoplimit, 0);
         *pnConsumed += 2;
         pBuf += 2;
-        tmp140__ = 0U;
-        tmp140__ |= ( pSrc->acvi_aifsn << 0 );
-        tmp140__ |= ( pSrc->acvi_acm << 4 );
-        tmp140__ |= ( pSrc->acvi_aci << 5 );
-        tmp140__ |= ( pSrc->unused3 << 7 );
-        *pBuf = tmp140__;
+        tmp146__ = 0U;
+        tmp146__ |= ( pSrc->acvi_aifsn << 0 );
+        tmp146__ |= ( pSrc->acvi_acm << 4 );
+        tmp146__ |= ( pSrc->acvi_aci << 5 );
+        tmp146__ |= ( pSrc->unused3 << 7 );
+        *pBuf = tmp146__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp141__ = 0U;
-        tmp141__ |= ( pSrc->acvi_acwmin << 0 );
-        tmp141__ |= ( pSrc->acvi_acwmax << 4 );
-        *pBuf = tmp141__;
+        tmp147__ = 0U;
+        tmp147__ |= ( pSrc->acvi_acwmin << 0 );
+        tmp147__ |= ( pSrc->acvi_acwmax << 4 );
+        *pBuf = tmp147__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
         frameshtons(pCtx, pBuf, pSrc->acvi_txoplimit, 0);
         *pnConsumed += 2;
         pBuf += 2;
-        tmp142__ = 0U;
-        tmp142__ |= ( pSrc->acvo_aifsn << 0 );
-        tmp142__ |= ( pSrc->acvo_acm << 4 );
-        tmp142__ |= ( pSrc->acvo_aci << 5 );
-        tmp142__ |= ( pSrc->unused4 << 7 );
-        *pBuf = tmp142__;
+        tmp148__ = 0U;
+        tmp148__ |= ( pSrc->acvo_aifsn << 0 );
+        tmp148__ |= ( pSrc->acvo_acm << 4 );
+        tmp148__ |= ( pSrc->acvo_aci << 5 );
+        tmp148__ |= ( pSrc->unused4 << 7 );
+        *pBuf = tmp148__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
-        tmp143__ = 0U;
-        tmp143__ |= ( pSrc->acvo_acwmin << 0 );
-        tmp143__ |= ( pSrc->acvo_acwmax << 4 );
-        *pBuf = tmp143__;
+        tmp149__ = 0U;
+        tmp149__ |= ( pSrc->acvo_acwmin << 0 );
+        tmp149__ |= ( pSrc->acvo_acwmax << 4 );
+        *pBuf = tmp149__;
         *pnConsumed += 1;
         pBuf += 1;
         nBuf -=  1 ;
@@ -28183,6 +29002,50 @@
             FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("num_data: %d.\n"), pFrm->P2PIEOpaque.num_data);
             FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* ) pFrm->P2PIEOpaque.data, pFrm->P2PIEOpaque.num_data);
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("WFDIEOpaque:\n"));
+        if (!pFrm->WFDIEOpaque.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("num_data: %d.\n"), pFrm->WFDIEOpaque.num_data);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* ) pFrm->WFDIEOpaque.data, pFrm->WFDIEOpaque.num_data);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
         FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("to:\n"));
         FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), pBuf, nBuf);
     }
@@ -29189,6 +30052,52 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->P2PAssocRes.ExtendedListenTiming.availibilityInterval, 2);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
         FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), FRFL("to:\n"));
         FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCRESPONSE), pBuf, nBuf);
     }
@@ -30522,6 +31431,65 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* ) pFrm->P2PBeacon.NoticeOfAbsence.NoADesc, pFrm->P2PBeacon.NoticeOfAbsence.num_NoADesc);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("VHTExtBssLoad:\n"));
+        if (!pFrm->VHTExtBssLoad.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTExtBssLoad.muMIMOCapStaCount, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTExtBssLoad.ssUnderUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTExtBssLoad.FortyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTExtBssLoad.EightyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->VHTExtBssLoad.OneSixtyMHzUtil, 1);
+        }
         FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("to:\n"));
         FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), pBuf, nBuf);
     }
@@ -31408,6 +32376,65 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* ) pFrm->P2PBeacon.NoticeOfAbsence.NoADesc, pFrm->P2PBeacon.NoticeOfAbsence.num_NoADesc);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("VHTExtBssLoad:\n"));
+        if (!pFrm->VHTExtBssLoad.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTExtBssLoad.muMIMOCapStaCount, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTExtBssLoad.ssUnderUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTExtBssLoad.FortyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTExtBssLoad.EightyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->VHTExtBssLoad.OneSixtyMHzUtil, 1);
+        }
         FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("to:\n"));
         FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), pBuf, nBuf);
     }
@@ -32467,6 +33494,65 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* ) pFrm->P2PBeaconProbeRes.P2PGroupInfo.P2PClientInfoDesc, pFrm->P2PBeaconProbeRes.P2PGroupInfo.num_P2PClientInfoDesc);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("VHTExtBssLoad:\n"));
+        if (!pFrm->VHTExtBssLoad.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTExtBssLoad.muMIMOCapStaCount, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTExtBssLoad.ssUnderUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTExtBssLoad.FortyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTExtBssLoad.EightyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->VHTExtBssLoad.OneSixtyMHzUtil, 1);
+        }
         FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("to:\n"));
         FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), pBuf, nBuf);
     }
@@ -34344,6 +35430,40 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), ( tANI_U8* )&pFrm->P2PProbeReq.OperatingChannel.channel, 1);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
         FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), FRFL("to:\n"));
         FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBEREQUEST), pBuf, nBuf);
     }
@@ -35380,6 +36500,65 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* ) pFrm->P2PProbeRes.P2PGroupInfo.P2PClientInfoDesc, pFrm->P2PProbeRes.P2PGroupInfo.num_P2PClientInfoDesc);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("VHTExtBssLoad:\n"));
+        if (!pFrm->VHTExtBssLoad.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTExtBssLoad.muMIMOCapStaCount, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTExtBssLoad.ssUnderUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTExtBssLoad.FortyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTExtBssLoad.EightyMHzUtil, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->VHTExtBssLoad.OneSixtyMHzUtil, 1);
+        }
         FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("to:\n"));
         FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), pBuf, nBuf);
     }
@@ -36565,6 +37744,50 @@
             FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("num_data: %d.\n"), pFrm->P2PIEOpaque.num_data);
             FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* ) pFrm->P2PIEOpaque.data, pFrm->P2PIEOpaque.num_data);
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("WFDIEOpaque:\n"));
+        if (!pFrm->WFDIEOpaque.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("num_data: %d.\n"), pFrm->WFDIEOpaque.num_data);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* ) pFrm->WFDIEOpaque.data, pFrm->WFDIEOpaque.num_data);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
         FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), FRFL("to:\n"));
         FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCREQUEST), pBuf, nBuf);
     }
@@ -37578,6 +38801,52 @@
                 FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->P2PAssocRes.ExtendedListenTiming.availibilityInterval, 2);
             }
         }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("VHTCaps:\n"));
+        if (!pFrm->VHTCaps.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("maxMPDULen (2): %d\n"), pFrm->VHTCaps.maxMPDULen);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("supportedChannelWidthSet (2): %d\n"), pFrm->VHTCaps.supportedChannelWidthSet);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("ldpcCodingCap (1): %d\n"), pFrm->VHTCaps.ldpcCodingCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("shortGI80MHz (1): %d\n"), pFrm->VHTCaps.shortGI80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("shortGI160and80plus80MHz (1): %d\n"), pFrm->VHTCaps.shortGI160and80plus80MHz);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("txSTBC (1): %d\n"), pFrm->VHTCaps.txSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("rxSTBC (3): %d\n"), pFrm->VHTCaps.rxSTBC);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("suBeamFormerCap (1): %d\n"), pFrm->VHTCaps.suBeamFormerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("suBeamformeeCap (1): %d\n"), pFrm->VHTCaps.suBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("csnofBeamformerAntSup (3): %d\n"), pFrm->VHTCaps.csnofBeamformerAntSup);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("numSoundingDim (3): %d\n"), pFrm->VHTCaps.numSoundingDim);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("muBeamformerCap (1): %d\n"), pFrm->VHTCaps.muBeamformerCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("muBeamformeeCap (1): %d\n"), pFrm->VHTCaps.muBeamformeeCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("vhtTXOPPS (1): %d\n"), pFrm->VHTCaps.vhtTXOPPS);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("htcVHTCap (1): %d\n"), pFrm->VHTCaps.htcVHTCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("maxAMPDULenExp (3): %d\n"), pFrm->VHTCaps.maxAMPDULenExp);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("vhtLinkAdaptCap (2): %d\n"), pFrm->VHTCaps.vhtLinkAdaptCap);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("rxAntPattern (1): %d\n"), pFrm->VHTCaps.rxAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("txAntPattern (1): %d\n"), pFrm->VHTCaps.txAntPattern);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("reserved1 (2): %d\n"), pFrm->VHTCaps.reserved1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTCaps.rxMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("rxHighSupDataRate (13): %d\n"), pFrm->VHTCaps.rxHighSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("reserved2 (3): %d\n"), pFrm->VHTCaps.reserved2);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTCaps.txMCSMap, 2);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("txSupDataRate (13): %d\n"), pFrm->VHTCaps.txSupDataRate);
+            FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("reserved3 (3): %d\n"), pFrm->VHTCaps.reserved3);
+        }
+        FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("VHTOperation:\n"));
+        if (!pFrm->VHTOperation.present)
+        {
+            FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("Not present.\n"));
+        }
+        else
+        {
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanWidth, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg1, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.chanCenterFreqSeg2, 1);
+            FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), ( tANI_U8* )&pFrm->VHTOperation.basicMCSSet, 2);
+        }
         FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), FRFL("to:\n"));
         FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_REASSOCRESPONSE), pBuf, nBuf);
     }
@@ -38387,6 +39656,15 @@
                     case SigIeTPCRequest:
                         status |= dot11fPackIeTPCRequest(pCtx, ( tDot11fIETPCRequest* )(pSrc + pIe->offset + sizeof(tDot11fIETPCRequest) * i ),  pBufRemaining, nBufRemaining, &len);
                         break;
+                    case SigIeVHTCaps:
+                        status |= dot11fPackIeVHTCaps(pCtx, ( tDot11fIEVHTCaps* )(pSrc + pIe->offset + sizeof(tDot11fIEVHTCaps) * i ),  pBufRemaining, nBufRemaining, &len);
+                        break;
+                    case SigIeVHTExtBssLoad:
+                        status |= dot11fPackIeVHTExtBssLoad(pCtx, ( tDot11fIEVHTExtBssLoad* )(pSrc + pIe->offset + sizeof(tDot11fIEVHTExtBssLoad) * i ),  pBufRemaining, nBufRemaining, &len);
+                        break;
+                    case SigIeVHTOperation:
+                        status |= dot11fPackIeVHTOperation(pCtx, ( tDot11fIEVHTOperation* )(pSrc + pIe->offset + sizeof(tDot11fIEVHTOperation) * i ),  pBufRemaining, nBufRemaining, &len);
+                        break;
                     case SigIeWAPI:
                         status |= dot11fPackIeWAPI(pCtx, ( tDot11fIEWAPI* )(pSrc + pIe->offset + sizeof(tDot11fIEWAPI) * i ),  pBufRemaining, nBufRemaining, &len);
                         break;
@@ -38396,6 +39674,9 @@
                     case SigIeWFATPC:
                         status |= dot11fPackIeWFATPC(pCtx, ( tDot11fIEWFATPC* )(pSrc + pIe->offset + sizeof(tDot11fIEWFATPC) * i ),  pBufRemaining, nBufRemaining, &len);
                         break;
+                    case SigIeWFDIEOpaque:
+                        status |= dot11fPackIeWFDIEOpaque(pCtx, ( tDot11fIEWFDIEOpaque* )(pSrc + pIe->offset + sizeof(tDot11fIEWFDIEOpaque) * i ),  pBufRemaining, nBufRemaining, &len);
+                        break;
                     case SigIeWMMCaps:
                         status |= dot11fPackIeWMMCaps(pCtx, ( tDot11fIEWMMCaps* )(pSrc + pIe->offset + sizeof(tDot11fIEWMMCaps) * i ),  pBufRemaining, nBufRemaining, &len);
                         break;
diff --git a/CORE/SYS/legacy/src/utils/src/macTrace.c b/CORE/SYS/legacy/src/utils/src/macTrace.c
index 96f4885..dc72941 100644
--- a/CORE/SYS/legacy/src/utils/src/macTrace.c
+++ b/CORE/SYS/legacy/src/utils/src/macTrace.c
@@ -324,9 +324,6 @@
 {
     switch( limMsg )
     {
-         CASE_RETURN_STRING(SIR_LIM_RESUME_ACTIVITY_NTF);
-        CASE_RETURN_STRING(SIR_LIM_SUSPEND_ACTIVITY_REQ );
-        CASE_RETURN_STRING(SIR_HAL_SUSPEND_ACTIVITY_RSP );
         CASE_RETURN_STRING(SIR_LIM_RETRY_INTERRUPT_MSG);
         CASE_RETURN_STRING(SIR_BB_XPORT_MGMT_MSG );
         CASE_RETURN_STRING(SIR_LIM_INV_KEY_INTERRUPT_MSG );
diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c
index 16d2730..106fa55 100644
--- a/CORE/SYS/legacy/src/utils/src/parserApi.c
+++ b/CORE/SYS/legacy/src/utils/src/parserApi.c
@@ -267,22 +267,24 @@
 
 void
 PopulateDot11fChanSwitchAnn(tpAniSirGlobal          pMac,
-                            tDot11fIEChanSwitchAnn *pDot11f)
+                            tDot11fIEChanSwitchAnn *pDot11f,
+                            tpPESession psessionEntry)
 {
-    pDot11f->switchMode = pMac->lim.gLimChannelSwitch.switchMode;
-    pDot11f->newChannel = pMac->lim.gLimChannelSwitch.primaryChannel;
-    pDot11f->switchCount = ( tANI_U8 ) pMac->lim.gLimChannelSwitch.switchCount;
+    pDot11f->switchMode = psessionEntry->gLimChannelSwitch.switchMode;
+    pDot11f->newChannel = psessionEntry->gLimChannelSwitch.primaryChannel;
+    pDot11f->switchCount = ( tANI_U8 ) psessionEntry->gLimChannelSwitch.switchCount;
 
     pDot11f->present = 1;
 } // End PopulateDot11fChanSwitchAnn.
 
 void
 PopulateDot11fExtChanSwitchAnn(tpAniSirGlobal pMac,
-                               tDot11fIEExtChanSwitchAnn *pDot11f)
+                               tDot11fIEExtChanSwitchAnn *pDot11f,
+                               tpPESession psessionEntry)
 {
     //Has to be updated on the cb state basis
     pDot11f->secondaryChannelOffset = 
-             limGetHTCBState(pMac->lim.gLimChannelSwitch.secondarySubBand);
+             psessionEntry->gLimChannelSwitch.secondarySubBand;
 
     pDot11f->present = 1;
 }
@@ -542,7 +544,8 @@
 
 tSirRetStatus
 PopulateDot11fHTCaps(tpAniSirGlobal           pMac,
-                             tDot11fIEHTCaps *pDot11f)
+                           tpPESession      psessionEntry,
+                           tDot11fIEHTCaps *pDot11f)
 {
     tANI_U32                         nCfgValue, nCfgLen;
     tANI_U8                          nCfgValue8;
@@ -572,12 +575,8 @@
     pHTCapabilityInfo = ( tSirMacHTCapabilityInfo* ) &nCfgValue16;
 #endif
 
-    dot11fLog( pMac, LOG1, FL( "HT Caps: %x\n" ), nCfgValue);
-
-
 #ifdef WLAN_SOFTAP_FEATURE  // this is added for fixing CRs on MDM9K platform - 257951, 259577
     pDot11f->advCodingCap             = uHTCapabilityInfo.htCapInfo.advCodingCap;
-    pDot11f->supportedChannelWidthSet = uHTCapabilityInfo.htCapInfo.supportedChannelWidthSet;
     pDot11f->mimoPowerSave            = uHTCapabilityInfo.htCapInfo.mimoPowerSave;
     pDot11f->greenField               = uHTCapabilityInfo.htCapInfo.greenField;
     pDot11f->shortGI20MHz             = uHTCapabilityInfo.htCapInfo.shortGI20MHz;
@@ -592,7 +591,6 @@
     pDot11f->lsigTXOPProtection       = uHTCapabilityInfo.htCapInfo.lsigTXOPProtection;
 #else
     pDot11f->advCodingCap             = pHTCapabilityInfo->advCodingCap;
-    pDot11f->supportedChannelWidthSet = pHTCapabilityInfo->supportedChannelWidthSet;
     pDot11f->mimoPowerSave            = pHTCapabilityInfo->mimoPowerSave;
     pDot11f->greenField               = pHTCapabilityInfo->greenField;
     pDot11f->shortGI20MHz             = pHTCapabilityInfo->shortGI20MHz;
@@ -607,6 +605,16 @@
     pDot11f->lsigTXOPProtection       = pHTCapabilityInfo->lsigTXOPProtection;
 #endif
 
+    // All sessionized entries will need the check below
+    if (psessionEntry == NULL) // Only in case of NO session
+    {
+        pDot11f->supportedChannelWidthSet = uHTCapabilityInfo.htCapInfo.supportedChannelWidthSet;
+    }
+    else
+    {
+        pDot11f->supportedChannelWidthSet = psessionEntry->htSupportedChannelWidthSet;
+    }
+
     /* Ensure that shortGI40MHz is Disabled if supportedChannelWidthSet is
        eHT_CHANNEL_WIDTH_20MHZ */
     if(pDot11f->supportedChannelWidthSet == eHT_CHANNEL_WIDTH_20MHZ)
@@ -690,7 +698,247 @@
     return eSIR_SUCCESS;
 
 } // End PopulateDot11fHTCaps.
+#ifdef WLAN_FEATURE_11AC
 
+void limLogVHTCap(tpAniSirGlobal pMac,
+                              tDot11fIEVHTCaps *pDot11f)
+{
+
+    limLog(pMac, LOGW, FL("maxMPDULen (2): %d\n"), pDot11f->maxMPDULen);
+    limLog(pMac, LOGW, FL("supportedChannelWidthSet (2): %d\n"), pDot11f->supportedChannelWidthSet);
+    limLog(pMac, LOGW, FL("ldpcCodingCap (1): %d\n"), pDot11f->ldpcCodingCap);
+    limLog(pMac, LOGW, FL("shortGI80MHz (1): %d\n"), pDot11f->shortGI80MHz);
+    limLog(pMac, LOGW, FL("shortGI160and80plus80MHz (1): %d\n"), pDot11f->shortGI160and80plus80MHz);
+    limLog(pMac, LOGW, FL("txSTBC (1): %d\n"), pDot11f->txSTBC);
+    limLog(pMac, LOGW, FL("rxSTBC (3): %d\n"), pDot11f->rxSTBC);
+    limLog(pMac, LOGW, FL("suBeamFormerCap (1): %d\n"), pDot11f->suBeamFormerCap);
+    limLog(pMac, LOGW, FL("suBeamformeeCap (1): %d\n"), pDot11f->suBeamformeeCap);
+    limLog(pMac, LOGW, FL("csnofBeamformerAntSup (3): %d\n"), pDot11f->csnofBeamformerAntSup);
+    limLog(pMac, LOGW, FL("numSoundingDim (3): %d\n"), pDot11f->numSoundingDim);
+    limLog(pMac, LOGW, FL("muBeamformerCap (1): %d\n"), pDot11f->muBeamformerCap);
+    limLog(pMac, LOGW, FL("muBeamformeeCap (1): %d\n"), pDot11f->muBeamformeeCap);
+    limLog(pMac, LOGW, FL("vhtTXOPPS (1): %d\n"), pDot11f->vhtTXOPPS);
+    limLog(pMac, LOGW, FL("htcVHTCap (1): %d\n"), pDot11f->htcVHTCap);
+    limLog(pMac, LOGW, FL("maxAMPDULenExp (3): %d\n"), pDot11f->maxAMPDULenExp);
+    limLog(pMac, LOGW, FL("vhtLinkAdaptCap (2): %d\n"), pDot11f->vhtLinkAdaptCap);
+    limLog(pMac, LOGW, FL("rxAntPattern (1): %d\n"), pDot11f->vhtLinkAdaptCap);
+    limLog(pMac, LOGW, FL("txAntPattern (1): %d\n"), pDot11f->vhtLinkAdaptCap);
+    limLog(pMac, LOGW, FL("reserved1 (2): %d\n"), pDot11f->reserved1);
+    limLog(pMac, LOGW, FL("rxMCSMap (16): %d\n"), pDot11f->rxMCSMap);
+    limLog(pMac, LOGW, FL("rxHighSupDataRate (13): %d\n"), pDot11f->rxHighSupDataRate);
+    limLog(pMac, LOGW, FL("reserve (3): %d\n"), pDot11f->reserved2);
+    limLog(pMac, LOGW, FL("txMCSMap (16): %d\n"), pDot11f->txMCSMap);
+    limLog(pMac, LOGW, FL("txSupDataRate (13): %d\n"), pDot11f->txSupDataRate);
+    limLog(pMac, LOGW, FL("reserv (3): %d\n"), pDot11f->reserved3);
+}
+
+void limLogVHTOperation(tpAniSirGlobal pMac,
+                              tDot11fIEVHTOperation *pDot11f)
+{
+
+    limLog(pMac, LOGW, FL("chanWidth : %d\n"), pDot11f->chanWidth);
+    limLog(pMac, LOGW, FL("chanCenterFreqSeg1: %d\n"), pDot11f->chanCenterFreqSeg1);
+    limLog(pMac, LOGW, FL("chanCenterFreqSeg2: %d\n"), pDot11f->chanCenterFreqSeg2);
+    limLog(pMac, LOGW, FL("basicMCSSet: %d\n"), pDot11f->basicMCSSet);
+}
+
+void limLogVHTExtBssLoad(tpAniSirGlobal pMac,
+                              tDot11fIEVHTExtBssLoad *pDot11f)
+{
+    limLog(pMac, LOGW, FL("muMIMOCapStaCount : %d\n"), pDot11f->muMIMOCapStaCount);
+    limLog(pMac, LOGW, FL("ssUnderUtil: %d\n"), pDot11f->ssUnderUtil);
+    limLog(pMac, LOGW, FL("FortyMHzUtil: %d\n"), pDot11f->FortyMHzUtil);
+    limLog(pMac, LOGW, FL("EightyMHzUtil: %d\n"), pDot11f->EightyMHzUtil);
+    limLog(pMac, LOGW, FL("OneSixtyMHzUtil: %d\n"), pDot11f->OneSixtyMHzUtil);
+}
+
+
+tSirRetStatus
+PopulateDot11fVHTCaps(tpAniSirGlobal           pMac,
+                           tDot11fIEVHTCaps *pDot11f)
+{
+    tSirRetStatus        nStatus;
+    tANI_U32             nCfgValue=0;
+
+    pDot11f->present = 1;
+
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_MAX_MPDU_LENGTH, nCfgValue );
+    pDot11f->maxMPDULen =  (nCfgValue & 0x0003);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET,
+                                                             nCfgValue );
+    pDot11f->supportedChannelWidthSet = (nCfgValue & 0x0003);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_LDPC_CODING_CAP, nCfgValue );
+    pDot11f->ldpcCodingCap = (nCfgValue & 0x0001);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_SHORT_GI_80MHZ, nCfgValue );
+    pDot11f->shortGI80MHz= (nCfgValue & 0x0001);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
+                                                                nCfgValue );
+    pDot11f->shortGI160and80plus80MHz = (nCfgValue & 0x0001);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_TXSTBC, nCfgValue );
+    pDot11f->txSTBC = (nCfgValue & 0x0001);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_RXSTBC, nCfgValue );
+    pDot11f->rxSTBC = (nCfgValue & 0x0007);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_SU_BEAMFORMER_CAP, nCfgValue );
+    pDot11f->suBeamFormerCap = (nCfgValue & 0x0001);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_SU_BEAMFORMEE_CAP, nCfgValue );
+    pDot11f->suBeamformeeCap = (nCfgValue & 0x0001);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
+                                                               nCfgValue );
+    pDot11f->csnofBeamformerAntSup = (nCfgValue & 0x0007);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS,
+                                                               nCfgValue );
+    pDot11f->numSoundingDim = (nCfgValue & 0x0007);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_MU_BEAMFORMER_CAP, nCfgValue );
+    pDot11f->muBeamformerCap = (nCfgValue & 0x0001);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_MU_BEAMFORMEE_CAP, nCfgValue );
+    pDot11f->muBeamformeeCap = (nCfgValue & 0x0001);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_TXOP_PS, nCfgValue );
+    pDot11f->vhtTXOPPS = (nCfgValue & 0x0001);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_HTC_VHTC_CAP, nCfgValue );
+    pDot11f->htcVHTCap = (nCfgValue & 0x0001);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_AMPDU_LEN_EXPONENT, nCfgValue );
+    pDot11f->maxAMPDULenExp = (nCfgValue & 0x0007);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_LINK_ADAPTATION_CAP, nCfgValue );
+    pDot11f->vhtLinkAdaptCap = (nCfgValue & 0x0003);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_RX_ANT_PATTERN, nCfgValue );
+    pDot11f->rxAntPattern = nCfgValue;
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_TX_ANT_PATTERN, nCfgValue );
+    pDot11f->txAntPattern = nCfgValue;
+
+    pDot11f->reserved1= 0;
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_RX_MCS_MAP, nCfgValue );
+    pDot11f->rxMCSMap = (nCfgValue & 0x0000FFFF);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
+                                                                  nCfgValue );
+    pDot11f->rxHighSupDataRate = (nCfgValue & 0x00001FFF);
+
+    pDot11f->reserved2= 0;
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_TX_MCS_MAP, nCfgValue );
+    pDot11f->txMCSMap = (nCfgValue & 0x0000FFFF);
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
+                                                                  nCfgValue );
+    pDot11f->txSupDataRate = (nCfgValue & 0x00001FFF);
+
+    pDot11f->reserved3= 0;
+
+    limLogVHTCap(pMac, pDot11f);
+
+    return eSIR_SUCCESS;
+
+}
+
+tSirRetStatus
+PopulateDot11fVHTOperation(tpAniSirGlobal   pMac,
+                               tDot11fIEVHTOperation  *pDot11f)
+{
+    tSirRetStatus        nStatus;
+    tANI_U32             nCfgValue=0;
+
+    pDot11f->present = 1;
+
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_CHANNEL_WIDTH, nCfgValue );
+    pDot11f->chanWidth = (tANI_U8)nCfgValue;
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1,
+                                                               nCfgValue );
+    pDot11f->chanCenterFreqSeg1 = (tANI_U8)nCfgValue;
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2,
+                                                               nCfgValue );
+    pDot11f->chanCenterFreqSeg2 = (tANI_U8)nCfgValue;
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_BASIC_MCS_SET,nCfgValue );
+    pDot11f->basicMCSSet = (tANI_U16)nCfgValue;
+
+    limLogVHTOperation(pMac,pDot11f);
+
+    return eSIR_SUCCESS;
+
+}
+
+tSirRetStatus
+PopulateDot11fVHTExtBssLoad(tpAniSirGlobal      pMac,
+                           tDot11fIEVHTExtBssLoad   *pDot11f)
+{
+    tSirRetStatus    nStatus;
+    tANI_U32         nCfgValue=0;
+
+    pDot11f->present = 1;
+
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT,
+                                                         nCfgValue );
+    pDot11f->muMIMOCapStaCount = (tANI_U8)nCfgValue;
+
+    nCfgValue = 0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_SS_UNDER_UTIL,nCfgValue );
+    pDot11f->ssUnderUtil = (tANI_U8)nCfgValue;
+
+    nCfgValue=0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_40MHZ_UTILIZATION,nCfgValue );
+    pDot11f->FortyMHzUtil = (tANI_U8)nCfgValue;
+
+    nCfgValue=0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_80MHZ_UTILIZATION,nCfgValue );
+    pDot11f->EightyMHzUtil = (tANI_U8)nCfgValue;
+
+    nCfgValue=0;
+    CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_160MHZ_UTILIZATION,nCfgValue );
+    pDot11f->EightyMHzUtil = (tANI_U8)nCfgValue;
+
+    limLogVHTExtBssLoad(pMac,pDot11f);
+
+    return eSIR_SUCCESS;
+}
+
+
+#endif
 #ifdef WLAN_SOFTAP_FEATURE
 tSirRetStatus
 PopulateDot11fHTInfo(tpAniSirGlobal   pMac,
@@ -737,11 +985,19 @@
     htInfoField1 = ( tANI_U8 ) nCfgValue;
 
     pHTInfoField1 = ( tSirMacHTInfoField1* ) &htInfoField1;
-    pHTInfoField1->secondaryChannelOffset     = pMac->lim.gHTSecondaryChannelOffset;
-    pHTInfoField1->recommendedTxWidthSet      = pMac->lim.gHTRecommendedTxWidthSet;
     pHTInfoField1->rifsMode                   = psessionEntry->beaconParams.fRIFSMode;
     pHTInfoField1->serviceIntervalGranularity = pMac->lim.gHTServiceIntervalGranularity;
 
+    if (psessionEntry == NULL)
+    {
+        PELOGE(limLog(pMac, LOG1,
+            FL("Keep the value retrieved from cfg for secondary channel offset and recommended Tx Width set\n"));)
+    }
+    else
+    {
+        pHTInfoField1->secondaryChannelOffset     = psessionEntry->htSecondaryChannelOffset;
+        pHTInfoField1->recommendedTxWidthSet      = psessionEntry->htRecommendedTxWidthSet;
+    }
 
 #ifdef WLAN_SOFTAP_FEATURE
     if(psessionEntry->limSystemRole == eLIM_AP_ROLE ){
@@ -1591,11 +1847,19 @@
         pProbeReq->wscIePresent = 1;
         memcpy(&pProbeReq->probeReqWscIeInfo, &pr.WscProbeReq, sizeof(tDot11fIEWscProbeReq));
     }
+#ifdef WLAN_FEATURE_11AC
+    if ( pr.VHTCaps.present )
+    {
+        palCopyMemory( pMac, &pProbeReq->VHTCaps, &pr.VHTCaps, sizeof( tDot11fIEVHTCaps ) );
+    }
+#endif
+
 
     if ( pr.P2PProbeReq.present )
     {
         pProbeReq->p2pIePresent = 1;
     }
+
     return eSIR_SUCCESS;
 
 } // End sirConvertProbeReqFrame2Struct.
@@ -1817,6 +2081,20 @@
                                                 sizeof(tDot11fIEP2PProbeRes) );
     }
 #endif
+#ifdef WLAN_FEATURE_11AC
+    if ( pr.VHTCaps.present )
+    {
+       palCopyMemory( pMac, &pProbeResp->VHTCaps, &pr.VHTCaps, sizeof( tDot11fIEVHTCaps ) );
+    }
+    if ( pr.VHTOperation.present )
+    {
+        palCopyMemory( pMac, &pProbeResp->VHTOperation, &pr.VHTOperation, sizeof( tDot11fIEVHTOperation) );
+    }
+    if ( pr.VHTExtBssLoad.present )
+    {
+        palCopyMemory( pMac, &pProbeResp->VHTExtBssLoad, &pr.VHTExtBssLoad, sizeof( tDot11fIEVHTExtBssLoad) );
+    }
+#endif
     return eSIR_SUCCESS;
 
 } // End sirConvertProbeFrame2Struct.
@@ -1934,6 +2212,14 @@
     }
 #endif
 
+#ifdef WLAN_FEATURE_WFD
+    if(ar.WFDIEOpaque.present)
+    {
+        pAssocReq->addIEPresent = 1;
+        ConvertWFDOpaque( pMac, &pAssocReq->addIE, &ar.WFDIEOpaque);
+    }
+#endif
+
     // Power Capabilities
     if ( ar.PowerCaps.present )
     {
@@ -1977,6 +2263,15 @@
         return eSIR_FAILURE;
     }
 
+#ifdef WLAN_FEATURE_11AC
+    if ( ar.VHTCaps.present )
+    {
+        palCopyMemory( pMac, &pAssocReq->VHTCaps, &ar.VHTCaps, sizeof( tDot11fIEVHTCaps ) );
+        limLog( pMac, LOGW, FL("Received Assoc Req with VHT Cap\n"));
+        limLogVHTCap( pMac, &pAssocReq->VHTCaps);
+    }
+#endif
+
     return eSIR_SUCCESS;
 
 } // End sirConvertAssocReqFrame2Struct.
@@ -2129,6 +2424,21 @@
     }    
 #endif
 
+#ifdef WLAN_FEATURE_11AC
+    if ( ar.VHTCaps.present )
+    {
+        palCopyMemory( pMac, &pAssocRsp->VHTCaps, &ar.VHTCaps, sizeof( tDot11fIEVHTCaps ) );
+        limLog( pMac, LOGW, FL("Received Assoc Response with VHT Cap\n"));
+        limLogVHTCap(pMac, &pAssocRsp->VHTCaps);
+    }
+    if ( ar.VHTOperation.present )
+    {
+        palCopyMemory( pMac, &pAssocRsp->VHTOperation, &ar.VHTOperation, sizeof( tDot11fIEVHTOperation) );
+        limLog( pMac, LOGW, FL("Received Assoc Response with VHT Operation\n"));
+        limLogVHTOperation(pMac, &pAssocRsp->VHTOperation);
+    }
+#endif
+
     return eSIR_SUCCESS;
 
 } // End sirConvertAssocRespFrame2Struct.
@@ -2291,6 +2601,20 @@
     }
 #endif
 
+#ifdef WLAN_FEATURE_WFD
+    if(ar.WFDIEOpaque.present)
+    {
+        pAssocReq->addIEPresent = 1;
+        ConvertWFDOpaque( pMac, &pAssocReq->addIE, &ar.WFDIEOpaque);
+    }
+#endif
+
+#ifdef WLAN_FEATURE_11AC
+    if ( ar.VHTCaps.present )
+    {
+        palCopyMemory( pMac, &pAssocReq->VHTCaps, &ar.VHTCaps, sizeof( tDot11fIEVHTCaps ) );
+    }
+#endif
     return eSIR_SUCCESS;
 
 } // End sirConvertReassocReqFrame2Struct.
@@ -2496,8 +2820,26 @@
         ConvertERPInfo( pMac, &pBeaconStruct->erpIEInfo, &pBies->ERPInfo );
     }
 
+#ifdef WLAN_FEATURE_11AC
+    if ( pBies->VHTCaps.present )
+    {
+        pBeaconStruct->VHTCaps.present = 1;
+        palCopyMemory( pMac, &pBeaconStruct->VHTCaps, &pBies->VHTCaps, sizeof( tDot11fIEVHTCaps ) );
+    }
+    if ( pBies->VHTOperation.present )
+    {
+         pBeaconStruct->VHTOperation.present = 1;
+         palCopyMemory( pMac, &pBeaconStruct->VHTOperation, &pBies->VHTOperation, sizeof( tDot11fIEVHTOperation) );
+    }
+    if ( pBies->VHTExtBssLoad.present )
+    {
+         pBeaconStruct->VHTExtBssLoad.present = 1;
+         palCopyMemory( pMac, &pBeaconStruct->VHTExtBssLoad, &pBies->VHTExtBssLoad, sizeof( tDot11fIEVHTExtBssLoad) );
+    }
+#endif
     palFreeMemory(pMac->hHdd, pBies);
 
+
     return eSIR_SUCCESS;
 
 } // End sirParseBeaconIE.
@@ -2741,6 +3083,21 @@
     }
 #endif
 
+#ifdef WLAN_FEATURE_11AC
+    if ( beacon.VHTCaps.present )
+    {
+        palCopyMemory( pMac, &pBeaconStruct->VHTCaps, &beacon.VHTCaps, sizeof( tDot11fIEVHTCaps ) );
+    }
+    if ( beacon.VHTOperation.present )
+    {
+        palCopyMemory( pMac, &pBeaconStruct->VHTOperation, &beacon.VHTOperation, sizeof( tDot11fIEVHTOperation) );
+    }
+    if ( beacon.VHTExtBssLoad.present )
+    {
+        palCopyMemory( pMac, &pBeaconStruct->VHTExtBssLoad, &beacon.VHTExtBssLoad, sizeof( tDot11fIEVHTExtBssLoad) );
+    }
+#endif
+
     return eSIR_SUCCESS;
 
 } // End sirConvertBeaconFrame2Struct.
diff --git a/CORE/SYS/legacy/src/utils/src/utilsParser.c b/CORE/SYS/legacy/src/utils/src/utilsParser.c
index 5d9568e..aa5a83c 100644
--- a/CORE/SYS/legacy/src/utils/src/utilsParser.c
+++ b/CORE/SYS/legacy/src/utils/src/utilsParser.c
@@ -168,6 +168,28 @@
 }
 #endif
 
+#ifdef WLAN_FEATURE_WFD
+tSirRetStatus ConvertWFDOpaque( tpAniSirGlobal      pMac,
+                                tSirAddie           *pOld,
+                                tDot11fIEWFDIEOpaque *pNew )
+{
+    // This is awful, I know, but the old code just rammed the IE into
+    // an opaque array.  Note that we need to explicitly add the vendorIE and OUI !
+    tANI_U8 curAddIELen = pOld->length; 
+
+    pOld->length    = curAddIELen + pNew->num_data + 6;
+    pOld->addIEdata[ curAddIELen++ ] = 0xdd;
+    pOld->addIEdata[ curAddIELen++ ] = pNew->num_data + 4;
+    pOld->addIEdata[ curAddIELen++ ] = 0x50;
+    pOld->addIEdata[ curAddIELen++ ] = 0x6f;
+    pOld->addIEdata[ curAddIELen++ ] = 0x9A;
+    pOld->addIEdata[ curAddIELen++ ] = 0x0a;
+    palCopyMemory( pMac->hHdd, pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data );
+
+    return eSIR_SUCCESS;
+}
+#endif
+
 tSirRetStatus ConvertRSN(tpAniSirGlobal  pMac,
                                tSirMacRsnInfo *pOld,
                                tDot11fIERSN      *pNew)
diff --git a/CORE/TL/inc/wlan_qct_tl.h b/CORE/TL/inc/wlan_qct_tl.h
index 610408c..a85cbc5 100644
--- a/CORE/TL/inc/wlan_qct_tl.h
+++ b/CORE/TL/inc/wlan_qct_tl.h
@@ -775,6 +775,18 @@
    v_PVOID_t                       pUserCtxt
 );
 
+typedef struct
+{
+    // Common for all types are requests
+    v_U16_t                         msgType;    // message type is same as the request type
+    v_U16_t                         msgLen;  // length of the entire request
+    v_U8_t                          sessionId; //sme Session Id
+    v_U8_t                          rssiNotification;    
+    v_PVOID_t                       tlCallback;
+    v_PVOID_t                       pAdapter;
+    v_PVOID_t                       pUserCtxt;
+} WLANTL_TlIndicationReq;
+
 /*----------------------------------------------------------------------------
  * Function Declarations and Documentation
  * -------------------------------------------------------------------------*/
diff --git a/CORE/TL/src/wlan_qct_tl.c b/CORE/TL/src/wlan_qct_tl.c
index 7b883a1..93b27fb 100644
--- a/CORE/TL/src/wlan_qct_tl.c
+++ b/CORE/TL/src/wlan_qct_tl.c
@@ -5100,12 +5100,15 @@
           continue;
         }
 
+/* This will be handled within statistics module */
+#ifndef FEATURE_WLAN_INTEGRATED_SOC
 #ifdef WLAN_SOFTAP_FEATURE
     /* RX Statistics Data */
       /* This is RX UC data frame */
       pTLCb->atlSTAClients[ucSTAId].trafficStatistics.rxUCFcnt++;
       pTLCb->atlSTAClients[ucSTAId].trafficStatistics.rxUCBcnt += usPktLen;
 #endif
+#endif /* FEATURE_WLAN_INTEGRATED_SOC */
 
     }/* else data frame*/
 
@@ -5880,6 +5883,10 @@
     return vosStatus;
   }
 
+#ifdef FEATURE_WLAN_INTEGRATED_SOC
+  WLANTL_StatHandleTXFrame(pvosGCtx, ucSTAId, vosDataBuff, NULL, &tlMetaInfo);
+#endif /* FEATURE_WLAN_INTEGRATED_SOC */
+
 #ifdef WLAN_SOFTAP_FEATURE
   /*There are still packets in HDD - set back the pending packets and 
    the no more data assumption*/
diff --git a/CORE/TL/src/wlan_qct_tl_hosupport.c b/CORE/TL/src/wlan_qct_tl_hosupport.c
index 3c80984..e77bb74 100644
--- a/CORE/TL/src/wlan_qct_tl_hosupport.c
+++ b/CORE/TL/src/wlan_qct_tl_hosupport.c
@@ -433,7 +433,7 @@
    if(WDA_IS_RX_BCAST(pBDHeader))
    {
       TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"This is RX BC/MC frame"));
-      if(VOS_FALSE == isBroadcast)
+      if(isBroadcast)
       {
          TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"This is RX BC frame"));
          statistics->rxBCFcnt++;
@@ -455,6 +455,11 @@
 
    /* TODO caculation is needed, dimension of 500kbps */
    statistics->rxRate = WDA_GET_RX_MAC_RATE_IDX(pBDHeader);
+   
+   TLLOG1(VOS_TRACE (VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO_MED,
+                  "****Received rate Index = %ld type=%d subtype=%d****\n",
+                  statistics->rxRate,WDA_GET_RX_TYPE(pBDHeader),WDA_GET_RX_SUBTYPE(pBDHeader)));
+
    statistics->rxBcnt += (packetSize - WLANHAL_RX_BD_HEADER_SIZE);
 
 #ifdef WLANTL_HO_DEBUG_MSG
@@ -481,6 +486,9 @@
    v_U8_t           STAid,
    vos_pkt_t       *dataBuffer,
    v_PVOID_t        pBDHeader
+#ifdef FEATURE_WLAN_INTEGRATED_SOC
+  ,WLANTL_MetaInfoType *txMetaInfo
+#endif /* FEATURE_WLAN_INTEGRATED_SOC */
 )
 {
    WLANTL_CbType            *tlCtxt = VOS_GET_TL_CB(pAdapter);
@@ -503,35 +511,39 @@
    /* TODO : BC/MC/UC have to be determined by MAC address */
    statistics = &tlCtxt->atlSTAClients[STAid].trafficStatistics;
    vos_pkt_get_packet_length(dataBuffer, &packetSize);
+#ifdef FEATURE_WLAN_INTEGRATED_SOC
+   if(txMetaInfo->ucBcast)
+#else
    if(WLANTL_STA_ID_BCAST == STAid)
+#endif /* FEATURE_WLAN_INTEGRATED_SOC */
    {
       TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"This TX is BC frame"));
       statistics->txBCFcnt++;
+#ifdef FEATURE_WLAN_INTEGRATED_SOC
+      statistics->txBCBcnt += packetSize;
+#else
       statistics->txBCBcnt += (packetSize - WLANHAL_TX_BD_HEADER_SIZE);
+#endif /* FEATURE_WLAN_INTEGRATED_SOC */
    }
-/*
-   if(WLANHAL_TX_BD_GET_UB(pBDHeader))
+   else if(txMetaInfo->ucMcast)
    {
-      TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"This TX is BC/MC frame"));
-      if(WLANTL_STA_ID_BCAST == STAid)
-      {
-         TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"This TX is BC frame"));
-         statistics->txBCFcnt++;
-         statistics->txBCBcnt += (packetSize - WLANHAL_TX_BD_HEADER_SIZE);
-      }
-      else
-      {
-         TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"This TX is MC frame"));
-         statistics->txMCFcnt++;
-         statistics->txMCBcnt += (packetSize - WLANHAL_RX_BD_HEADER_SIZE);
-      }
+      TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"This TX is MC frame"));
+      statistics->txMCFcnt++;
+#ifdef FEATURE_WLAN_INTEGRATED_SOC
+      statistics->txMCBcnt += packetSize;
+#else
+      statistics->txMCBcnt += (packetSize - WLANHAL_RX_BD_HEADER_SIZE);
+#endif /* FEATURE_WLAN_INTEGRATED_SOC */
    }
-*/
    else
    {
       TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"This is TX UC frame"));
       statistics->txUCFcnt++;
+#ifdef FEATURE_WLAN_INTEGRATED_SOC
+      statistics->txUCBcnt += packetSize;
+#else
       statistics->txUCBcnt += (packetSize - WLANHAL_RX_BD_HEADER_SIZE);
+#endif /* FEATURE_WLAN_INTEGRATED_SOC */
    }
 
 #ifdef WLANTL_HO_DEBUG_MSG
@@ -979,7 +991,7 @@
                   usrCtxt = hoSupport->registeredInd[idx].usrCtxt[sIdx];
                   evtType = WLANTL_HO_THRESHOLD_DOWN;
                   TLLOGE(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR,"Trigger Event %d, region index %d", hoSupport->registeredInd[idx].triggerEvent[sIdx], idx));
-                  status = cbFunction(pAdapter, evtType, usrCtxt);
+                  status = WLANTL_HSSerializeTlIndication(pAdapter, evtType, usrCtxt, cbFunction);
                }
             }
          }
@@ -1001,7 +1013,7 @@
                   usrCtxt = hoSupport->registeredInd[idx - 1].usrCtxt[sIdx];
                   evtType = WLANTL_HO_THRESHOLD_UP;
                   TLLOGE(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR,"Trigger Event %d, region index %d", hoSupport->registeredInd[idx - 1].triggerEvent[sIdx], idx - 1));
-                  status = cbFunction(pAdapter, evtType, usrCtxt);
+                  status = WLANTL_HSSerializeTlIndication(pAdapter, evtType, usrCtxt, cbFunction);
                }
             }
          }
@@ -1092,6 +1104,14 @@
    }
    currentHO->sampleTime = currentTimestamp;
 
+   /* Get Current RSSI from BD Heaser */
+   status = WLANTL_HSGetRSSI(pAdapter, pBDHeader, STAid, &currentAvgRSSI);
+   if(!VOS_IS_STATUS_SUCCESS(status))
+   {
+      TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"Get RSSI Fail"));
+      return status;
+   }
+
    /* If any threshold is not registerd, DO NOTHING! */
    if(0 == tlCtxt->hoSupport.currentHOState.numThreshold)
    {
@@ -1099,13 +1119,6 @@
    }
    else
    {
-      /* Get Current RSSI from BD Heaser */
-      status = WLANTL_HSGetRSSI(pAdapter, pBDHeader, STAid, &currentAvgRSSI);
-      if(!VOS_IS_STATUS_SUCCESS(status))
-      {
-         TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"Get RSSI Fail"));
-         return status;
-      }
       /* Handle current RSSI value, region, notification, etc */
       status = WLANTL_HSHandleRSSIChange(pAdapter, currentAvgRSSI);
       if(!VOS_IS_STATUS_SUCCESS(status))
@@ -1153,7 +1166,9 @@
       return VOS_STATUS_SUCCESS;
    }
 
+#ifndef FEATURE_WLAN_INTEGRATED_SOC
    WLANTL_StatHandleTXFrame(pAdapter, STAid, dataBuffer, bdHeader);
+#endif /* FEATURE_WLAN_INTEGRATED_SOC */
 
    /* Only Voice traffic is handled as real time traffic */
    if(WLANTL_AC_VO == ac)
@@ -1337,7 +1352,7 @@
             if((WLANTL_HO_THRESHOLD_DOWN == triggerEvent) || (WLANTL_HO_THRESHOLD_CROSS == triggerEvent))
             {
                TLLOGE(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR,"Registered RSSI value larger than Current RSSI, and DOWN event, Send Notification"));
-               crossCBFunction(pAdapter, WLANTL_HO_THRESHOLD_DOWN, usrCtxt);
+               WLANTL_HSSerializeTlIndication(pAdapter, WLANTL_HO_THRESHOLD_DOWN, usrCtxt, crossCBFunction);
             }
          }
          else if((currentHO->regionNumber < (currentHO->numThreshold - 1)) &&
@@ -1366,14 +1381,14 @@
       ((WLANTL_HO_THRESHOLD_DOWN == triggerEvent) || (WLANTL_HO_THRESHOLD_CROSS == triggerEvent)))
    {
       TLLOGE(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR,"Registered RSSI value larger than Current RSSI, and DOWN event, Send Notification"));
-      crossCBFunction(pAdapter, WLANTL_HO_THRESHOLD_DOWN, usrCtxt);
+      WLANTL_HSSerializeTlIndication(pAdapter, WLANTL_HO_THRESHOLD_DOWN, usrCtxt, crossCBFunction);
    }
    else if((VOS_FALSE == tlCtxt->isBMPS) &&
            (rssiValue < currentHO->historyRSSI) && (0 != currentHO->historyRSSI) &&
            ((WLANTL_HO_THRESHOLD_UP == triggerEvent) || (WLANTL_HO_THRESHOLD_CROSS == triggerEvent)))
    {
       TLLOGE(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR,"Registered RSSI value smaller than Current RSSI, and UP event, Send Notification"));
-      crossCBFunction(pAdapter, WLANTL_HO_THRESHOLD_UP, usrCtxt);
+      WLANTL_HSSerializeTlIndication(pAdapter, WLANTL_HO_THRESHOLD_UP, usrCtxt, crossCBFunction);
    }
 
    if(VOS_TRUE == tlCtxt->isBMPS)
@@ -1796,4 +1811,58 @@
 
    return status;   
 }
-#endif //FEATURE_WLAN_GEN6_ROAMING
+
+/*==========================================================================
+
+   FUNCTION
+
+   DESCRIPTION 
+    
+   PARAMETERS 
+
+   RETURN VALUE
+
+============================================================================*/
+VOS_STATUS WLANTL_HSSerializeTlIndication
+(
+   v_PVOID_t   pAdapter,
+   v_U8_t      rssiNotification,
+   v_PVOID_t   pUserCtxt,
+   WLANTL_RSSICrossThresholdCBType cbFunction
+)
+{
+   VOS_STATUS       status = VOS_STATUS_SUCCESS;
+   vos_msg_t        msg;
+   WLANTL_TlIndicationReq *pMsg;
+
+   pMsg = vos_mem_malloc(sizeof(WLANTL_TlIndicationReq));
+   if ( NULL == pMsg ) 
+   {
+      VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, "In %s, failed to allocate mem for req", __FUNCTION__);
+      return VOS_STATUS_E_NOMEM;
+   }
+
+   pMsg->msgType = pal_cpu_to_be16((tANI_U16)eWNI_SME_RSSI_IND);
+   pMsg->msgLen = (tANI_U16)sizeof(WLANTL_TlIndicationReq);
+   pMsg->sessionId = 0;//for now just pass 0
+   pMsg->pAdapter = pAdapter;
+   pMsg->pUserCtxt = pUserCtxt;
+   pMsg->rssiNotification = rssiNotification;
+   pMsg->tlCallback = cbFunction;
+
+
+   msg.type = eWNI_SME_RSSI_IND;
+   msg.bodyptr = pMsg;
+   msg.reserved = 0;
+
+   if(VOS_STATUS_SUCCESS != vos_mq_post_message(VOS_MQ_ID_SME, &msg))
+   {
+       VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, "In %s, failed to post msg to self", __FUNCTION__);
+       vos_mem_free(pMsg);
+       status = VOS_STATUS_E_FAILURE;
+   }
+
+   return status;   
+}
+
+#endif //FEATURE_WLAN_GEN6_ROAMING || WLAN_FEATURE_NEIGHBOR_ROAMING
diff --git a/CORE/TL/src/wlan_qct_tl_hosupport.h b/CORE/TL/src/wlan_qct_tl_hosupport.h
index 437fec1..ca8d8f7 100644
--- a/CORE/TL/src/wlan_qct_tl_hosupport.h
+++ b/CORE/TL/src/wlan_qct_tl_hosupport.h
@@ -258,6 +258,46 @@
    v_PVOID_t                       pAdapter
 );
 
+/*==========================================================================
+
+   FUNCTION
+
+   DESCRIPTION 
+    
+   PARAMETERS 
+
+   RETURN VALUE
+
+============================================================================*/
+VOS_STATUS WLANTL_HSSerializeTlIndication
+(
+   v_PVOID_t   pAdapter,
+   v_U8_t      rssiNotification,
+   v_PVOID_t   pUserCtxt,
+   WLANTL_RSSICrossThresholdCBType cbFunction
+);
+
+/*==========================================================================
+
+   FUNCTION
+
+   DESCRIPTION 
+    
+   PARAMETERS 
+
+   RETURN VALUE
+
+============================================================================*/
+VOS_STATUS WLANTL_StatHandleTXFrame
+(
+   v_PVOID_t        pAdapter,
+   v_U8_t           STAid,
+   vos_pkt_t       *dataBuffer,
+   v_PVOID_t        pBDHeader
+#ifdef FEATURE_WLAN_INTEGRATED_SOC
+  ,WLANTL_MetaInfoType *txMetaInfo
+#endif /* FEATURE_WLAN_INTEGRATED_SOC */
+);
 
 #endif //FEATURE_WLAN_GEN6_ROAMING
 
diff --git a/CORE/VOSS/inc/i_vos_packet.h b/CORE/VOSS/inc/i_vos_packet.h
index 68251de..9f5ee25 100644
--- a/CORE/VOSS/inc/i_vos_packet.h
+++ b/CORE/VOSS/inc/i_vos_packet.h
@@ -64,7 +64,7 @@
 
 // the number of Receive vos packets used exclusively for vos packet
 // allocations of type VOS_PKT_TYPE_RX_RAW
-#define VPKT_NUM_RX_RAW_PACKETS (  512 )
+#define VPKT_NUM_RX_RAW_PACKETS (1024)
 
 // the number of Transmit Management vos packets, used exclusively for
 // vos packet allocations of type VOS_PKT_TYPE_TX_802_11_MGMT
diff --git a/CORE/VOSS/inc/vos_api.h b/CORE/VOSS/inc/vos_api.h
index df78f32..d23a44c 100644
--- a/CORE/VOSS/inc/vos_api.h
+++ b/CORE/VOSS/inc/vos_api.h
@@ -286,4 +286,20 @@
 */
 VOS_STATUS vos_wlanReInit(void);
 
+/**
+  @brief vos_wlanRestart() - This API will reload WLAN driver.
+
+  This function is called if driver detects any fatal state which 
+  can be recovered by a WLAN module reload ( Android framwork initiated ).
+  Note that this API will not initiate any RIVA subsystem restart.
+
+  @param
+       NONE
+  @return
+       VOS_STATUS_SUCCESS   - Operation completed successfully.
+       VOS_STATUS_E_FAILURE - Operation failed.
+
+*/
+VOS_STATUS vos_wlanRestart(void);
+
 #endif // if !defined __VOS_NVITEM_H
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index 4b632d6..00cef2c 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -618,6 +618,8 @@
          VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
            "%s: WDA_preStart reporting other error", __func__);
       }
+      macStop(gpVosContext->pMACContext, HAL_STOP_TYPE_SYS_DEEP_SLEEP);
+      ccmStop(gpVosContext->pMACContext);
       VOS_ASSERT( 0 );
       return VOS_STATUS_E_FAILURE;
    }
@@ -961,18 +963,7 @@
         VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
          "%s: WDA_stop reporting other error", __func__ );
      }
-     /* if WDA stop failed, call WDA shutdown to cleanup WDA/WDI */
-     vosStatus = WDA_shutdown( vosContext, VOS_TRUE );
-     if (VOS_IS_STATUS_SUCCESS( vosStatus ) )
-     {
-        hdd_set_ssr_required( VOS_TRUE );
-     }
-     else
-     {
-        VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
-                               "%s: Failed to shutdown WDA", __func__ );
-        VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) );
-     }
+     WDA_stopFailed(vosContext);
   }
 #endif
 
@@ -1070,12 +1061,30 @@
   }
 
 #ifdef FEATURE_WLAN_INTEGRATED_SOC
-  vosStatus = WDA_close( vosContext );
-  if (!VOS_IS_STATUS_SUCCESS(vosStatus))
+  if ( TRUE == WDA_needShutdown(vosContext ))
   {
-     VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
-         "%s: Failed to close WDA", __func__);
-     VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) );
+     /* if WDA stop failed, call WDA shutdown to cleanup WDA/WDI */
+     vosStatus = WDA_shutdown( vosContext, VOS_TRUE );
+     if (VOS_IS_STATUS_SUCCESS( vosStatus ) )
+     {
+        hdd_set_ssr_required( VOS_TRUE );
+     }
+     else
+     {
+        VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
+                               "%s: Failed to shutdown WDA", __func__ );
+        VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) );
+     }
+  } 
+  else 
+  {
+     vosStatus = WDA_close( vosContext );
+     if (!VOS_IS_STATUS_SUCCESS(vosStatus))
+     {
+        VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
+            "%s: Failed to close WDA", __func__);
+        VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) );
+     }
   }
   
   /* Let DXE return packets in WDA_close and then free them here */
@@ -2370,3 +2379,56 @@
    vstatus = vos_watchdog_wlan_re_init();
    return vstatus;
 }
+/**
+  @brief vos_wlanRestart() - This API will reload WLAN driver.
+
+  This function is called if driver detects any fatal state which 
+  can be recovered by a WLAN module reload ( Android framwork initiated ).
+  Note that this API will not initiate any RIVA subsystem restart.
+
+  The function wlan_hdd_restart_driver protects against re-entrant calls.
+
+  @param
+       NONE
+  @return
+       VOS_STATUS_SUCCESS   - Operation completed successfully.
+       VOS_STATUS_E_FAILURE - Operation failed.
+       VOS_STATUS_E_EMPTY   - No configured interface
+       VOS_STATUS_E_ALREADY - Request already in progress
+
+
+*/
+VOS_STATUS vos_wlanRestart(void)
+{
+   VOS_STATUS vstatus;
+   hdd_context_t *pHddCtx = NULL;
+   v_CONTEXT_t pVosContext        = NULL;
+
+   /* Check whether driver load unload is in progress */
+   if(vos_is_load_unload_in_progress( VOS_MODULE_ID_VOSS, NULL)) 
+   {
+      VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, 
+               "%s: Driver load/unload is in progress, retry later.", __func__);
+      return VOS_STATUS_E_AGAIN;
+   }
+
+   /* Get the Global VOSS Context */
+   pVosContext = vos_get_global_context(VOS_MODULE_ID_VOSS, NULL);
+   if(!pVosContext) {
+      VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, 
+               "%s: Global VOS context is Null", __func__);
+      return VOS_STATUS_E_FAILURE;
+   }
+    
+   /* Get the HDD context */
+   pHddCtx = (hdd_context_t *)vos_get_context(VOS_MODULE_ID_HDD, pVosContext );
+   if(!pHddCtx) {
+      VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, 
+               "%s: HDD context is Null", __func__);
+      return VOS_STATUS_E_FAILURE;
+   }
+
+   /* Reload the driver */
+   vstatus = wlan_hdd_restart_driver(pHddCtx);
+   return vstatus;
+}
diff --git a/CORE/VOSS/src/vos_getBin.c b/CORE/VOSS/src/vos_getBin.c
index a9f3b9c..557a54a 100644
--- a/CORE/VOSS/src/vos_getBin.c
+++ b/CORE/VOSS/src/vos_getBin.c
@@ -164,7 +164,7 @@
     {
        pHddCtx = vos_get_context( VOS_MODULE_ID_HDD, pVosContext);
 
-       for (i=0;i<VOS_MAX_NO_OF_MODE; i++)
+       for (i=0; i < VOS_MAX_NO_OF_MODE; i++)
        {
           j += pHddCtx->no_of_sessions[i];
        }
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
index 9d247a3..6ecd555 100644
--- a/CORE/VOSS/src/vos_nvitem.c
+++ b/CORE/VOSS/src/vos_nvitem.c
@@ -1499,7 +1499,34 @@
 #endif
         *num20MHzChannelsFound = (tANI_U8)count;
     }
-    //TODO: 40 MHz
+
+    if( channels40MHz && num40MHzChannelsFound )
+    {
+        count = 0;
+#ifdef FEATURE_WLAN_INTEGRATED_SOC
+        //center channels for 2.4 Ghz 40 MHz channels
+        for( i = RF_CHAN_BOND_3; i <= RF_CHAN_BOND_11; i++ )
+        {
+            
+            if( regChannels[i].enabled )
+            {
+                channels40MHz[count].chanId = rfChannels[i].channelNum;
+                channels40MHz[count++].pwr  = regChannels[i].pwrLimit;
+            }
+        }
+        //center channels for 5 Ghz 40 MHz channels
+        for( i = RF_CHAN_BOND_38; i <= RF_CHAN_BOND_163; i++ )
+        {
+            
+            if( regChannels[i].enabled )
+            {
+                channels40MHz[count].chanId = rfChannels[i].channelNum;
+                channels40MHz[count++].pwr  = regChannels[i].pwrLimit;
+            }
+        }
+#endif
+        *num40MHzChannelsFound = (tANI_U8)count;
+    }
     return (status);
 }
 
diff --git a/CORE/VOSS/src/vos_packet.c b/CORE/VOSS/src/vos_packet.c
index 304bd51..3eeaa90 100644
--- a/CORE/VOSS/src/vos_packet.c
+++ b/CORE/VOSS/src/vos_packet.c
@@ -174,6 +174,13 @@
       return;
    }
 
+   if ((gpVosPacketContext->rxReplenishListCount < VPKT_RX_REPLENISH_THRESHOLD)
+       &&
+       (!list_empty(&gpVosPacketContext->rxRawFreeList)))
+    {
+      return;
+    }
+
    // we only replenish if the Rx Raw pool is empty or the Replenish pool
    // reaches a high water mark
    rc = mutex_lock_interruptible(&gpVosPacketContext->mlock);
@@ -185,14 +192,6 @@
       return;     
    }
 
-   if ((gpVosPacketContext->rxReplenishListCount < VPKT_RX_REPLENISH_THRESHOLD)
-       &&
-       (!list_empty(&gpVosPacketContext->rxRawFreeList)))
-   {
-      mutex_unlock(&gpVosPacketContext->mlock);
-      return;
-   }
-
    VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
              "VPKT [%d]: Packet replenish activated", __LINE__);
 
@@ -629,6 +628,7 @@
    vos_pkt_low_resource_info *pLowResourceInfo;
    struct vos_pkt_t *pVosPacket;
    int rc; 
+
    // Validate the return parameter pointer
    if (unlikely(NULL == ppPacket))
    {
@@ -751,7 +751,6 @@
              0,
              skb_end_pointer(pVosPacket->pSkb) - pVosPacket->pSkb->head);
    }
-
    VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
              "VPKT [%d]: [%p] Packet allocated, type %d[%s]",
              __LINE__, pVosPacket, pktType, vos_pkti_packet_type_str(pktType));
@@ -1069,6 +1068,7 @@
                                   v_VOID_t **ppOSPacket,
                                   v_BOOL_t clearOSPacket )
 {
+
    // Validate the input and output parameter pointers
    if (unlikely((NULL == pPacket)||(NULL == ppOSPacket)))
    {
@@ -1288,7 +1288,6 @@
                    "VPKT [%d]: Invalid magic", __LINE__);
          return VOS_STATUS_E_INVAL;
       }
-
       //If an skb is attached then reset the pointers      
       if (pPacket->pSkb)
       {
@@ -1357,7 +1356,6 @@
                    "VPKT [%d]: [%p] Packet recycled, type %d[%s]",
                    __LINE__, pPacket, pPacket->packetType,
                    vos_pkti_packet_type_str(pPacket->packetType));
-
          // clear out the User Data pointers in the voss packet..
          memset(&pPacket->pvUserData, 0, sizeof(pPacket->pvUserData));
 
@@ -1379,6 +1377,7 @@
                    "VPKT [%d]: [%p] Packet returned, type %d[%s]",
                    __LINE__, pPacket, pPacket->packetType,
                    vos_pkti_packet_type_str(pPacket->packetType));
+
          rc = mutex_lock_interruptible(&gpVosPacketContext->mlock);
          list_add_tail(&pPacket->node, pPktFreeList);
          if (likely(0 == rc)) 
diff --git a/CORE/WDA/inc/legacy/halMsgApi.h b/CORE/WDA/inc/legacy/halMsgApi.h
index ffeadf3..0ff8d86 100644
--- a/CORE/WDA/inc/legacy/halMsgApi.h
+++ b/CORE/WDA/inc/legacy/halMsgApi.h
@@ -126,6 +126,9 @@
     eRXP_BTAMP_AP_MODE          = 0x400,
     eRXP_BTAMP_STA_MODE         = 0x800,
     eRXP_MULTI_BSS_MODE         = 0x1000
+#ifdef FEATURE_OEM_DATA_SUPPORT
+   ,eRXP_OEM_DATA_MODE             = 0x2000
+#endif
 #ifndef WLAN_FTM_STUB
     ,eRXP_FTM_MODE         = 0x4000
 #endif
@@ -299,6 +302,11 @@
     tANI_U8     p2pCapableSta;
 #endif
 
+#ifdef WLAN_FEATURE_11AC
+    tANI_U8    vhtCapable;
+    tANI_U8    vhtTxChannelWidthSet;
+#endif
+
 } tAddStaParams, *tpAddStaParams;
 
 
@@ -502,7 +510,10 @@
 
     //Spectrum Management Capability, 1 - Enabled, 0 - Disabled.
     tANI_U8 bSpectrumMgtEnabled;
-
+#ifdef WLAN_FEATURE_11AC
+    tANI_U8 vhtCapable;
+    tANI_U8    vhtTxChannelWidthSet;
+#endif
 } tAddBssParams, * tpAddBssParams;
 
 typedef struct
@@ -695,6 +706,27 @@
 } tFinishScanParams, * tpFinishScanParams;
 
 #ifdef FEATURE_WLAN_INTEGRATED_SOC
+#ifdef FEATURE_OEM_DATA_SUPPORT 
+
+#ifndef OEM_DATA_REQ_SIZE
+#define OEM_DATA_REQ_SIZE 70
+#endif
+#ifndef OEM_DATA_RSP_SIZE
+#define OEM_DATA_RSP_SIZE 968
+#endif
+
+typedef struct
+{
+    tSirMacAddr          selfMacAddr;
+    eHalStatus           status;
+    tANI_U8              oemDataReq[OEM_DATA_REQ_SIZE];
+} tStartOemDataReq, *tpStartOemDataReq;
+
+typedef struct 
+{
+    tANI_U8             oemDataRsp[OEM_DATA_RSP_SIZE];
+} tStartOemDataRsp, *tpStartOemDataRsp;
+#endif
 #endif
 
 typedef struct sBeaconGenStaInfo {
@@ -917,7 +949,7 @@
 #ifndef WLAN_FEATURE_VOWIFI    
     tANI_U8 localPowerConstraint;
 #endif /* WLAN_FEATURE_VOWIFI  */
-    tSirMacHTSecondaryChannelOffset secondaryChannelOffset;
+    ePhyChanBondState secondaryChannelOffset;
     tANI_U8 peSessionId;
 #if defined WLAN_FEATURE_VOWIFI
     tPowerdBm txMgmtPower; //HAL fills in the tx power used for mgmt frames in this field.
@@ -1129,6 +1161,7 @@
 {
     tANI_U8     sendDataNull;
     eHalStatus  status;
+    tANI_U8     bssIdx;
 } tExitBmpsParams, *tpExitBmpsParams;
 
 //
@@ -1146,6 +1179,7 @@
     tANI_U8     viTriggerEnabled:1;
     tANI_U8     voTriggerEnabled:1;
     eHalStatus  status;
+    tANI_U8     bssIdx;
 }tUapsdParams, *tpUapsdParams;
 
 //
diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h
index 836e4bf..74fb8ad 100644
--- a/CORE/WDA/inc/wlan_qct_wda.h
+++ b/CORE/WDA/inc/wlan_qct_wda.h
@@ -128,6 +128,7 @@
  * Check the version number and find if MCC feature is supported or not
  */
 #define IS_MCC_SUPPORTED (WDA_IsWcnssWlanReportedVersionGreaterThanOrEqual( 0, 1, 1, 0))
+#define IS_SLM_SESSIONIZED (WDA_IsWcnssWlanReportedVersionGreaterThanOrEqual( 7, 0, 0, 0))
 
 /*--------------------------------------------------------------------------
   Definitions for Data path APIs
@@ -419,6 +420,7 @@
    /* set, when BT AMP session is going on */
    v_BOOL_t             wdaAmpSessionOn;
    v_U32_t              VosPacketToFree;
+   v_BOOL_t             needShutdown;
 } tWDA_CbContext ; 
 
 typedef struct
@@ -467,6 +469,17 @@
 VOS_STATUS WDA_shutdown(v_PVOID_t pVosContext, wpt_boolean closeTransport);
 
 /*
+ * FUNCTION: WDA_stopFailed
+ * WDA stop is failed
+ */
+void WDA_stopFailed(v_PVOID_t pVosContext);
+/*
+ * FUNCTION: WDA_needShutdown
+ * WDA requires a shutdown rather than a close
+ */
+v_BOOL_t WDA_needShutdown(v_PVOID_t pVosContext);
+
+/*
  * FUNCTION: WDA_McProcessMsg
  * DAL-AL message processing entry function 
  */ 
@@ -1174,6 +1187,12 @@
 #define WDA_SIGNAL_BTAMP_EVENT         SIR_HAL_SIGNAL_BTAMP_EVENT
 
 #ifdef ANI_CHIPSET_VOLANS
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/* PE <-> HAL OEM_DATA RELATED MESSAGES */
+#define WDA_START_OEM_DATA_REQ         SIR_HAL_START_OEM_DATA_REQ 
+#define WDA_START_OEM_DATA_RSP         SIR_HAL_START_OEM_DATA_RSP
+#define WDA_FINISH_OEM_DATA_REQ        SIR_HAL_FINISH_OEM_DATA_REQ
+#endif
 #endif
 
 #define WDA_SET_MAX_TX_POWER_REQ       SIR_HAL_SET_MAX_TX_POWER_REQ
@@ -1202,9 +1221,6 @@
 #define WDA_WLAN_RESUME_REQ           SIR_HAL_WLAN_RESUME_REQ
 #define WDA_MSG_TYPES_END    SIR_HAL_MSG_TYPES_END
 
-#define WDA_SUSPEND_ACTIVITY_RSP SIR_HAL_SUSPEND_ACTIVITY_RSP
-
-
 #define WDA_MMH_TXMB_READY_EVT SIR_HAL_MMH_TXMB_READY_EVT     
 #define WDA_MMH_RXMB_DONE_EVT  SIR_HAL_MMH_RXMB_DONE_EVT    
 #define WDA_MMH_MSGQ_NE_EVT    SIR_HAL_MMH_MSGQ_NE_EVT
diff --git a/CORE/WDA/src/wlan_nv.c b/CORE/WDA/src/wlan_nv.c
index a3b453b..a03227a 100644
--- a/CORE/WDA/src/wlan_nv.c
+++ b/CORE/WDA/src/wlan_nv.c
@@ -3796,7 +3796,7 @@
     } // tables
 };
 
-#else 
+#else
 
 #include "palTypes.h"
 #include "wlan_nv.h"
@@ -3890,6 +3890,84 @@
                 {1500},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_120_MBPS,
                 {1400},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_135_MBPS,
                 {1350},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_150_MBPS,
+#ifdef WLAN_FEATURE_11AC
+                //11AC rates
+               //11A duplicate 80MHz Rates
+                {1700},    // HAL_PHY_RATE_11AC_DUP_6_MBPS,
+                {1700},    // HAL_PHY_RATE_11AC_DUP_9_MBPS,
+                {1700},    // HAL_PHY_RATE_11AC_DUP_12_MBPS,
+                {1650},    // HAL_PHY_RATE_11AC_DUP_18_MBPS,
+                {1600},    // HAL_PHY_RATE_11AC_DUP_24_MBPS,
+                {1550},    // HAL_PHY_RATE_11AC_DUP_36_MBPS,
+                {1550},    // HAL_PHY_RATE_11AC_DUP_48_MBPS,
+                {1500},    // HAL_PHY_RATE_11AC_DUP_54_MBPS,
+
+               //11ac 20MHZ NG, SG
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_6_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_13_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_19_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_26_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_39_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_52_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_58_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_65_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_78_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_7_2_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_14_4_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_21_6_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_28_8_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_43_3_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_57_7_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_65_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_72_2_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_86_6_MBPS,
+
+
+               //11ac 40MHZ NG, SG
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_13_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_27_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_40_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_54_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_81_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_108_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_121_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_135_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_162_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_180_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_15_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_30_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_45_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_60_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_90_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_120_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_135_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_150_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_180_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_200_MBPS,
+
+
+               //11ac 80MHZ NG, SG
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_29_3_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_58_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_87_8_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_117_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_175_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_234_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_263_3_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_292_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_351_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_390_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_32_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_65_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_97_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_130_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_195_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_260_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_292_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_325_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_390_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_433_3_MBPS,
+#endif //WLAN_FEATURE_11AC
                 },  //    RF_SUBBAND_2_4_GHZ
 
                 {
@@ -3957,6 +4035,84 @@
                 {1400},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_120_MBPS,
                 {1300},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_135_MBPS,
                 {1200},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_150_MBPS,
+#ifdef WLAN_FEATURE_11AC
+                //11AC rates
+               //11A duplicate 80MHz Rates
+                {1700},    // HAL_PHY_RATE_11AC_DUP_6_MBPS,
+                {1700},    // HAL_PHY_RATE_11AC_DUP_9_MBPS,
+                {1700},    // HAL_PHY_RATE_11AC_DUP_12_MBPS,
+                {1650},    // HAL_PHY_RATE_11AC_DUP_18_MBPS,
+                {1600},    // HAL_PHY_RATE_11AC_DUP_24_MBPS,
+                {1550},    // HAL_PHY_RATE_11AC_DUP_36_MBPS,
+                {1550},    // HAL_PHY_RATE_11AC_DUP_48_MBPS,
+                {1500},    // HAL_PHY_RATE_11AC_DUP_54_MBPS,
+
+               //11ac 20MHZ NG, SG
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_6_5_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_13_MBPS,
+                {1350},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_19_5_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_26_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_39_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_52_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_58_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_65_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_78_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_7_2_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_14_4_MBPS,
+                {1350},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_21_6_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_28_8_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_43_3_MBPS,
+                {1200},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_57_7_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_65_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_72_2_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_86_6_MBPS,
+
+
+               //11ac 40MHZ NG, SG
+                {1400},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_13_5_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_27_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_40_5_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_54_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_81_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_108_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_121_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_135_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_162_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_180_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_15_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_30_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_45_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_60_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_90_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_120_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_135_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_150_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_180_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_200_MBPS,
+
+
+               //11ac 80MHZ NG, SG
+                {1300},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_29_3_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_58_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_87_8_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_117_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_175_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_234_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_263_3_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_292_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_351_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_390_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_32_5_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_65_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_97_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_130_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_195_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_260_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_292_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_325_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_390_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_433_3_MBPS,
+#endif //WLAN_FEATURE_11AC
                 },  //    RF_SUBBAND_5_LOW_GHZ
 
                 // 5G Mid
@@ -4025,6 +4181,84 @@
                 {1400},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_120_MBPS,
                 {1300},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_135_MBPS,
                 {1200},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_150_MBPS,
+#ifdef WLAN_FEATURE_11AC
+                //11AC rates
+               //11A duplicate 80MHz Rates
+                {1700},    // HAL_PHY_RATE_11AC_DUP_6_MBPS,
+                {1700},    // HAL_PHY_RATE_11AC_DUP_9_MBPS,
+                {1700},    // HAL_PHY_RATE_11AC_DUP_12_MBPS,
+                {1650},    // HAL_PHY_RATE_11AC_DUP_18_MBPS,
+                {1600},    // HAL_PHY_RATE_11AC_DUP_24_MBPS,
+                {1550},    // HAL_PHY_RATE_11AC_DUP_36_MBPS,
+                {1550},    // HAL_PHY_RATE_11AC_DUP_48_MBPS,
+                {1500},    // HAL_PHY_RATE_11AC_DUP_54_MBPS,
+
+               //11ac 20MHZ NG, SG
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_6_5_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_13_MBPS,
+                {1350},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_19_5_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_26_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_39_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_52_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_58_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_65_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_78_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_7_2_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_14_4_MBPS,
+                {1350},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_21_6_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_28_8_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_43_3_MBPS,
+                {1200},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_57_7_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_65_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_72_2_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_86_6_MBPS,
+
+
+               //11ac 40MHZ NG, SG
+                {1400},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_13_5_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_27_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_40_5_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_54_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_81_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_108_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_121_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_135_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_162_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_180_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_15_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_30_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_45_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_60_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_90_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_120_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_135_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_150_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_180_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_200_MBPS,
+
+
+               //11ac 80MHZ NG, SG
+                {1300},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_29_3_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_58_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_87_8_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_117_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_175_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_234_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_263_3_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_292_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_351_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_390_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_32_5_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_65_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_97_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_130_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_195_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_260_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_292_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_325_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_390_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_433_3_MBPS,
+#endif //WLAN_FEATURE_11AC
                 },  //    //     RF_SUBBAND_5_MID_GHZ
                 // 5G High
                 {
@@ -4092,6 +4326,84 @@
                 {1400},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_120_MBPS,
                 {1300},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_135_MBPS,
                 {1200},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_150_MBPS,
+#ifdef WLAN_FEATURE_11AC
+                //11AC rates
+               //11A duplicate 80MHz Rates
+                {1700},    // HAL_PHY_RATE_11AC_DUP_6_MBPS,
+                {1700},    // HAL_PHY_RATE_11AC_DUP_9_MBPS,
+                {1700},    // HAL_PHY_RATE_11AC_DUP_12_MBPS,
+                {1650},    // HAL_PHY_RATE_11AC_DUP_18_MBPS,
+                {1600},    // HAL_PHY_RATE_11AC_DUP_24_MBPS,
+                {1550},    // HAL_PHY_RATE_11AC_DUP_36_MBPS,
+                {1550},    // HAL_PHY_RATE_11AC_DUP_48_MBPS,
+                {1500},    // HAL_PHY_RATE_11AC_DUP_54_MBPS,
+
+               //11ac 20MHZ NG, SG
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_6_5_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_13_MBPS,
+                {1350},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_19_5_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_26_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_39_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_52_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_58_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_65_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_NGI_78_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_7_2_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_14_4_MBPS,
+                {1350},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_21_6_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_28_8_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_43_3_MBPS,
+                {1200},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_57_7_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_65_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_72_2_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_CB_SGI_86_6_MBPS,
+
+
+               //11ac 40MHZ NG, SG
+                {1400},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_13_5_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_27_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_40_5_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_54_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_81_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_108_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_121_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_135_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_162_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_180_MBPS,
+                {1400},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_15_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_30_MBPS,
+                {1250},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_45_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_60_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_90_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_120_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_135_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_150_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_180_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_200_MBPS,
+
+
+               //11ac 80MHZ NG, SG
+                {1300},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_29_3_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_58_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_87_8_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_117_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_175_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_234_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_263_3_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_292_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_351_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_390_MBPS,
+                {1300},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_32_5_MBPS,
+                {1100},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_65_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_97_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_130_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_195_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_260_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_292_5_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_325_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_390_MBPS,
+                {1000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_433_3_MBPS,
+#endif //WLAN_FEATURE_11AC
                 },  //    RF_SUBBAND_5_HIGH_GHZ,
                 // 4.9G
 
@@ -4160,6 +4472,84 @@
                 {1400},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_120_MBPS,
                 {1300},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_135_MBPS,
                 {1200},    // HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_150_MBPS,
+#ifdef WLAN_FEATURE_11AC
+                //11AC rates
+               //11A duplicate 80MHz Rates
+                {1700},    // HAL_PHY_RATE_11AC_DUP_6_MBPS,
+                {1700},    // HAL_PHY_RATE_11AC_DUP_9_MBPS,
+                {1700},    // HAL_PHY_RATE_11AC_DUP_12_MBPS,
+                {1650},    // HAL_PHY_RATE_11AC_DUP_18_MBPS,
+                {1600},    // HAL_PHY_RATE_11AC_DUP_24_MBPS,
+                {1550},    // HAL_PHY_RATE_11AC_DUP_36_MBPS,
+                {1550},    // HAL_PHY_RATE_11AC_DUP_48_MBPS,
+                {1500},    // HAL_PHY_RATE_11AC_DUP_54_MBPS,
+
+               //11ac 20MHZ NG, SG
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_6_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_13_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_19_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_26_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_39_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_52_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_58_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_65_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_78_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_7_2_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_14_4_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_21_6_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_28_8_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_43_3_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_57_7_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_65_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_72_2_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_86_6_MBPS,
+
+
+               //11ac 40MHZ NG, SG
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_13_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_27_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_40_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_54_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_81_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_108_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_121_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_135_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_162_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_180_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_15_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_30_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_45_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_60_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_90_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_120_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_135_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_150_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_180_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_200_MBPS,
+
+
+               //11ac 80MHZ NG, SG
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_29_3_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_58_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_87_8_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_117_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_175_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_234_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_263_3_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_292_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_351_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_390_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_32_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_65_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_97_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_130_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_195_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_260_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_292_5_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_325_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_390_MBPS,
+                {0000},    // HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_433_3_MBPS,
+#endif //WLAN_FEATURE_11AC
                 },  //    RF_SUBBAND_4_9_GHZ
         },
 
@@ -7352,7 +7742,7 @@
             100,   // RF_CHAN_108
             100,   // RF_CHAN_112
             100,   // RF_CHAN_116
-            100,   // RF_CHAN_120 
+            100,   // RF_CHAN_120
             100,   // RF_CHAN_124
             100,   // RF_CHAN_128
             100,   // RF_CHAN_132
@@ -7364,7 +7754,7 @@
             100,   // RF_CHAN_161
             100,   // RF_CHAN_165
             //CHANNEL BONDED CHANNELS
-            100,   // RF_CHAN_BOND_3 
+            100,   // RF_CHAN_BOND_3
             100,   // RF_CHAN_BOND_4
             100,   // RF_CHAN_BOND_5
             100,   // RF_CHAN_BOND_6
@@ -7381,15 +7771,15 @@
             100,   // RF_CHAN_BOND_38
             100,   // RF_CHAN_BOND_42
             100,   // RF_CHAN_BOND_46
-            100,   // RF_CHAN_BOND_50 
+            100,   // RF_CHAN_BOND_50
             100,   // RF_CHAN_BOND_54
             100,   // RF_CHAN_BOND_58
             100,   // RF_CHAN_BOND_62
             100,   // RF_CHAN_BOND_102
             100,   // RF_CHAN_BOND_106
             100,   // RF_CHAN_BOND_110
-            100,   // RF_CHAN_BOND_114 
-            100,   // RF_CHAN_BOND_118 
+            100,   // RF_CHAN_BOND_114
+            100,   // RF_CHAN_BOND_118
             100,   // RF_CHAN_BOND_122
             100,   // RF_CHAN_BOND_126
             100,   // RF_CHAN_BOND_130
@@ -8690,7 +9080,7 @@
             280,   // RF_CHAN_108
             280,   // RF_CHAN_112
             280,   // RF_CHAN_116
-            280,   // RF_CHAN_120 
+            280,   // RF_CHAN_120
             280,   // RF_CHAN_124
             280,   // RF_CHAN_128
             280,   // RF_CHAN_132
@@ -8702,7 +9092,7 @@
             280,   // RF_CHAN_161
             280,   // RF_CHAN_165
             //CHANNEL BONDED CHANNELS
-            280,   // RF_CHAN_BOND_3 
+            280,   // RF_CHAN_BOND_3
             280,   // RF_CHAN_BOND_4
             280,   // RF_CHAN_BOND_5
             280,   // RF_CHAN_BOND_6
@@ -8719,15 +9109,15 @@
             280,   // RF_CHAN_BOND_38
             280,   // RF_CHAN_BOND_42
             280,   // RF_CHAN_BOND_46
-            280,   // RF_CHAN_BOND_50 
+            280,   // RF_CHAN_BOND_50
             280,   // RF_CHAN_BOND_54
             280,   // RF_CHAN_BOND_58
             280,   // RF_CHAN_BOND_62
             280,   // RF_CHAN_BOND_102
             280,   // RF_CHAN_BOND_106
             280,   // RF_CHAN_BOND_110
-            280,   // RF_CHAN_BOND_114 
-            280,   // RF_CHAN_BOND_118 
+            280,   // RF_CHAN_BOND_114
+            280,   // RF_CHAN_BOND_118
             280,   // RF_CHAN_BOND_122
             280,   // RF_CHAN_BOND_126
             280,   // RF_CHAN_BOND_130
@@ -8743,7 +9133,7 @@
         {
             { 2150 }, // applied to all channels, MODE_802_11B
             { 1850 }, // applied to all channels,MODE_802_11AG
-            { 1750 }  // applied to all channels,MODE_802_11N 
+            { 1750 }  // applied to all channels,MODE_802_11N
         },
 
         //NV_TABLE_OFDM_CMD_PWR_OFFSET
@@ -8759,7 +9149,7 @@
     } // tables
 };
 
-#endif 
+#endif
 #endif
 
 
diff --git a/CORE/WDA/src/wlan_qct_wda.c b/CORE/WDA/src/wlan_qct_wda.c
index c0ba3e2..fd374a5 100644
--- a/CORE/WDA/src/wlan_qct_wda.c
+++ b/CORE/WDA/src/wlan_qct_wda.c
@@ -20,47 +20,33 @@
  */
 
 /*===========================================================================
-
                        W L A N _ Q C T _ WDA . C
-
   OVERVIEW:
-
   This software unit holds the implementation of the WLAN Transport Layer.
-
   The functions externalized by this module are to be called ONLY by other
   WLAN modules that properly register with the Transport Layer initially.
-
   DEPENDENCIES:
-
   Are listed for each API below.
 
-
   Copyright (c) 2010-2011 QUALCOMM Incorporated.
   All Rights Reserved.
   Qualcomm Confidential and Proprietary
 ===========================================================================*/
-
 /*===========================================================================
-
                       EDIT HISTORY FOR FILE
 
-
   This section contains comments describing changes made to the module.
   Notice that changes are listed in reverse chronological order.
 
-
    $Header$$DateTime$$Author$
 
-
   when        who        what, where, why
 ----------    ---       -------------------------------------------------
 10/05/2011    haparna     Adding support for Keep Alive Feature
 2010-12-30    smiryala     UMAC convergence changes
 2010-08-19    adwivedi    WLAN DAL AL(WDA) layer for Prima
 ===========================================================================*/
-
 #if defined( FEATURE_WLAN_INTEGRATED_SOC )
-
 #include "vos_mq.h" 
 #include "vos_api.h" 
 #include "vos_packet.h" 
@@ -82,32 +68,26 @@
 #include "limUtils.h"
 #include "btcApi.h"
 #include "vos_sched.h"
-
 #ifdef ANI_MANF_DIAG
 #include "pttMsgApi.h"
 #include "wlan_qct_sys.h"
 #endif /* ANI_MANF_DIAG */
-
 /* Used MACRO's */
 /* Get WDA context from vOSS module */
 #define VOS_GET_WDA_CTXT(a)            vos_get_context(VOS_MODULE_ID_WDA, a)
 #define VOS_GET_MAC_CTXT(a)            vos_get_context(VOS_MODULE_ID_PE, a)
 #define OFFSET_OF(structType,fldName)   (&((structType*)0)->fldName)
 #define WDA_BA_TX_FRM_THRESHOLD (5)
-
 #define  CONVERT_WDI2SIR_STATUS(x) \
    ((WDI_STATUS_SUCCESS != (x)) ? eSIR_FAILURE : eSIR_SUCCESS)
 
 #define  IS_WDI_STATUS_FAILURE(status) \
    ((WDI_STATUS_SUCCESS != (status)) && (WDI_STATUS_PENDING != (status)))
-
 #define  CONVERT_WDI2VOS_STATUS(x) \
    ((IS_WDI_STATUS_FAILURE(x)) ? VOS_STATUS_E_FAILURE  : VOS_STATUS_SUCCESS)
 
 /* macro's for acessing TL API/data structures */
-
 #define WDA_TL_GET_TX_PKTCOUNT(a, b, c, d) WLANTL_GetTxPktCount(a, b, c, d)
-
 #define WDA_GET_BA_TXFLAG(a, b, c)  \
    (((a)->wdaStaInfo[(b)].ucUseBaBitmap) & (1 << (c)))  
 
@@ -116,43 +96,33 @@
 
 #define WDA_CLEAR_BA_TXFLAG(a, b, c)  \
    (((a)->wdaStaInfo[b].ucUseBaBitmap) &= ~(1 << c))
-
 #define WDA_TL_BA_SESSION_ADD(a, b, c, d, e, f, g) \
    WLANTL_BaSessionAdd(a, b, c, d, e, f, g)
-
 /* timer related Macros */
 #define WDA_CREATE_TIMER(a, b, c, d, e, f, g) \
    tx_timer_create(a, b, c, d, e, f, g)
 #define WDA_START_TIMER(a) tx_timer_activate(a)
 #define WDA_STOP_TIMER(a) tx_timer_deactivate(a)
 #define WDA_DESTROY_TIMER(a) tx_timer_delete(a)
-
 #define WDA_WDI_START_TIMEOUT 15000
 
 #define WDA_LAST_POLLED_THRESHOLD(a, curSta, tid) \
    ((a)->wdaStaInfo[curSta].framesTxed[tid] + WDA_BA_TX_FRM_THRESHOLD)
-
 #define WDA_BA_MAX_WINSIZE   (64)
-
 #define WDA_INVALID_KEY_INDEX  0xFF
-
 #define WDA_NUM_PWR_SAVE_CFG       11
-
 #define WDA_TX_COMPLETE_TIME_OUT_VALUE 1000
   
-
 #define WDA_MAX_RETRIES_TILL_RING_EMPTY  1000   /* MAX 10000 msec = 10 seconds wait */
 
 #define WDA_WAIT_MSEC_TILL_RING_EMPTY    10    /* 10 msec wait per cycle */
 /* extern declarations */
 extern void vos_WDAComplete_cback(v_PVOID_t pVosContext);
-
 /* forward declarations */
 void WDA_SendMsg(tWDA_CbContext *pWDA, tANI_U16 msgType, 
                                         void *pBodyptr, tANI_U32 bodyVal) ;
 VOS_STATUS WDA_prepareConfigTLV(v_PVOID_t pVosContext, 
                                 WDI_StartReqParamsType  *wdiStartParams ) ;
-
 VOS_STATUS WDA_wdiCompleteCB(v_PVOID_t pVosContext) ;
 VOS_STATUS WDA_ProcessSetTxPerTrackingReq(tWDA_CbContext *pWDA, tSirTxPerTrackingParam *pTxPerTrackingParams);
 
@@ -170,22 +140,18 @@
 static VOS_STATUS wdaDestroyTimers(tWDA_CbContext *pWDA);
 void WDA_BaCheckActivity(tWDA_CbContext *pWDA) ;
 void WDA_HALDumpCmdCallback(WDI_HALDumpCmdRspParamsType *wdiRspParams, void* pUserData);
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
 VOS_STATUS WDA_ProcessAggrAddTSReq(tWDA_CbContext *pWDA, tAggrAddTsParams *pAggrAddTsReqParams);
 #endif /* WLAN_FEATURE_VOWIFI_11R */
 
-
 void WDA_TimerHandler(v_VOID_t *pWDA, tANI_U32 timerInfo) ;
 void WDA_ProcessTxCompleteTimeOutInd(tWDA_CbContext* pContext) ;
 VOS_STATUS WDA_ResumeDataTx(tWDA_CbContext *pWDA);
-
 #ifdef FEATURE_WLAN_SCAN_PNO
 static VOS_STATUS WDA_ProcessSetPrefNetworkReq(tWDA_CbContext *pWDA, tSirPNOScanReq *pPNOScanReqParams);
 static VOS_STATUS WDA_ProcessSetRssiFilterReq(tWDA_CbContext *pWDA, tSirSetRSSIFilterReq* pRssiFilterParams);
 static VOS_STATUS WDA_ProcessUpdateScanParams(tWDA_CbContext *pWDA, tSirUpdateScanParams *pUpdateScanParams);
 #endif // FEATURE_WLAN_SCAN_PNO
-
 #ifdef WLAN_FEATURE_PACKET_FILTERING
 static VOS_STATUS WDA_Process8023MulticastListReq (
                                        tWDA_CbContext *pWDA,
@@ -204,12 +170,9 @@
                                tSirRcvFltPktClearParam *pRcvFltPktClearParam
                                                          );
 #endif // WLAN_FEATURE_PACKET_FILTERING
-
 VOS_STATUS WDA_ProcessSetPowerParamsReq(tWDA_CbContext *pWDA, tSirSetPowerParamsReq *pPowerParams);
-
 static VOS_STATUS WDA_ProcessTxControlInd(tWDA_CbContext *pWDA,
                                           tpTxControlParams pTxCtrlParam);
-
 VOS_STATUS WDA_GetWepKeysFromCfg( tWDA_CbContext *pWDA, 
                                                       v_U8_t *pDefaultKeyId,
                                                       v_U8_t *pNumKeys,
@@ -232,7 +195,6 @@
    tWDA_CbContext *wdaContext;
    VOS_STATUS status;
    WDI_DeviceCapabilityType wdiDevCapability = {0} ;
-
    /* Allocate WDA context */
    status = vos_alloc_context(pVosContext, VOS_MODULE_ID_WDA, 
                            (v_VOID_t **)&wdaContext, sizeof(tWDA_CbContext)) ;
@@ -240,7 +202,6 @@
    {
       return VOS_STATUS_E_NOMEM;
    }
-
    /*__asm int 3;*/
    vos_mem_zero(wdaContext,sizeof(tWDA_CbContext));
    
@@ -257,7 +218,6 @@
                 "WDI Sync Event init failed - status = %d\n", status);
       status = VOS_STATUS_E_FAILURE;
    }
-
    /* Init Frame transfer event */
    status = vos_event_init(&wdaContext->txFrameEvent);
    if(!VOS_IS_STATUS_SUCCESS(status)) 
@@ -266,7 +226,6 @@
                 "VOS Mgmt Frame Event init failed - status = %d\n", status);
       status = VOS_STATUS_E_FAILURE;
    }
-
    status = vos_event_init(&wdaContext->suspendDataTxEvent);
    if(!VOS_IS_STATUS_SUCCESS(status)) 
    {
@@ -274,7 +233,6 @@
             "VOS suspend data tx Event init failed - status = %d\n", status);
       status = VOS_STATUS_E_FAILURE;
    }
-
    status = vos_event_init(&wdaContext->waitOnWdiIndicationCallBack);
    if(!VOS_IS_STATUS_SUCCESS(status)) 
    {
@@ -282,9 +240,7 @@
             "VOS wait On Wdi Ind Event init failed - status = %d\n", status);
       status = VOS_STATUS_E_FAILURE;
    }
-
    vos_trace_setLevel(VOS_MODULE_ID_WDA,VOS_TRACE_LEVEL_ERROR);
-
    wdaContext->driverMode = pMacParams->driverType;
    if(WDI_STATUS_SUCCESS != WDI_Init(pOSContext, &wdaContext->pWdiContext, 
                                      &wdiDevCapability, pMacParams->driverType))
@@ -298,7 +254,6 @@
       pMacParams->maxStation = wdiDevCapability.ucMaxSTASupported ;
       pMacParams->maxBssId =  wdiDevCapability.ucMaxBSSSupported;
       pMacParams->frameTransRequired = wdiDevCapability.bFrameXtlSupported;
-
       /* update max STA in WDA used for BA */
       wdaContext->wdaMaxSta = pMacParams->maxStation;
       /* store the frameTransRequired flag in wdaContext, to send this to HAL 
@@ -306,11 +261,9 @@
        */
       wdaContext->frameTransRequired = wdiDevCapability.bFrameXtlSupported;
    }
-
    return status;
 }
 
-
 /*
  * FUNCTION: WDA_preStart
  * Trigger DAL-AL to start CFG download 
@@ -319,24 +272,20 @@
 {   
    VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
    vos_msg_t wdaMsg = {0} ;
-
    /*
     * trigger CFG download in WDA by sending WDA_CFG_DNLD message
     */ 
    wdaMsg.type = WNI_CFG_DNLD_REQ ; 
    wdaMsg.bodyptr = NULL;
    wdaMsg.bodyval = 0;
-
    /* post the message.. */
    vosStatus = vos_mq_post_message( VOS_MQ_ID_WDA, &wdaMsg );
    if ( !VOS_IS_STATUS_SUCCESS(vosStatus) )
    {
       vosStatus = VOS_STATUS_E_BADMSG;
    }
-
    return( vosStatus );
 }
-
 /*
  * FUNCTION: WDA_wdiStartCallback
  * Once WDI_Start is finished, WDI start callback will be called by WDI
@@ -347,14 +296,12 @@
 {
    tWDA_CbContext *wdaContext;
    VOS_STATUS status;
-
    if (NULL == pVosContext)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_FATAL,
                  "%s: Invoked with invalid pVosContext", __FUNCTION__ );
       return;
    }
-
    wdaContext = VOS_GET_WDA_CTXT(pVosContext);
    if (NULL == wdaContext)
    {
@@ -362,7 +309,6 @@
                  "%s: Invoked with invalid wdaContext", __FUNCTION__ );
       return;
    }
-
    if (WDI_STATUS_SUCCESS != wdiRspParams->wdiStatus)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_FATAL,
@@ -372,7 +318,6 @@
    {
       wdaContext->wdaState = WDA_START_STATE;
    }
-
    /* extract and save version information from the Start Response */
    wdaContext->wcnssWlanCompiledVersion.major =
       wdiRspParams->wlanCompiledVersion.major;
@@ -396,7 +341,6 @@
    wpalMemoryCopy(wdaContext->wcnssHardwareVersionString,
            wdiRspParams->wcnssHardwareVersion,
            sizeof(wdaContext->wcnssHardwareVersionString));
-
    /* Notify WDA_start that WDI_Start has completed */
    status = vos_event_set(&wdaContext->wdaWdiEvent);
    if (VOS_STATUS_SUCCESS != status)
@@ -404,30 +348,25 @@
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_FATAL,
                  "%s: Unable to unblock WDA_start", __FUNCTION__ );
    }
-
    return;
 }
 
-
 /*
  * FUNCTION: WDA_start
  * Prepare TLV configuration and call WDI_Start.
  */
-
 VOS_STATUS WDA_start(v_PVOID_t pVosContext)
 {
    tWDA_CbContext *wdaContext;
    VOS_STATUS status;
    WDI_Status wdiStatus;
    WDI_StartReqParamsType wdiStartParam;
-
    if (NULL == pVosContext)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                  "%s: Invoked with invalid pVosContext", __FUNCTION__ );
       return VOS_STATUS_E_FAILURE;
    }
-
    wdaContext = VOS_GET_WDA_CTXT(pVosContext);
    if (NULL == wdaContext)
    {
@@ -435,7 +374,6 @@
                  "%s: Invoked with invalid wdaContext", __FUNCTION__ );
       return VOS_STATUS_E_FAILURE;
    }
-
    /* Non-FTM mode, WDA status for START must be INIT
     * FTM mode, WDA Status for START can be INIT or STOP */
    if ( (WDA_INIT_STATE != wdaContext->wdaState) &&
@@ -446,14 +384,11 @@
                  __FUNCTION__, wdaContext->wdaState );
       return VOS_STATUS_E_FAILURE;
    }
-
    /* initialize the wdiStartParam.  Note that we can create this on
       the stack since we won't exit until WDI_Start() completes or
       times out */
    vos_mem_set(&wdiStartParam, sizeof(wdiStartParam), 0);
-
    wdiStartParam.wdiDriverType = wdaContext->driverMode;
-
    /* prepare the config TLV for the WDI */
    status = WDA_prepareConfigTLV(pVosContext, &wdiStartParam);
    if ( !VOS_IS_STATUS_SUCCESS(status) )
@@ -462,17 +397,13 @@
                  "%s: Unable to prepare Config TLV", __FUNCTION__ );
       return VOS_STATUS_E_FAILURE;
    }
-
    /* note from here onwards if an error occurs we must
       reclaim the config TLV buffer */
-
    wdiStartParam.wdiLowLevelIndCB = WDA_lowLevelIndCallback;
    wdiStartParam.pIndUserData = (v_PVOID_t *)wdaContext;
    wdiStartParam.wdiReqStatusCB = NULL;
-
    /* initialize the WDA-WDI synchronization event */
    vos_event_reset(&wdaContext->wdaWdiEvent);
-
    /* call WDI start */
    wdiStatus = WDI_Start(&wdiStartParam,
                          (WDI_StartRspCb)WDA_wdiStartCallback,
@@ -484,7 +415,6 @@
       vos_mem_free(wdiStartParam.pConfigBuffer);
       return VOS_STATUS_E_FAILURE;
    }
-
    /* wait for WDI start to invoke our callback */
    status = vos_wait_single_event( &wdaContext->wdaWdiEvent,
                                    WDA_WDI_START_TIMEOUT );
@@ -504,12 +434,9 @@
       vos_mem_free(wdiStartParam.pConfigBuffer);
       return VOS_STATUS_E_FAILURE;
    }
-
    /* WDI_Start() has completed so we can resume our work */
-
    /* we no longer need the config TLV */
    vos_mem_free(wdiStartParam.pConfigBuffer);
-
    /* if we are not in the START state then WDI_Start() failed */
    if (WDA_START_STATE != wdaContext->wdaState)
    {
@@ -517,17 +444,14 @@
                  "%s: WDI_Start() failure detected", __FUNCTION__ );
       return VOS_STATUS_E_FAILURE;
    }
-
    /* FTM mode does not need to monitor BA activity */
    if ( eDRIVER_TYPE_MFG != wdaContext->driverMode )
    {
       status = wdaCreateTimers(wdaContext) ;
    }
-
    return status;
 }
 
-
 /*
  * FUNCTION: WDA_prepareConfigTLV
  * Function to prepare CFG for DAL(WDA)
@@ -545,7 +469,6 @@
    tANI_U32       configParamSize;
    tANI_U32       *configDataValue;
    WDI_WlanVersionType wcnssCompiledApiVersion;
-
    if ((NULL == pMac)||(NULL == wdaContext))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -553,7 +476,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    configParamSize = (sizeof(tHalCfg) * QWLAN_HAL_CFG_MAX_PARAMS) + 
                            WNI_CFG_STA_ID_LEN +
                            WNI_CFG_EDCA_WME_ACBK_LEN +
@@ -561,7 +483,6 @@
                            WNI_CFG_EDCA_WME_ACVI_LEN +
                            WNI_CFG_EDCA_WME_ACVO_LEN +
                            + (QWLAN_HAL_CFG_INTEGER_PARAM * sizeof(tANI_U32));
-
    /* malloc memory for all configs in one shot */ 
    configParam = vos_mem_malloc(configParamSize);
    
@@ -573,12 +494,9 @@
       return VOS_STATUS_E_NOMEM;
    }
    vos_mem_set(configParam, configParamSize, 0);
-
    wdiStartParams->pConfigBuffer = configParam;
-
    tlvStruct = (tHalCfg *)configParam;
    tlvStructStart = (tANI_U8 *)configParam;
-
    /* TODO: Remove Later */
    /* QWLAN_HAL_CFG_STA_ID */
    tlvStruct->type = QWLAN_HAL_CFG_STA_ID;
@@ -594,10 +512,8 @@
    /* calculate the pad bytes to have the CFG in aligned format */
    tlvStruct->padBytes = ALIGNED_WORD_SIZE - 
                               (tlvStruct->length & (ALIGNED_WORD_SIZE - 1));
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                + sizeof(tHalCfg) + tlvStruct->length + tlvStruct->padBytes)) ;
-
    /* QWLAN_HAL_CFG_CURRENT_TX_ANTENNA */
    tlvStruct->type = QWLAN_HAL_CFG_CURRENT_TX_ANTENNA;
    tlvStruct->length = sizeof(tANI_U32);
@@ -609,10 +525,8 @@
                           "Failed to get value for WNI_CFG_CURRENT_TX_ANTENNA");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_CURRENT_RX_ANTENNA */
    tlvStruct->type = QWLAN_HAL_CFG_CURRENT_RX_ANTENNA;
    tlvStruct->length = sizeof(tANI_U32);
@@ -624,10 +538,8 @@
                     "Failed to get value for WNI_CFG_CURRENT_RX_ANTENNA");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_LOW_GAIN_OVERRIDE */
    tlvStruct->type = QWLAN_HAL_CFG_LOW_GAIN_OVERRIDE;
    tlvStruct->length = sizeof(tANI_U32);
@@ -639,7 +551,6 @@
                     "Failed to get value for WNI_CFG_LOW_GAIN_OVERRIDE");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ;
  
@@ -654,10 +565,8 @@
                     "Failed to get value for WNI_CFG_POWER_STATE_PER_CHAIN");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)); 
-
    /* QWLAN_HAL_CFG_CAL_PERIOD */
    tlvStruct->type = QWLAN_HAL_CFG_CAL_PERIOD;
    tlvStruct->length = sizeof(tANI_U32);
@@ -669,10 +578,8 @@
                     "Failed to get value for WNI_CFG_CAL_PERIOD");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length));
-
    /* QWLAN_HAL_CFG_CAL_CONTROL  */
    tlvStruct->type = QWLAN_HAL_CFG_CAL_CONTROL ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -684,10 +591,8 @@
                     "Failed to get value for WNI_CFG_CAL_CONTROL");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length));
-
    /* QWLAN_HAL_CFG_PROXIMITY  */
    tlvStruct->type = QWLAN_HAL_CFG_PROXIMITY ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -699,10 +604,8 @@
                     "Failed to get value for WNI_CFG_PROXIMITY");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                              + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_NETWORK_DENSITY  */
    tlvStruct->type = QWLAN_HAL_CFG_NETWORK_DENSITY ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -714,10 +617,8 @@
                     "Failed to get value for WNI_CFG_NETWORK_DENSITY");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)); 
-
    /* QWLAN_HAL_CFG_MAX_MEDIUM_TIME  */
    tlvStruct->type = QWLAN_HAL_CFG_MAX_MEDIUM_TIME ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -729,10 +630,8 @@
                     "Failed to get value for WNI_CFG_MAX_MEDIUM_TIME");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)); 
-
    /* QWLAN_HAL_CFG_MAX_MPDUS_IN_AMPDU   */
    tlvStruct->type = QWLAN_HAL_CFG_MAX_MPDUS_IN_AMPDU  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -744,10 +643,8 @@
                     "Failed to get value for WNI_CFG_MAX_MPDUS_IN_AMPDU");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ;
-
    /* QWLAN_HAL_CFG_RTS_THRESHOLD   */
    tlvStruct->type = QWLAN_HAL_CFG_RTS_THRESHOLD  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -759,10 +656,8 @@
                     "Failed to get value for WNI_CFG_RTS_THRESHOLD");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length));
-
    /* QWLAN_HAL_CFG_SHORT_RETRY_LIMIT   */
    tlvStruct->type = QWLAN_HAL_CFG_SHORT_RETRY_LIMIT  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -774,10 +669,8 @@
                     "Failed to get value for WNI_CFG_SHORT_RETRY_LIMIT");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_LONG_RETRY_LIMIT   */
    tlvStruct->type = QWLAN_HAL_CFG_LONG_RETRY_LIMIT  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -789,10 +682,8 @@
                     "Failed to get value for WNI_CFG_LONG_RETRY_LIMIT");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ;
-
    /* QWLAN_HAL_CFG_FRAGMENTATION_THRESHOLD   */
    tlvStruct->type = QWLAN_HAL_CFG_FRAGMENTATION_THRESHOLD  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -804,10 +695,8 @@
                     "Failed to get value for WNI_CFG_FRAGMENTATION_THRESHOLD");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ;
-
    /* QWLAN_HAL_CFG_DYNAMIC_THRESHOLD_ZERO   */
    tlvStruct->type = QWLAN_HAL_CFG_DYNAMIC_THRESHOLD_ZERO  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -819,7 +708,6 @@
                     "Failed to get value for WNI_CFG_DYNAMIC_THRESHOLD_ZERO");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length));
  
@@ -834,10 +722,8 @@
                     "Failed to get value for WNI_CFG_DYNAMIC_THRESHOLD_ONE");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)); 
-
    /* QWLAN_HAL_CFG_DYNAMIC_THRESHOLD_TWO   */
    tlvStruct->type = QWLAN_HAL_CFG_DYNAMIC_THRESHOLD_TWO  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -849,7 +735,6 @@
                     "Failed to get value for WNI_CFG_DYNAMIC_THRESHOLD_TWO");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length));
  
@@ -864,7 +749,6 @@
                     "Failed to get value for WNI_CFG_FIXED_RATE");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length));
  
@@ -879,7 +763,6 @@
                     "Failed to get value for WNI_CFG_RETRYRATE_POLICY");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length));
  
@@ -894,10 +777,8 @@
                     "Failed to get value for WNI_CFG_RETRYRATE_SECONDARY");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_RETRYRATE_TERTIARY   */
    tlvStruct->type = QWLAN_HAL_CFG_RETRYRATE_TERTIARY  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -911,7 +792,6 @@
    }
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_FORCE_POLICY_PROTECTION   */
    tlvStruct->type = QWLAN_HAL_CFG_FORCE_POLICY_PROTECTION  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -923,10 +803,8 @@
                     "Failed to get value for WNI_CFG_FORCE_POLICY_PROTECTION");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length); 
-
    /* QWLAN_HAL_CFG_FIXED_RATE_MULTICAST_24GHZ   */
    tlvStruct->type = QWLAN_HAL_CFG_FIXED_RATE_MULTICAST_24GHZ  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -938,10 +816,8 @@
                  "Failed to get value for WNI_CFG_FIXED_RATE_MULTICAST_24GHZ");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length); 
-
    /* QWLAN_HAL_CFG_FIXED_RATE_MULTICAST_5GHZ   */
    tlvStruct->type = QWLAN_HAL_CFG_FIXED_RATE_MULTICAST_5GHZ  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -953,7 +829,6 @@
                  "Failed to get value for WNI_CFG_FIXED_RATE_MULTICAST_5GHZ");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length); 
    
@@ -969,7 +844,6 @@
                     "Failed to get value for WNI_CFG_DEFAULT_RATE_INDEX_24GHZ");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length); 
 #endif
@@ -984,10 +858,8 @@
                     "Failed to get value for WNI_CFG_DEFAULT_RATE_INDEX_5GHZ");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                              + sizeof(tHalCfg) + tlvStruct->length); 
-
    /* QWLAN_HAL_CFG_MAX_BA_SESSIONS   */
    tlvStruct->type = QWLAN_HAL_CFG_MAX_BA_SESSIONS  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -999,7 +871,6 @@
                     "Failed to get value for WNI_CFG_MAX_BA_SESSIONS");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                              + sizeof(tHalCfg) + tlvStruct->length);
  
@@ -1014,10 +885,8 @@
                "Failed to get value for WNI_CFG_PS_DATA_INACTIVITY_TIMEOUT");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                              + sizeof(tHalCfg) + tlvStruct->length); 
-
    /* QWLAN_HAL_CFG_PS_ENABLE_BCN_FILTER   */
    tlvStruct->type = QWLAN_HAL_CFG_PS_ENABLE_BCN_FILTER  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1029,10 +898,8 @@
                     "Failed to get value for WNI_CFG_PS_ENABLE_BCN_FILTER");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                              + sizeof(tHalCfg) + tlvStruct->length); 
-
    /* QWLAN_HAL_CFG_PS_ENABLE_RSSI_MONITOR   */
    tlvStruct->type = QWLAN_HAL_CFG_PS_ENABLE_RSSI_MONITOR  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1044,10 +911,8 @@
                     "Failed to get value for WNI_CFG_PS_ENABLE_RSSI_MONITOR");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                               + sizeof(tHalCfg) + tlvStruct->length); 
-
    /* QWLAN_HAL_CFG_NUM_BEACON_PER_RSSI_AVERAGE   */
    tlvStruct->type = QWLAN_HAL_CFG_NUM_BEACON_PER_RSSI_AVERAGE  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1059,7 +924,6 @@
                 "Failed to get value for WNI_CFG_NUM_BEACON_PER_RSSI_AVERAGE");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                               + sizeof(tHalCfg) + tlvStruct->length);
  
@@ -1074,10 +938,8 @@
                     "Failed to get value for WNI_CFG_STATS_PERIOD");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                                + sizeof(tHalCfg) + tlvStruct->length); 
-
    /* QWLAN_HAL_CFG_CFP_MAX_DURATION   */
    tlvStruct->type = QWLAN_HAL_CFG_CFP_MAX_DURATION  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1089,20 +951,16 @@
                     "Failed to get value for WNI_CFG_CFP_MAX_DURATION");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* QWLAN_HAL_CFG_FRAME_TRANS_ENABLED */
    tlvStruct->type = QWLAN_HAL_CFG_FRAME_TRANS_ENABLED  ;
    tlvStruct->length = sizeof(tANI_U32);
    configDataValue = (tANI_U32 *)(tlvStruct + 1);
    vos_mem_copy(configDataValue, &wdaContext->frameTransRequired, 
                                                sizeof(tANI_U32));
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* QWLAN_HAL_CFG_DTIM_PERIOD */
    tlvStruct->type = QWLAN_HAL_CFG_DTIM_PERIOD  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1114,10 +972,8 @@
                     "Failed to get value for WNI_CFG_DTIM_PERIOD");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* QWLAN_HAL_CFG_EDCA_WMM_ACBK */
    tlvStruct->type = QWLAN_HAL_CFG_EDCA_WMM_ACBK  ;
    strLength = WNI_CFG_EDCA_WME_ACBK_LEN;
@@ -1133,10 +989,8 @@
    /* calculate the pad bytes to have the CFG in aligned format */
    tlvStruct->padBytes = ALIGNED_WORD_SIZE - 
                               (tlvStruct->length & (ALIGNED_WORD_SIZE - 1));
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                  + sizeof(tHalCfg) + tlvStruct->length + tlvStruct->padBytes) ; 
-
    /* QWLAN_HAL_CFG_EDCA_WMM_ACBE */
    tlvStruct->type = QWLAN_HAL_CFG_EDCA_WMM_ACBE  ;
    strLength = WNI_CFG_EDCA_WME_ACBE_LEN;
@@ -1152,10 +1006,8 @@
    /* calculate the pad bytes to have the CFG in aligned format */
    tlvStruct->padBytes = ALIGNED_WORD_SIZE - 
                               (tlvStruct->length & (ALIGNED_WORD_SIZE - 1));
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                  + sizeof(tHalCfg) + tlvStruct->length + tlvStruct->padBytes) ; 
-
    /* QWLAN_HAL_CFG_EDCA_WMM_ACVI */
    tlvStruct->type = QWLAN_HAL_CFG_EDCA_WMM_ACVO  ;
    strLength = WNI_CFG_EDCA_WME_ACVI_LEN;
@@ -1171,10 +1023,8 @@
    /* calculate the pad bytes to have the CFG in aligned format */
    tlvStruct->padBytes = ALIGNED_WORD_SIZE - 
                               (tlvStruct->length & (ALIGNED_WORD_SIZE - 1));
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                  + sizeof(tHalCfg) + tlvStruct->length + tlvStruct->padBytes) ; 
-
    /* QWLAN_HAL_CFG_EDCA_WMM_ACVO */
    tlvStruct->type = QWLAN_HAL_CFG_EDCA_WMM_ACVI  ;
    strLength = WNI_CFG_EDCA_WME_ACVO_LEN;
@@ -1190,10 +1040,8 @@
    /* calculate the pad bytes to have the CFG in aligned format */
    tlvStruct->padBytes = ALIGNED_WORD_SIZE - 
                               (tlvStruct->length & (ALIGNED_WORD_SIZE - 1));
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                  + sizeof(tHalCfg) + tlvStruct->length + tlvStruct->padBytes) ; 
-
    /* QWLAN_HAL_CFG_BA_THRESHOLD_HIGH */
    tlvStruct->type = QWLAN_HAL_CFG_BA_THRESHOLD_HIGH  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1205,10 +1053,8 @@
                     "Failed to get value for WNI_CFG_BA_THRESHOLD_HIGH");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* QWLAN_HAL_CFG_MAX_BA_BUFFERS */
    tlvStruct->type = QWLAN_HAL_CFG_MAX_BA_BUFFERS  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1220,10 +1066,8 @@
                     "Failed to get value for WNI_CFG_MAX_BA_BUFFERS");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* QWLAN_HAL_CFG_DYNAMIC_PS_POLL_VALUE */
    tlvStruct->type = QWLAN_HAL_CFG_DYNAMIC_PS_POLL_VALUE  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1235,10 +1079,8 @@
                     "Failed to get value for WNI_CFG_DYNAMIC_PS_POLL_VALUE");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* QWLAN_HAL_CFG_TELE_BCN_TRANS_LI */
    tlvStruct->type = QWLAN_HAL_CFG_TELE_BCN_TRANS_LI  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1252,7 +1094,6 @@
    }
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* QWLAN_HAL_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS */
    tlvStruct->type = QWLAN_HAL_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1266,7 +1107,6 @@
    }
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* QWLAN_HAL_CFG_TELE_BCN_MAX_LI */
    tlvStruct->type = QWLAN_HAL_CFG_TELE_BCN_MAX_LI  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1280,7 +1120,6 @@
    }
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* QWLAN_HAL_CFG_TELE_BCN_MAX_LI_IDLE_BCNS */
    tlvStruct->type = QWLAN_HAL_CFG_TELE_BCN_MAX_LI_IDLE_BCNS  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1294,7 +1133,6 @@
    }
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* QWLAN_HAL_CFG_TELE_BCN_WAKEUP_EN */
    tlvStruct->type = QWLAN_HAL_CFG_TELE_BCN_WAKEUP_EN  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1308,7 +1146,6 @@
    }
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* QWLAN_HAL_CFG_INFRA_STA_KEEP_ALIVE_PERIOD */
    tlvStruct->type = QWLAN_HAL_CFG_INFRA_STA_KEEP_ALIVE_PERIOD  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1320,10 +1157,8 @@
                     "Failed to get value for WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /*QWLAN_HAL_CFG_TX_PWR_CTRL_ENABLE*/
    tlvStruct->type = QWLAN_HAL_CFG_TX_PWR_CTRL_ENABLE  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1335,10 +1170,8 @@
                     "Failed to get value for WNI_CFG_TX_PWR_CTRL_ENABLE");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ;
-
    /* QWLAN_HAL_CFG_ENABLE_CLOSE_LOOP   */
    tlvStruct->type = QWLAN_HAL_CFG_ENABLE_CLOSE_LOOP  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1350,15 +1183,12 @@
                     "Failed to get value for WNI_CFG_ENABLE_CLOSE_LOOP");
       goto handle_failure;
    }
-
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* [COEX] strictly speaking, the Coex parameters are not part of the WLAN_CFG_FILE binary, 
    * but are from the WLAN_INI_FILE file.  However, this is the only parameter download routine
    * into FW, so the parameters are added here.
    */
-
    /* [COEX] QWLAN_HAL_CFG_BTC_EXECUTION_MODE */
    tlvStruct->type = QWLAN_HAL_CFG_BTC_EXECUTION_MODE  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1366,7 +1196,6 @@
    *configDataValue = pMac->btc.btcConfig.btcExecutionMode; 
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* [COEX] QWLAN_HAL_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK */
    tlvStruct->type = QWLAN_HAL_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1374,7 +1203,6 @@
    *configDataValue = pMac->btc.btcConfig.btcConsBtSlotsToBlockDuringDhcp; 
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* [COEX] QWLAN_HAL_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS */
    tlvStruct->type = QWLAN_HAL_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1382,7 +1210,6 @@
    *configDataValue = pMac->btc.btcConfig.btcA2DPBtSubIntervalsDuringDhcp; 
    tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
-
    /* [COEX] QWLAN_HAL_CFG_WCNSS_API_VERSION */
    tlvStruct->type = QWLAN_HAL_CFG_WCNSS_API_VERSION  ;
    tlvStruct->length = sizeof(tANI_U32);
@@ -1440,11 +1267,9 @@
                             + sizeof(tHalCfg) + tlvStruct->length) ; 
 
    wdiStartParams->usConfigBufferLen = (tANI_U8 *)tlvStruct - tlvStructStart ;
-
 #ifdef WLAN_DEBUG
    {
       int i;
-
        VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                     "****** Dumping CFG TLV ***** ");
       for (i=0; (i+7) < wdiStartParams->usConfigBufferLen; i+=8)
@@ -1470,14 +1295,11 @@
                     "**************************** ");
    }
 #endif
-
    return VOS_STATUS_SUCCESS ;
-
 handle_failure:
    vos_mem_free(configParam);
    return VOS_STATUS_E_FAILURE;
 }
-
 /*
  * FUNCTION: WDA_wdiCompleteCB
  * call the voss call back function
@@ -1485,21 +1307,18 @@
 void WDA_stopCallback(WDI_Status status, v_PVOID_t *pVosContext)
 {
    tWDA_CbContext *wdaContext= (tWDA_CbContext *)VOS_GET_WDA_CTXT(pVosContext);
-
    if (NULL == wdaContext)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                  "%s: Invoked with invalid wdaContext", __FUNCTION__ );
       return ;
    }
-
    /* free the config structure */
    if(wdaContext->wdaWdiApiMsgParam != NULL)
    {
       vos_mem_free(wdaContext->wdaWdiApiMsgParam);
       wdaContext->wdaWdiApiMsgParam = NULL;
    }
-
    if(WDI_STATUS_SUCCESS != status)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -1510,25 +1329,20 @@
    {
       wdaContext->wdaState = WDA_STOP_STATE;
    }
-
    /* Indicate VOSS about the start complete */
    vos_WDAComplete_cback(pVosContext);
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_stop
  * call WDI_stop
  */ 
-
 VOS_STATUS WDA_stop(v_PVOID_t pVosContext, tANI_U8 reason)
 {
    WDI_Status wdiStatus;
    VOS_STATUS status = VOS_STATUS_SUCCESS;
    WDI_StopReqParamsType *wdiStopReq;
    tWDA_CbContext *pWDA = (tWDA_CbContext *)VOS_GET_WDA_CTXT(pVosContext);
-
    if (NULL == pWDA)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -1536,7 +1350,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    /* FTM mode stay START_STATE */
    if( (WDA_READY_STATE != pWDA->wdaState) &&
        (WDA_INIT_STATE != pWDA->wdaState) &&
@@ -1544,7 +1357,6 @@
    {
       VOS_ASSERT(0);
    }
-
    wdiStopReq = (WDI_StopReqParamsType *)
                             vos_mem_malloc(sizeof(WDI_StopReqParamsType));
    if(NULL == wdiStopReq)
@@ -1554,10 +1366,8 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiStopReq->wdiStopReason = reason;
    wdiStopReq->wdiReqStatusCB = NULL;
-
    if(NULL != pWDA->wdaWdiApiMsgParam)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -1566,17 +1376,14 @@
       vos_mem_free(wdiStopReq);
       return VOS_STATUS_E_FAILURE;
    }
-
    if ( eDRIVER_TYPE_MFG != pWDA->driverMode )
    {
       wdaDestroyTimers(pWDA);
    }
    pWDA->wdaWdiApiMsgParam = (v_PVOID_t *)wdiStopReq;
-
    /* call WDI stop */
    wdiStatus = WDI_Stop(wdiStopReq,
                            (WDI_StopRspCb)WDA_stopCallback, pVosContext);
-
    if (IS_WDI_STATUS_FAILURE(wdiStatus) )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -1585,10 +1392,8 @@
       pWDA->wdaWdiApiMsgParam = NULL;
       status = VOS_STATUS_E_FAILURE;
    }
-
    return status;
 }
-
 /*
  * FUNCTION: WDA_close
  * call WDI_close and free the WDA context
@@ -1599,29 +1404,24 @@
    WDI_Status wstatus;
    VOS_STATUS vstatus;
    tWDA_CbContext *wdaContext= (tWDA_CbContext *)VOS_GET_WDA_CTXT(pVosContext);
-
    if (NULL == wdaContext)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                  "%s: Invoked with invalid wdaContext", __FUNCTION__ );
       return VOS_STATUS_E_FAILURE;
    }
-
    if((WDA_INIT_STATE != wdaContext->wdaState) && 
                               (WDA_STOP_STATE != wdaContext->wdaState))
    {
       VOS_ASSERT(0);
    }
-
    /*call WDI close*/
    wstatus = WDI_Close();
    if ( wstatus != WDI_STATUS_SUCCESS )
    {
       status = VOS_STATUS_E_FAILURE;
    }
-
    wdaContext->wdaState = WDA_CLOSE_STATE;
-
    /* Destroy the events */
    vstatus = vos_event_destroy(&wdaContext->wdaWdiEvent);
    if(!VOS_IS_STATUS_SUCCESS(vstatus)) 
@@ -1632,30 +1432,29 @@
    }
 
    vstatus = vos_event_destroy(&wdaContext->txFrameEvent);
-   if(!VOS_IS_STATUS_SUCCESS(status))
+   if(!VOS_IS_STATUS_SUCCESS(vstatus))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                   "VOS Event destroy failed - status = %d\n", status);
       status = VOS_STATUS_E_FAILURE;
    }
    vstatus = vos_event_destroy(&wdaContext->suspendDataTxEvent);
-   if(!VOS_IS_STATUS_SUCCESS(status))
+   if(!VOS_IS_STATUS_SUCCESS(vstatus))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                   "VOS Event destroy failed - status = %d\n", status);
       status = VOS_STATUS_E_FAILURE;
    }
    vstatus = vos_event_destroy(&wdaContext->waitOnWdiIndicationCallBack);
-   if(!VOS_IS_STATUS_SUCCESS(status))
+   if(!VOS_IS_STATUS_SUCCESS(vstatus))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                   "VOS Event destroy failed - status = %d\n", status);
       status = VOS_STATUS_E_FAILURE;
    }
-
    /* free WDA context */
    vstatus = vos_free_context(pVosContext, VOS_MODULE_ID_WDA, wdaContext);
-   if ( !VOS_IS_STATUS_SUCCESS(status) )
+   if ( !VOS_IS_STATUS_SUCCESS(vstatus) )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                                   "error in WDA close " );
@@ -1663,7 +1462,6 @@
    }
    return status;
 }
-
 /*
  * FUNCTION: WDA_IsWcnssWlanCompiledVersionGreaterThanOrEqual
  * returns 1 if the compiled version is greater than or equal to the input version
@@ -1674,9 +1472,7 @@
     VOS_STATUS status = VOS_STATUS_SUCCESS;
     v_CONTEXT_t vosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
     tSirVersionType compiledVersion;
-
     status = WDA_GetWcnssWlanCompiledVersion(vosContext, &compiledVersion);
-
     if ((compiledVersion.major > major) || ((compiledVersion.major == major)&& (compiledVersion.minor > minor)) ||
         ((compiledVersion.major == major)&& (compiledVersion.minor == minor) &&(compiledVersion.version > version)) ||
         ((compiledVersion.major == major)&& (compiledVersion.minor == minor) &&(compiledVersion.version == version) &&
@@ -1685,20 +1481,16 @@
     else
         return 0;
 }
-
 /*
  * FUNCTION: WDA_IsWcnssWlanReportedVersionGreaterThanOrEqual
  * returns 1 if the compiled version is greater than or equal to the input version
  */ 
-
 uint8 WDA_IsWcnssWlanReportedVersionGreaterThanOrEqual(uint8 major, uint8 minor, uint8 version, uint8 revision)
 {    
     VOS_STATUS status = VOS_STATUS_SUCCESS;
     v_CONTEXT_t vosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
     tSirVersionType reportedVersion;
-
     status = WDA_GetWcnssWlanReportedVersion(vosContext, &reportedVersion);
-
     if ((reportedVersion.major > major) || ((reportedVersion.major == major)&& (reportedVersion.minor > minor)) ||
         ((reportedVersion.major == major)&& (reportedVersion.minor == minor) &&(reportedVersion.version > version)) ||
         ((reportedVersion.major == major)&& (reportedVersion.minor == minor) &&(reportedVersion.version == version) &&
@@ -1707,7 +1499,6 @@
     else
         return 0;
 }
-
 /*
  * FUNCTION: WDA_GetWcnssWlanCompiledVersion
  * Returns the version of the WCNSS WLAN API with which the HOST
@@ -1717,10 +1508,8 @@
                                            tSirVersionType *pVersion)
 {
    tWDA_CbContext *pWDA;
-
    VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
              "%s: Entered", __FUNCTION__);
-
    if ((NULL == pvosGCtx) || (NULL == pVersion))
    {
       VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -1728,7 +1517,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    pWDA = (tWDA_CbContext *)VOS_GET_WDA_CTXT(pvosGCtx);
    if (NULL == pWDA )
    {
@@ -1737,11 +1525,9 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    *pVersion = pWDA->wcnssWlanCompiledVersion;
    return VOS_STATUS_SUCCESS;
 }
-
 /*
  * FUNCTION: WDA_GetWcnssWlanReportedVersion
  * Returns the version of the WCNSS WLAN API with which the WCNSS
@@ -1751,10 +1537,8 @@
                                            tSirVersionType *pVersion)
 {
    tWDA_CbContext *pWDA;
-
    VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
              "%s: Entered", __FUNCTION__);
-
    if ((NULL == pvosGCtx) || (NULL == pVersion))
    {
       VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -1762,7 +1546,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    pWDA = (tWDA_CbContext *)VOS_GET_WDA_CTXT(pvosGCtx);
    if (NULL == pWDA )
    {
@@ -1771,11 +1554,9 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    *pVersion = pWDA->wcnssWlanReportedVersion;
    return VOS_STATUS_SUCCESS;
 }
-
 /*
  * FUNCTION: WDA_GetWcnssSoftwareVersion
  * Returns the WCNSS Software version string
@@ -1785,10 +1566,8 @@
                                        tANI_U32 versionBufferSize)
 {
    tWDA_CbContext *pWDA;
-
    VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
              "%s: Entered", __FUNCTION__);
-
    if ((NULL == pvosGCtx) || (NULL == pVersion))
    {
       VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -1796,7 +1575,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    pWDA = (tWDA_CbContext *)VOS_GET_WDA_CTXT(pvosGCtx);
    if (NULL == pWDA )
    {
@@ -1805,11 +1583,9 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    wpalMemoryCopy(pVersion, pWDA->wcnssSoftwareVersionString, versionBufferSize);
    return VOS_STATUS_SUCCESS;
 }
-
 /*
  * FUNCTION: WDA_GetWcnssHardwareVersion
  * Returns the WCNSS Hardware version string
@@ -1819,10 +1595,8 @@
                                        tANI_U32 versionBufferSize)
 {
    tWDA_CbContext *pWDA;
-
    VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
              "%s: Entered", __FUNCTION__);
-
    if ((NULL == pvosGCtx) || (NULL == pVersion))
    {
       VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -1830,7 +1604,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    pWDA = (tWDA_CbContext *)VOS_GET_WDA_CTXT(pvosGCtx);
    if (NULL == pWDA )
    {
@@ -1839,11 +1612,9 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    wpalMemoryCopy(pVersion, pWDA->wcnssHardwareVersionString, versionBufferSize);
    return VOS_STATUS_SUCCESS;
 }
-
 /*
  * FUNCTION: WDA_WniCfgDnld
  * Trigger CFG Download
@@ -1851,17 +1622,13 @@
 VOS_STATUS WDA_WniCfgDnld(tWDA_CbContext *pWDA) 
 {
    tpAniSirGlobal pMac = (tpAniSirGlobal )VOS_GET_MAC_CTXT(pWDA->pVosContext);
-
    VOS_STATUS vosStatus = VOS_STATUS_E_FAILURE;
-
    v_VOID_t *pFileImage = NULL;
    v_SIZE_t cbFileImageSize = 0;
-
    v_VOID_t *pCfgBinary = NULL;
    v_SIZE_t cbCfgBinarySize = 0;
    
    v_BOOL_t bStatus = VOS_FALSE;
-
    if (NULL == pMac )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -1869,7 +1636,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    /* get the number of bytes in the CFG Binary... */
    vosStatus = vos_get_binary_blob( VOS_BINARY_ID_CONFIG, NULL, 
                                                 &cbFileImageSize );
@@ -1879,16 +1645,13 @@
                  "Error obtaining binary size" );
       goto fail;
    }
-
    // malloc a buffer to read in the Configuration binary file.
    pFileImage = vos_mem_malloc( cbFileImageSize );
-
    if ( NULL == pFileImage )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
               "Unable to allocate memory for the CFG binary [size= %d bytes]",
                  cbFileImageSize );
-
       vosStatus = VOS_STATUS_E_NOMEM;
       goto fail;
    }
@@ -1917,13 +1680,11 @@
       vosStatus = VOS_STATUS_E_FAILURE;
       goto fail;
    }
-
    /*
     * TODO: call the config download function 
     * for now calling the existing cfg download API 
     */
    processCfgDownloadReq(pMac,cbCfgBinarySize,pCfgBinary);
-
    if( pFileImage != NULL )
    {
       vos_mem_free( pFileImage );
@@ -1936,12 +1697,10 @@
    
    return vosStatus;
 }
-
 /* -----------------------------------------------------------------
  * WDI interface 
  * -----------------------------------------------------------------
  */
-
 /*
  * FUNCTION: WDA_suspendDataTxCallback
  * call back function called from TL after suspend Transmission
@@ -1951,10 +1710,8 @@
                                             VOS_STATUS     vosStatus)
 {
    tWDA_CbContext *pWDA = (tWDA_CbContext *)VOS_GET_WDA_CTXT(pvosGCtx);
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                       "%s: Entered " ,__FUNCTION__);
-
    if (NULL == pWDA )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -1970,7 +1727,6 @@
    {
       pWDA->txStatus = WDA_TL_TX_SUSPEND_FAILURE;        
    }
-
    /* Trigger the event to bring the WDA TL suspend function to come 
     * out of wait*/
    vosStatus = vos_event_set(&pWDA->suspendDataTxEvent);
@@ -1979,7 +1735,6 @@
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR, 
                       "NEW VOS Event Set failed - status = %d \n", vosStatus);
    }
-
    /* If TL suspended had timedout before this callback was called, resume back 
    * TL.*/
    if (pWDA->txSuspendTimedOut) 
@@ -1989,10 +1744,8 @@
       WDA_ResumeDataTx(pWDA);
       pWDA->txSuspendTimedOut = FALSE;
    }
-
    return VOS_STATUS_SUCCESS;
 }
-
 /*
  * FUNCTION: WDA_suspendDataTx
  * Update TL to suspend the data Transmission
@@ -2005,16 +1758,13 @@
 
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                       "%s: Entered " ,__FUNCTION__);
-
    pWDA->txStatus = WDA_TL_TX_SUSPEND_FAILURE;
-
    if (pWDA->txSuspendTimedOut) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
          "TL suspend timedout previously, CB not called yet\n");
         return status;
    }
-
    /* Reset the event to be not signalled */
    status = vos_event_reset(&pWDA->suspendDataTxEvent);
    if(!VOS_IS_STATUS_SUCCESS(status))
@@ -2023,7 +1773,6 @@
                             "VOS Event reset failed - status = %d\n",status);
       return VOS_STATUS_E_FAILURE;
    }
-
    /*Indicate TL to suspend transmission for all Sta Id */
    ucSTAId = WLAN_ALL_STA;
    status = WLANTL_SuspendDataTx(pWDA->pVosContext, &ucSTAId,
@@ -2032,7 +1781,6 @@
    {
       return status;
    }
-
    /* Wait for the event to be set by the TL, to get the response of 
     * suspending the TX queues, this event should be set by the Callback 
     * function called by TL*/
@@ -2052,15 +1800,12 @@
    {
       pWDA->txSuspendTimedOut = FALSE;
    }
-
    if(WDA_TL_TX_SUSPEND_SUCCESS == pWDA->txStatus)
    {
       status = VOS_STATUS_SUCCESS;
    }
-
    return status;
 }
-
 /*
  * FUNCTION: WDA_resumeDataTx
  * Update TL to resume the data Transmission
@@ -2076,7 +1821,6 @@
    status = WLANTL_ResumeDataTx(pWDA->pVosContext, &ucSTAId);
    return status;
 }
-
 /*
  * FUNCTION: WDA_InitScanReqCallback
  * Trigger Init SCAN callback
@@ -2087,7 +1831,6 @@
    tWDA_CbContext *pWDA; 
    tInitScanParams *pWDA_ScanParam ;
    VOS_STATUS      status;      
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
    if(NULL == pWdaParams)
@@ -2099,38 +1842,33 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    pWDA_ScanParam = (tInitScanParams *)pWdaParams->wdaMsgParam;
-
    if(NULL == pWDA_ScanParam)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                   "%s: pWDA_ScanParam received NULL", __FUNCTION__);
-      VOS_ASSERT(0) ;
+      VOS_ASSERT(0);
+	  vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
+	  vos_mem_free(pWdaParams);
       return ;
    }
-
    if(WDI_STATUS_SUCCESS != wdiStatus)
    {
       status = WDA_ResumeDataTx(pWDA) ;
-
       if(VOS_STATUS_SUCCESS != status)
       {
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                                   "%s error in Resume Tx ", __FUNCTION__ );
       }
    }
-
    /* free WDI command buffer */
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
-
    vos_mem_free(pWdaParams) ;
-
+   
    
    /* assign status to scan params */
    pWDA_ScanParam->status = CONVERT_WDI2SIR_STATUS(wdiStatus) ;
-
    /* send SCAN RSP message back to PE */
    WDA_SendMsg(pWDA, WDA_INIT_SCAN_RSP, (void *)pWDA_ScanParam, 0) ;
-
    return ;
 }
   
@@ -2150,7 +1888,6 @@
    
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiInitScanParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2158,7 +1895,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if(NULL == pWdaParams)
    {
@@ -2185,7 +1921,6 @@
 #endif
    wdiInitScanParam->wdiReqInfo.wdiScanEntry.activeBSScnt = 
                                      initScanParams->scanEntry.activeBSScnt ;
-
    for (i=0; i < initScanParams->scanEntry.activeBSScnt; i++)
    {
        wdiInitScanParam->wdiReqInfo.wdiScanEntry.bssIdx[i] = 
@@ -2200,52 +1935,41 @@
    } 
    wdiInitScanParam->wdiReqStatusCB = NULL ;
 
-
    /* Store Init Req pointer, as this will be used for response */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = initScanParams;
    pWdaParams->wdaWdiApiMsgParam = wdiInitScanParam;
-
    /* first try to suspend TX */
    status = WDA_SuspendDataTx(pWDA) ;
-
    if(WDI_STATUS_SUCCESS != status)
    {
       goto handleWdiFailure;
    }
-
    /* call DAL API to pass init scan request to DAL */
    status = WDI_InitScanReq(wdiInitScanParam, 
                         WDA_InitScanReqCallback, pWdaParams) ;
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                                "error in WDA Init Scan, Resume Tx " );
       status = WDA_ResumeDataTx(pWDA) ;
-
       VOS_ASSERT(0) ;
   
       goto handleWdiFailure;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
-
 handleWdiFailure:
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                       "Failure in WDI Api, free all the memory " );
    /* free WDI command buffer */
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    /* send Failure to PE */
    initScanParams->status = eSIR_FAILURE ;
    WDA_SendMsg(pWDA, WDA_INIT_SCAN_RSP, (void *)initScanParams, 0) ;
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
 
-
 /*
  * FUNCTION: WDA_StartScanReqCallback
  * send Start SCAN RSP back to PE
@@ -2258,7 +1982,6 @@
    tStartScanParams *pWDA_ScanParam;
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2268,38 +1991,33 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    pWDA_ScanParam = (tStartScanParams *)pWdaParams->wdaMsgParam;
-
    if(NULL == pWDA_ScanParam)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                    "%s: pWDA_ScanParam received NULL", __FUNCTION__);
       VOS_ASSERT(0) ;
+	  vos_mem_free(pWdaParams);
       return ;
    }
-
    if(NULL == pWdaParams->wdaWdiApiMsgParam)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                   "%s: wdaWdiApiMsgParam is NULL", __FUNCTION__);
       VOS_ASSERT(0) ;
+	  vos_mem_free(pWdaParams);
       return ;
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
+   
    
    /* assign status to scan params */
    pWDA_ScanParam->status = CONVERT_WDI2SIR_STATUS(pScanRsp->wdiStatus) ;
-
    /* send SCAN RSP message back to PE */
    WDA_SendMsg(pWDA, WDA_START_SCAN_RSP, (void *)pWDA_ScanParam, 0) ;
-
    return ;
 }
 
-
-
 /*
  * FUNCTION: WDA_ProcessStartScanReq
  * Trigger start SCAN in WDI
@@ -2312,10 +2030,8 @@
                             (WDI_StartScanReqParamsType *)vos_mem_malloc(
                                           sizeof(WDI_StartScanReqParamsType)) ;
    tWDA_ReqParams *pWdaParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiStartScanParams) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2332,22 +2048,18 @@
       vos_mem_free(wdiStartScanParams);
       return VOS_STATUS_E_NOMEM;
    }
-
    /* Copy init Scan params to WDI structure */
    wdiStartScanParams->ucChannel = startScanParams->scanChannel ;
    wdiStartScanParams->wdiReqStatusCB = NULL ;
 
-
    /* Store Init Req pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = startScanParams;
    pWdaParams->wdaWdiApiMsgParam = wdiStartScanParams;
-
    /* call DAL API to pass init scan request to DAL */
    status = WDI_StartScanReq(wdiStartScanParams, 
                               WDA_StartScanReqCallback, pWdaParams) ;
-
    /* failure returned by WDI API */
    if(IS_WDI_STATUS_FAILURE(status))
    {
@@ -2359,10 +2071,8 @@
       startScanParams->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_START_SCAN_RSP, (void *)startScanParams, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_EndScanReqCallback
  * END SCAN callback
@@ -2374,7 +2084,6 @@
    tEndScanParams *endScanParam;
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                              "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2384,28 +2093,26 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    endScanParam = (tEndScanParams *)pWdaParams->wdaMsgParam;
-
    if(NULL == endScanParam)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                    "%s: endScanParam received NULL", __FUNCTION__);
       VOS_ASSERT(0) ;
+	  vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
+	  vos_mem_free(pWdaParams);
       return ;
    } 
    
    /* Free WDI command buffer */
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    /* assign status to scan params */
    endScanParam->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    /* send response back to PE */
    WDA_SendMsg(pWDA, WDA_END_SCAN_RSP, (void *)endScanParam, 0) ;
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessEndScanReq
  * Trigger END SCAN in WDI
@@ -2418,10 +2125,8 @@
                             (WDI_EndScanReqParamsType *)vos_mem_malloc(
                                           sizeof(WDI_EndScanReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                              "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiEndScanParams) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2438,21 +2143,17 @@
       vos_mem_free(wdiEndScanParams);
       return VOS_STATUS_E_NOMEM;
    }
-
    /* Copy init Scan params to WDI structure */
    wdiEndScanParams->ucChannel = endScanParams->scanChannel ;
    wdiEndScanParams->wdiReqStatusCB = NULL ;
-
    /* Store Init Req pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = endScanParams;
    pWdaParams->wdaWdiApiMsgParam = wdiEndScanParams;
-
    /* call DAL API to pass init scan request to DAL */
    status = WDI_EndScanReq(wdiEndScanParams, 
                               WDA_EndScanReqCallback, pWdaParams) ;
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2463,10 +2164,8 @@
       endScanParams->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_END_SCAN_RSP, (void *)endScanParams, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_FinishScanReqCallback
  * Trigger Finish SCAN callback
@@ -2477,10 +2176,8 @@
    tWDA_CbContext *pWDA; 
    tFinishScanParams *finishScanParam; 
    VOS_STATUS      status;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2491,18 +2188,17 @@
    
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    finishScanParam = (tFinishScanParams *)pWdaParams->wdaMsgParam;
-
    if(NULL == finishScanParam)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                   "%s: finishScanParam is NULL", __FUNCTION__);
       VOS_ASSERT(0) ;
+	  vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
+	  vos_mem_free(pWdaParams);
       return ;
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    /* 
     * Now Resume TX, if we reached here means, TX is already suspended, we 
     * have to resume it unconditionaly
@@ -2514,13 +2210,10 @@
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                                   "%s error in Resume Tx ", __FUNCTION__ );
    }
-
    finishScanParam->status = CONVERT_WDI2SIR_STATUS(wdiStatus) ;
-
    WDA_SendMsg(pWDA, WDA_FINISH_SCAN_RSP, (void *)finishScanParam, 0) ;
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessFinshScanReq
  * Trigger Finish SCAN in WDI
@@ -2536,7 +2229,6 @@
    tANI_U8 i = 0;
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                              "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiFinishScanParams) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2553,12 +2245,10 @@
       vos_mem_free(wdiFinishScanParams);
       return VOS_STATUS_E_NOMEM;
    }
-
    /* Copy init Scan params to WDI structure */
    wdiFinishScanParams->wdiReqInfo.wdiScanMode = finishScanParams->scanMode ;
    vos_mem_copy(wdiFinishScanParams->wdiReqInfo.macBSSID, 
                               finishScanParams->bssid, sizeof(tSirMacAddr)) ;
-
    wdiFinishScanParams->wdiReqInfo.bNotifyBSS = finishScanParams->notifyBss ;
    wdiFinishScanParams->wdiReqInfo.ucFrameType = finishScanParams->frameType ;
    wdiFinishScanParams->wdiReqInfo.ucFrameLength = 
@@ -2568,7 +2258,6 @@
    wdiFinishScanParams->wdiReqInfo.wdiCBState = finishScanParams->cbState ;
    wdiFinishScanParams->wdiReqInfo.wdiScanEntry.activeBSScnt = 
                                      finishScanParams->scanEntry.activeBSScnt ;
-
    for (i = 0; i < finishScanParams->scanEntry.activeBSScnt; i++)
    {
        wdiFinishScanParams->wdiReqInfo.wdiScanEntry.bssIdx[i] = 
@@ -2576,7 +2265,6 @@
    }
    
  
-
    /* if Frame length, copy macMgmtHdr ro WDI structure */ 
    if(0 != wdiFinishScanParams->wdiReqInfo.ucFrameLength)
    {
@@ -2585,17 +2273,15 @@
                                                      sizeof(WDI_MacMgmtHdr)) ;
    } 
    wdiFinishScanParams->wdiReqStatusCB = NULL ;
-
    /* Store Init Req pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = finishScanParams;
    pWdaParams->wdaWdiApiMsgParam = wdiFinishScanParams;
-
    /* call DAL API to pass init scan request to DAL */
    status = WDI_FinishScanReq(wdiFinishScanParams, 
                               WDA_FinishScanReqCallback, pWdaParams) ;
-
+   
    
    /* 
     * WDI API returns failure..
@@ -2606,19 +2292,15 @@
                      "Failure in Finish Scan WDI API, free all the memory " );
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
-
       finishScanParams->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_FINISH_SCAN_RSP, (void *)finishScanParams, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*---------------------------------------------------------------------
  * ASSOC API's
  *---------------------------------------------------------------------
  */
-
 /*
  * FUNCTION: WDA_JoinReqCallback
  * Trigger Init SCAN callback
@@ -2628,10 +2310,8 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA; 
    tSwitchChannelParams *joinReqParam;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2641,41 +2321,30 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    joinReqParam = (tSwitchChannelParams *)pWdaParams->wdaMsgParam;
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    vos_mem_free(pWdaParams) ;
-
    /* reset macBSSID */
    vos_mem_set(pWDA->macBSSID, sizeof(pWDA->macBSSID),0 );
-
    /* reset macSTASelf */
    vos_mem_set(pWDA->macSTASelf, sizeof(pWDA->macSTASelf),0 );
-
    joinReqParam->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    WDA_SendMsg(pWDA, WDA_SWITCH_CHANNEL_RSP, (void *)joinReqParam , 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessJoinReq
  * Trigger Join REQ in WDI
  */ 
-
 VOS_STATUS WDA_ProcessJoinReq(tWDA_CbContext *pWDA, 
                                             tSwitchChannelParams* joinReqParam)
 {
    WDI_Status status = WDI_STATUS_SUCCESS ;
-
    WDI_JoinReqParamsType *wdiJoinReqParam = 
                              (WDI_JoinReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_JoinReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiJoinReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2692,14 +2361,11 @@
       vos_mem_free(wdiJoinReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    /* copy the BSSID for pWDA */
    vos_mem_copy(wdiJoinReqParam->wdiReqInfo.macBSSID, pWDA->macBSSID, 
                                              sizeof(tSirMacAddr)) ;
-
    vos_mem_copy(wdiJoinReqParam->wdiReqInfo.macSTASelf, 
                 pWDA->macSTASelf, sizeof(tSirMacAddr)) ;
-
    wdiJoinReqParam->wdiReqInfo.wdiChannelInfo.ucChannel = 
                                                  joinReqParam->channelNumber ;
 #ifndef WLAN_FEATURE_VOWIFI
@@ -2711,16 +2377,13 @@
    wdiJoinReqParam->wdiReqInfo.linkState = pWDA->linkState;
    
    wdiJoinReqParam->wdiReqStatusCB = NULL ;
-
    /* Store Init Req pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = joinReqParam;
    pWdaParams->wdaWdiApiMsgParam = wdiJoinReqParam;
-
    status = WDI_JoinReq(wdiJoinReqParam, 
                                (WDI_JoinRspCb )WDA_JoinReqCallback, pWdaParams) ;
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2730,10 +2393,8 @@
       joinReqParam->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_SWITCH_CHANNEL_RSP, (void *)joinReqParam, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_SwitchChannelReqCallback
  * send Switch channel RSP back to PE
@@ -2744,7 +2405,6 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData ; 
    tWDA_CbContext *pWDA; 
    tSwitchChannelParams *pSwitchChanParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
    if(NULL == pWdaParams)
@@ -2760,18 +2420,13 @@
 #ifdef WLAN_FEATURE_VOWIFI
    pSwitchChanParams->txMgmtPower  =  wdiSwitchChanRsp->ucTxMgmtPower;
 #endif
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    pSwitchChanParams->status = 
                           CONVERT_WDI2SIR_STATUS(wdiSwitchChanRsp->wdiStatus) ;
-
    WDA_SendMsg(pWDA, WDA_SWITCH_CHANNEL_RSP, (void *)pSwitchChanParams , 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessChannelSwitchReq
  * Request to WDI to switch channel REQ params.
@@ -2784,10 +2439,8 @@
                          (WDI_SwitchChReqParamsType *)vos_mem_malloc(
                                          sizeof(WDI_SwitchChReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiSwitchChanParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2804,7 +2457,6 @@
       vos_mem_free(wdiSwitchChanParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiSwitchChanParam->wdiChInfo.ucChannel = pSwitchChanParams->channelNumber;
 #ifndef WLAN_FEATURE_VOWIFI
    wdiSwitchChanParam->wdiChInfo.ucLocalPowerConstraint = 
@@ -2813,13 +2465,11 @@
    wdiSwitchChanParam->wdiChInfo.wdiSecondaryChannelOffset = 
                                      pSwitchChanParams->secondaryChannelOffset;
    wdiSwitchChanParam->wdiReqStatusCB = NULL ;
-
    /* Store req pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pSwitchChanParams;
    pWdaParams->wdaWdiApiMsgParam = wdiSwitchChanParam;
-
 #ifdef WLAN_FEATURE_VOWIFI
    wdiSwitchChanParam->wdiChInfo.cMaxTxPower 
                                      = pSwitchChanParams->maxTxPower;
@@ -2833,7 +2483,6 @@
 
    status = WDI_SwitchChReq(wdiSwitchChanParam, 
                      (WDI_SwitchChRspCb)WDA_SwitchChannelReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -2843,10 +2492,8 @@
       pSwitchChanParams->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_SWITCH_CHANNEL_RSP, (void *)pSwitchChanParams, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_ConfigBssReqCallback
  * config BSS Req Callback, called by WDI
@@ -2858,7 +2505,6 @@
    tWDA_CbContext *pWDA; 
    tAddBssParams *configBssReqParam;
    tAddStaParams *staConfigBssParam;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
    if(NULL == pWdaParams)
@@ -2871,15 +2517,12 @@
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    configBssReqParam = (tAddBssParams *)pWdaParams->wdaMsgParam;
    staConfigBssParam = &configBssReqParam->staContext ;
-
    configBssReqParam->status = 
                      CONVERT_WDI2SIR_STATUS(wdiConfigBssRsp->wdiStatus);
-
    if(WDI_STATUS_SUCCESS == wdiConfigBssRsp->wdiStatus)
    {
       vos_mem_copy(configBssReqParam->bssId, wdiConfigBssRsp->macBSSID, 
                                                     sizeof(tSirMacAddr));
-
       configBssReqParam->bssIdx = wdiConfigBssRsp->ucBSSIdx;
       configBssReqParam->bcastDpuSignature = wdiConfigBssRsp->ucBcastSig;
       configBssReqParam->mgmtDpuSignature = wdiConfigBssRsp->ucUcastSig;
@@ -2933,18 +2576,13 @@
       }
       
       staConfigBssParam->staIdx = wdiConfigBssRsp->ucSTAIdx;
-
       staConfigBssParam->bssIdx = wdiConfigBssRsp->ucBSSIdx;
-
       staConfigBssParam->ucUcastSig = wdiConfigBssRsp->ucUcastSig;
-
       staConfigBssParam->ucBcastSig = wdiConfigBssRsp->ucBcastSig;
-
       vos_mem_copy(staConfigBssParam->staMac, wdiConfigBssRsp->macSTA,
                                                     sizeof(tSirMacAddr));
       staConfigBssParam->txChannelWidthSet = 
                                configBssReqParam->txChannelWidthSet;
-
       if(staConfigBssParam->staType == STA_ENTRY_PEER && 
                                     staConfigBssParam->htCapable)
       {
@@ -2953,7 +2591,6 @@
          pWDA->wdaStaInfo[staConfigBssParam->staIdx].ucValidStaIndex = 
                                                          WDA_VALID_STA_INDEX ;
       }
-
       if(WDI_DS_SetStaIdxPerBssIdx(pWDA->pWdiContext,
                                    wdiConfigBssRsp->ucBSSIdx,
                                    wdiConfigBssRsp->ucSTAIdx))
@@ -2962,27 +2599,21 @@
                     "%s: fail to set STA idx associated with BSS index", __FUNCTION__);
          VOS_ASSERT(0) ;
       }
-
       if(WDI_DS_AddSTAMemPool(pWDA->pWdiContext, wdiConfigBssRsp->ucSTAIdx))
       {
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                     "%s: add BSS into mempool fail", __FUNCTION__);
          VOS_ASSERT(0) ;
       }
-
 #ifdef WLAN_FEATURE_VOWIFI
       configBssReqParam->txMgmtPower = wdiConfigBssRsp->ucTxMgmtPower;
 #endif
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    WDA_SendMsg(pWDA, WDA_ADD_BSS_RSP, (void *)configBssReqParam , 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_UpdateEdcaParamsForAC
  * Update WDI EDCA params with PE edca params
@@ -2998,7 +2629,6 @@
    wdiEdcaParam->wdiCW.max = macEdcaParam->cw.max;
    wdiEdcaParam->usTXOPLimit = macEdcaParam->txoplimit;
 }
-
 /*
  * FUNCTION: WDA_ProcessConfigBssReq
  * Configure BSS before starting Assoc with AP
@@ -3007,15 +2637,12 @@
                                          tAddBssParams* configBssReqParam)
 {
    WDI_Status status = WDI_STATUS_SUCCESS ;
-
    WDI_ConfigBSSReqParamsType *wdiConfigBssReqParam =
                              (WDI_ConfigBSSReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_ConfigBSSReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiConfigBssReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -3032,36 +2659,27 @@
       vos_mem_free(wdiConfigBssReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    vos_mem_set(wdiConfigBssReqParam, sizeof(WDI_ConfigBSSReqParamsType), 0);
-
    WDA_UpdateBSSParams(pWDA, &wdiConfigBssReqParam->wdiReqInfo, 
                        configBssReqParam) ;
-
    /* Store Init Req pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = configBssReqParam;
    pWdaParams->wdaWdiApiMsgParam = wdiConfigBssReqParam;
-
    status = WDI_ConfigBSSReq(wdiConfigBssReqParam, 
                         (WDI_ConfigBSSRspCb )WDA_ConfigBssReqCallback, pWdaParams) ;
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                    "Failure in Config BSS WDI API, free all the memory " );
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
-
       configBssReqParam->status = eSIR_FAILURE ;
-
       WDA_SendMsg(pWDA, WDA_ADD_BSS_RSP, (void *)configBssReqParam, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 #ifdef ENABLE_HAL_COMBINED_MESSAGES
 /*
  * FUNCTION: WDA_PostAssocReqCallback
@@ -3079,13 +2697,10 @@
    /*STA Params for self STA*/
    tAddStaParams *selfStaPostAssocParam = 
       &postAssocReqParam->addStaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    postAssocReqParam->status = 
                    CONVERT_WDI2SIR_STATUS(wdiPostAssocRsp->wdiStatus) ;
-
    if(WDI_STATUS_SUCCESS == wdiPostAssocRsp->wdiStatus)
    {
       staPostAssocParam->staIdx = wdiPostAssocRsp->bssParams.ucSTAIdx ;
@@ -3094,18 +2709,14 @@
       staPostAssocParam->ucUcastSig = wdiPostAssocRsp->bssParams.ucUcastSig ;
       staPostAssocParam->ucBcastSig = wdiPostAssocRsp->bssParams.ucBcastSig ;
       staPostAssocParam->bssIdx = wdiPostAssocRsp->bssParams.ucBSSIdx;
-
       selfStaPostAssocParam->staIdx = wdiPostAssocRsp->staParams.ucSTAIdx;
    }
    vos_mem_free(pWDA->wdaWdiApiMsgParam) ;
    pWDA->wdaWdiApiMsgParam = NULL;
    pWDA->wdaMsgParam = NULL;
-
    WDA_SendMsg(pWDA, WDA_POST_ASSOC_RSP, (void *)postAssocReqParam, 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessPostAssocReq
  * Trigger POST ASSOC processing in WDI
@@ -3113,7 +2724,6 @@
 VOS_STATUS WDA_ProcessPostAssocReq(tWDA_CbContext *pWDA, 
                                     tPostAssocParams *postAssocReqParam)
 {
-
    WDI_Status status = WDI_STATUS_SUCCESS ;
    
    WDI_PostAssocReqParamsType *wdiPostAssocReqParam =
@@ -3122,7 +2732,6 @@
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
 
-
    if(NULL == wdiPostAssocReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -3139,7 +2748,6 @@
       return VOS_STATUS_E_FAILURE;
    }
 
-
    /* update BSS params into WDI structure */
    WDA_UpdateBSSParams(pWDA, &wdiPostAssocReqParam->wdiBSSParams, 
                        &postAssocReqParam->addBssParams) ;
@@ -3161,16 +2769,12 @@
    WDA_UpdateEdcaParamsForAC(pWDA, 
                         &wdiPostAssocReqParam->wdiBSSParams.wdiVOEDCAParams,
                         &postAssocReqParam->addBssParams.acvo);
-
    /* Store Init Req pointer, as this will be used for response */
    pWDA->wdaMsgParam = (void *)postAssocReqParam ;
-
    /* store Params pass it to WDI */
    pWDA->wdaWdiApiMsgParam = (void *)wdiPostAssocReqParam ;
-
    status = WDI_PostAssocReq(wdiPostAssocReqParam, 
                         (WDI_PostAssocRspCb )WDA_PostAssocReqCallback, pWDA) ;
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -3178,16 +2782,12 @@
       vos_mem_free(pWDA->wdaWdiApiMsgParam) ;
       pWDA->wdaWdiApiMsgParam = NULL;
       pWDA->wdaMsgParam = NULL;
-
       postAssocReqParam->status = eSIR_FAILURE ;
-
       WDA_SendMsg(pWDA, WDA_POST_ASSOC_RSP, (void *)postAssocReqParam, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
 #endif
-
 /*
  * FUNCTION: WDA_AddStaReqCallback
  * ADD STA req callback, send RSP back to PE
@@ -3198,10 +2798,8 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA; 
    tAddStaParams *addStaReqParam;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,"%s: pWdaParams is NULL", __FUNCTION__);
@@ -3210,10 +2808,8 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    addStaReqParam = (tAddStaParams *)pWdaParams->wdaMsgParam;
-
    addStaReqParam->status = 
                    CONVERT_WDI2SIR_STATUS(wdiConfigStaRsp->wdiStatus) ;
-
    if(WDI_STATUS_SUCCESS == wdiConfigStaRsp->wdiStatus)
    {
       addStaReqParam->staIdx = wdiConfigStaRsp->ucSTAIdx;
@@ -3239,15 +2835,11 @@
          return ;
       }
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    vos_mem_free(pWdaParams) ;
-
    WDA_SendMsg(pWDA, WDA_ADD_STA_RSP, (void *)addStaReqParam, 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ConfigStaReq
  * Trigger Config STA processing in WDI
@@ -3255,17 +2847,13 @@
 VOS_STATUS WDA_ProcessAddStaReq(tWDA_CbContext *pWDA, 
                                     tAddStaParams *addStaReqParam)
 {
-
    WDI_Status status = WDI_STATUS_SUCCESS ;
-
    WDI_ConfigSTAReqParamsType *wdiConfigStaReqParam =
                            (WDI_ConfigSTAReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_ConfigSTAReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiConfigStaReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -3282,37 +2870,28 @@
       vos_mem_free(wdiConfigStaReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    vos_mem_set(wdiConfigStaReqParam, sizeof(WDI_ConfigSTAReqParamsType), 0);
-
    /* update STA params into WDI structure */
    WDA_UpdateSTAParams(pWDA, &wdiConfigStaReqParam->wdiReqInfo, 
                        addStaReqParam) ;
-
    /* Store Init Req pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = addStaReqParam;
    pWdaParams->wdaWdiApiMsgParam = wdiConfigStaReqParam;
-
    status = WDI_ConfigSTAReq(wdiConfigStaReqParam, 
                         (WDI_ConfigSTARspCb )WDA_AddStaReqCallback, pWdaParams) ;
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                    "Failure in Config STA WDI API, free all the memory " );
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
-
       addStaReqParam->status = eSIR_FAILURE ;
-
       WDA_SendMsg(pWDA, WDA_ADD_STA_RSP, (void *)addStaReqParam, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_DelBSSReqCallback
  * Dens DEL BSS RSP back to PE
@@ -3324,10 +2903,8 @@
    tWDA_CbContext *pWDA; 
    tDeleteBssParams *delBssReqParam;
    tANI_U8  staIdx,tid;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -3337,39 +2914,32 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    delBssReqParam = (tDeleteBssParams *)pWdaParams->wdaMsgParam;
-
    delBssReqParam->status = CONVERT_WDI2SIR_STATUS(wdiDelBssRsp->wdiStatus) ;
-
    if(WDI_STATUS_SUCCESS == wdiDelBssRsp->wdiStatus)
    {
       vos_mem_copy(delBssReqParam->bssid, wdiDelBssRsp->macBSSID, 
                                              sizeof(tSirMacAddr)) ;
    }
-
    if(WDI_DS_GetStaIdxFromBssIdx(pWDA->pWdiContext, delBssReqParam->bssIdx, &staIdx))
    {
      VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                  "%s: Get STA index from BSS index Fail", __FUNCTION__);
      VOS_ASSERT(0) ;
    }
-
    if(WDI_DS_DelSTAMemPool(pWDA->pWdiContext, staIdx))
    {
      VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                  "%s: DEL STA from MemPool Fail", __FUNCTION__);
      VOS_ASSERT(0) ;
    }
-
    if(WDI_DS_ClearStaIdxPerBssIdx(pWDA->pWdiContext, delBssReqParam->bssIdx, staIdx))
    {
      VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                  "%s: Clear STA index form table Fail", __FUNCTION__);
      VOS_ASSERT(0) ;
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    /* reset the the system role*/
    pWDA->wdaGlobalSystemRole = eSYSTEM_UNKNOWN_ROLE;
    
@@ -3387,13 +2957,10 @@
          }
       }
    }
-
    WDA_SendMsg(pWDA, WDA_DELETE_BSS_RSP, (void *)delBssReqParam , 0) ;
-
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessDelBssReq
  * Init DEL BSS req with WDI
@@ -3402,15 +2969,12 @@
                                         tDeleteBssParams *delBssParam)
 {
    WDI_Status status = WDI_STATUS_SUCCESS ;
-
    WDI_DelBSSReqParamsType *wdiDelBssReqParam = 
                              (WDI_DelBSSReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_DelBSSReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiDelBssReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -3427,7 +2991,6 @@
       vos_mem_free(wdiDelBssReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiDelBssReqParam->ucBssIdx = delBssParam->bssIdx;
    wdiDelBssReqParam->wdiReqStatusCB = NULL ;
    
@@ -3436,10 +2999,8 @@
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = delBssParam;
    pWdaParams->wdaWdiApiMsgParam = wdiDelBssReqParam;
-
    status = WDI_DelBSSReq(wdiDelBssReqParam, 
                         (WDI_DelBSSRspCb )WDA_DelBSSReqCallback, pWdaParams) ;
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -3449,10 +3010,8 @@
       delBssParam->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_DELETE_BSS_RSP, (void *)delBssParam, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_DelSTAReqCallback
  * Dens DEL STA RSP back to PE
@@ -3463,10 +3022,8 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA; 
    tDeleteStaParams *delStaReqParam;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -3476,9 +3033,7 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    delStaReqParam = (tDeleteStaParams *)pWdaParams->wdaMsgParam;
-
    delStaReqParam->status = CONVERT_WDI2SIR_STATUS(wdiDelStaRsp->wdiStatus) ;
-
    if(WDI_STATUS_SUCCESS == wdiDelStaRsp->wdiStatus)
    {
       if(WDI_DS_DelSTAMemPool(pWDA->pWdiContext, wdiDelStaRsp->ucSTAIdx))
@@ -3491,17 +3046,14 @@
    }
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    /*Reset the BA information corresponding to this STAIdx */
    pWDA->wdaStaInfo[wdiDelStaRsp->ucSTAIdx].ucValidStaIndex = 
                                                       WDA_INVALID_STA_INDEX;
    pWDA->wdaStaInfo[wdiDelStaRsp->ucSTAIdx].ucUseBaBitmap = 0;
    
    WDA_SendMsg(pWDA, WDA_DELETE_STA_RSP, (void *)delStaReqParam , 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessDelStaReq
  * Init DEL STA req with WDI
@@ -3510,15 +3062,12 @@
                                       tDeleteStaParams *delStaParam)
 {
    WDI_Status status = WDI_STATUS_SUCCESS ;
-
    WDI_DelSTAReqParamsType *wdiDelStaReqParam = 
                              (WDI_DelSTAReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_DelSTAReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiDelStaReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -3535,19 +3084,15 @@
       vos_mem_free(wdiDelStaReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiDelStaReqParam->ucSTAIdx = delStaParam->staIdx ;
    wdiDelStaReqParam->wdiReqStatusCB = NULL ;
-
    /* Store Init Req pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = delStaParam;
    pWdaParams->wdaWdiApiMsgParam = wdiDelStaReqParam;
-
    status = WDI_DelSTAReq(wdiDelStaReqParam, 
                         (WDI_DelSTARspCb )WDA_DelSTAReqCallback, pWdaParams) ;
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -3558,10 +3103,8 @@
       delStaParam->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_DELETE_STA_RSP, (void *)delStaParam, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 void WDA_ProcessAddStaSelfRsp(WDI_AddSTASelfRspParamsType* pwdiAddSTASelfRsp, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
@@ -3578,20 +3121,15 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    pAddStaSelfRsp = (tAddStaSelfParams*)pWdaParams->wdaMsgParam;
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams);
-
    pAddStaSelfRsp->status = CONVERT_WDI2SIR_STATUS(pwdiAddSTASelfRsp->wdiStatus);
    vos_mem_copy(pAddStaSelfRsp->selfMacAddr, 
                 pwdiAddSTASelfRsp->macSelfSta, 
                 sizeof(pAddStaSelfRsp->selfMacAddr));
-
    WDA_SendMsg( pWDA, WDA_ADD_STA_SELF_RSP, (void *)pAddStaSelfRsp, 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessAddStaSelfReq
  * 
@@ -3604,7 +3142,6 @@
       (WDI_AddSTASelfReqParamsType *)vos_mem_malloc(
          sizeof(WDI_AddSTASelfReqParamsType)) ;
    tWDA_ReqParams *pWdaParams; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
    if( NULL == wdiAddStaSelfReq )
@@ -3614,9 +3151,7 @@
                                           "%s: Unable to allocate memory " ,__FUNCTION__);
       return( VOS_STATUS_E_NOMEM );
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
-
    if( NULL == pWdaParams )
    {
       VOS_ASSERT( 0 );
@@ -3625,16 +3160,13 @@
       vos_mem_free(wdiAddStaSelfReq) ;
       return( VOS_STATUS_E_NOMEM );
    }
-
    wdiAddStaSelfReq->wdiReqStatusCB = NULL;
-
    vos_mem_copy( wdiAddStaSelfReq->wdiAddSTASelfInfo.selfMacAddr, pAddStaSelfReq->selfMacAddr, 6);
    /* Store Init Req pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pAddStaSelfReq;
    pWdaParams->wdaWdiApiMsgParam = wdiAddStaSelfReq; 
-
    wstatus = WDI_AddSTASelfReq( wdiAddStaSelfReq, WDA_ProcessAddStaSelfRsp, pWdaParams);
 
    if(IS_WDI_STATUS_FAILURE(wstatus))
@@ -3648,10 +3180,8 @@
       pAddStaSelfReq->status = eSIR_FAILURE ;
       WDA_SendMsg( pWDA, WDA_ADD_STA_SELF_RSP, (void *)pAddStaSelfReq, 0) ;
    }
-
    return status;
 }
-
 /*
  * FUNCTION: WDA_DelSTASelfRespCallback
  * 
@@ -3662,10 +3192,8 @@
    tWDA_ReqParams        *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext        *pWDA; 
    tDelStaSelfParams     *delStaSelfParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if (NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -3673,10 +3201,8 @@
       VOS_ASSERT(0);
       return;
    }
-
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    delStaSelfParams = (tDelStaSelfParams *)pWdaParams->wdaMsgParam;
-
    delStaSelfParams->status = 
                CONVERT_WDI2SIR_STATUS(wdiDelStaSelfRspParams->wdiStatus) ;
    
@@ -3684,10 +3210,8 @@
    vos_mem_free(pWdaParams) ;
    
    WDA_SendMsg(pWDA, WDA_DEL_STA_SELF_RSP, (void *)delStaSelfParams , 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_DelSTASelfReqCallback
  * 
@@ -3741,7 +3265,6 @@
                 (WDI_DelSTASelfReqParamsType *)vos_mem_malloc(
                               sizeof(WDI_DelSTASelfReqParamsType)) ;
 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
    if( NULL == wdiDelStaSelfReq )
@@ -3761,13 +3284,11 @@
       vos_mem_free(wdiDelStaSelfReq) ;
       return( VOS_STATUS_E_NOMEM );
    }
-
    pWdaParams->pWdaContext = pWDA;
    /* Store param pointer as passed in by caller */
    pWdaParams->wdaMsgParam = pDelStaSelfReqParam;
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiDelStaSelfReq;
-
    vos_mem_copy( wdiDelStaSelfReq->wdiDelStaSelfInfo.selfMacAddr, 
                  pDelStaSelfReqParam->selfMacAddr, sizeof(tSirMacAddr));
    
@@ -3788,12 +3309,9 @@
       pDelStaSelfReqParam->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_DEL_STA_SELF_RSP, (void *)pDelStaSelfReqParam, 0) ;
    }
-
    return status;
 }
 
-
-
 /*
  * FUNCTION: WDA_SendMsg
  * Send Message back to PE
@@ -3804,13 +3322,10 @@
    tSirMsgQ msg = {0} ;
    tANI_U32 status = VOS_STATUS_SUCCESS ;
    tpAniSirGlobal pMac = (tpAniSirGlobal )VOS_GET_MAC_CTXT(pWDA->pVosContext);
-
    msg.type        = msgType;
    msg.bodyval     = bodyVal;
    msg.bodyptr     = pBodyptr;
-
    status = limPostMsgApi(pMac, &msg);
-
    if (VOS_STATUS_SUCCESS != status)
    {
       if(NULL != pBodyptr)
@@ -3821,10 +3336,8 @@
                       "%s: limPostMsgApi is failed " ,__FUNCTION__);
       VOS_ASSERT(0) ;
    }
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_UpdateBSSParams
  * Translated WDA/PE BSS info into WDI BSS info..
@@ -3834,7 +3347,6 @@
                          tAddBssParams *wdaBssParams)
 {
    v_U8_t keyIndex = 0;
-
    /* copy bssReq Params to WDI structure */
    vos_mem_copy(wdiBssParams->macBSSID,
                            wdaBssParams->bssId, sizeof(tSirMacAddr)) ;
@@ -3843,10 +3355,8 @@
    wdiBssParams->wdiBSSType = wdaBssParams->bssType ;
    wdiBssParams->ucOperMode = wdaBssParams->operMode ;
    wdiBssParams->wdiNWType   = wdaBssParams->nwType ;
-
    wdiBssParams->ucShortSlotTimeSupported = 
                                   wdaBssParams->shortSlotTimeSupported ;
-
    wdiBssParams->ucllaCoexist  = wdaBssParams->llaCoexist ;
    wdiBssParams->ucllbCoexist  = wdaBssParams->llbCoexist ;
    wdiBssParams->ucllgCoexist  = wdaBssParams->llgCoexist ;
@@ -3856,12 +3366,9 @@
    wdiBssParams->ucllnNonGFCoexist = wdaBssParams->llnNonGFCoexist ;
    wdiBssParams->ucTXOPProtectionFullSupport =
                            wdaBssParams->fLsigTXOPProtectionFullSupport ;
-
    wdiBssParams->ucRIFSMode = wdaBssParams->fRIFSMode ;
    wdiBssParams->usBeaconInterval = wdaBssParams->beaconInterval ;
-
    wdiBssParams->ucDTIMPeriod = wdaBssParams->dtimPeriod ;
-
    wdiBssParams->ucTXChannelWidthSet = wdaBssParams->txChannelWidthSet ;
    wdiBssParams->ucCurrentOperChannel = wdaBssParams->currentOperChannel ;
    wdiBssParams->ucCurrentExtChannel = wdaBssParams->currentExtChannel ;
@@ -3871,23 +3378,16 @@
    wdiBssParams->wdiSSID.ucLength = wdaBssParams->ssId.length ;
    vos_mem_copy(wdiBssParams->wdiSSID.sSSID,
                  wdaBssParams->ssId.ssId, wdaBssParams->ssId.length) ;
-
    WDA_UpdateSTAParams(pWDA, &wdiBssParams->wdiSTAContext, 
                        &wdaBssParams->staContext) ;
-
    wdiBssParams->wdiAction = wdaBssParams->updateBss;
-
 #ifdef WLAN_FEATURE_VOWIFI
    wdiBssParams->cMaxTxPower = wdaBssParams->maxTxPower;
 #endif
-
    wdiBssParams->ucPersona = wdaBssParams->halPersona;
-
    wdiBssParams->bSpectrumMgtEn = wdaBssParams->bSpectrumMgtEnabled;
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
    wdiBssParams->bExtSetStaKeyParamValid = wdaBssParams->extSetStaKeyParamValid;
-
    if(wdiBssParams->bExtSetStaKeyParamValid)
    {
       /* copy set STA key params to WDI structure */
@@ -3899,7 +3399,6 @@
          wdaBssParams->extSetStaKeyParam.wepType;
       wdiBssParams->wdiExtSetKeyParam.ucDefWEPIdx = 
          wdaBssParams->extSetStaKeyParam.defWEPIdx;
-
       if(wdaBssParams->extSetStaKeyParam.encType != eSIR_ED_NONE)
       {
          if( (wdiBssParams->wdiExtSetKeyParam.wdiWEPType == WDI_WEP_STATIC) && 
@@ -3923,7 +3422,6 @@
                   wdaBssParams->extSetStaKeyParam.key[keyIndex].unicast;
                wdiBssParams->wdiExtSetKeyParam.wdiKey[keyIndex].keyDirection =
                   wdaBssParams->extSetStaKeyParam.key[keyIndex].keyDirection;
-
                vos_mem_copy(wdiBssParams->wdiExtSetKeyParam.wdiKey[keyIndex].keyRsc, 
                             wdaBssParams->extSetStaKeyParam.key[keyIndex].keyRsc, WLAN_MAX_KEY_RSC_LEN);
                wdiBssParams->wdiExtSetKeyParam.wdiKey[keyIndex].paeRole =
@@ -3933,7 +3431,6 @@
                vos_mem_copy(wdiBssParams->wdiExtSetKeyParam.wdiKey[keyIndex].key, 
                             wdaBssParams->extSetStaKeyParam.key[keyIndex].key, SIR_MAC_MAX_KEY_LENGTH);
             }
-
             wdiBssParams->wdiExtSetKeyParam.ucNumKeys = 
                SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
 #else
@@ -3964,10 +3461,13 @@
                     sizeof(wdaBssParams->extSetStaKeyParam) );
    }
 #endif /*WLAN_FEATURE_VOWIFI_11R*/
+#ifdef WLAN_FEATURE_11AC
+   wdiBssParams->ucVhtCapableSta = wdaBssParams->vhtCapable;
+   wdiBssParams->ucVhtTxChannelWidthSet = wdaBssParams->vhtTxChannelWidthSet;
+#endif
 
    return ;
 }
-
 /*
  * FUNCTION: WDA_UpdateSTAParams
  * Translated WDA/PE BSS info into WDI BSS info..
@@ -4001,10 +3501,8 @@
    
    wdiStaParams->ucShortGI40Mhz = wdaStaParams->fShortGI40Mhz;
    wdiStaParams->ucShortGI20Mhz = wdaStaParams->fShortGI20Mhz;
-
    wdiStaParams->wdiSupportedRates.opRateMode = 
                                 wdaStaParams->supportedRates.opRateMode;
-
    for(i = 0;i < WDI_NUM_11B_RATES;i++)
    {
      wdiStaParams->wdiSupportedRates.llbRates[i] = 
@@ -4022,6 +3520,12 @@
    }
    wdiStaParams->wdiSupportedRates.uEnhancedRateBitmap = 
                             wdaStaParams->supportedRates.aniEnhancedRateBitmap;
+#ifdef WLAN_FEATURE_11AC
+   wdiStaParams->wdiSupportedRates.vhtRxMCSMap = wdaStaParams->supportedRates.vhtRxMCSMap;
+   wdiStaParams->wdiSupportedRates.vhtRxHighestDataRate = wdaStaParams->supportedRates.vhtRxHighestDataRate;
+   wdiStaParams->wdiSupportedRates.vhtTxMCSMap = wdaStaParams->supportedRates.vhtTxMCSMap;
+   wdiStaParams->wdiSupportedRates.vhtTxHighestDataRate = wdaStaParams->supportedRates.vhtTxHighestDataRate;
+#endif
    for(i = 0;i <SIR_MAC_MAX_SUPPORTED_MCS_SET;i++)
    {
      wdiStaParams->wdiSupportedRates.aSupportedMCSSet[i] = 
@@ -4045,9 +3549,12 @@
 #ifdef WLAN_FEATURE_P2P
    wdiStaParams->ucP2pCapableSta = wdaStaParams->p2pCapableSta;
 #endif
+#ifdef WLAN_FEATURE_11AC
+   wdiStaParams->ucVhtCapableSta = wdaStaParams->vhtCapable;
+   wdiStaParams->ucVhtTxChannelWidthSet = wdaStaParams->vhtTxChannelWidthSet;
+#endif
    return ;
 }
-
 /*
  * -------------------------------------------------------------------------
  * CFG update to WDI
@@ -4058,7 +3565,7 @@
  * FUNCTION: WDA_ConvertWniCfgIdToHALCfgId
  * Convert the WNI CFG ID to HAL CFG ID
  */ 
-static inline v_U8_t WDA_ConvertWniCfgIdToHALCfgId(v_U8_t wniCfgId)
+static inline v_U8_t WDA_ConvertWniCfgIdToHALCfgId(v_U32_t wniCfgId)
 {
    switch(wniCfgId)
    {
@@ -4167,7 +3674,6 @@
       }
    }
 }
-
 /*
  * FUNCTION: WDA_UpdateCfgCallback
  * 
@@ -4177,10 +3683,8 @@
    tWDA_CbContext *pWDA = (tWDA_CbContext *)pUserData ; 
    WDI_UpdateCfgReqParamsType *wdiCfgParam = 
                   (WDI_UpdateCfgReqParamsType *)pWDA->wdaWdiCfgApiMsgParam ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    /*
     * currently there is no response message is expected between PE and
     * WDA, Failure return from WDI is a ASSERT condition
@@ -4195,10 +3699,8 @@
    vos_mem_free(wdiCfgParam->pConfigBuffer) ;
    vos_mem_free(pWDA->wdaWdiCfgApiMsgParam) ;
    pWDA->wdaWdiCfgApiMsgParam = NULL;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_UpdateCfg
  * 
@@ -4212,17 +3714,14 @@
    tHalCfg *configData;
    WDI_UpdateCfgReqParamsType *wdiCfgReqParam = NULL ;
    tANI_U8        *configDataValue;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if (NULL == pMac )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                  "%s: Invoked with invalid MAC context ", __FUNCTION__ );
       return VOS_STATUS_E_FAILURE;
    }
-
    if(WDA_START_STATE != pWDA->wdaState)
    {
       return VOS_STATUS_E_FAILURE;
@@ -4238,7 +3737,6 @@
    
    wdiCfgReqParam = (WDI_UpdateCfgReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_UpdateCfgReqParamsType)) ;
-
    if(NULL == wdiCfgReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4246,10 +3744,8 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiCfgReqParam->pConfigBuffer =  vos_mem_malloc(sizeof(tHalCfg) + 
                                                             sizeof(tANI_U32)) ;
-
    if(NULL == wdiCfgReqParam->pConfigBuffer)
    {
       VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4273,7 +3769,6 @@
        vos_mem_free(wdiCfgReqParam);
        return eSIR_FAILURE;
    }
-
    ((tHalCfg *)wdiCfgReqParam->pConfigBuffer)->length = sizeof(tANI_U32);
    configData =((tHalCfg *)wdiCfgReqParam->pConfigBuffer) ;
    configDataValue = ((tANI_U8 *)configData + sizeof(tHalCfg));
@@ -4282,11 +3777,9 @@
    
    /* store Params pass it to WDI */
    pWDA->wdaWdiCfgApiMsgParam = (void *)wdiCfgReqParam ;
-
 #ifdef FEATURE_HAL_SUPPORT_DYNAMIC_UPDATE_CFG
    status = WDI_UpdateCfgReq(wdiCfgReqParam, 
                    (WDI_UpdateCfgRspCb )WDA_UpdateCfgCallback, pWDA) ;
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4305,7 +3798,6 @@
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
 
-
 VOS_STATUS WDA_GetWepKeysFromCfg( tWDA_CbContext *pWDA, 
                                                       v_U8_t *pDefaultKeyId,
                                                       v_U8_t *pNumKeys,
@@ -4315,14 +3807,12 @@
    v_U32_t val = SIR_MAC_KEY_LENGTH;
    VOS_STATUS status = WDI_STATUS_SUCCESS;
    tpAniSirGlobal pMac = (tpAniSirGlobal )VOS_GET_MAC_CTXT(pWDA->pVosContext) ;
-
    if (NULL == pMac )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                  "%s: Invoked with invalid MAC context ", __FUNCTION__ );
       return VOS_STATUS_E_FAILURE;
    }
-
    if( eSIR_SUCCESS != wlan_cfgGetInt( pMac, WNI_CFG_WEP_DEFAULT_KEYID,
                                                                     &defKeyId ))
    {
@@ -4331,7 +3821,6 @@
    }
    
   *pDefaultKeyId = (v_U8_t)defKeyId;
-
    /* Need to extract ALL of the configured WEP Keys */
    for( i = 0, j = 0; i < SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS; i++ )
    {
@@ -4360,15 +3849,12 @@
          pWdiKeys[j].paeRole = 0;
          /* Determined from wlan_cfgGetStr() above.*/
          pWdiKeys[j].keyLength = (tANI_U16) val;
-
          j++;
          *pNumKeys = (tANI_U8) j;
       }
    }
-
    return status;
 }
-
 /*
  * FUNCTION: WDA_SetBssKeyReqCallback
  * send SET BSS key RSP back to PE
@@ -4378,7 +3864,6 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA; 
    tSetBssKeyParams *setBssKeyParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
    if(NULL == pWdaParams)
@@ -4390,16 +3875,12 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    setBssKeyParams = (tSetBssKeyParams *)pWdaParams->wdaMsgParam;
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
    setBssKeyParams->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    WDA_SendMsg(pWDA, WDA_SET_BSSKEY_RSP, (void *)setBssKeyParams , 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessSetBssKeyReq
  * Request to WDI for programming the BSS key( key for 
@@ -4413,12 +3894,9 @@
                   (WDI_SetBSSKeyReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_SetBSSKeyReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    v_U8_t keyIndex;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiSetBssKeyParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4435,14 +3913,11 @@
       vos_mem_free(wdiSetBssKeyParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    vos_mem_zero(wdiSetBssKeyParam, sizeof(WDI_SetBSSKeyReqParamsType));
-
    /* copy set BSS params to WDI structure */
    wdiSetBssKeyParam->wdiBSSKeyInfo.ucBssIdx = setBssKeyParams->bssIdx;
    wdiSetBssKeyParam->wdiBSSKeyInfo.wdiEncType = setBssKeyParams->encType;
    wdiSetBssKeyParam->wdiBSSKeyInfo.ucNumKeys = setBssKeyParams->numKeys;
-
    if(setBssKeyParams->encType != eSIR_ED_NONE)
    {
       if( setBssKeyParams->numKeys == 0 && 
@@ -4450,7 +3925,6 @@
                                 setBssKeyParams->encType == eSIR_ED_WEP104))
       {
          tANI_U8 defaultKeyId = 0;
-
          WDA_GetWepKeysFromCfg( pWDA, &defaultKeyId, 
             &wdiSetBssKeyParam->wdiBSSKeyInfo.ucNumKeys,
             wdiSetBssKeyParam->wdiBSSKeyInfo.aKeys );
@@ -4477,17 +3951,14 @@
          }
       }
    }
-
    wdiSetBssKeyParam->wdiBSSKeyInfo.ucSingleTidRc = 
                                       setBssKeyParams->singleTidRc;
    wdiSetBssKeyParam->wdiReqStatusCB = NULL ;
-
    /* Store set key pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = setBssKeyParams;
    pWdaParams->wdaWdiApiMsgParam = wdiSetBssKeyParam;
-
    status = WDI_SetBSSKeyReq(wdiSetBssKeyParam, 
                            (WDI_SetBSSKeyRspCb)WDA_SetBssKeyReqCallback ,pWdaParams);
    
@@ -4500,10 +3971,8 @@
       setBssKeyParams->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_SET_BSSKEY_RSP, (void *)setBssKeyParams, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_RemoveBssKeyReqCallback
  * send SET BSS key RSP back to PE
@@ -4513,10 +3982,8 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA; 
    tRemoveBssKeyParams *removeBssKeyParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4526,17 +3993,13 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    removeBssKeyParams = (tRemoveBssKeyParams *)pWdaParams->wdaMsgParam;
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
    
    removeBssKeyParams->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    WDA_SendMsg(pWDA, WDA_REMOVE_BSSKEY_RSP, (void *)removeBssKeyParams , 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessRemoveBssKeyReq
  * Request to WDI to remove the BSS key( key for broadcast/multicast 
@@ -4550,10 +4013,8 @@
                   (WDI_RemoveBSSKeyReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_RemoveBSSKeyReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiRemoveBssKeyParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4570,23 +4031,19 @@
       vos_mem_free(wdiRemoveBssKeyParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    /* copy Remove BSS key params to WDI structure*/
    wdiRemoveBssKeyParam->wdiKeyInfo.ucBssIdx = removeBssKeyParams->bssIdx;
    wdiRemoveBssKeyParam->wdiKeyInfo.wdiEncType = removeBssKeyParams->encType;
    wdiRemoveBssKeyParam->wdiKeyInfo.ucKeyId = removeBssKeyParams->keyId;
    wdiRemoveBssKeyParam->wdiKeyInfo.wdiWEPType = removeBssKeyParams->wepType;
    wdiRemoveBssKeyParam->wdiReqStatusCB = NULL ;
-
    /* Store remove key pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = removeBssKeyParams;
    pWdaParams->wdaWdiApiMsgParam = wdiRemoveBssKeyParam;
-
    status = WDI_RemoveBSSKeyReq(wdiRemoveBssKeyParam, 
                      (WDI_RemoveBSSKeyRspCb)WDA_RemoveBssKeyReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4596,10 +4053,8 @@
       removeBssKeyParams->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_REMOVE_BSSKEY_RSP, (void *)removeBssKeyParams, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_SetBssKeyReqCallback
  * send SET BSS key RSP back to PE
@@ -4609,7 +4064,6 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA; 
    tSetStaKeyParams *setStaKeyParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
    if(NULL == pWdaParams)
@@ -4621,17 +4075,12 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    setStaKeyParams = (tSetStaKeyParams *)pWdaParams->wdaMsgParam;
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    setStaKeyParams->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    WDA_SendMsg(pWDA, WDA_SET_STAKEY_RSP, (void *)setStaKeyParams , 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessSetStaKeyReq
  * Request to WDI for programming the STA key( key for Unicast frames 
@@ -4645,12 +4094,9 @@
                   (WDI_SetSTAKeyReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_SetSTAKeyReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    v_U8_t keyIndex;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiSetStaKeyParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4667,17 +4113,13 @@
       vos_mem_free(wdiSetStaKeyParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    vos_mem_set(wdiSetStaKeyParam, sizeof(WDI_SetSTAKeyReqParamsType), 0);
-
    vos_mem_zero(wdiSetStaKeyParam, sizeof(WDI_SetSTAKeyReqParamsType));
-
    /* copy set STA key params to WDI structure */
    wdiSetStaKeyParam->wdiKeyInfo.ucSTAIdx = setStaKeyParams->staIdx;
    wdiSetStaKeyParam->wdiKeyInfo.wdiEncType = setStaKeyParams->encType;
    wdiSetStaKeyParam->wdiKeyInfo.wdiWEPType = setStaKeyParams->wepType;
    wdiSetStaKeyParam->wdiKeyInfo.ucDefWEPIdx = setStaKeyParams->defWEPIdx;
-
    if(setStaKeyParams->encType != eSIR_ED_NONE)
    {
       if( (wdiSetStaKeyParam->wdiKeyInfo.wdiWEPType == WDI_WEP_STATIC) && 
@@ -4701,7 +4143,6 @@
                                   setStaKeyParams->key[keyIndex].unicast;
             wdiSetStaKeyParam->wdiKeyInfo.wdiKey[keyIndex].keyDirection =
                                   setStaKeyParams->key[keyIndex].keyDirection;
-
             vos_mem_copy(wdiSetStaKeyParam->wdiKeyInfo.wdiKey[keyIndex].keyRsc, 
                   setStaKeyParams->key[keyIndex].keyRsc, WLAN_MAX_KEY_RSC_LEN);
             wdiSetStaKeyParam->wdiKeyInfo.wdiKey[keyIndex].paeRole =
@@ -4716,7 +4157,6 @@
                 wdiSetStaKeyParam->wdiKeyInfo.ucDefWEPIdx = keyIndex;
             }
          }
-
          wdiSetStaKeyParam->wdiKeyInfo.ucNumKeys = 
                                           SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
 #else
@@ -4741,16 +4181,13 @@
    }
    wdiSetStaKeyParam->wdiKeyInfo.ucSingleTidRc = setStaKeyParams->singleTidRc;
    wdiSetStaKeyParam->wdiReqStatusCB = NULL ;
-
    /* Store set key pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = setStaKeyParams;
    pWdaParams->wdaWdiApiMsgParam = wdiSetStaKeyParam;
-
    status = WDI_SetSTAKeyReq(wdiSetStaKeyParam, 
                           (WDI_SetSTAKeyRspCb)WDA_SetStaKeyReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4760,10 +4197,8 @@
       setStaKeyParams->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_SET_STAKEY_RSP, (void *)setStaKeyParams, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_SetBcastStaKeyReqCallback
  * send SET Bcast STA key RSP back to PE
@@ -4773,10 +4208,8 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA; 
    tSetStaKeyParams *setStaKeyParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4786,18 +4219,13 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    setStaKeyParams = (tSetStaKeyParams *)pWdaParams->wdaMsgParam;
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    setStaKeyParams->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    WDA_SendMsg(pWDA, WDA_SET_STA_BCASTKEY_RSP, (void *)setStaKeyParams , 0) ;
-
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessSetBcastStaKeyReq
  * Request to WDI for programming the Bcast STA key( key for Broadcast frames 
@@ -4811,12 +4239,9 @@
                   (WDI_SetSTAKeyReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_SetSTAKeyReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    v_U8_t keyIndex;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiSetStaKeyParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4833,17 +4258,13 @@
       vos_mem_free(wdiSetStaKeyParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    vos_mem_set(wdiSetStaKeyParam, sizeof(WDI_SetSTAKeyReqParamsType), 0);
-
    vos_mem_zero(wdiSetStaKeyParam, sizeof(WDI_SetSTAKeyReqParamsType));
-
    /* copy set STA key params to WDI structure */
    wdiSetStaKeyParam->wdiKeyInfo.ucSTAIdx = setStaKeyParams->staIdx;
    wdiSetStaKeyParam->wdiKeyInfo.wdiEncType = setStaKeyParams->encType;
    wdiSetStaKeyParam->wdiKeyInfo.wdiWEPType = setStaKeyParams->wepType;
    wdiSetStaKeyParam->wdiKeyInfo.ucDefWEPIdx = setStaKeyParams->defWEPIdx;
-
    if(setStaKeyParams->encType != eSIR_ED_NONE)
    {
 #ifdef WLAN_SOFTAP_FEATURE
@@ -4856,7 +4277,6 @@
                                setStaKeyParams->key[keyIndex].unicast;
          wdiSetStaKeyParam->wdiKeyInfo.wdiKey[keyIndex].keyDirection =
                                setStaKeyParams->key[keyIndex].keyDirection;
-
          vos_mem_copy(wdiSetStaKeyParam->wdiKeyInfo.wdiKey[keyIndex].keyRsc, 
                setStaKeyParams->key[keyIndex].keyRsc, WLAN_MAX_KEY_RSC_LEN);
          wdiSetStaKeyParam->wdiKeyInfo.wdiKey[keyIndex].paeRole =
@@ -4866,7 +4286,6 @@
          vos_mem_copy(wdiSetStaKeyParam->wdiKeyInfo.wdiKey[keyIndex].key, 
                setStaKeyParams->key[keyIndex].key, SIR_MAC_MAX_KEY_LENGTH);
       }
-
       wdiSetStaKeyParam->wdiKeyInfo.ucNumKeys = 
                                        SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
 #else
@@ -4889,16 +4308,13 @@
 #endif
    }
    wdiSetStaKeyParam->wdiKeyInfo.ucSingleTidRc = setStaKeyParams->singleTidRc;
-
    /* Store set key pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = setStaKeyParams;
    pWdaParams->wdaWdiApiMsgParam = wdiSetStaKeyParam;
-
    status = WDI_SetSTABcastKeyReq(wdiSetStaKeyParam, 
                           (WDI_SetSTAKeyRspCb)WDA_SetBcastStaKeyReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4908,10 +4324,8 @@
       setStaKeyParams->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_SET_STA_BCASTKEY_RSP, (void *)setStaKeyParams, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_RemoveStaKeyReqCallback
  * send SET BSS key RSP back to PE
@@ -4921,10 +4335,8 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA; 
    tRemoveStaKeyParams *removeStaKeyParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4934,18 +4346,13 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    removeStaKeyParams = (tRemoveStaKeyParams *)pWdaParams->wdaMsgParam;
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    removeStaKeyParams->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    WDA_SendMsg(pWDA, WDA_REMOVE_STAKEY_RSP, (void *)removeStaKeyParams , 0) ;
-
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessRemoveStaKeyReq
  * Request to WDI to remove the STA key( key for Unicast frames Encryption)
@@ -4958,10 +4365,8 @@
                   (WDI_RemoveSTAKeyReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_RemoveSTAKeyReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiRemoveStaKeyParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -4978,23 +4383,19 @@
       vos_mem_free(wdiRemoveStaKeyParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    /* copy remove STA key params to WDI structure*/
    wdiRemoveStaKeyParam->wdiKeyInfo.ucSTAIdx = removeStaKeyParams->staIdx;
    wdiRemoveStaKeyParam->wdiKeyInfo.wdiEncType = removeStaKeyParams->encType;
    wdiRemoveStaKeyParam->wdiKeyInfo.ucKeyId = removeStaKeyParams->keyId;
    wdiRemoveStaKeyParam->wdiKeyInfo.ucUnicast = removeStaKeyParams->unicast;
    wdiRemoveStaKeyParam->wdiReqStatusCB = NULL ;
-
    /* Store remove key pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = removeStaKeyParams;
    pWdaParams->wdaWdiApiMsgParam = wdiRemoveStaKeyParam;
-
    status = WDI_RemoveSTAKeyReq(wdiRemoveStaKeyParam, 
                      (WDI_RemoveSTAKeyRspCb)WDA_RemoveStaKeyReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5004,21 +4405,17 @@
       removeStaKeyParams->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_REMOVE_STAKEY_RSP, (void *)removeStaKeyParams, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_IsHandleSetLinkStateReq
  * Update the WDA state and return the status to handle this message or not
  */ 
-
 WDA_processSetLinkStateStatus WDA_IsHandleSetLinkStateReq(
                                           tWDA_CbContext *pWDA,
                                           tLinkStateParams *linkStateParams)
 {
    WDA_processSetLinkStateStatus status = WDA_PROCESS_SET_LINK_STATE;
-
    switch(linkStateParams->state)
    {
       case eSIR_LINK_PREASSOC_STATE:
@@ -5030,7 +4427,6 @@
          */
          vos_mem_copy(pWDA->macBSSID,linkStateParams->bssid, 
                                                    sizeof(tSirMacAddr));
-
          vos_mem_copy(pWDA->macSTASelf,linkStateParams->selfMacAddr, 
                                                    sizeof(tSirMacAddr));
          /* UMAC is issuing the setlink state with PREASSOC twice (before set 
@@ -5050,7 +4446,6 @@
          pWDA->linkState = linkStateParams->state;
          status = WDA_IGNORE_SET_LINK_STATE;
          break;
-
       default:
          if(pWDA->wdaState != WDA_READY_STATE)
          {
@@ -5063,7 +4458,6 @@
    
    return status;
 }
-
 /*
  * FUNCTION: WDA_SetLinkStateCallback
  * call back function for set link state from WDI
@@ -5073,7 +4467,6 @@
    tWDA_CbContext *pWDA;
    tLinkStateParams *linkStateParams;
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
    if(NULL == pWdaParams)
@@ -5083,11 +4476,8 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
-
    linkStateParams = (tLinkStateParams *)pWdaParams->wdaMsgParam ;
-
    /*
     * In STA mode start the BA activity check timer after association
     * and in AP mode start BA activity check timer after BSS start */
@@ -5097,9 +4487,7 @@
    {
       WDA_START_TIMER(&pWDA->wdaTimers.baActivityChkTmr);
    }
-
    WDA_SendMsg(pWDA, WDA_SET_LINK_STATE_RSP, (void *)linkStateParams , 0) ;
-
    /* 
     * No respone required for WDA_SET_LINK_STATE so free the request 
     * param here
@@ -5114,7 +4502,6 @@
    }
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessSetLinkState
  * Request to WDI to set the link status.
@@ -5135,12 +4522,12 @@
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                            "%s:pMac is NULL", __FUNCTION__);
       VOS_ASSERT(0);
+	  vos_mem_free(wdiSetLinkStateParam);
       return VOS_STATUS_E_FAILURE;
    }
 
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiSetLinkStateParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5157,7 +4544,6 @@
       vos_mem_free(wdiSetLinkStateParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    if(WDA_IGNORE_SET_LINK_STATE == 
                   WDA_IsHandleSetLinkStateReq(pWDA,linkStateParams))
    {
@@ -5167,17 +4553,13 @@
    {
       vos_mem_copy(wdiSetLinkStateParam->wdiLinkInfo.macBSSID, 
                                   linkStateParams->bssid, sizeof(tSirMacAddr));
-
       vos_mem_copy(wdiSetLinkStateParam->wdiLinkInfo.macSelfStaMacAddr, 
                                   linkStateParams->selfMacAddr, sizeof(tSirMacAddr));
-
       wdiSetLinkStateParam->wdiLinkInfo.wdiLinkState = linkStateParams->state;
       wdiSetLinkStateParam->wdiReqStatusCB = NULL ;
-
       pWdaParams->pWdaContext = pWDA;
       /* Store remove key pointer, as this will be used for response */
       pWdaParams->wdaMsgParam = (void *)linkStateParams ;
-
       /* store Params pass it to WDI */
       pWdaParams->wdaWdiApiMsgParam = (void *)wdiSetLinkStateParam ;
       /* Stop Timer only other than GO role and concurrent session */
@@ -5187,27 +4569,22 @@
       {
          WDA_STOP_TIMER(&pWDA->wdaTimers.baActivityChkTmr);
       }
-
       status = WDI_SetLinkStateReq(wdiSetLinkStateParam, 
                         (WDI_SetLinkStateRspCb)WDA_SetLinkStateCallback, pWdaParams);
-
       if(IS_WDI_STATUS_FAILURE(status))
       {
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
              "Failure in set link state Req WDI API, free all the memory " );
       }
    }
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       vos_mem_free(wdiSetLinkStateParam) ;
-      vos_mem_free(linkStateParams);
+      WDA_SendMsg(pWDA, WDA_SET_LINK_STATE_RSP, (void *)linkStateParams, 0);
       vos_mem_free(pWdaParams);
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_GetStatsReqParamsCallback
  * send the response to PE with Stats received from WDI
@@ -5221,7 +4598,6 @@
 
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    pGetPEStatsRspParams = 
        (tAniGetPEStatsRsp *)vos_mem_malloc(sizeof(tAniGetPEStatsRsp) +
        (wdiGetStatsRsp->usMsgLen - sizeof(WDI_GetStatsRspParamsType)));
@@ -5233,7 +4609,6 @@
       VOS_ASSERT(0);
       return;
    }
-
    vos_mem_set(pGetPEStatsRspParams, wdiGetStatsRsp->usMsgLen, 0);
    pGetPEStatsRspParams->msgType = wdiGetStatsRsp->usMsgType;
    pGetPEStatsRspParams->msgLen = sizeof(tAniGetPEStatsRsp) + 
@@ -5246,18 +4621,15 @@
                       CONVERT_WDI2VOS_STATUS(wdiGetStatsRsp->wdiStatus);
    pGetPEStatsRspParams->staId   = wdiGetStatsRsp->ucSTAIdx;
    pGetPEStatsRspParams->statsMask = wdiGetStatsRsp->uStatsMask;
-
    vos_mem_copy( pGetPEStatsRspParams + 1,
                   wdiGetStatsRsp + 1,
                   wdiGetStatsRsp->usMsgLen - sizeof(WDI_GetStatsRspParamsType));
-
   /* send response to UMAC*/
    WDA_SendMsg(pWDA, WDA_GET_STATISTICS_RSP, pGetPEStatsRspParams , 0) ;
    
    return;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessGetStatsReq
  * Request to WDI to get the statistics
@@ -5268,20 +4640,15 @@
    WDI_Status status = WDI_STATUS_SUCCESS ;
    WDI_GetStatsReqParamsType wdiGetStatsParam;
    tAniGetPEStatsRsp *pGetPEStatsRspParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    wdiGetStatsParam.wdiGetStatsParamsInfo.ucSTAIdx = 
                                           pGetStatsParams->staId;
    wdiGetStatsParam.wdiGetStatsParamsInfo.uStatsMask = 
                                           pGetStatsParams->statsMask;
-
    wdiGetStatsParam.wdiReqStatusCB = NULL ;
-
    status = WDI_GetStatsReq(&wdiGetStatsParam, 
        (WDI_GetStatsRspCb)WDA_GetStatsReqParamsCallback, pWDA);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5293,9 +4660,9 @@
           VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                            "%s: VOS MEM Alloc Failure", __FUNCTION__); 
           VOS_ASSERT(0);
+		  vos_mem_free(pGetStatsParams);
           return VOS_STATUS_E_NOMEM;
       }
-
       pGetPEStatsRspParams->msgType = WDA_GET_STATISTICS_RSP;
       pGetPEStatsRspParams->msgLen = sizeof(tAniGetPEStatsRsp);
       pGetPEStatsRspParams->staId = pGetStatsParams->staId;
@@ -5303,12 +4670,10 @@
       WDA_SendMsg(pWDA, WDA_GET_STATISTICS_RSP, 
                                  (void *)pGetPEStatsRspParams, 0) ;
    }
-
    /* Free the request message */
    vos_mem_free(pGetStatsParams);
    return CONVERT_WDI2VOS_STATUS(status);
 }
-
 /*
  * FUNCTION: WDA_UpdateEDCAParamCallback
  * call back function for Update EDCA params from WDI
@@ -5320,7 +4685,6 @@
    
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5329,14 +4693,11 @@
       return ;
    }
    pEdcaParams = (tEdcaParams *)pWdaParams->wdaMsgParam ;
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    vos_mem_free(pWdaParams);
    vos_mem_free(pEdcaParams);
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessUpdateEDCAParamReq
  * Request to WDI to Update the EDCA params.
@@ -5349,15 +4710,14 @@
                      (WDI_UpdateEDCAParamsType *)vos_mem_malloc(
                                              sizeof(WDI_UpdateEDCAParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiEdcaParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                            "%s: VOS MEM Alloc Failure", __FUNCTION__); 
       VOS_ASSERT(0);
+	  vos_mem_free(pEdcaParams);
       return VOS_STATUS_E_NOMEM;
    }
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
@@ -5367,9 +4727,9 @@
                            "%s: VOS MEM Alloc Failure", __FUNCTION__); 
       VOS_ASSERT(0);
       vos_mem_free(wdiEdcaParam);
+	  vos_mem_free(pEdcaParams);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiEdcaParam->wdiEDCAInfo.ucBssIdx = pEdcaParams->bssIdx;
    wdiEdcaParam->wdiEDCAInfo.ucEDCAParamsValid = pEdcaParams->highPerformance;
    WDA_UpdateEdcaParamsForAC(pWDA, &wdiEdcaParam->wdiEDCAInfo.wdiEdcaBEInfo,
@@ -5381,17 +4741,13 @@
    WDA_UpdateEdcaParamsForAC(pWDA, &wdiEdcaParam->wdiEDCAInfo.wdiEdcaVOInfo,
                                                            &pEdcaParams->acvo);
    wdiEdcaParam->wdiReqStatusCB = NULL ;
-
    pWdaParams->pWdaContext = pWDA;
    /* Store remove key pointer, as this will be used for response */
    pWdaParams->wdaMsgParam = (void *)pEdcaParams ;
-
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiEdcaParam ;
-
    status = WDI_UpdateEDCAParams(wdiEdcaParam, 
                (WDI_UpdateEDCAParamsRspCb)WDA_UpdateEDCAParamCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5400,10 +4756,8 @@
       vos_mem_free(pWdaParams);
       vos_mem_free(pEdcaParams);
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_AddBAReqCallback
  * send ADD BA RSP back to PE
@@ -5414,10 +4768,8 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA;
    tAddBAParams *pAddBAReqParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5427,18 +4779,13 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    pAddBAReqParams = (tAddBAParams *)pWdaParams->wdaMsgParam;
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    vos_mem_free(pWdaParams);
-
    pAddBAReqParams->status = CONVERT_WDI2SIR_STATUS(pAddBARspParams->wdiStatus) ;
-
    WDA_SendMsg(pWDA, WDA_ADDBA_RSP, (void *)pAddBAReqParams , 0) ;
-
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessAddBAReq
  * Request to WDI to Update the ADDBA REQ params.
@@ -5451,10 +4798,8 @@
                      (WDI_AddBAReqParamsType *)vos_mem_malloc(
                                              sizeof(WDI_AddBAReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiAddBAReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5471,23 +4816,18 @@
       vos_mem_free(wdiAddBAReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    do
    {
       WDI_AddBAReqinfoType *wdiAddBaInfo = &wdiAddBAReqParam->wdiBAInfoType ;
-
       wdiAddBaInfo->ucSTAIdx = staIdx ;
       wdiAddBaInfo->ucBaSessionID = baSessionID ;
       wdiAddBaInfo->ucWinSize     = WDA_BA_MAX_WINSIZE ;
-
    } while(0) ;
    wdiAddBAReqParam->wdiReqStatusCB = NULL ;
-
    pWdaParams->pWdaContext = pWDA;
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiAddBAReqParam ;
    pWdaParams->wdaMsgParam = pAddBAReqParams;
-
    wstatus = WDI_AddBAReq(wdiAddBAReqParam, 
                           (WDI_AddBARspCb)WDA_AddBAReqCallback, pWdaParams);
 
@@ -5501,11 +4841,8 @@
       pAddBAReqParams->status = eSIR_FAILURE;
       WDA_SendMsg(pWDA, WDA_ADDBA_RSP, (void *)pAddBAReqParams , 0) ;
    }
-
    return status;
-
 }
-
 /*
  * FUNCTION: WDA_AddBASessionReqCallback
  * send ADD BA SESSION RSP back to PE/(or TL)
@@ -5517,7 +4854,6 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA; 
    tAddBAParams *pAddBAReqParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
    if(NULL == pWdaParams)
@@ -5529,19 +4865,17 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    pAddBAReqParams = (tAddBAParams *)pWdaParams->wdaMsgParam;
-
    if( NULL == pAddBAReqParams )
    {
-
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                                           "%s: pAddBAReqParams received NULL " ,__FUNCTION__);
       VOS_ASSERT( 0 );
+	  vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
+	  vos_mem_free(pWdaParams);
       return ;
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    vos_mem_free(pWdaParams);
-
    /* 
     * if WDA in update TL state, update TL with BA session parama and send
     * another request to HAL(/WDI) (ADD_BA_REQ)
@@ -5559,7 +4893,6 @@
                                         wdiAddBaSession->ucBaBufferSize,
                                         wdiAddBaSession->ucWinSize,
                                         wdiAddBaSession->usBaSSN );
-
       WDA_ProcessAddBAReq(pWDA, status, wdiAddBaSession->usBaSessionID, 
                                       wdiAddBaSession->ucSTAIdx, pAddBAReqParams) ;
    }
@@ -5578,14 +4911,11 @@
       pWDA->wdaMsgParam = NULL;
       WDA_SendMsg(pWDA, WDA_ADDBA_RSP, (void *)pAddBAReqParams , 0) ;
    }
-
    /*Reset the WDA state to READY */
    pWDA->wdaState = WDA_READY_STATE;
-
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessAddBASessionReq
  * Request to WDI to Update the ADDBA REQ params.
@@ -5598,10 +4928,8 @@
                      (WDI_AddBASessionReqParamsType *)vos_mem_malloc(
                           sizeof(WDI_AddBASessionReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiAddBASessionReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5618,7 +4946,6 @@
       vos_mem_free(wdiAddBASessionReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    /*
     * Populate ADD BA parameters and pass these paarmeters to WDI.
     * ADD BA SESSION REQ will update HAL with BA params, WDA, will changes
@@ -5634,15 +4961,12 @@
       wdiBAInfoType->ucSTAIdx = pAddBAReqParams->staIdx;
       vos_mem_copy(wdiBAInfoType->macPeerAddr,
                        pAddBAReqParams->peerMacAddr, sizeof(tSirMacAddr));
-
       wdiBAInfoType->ucBaTID = pAddBAReqParams->baTID;
-
       wdiBAInfoType->ucBaPolicy = pAddBAReqParams->baPolicy;
       wdiBAInfoType->usBaBufferSize = pAddBAReqParams->baBufferSize;
       wdiBAInfoType->usBaTimeout = pAddBAReqParams->baTimeout;
       wdiBAInfoType->usBaSSN = pAddBAReqParams->baSSN;
       wdiBAInfoType->ucBaDirection = pAddBAReqParams->baDirection;
-
       /* check the BA direction and update state accordingly */
       (eBA_RECIPIENT == wdiBAInfoType->ucBaDirection) 
                                  ? (pWDA->wdaState = WDA_BA_UPDATE_TL_STATE)
@@ -5650,16 +4974,13 @@
  
    }while(0) ;
    wdiAddBASessionReqParam->wdiReqStatusCB = NULL ;
-
    pWdaParams->pWdaContext = pWDA;
    /* Store ADD BA pointer, as this will be used for response */
    pWdaParams->wdaMsgParam = (void *)pAddBAReqParams ;
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiAddBASessionReqParam ;
-
    status = WDI_AddBASessionReq(wdiAddBASessionReqParam, 
               (WDI_AddBASessionRspCb)WDA_AddBASessionReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5668,11 +4989,8 @@
       vos_mem_free(pWdaParams->wdaMsgParam);
       vos_mem_free(pWdaParams);
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
-
 }
-
 /*
  * FUNCTION: WDA_DelBANotifyTL
  * send DEL BA IND to TL
@@ -5684,7 +5002,6 @@
    //tSirMsgQ msg;
    vos_msg_t vosMsg;
    VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
-
    if(NULL == pDelBAInd) 
    { 
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5692,12 +5009,11 @@
       VOS_ASSERT(0) ; 
       return; 
    } 
-
    pDelBAInd->mesgType = WDA_DELETEBA_IND;
    pDelBAInd->staIdx = (tANI_U8) pDelBAReqParams->staIdx;
    pDelBAInd->baTID = (tANI_U8) pDelBAReqParams->baTID;
    pDelBAInd->mesgLen = sizeof( tDelBAInd );
-
+ 
  
    vosMsg.type = WDA_DELETEBA_IND;
    vosMsg.bodyptr = pDelBAInd;
@@ -5707,7 +5023,6 @@
       vosStatus = VOS_STATUS_E_BADMSG;
    }
 }
-
 /*
  * FUNCTION: WDA_DelBAReqCallback
  * send DEL BA RSP back to PE
@@ -5717,10 +5032,8 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA; 
    tDelBAParams *pDelBAReqParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5730,14 +5043,12 @@
    }
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
    pDelBAReqParams = (tDelBAParams *)pWdaParams->wdaMsgParam ;
-
    /* Notify TL about DEL BA in case of recipinet */
    if((VOS_STATUS_SUCCESS == CONVERT_WDI2VOS_STATUS(status)) && 
                              (eBA_RECIPIENT == pDelBAReqParams->baDirection))
    {
       WDA_DelBANotifyTL(pWDA, pDelBAReqParams);
    }
-
    /* 
     * No respone required for WDA_DELBA_IND so just free the request 
     * param here
@@ -5748,7 +5059,6 @@
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessDelBAReq
  * Request to WDI to Update the DELBA REQ params.
@@ -5763,10 +5073,8 @@
    tWDA_ReqParams *pWdaParams ;
    tANI_U16 staIdx = 0;
    tANI_U8 tid = 0;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiDelBAReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5783,29 +5091,23 @@
       vos_mem_free(wdiDelBAReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiDelBAReqParam->wdiBAInfo.ucSTAIdx = pDelBAReqParams->staIdx;
    wdiDelBAReqParam->wdiBAInfo.ucBaTID = pDelBAReqParams->baTID;
    wdiDelBAReqParam->wdiBAInfo.ucBaDirection = pDelBAReqParams->baDirection;
    wdiDelBAReqParam->wdiReqStatusCB = NULL ;
-
    pWdaParams->pWdaContext = pWDA;
    /* Store DEL BA pointer, as this will be used for response */
    pWdaParams->wdaMsgParam = (void *)pDelBAReqParams ;
-
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiDelBAReqParam ;
-
    /* if BA exchange over the air is failed, clear this tid in BaBitmap
     * maintained in WDA, so that WDA can retry for another BA session
     */
    staIdx = pDelBAReqParams->staIdx;
    tid = pDelBAReqParams->baTID;
    WDA_CLEAR_BA_TXFLAG(pWDA, staIdx, tid);
-
    status = WDI_DelBAReq(wdiDelBAReqParam, 
                          (WDI_DelBARspCb)WDA_DelBAReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5814,11 +5116,8 @@
       vos_mem_free(pWdaParams->wdaMsgParam);
       vos_mem_free(pWdaParams);
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
-
 }
-
 /*
  * FUNCTION: WDA_AddTSReqCallback
  * send ADD TS RSP back to PE
@@ -5831,7 +5130,6 @@
    
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5845,14 +5143,10 @@
    vos_mem_free(pWdaParams);
    
    pAddTsReqParams->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    WDA_SendMsg(pWDA, WDA_ADD_TS_RSP, (void *)pAddTsReqParams , 0) ;
-
    return ;
 }
 
-
-
 /*
  * FUNCTION: WDA_ProcessAddTSReq
  * Request to WDI to Update the ADD TS  REQ params.
@@ -5865,10 +5159,8 @@
                      (WDI_AddTSReqParamsType *)vos_mem_malloc(
                                              sizeof(WDI_AddTSReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiAddTSReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5885,10 +5177,8 @@
       vos_mem_free(wdiAddTSReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiAddTSReqParam->wdiTsInfo.ucSTAIdx = pAddTsReqParams->staIdx;
    wdiAddTSReqParam->wdiTsInfo.ucTspecIdx = pAddTsReqParams->tspecIdx;
-
    //TS IE
    wdiAddTSReqParam->wdiTsInfo.wdiTspecIE.ucType = pAddTsReqParams->tspec.type;
    wdiAddTSReqParam->wdiTsInfo.wdiTspecIE.ucLength = 
@@ -5917,7 +5207,6 @@
                            pAddTsReqParams->tspec.tsinfo.schedule.schedule;
    wdiAddTSReqParam->wdiTsInfo.wdiTspecIE.wdiTSinfo.wdiSchedule.rsvd = 
                            pAddTsReqParams->tspec.tsinfo.schedule.rsvd;
-
    //TS IE
    wdiAddTSReqParam->wdiTsInfo.wdiTspecIE.usNomMsduSz = 
                            pAddTsReqParams->tspec.nomMsduSz;
@@ -5949,7 +5238,6 @@
                            pAddTsReqParams->tspec.surplusBw;
    wdiAddTSReqParam->wdiTsInfo.wdiTspecIE.usMediumTime = 
                            pAddTsReqParams->tspec.mediumTime;
-
    /* TODO: tAddTsParams doesn't have the following fields */
 #if 0 
    wdiAddTSReqParam->wdiTsInfo.ucUapsdFlags = 
@@ -5962,13 +5250,10 @@
    pWdaParams->pWdaContext = pWDA;
    /* Store ADD TS pointer, as this will be used for response */
    pWdaParams->wdaMsgParam = (void *)pAddTsReqParams ;
-
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiAddTSReqParam ;
-
    status = WDI_AddTSReq(wdiAddTSReqParam, 
                    (WDI_AddTsRspCb)WDA_AddTSReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -5978,12 +5263,9 @@
       pAddTsReqParams->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_ADD_TS_RSP, (void *)pAddTsReqParams , 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
-
 }
 
-
 /*
  * FUNCTION: WDA_DelTSReqCallback
  * send DEL TS RSP back to PE
@@ -5991,23 +5273,18 @@
 void WDA_DelTSReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    vos_mem_free(pWdaParams->wdaMsgParam) ;
    vos_mem_free(pWdaParams);
-
    /* 
     * No respone required for WDA_DEL_TS_REQ so just free the request 
     * param here
     */
-
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessDelTSReq
  * Request to WDI to Update the DELTS REQ params.
@@ -6020,10 +5297,8 @@
                      (WDI_DelTSReqParamsType *)vos_mem_malloc(
                                              sizeof(WDI_DelTSReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiDelTSReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6040,23 +5315,18 @@
       vos_mem_free(wdiDelTSReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    vos_mem_copy(wdiDelTSReqParam->wdiDelTSInfo.macBSSID, 
                                   pDelTSReqParams->bssId, sizeof(tSirMacAddr));
    wdiDelTSReqParam->wdiDelTSInfo.ucSTAIdx = pDelTSReqParams->staIdx;
    wdiDelTSReqParam->wdiDelTSInfo.ucTspecIdx = pDelTSReqParams->tspecIdx;
    wdiDelTSReqParam->wdiReqStatusCB = NULL ;
-
    pWdaParams->pWdaContext = pWDA;
    /* Store DEL TS pointer, as this will be used for response */
    pWdaParams->wdaMsgParam = (void *)pDelTSReqParams ;
-
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiDelTSReqParam ;
-
    status = WDI_DelTSReq(wdiDelTSReqParam, 
                        (WDI_DelTsRspCb)WDA_DelTSReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6065,11 +5335,8 @@
       vos_mem_free(pWdaParams->wdaMsgParam);
       vos_mem_free(pWdaParams);
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
-
 }
-
 /*
  * FUNCTION: WDA_UpdateBeaconParamsCallback
  *  Free the memory. No need to send any response to PE in this case
@@ -6077,10 +5344,8 @@
 void WDA_UpdateBeaconParamsCallback(WDI_Status status, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6095,10 +5360,8 @@
     * No respone required for WDA_UPDATE_BEACON_IND so just free the request 
     * param here
     */
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessUpdateBeaconParams
  * Request to WDI to send  the beacon parameters to HAL to update the Hardware
@@ -6111,10 +5374,8 @@
                      (WDI_UpdateBeaconParamsType *)vos_mem_malloc(
                                              sizeof(WDI_UpdateBeaconParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiUpdateBeaconParams) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6131,7 +5392,6 @@
       vos_mem_free(wdiUpdateBeaconParams);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucBssIdx = 
                            pUpdateBeaconParams->bssIdx;
    wdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucfShortPreamble = 
@@ -6161,14 +5421,11 @@
    pWdaParams->pWdaContext = pWDA;
    /* Store UpdateBeacon Req pointer, as this will be used for response */
    pWdaParams->wdaMsgParam = (void *)pUpdateBeaconParams ;
-
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiUpdateBeaconParams ;
-
    status = WDI_UpdateBeaconParamsReq(wdiUpdateBeaconParams, 
                  (WDI_UpdateBeaconParamsRspCb)WDA_UpdateBeaconParamsCallback,
                  pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6177,13 +5434,9 @@
       vos_mem_free(pWdaParams->wdaMsgParam);
       vos_mem_free(pWdaParams);
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
-
 }
-
 #ifdef FEATURE_WLAN_CCX
-
 /*
  * FUNCTION: WDA_TSMStatsReqCallback
  * send TSM Stats RSP back to PE
@@ -6196,7 +5449,6 @@
  
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ Entering: %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6206,7 +5458,6 @@
    }
    pWDA = (tWDA_CbContext *) pWdaParams->pWdaContext;
    pTsmRspParams = (tTSMStats *)pWdaParams->wdaMsgParam ;
-
    if( NULL == pTsmRspParams )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6214,7 +5465,6 @@
       VOS_ASSERT( 0 );
       return ;
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    vos_mem_free(pWdaParams);
    
@@ -6228,15 +5478,11 @@
    pTsmRspParams->tsmMetrics.UplinkPktCount = pwdiTSMStatsRspParams->UplinkPktCount;
    pTsmRspParams->tsmMetrics.RoamingCount = pwdiTSMStatsRspParams->RoamingCount;
    pTsmRspParams->tsmMetrics.RoamingDly = pwdiTSMStatsRspParams->RoamingDly;
-
    WDA_SendMsg(pWDA, WDA_TSM_STATS_RSP, (void *)pTsmRspParams , 0) ;
-
    return ;
 }
 
 
-
-
 /*
  * FUNCTION: WDA_ProcessTsmStatsReq
  * Request to WDI to get the TSM Stats params.
@@ -6247,10 +5493,8 @@
    WDI_Status status = WDI_STATUS_SUCCESS ;
    WDI_TSMStatsReqParamsType *wdiTSMReqParam = NULL;
    tWDA_ReqParams *pWdaParams = NULL;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> Entering: %s " ,__FUNCTION__);
-
    if((NULL != pWDA->wdaMsgParam) || (NULL != pWDA->wdaWdiApiMsgParam))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6258,7 +5502,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    wdiTSMReqParam = (WDI_TSMStatsReqParamsType *)vos_mem_malloc(
                                  sizeof(WDI_TSMStatsReqParamsType));
    if(NULL == wdiTSMReqParam) 
@@ -6268,7 +5511,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if(NULL == pWdaParams)
    {
@@ -6278,7 +5520,6 @@
       vos_mem_free(wdiTSMReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiTSMReqParam->wdiTsmStatsParamsInfo.ucTid = pTsmStats->tid;
    vos_mem_copy(wdiTSMReqParam->wdiTsmStatsParamsInfo.bssid,
                                            pTsmStats->bssId,
@@ -6288,13 +5529,10 @@
    pWdaParams->pWdaContext = pWDA;
    /* Store TSM Stats pointer, as this will be used for response */
    pWdaParams->wdaMsgParam = (void *)pTsmStats ;
-
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiTSMReqParam ;
-
    status = WDI_TSMStatsReq(wdiTSMReqParam,
                            (WDI_TsmRspCb)WDA_TSMStatsReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6302,7 +5540,6 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
       vos_mem_free(pWdaParams) ;
    }
-
   return CONVERT_WDI2VOS_STATUS(status) ;
 } 
 #endif
@@ -6313,13 +5550,10 @@
 void WDA_SendBeaconParamsCallback(WDI_Status status, void* pUserData)
 {
 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessSendBeacon
  * Request to WDI to send the beacon template to HAL to update the TPE memory and 
@@ -6330,10 +5564,8 @@
 {
    WDI_Status status = WDI_STATUS_SUCCESS ;
    WDI_SendBeaconParamsType wdiSendBeaconReqParam; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    vos_mem_copy(wdiSendBeaconReqParam.wdiSendBeaconParamsInfo.macBSSID, 
                               pSendbeaconParams->bssId, sizeof(tSirMacAddr));
    wdiSendBeaconReqParam.wdiSendBeaconParamsInfo.beaconLength = 
@@ -6346,41 +5578,32 @@
    wdiSendBeaconReqParam.wdiSendBeaconParamsInfo.usP2PIeOffset = 
                               pSendbeaconParams->p2pIeOffset;
 #endif
-
    /* Copy the beacon template to local buffer */
    vos_mem_copy(wdiSendBeaconReqParam.wdiSendBeaconParamsInfo.beacon, 
                  pSendbeaconParams->beacon, pSendbeaconParams->beaconLength);
    wdiSendBeaconReqParam.wdiReqStatusCB = NULL ;
 
-
    status = WDI_SendBeaconParamsReq(&wdiSendBeaconReqParam, 
             (WDI_SendBeaconParamsRspCb)WDA_SendBeaconParamsCallback, pWDA);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
           "Failure in SEND BEACON REQ Params WDI API" );
    }
-
    vos_mem_free(pSendbeaconParams);
    return CONVERT_WDI2VOS_STATUS(status);
-
 }
-
 /*
  * FUNCTION: WDA_UpdateProbeRspParamsCallback
  * No need to send any response to PE in this case
  */ 
 void WDA_UpdateProbeRspParamsCallback(WDI_Status status, void* pUserData)
 {
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessUpdateProbeRspTemplate
  * Request to WDI to send the probe response template to HAL to update the TPE memory and 
@@ -6393,13 +5616,11 @@
    WDI_UpdateProbeRspTemplateParamsType wdiSendProbeRspParam; 
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    /*Copy update probe response parameters*/
    vos_mem_copy(wdiSendProbeRspParam.wdiProbeRspTemplateInfo.macBSSID, 
                               pSendProbeRspParams->bssId, sizeof(tSirMacAddr));
    wdiSendProbeRspParam.wdiProbeRspTemplateInfo.uProbeRespTemplateLen = 
                               pSendProbeRspParams->probeRespTemplateLen;
-
    /* Copy the Probe Response template to local buffer */
    vos_mem_copy(
            wdiSendProbeRspParam.wdiProbeRspTemplateInfo.pProbeRespTemplate,
@@ -6412,21 +5633,16 @@
    
    wdiSendProbeRspParam.wdiReqStatusCB = NULL ;
    
-
    status = WDI_UpdateProbeRspTemplateReq(&wdiSendProbeRspParam, 
      (WDI_UpdateProbeRspTemplateRspCb)WDA_UpdateProbeRspParamsCallback, pWDA);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
           "Failure in SEND Probe RSP Params WDI API" );
    }
-
    vos_mem_free(pSendProbeRspParams);
    return CONVERT_WDI2VOS_STATUS(status);
-
 }
-
 #if defined(WLAN_FEATURE_VOWIFI) || defined(FEATURE_WLAN_CCX)
 /*
  * FUNCTION: WDA_SetMaxTxPowerCallBack
@@ -6448,34 +5664,31 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    pWDA = (tWDA_CbContext *) pWdaParams->pWdaContext;
    pMaxTxPowerParams = (tMaxTxPowerParams *)pWdaParams->wdaMsgParam ;
-
    if( NULL == pMaxTxPowerParams )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                                           "%s: pMaxTxPowerParams received NULL " ,__FUNCTION__);
-      VOS_ASSERT( 0 );
+      VOS_ASSERT(0);
+	  vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
+	  vos_mem_free(pWdaParams);
       return ;
    }
-
+  
   
   /*need to free memory for the pointers used in the 
     WDA Process.Set Max Tx Power Req function*/
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    vos_mem_free(pWdaParams);
-
    pMaxTxPowerParams->power = pwdiSetMaxTxPowerRsp->ucPower;
-
+  
   
   /* send response to UMAC*/
    WDA_SendMsg(pWDA, WDA_SET_MAX_TX_POWER_RSP, pMaxTxPowerParams , 0) ;
    
    return;
 }
-
 /*
  * FUNCTION: WDA_SetMaxTxPowerCallBack
  * Request to WDI to send set Max Tx Power Request
@@ -6486,10 +5699,8 @@
    WDI_Status status = WDI_STATUS_SUCCESS;
    WDI_SetMaxTxPowerParamsType *wdiSetMaxTxPowerParams = NULL;
    tWDA_ReqParams *pWdaParams = NULL;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if((NULL != pWDA->wdaMsgParam) ||(NULL != pWDA->wdaWdiApiMsgParam))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6497,7 +5708,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    wdiSetMaxTxPowerParams = (WDI_SetMaxTxPowerParamsType *)vos_mem_malloc(
                                  sizeof(WDI_SetMaxTxPowerParamsType));
    if(NULL == wdiSetMaxTxPowerParams) 
@@ -6507,7 +5717,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if(NULL == pWdaParams)
    {
@@ -6517,30 +5726,22 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    /* Copy.Max.Tx.Power Params to WDI structure */
    vos_mem_copy(wdiSetMaxTxPowerParams->wdiMaxTxPowerInfo.macBSSId,
                  MaxTxPowerParams->bssId, 
                  sizeof(tSirMacAddr));
-
    vos_mem_copy(wdiSetMaxTxPowerParams->wdiMaxTxPowerInfo.macSelfStaMacAddr,
                  MaxTxPowerParams->selfStaMacAddr, 
                  sizeof(tSirMacAddr));
-
    wdiSetMaxTxPowerParams->wdiMaxTxPowerInfo.ucPower = 
                                               MaxTxPowerParams->power;
-
    wdiSetMaxTxPowerParams->wdiReqStatusCB = NULL ;
-
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = (void *)MaxTxPowerParams ;
-
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiSetMaxTxPowerParams ;
-
    status = WDI_SetMaxTxPowerReq(wdiSetMaxTxPowerParams,
                        (WDA_SetMaxTxPowerRspCb)WDA_SetMaxTxPowerCallBack, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6551,11 +5752,8 @@
    return CONVERT_WDI2VOS_STATUS(status);
    
 }
-
 #endif
-
 #ifdef WLAN_FEATURE_P2P
-
 /*
  * FUNCTION: WDA_SetP2PGONOAReqParamsCallback
  *  Free the memory. No need to send any response to PE in this case
@@ -6563,24 +5761,19 @@
 void WDA_SetP2PGONOAReqParamsCallback(WDI_Status status, void* pUserData)
 {
    tWDA_CbContext *pWDA = (tWDA_CbContext *)pUserData ; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    vos_mem_free(pWDA->wdaWdiApiMsgParam) ;
    pWDA->wdaWdiApiMsgParam = NULL;
    vos_mem_free(pWDA->wdaMsgParam) ;
    pWDA->wdaMsgParam = NULL;
-
    /* 
     * No respone required for SIR_HAL_SET_P2P_GO_NOA_REQ 
     * so just free the request param here
     */
-
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessSetP2PGONOAReq
  * Request to WDI to set the P2P Group Owner Notice of Absence Req 
@@ -6592,10 +5785,8 @@
    WDI_SetP2PGONOAReqParamsType *wdiSetP2PGONOAReqParam = 
                 (WDI_SetP2PGONOAReqParamsType *)vos_mem_malloc(
                                    sizeof(WDI_SetP2PGONOAReqParamsType)) ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiSetP2PGONOAReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6603,7 +5794,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiSetP2PGONOAReqParam->wdiP2PGONOAInfo.ucOpp_ps = 
                                     pP2pPsConfigParams->opp_ps;
    wdiSetP2PGONOAReqParam->wdiP2PGONOAInfo.uCtWindow = 
@@ -6618,7 +5808,6 @@
                                     pP2pPsConfigParams->single_noa_duration;
    wdiSetP2PGONOAReqParam->wdiP2PGONOAInfo.ucPsSelection = 
                                     pP2pPsConfigParams->psSelection;
-
    if((NULL != pWDA->wdaMsgParam) ||
                              (NULL != pWDA->wdaWdiApiMsgParam))
    {
@@ -6628,17 +5817,13 @@
       vos_mem_free(wdiSetP2PGONOAReqParam);
       return VOS_STATUS_E_FAILURE;
    }
-
    wdiSetP2PGONOAReqParam->wdiReqStatusCB = NULL ;
    /* Store msg pointer from PE, as this will be used for response */
    pWDA->wdaMsgParam = (void *)pP2pPsConfigParams ;
-
    /* store Params pass it to WDI */
    pWDA->wdaWdiApiMsgParam = (void *)wdiSetP2PGONOAReqParam ;
-
    status = WDI_SetP2PGONOAReq(wdiSetP2PGONOAReqParam, 
        (WDI_SetP2PGONOAReqParamsRspCb)WDA_SetP2PGONOAReqParamsCallback, pWDA);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6648,13 +5833,10 @@
       pWDA->wdaWdiApiMsgParam = NULL;
       pWDA->wdaMsgParam = NULL;
    }
-
    return CONVERT_WDI2VOS_STATUS(status);
 
-
 }
 #endif
-
 #ifdef WLAN_FEATURE_VOWIFI_11R
 /*
  * FUNCTION: WDA_AggrAddTSReqCallback
@@ -6666,10 +5848,8 @@
    tAggrAddTsParams *pAggrAddTsReqParams = 
                            (tAggrAddTsParams *)pWDA->wdaMsgParam ;
    int i;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    vos_mem_free(pWDA->wdaWdiApiMsgParam) ;
    pWDA->wdaWdiApiMsgParam = NULL;
    pWDA->wdaMsgParam = NULL;
@@ -6678,12 +5858,9 @@
    {
       pAggrAddTsReqParams->status[i] = CONVERT_WDI2SIR_STATUS(status) ;
    }
-
    WDA_SendMsg(pWDA, WDA_AGGR_QOS_RSP, (void *)pAggrAddTsReqParams , 0) ;
-
    return ;
 }/* WLAN_FEATURE_VOWIFI_11R */
-
 /*
  * FUNCTION: WDA_ProcessAddTSReq
  * Request to WDI to send an update with AGGREGATED ADD TS REQ params.
@@ -6694,7 +5871,6 @@
    WDI_Status status = WDI_STATUS_SUCCESS ;
    int i;
    WDI_AggrAddTSReqParamsType *wdiAggrAddTSReqParam;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
    if((NULL != pWDA->wdaMsgParam) || (NULL != pWDA->wdaWdiApiMsgParam))
@@ -6714,17 +5890,14 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiAggrAddTSReqParam->wdiAggrTsInfo.ucSTAIdx = pAggrAddTsReqParams->staIdx;
    wdiAggrAddTSReqParam->wdiAggrTsInfo.ucTspecIdx = 
       pAggrAddTsReqParams->tspecIdx;
-
    for( i = 0; i < WDI_MAX_NO_AC; i++ )
    {
       wdiAggrAddTSReqParam->wdiAggrTsInfo.wdiTspecIE[i].ucType = pAggrAddTsReqParams->tspec[i].type;
       wdiAggrAddTSReqParam->wdiAggrTsInfo.wdiTspecIE[i].ucLength = 
                                                    pAggrAddTsReqParams->tspec[i].length;
-
       wdiAggrAddTSReqParam->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiTraffic.ackPolicy =
                               pAggrAddTsReqParams->tspec[i].tsinfo.traffic.ackPolicy;
       wdiAggrAddTSReqParam->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiTraffic.userPrio =
@@ -6741,10 +5914,8 @@
                               pAggrAddTsReqParams->tspec[i].tsinfo.traffic.tsid;
       wdiAggrAddTSReqParam->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiTraffic.trafficType =
                               pAggrAddTsReqParams->tspec[i].tsinfo.traffic.trafficType;
-
       wdiAggrAddTSReqParam->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiSchedule.schedule = 
                               pAggrAddTsReqParams->tspec[i].tsinfo.schedule.schedule;
-
       wdiAggrAddTSReqParam->wdiAggrTsInfo.wdiTspecIE[i].usNomMsduSz = 
                               pAggrAddTsReqParams->tspec[i].nomMsduSz;
       wdiAggrAddTSReqParam->wdiAggrTsInfo.wdiTspecIE[i].usMaxMsduSz = 
@@ -6788,13 +5959,10 @@
    
    /* Store ADD TS pointer, as this will be used for response */
    pWDA->wdaMsgParam = (void *)pAggrAddTsReqParams ;
-
    /* store Params pass it to WDI */
    pWDA->wdaWdiApiMsgParam = (void *)wdiAggrAddTSReqParam ;
-
    status = WDI_AggrAddTSReq(wdiAggrAddTSReqParam, 
                              (WDI_AggrAddTsRspCb)WDA_AggrAddTSReqCallback, pWDA);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6804,11 +5972,9 @@
       pWDA->wdaWdiApiMsgParam = NULL;
       pWDA->wdaMsgParam = NULL;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
 #endif
-
 /*
  * FUNCTION: WDA_EnterImpsReqCallback
  * send Enter IMPS RSP back to PE
@@ -6816,15 +5982,11 @@
 void WDA_EnterImpsReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_CbContext *pWDA = (tWDA_CbContext *)pUserData ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    WDA_SendMsg(pWDA, WDA_ENTER_IMPS_RSP, NULL , CONVERT_WDI2SIR_STATUS(status)) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessEnterImpsReq
  * Request to WDI to Enter IMPS power state.
@@ -6832,12 +5994,9 @@
 VOS_STATUS WDA_ProcessEnterImpsReq(tWDA_CbContext *pWDA)
 {
    WDI_Status status = WDI_STATUS_SUCCESS ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    status = WDI_EnterImpsReq((WDI_EnterImpsRspCb)WDA_EnterImpsReqCallback, pWDA);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6845,10 +6004,8 @@
       pWDA->wdaWdiApiMsgParam = NULL;
       pWDA->wdaMsgParam = NULL;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_ExitImpsReqCallback
  * send Exit IMPS RSP back to PE
@@ -6856,15 +6013,11 @@
 void WDA_ExitImpsReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_CbContext *pWDA = (tWDA_CbContext *)pUserData ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    WDA_SendMsg(pWDA, WDA_EXIT_IMPS_RSP, NULL , CONVERT_WDI2SIR_STATUS(status)) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessExitImpsReq
  * Request to WDI to Exit IMPS power state.
@@ -6872,12 +6025,9 @@
 VOS_STATUS WDA_ProcessExitImpsReq(tWDA_CbContext *pWDA)
 {
    WDI_Status status = WDI_STATUS_SUCCESS ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    status = WDI_ExitImpsReq((WDI_ExitImpsRspCb)WDA_ExitImpsReqCallback, pWDA);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6885,10 +6035,8 @@
       pWDA->wdaWdiApiMsgParam = NULL;
       pWDA->wdaMsgParam = NULL;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_EnterBmpsReqCallback
  * send Enter BMPS RSP back to PE
@@ -6899,7 +6047,6 @@
    tWDA_CbContext *pWDA;
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6907,16 +6054,12 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext ;
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    WDA_SendMsg(pWDA, WDA_ENTER_BMPS_RSP, NULL , CONVERT_WDI2SIR_STATUS(status)) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessEnterBmpsReq
  * Request to WDI to Enter BMPS power state.
@@ -6927,10 +6070,8 @@
    WDI_Status status = WDI_STATUS_SUCCESS;
    WDI_EnterBmpsReqParamsType *wdiEnterBmpsReqParams;
    tWDA_ReqParams *pWdaParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if ((NULL == pWDA) || (NULL == pEnterBmpsReqParams))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6938,7 +6079,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    wdiEnterBmpsReqParams = vos_mem_malloc(sizeof(WDI_EnterBmpsReqParamsType));
    if (NULL == wdiEnterBmpsReqParams)
    {
@@ -6947,7 +6087,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams));
    if (NULL == pWdaParams)
    {
@@ -6957,30 +6096,24 @@
       vos_mem_free(wdiEnterBmpsReqParams);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiEnterBmpsReqParams->wdiEnterBmpsInfo.ucBssIdx = pEnterBmpsReqParams->bssIdx;
    wdiEnterBmpsReqParams->wdiEnterBmpsInfo.ucDtimCount = pEnterBmpsReqParams->dtimCount;
    wdiEnterBmpsReqParams->wdiEnterBmpsInfo.ucDtimPeriod = pEnterBmpsReqParams->dtimPeriod;
    wdiEnterBmpsReqParams->wdiEnterBmpsInfo.uTbtt = pEnterBmpsReqParams->tbtt;
-
    // For CCX and 11R Roaming
    wdiEnterBmpsReqParams->wdiEnterBmpsInfo.rssiFilterPeriod = (wpt_uint32)pEnterBmpsReqParams->rssiFilterPeriod;
    wdiEnterBmpsReqParams->wdiEnterBmpsInfo.numBeaconPerRssiAverage = (wpt_uint32)pEnterBmpsReqParams->numBeaconPerRssiAverage;
    wdiEnterBmpsReqParams->wdiEnterBmpsInfo.bRssiFilterEnable = (wpt_uint8)pEnterBmpsReqParams->bRssiFilterEnable;
    wdiEnterBmpsReqParams->wdiReqStatusCB = NULL;
-
    // we are done with the input
    vos_mem_free(pEnterBmpsReqParams);
-
    /* Store param pointer as passed in by caller */
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = wdiEnterBmpsReqParams;
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = NULL;
-
    status = WDI_EnterBmpsReq(wdiEnterBmpsReqParams,
                     (WDI_EnterBmpsRspCb)WDA_EnterBmpsReqCallback, pWdaParams);
-
    if (IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -6988,10 +6121,8 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams);
    }
-
    return CONVERT_WDI2VOS_STATUS(status);
 }
-
 /*
  * FUNCTION: WDA_ExitBmpsReqCallback
  * send Exit BMPS RSP back to PE
@@ -7001,10 +6132,8 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
    tWDA_CbContext *pWDA;
    tExitBmpsParams *pExitBmpsReqParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7012,22 +6141,16 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext ;
    pExitBmpsReqParams = (tExitBmpsParams *)pWdaParams->wdaMsgParam ;
 
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
 
-
    pExitBmpsReqParams->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    WDA_SendMsg(pWDA, WDA_EXIT_BMPS_RSP, (void *)pExitBmpsReqParams , 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessExitBmpsReq
  * Request to WDI to Exit BMPS power state.
@@ -7040,10 +6163,8 @@
       (WDI_ExitBmpsReqParamsType *)vos_mem_malloc(
          sizeof(WDI_ExitBmpsReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiExitBmpsReqParams) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7060,9 +6181,10 @@
       vos_mem_free(wdiExitBmpsReqParams);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiExitBmpsReqParams->wdiExitBmpsInfo.ucSendDataNull = pExitBmpsReqParams->sendDataNull;
-      
+
+   wdiExitBmpsReqParams->wdiExitBmpsInfo.bssIdx = pExitBmpsReqParams->bssIdx;
+
    wdiExitBmpsReqParams->wdiReqStatusCB = NULL;
       
    /* Store param pointer as passed in by caller */
@@ -7070,10 +6192,8 @@
    pWdaParams->wdaWdiApiMsgParam = wdiExitBmpsReqParams;
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pExitBmpsReqParams;
-
    status = WDI_ExitBmpsReq(wdiExitBmpsReqParams,
                              (WDI_ExitBmpsRspCb)WDA_ExitBmpsReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7082,10 +6202,8 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_EnterUapsdReqCallback
  * send Enter UAPSD RSP back to PE
@@ -7095,10 +6213,8 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
    tWDA_CbContext *pWDA;
    tUapsdParams *pEnterUapsdReqParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7106,21 +6222,14 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext ;
-
    pEnterUapsdReqParams = (tUapsdParams *)pWdaParams->wdaMsgParam ;
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    pEnterUapsdReqParams->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    WDA_SendMsg(pWDA, WDA_ENTER_UAPSD_RSP, (void *)pEnterUapsdReqParams , 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessEnterUapsdReq
  * Request to WDI to Enter UAPSD power state.
@@ -7133,10 +6242,8 @@
       (WDI_EnterUapsdReqParamsType *)vos_mem_malloc(
          sizeof(WDI_EnterUapsdReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiEnterUapsdReqParams) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7153,7 +6260,6 @@
       vos_mem_free(wdiEnterUapsdReqParams);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiEnterUapsdReqParams->wdiEnterUapsdInfo.ucBeDeliveryEnabled = 
       pEnterUapsdReqParams->beDeliveryEnabled;
    wdiEnterUapsdReqParams->wdiEnterUapsdInfo.ucBeTriggerEnabled = 
@@ -7170,19 +6276,17 @@
       pEnterUapsdReqParams->voDeliveryEnabled;
    wdiEnterUapsdReqParams->wdiEnterUapsdInfo.ucVoTriggerEnabled = 
       pEnterUapsdReqParams->voTriggerEnabled;
+   wdiEnterUapsdReqParams->wdiEnterUapsdInfo.bssIdx = pEnterUapsdReqParams->bssIdx;
 
    wdiEnterUapsdReqParams->wdiReqStatusCB = NULL; 
 
-
    /* Store param pointer as passed in by caller */
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = wdiEnterUapsdReqParams;
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pEnterUapsdReqParams;
-
    status = WDI_EnterUapsdReq(wdiEnterUapsdReqParams,
                               (WDI_EnterUapsdRspCb)WDA_EnterUapsdReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7191,10 +6295,8 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_ExitUapsdReqCallback
  * send Exit UAPSD RSP back to PE
@@ -7202,15 +6304,11 @@
 void WDA_ExitUapsdReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_CbContext *pWDA = (tWDA_CbContext *)pUserData ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    WDA_SendMsg(pWDA, WDA_EXIT_UAPSD_RSP, NULL , CONVERT_WDI2SIR_STATUS(status)) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessExitUapsdReq
  * Request to WDI to Exit UAPSD power state.
@@ -7218,12 +6316,9 @@
 VOS_STATUS WDA_ProcessExitUapsdReq(tWDA_CbContext *pWDA)
 {
    WDI_Status status = WDI_STATUS_SUCCESS ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    status = WDI_ExitUapsdReq((WDI_ExitUapsdRspCb)WDA_ExitUapsdReqCallback, pWDA);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7231,11 +6326,9 @@
       pWDA->wdaWdiApiMsgParam = NULL;
       pWDA->wdaMsgParam = NULL;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
 
-
 /*
  * FUNCTION: WDA_SetPwrSaveCfgReqCallback
  * 
@@ -7243,10 +6336,8 @@
 void WDA_SetPwrSaveCfgReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7254,7 +6345,6 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    if( pWdaParams != NULL )
    {
       if( pWdaParams->wdaWdiApiMsgParam != NULL )
@@ -7267,10 +6357,8 @@
       }
       vos_mem_free(pWdaParams) ;
    }
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessSetPwrSaveCfgReq
  * Request to WDI to set the power save params at start.
@@ -7286,24 +6374,23 @@
    tANI_U32       *configDataValue;
    WDI_UpdateCfgReqParamsType *wdiPowerSaveCfg;
    tWDA_ReqParams *pWdaParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if ((NULL == pWDA) || (NULL == pPowerSaveCfg))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                            "%s: invalid param", __FUNCTION__);
       VOS_ASSERT(0);
+	  vos_mem_free(pPowerSaveCfg);
       return VOS_STATUS_E_FAILURE;
    }
-
    wdiPowerSaveCfg = vos_mem_malloc(sizeof(WDI_UpdateCfgReqParamsType));
    if (NULL == wdiPowerSaveCfg)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                            "%s: VOS MEM Alloc Failure", __FUNCTION__);
       VOS_ASSERT(0);
+	  vos_mem_free(pPowerSaveCfg);
       return VOS_STATUS_E_NOMEM;
    }
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
@@ -7313,90 +6400,74 @@
                            "%s: VOS MEM Alloc Failure", __FUNCTION__); 
       VOS_ASSERT(0);
       vos_mem_free(wdiPowerSaveCfg);
+	  vos_mem_free(pPowerSaveCfg);
       return VOS_STATUS_E_NOMEM;
    }
-
    configParamSize = (sizeof(tHalCfg) + (sizeof(tANI_U32))) * WDA_NUM_PWR_SAVE_CFG;
    configParam = vos_mem_malloc(configParamSize);
-
    if(NULL == configParam)
    {
       VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                 "%s: VOS MEM Alloc Failure \n", __FUNCTION__);
+	  VOS_ASSERT(0);
       vos_mem_free(pWdaParams);
       vos_mem_free(wdiPowerSaveCfg);
-      VOS_ASSERT(0);
+	  vos_mem_free(pPowerSaveCfg);
       return VOS_STATUS_E_NOMEM;
    }
-
    vos_mem_set(configParam, configParamSize, 0);
    wdiPowerSaveCfg->pConfigBuffer = configParam;
    tlvStruct = (tHalCfg *)configParam;
    tlvStructStart = (tANI_U8 *)configParam;
-
    /* QWLAN_HAL_CFG_PS_BROADCAST_FRAME_FILTER_ENABLE */
    tlvStruct->type = QWLAN_HAL_CFG_PS_BROADCAST_FRAME_FILTER_ENABLE;
    tlvStruct->length = sizeof(tANI_U32);
    configDataValue = (tANI_U32 *)(tlvStruct + 1);
    *configDataValue = (tANI_U32)pPowerSaveCfg->broadcastFrameFilter;
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_PS_HEART_BEAT_THRESHOLD */
    tlvStruct->type = QWLAN_HAL_CFG_PS_HEART_BEAT_THRESHOLD;
    tlvStruct->length = sizeof(tANI_U32);
    configDataValue = (tANI_U32 *)(tlvStruct + 1);
    *configDataValue = (tANI_U32)pPowerSaveCfg->HeartBeatCount;
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_PS_IGNORE_DTIM */
    tlvStruct->type = QWLAN_HAL_CFG_PS_IGNORE_DTIM;
    tlvStruct->length = sizeof(tANI_U32);
    configDataValue = (tANI_U32 *)(tlvStruct + 1);
    *configDataValue = (tANI_U32)pPowerSaveCfg->ignoreDtim;
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_PS_LISTEN_INTERVAL */
    tlvStruct->type = QWLAN_HAL_CFG_PS_LISTEN_INTERVAL;
    tlvStruct->length = sizeof(tANI_U32);
    configDataValue = (tANI_U32 *)(tlvStruct + 1);
    *configDataValue = (tANI_U32)pPowerSaveCfg->listenInterval;
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_PS_MAX_PS_POLL */
    tlvStruct->type = QWLAN_HAL_CFG_PS_MAX_PS_POLL;
    tlvStruct->length = sizeof(tANI_U32);
    configDataValue = (tANI_U32 *)(tlvStruct + 1);
    *configDataValue = (tANI_U32)pPowerSaveCfg->maxPsPoll;
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_PS_MIN_RSSI_THRESHOLD */
    tlvStruct->type = QWLAN_HAL_CFG_PS_MIN_RSSI_THRESHOLD;
    tlvStruct->length = sizeof(tANI_U32);
    configDataValue = (tANI_U32 *)(tlvStruct + 1);
    *configDataValue = (tANI_U32)pPowerSaveCfg->minRssiThreshold;
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_PS_NTH_BEACON_FILTER */
    tlvStruct->type = QWLAN_HAL_CFG_PS_NTH_BEACON_FILTER;
    tlvStruct->length = sizeof(tANI_U32);
    configDataValue = (tANI_U32 *)(tlvStruct + 1);
    *configDataValue = (tANI_U32)pPowerSaveCfg->nthBeaconFilter;
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_PS_ENABLE_BCN_EARLY_TERM */
    tlvStruct->type = QWLAN_HAL_CFG_PS_ENABLE_BCN_EARLY_TERM;
    tlvStruct->length = sizeof(tANI_U32);
@@ -7404,7 +6475,6 @@
    *configDataValue = (tANI_U32)pPowerSaveCfg->fEnableBeaconEarlyTermination;
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_BCN_EARLY_TERM_WAKEUP_INTERVAL */
    tlvStruct->type = QWLAN_HAL_CFG_BCN_EARLY_TERM_WAKEUP_INTERVAL;
    tlvStruct->length = sizeof(tANI_U32);
@@ -7412,37 +6482,28 @@
    *configDataValue = (tANI_U32)pPowerSaveCfg->bcnEarlyTermWakeInterval;
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_NUM_BEACON_PER_RSSI_AVERAGE */
    tlvStruct->type = QWLAN_HAL_CFG_NUM_BEACON_PER_RSSI_AVERAGE;
    tlvStruct->length = sizeof(tANI_U32);
    configDataValue = (tANI_U32 *)(tlvStruct + 1);
    *configDataValue = (tANI_U32)pPowerSaveCfg->numBeaconPerRssiAverage;
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    /* QWLAN_HAL_CFG_PS_RSSI_FILTER_PERIOD */
    tlvStruct->type = QWLAN_HAL_CFG_PS_RSSI_FILTER_PERIOD;
    tlvStruct->length = sizeof(tANI_U32);
    configDataValue = (tANI_U32 *)(tlvStruct + 1);
    *configDataValue = (tANI_U32)pPowerSaveCfg->rssiFilterPeriod;
-
    tlvStruct = (tHalCfg *)(( (tANI_U8 *) tlvStruct 
                             + sizeof(tHalCfg) + tlvStruct->length)) ; 
-
    wdiPowerSaveCfg->uConfigBufferLen = (tANI_U8 *)tlvStruct - tlvStructStart ;
-
    wdiPowerSaveCfg->wdiReqStatusCB = NULL;
-
    /* store Params pass it to WDI */
    pWdaParams->wdaMsgParam = configParam;
    pWdaParams->wdaWdiApiMsgParam = wdiPowerSaveCfg;
    pWdaParams->pWdaContext = pWDA;
-
    status = WDI_SetPwrSaveCfgReq(wdiPowerSaveCfg, 
                                  (WDI_SetPwrSaveCfgCb)WDA_SetPwrSaveCfgReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7451,12 +6512,9 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams);
    }
-
    vos_mem_free(pPowerSaveCfg);
-
    return CONVERT_WDI2VOS_STATUS(status);
 }
-
 /*
  * FUNCTION: WDA_SetUapsdAcParamsReqCallback
  * 
@@ -7464,17 +6522,13 @@
 void WDA_SetUapsdAcParamsReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData ; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    vos_mem_free(pWdaParams);
 
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_SetUapsdAcParamsReq
  * Request to WDI to set the UAPSD params for an ac (sta mode).
@@ -7488,10 +6542,8 @@
       (WDI_SetUapsdAcParamsReqParamsType *)vos_mem_malloc(
          sizeof(WDI_SetUapsdAcParamsReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiUapsdParams) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7508,28 +6560,22 @@
       vos_mem_free(wdiUapsdParams);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiUapsdParams->wdiUapsdInfo.ucAc = pUapsdInfo->ac;
    wdiUapsdParams->wdiUapsdInfo.uDelayInterval = pUapsdInfo->delayInterval;
    wdiUapsdParams->wdiUapsdInfo.uSrvInterval = pUapsdInfo->srvInterval;
    wdiUapsdParams->wdiUapsdInfo.ucSTAIdx = pUapsdInfo->staidx;
    wdiUapsdParams->wdiUapsdInfo.uSusInterval = pUapsdInfo->susInterval;
    wdiUapsdParams->wdiUapsdInfo.ucUp = pUapsdInfo->up;
-
    wdiUapsdParams->wdiReqStatusCB = NULL;
-
    pWDA = vos_get_context( VOS_MODULE_ID_WDA, pVosContext );
-
    pWdaParams->pWdaContext = pWDA;
    /* Store param pointer as passed in by caller */
    pWdaParams->wdaMsgParam = pUapsdInfo;
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiUapsdParams;
-
    status = WDI_SetUapsdAcParamsReq(wdiUapsdParams, 
               (WDI_SetUapsdAcParamsCb)WDA_SetUapsdAcParamsReqCallback,
               pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7537,14 +6583,11 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
       vos_mem_free(pWdaParams);
    }
-
    if((WDI_STATUS_SUCCESS == status) || (WDI_STATUS_PENDING == status))
      return VOS_STATUS_SUCCESS;
    else
      return VOS_STATUS_E_FAILURE;
 
-
-
 }
 /* 
  * FUNCTION: WDA_ClearUapsdAcParamsReq 
@@ -7559,7 +6602,6 @@
    /* do nothing */
    return VOS_STATUS_SUCCESS;
 }
-
 /*
  * FUNCTION: WDA_UpdateUapsdParamsReqCallback
  * 
@@ -7567,22 +6609,17 @@
 void WDA_UpdateUapsdParamsReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_CbContext *pWDA = (tWDA_CbContext *)pUserData ; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    vos_mem_free(pWDA->wdaWdiApiMsgParam) ;
    pWDA->wdaWdiApiMsgParam = NULL;
    pWDA->wdaMsgParam = NULL;
 
-
    //print a msg, nothing else to do
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
            "WDA_UpdateUapsdParamsReqCallback invoked " );
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_UpdateUapsdParamsReq
  * Request to WDI to update UAPSD params (in softAP mode) for a station.
@@ -7595,10 +6632,8 @@
    WDI_UpdateUapsdReqParamsType *wdiUpdateUapsdParams = 
       (WDI_UpdateUapsdReqParamsType *)vos_mem_malloc(
          sizeof(WDI_UpdateUapsdReqParamsType)) ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiUpdateUapsdParams) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7606,11 +6641,9 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiUpdateUapsdParams->wdiUpdateUapsdInfo.uMaxSpLen = pUpdateUapsdInfo->maxSpLen;
    wdiUpdateUapsdParams->wdiUpdateUapsdInfo.ucSTAIdx = pUpdateUapsdInfo->staIdx;
    wdiUpdateUapsdParams->wdiUpdateUapsdInfo.ucUapsdACMask = pUpdateUapsdInfo->uapsdACMask;
-
    if((NULL != pWDA->wdaMsgParam) ||
                   (NULL != pWDA->wdaWdiApiMsgParam))
    {
@@ -7620,12 +6653,10 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    /* Store param pointer as passed in by caller */
    pWDA->wdaMsgParam = pUpdateUapsdInfo;
    /* store Params pass it to WDI */
    pWDA->wdaWdiApiMsgParam = (void *)wdiUpdateUapsdParams;
-
    wstatus = WDI_UpdateUapsdParamsReq(wdiUpdateUapsdParams, 
                                       (WDI_UpdateUapsdParamsCb)WDA_UpdateUapsdParamsReqCallback, pWDA);
 
@@ -7639,10 +6670,8 @@
       pWDA->wdaWdiApiMsgParam = NULL;
       pWDA->wdaMsgParam = NULL;
    }
-
    return status;
 }
-
 /*
  * FUNCTION: WDA_ConfigureRxpFilterCallback
  * 
@@ -7650,16 +6679,13 @@
 void WDA_ConfigureRxpFilterCallback(WDI_Status   wdiStatus, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData ; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(WDI_STATUS_SUCCESS != wdiStatus)
    {
       VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                   "%s: RXP config filter failure \n", __FUNCTION__ );
    }
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7667,13 +6693,11 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    vos_mem_free(pWdaParams->wdaMsgParam);
    vos_mem_free(pWdaParams);
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessConfigureRxpFilterReq
  * 
@@ -7687,10 +6711,8 @@
       (WDI_ConfigureRxpFilterReqParamsType *)vos_mem_malloc(
          sizeof(WDI_ConfigureRxpFilterReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiRxpFilterParams) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7709,22 +6731,18 @@
       vos_mem_free(pWlanSuspendParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiRxpFilterParams->wdiRxpFilterParam.ucSetMcstBcstFilter = 
              pWlanSuspendParam->setMcstBcstFilter;
    wdiRxpFilterParams->wdiRxpFilterParam.ucSetMcstBcstFilterSetting = 
              pWlanSuspendParam->configuredMcstBcstFilterSetting;
    
    wdiRxpFilterParams->wdiReqStatusCB = NULL;
-
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pWlanSuspendParam;
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiRxpFilterParams;
-
    wstatus = WDI_ConfigureRxpFilterReq(wdiRxpFilterParams, 
                       (WDI_ConfigureRxpFilterCb)WDA_ConfigureRxpFilterCallback,
                       pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(wstatus))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7734,10 +6752,8 @@
       vos_mem_free(pWdaParams->wdaMsgParam);
       vos_mem_free(pWdaParams);
    }
-
    return status;
 }
-
 /*
  * FUNCTION: WDA_WdiIndicationCallback
  * 
@@ -7747,9 +6763,7 @@
 {
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
 }
-
 /*
  * FUNCTION: WDA_ProcessWlanSuspendInd
  * 
@@ -7759,37 +6773,28 @@
 {
    WDI_Status wdiStatus;
    WDI_SuspendParamsType wdiSuspendParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    wdiSuspendParams.wdiSuspendParams.ucConfiguredMcstBcstFilterSetting =
                           pWlanSuspendParam->configuredMcstBcstFilterSetting;
    wdiSuspendParams.wdiReqStatusCB = WDA_WdiIndicationCallback;
    wdiSuspendParams.pUserData = pWDA;
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO, "%s: %d" ,__FUNCTION__, pWlanSuspendParam->configuredMcstBcstFilterSetting);
-
-   WDA_STOP_TIMER(&pWDA->wdaTimers.baActivityChkTmr);
-
    wdiStatus = WDI_HostSuspendInd(&wdiSuspendParams);
    if(WDI_STATUS_PENDING == wdiStatus)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
               "Pending received for %s:%d ",__FUNCTION__,__LINE__ );
-
    }
    else if( WDI_STATUS_SUCCESS_SYNC != wdiStatus )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
               "Failure in %s:%d ",__FUNCTION__,__LINE__ );
    }
-
    vos_mem_free(pWlanSuspendParam);
    return CONVERT_WDI2VOS_STATUS(wdiStatus) ;
 }
 
-
-
 /*
  * FUNCTION: WDA_ProcessWlanResumeCallback
  * 
@@ -7799,7 +6804,6 @@
                         void*        pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
    if(NULL == pWdaParams)
@@ -7809,20 +6813,16 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    if(WDI_STATUS_SUCCESS != resumeRspParams->wdiStatus)
    {
       VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                   "%s: Process Wlan Resume failure \n", __FUNCTION__ );
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    vos_mem_free(pWdaParams->wdaMsgParam);
    vos_mem_free(pWdaParams);
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessWlanResumeReq
  * 
@@ -7835,10 +6835,8 @@
             (WDI_ResumeParamsType *)vos_mem_malloc(
                                  sizeof(WDI_ResumeParamsType) ) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiResumeParams) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7855,22 +6853,16 @@
       vos_mem_free(wdiResumeParams);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiResumeParams->wdiResumeParams.ucConfiguredMcstBcstFilterSetting =
                           pWlanResumeParam->configuredMcstBcstFilterSetting;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO, "%s: %d" ,__FUNCTION__, pWlanResumeParam->configuredMcstBcstFilterSetting);
    wdiResumeParams->wdiReqStatusCB = NULL;
    pWdaParams->wdaMsgParam = pWlanResumeParam;
    pWdaParams->wdaWdiApiMsgParam = wdiResumeParams;
    pWdaParams->pWdaContext = pWDA;
-
-   WDA_START_TIMER(&pWDA->wdaTimers.baActivityChkTmr) ;
-
    wdiStatus = WDI_HostResumeReq(wdiResumeParams, 
                       (WDI_HostResumeEventRspCb)WDA_ProcessWlanResumeCallback,
                       pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(wdiStatus))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7880,12 +6872,9 @@
       vos_mem_free(pWdaParams->wdaMsgParam);
       vos_mem_free(pWdaParams);
    }
-
    return CONVERT_WDI2VOS_STATUS(wdiStatus) ;
 }
 
-
-
 /*
  * FUNCTION: WDA_SetBeaconFilterReqCallback
  * 
@@ -7893,10 +6882,8 @@
 void WDA_SetBeaconFilterReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7913,10 +6900,8 @@
     * param here
     */
 
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_SetBeaconFilterReq
  * Request to WDI to send the beacon filtering related information.
@@ -7931,10 +6916,8 @@
             (WDI_BeaconFilterReqParamsType *)vos_mem_malloc(
                                  sizeof(WDI_BeaconFilterReqParamsType) ) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiBeaconFilterInfo) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7951,7 +6934,6 @@
       vos_mem_free(wdiBeaconFilterInfo);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiBeaconFilterInfo->wdiBeaconFilterInfo.usBeaconInterval = 
       pBeaconFilterInfo->beaconInterval;
    wdiBeaconFilterInfo->wdiBeaconFilterInfo.usCapabilityInfo = 
@@ -7959,7 +6941,6 @@
    wdiBeaconFilterInfo->wdiBeaconFilterInfo.usCapabilityMask = 
       pBeaconFilterInfo->capabilityMask;
    wdiBeaconFilterInfo->wdiBeaconFilterInfo.usIeNum = pBeaconFilterInfo->ieNum;
-
    //Fill structure with info contained in the beaconFilterTable
    dstPtr = (tANI_U8 *)wdiBeaconFilterInfo + sizeof(WDI_BeaconFilterInfoType);
    srcPtr = (tANI_U8 *)pBeaconFilterInfo + sizeof(tBeaconFilterMsg);
@@ -7969,7 +6950,6 @@
       filterLength = WDI_BEACON_FILTER_LEN;
    }
    vos_mem_copy(dstPtr, srcPtr, filterLength);
-
    wdiBeaconFilterInfo->wdiReqStatusCB = NULL;
    /* Store param pointer as passed in by caller */
    /* store Params pass it to WDI */
@@ -7977,10 +6957,8 @@
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pBeaconFilterInfo;
 
-
    status = WDI_SetBeaconFilterReq(wdiBeaconFilterInfo, 
                                    (WDI_SetBeaconFilterCb)WDA_SetBeaconFilterReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -7989,10 +6967,8 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_RemBeaconFilterReqCallback
  * 
@@ -8000,27 +6976,21 @@
 void WDA_RemBeaconFilterReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_CbContext *pWDA = (tWDA_CbContext *)pUserData ; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    vos_mem_free(pWDA->wdaWdiApiMsgParam) ;
    pWDA->wdaWdiApiMsgParam = NULL;
    pWDA->wdaMsgParam = NULL;
    
-
    //print a msg, nothing else to do
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
               "WDA_RemBeaconFilterReqCallback invoked " );
-
    return ;
 }
-
     // TODO: PE does not have this feature for now implemented,
     // but the support for removing beacon filter exists between
     // HAL and FW. This function can be called whenever PE defines
     // a new message for beacon filter removal
-
 /*
  * FUNCTION: WDA_RemBeaconFilterReq
  * Request to WDI to send the removal of beacon filtering related information.
@@ -8033,10 +7003,8 @@
    WDI_RemBeaconFilterReqParamsType *wdiBeaconFilterInfo = 
       (WDI_RemBeaconFilterReqParamsType *)vos_mem_malloc(
          sizeof(WDI_RemBeaconFilterReqParamsType) + pBeaconFilterInfo->ucIeCount) ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiBeaconFilterInfo) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8044,16 +7012,13 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiBeaconFilterInfo->wdiBeaconFilterInfo.ucIeCount = 
       pBeaconFilterInfo->ucIeCount;
-
    //Fill structure with info contained in the ucRemIeId
    vos_mem_copy(wdiBeaconFilterInfo->wdiBeaconFilterInfo.ucRemIeId, 
                 pBeaconFilterInfo->ucRemIeId,
                 wdiBeaconFilterInfo->wdiBeaconFilterInfo.ucIeCount);
    wdiBeaconFilterInfo->wdiReqStatusCB = NULL;
-
    if((NULL != pWDA->wdaMsgParam) ||
                   (NULL != pWDA->wdaWdiApiMsgParam))
    {
@@ -8068,10 +7033,8 @@
    pWDA->wdaMsgParam = pBeaconFilterInfo;
    /* store Params pass it to WDI */
    pWDA->wdaWdiApiMsgParam = (void *)wdiBeaconFilterInfo;
-
    wstatus = WDI_RemBeaconFilterReq(wdiBeaconFilterInfo, 
                                    (WDI_RemBeaconFilterCb)WDA_RemBeaconFilterReqCallback, pWDA);
-
    if(IS_WDI_STATUS_FAILURE(wstatus))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8082,10 +7045,8 @@
       pWDA->wdaWdiApiMsgParam = NULL;
       pWDA->wdaMsgParam = NULL;
    }
-
    return status;
 }
-
 /*
  * FUNCTION: WDA_SetRSSIThresholdsReqCallback
  * 
@@ -8093,10 +7054,8 @@
 void WDA_SetRSSIThresholdsReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8108,10 +7067,8 @@
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
 
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_SetRSSIThresholdsReq
  * Request to WDI to set the RSSI thresholds (sta mode).
@@ -8126,10 +7083,8 @@
       (WDI_SetRSSIThresholdsReqParamsType *)vos_mem_malloc(
          sizeof(WDI_SetRSSIThresholdsReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiRSSIThresholdsInfo) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8146,36 +7101,27 @@
       vos_mem_free(wdiRSSIThresholdsInfo);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiRSSIThresholdsInfo->wdiRSSIThresholdsInfo.bReserved10 = pBmpsThresholds->bReserved10;
-
    wdiRSSIThresholdsInfo->wdiRSSIThresholdsInfo.ucRssiThreshold1 = pBmpsThresholds->ucRssiThreshold1;
    wdiRSSIThresholdsInfo->wdiRSSIThresholdsInfo.ucRssiThreshold2 = pBmpsThresholds->ucRssiThreshold2;
    wdiRSSIThresholdsInfo->wdiRSSIThresholdsInfo.ucRssiThreshold3 = pBmpsThresholds->ucRssiThreshold3;
-
    wdiRSSIThresholdsInfo->wdiRSSIThresholdsInfo.bRssiThres1NegNotify = pBmpsThresholds->bRssiThres1NegNotify;
    wdiRSSIThresholdsInfo->wdiRSSIThresholdsInfo.bRssiThres2NegNotify = pBmpsThresholds->bRssiThres2NegNotify;
    wdiRSSIThresholdsInfo->wdiRSSIThresholdsInfo.bRssiThres3NegNotify = pBmpsThresholds->bRssiThres3NegNotify;
-
    wdiRSSIThresholdsInfo->wdiRSSIThresholdsInfo.bRssiThres1PosNotify = pBmpsThresholds->bRssiThres1PosNotify;
    wdiRSSIThresholdsInfo->wdiRSSIThresholdsInfo.bRssiThres2PosNotify = pBmpsThresholds->bRssiThres2PosNotify;
    wdiRSSIThresholdsInfo->wdiRSSIThresholdsInfo.bRssiThres3PosNotify = pBmpsThresholds->bRssiThres3PosNotify;
-
    wdiRSSIThresholdsInfo->wdiReqStatusCB = NULL;
-
    pVosContext = vos_get_global_context(VOS_MODULE_ID_PE, (void *)pMac);
    pWDA = vos_get_context( VOS_MODULE_ID_WDA, pVosContext );
 
-
    /* Store param pointer as passed in by caller */
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = wdiRSSIThresholdsInfo;
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pBmpsThresholds;
-
    wstatus = WDI_SetRSSIThresholdsReq(wdiRSSIThresholdsInfo, 
                                      (WDI_SetRSSIThresholdsCb)WDA_SetRSSIThresholdsReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(wstatus))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8184,11 +7130,9 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
    }
-
    return status;
 
 }/*WDA_SetRSSIThresholdsReq*/
-
 /*
  * FUNCTION: WDA_HostOffloadReqCallback
  * 
@@ -8199,7 +7143,6 @@
 
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8215,10 +7158,8 @@
    //print a msg, nothing else to do
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
               "WDA_HostOffloadReqCallback invoked " );
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessHostOffloadReq
  * Request to WDI to set the filter to minimize unnecessary host wakeup due 
@@ -8244,7 +7185,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if(NULL == pWdaParams)
    {
@@ -8260,6 +7200,8 @@
    wdiHostOffloadInfo->wdiHostOffloadInfo.ucEnableOrDisable = 
       pHostOffloadParams->enableOrDisable;
 
+   wdiHostOffloadInfo->wdiHostOffloadInfo.bssIdx = 
+                                    pHostOffloadParams->bssIdx;
    switch (wdiHostOffloadInfo->wdiHostOffloadInfo.ucOffloadType)
    {
       case SIR_IPV4_ARP_REPLY_OFFLOAD:
@@ -8331,9 +7273,7 @@
          //WDA_VOS_ASSERT(0) ;
       }
    }
-
    wdiHostOffloadInfo->wdiReqStatusCB = NULL;
-
    if((NULL != pWDA->wdaMsgParam) ||
                   (NULL != pWDA->wdaWdiApiMsgParam))
    {
@@ -8343,7 +7283,6 @@
       vos_mem_free(wdiHostOffloadInfo);
       return VOS_STATUS_E_FAILURE;
    }
-
    /* Store param pointer as passed in by caller */
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = wdiHostOffloadInfo;
@@ -8362,11 +7301,9 @@
       vos_mem_free(pWdaParams->wdaMsgParam);
       vos_mem_free(pWdaParams) ;
    }
-
    return status;
 
 }/*WDA_HostOffloadReq*/
-
 /*
  * FUNCTION: WDA_KeepAliveReqCallback
  * 
@@ -8374,23 +7311,18 @@
 void WDA_KeepAliveReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_CbContext *pWDA = (tWDA_CbContext *)pUserData ; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    vos_mem_free(pWDA->wdaWdiApiMsgParam);
    vos_mem_free(pWDA->wdaMsgParam);
    pWDA->wdaWdiApiMsgParam = NULL;
    pWDA->wdaMsgParam = NULL; 
    
-
    //print a msg, nothing else to do
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
               "WDA_KeepAliveReqCallback invoked " );
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessKeepAliveReq
  * Request to WDI to send Keep Alive packets to minimize unnecessary host 
@@ -8404,10 +7336,8 @@
     WDI_KeepAliveReqParamsType *wdiKeepAliveInfo = 
       (WDI_KeepAliveReqParamsType *)vos_mem_malloc(
          sizeof(WDI_KeepAliveReqParamsType)) ;
-
     VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
     if(NULL == wdiKeepAliveInfo) 
     {
         VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8415,11 +7345,12 @@
         VOS_ASSERT(0);
         return VOS_STATUS_E_NOMEM;
     }
-
     wdiKeepAliveInfo->wdiKeepAliveInfo.ucPacketType = 
       pKeepAliveParams->packetType;
     wdiKeepAliveInfo->wdiKeepAliveInfo.ucTimePeriod = 
       pKeepAliveParams->timePeriod;
+    wdiKeepAliveInfo->wdiKeepAliveInfo.bssIdx = 
+                                pKeepAliveParams->bssIdx;
 
     if(pKeepAliveParams->packetType == SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP)
     {
@@ -8445,9 +7376,7 @@
                     SIR_MAC_ADDR_LEN,
                     0);
     }
-
     wdiKeepAliveInfo->wdiReqStatusCB = NULL;
-
     if((NULL != pWDA->wdaMsgParam) ||
        (NULL != pWDA->wdaWdiApiMsgParam))
     {
@@ -8457,12 +7386,10 @@
       vos_mem_free(wdiKeepAliveInfo);
       return VOS_STATUS_E_FAILURE;
     }
-
     /* Store param pointer as passed in by caller */
     pWDA->wdaMsgParam = pKeepAliveParams;
     /* store Params pass it to WDI */
     pWDA->wdaWdiApiMsgParam = (void *)wdiKeepAliveInfo;
-
     VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,"WDA HIP : %d.%d.%d.%d",
               wdiKeepAliveInfo->wdiKeepAliveInfo.aHostIpv4Addr[0],
               wdiKeepAliveInfo->wdiKeepAliveInfo.aHostIpv4Addr[1],
@@ -8485,10 +7412,8 @@
               "TimePeriod %d PacketType %d", 
               wdiKeepAliveInfo->wdiKeepAliveInfo.ucTimePeriod,
               wdiKeepAliveInfo->wdiKeepAliveInfo.ucPacketType); 
-
     wstatus = WDI_KeepAliveReq(wdiKeepAliveInfo, 
                              (WDI_KeepAliveCb)WDA_KeepAliveReqCallback, pWDA);
-
     if(IS_WDI_STATUS_FAILURE(wstatus))
     {
         VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8499,11 +7424,9 @@
         pWDA->wdaWdiApiMsgParam = NULL;
         pWDA->wdaMsgParam = NULL;
     }
-
     return status;
 
 }/*WDA_KeepAliveReq*/
-
 /*
  * FUNCTION: WDA_WowlAddBcPtrnReqCallback
  * 
@@ -8511,10 +7434,8 @@
 void WDA_WowlAddBcPtrnReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8522,14 +7443,11 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams->wdaMsgParam);
    vos_mem_free(pWdaParams) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessWowlAddBcPtrnReq
  * Request to WDI to add WOWL Bcast pattern
@@ -8543,10 +7461,8 @@
       (WDI_WowlAddBcPtrnReqParamsType *)vos_mem_malloc(
          sizeof(WDI_WowlAddBcPtrnReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiWowlAddBcPtrnInfo) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8563,7 +7479,6 @@
       vos_mem_free(wdiWowlAddBcPtrnInfo);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiWowlAddBcPtrnInfo->wdiWowlAddBcPtrnInfo.ucPatternId = 
       pWowlAddBcPtrnParams->ucPatternId;
    wdiWowlAddBcPtrnInfo->wdiWowlAddBcPtrnInfo.ucPatternByteOffset = 
@@ -8572,7 +7487,6 @@
       pWowlAddBcPtrnParams->ucPatternMaskSize;
    wdiWowlAddBcPtrnInfo->wdiWowlAddBcPtrnInfo.ucPatternSize = 
       pWowlAddBcPtrnParams->ucPatternSize;
-
    if (wdiWowlAddBcPtrnInfo->wdiWowlAddBcPtrnInfo.ucPatternSize <= WDI_WOWL_BCAST_PATTERN_MAX_SIZE)
    {
        vos_mem_copy(wdiWowlAddBcPtrnInfo->wdiWowlAddBcPtrnInfo.ucPattern,
@@ -8600,16 +7514,13 @@
    }
 
    wdiWowlAddBcPtrnInfo->wdiReqStatusCB = NULL;
-
    /* Store param pointer as passed in by caller */
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = wdiWowlAddBcPtrnInfo;
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pWowlAddBcPtrnParams;
-
    wstatus = WDI_WowlAddBcPtrnReq(wdiWowlAddBcPtrnInfo, 
                                  (WDI_WowlAddBcPtrnCb)WDA_WowlAddBcPtrnReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(wstatus))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8619,11 +7530,9 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
    }
-
    return status;
 
 }/*WDA_ProcessWowlAddBcPtrnReq*/
-
 /*
  * FUNCTION: WDA_WowlDelBcPtrnReqCallback
  * 
@@ -8631,10 +7540,8 @@
 void WDA_WowlDelBcPtrnReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8642,14 +7549,11 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams->wdaMsgParam);
    vos_mem_free(pWdaParams) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessWowlDelBcPtrnReq
  * Request to WDI to delete WOWL Bcast pattern
@@ -8663,10 +7567,8 @@
       (WDI_WowlDelBcPtrnReqParamsType *)vos_mem_malloc(
          sizeof(WDI_WowlDelBcPtrnReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiWowlDelBcPtrnInfo) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8683,21 +7585,16 @@
       vos_mem_free(wdiWowlDelBcPtrnInfo);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiWowlDelBcPtrnInfo->wdiWowlDelBcPtrnInfo.ucPatternId = 
       pWowlDelBcPtrnParams->ucPatternId;
-
    wdiWowlDelBcPtrnInfo->wdiReqStatusCB = NULL;
-
    /* Store param pointer as passed in by caller */
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = wdiWowlDelBcPtrnInfo;
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pWowlDelBcPtrnParams;
-
    wstatus = WDI_WowlDelBcPtrnReq(wdiWowlDelBcPtrnInfo, 
                                  (WDI_WowlDelBcPtrnCb)WDA_WowlDelBcPtrnReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(wstatus))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8707,11 +7604,9 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
    }
-
    return status;
 
 }/*WDA_ProcessWowlDelBcPtrnReq*/
-
 /*
  * FUNCTION: WDA_WowlEnterReqCallback
  * 
@@ -8721,10 +7616,8 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
    tWDA_CbContext *pWDA;
    tSirHalWowlEnterParams *pWowlEnterParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8732,22 +7625,16 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext ;
    pWowlEnterParams =  (tSirHalWowlEnterParams *)pWdaParams->wdaMsgParam ;
 
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
 
-
    pWowlEnterParams->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    WDA_SendMsg(pWDA, WDA_WOWL_ENTER_RSP, (void *)pWowlEnterParams , 0) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessWowlEnterReq
  * Request to WDI to enter WOWL 
@@ -8761,10 +7648,8 @@
       (WDI_WowlEnterReqParamsType *)vos_mem_malloc(
          sizeof(WDI_WowlEnterReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiWowlEnterInfo) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8781,35 +7666,25 @@
       vos_mem_free(wdiWowlEnterInfo);
       return VOS_STATUS_E_NOMEM;
    }
-
    vos_mem_copy(wdiWowlEnterInfo->wdiWowlEnterInfo.magicPtrn,
                 pWowlEnterParams->magicPtrn,
                 sizeof(tSirMacAddr));
-
    wdiWowlEnterInfo->wdiWowlEnterInfo.ucMagicPktEnable = 
       pWowlEnterParams->ucMagicPktEnable;
-
    wdiWowlEnterInfo->wdiWowlEnterInfo.ucPatternFilteringEnable = 
       pWowlEnterParams->ucPatternFilteringEnable;
-
    wdiWowlEnterInfo->wdiWowlEnterInfo.ucUcastPatternFilteringEnable = 
       pWowlEnterParams->ucUcastPatternFilteringEnable;
-
    wdiWowlEnterInfo->wdiWowlEnterInfo.ucWowChnlSwitchRcv = 
       pWowlEnterParams->ucWowChnlSwitchRcv;
-
    wdiWowlEnterInfo->wdiWowlEnterInfo.ucWowDeauthRcv = 
       pWowlEnterParams->ucWowDeauthRcv;
-
    wdiWowlEnterInfo->wdiWowlEnterInfo.ucWowDisassocRcv = 
       pWowlEnterParams->ucWowDisassocRcv;
-
    wdiWowlEnterInfo->wdiWowlEnterInfo.ucWowMaxMissedBeacons = 
       pWowlEnterParams->ucWowMaxMissedBeacons;
-
    wdiWowlEnterInfo->wdiWowlEnterInfo.ucWowMaxSleepUsec = 
       pWowlEnterParams->ucWowMaxSleepUsec;
-
 #ifdef WLAN_WAKEUP_EVENTS
    wdiWowlEnterInfo->wdiWowlEnterInfo.ucWoWEAPIDRequestEnable = 
       pWowlEnterParams->ucWoWEAPIDRequestEnable;
@@ -8828,16 +7703,13 @@
 #endif // WLAN_WAKEUP_EVENTS
 
    wdiWowlEnterInfo->wdiReqStatusCB = NULL;
-
    /* Store param pointer as passed in by caller */
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = wdiWowlEnterInfo;
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pWowlEnterParams;
-
    wstatus = WDI_WowlEnterReq(wdiWowlEnterInfo, 
                              (WDI_WowlEnterReqCb)WDA_WowlEnterReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(wstatus))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8847,11 +7719,9 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
    }
-
    return status;
 
 }/*WDA_ProcessWowlEnterReq*/
-
 /*
  * FUNCTION: WDA_WowlExitReqCallback
  * 
@@ -8859,15 +7729,11 @@
 void WDA_WowlExitReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_CbContext *pWDA = (tWDA_CbContext *)pUserData ; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    WDA_SendMsg(pWDA, WDA_WOWL_EXIT_RSP, NULL , CONVERT_WDI2SIR_STATUS(status)) ;
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessWowlExitReq
  * Request to WDI to add WOWL Bcast pattern
@@ -8879,7 +7745,6 @@
 
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    wstatus = WDI_WowlExitReq((WDI_WowlExitReqCb)WDA_WowlExitReqCallback, pWDA);
 
    if(IS_WDI_STATUS_FAILURE(wstatus))
@@ -8892,11 +7757,8 @@
       pWDA->wdaWdiApiMsgParam = NULL;
       pWDA->wdaMsgParam = NULL;
    }
-
    return status;
-
 }/*WDA_ProcessWowlExitReq*/
-
 /*
  * FUNCTION: WDA_IsHwFrameTxTranslationCapable
  * Request to WDI to determine whether a given station is capable of 
@@ -8907,7 +7769,6 @@
 {
    return WDI_IsHwFrameTxTranslationCapable(staIdx);
 }
-
 /*
  * FUNCTION: WDA_NvDownloadReqCallback
  * send NV Download RSP back to PE
@@ -8915,22 +7776,16 @@
 void WDA_NvDownloadReqCallback(WDI_NvDownloadRspInfoType *pNvDownloadRspParams, 
                                                             void* pUserData)
 {
-
    tWDA_CbContext *pWDA= ( tWDA_CbContext *)pUserData;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    /*Cleaning */
    vos_mem_free(pWDA->wdaWdiApiMsgParam) ;
    pWDA->wdaWdiApiMsgParam = NULL;
    pWDA->wdaMsgParam = NULL;
-
    vos_WDAComplete_cback(pWDA->pVosContext);
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessNvDownloadReq
  * Read the NV blob to a buffer and send a request to WDI to download the blob to NV memory.
@@ -8943,10 +7798,8 @@
    v_SIZE_t bufferSize = 0;
    WDI_Status status = WDI_STATUS_E_FAILURE;
    WDI_NvDownloadReqParamsType * wdiNvDownloadReqParam =NULL;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == pWDA) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8962,10 +7815,8 @@
    
    /* Get the NV structure base address and size from VOS */
    vos_nv_getNVBuffer(&pNvBuffer,&bufferSize);
-
    wdiNvDownloadReqParam = (WDI_NvDownloadReqParamsType *)vos_mem_malloc(
                                           sizeof(WDI_NvDownloadReqParamsType)) ;
-
    if(NULL == wdiNvDownloadReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8973,19 +7824,14 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    /* Copy Params to wdiNvDownloadReqParam*/
    wdiNvDownloadReqParam->wdiBlobInfo.pBlobAddress = pNvBuffer;
    wdiNvDownloadReqParam->wdiBlobInfo.uBlobSize = bufferSize;
-
    /* store Params pass it to WDI */
    pWDA->wdaWdiApiMsgParam = (void *)wdiNvDownloadReqParam ;
-
    wdiNvDownloadReqParam->wdiReqStatusCB = NULL ;
-
    status = WDI_NvDownloadReq(wdiNvDownloadReqParam, 
                     (WDI_NvDownloadRspCb)WDA_NvDownloadReqCallback,(void *)pWDA);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -8993,9 +7839,7 @@
       vos_mem_free(pWDA->wdaWdiApiMsgParam) ;
       pWDA->wdaWdiApiMsgParam = NULL;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
-
 }
 /*
  * FUNCTION: WDA_FlushAcReqCallback
@@ -9007,7 +7851,6 @@
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tFlushACReq *pFlushACReqParams;
    tFlushACRsp *pFlushACRspParams;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
    if(NULL == pWdaParams)
@@ -9025,6 +7868,7 @@
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                            "%s: VOS MEM Alloc Failure", __FUNCTION__); 
       VOS_ASSERT(0);
+	  vos_mem_free(pWdaParams);
       return ;
    }
    vos_mem_zero(pFlushACRspParams,sizeof(tFlushACRsp));   
@@ -9033,20 +7877,16 @@
    pFlushACRspParams->ucSTAId = pFlushACReqParams->ucSTAId;
    pFlushACRspParams->ucTid = pFlushACReqParams->ucTid;
    pFlushACRspParams->status = CONVERT_WDI2SIR_STATUS(status) ;
-
    vos_mem_free(pWdaParams->wdaMsgParam) ;
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams);
-
    wdaMsg.type = WDA_TL_FLUSH_AC_RSP ; 
    wdaMsg.bodyptr = (void *)pFlushACRspParams;
    // POST message to TL
    vos_mq_post_message(VOS_MQ_ID_TL, (vos_msg_t *) &wdaMsg);
 
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessFlushAcReq
  * Request to WDI to Update the DELBA REQ params.
@@ -9059,7 +7899,6 @@
                (WDI_FlushAcReqParamsType *)vos_mem_malloc(
                                        sizeof(WDI_FlushAcReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    if(NULL == wdiFlushAcReqParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -9076,24 +7915,19 @@
       vos_mem_free(wdiFlushAcReqParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    wdiFlushAcReqParam->wdiFlushAcInfo.ucSTAId = pFlushAcReqParams->ucSTAId;
    wdiFlushAcReqParam->wdiFlushAcInfo.ucTid = pFlushAcReqParams->ucTid;
    wdiFlushAcReqParam->wdiFlushAcInfo.usMesgLen = pFlushAcReqParams->mesgLen;
    wdiFlushAcReqParam->wdiFlushAcInfo.usMesgType = pFlushAcReqParams->mesgType;
-
    /* Store Flush AC pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pFlushAcReqParams;
    pWdaParams->wdaWdiApiMsgParam = wdiFlushAcReqParam;
-
    status = WDI_FlushAcReq(wdiFlushAcReqParam, 
                            (WDI_FlushAcRspCb)WDA_FlushAcReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -9103,11 +7937,8 @@
       vos_mem_free(pWdaParams) ;
       //TODO: respond to TL with failure
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
-
 }
-
 /*
  * FUNCTION: WDA_BtAmpEventReqCallback
  * 
@@ -9116,11 +7947,10 @@
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA; 
-   WDI_BtAmpEventParamsType *wdiBtAmpEventParam; 
+   WDI_BtAmpEventParamsType *wdiBtAmpEventParam;
 
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -9135,7 +7965,6 @@
    {
       pWDA->wdaAmpSessionOn = VOS_FALSE;
    }
-
    vos_mem_free(pWdaParams->wdaMsgParam) ;
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
@@ -9143,11 +7972,9 @@
     * No respone required for WDA_SIGNAL_BTAMP_EVENT so just free the request 
     * param here
     */
-
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessBtAmpEventReq
  * Request to WDI to Update with BT AMP events.
@@ -9160,10 +7987,8 @@
             (WDI_BtAmpEventParamsType *)vos_mem_malloc(
                                  sizeof(WDI_BtAmpEventParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiBtAmpEventParam) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -9180,21 +8005,16 @@
       vos_mem_free(wdiBtAmpEventParam);
       return VOS_STATUS_E_NOMEM;
    }
-
    wdiBtAmpEventParam->wdiBtAmpEventInfo.ucBtAmpEventType = 
       pBtAmpEventParams->btAmpEventType;
-
    wdiBtAmpEventParam->wdiReqStatusCB = NULL;
-
    /* Store BT AMP event pointer, as this will be used for response */
    /* store Params pass it to WDI */
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pBtAmpEventParams;
    pWdaParams->wdaWdiApiMsgParam = wdiBtAmpEventParam;
-
    status = WDI_BtAmpEventReq(wdiBtAmpEventParam, 
                               (WDI_BtAmpEventRspCb)WDA_BtAmpEventReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -9203,16 +8023,13 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
    }
-
    if(BTAMP_EVENT_CONNECTION_START == wdiBtAmpEventParam->wdiBtAmpEventInfo.ucBtAmpEventType)
    {
       pWDA->wdaAmpSessionOn = VOS_TRUE;
    }
    return CONVERT_WDI2VOS_STATUS(status) ;
-
 }
 
-
 #ifdef ANI_MANF_DIAG
 /*
  * FUNCTION: WDA_FTMCommandReqCallback
@@ -9223,26 +8040,21 @@
                                void *usrData)
 {
    tWDA_CbContext *pWDA = (tWDA_CbContext *)usrData ;
-
    if((NULL == pWDA) || (NULL == ftmCmdRspData))
    {
       VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                 "%s, invalid input 0x%x, 0x%x",__FUNCTION__,  pWDA, ftmCmdRspData);
       return;
    }
-
    /* Release Current FTM Command Request */
    vos_mem_free(pWDA->wdaFTMCmdReq);
    pWDA->wdaFTMCmdReq = NULL;
-
 #ifndef WLAN_FTM_STUB
    /* Post FTM Responce to HDD FTM */
    wlan_sys_ftm(ftmCmdRspData);
 #endif /* WLAN_FTM_STUB */
-
    return;
 }
-
 /*
  * FUNCTION: WDA_ProcessFTMCommand
  * Send FTM command to WDI
@@ -9252,7 +8064,6 @@
 {
    WDI_Status             status = WDI_STATUS_SUCCESS;
    WDI_FTMCommandReqType *ftmCMDReq = NULL;
-
    ftmCMDReq = (WDI_FTMCommandReqType *)
                 vos_mem_malloc(sizeof(WDI_FTMCommandReqType));
    if(NULL == ftmCMDReq)
@@ -9261,19 +8072,121 @@
                 "WDA FTM Command buffer alloc fail");
       return VOS_STATUS_E_NOMEM;
    }
-
    ftmCMDReq->bodyLength     = pPTTFtmCmd->msgBodyLength;
    ftmCMDReq->FTMCommandBody = (void *)pPTTFtmCmd;
-
    pWDA->wdaFTMCmdReq        = (void *)ftmCMDReq;
-
    /* Send command to WDI */
    status = WDI_FTMCommandReq(ftmCMDReq, WDA_FTMCommandReqCallback, pWDA);
-
    return status;
 }
 #endif /* ANI_MANF_DIAG */
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/*
+ * FUNCTION: WDA_StartOemDataReqCallback
+ * 
+ */
+void WDA_StartOemDataReqCallback(
+                   WDI_oemDataRspParamsType *wdiOemDataRspParams, 
+                                                        void* pUserData)
+{
+   VOS_STATUS status = VOS_STATUS_E_FAILURE;
+   tWDA_CbContext *pWDA = (tWDA_CbContext *)pUserData ; 
+   tStartOemDataRsp *pOemDataRspParams = NULL ;
 
+   VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
+                                          "<------ %s " ,__FUNCTION__);
+   if(NULL == pWDA) 
+   {
+      VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+                           "%s:pWDA is NULL", __FUNCTION__); 
+      VOS_ASSERT(0);
+      return ;
+   }
+   
+   /* 
+    * Allocate memory for response params sent to PE
+    */
+   pOemDataRspParams = vos_mem_malloc(sizeof(tStartOemDataRsp));
+
+   // Check if memory is allocated for OemdataMeasRsp Params.
+   if(NULL == pOemDataRspParams)
+   {
+      VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+                "OEM DATA WDA callback alloc fail");
+      VOS_ASSERT(0) ;
+      return;
+   }
+   // Free the memory allocated during request.
+   vos_mem_free(pWDA->wdaWdiApiMsgParam) ;
+   vos_mem_free(pWDA->wdaMsgParam) ;
+   pWDA->wdaWdiApiMsgParam = NULL;
+   pWDA->wdaMsgParam = NULL;
+   /* 
+    * Now go ahead and copy other stuff for PE in incase of sucess only 
+    * Also, here success always means that we have atleast one BSSID.
+    */
+   vos_mem_copy(pOemDataRspParams->oemDataRsp, wdiOemDataRspParams->oemDataRsp, OEM_DATA_RSP_SIZE);
+ 
+   //enable Tx
+   status = WDA_ResumeDataTx(pWDA);
+   if(status != VOS_STATUS_SUCCESS)
+   {
+      VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_FATAL, "WDA Resume Data Tx fail");
+   }
+   WDA_SendMsg(pWDA, WDA_START_OEM_DATA_RSP,  (void *)pOemDataRspParams, 0) ;
+   return ;
+}
+/*
+ * FUNCTION: WDA_ProcessStartOemDataReq
+ * Send Start Oem Data Req to WDI
+ */
+VOS_STATUS WDA_ProcessStartOemDataReq(tWDA_CbContext *pWDA, 
+                                 tStartOemDataReq  *pOemDataReqParams)
+{
+   WDI_Status             status = WDI_STATUS_SUCCESS;
+   WDI_oemDataReqParamsType     *wdiOemDataReqParams = NULL;
+
+   wdiOemDataReqParams = (WDI_oemDataReqParamsType*)vos_mem_malloc(sizeof(WDI_oemDataReqParamsType)) ;
+   
+   if(NULL == wdiOemDataReqParams)
+   {
+      VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+                           "%s: VOS MEM Alloc Failure", __FUNCTION__); 
+      VOS_ASSERT(0);
+      return VOS_STATUS_E_NOMEM;
+   }
+   
+   vos_mem_copy(wdiOemDataReqParams->wdiOemDataReqInfo.selfMacAddr, pOemDataReqParams->selfMacAddr, sizeof(tSirMacAddr));
+   vos_mem_copy(wdiOemDataReqParams->wdiOemDataReqInfo.oemDataReq, pOemDataReqParams->oemDataReq, OEM_DATA_REQ_SIZE);
+
+   wdiOemDataReqParams->wdiReqStatusCB = NULL;
+
+   if((NULL != pWDA->wdaMsgParam) ||
+                           (NULL != pWDA->wdaWdiApiMsgParam))
+   {
+      VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+                           "%s:wdaWdiApiMsgParam is Not NULL", __FUNCTION__); 
+      VOS_ASSERT(0);
+      vos_mem_free(wdiOemDataReqParams);
+      return VOS_STATUS_E_FAILURE;
+   }
+   pWDA->wdaMsgParam          =          (void *)pOemDataReqParams;
+   pWDA->wdaWdiApiMsgParam    =          (void *)wdiOemDataReqParams;
+
+   status = WDI_StartOemDataReq(wdiOemDataReqParams, (WDI_oemDataRspCb)WDA_StartOemDataReqCallback, pWDA);
+
+   if(IS_WDI_STATUS_FAILURE(status))
+   {
+      VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+         "Failure in Start OEM DATA REQ Params WDI API, free all the memory " );
+      vos_mem_free(pWDA->wdaWdiApiMsgParam) ;
+      vos_mem_free(pWDA->wdaMsgParam);
+      pWDA->wdaWdiApiMsgParam = NULL;
+      pWDA->wdaMsgParam = NULL;
+   }
+   return CONVERT_WDI2VOS_STATUS(status) ;
+}
+#endif /* FEATURE_OEM_DATA_SUPPORT */
 /*
  * FUNCTION: WDA_SetTxPerTrackingReqCallback
  * 
@@ -9281,10 +8194,8 @@
 void WDA_SetTxPerTrackingReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -9297,17 +8208,14 @@
    {
       vos_mem_free(pWdaParams->wdaMsgParam);
    }
-
    if(NULL != pWdaParams->wdaWdiApiMsgParam)
    {
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    }
    
    vos_mem_free(pWdaParams);
-
    return ;
 }
-
 #ifdef WLAN_FEATURE_GTK_OFFLOAD
 /*
  * FUNCTION: WDA_HostOffloadReqCallback
@@ -9468,10 +8376,8 @@
       (WDI_SetTxPerTrackingReqParamsType *)vos_mem_malloc(
          sizeof(WDI_SetTxPerTrackingReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == pwdiSetTxPerTrackingReqParams) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -9490,7 +8396,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pwdiSetTxPerTrackingReqParams->wdiTxPerTrackingParam.ucTxPerTrackingEnable = 
       pTxPerTrackingParams->ucTxPerTrackingEnable;
    pwdiSetTxPerTrackingReqParams->wdiTxPerTrackingParam.ucTxPerTrackingPeriod = 
@@ -9499,19 +8404,15 @@
       pTxPerTrackingParams->ucTxPerTrackingRatio;
    pwdiSetTxPerTrackingReqParams->wdiTxPerTrackingParam.uTxPerTrackingWatermark = 
       pTxPerTrackingParams->uTxPerTrackingWatermark;
-
    pwdiSetTxPerTrackingReqParams->wdiReqStatusCB = NULL;
-
    /* Store param pointer as passed in by caller */
    /* store Params pass it to WDI 
       Ideally, the memory allocated here will be free at WDA_SetTxPerTrackingReqCallback */
    pWdaParams->wdaWdiApiMsgParam = pwdiSetTxPerTrackingReqParams;
    pWdaParams->pWdaContext = pWDA;
    pWdaParams->wdaMsgParam = pTxPerTrackingParams;
-
    wstatus = WDI_SetTxPerTrackingReq(pwdiSetTxPerTrackingReqParams, 
                                     (WDI_SetTxPerTrackingRspCb)WDA_SetTxPerTrackingReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(wstatus))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -9521,11 +8422,9 @@
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       vos_mem_free(pWdaParams) ;
    }
-
    return status;
 
 }/*WDA_ProcessSetTxPerTrackingReq*/
-
 /*
  * FUNCTION: WDA_HALDumpCmdCallback
  * Send the VOS complete . 
@@ -9536,7 +8435,6 @@
    tANI_U8 *buffer = NULL;
    tWDA_CbContext *pWDA = NULL;
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -9547,23 +8445,19 @@
    
    pWDA = pWdaParams->pWdaContext;
    buffer = (tANI_U8 *)pWdaParams->wdaMsgParam;
-
    if(wdiRspParams->usBufferLen > 0)
    {
       /*Copy the Resp data to UMAC supplied buffer*/
       vos_mem_copy(buffer, wdiRspParams->pBuffer, wdiRspParams->usBufferLen);
    }
-
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams);
    
    /* Indicate VOSS about the start complete */
    vos_WDAComplete_cback(pWDA->pVosContext);
-
    return ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessHALDumpCmdReq
  * Send Dump command to WDI
@@ -9578,7 +8472,6 @@
    tWDA_ReqParams *pWdaParams ;
    pVosContextType pVosContext = NULL; 
    VOS_STATUS vStatus;
-
    pVosContext = (pVosContextType)vos_get_global_context(VOS_MODULE_ID_PE,
                                                            (void *)pMac);
    
@@ -9589,7 +8482,6 @@
                            "%s: VOS MEM Alloc Failure", __FUNCTION__); 
       return VOS_STATUS_E_NOMEM;
    }
-
    /* Allocate memory WDI request structure*/
    wdiHALDumpCmdReqParam = (WDI_HALDumpCmdReqParamsType *)
                 vos_mem_malloc(sizeof(WDI_HALDumpCmdReqParamsType));
@@ -9600,18 +8492,14 @@
       vos_mem_free(pWdaParams);
       return WDI_STATUS_E_FAILURE;
    }
-
    wdiHalDumpCmdInfo = &wdiHALDumpCmdReqParam->wdiHALDumpCmdInfoType;
-
    /* Extract the arguments */
    wdiHalDumpCmdInfo->command     = cmd;
    wdiHalDumpCmdInfo->argument1   = arg1;
    wdiHalDumpCmdInfo->argument2   = arg2;
    wdiHalDumpCmdInfo->argument3   = arg3;
    wdiHalDumpCmdInfo->argument4   = arg4;
-
    wdiHALDumpCmdReqParam->wdiReqStatusCB = NULL ;
-
    pWdaParams->pWdaContext = pVosContext->pWDAContext;
    
    /*  Response message will be passed through the buffer */
@@ -9619,12 +8507,9 @@
    
    /* store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)wdiHALDumpCmdReqParam ;
-
    /* Send command to WDI */
    status = WDI_HALDumpCmdReq(wdiHALDumpCmdReqParam, WDA_HALDumpCmdCallback, pWdaParams);
-
    vStatus = vos_wait_single_event( &(pVosContext->wdaCompleteEvent), 1000 );
-
    if ( vStatus != VOS_STATUS_SUCCESS )
    {
       if ( vStatus == VOS_STATUS_E_TIMEOUT )
@@ -9641,7 +8526,6 @@
    }
    return status;
 }
-
 #ifdef WLAN_FEATURE_GTK_OFFLOAD
 /*
  * FUNCTION: WDA_ProcessGTKOffloadgetInfoReq
@@ -9706,7 +8590,6 @@
  * DATA interface with WDI for Mgmt Frames
  * ------------------------------------------------------------------------- 
  */
-
 /*
  * FUNCTION: WDA_TxComplete
  * Callback function for the WDA_TxPacket
@@ -9726,7 +8609,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    /*check whether the callback is null or not,made null during WDA_TL_TX_FRAME_TIMEOUT timeout*/
    if( NULL!=wdaContext->pTxCbFunc) 
    {
@@ -9743,7 +8625,6 @@
          //Return from here since we reaching here because the packet already timeout
          return status;
       }
-
    }
 
    /* 
@@ -9759,10 +8640,8 @@
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR, 
                       "NEW VOS Event Set failed - status = %d \n", status);
    }
-
    return status;
 }
-
 /*
  * FUNCTION: WDA_TxPacket
  * Forward TX management frame to WDI
@@ -9784,7 +8663,6 @@
    tANI_U8 eventIdx = 0;
    tBssSystemRole systemRole = eSYSTEM_UNKNOWN_ROLE;
    tpAniSirGlobal pMac;
-
    if((NULL == pWDA)||(NULL == pFrmBuf)) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -9796,7 +8674,6 @@
    
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO_HIGH, 
                "Tx Mgmt Frame Subtype: %d alloc(%x)\n", pFc->subType, pFrmBuf);
-
    pMac = (tpAniSirGlobal )VOS_GET_MAC_CTXT(pWDA->pVosContext);
    if(NULL == pMac)
    {
@@ -9813,30 +8690,38 @@
    /* store the call back for the function of ackTxComplete */
    if( pAckTxComp )
    {
-      if( NULL == pWDA->pAckTxCbFunc )
-      {
-         txFlag |= HAL_TXCOMP_REQUESTED_MASK;
-         pWDA->pAckTxCbFunc = pAckTxComp;
-         if( VOS_STATUS_SUCCESS !=
-                 WDA_START_TIMER(&pWDA->wdaTimers.TxCompleteTimer) ) 
-         {
-            VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
-                                "Tx Complete Timer Start Failed ");
-            pWDA->pAckTxCbFunc = NULL;
-            pCompFunc(VOS_GET_MAC_CTXT(pWDA->pVosContext), (vos_pkt_t *)pFrmBuf);
-            return VOS_STATUS_E_FAILURE;
-         }
-      }
-      else
-      {
-         /* Already TxComp is active no need to active again */
-         VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR, 
-                       "There is already one request pending for tx complete\n");
-         pCompFunc(pWDA->pVosContext, (vos_pkt_t *)pFrmBuf);
-         return VOS_STATUS_E_FAILURE;
-      }
-   } 
+       if( NULL != pWDA->pAckTxCbFunc )
+       {
+           /* Already TxComp is active no need to active again */
+           VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR, 
+                   "There is already one request pending for tx complete\n");
+           pWDA->pAckTxCbFunc( pMac, 0);
+           pWDA->pAckTxCbFunc = NULL;
 
+           if( VOS_STATUS_SUCCESS !=
+                   WDA_STOP_TIMER(&pWDA->wdaTimers.TxCompleteTimer))
+           {
+               VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+                       "Tx Complete timeout Timer Stop Failed ");
+           }
+           else
+           {
+               VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+                       "Tx Complete timeout Timer Stop Sucess ");
+           }
+       }
+
+       txFlag |= HAL_TXCOMP_REQUESTED_MASK;
+       pWDA->pAckTxCbFunc = pAckTxComp;
+       if( VOS_STATUS_SUCCESS !=
+               WDA_START_TIMER(&pWDA->wdaTimers.TxCompleteTimer) ) 
+       {
+           VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
+                   "Tx Complete Timer Start Failed ");
+           pWDA->pAckTxCbFunc = NULL;
+           return eHAL_STATUS_FAILURE;
+       }
+   } 
    /* Reset the event to be not signalled */
    status = vos_event_reset(&pWDA->txFrameEvent);
    if(!VOS_IS_STATUS_SUCCESS(status))
@@ -9856,10 +8741,8 @@
       }
       return VOS_STATUS_E_FAILURE;
    }
-
    /* Get system role, use the self station if in unknown role or STA role */
    systemRole = wdaGetGlobalSystemRole(pMac);
-
    if (( eSYSTEM_UNKNOWN_ROLE == systemRole ) || 
        (( eSYSTEM_STA_ROLE == systemRole )
 #ifdef FEATURE_WLAN_CCX
@@ -9870,27 +8753,18 @@
        txFlag |= HAL_USE_SELF_STA_REQUESTED_MASK;
    }
 
-   /* Do not divert Disassoc/Deauth frames through self station because a delay of
-    * 300ms is added beofre trigerring DEL STA so let deuath gets delivered at TIM */
-   if ((pFc->type == SIR_MAC_MGMT_FRAME)) 
+   /* Divert Disassoc/Deauth frames thru self station, as by the time unicast
+      disassoc frame reaches the HW, HAL has already deleted the peer station */
+   if ((pFc->type == SIR_MAC_MGMT_FRAME))
    {
-       if ((pFc->subType == SIR_MAC_MGMT_DISASSOC) || 
-               (pFc->subType == SIR_MAC_MGMT_DEAUTH) || 
-               (pFc->subType == SIR_MAC_MGMT_REASSOC_RSP) || 
-               (pFc->subType == SIR_MAC_MGMT_PROBE_REQ)) 
+       if ((pFc->subType == SIR_MAC_MGMT_DISASSOC) ||
+               (pFc->subType == SIR_MAC_MGMT_DEAUTH) ||
+               (pFc->subType == SIR_MAC_MGMT_REASSOC_RSP) ||
+               (pFc->subType == SIR_MAC_MGMT_PROBE_REQ))
        {
-           if( (systemRole == eSYSTEM_AP_ROLE) && ( (pFc->subType == SIR_MAC_MGMT_DEAUTH) ||
-                                                    (pFc->subType == SIR_MAC_MGMT_DISASSOC) ) )
-           {
-              /*Do not request self STA for deauth/disassoc let it go through peer STA and
-               *broadcast STA and get delivered at TIM for power save stations*/
-           }
-           else
-           {
              /*Send Probe request frames on self sta idx*/
              txFlag |= HAL_USE_SELF_STA_REQUESTED_MASK;
-           }
-       } 
+       }
        /* Since we donot want probe responses to be retried, send probe responses
           through the NO_ACK queues */
        if (pFc->subType == SIR_MAC_MGMT_PROBE_RSP) 
@@ -9903,7 +8777,6 @@
           txFlag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME;
        }
    }
-   
    vos_atomic_set_U32(&pWDA->VosPacketToFree, (v_U32_t)pFrmBuf);/*set VosPacket_freed to pFrmBuf*/
 
    /*Set frame tag to 0 
@@ -9932,7 +8805,6 @@
       } 
       return VOS_STATUS_E_FAILURE;
    }
-
    /* 
     * Wait for the event to be set by the TL, to get the response of TX 
     * complete, this event should be set by the Callback function called by TL 
@@ -9944,7 +8816,6 @@
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR, 
                  "%s: Status %d when waiting for TX Frame Event",
                  __FUNCTION__, status);
-
       pWDA->pTxCbFunc = NULL;   /*To stop the limTxComplete being called again  , 
                                 after the packet gets completed(packet freed once)*/
 
@@ -9967,11 +8838,8 @@
       }
       status = VOS_STATUS_E_FAILURE;
    }
-
    return status;
 }
-
-
 /*
  * FUNCTION: WDA_McProcessMsg
  * Trigger DAL-AL to start CFG download 
@@ -9980,7 +8848,6 @@
 {
    VOS_STATUS status = VOS_STATUS_SUCCESS;
    tWDA_CbContext *pWDA = NULL ; 
-
    if(NULL == pMsg) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -9998,16 +8865,15 @@
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                            "%s:pWDA is NULL", __FUNCTION__); 
       VOS_ASSERT(0);
+	  vos_mem_free(pMsg->bodyptr);
       return VOS_STATUS_E_FAILURE;
    }
-
    /* Process all the WDA messages.. */
    switch( pMsg->type )
    {
       case WNI_CFG_DNLD_REQ:
       {
          status = WDA_WniCfgDnld(pWDA);
-
          /* call WDA complete event if config download success */
          if( VOS_IS_STATUS_SUCCESS(status) )
          {
@@ -10020,7 +8886,6 @@
          }
          break ;
       }
-
       /* 
        * Init SCAN request from PE, convert it into DAL format 
        * and send it to DAL 
@@ -10095,7 +8960,6 @@
                  VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                             "STA %d BSS %d TX RING empty %d", staIdx, bssIdx );
                  break;
-
              }
              else
              {
@@ -10104,6 +8968,13 @@
                      VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_FATAL,
                                 "TX Ring could not empty, not normal" );
                      VOS_ASSERT(0);
+                     /* STA mode, stall detected, reload driver */
+                     if(VOS_STA_MODE == vos_get_conparam())
+                     {
+                        vos_mem_free(pMsg->bodyptr);
+                        vos_wlanRestart();
+                        return VOS_STATUS_E_FAILURE;
+                     }
                      break;
                  }
                  vos_sleep(WDA_WAIT_MSEC_TILL_RING_EMPTY);
@@ -10136,6 +9007,13 @@
                      VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_FATAL,
                                 "TX Ring could not empty, not normal" );
                      VOS_ASSERT(0);
+                     /* STA mode, stall detected, reload driver */
+                     if(VOS_STA_MODE == vos_get_conparam())
+                     {
+                        vos_mem_free(pMsg->bodyptr);
+                        vos_wlanRestart();
+                        return VOS_STATUS_E_FAILURE;
+                     }
                      break;
                  }
                  vos_sleep(WDA_WAIT_MSEC_TILL_RING_EMPTY);
@@ -10333,7 +9211,6 @@
          }
          break;
       }
-
       case WDA_REGISTER_PE_CALLBACK :
       {
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO_HIGH,
@@ -10414,7 +9291,6 @@
          WDA_ProcessAddStaSelfReq(pWDA, (tAddStaSelfParams *)pMsg->bodyptr);
          break;
       }
-
       case WDA_DEL_STA_SELF_REQ:
       {
          WDA_ProcessDelSTASelfReq(pWDA, (tDelStaSelfParams *)pMsg->bodyptr);
@@ -10503,7 +9379,6 @@
          break;
       }
 #endif /* WLAN_FEATURE_VOWIFI_11R */
-
 #ifdef ANI_MANF_DIAG
       case WDA_FTM_CMD_REQ:
       {
@@ -10511,8 +9386,13 @@
          break ;
       }
 #endif /* ANI_MANF_DIAG */
-
-
+#ifdef FEATURE_OEM_DATA_SUPPORT
+      case WDA_START_OEM_DATA_REQ:
+      {
+         WDA_ProcessStartOemDataReq(pWDA, (tStartOemDataReq *)pMsg->bodyptr) ;
+         break;
+      }
+#endif /* FEATURE_OEM_DATA_SUPPORT */
       /* Tx Complete Time out Indication */
       case WDA_TX_COMPLETE_TIMEOUT_IND:
       {
@@ -10525,7 +9405,6 @@
                         (tSirWlanSuspendParam *)pMsg->bodyptr) ;
          break;
       }
-
       case WDA_WLAN_RESUME_REQ:
       {
          WDA_ProcessWlanResumeReq(pWDA, 
@@ -10556,7 +9435,6 @@
          break;
       }
 #endif // FEATURE_WLAN_SCAN_PNO
-
       case WDA_SET_TX_PER_TRACKING_REQ:
       {
          WDA_ProcessSetTxPerTrackingReq(pWDA, (tSirTxPerTrackingParam *)pMsg->bodyptr);
@@ -10569,19 +9447,16 @@
          WDA_Process8023MulticastListReq(pWDA, (tSirRcvFltMcAddrList *)pMsg->bodyptr);
          break;
       }
-
       case WDA_RECEIVE_FILTER_SET_FILTER_REQ:
       {
          WDA_ProcessReceiveFilterSetFilterReq(pWDA, (tSirRcvPktFilterCfgType *)pMsg->bodyptr);
          break;
       }
-
       case WDA_PACKET_COALESCING_FILTER_MATCH_COUNT_REQ:
       {
          WDA_ProcessPacketFilterMatchCountReq(pWDA, (tpSirRcvFltPktMatchRsp)pMsg->bodyptr);
          break;
       }
-
       case WDA_RECEIVE_FILTER_CLEAR_FILTER_REQ:
       {
          WDA_ProcessReceiveFilterClearFilterReq(pWDA, (tSirRcvFltPktClearParam *)pMsg->bodyptr);
@@ -10595,13 +9470,11 @@
          WDA_ProcessTxControlInd(pWDA, (tpTxControlParams)pMsg->bodyptr);
          break;
       }
-
       case WDA_SET_POWER_PARAMS_REQ:
       {
          WDA_ProcessSetPowerParamsReq(pWDA, (tSirSetPowerParamsReq *)pMsg->bodyptr);
          break;
       }
-
 #ifdef WLAN_FEATURE_GTK_OFFLOAD
       case WDA_GTK_OFFLOAD_REQ:
       {
@@ -10635,11 +9508,9 @@
          //WDA_VOS_ASSERT(0) ;
       }
    }
-
    return status ;
 }
 
-
 /*
  * FUNCTION: WDA_LowLevelIndCallback
  * IND API callback from WDI, send Ind to PE
@@ -10651,7 +9522,6 @@
 #if defined WLAN_FEATURE_NEIGHBOR_ROAMING
    tSirRSSINotification rssiNotification;
 #endif
-
    if(NULL == pWDA)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -10666,7 +9536,6 @@
       {
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                      "Received WDI_HAL_RSSI_NOTIFICATION_IND from WDI ");
-
 #if defined WLAN_FEATURE_NEIGHBOR_ROAMING
          rssiNotification.bReserved = 
             wdiLowLevelInd->wdiIndicationData.wdiLowRSSIInfo.bReserved;
@@ -10682,7 +9551,6 @@
             wdiLowLevelInd->wdiIndicationData.wdiLowRSSIInfo.bRssiThres3NegCross;
          rssiNotification.bRssiThres3PosCross = 
             wdiLowLevelInd->wdiIndicationData.wdiLowRSSIInfo.bRssiThres3PosCross;
-
          WLANTL_BMPSRSSIRegionChangedNotification(
             pWDA->pVosContext,
             &rssiNotification);
@@ -10693,7 +9561,6 @@
       {
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                      "Received WDI_MISSED_BEACON_IND from WDI ");
-
          /* send IND to PE */
          WDA_SendMsg(pWDA, WDA_MISSED_BEACON_IND, NULL, 0) ;
          break ;
@@ -10719,7 +9586,6 @@
          }
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                   "Received WDI_MIC_FAILURE_IND from WDI ");
-
          pMicInd->messageType = eWNI_SME_MIC_FAILURE_IND;
          pMicInd->length = sizeof(tSirSmeMicFailureInd);
          vos_mem_copy(pMicInd->bssId,
@@ -10745,7 +9611,6 @@
              wdiLowLevelInd->wdiIndicationData.wdiMICFailureInfo.ucIV1;
          vos_mem_copy(pMicInd->info.TSC,
              wdiLowLevelInd->wdiIndicationData.wdiMICFailureInfo.TSC,SIR_CIPHER_SEQ_CTR_SIZE);
-
          WDA_SendMsg(pWDA, SIR_HAL_MIC_FAILURE_IND, 
                                        (void *)pMicInd , 0) ;
          break ;
@@ -10759,7 +9624,6 @@
       }
       case WDI_DEL_STA_IND:
       {
-
          tpDeleteStaContext  pDelSTACtx = 
             (tpDeleteStaContext)vos_mem_malloc(sizeof(tDeleteStaContext));
          
@@ -10774,21 +9638,17 @@
          vos_mem_copy(pDelSTACtx->addr2,
              wdiLowLevelInd->wdiIndicationData.wdiDeleteSTAIndType.macADDR2,
              sizeof(tSirMacAddr));
-
          vos_mem_copy(pDelSTACtx->bssId,
              wdiLowLevelInd->wdiIndicationData.wdiDeleteSTAIndType.macBSSID,
              sizeof(tSirMacAddr));
-
          pDelSTACtx->assocId    = 
           wdiLowLevelInd->wdiIndicationData.wdiDeleteSTAIndType.usAssocId;
          pDelSTACtx->reasonCode = 
           wdiLowLevelInd->wdiIndicationData.wdiDeleteSTAIndType.wptReasonCode;
          pDelSTACtx->staId      = 
           wdiLowLevelInd->wdiIndicationData.wdiDeleteSTAIndType.ucSTAIdx;
-
          WDA_SendMsg(pWDA, SIR_LIM_DELETE_STA_CONTEXT_IND, 
                                        (void *)pDelSTACtx , 0) ;
-
          break ;
       }
       case WDI_COEX_IND:
@@ -10804,23 +9664,19 @@
          }
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                   "Received WDI_COEX_IND from WDI ");
-
          /* Message Header */
          pSmeCoexInd->mesgType = eWNI_SME_COEX_IND;
          pSmeCoexInd->mesgLen = sizeof(tSirSmeCoexInd);
-
          /* Info from WDI Indication */
          pSmeCoexInd->coexIndType = wdiLowLevelInd->wdiIndicationData.wdiCoexInfo.coexIndType; 
          for (index = 0; index < SIR_COEX_IND_DATA_SIZE; index++)
          {
             pSmeCoexInd->coexIndData[index] = wdiLowLevelInd->wdiIndicationData.wdiCoexInfo.coexIndData[index]; 
          }
-
          /* VOS message wrapper */
          vosMsg.type = eWNI_SME_COEX_IND;
          vosMsg.bodyptr = (void *)pSmeCoexInd;
          vosMsg.bodyval = 0;
-
          /* Send message to SME */
          if (VOS_STATUS_SUCCESS != vos_mq_post_message(VOS_MQ_ID_SME, (vos_msg_t*)&vosMsg))
          {
@@ -10869,10 +9725,8 @@
       {
          tSirP2PNoaAttr   *pP2pNoaAttr = 
             (tSirP2PNoaAttr *)vos_mem_malloc(sizeof(tSirP2PNoaAttr));
-
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                               "Received WDI_P2P_NOA_ATTR_IND from WDI");
-
          if (NULL == pP2pNoaAttr)
          {
             VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -10880,7 +9734,6 @@
                        "WDI_P2P_NOA_ATTR_IND not forwarded");
             break;
          }
-
          pP2pNoaAttr->index            = 
                     wdiLowLevelInd->wdiIndicationData.wdiP2pNoaAttrInfo.ucIndex;
          pP2pNoaAttr->oppPsFlag        = 
@@ -10896,7 +9749,6 @@
                     wdiLowLevelInd->wdiIndicationData.wdiP2pNoaAttrInfo.uslNoa1Interval;
          pP2pNoaAttr->uNoa1StartTime   = 
                     wdiLowLevelInd->wdiIndicationData.wdiP2pNoaAttrInfo.uslNoa1StartTime;
-
          pP2pNoaAttr->uNoa2IntervalCnt = 
                     wdiLowLevelInd->wdiIndicationData.wdiP2pNoaAttrInfo.usNoa2IntervalCnt;
          pP2pNoaAttr->uNoa2Duration    = 
@@ -10905,22 +9757,18 @@
                     wdiLowLevelInd->wdiIndicationData.wdiP2pNoaAttrInfo.uslNoa2Interval;
          pP2pNoaAttr->uNoa2StartTime   = 
                     wdiLowLevelInd->wdiIndicationData.wdiP2pNoaAttrInfo.uslNoa2StartTime;
-
          WDA_SendMsg(pWDA, SIR_HAL_P2P_NOA_ATTR_IND, 
                                        (void *)pP2pNoaAttr , 0) ;
          break;
       }
 #endif
-
 #ifdef FEATURE_WLAN_SCAN_PNO
       case WDI_PREF_NETWORK_FOUND_IND:
       {
          vos_msg_t vosMsg;
          tSirPrefNetworkFoundInd *pPrefNetworkFoundInd = (tSirPrefNetworkFoundInd *)vos_mem_malloc(sizeof(tSirPrefNetworkFoundInd));
-
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                               "Received WDI_PREF_NETWORK_FOUND_IND from WDI");
-
          if (NULL == pPrefNetworkFoundInd)
          {
             VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -10928,7 +9776,6 @@
                        "WDI_PREF_NETWORK_FOUND_IND not forwarded");
             break;
          }
-
          /* Message Header */
          pPrefNetworkFoundInd->mesgType = eWNI_SME_PREF_NETWORK_FOUND_IND;
          pPrefNetworkFoundInd->mesgLen = sizeof(*pPrefNetworkFoundInd);
@@ -10936,27 +9783,21 @@
          /* Info from WDI Indication */ 
          pPrefNetworkFoundInd->ssId.length = 
             wdiLowLevelInd->wdiIndicationData.wdiPrefNetworkFoundInd.ssId.ucLength;
-
          vos_mem_set( pPrefNetworkFoundInd->ssId.ssId, 32, 0);
-
          vos_mem_copy( pPrefNetworkFoundInd->ssId.ssId, 
                   wdiLowLevelInd->wdiIndicationData.wdiPrefNetworkFoundInd.ssId.sSSID, 
                   pPrefNetworkFoundInd->ssId.length);
-
          pPrefNetworkFoundInd ->rssi = wdiLowLevelInd->wdiIndicationData.wdiPrefNetworkFoundInd.rssi; 
-
          /* VOS message wrapper */
          vosMsg.type = eWNI_SME_PREF_NETWORK_FOUND_IND;
          vosMsg.bodyptr = (void *) pPrefNetworkFoundInd;
          vosMsg.bodyval = 0;
-
          /* Send message to SME */
          if (VOS_STATUS_SUCCESS != vos_mq_post_message(VOS_MQ_ID_SME, (vos_msg_t*)&vosMsg))
          {
             /* free the mem and return */
             vos_mem_free((v_VOID_t *) pPrefNetworkFoundInd);
          }
-
          break;
       }
 #endif // FEATURE_WLAN_SCAN_PNO
@@ -11025,7 +9866,6 @@
          vosMsg.type = eWNI_SME_TX_PER_HIT_IND;
          vosMsg.bodyptr = NULL;
          vosMsg.bodyval = 0;
-
          /* Send message to SME */
          if (VOS_STATUS_SUCCESS != vos_mq_post_message(VOS_MQ_ID_SME, (vos_msg_t*)&vosMsg))
          {
@@ -11044,17 +9884,14 @@
    return ;
 }
 
-
 /*
  * BA related processing in WDA.
  */
-
 void WDA_TriggerBaReqCallback(WDI_TriggerBARspParamsType *wdiTriggerBaRsp, 
                                                              void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
    tWDA_CbContext *pWDA;
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11062,16 +9899,12 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
-
    vos_mem_free(pWdaParams->wdaMsgParam) ;
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(WDI_STATUS_SUCCESS == wdiTriggerBaRsp->wdiStatus)
    {
       tANI_U8 i = 0 ;
@@ -11081,9 +9914,7 @@
                            + sizeof(tAddBaCandidate) * (baCandidateCount) ;
       WDI_TriggerBARspCandidateType *wdiBaCandidate = NULL ; 
       tAddBaCandidate *baCandidate = NULL ;
-
       baActivityInd =  (tBaActivityInd *)vos_mem_malloc(allocSize) ;
-
       if(NULL == baActivityInd) 
       { 
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11091,7 +9922,6 @@
          VOS_ASSERT(0) ;
          return; 
       }
-
       vos_mem_copy(baActivityInd->bssId, wdiTriggerBaRsp->macBSSID, 
                                                     sizeof(tSirMacAddr)) ;
       baActivityInd->baCandidateCnt = baCandidateCount ;
@@ -11106,7 +9936,6 @@
          baCandidate = (baCandidate + i) ;
          vos_mem_copy(baCandidate->staAddr, wdiBaCandidate->macSTA, 
                                                    sizeof(tSirMacAddr)) ;
-
          for(tid = 0 ; tid < STACFG_MAX_TC; tid++)
          {
              baCandidate->baInfo[tid].fBaEnable = 
@@ -11115,7 +9944,6 @@
                               wdiBaCandidate->wdiBAInfo[tid].startingSeqNum ;
          }
       }
-
       WDA_SendMsg(pWDA, SIR_LIM_ADD_BA_IND, (void *)baActivityInd , 0) ;
    }
    else
@@ -11123,11 +9951,8 @@
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                             "BA Trigger RSP with Failure received ");
    }
-
    return ;
-
 }
-
 /*
  * BA Activity check timer handler
  */
@@ -11160,7 +9985,6 @@
       {
          tANI_U32 txPktCount = 0 ;
          tANI_U8 validStaIndex = pWDA->wdaStaInfo[curSta].ucValidStaIndex ;
-
          if((WDA_VALID_STA_INDEX == validStaIndex) &&
             (VOS_STATUS_SUCCESS == WDA_TL_GET_TX_PKTCOUNT( pWDA->pVosContext,
                                                     curSta, tid, &txPktCount)))
@@ -11182,7 +10006,6 @@
             pWDA->wdaStaInfo[curSta].framesTxed[tid] = txPktCount ;
          }
       }
-
       /* fill the entry for all the sta with given TID's */
       if(WDA_ENABLE_BA == newBaCandidate)
       { 
@@ -11193,7 +10016,6 @@
          newBaCandidate = WDA_DISABLE_BA ;
       } 
    }
-
    /* prepare and send message to hal */
    if( 0 < baCandidateCount)
    {
@@ -11201,7 +10023,6 @@
       WDI_TriggerBAReqParamsType *wdiTriggerBaReq;
       tWDA_ReqParams *pWdaParams = 
                (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
-
       if(NULL == pWdaParams) 
       {
          VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11219,7 +10040,6 @@
          vos_mem_free(pWdaParams);
          return; 
       }
-
       do
       {
          WDI_TriggerBAReqinfoType *triggerBaInfo = 
@@ -11234,7 +10054,6 @@
       wdiTriggerBaReq->wdiReqStatusCB = NULL ;
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
       pWdaParams->pWdaContext = pWDA;
       pWdaParams->wdaWdiApiMsgParam = wdiTriggerBaReq ;
       pWdaParams->wdaMsgParam = NULL; 
@@ -11254,7 +10073,6 @@
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO_LOW,
                               "There is no TID for initiating BA");
    }
-
    if( VOS_STATUS_SUCCESS != 
          WDA_STOP_TIMER(&pWDA->wdaTimers.baActivityChkTmr))
    {
@@ -11271,13 +10089,11 @@
    }
    return ;
 }
-
 /*
  * WDA common routine to create timer used by WDA.
  */
 static VOS_STATUS wdaCreateTimers(tWDA_CbContext *pWDA)
 {
-
    VOS_STATUS status = VOS_STATUS_SUCCESS ;
    tANI_U32 val = 0 ;
    tpAniSirGlobal pMac = (tpAniSirGlobal )VOS_GET_MAC_CTXT(pWDA->pVosContext);
@@ -11308,14 +10124,11 @@
                                "Unable to create BA activity timer");
       return eSIR_FAILURE ;
    }
-
    val = SYS_MS_TO_TICKS( WDA_TX_COMPLETE_TIME_OUT_VALUE ) ; 
-
    /* Tx Complete Timeout timer */
    status = WDA_CREATE_TIMER(&pWDA->wdaTimers.TxCompleteTimer,
                          "Tx Complete Check timer", WDA_TimerHandler,
                          WDA_TX_COMPLETE_TIMEOUT_IND, val, val, TX_NO_ACTIVATE) ;
-
    if(status != TX_SUCCESS)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11330,17 +10143,14 @@
       } 
       return eSIR_FAILURE ;
    }
-
    return eSIR_SUCCESS ;
 }
-
 /*
  * WDA common routine to destroy timer used by WDA.
  */
 static VOS_STATUS wdaDestroyTimers(tWDA_CbContext *pWDA)
 {
    VOS_STATUS status = VOS_STATUS_SUCCESS ;
-
    status = WDA_DESTROY_TIMER(&pWDA->wdaTimers.TxCompleteTimer);
    if(status != TX_SUCCESS)
    {
@@ -11348,7 +10158,6 @@
                                "Unable to Destroy Tx Complete Timeout timer");
       return eSIR_FAILURE ;
    }
-
    status = WDA_DESTROY_TIMER(&pWDA->wdaTimers.baActivityChkTmr);
    if(status != TX_SUCCESS)
    {
@@ -11359,7 +10168,6 @@
                            
    return eSIR_SUCCESS ;
 }
-
 /*
  * WDA timer handler.
  */
@@ -11367,30 +10175,25 @@
 {
    VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
    vos_msg_t wdaMsg = {0} ;
-
    /*
     * trigger CFG download in WDA by sending WDA_CFG_DNLD message
     */ 
    wdaMsg.type = timerInfo ; 
    wdaMsg.bodyptr = NULL;
    wdaMsg.bodyval = 0;
-
    /* post the message.. */
    vosStatus = vos_mq_post_message( VOS_MQ_ID_WDA, &wdaMsg );
    if ( !VOS_IS_STATUS_SUCCESS(vosStatus) )
    {
       vosStatus = VOS_STATUS_E_BADMSG;
    }
-
 }
-
 /*
  * WDA Tx Complete timeout Indication.
  */
 void WDA_ProcessTxCompleteTimeOutInd(tWDA_CbContext* pWDA)
 {
    tpAniSirGlobal pMac = (tpAniSirGlobal )VOS_GET_MAC_CTXT(pWDA->pVosContext) ;
-
    if( pWDA->pAckTxCbFunc )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11403,9 +10206,7 @@
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
             "There is no request pending for TxComplete and wait timer expired\n");
    }
-
 }
-
 /*
  * WDA Set REG Domain to VOS NV
  */
@@ -11419,7 +10220,6 @@
 }
 #endif  /* FEATURE_WLAN_INTEGRATED_SOC */
 
-
 #ifdef FEATURE_WLAN_SCAN_PNO
 /*
  * FUNCTION: WDA_PNOScanReqCallback
@@ -11428,10 +10228,8 @@
 void WDA_PNOScanReqCallback(WDI_Status status, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
     if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11439,14 +10237,12 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    if( pWdaParams != NULL )
    {
       if( pWdaParams->wdaWdiApiMsgParam != NULL )
       {
          vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       }
-
       if( pWdaParams->wdaMsgParam != NULL)
       {
          vos_mem_free(pWdaParams->wdaMsgParam);
@@ -11457,7 +10253,6 @@
 
    return ;
 }
-
 /*
  * FUNCTION: WDA_UpdateScanParamsCallback
  * 
@@ -11465,10 +10260,8 @@
 void WDA_UpdateScanParamsCallback(WDI_Status status, void* pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
     if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11476,35 +10269,30 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    if( pWdaParams != NULL )
    {
       if( pWdaParams->wdaWdiApiMsgParam != NULL )
       {
          vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       }
-
       if( pWdaParams->wdaMsgParam != NULL)
       {
          vos_mem_free(pWdaParams->wdaMsgParam);
       }
       vos_mem_free(pWdaParams) ;
    }
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_SetPowerParamsCallback
  * 
  */ 
 void WDA_SetPowerParamsCallback(WDI_Status status, void* pUserData)
 {
-   tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData; 
+   tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
 
      VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
     if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11512,24 +10300,20 @@
       VOS_ASSERT(0) ;
       return ;
    }
-
    if( pWdaParams != NULL )
    {
       if( pWdaParams->wdaWdiApiMsgParam != NULL )
       {
          vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
       }
-
       if( pWdaParams->wdaMsgParam != NULL)
       {
          vos_mem_free(pWdaParams->wdaMsgParam);
       }
       vos_mem_free(pWdaParams) ;
    }
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessSetPreferredNetworkList
  * Request to WDI to set Preferred Network List.Offload
@@ -11542,10 +10326,8 @@
       (WDI_PNOScanReqParamsType *)vos_mem_malloc(sizeof(WDI_PNOScanReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
    v_U8_t   i; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == pwdiPNOScanReqInfo) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11553,7 +10335,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if(NULL == pWdaParams)
    {
@@ -11563,49 +10344,39 @@
       vos_mem_free(pwdiPNOScanReqInfo);
       return VOS_STATUS_E_NOMEM;
    }
-
    //
    // Fill wdiPNOScanReqInfo->wdiPNOScanInfo from pPNOScanReqParams
    //
    pwdiPNOScanReqInfo->wdiPNOScanInfo.bEnable = pPNOScanReqParams->enable;
    pwdiPNOScanReqInfo->wdiPNOScanInfo.wdiModePNO = pPNOScanReqParams->modePNO;
-
    pwdiPNOScanReqInfo->wdiPNOScanInfo.ucNetworksCount = 
       ( pPNOScanReqParams->ucNetworksCount < WDI_PNO_MAX_SUPP_NETWORKS )? 
         pPNOScanReqParams->ucNetworksCount : WDI_PNO_MAX_SUPP_NETWORKS ;
-
    for ( i = 0; i < pwdiPNOScanReqInfo->wdiPNOScanInfo.ucNetworksCount ; i++)
    {
       vos_mem_copy(&pwdiPNOScanReqInfo->wdiPNOScanInfo.aNetworks[i],
                    &pPNOScanReqParams->aNetworks[i],
                    sizeof(pwdiPNOScanReqInfo->wdiPNOScanInfo.aNetworks[i]));
    }
-
    /*Scan timer intervals*/
    vos_mem_copy(&pwdiPNOScanReqInfo->wdiPNOScanInfo.scanTimers,
                 &pPNOScanReqParams->scanTimers,
                 sizeof(pwdiPNOScanReqInfo->wdiPNOScanInfo.scanTimers));
-
    /*Probe template for 2.4GHz band*/
    pwdiPNOScanReqInfo->wdiPNOScanInfo.us24GProbeSize = 
       (pPNOScanReqParams->us24GProbeTemplateLen<WDI_PNO_MAX_PROBE_SIZE)?
       pPNOScanReqParams->us24GProbeTemplateLen:WDI_PNO_MAX_PROBE_SIZE; 
-
    vos_mem_copy( &pwdiPNOScanReqInfo->wdiPNOScanInfo.a24GProbeTemplate,
                 pPNOScanReqParams->p24GProbeTemplate,
                 pwdiPNOScanReqInfo->wdiPNOScanInfo.us24GProbeSize);
-
    /*Probe template for 5GHz band*/
    pwdiPNOScanReqInfo->wdiPNOScanInfo.us5GProbeSize = 
       (pPNOScanReqParams->us5GProbeTemplateLen<WDI_PNO_MAX_PROBE_SIZE)?
       pPNOScanReqParams->us5GProbeTemplateLen:WDI_PNO_MAX_PROBE_SIZE; 
-
    vos_mem_copy( &pwdiPNOScanReqInfo->wdiPNOScanInfo.a5GProbeTemplate,
                 pPNOScanReqParams->p5GProbeTemplate,
                 pwdiPNOScanReqInfo->wdiPNOScanInfo.us5GProbeSize);
-
    pwdiPNOScanReqInfo->wdiReqStatusCB = NULL;
-
    if((NULL != pWDA->wdaMsgParam) || (NULL != pWDA->wdaWdiApiMsgParam))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11621,10 +10392,8 @@
    pWdaParams->pWdaContext = pWDA;
    /* Store param pointer as passed in by caller */
    pWdaParams->wdaMsgParam = pPNOScanReqParams;
-
    status = WDI_SetPreferredNetworkReq(pwdiPNOScanReqInfo, 
                            (WDI_PNOScanCb)WDA_PNOScanReqCallback, pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11634,10 +10403,8 @@
       pWdaParams->wdaWdiApiMsgParam = NULL;
       pWdaParams->wdaMsgParam = NULL;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_RssiFilterCallback
  * 
@@ -11668,10 +10435,8 @@
    WDI_SetRssiFilterReqParamsType *pwdiSetRssiFilterReqInfo = 
       (WDI_SetRssiFilterReqParamsType *)vos_mem_malloc(sizeof(WDI_SetRssiFilterReqParamsType)) ;
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == pwdiSetRssiFilterReqInfo) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11679,7 +10444,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if(NULL == pWdaParams)
    {
@@ -11689,10 +10453,8 @@
       vos_mem_free(pwdiSetRssiFilterReqInfo);
       return VOS_STATUS_E_NOMEM;
    }
-
    pwdiSetRssiFilterReqInfo->rssiThreshold = pRssiFilterParams->rssiThreshold;
    pwdiSetRssiFilterReqInfo->wdiReqStatusCB = NULL;
-
    if((NULL != pWDA->wdaMsgParam) || (NULL != pWDA->wdaWdiApiMsgParam))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11702,17 +10464,14 @@
       vos_mem_free(pWdaParams);
       return VOS_STATUS_E_FAILURE;
    }
-
    /* Store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)pwdiSetRssiFilterReqInfo;
    pWdaParams->pWdaContext = pWDA;
    /* Store param pointer as passed in by caller */
    pWdaParams->wdaMsgParam = pRssiFilterParams;
-
    status = WDI_SetRssiFilterReq( pwdiSetRssiFilterReqInfo, 
                                  (WDI_PNOScanCb)WDA_RssiFilterCallback, 
                                  pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11722,11 +10481,9 @@
       pWdaParams->wdaWdiApiMsgParam = NULL;
       pWdaParams->wdaMsgParam = NULL;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
 
-
 /*
  * FUNCTION: WDA_ProcessUpdateScanParams
  * Request to WDI to update Scan Parameters
@@ -11740,10 +10497,8 @@
          sizeof(WDI_UpdateScanParamsInfoType)) ;
    tWDA_ReqParams *pWdaParams ;
    v_U8_t i; 
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == wdiUpdateScanParamsInfoType) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11751,7 +10506,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if ( NULL == pWdaParams )
    {
@@ -11761,11 +10515,9 @@
       vos_mem_free(wdiUpdateScanParamsInfoType);
       return VOS_STATUS_E_NOMEM;
    }
-
    //
    // Fill wdiUpdateScanParamsInfoType->wdiUpdateScanParamsInfo from pUpdateScanParams
    //
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
           "Update Scan Parameters b11dEnabled %d b11dResolved %d "
           "ucChannelCount %d usPassiveMinChTime %d usPassiveMaxChTime"
@@ -11781,16 +10533,12 @@
               sizeof(tSirUpdateScanParams),
               sizeof(wdiUpdateScanParamsInfoType->wdiUpdateScanParamsInfo) ); 
 
-
    wdiUpdateScanParamsInfoType->wdiUpdateScanParamsInfo.b11dEnabled  =
       pUpdateScanParams->b11dEnabled;
-
    wdiUpdateScanParamsInfoType->wdiUpdateScanParamsInfo.b11dResolved =
       pUpdateScanParams->b11dResolved;
-
    wdiUpdateScanParamsInfoType->wdiUpdateScanParamsInfo.cbState = 
       pUpdateScanParams->ucCBState;
-
    wdiUpdateScanParamsInfoType->wdiUpdateScanParamsInfo.usActiveMaxChTime  =
       pUpdateScanParams->usActiveMaxChTime; 
    wdiUpdateScanParamsInfoType->wdiUpdateScanParamsInfo.usActiveMinChTime  = 
@@ -11800,12 +10548,10 @@
    wdiUpdateScanParamsInfoType->wdiUpdateScanParamsInfo.usPassiveMinChTime = 
      pUpdateScanParams->usPassiveMinChTime;
 
-
    wdiUpdateScanParamsInfoType->wdiUpdateScanParamsInfo.ucChannelCount = 
       (pUpdateScanParams->ucChannelCount < WDI_PNO_MAX_NETW_CHANNELS)?
       pUpdateScanParams->ucChannelCount:WDI_PNO_MAX_NETW_CHANNELS;
 
-
    for ( i = 0; i < 
          wdiUpdateScanParamsInfoType->wdiUpdateScanParamsInfo.ucChannelCount ; 
          i++)
@@ -11818,9 +10564,7 @@
          pUpdateScanParams->aChannels[i];
    }
 
-
    wdiUpdateScanParamsInfoType->wdiReqStatusCB = NULL;
-
    if((NULL != pWDA->wdaMsgParam) || (NULL != pWDA->wdaWdiApiMsgParam))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11830,19 +10574,17 @@
       vos_mem_free(wdiUpdateScanParamsInfoType);
       return VOS_STATUS_E_FAILURE;
    }
-
      /* Store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = wdiUpdateScanParamsInfoType;
    pWdaParams->pWdaContext = pWDA;
    /* Store param pointer as passed in by caller */
    pWdaParams->wdaMsgParam = pUpdateScanParams;
-
+ 
  
 
    status = WDI_UpdateScanParamsReq(wdiUpdateScanParamsInfoType, 
                     (WDI_UpdateScanParamsCb)WDA_UpdateScanParamsCallback, 
                     pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11851,11 +10593,9 @@
       vos_mem_free(pWdaParams->wdaMsgParam);
       vos_mem_free(pWdaParams);
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
 #endif // FEATURE_WLAN_SCAN_PNO
-
 #ifdef WLAN_FEATURE_PACKET_FILTERING
 /*
  * FUNCTION: WDA_8023MulticastListReqCallback
@@ -11864,10 +10604,8 @@
 void WDA_8023MulticastListReqCallback(WDI_Status status, void * pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11879,14 +10617,11 @@
    vos_mem_free(pWdaParams->wdaMsgParam) ;
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    //print a msg, nothing else to do
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
               "WDA_8023MulticastListReqCallback invoked " );
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_Process8023MulticastListReq
  * Request to WDI to add 8023 Multicast List
@@ -11898,10 +10633,8 @@
    WDI_RcvFltPktSetMcListReqParamsType *pwdiFltPktSetMcListReqParamsType = NULL;
    tWDA_ReqParams *pWdaParams ;
    tANI_U8         i;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    pwdiFltPktSetMcListReqParamsType = 
       (WDI_RcvFltPktSetMcListReqParamsType *)vos_mem_malloc(
                              sizeof(WDI_RcvFltPktSetMcListReqParamsType)
@@ -11912,7 +10645,6 @@
                            "%s: VOS MEM Alloc Failure", __FUNCTION__); 
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if(NULL == pWdaParams)
    {
@@ -11921,7 +10653,6 @@
       vos_mem_free(pwdiFltPktSetMcListReqParamsType);
       return VOS_STATUS_E_NOMEM;
    }
-
    if((NULL != pWDA->wdaMsgParam) || (NULL != pWDA->wdaWdiApiMsgParam))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11931,35 +10662,35 @@
       vos_mem_free(pWdaParams);
       return VOS_STATUS_E_FAILURE;
    }
-
    //
    // Fill pwdiFltPktSetMcListReqParamsType from pRcvFltMcAddrList
    //
    pwdiFltPktSetMcListReqParamsType->mcAddrList.ulMulticastAddrCnt = 
-                                   pRcvFltMcAddrList->ulMulticastAddrCnt; 
+                                   pRcvFltMcAddrList->ulMulticastAddrCnt;
+
+    vos_mem_copy(pwdiFltPktSetMcListReqParamsType->mcAddrList.selfMacAddr,
+                 pRcvFltMcAddrList->selfMacAddr, sizeof(tSirMacAddr));
+    vos_mem_copy(pwdiFltPktSetMcListReqParamsType->mcAddrList.bssId,
+                 pRcvFltMcAddrList->bssId, sizeof(tSirMacAddr));
+
    for( i = 0; i < pRcvFltMcAddrList->ulMulticastAddrCnt; i++ )
    {
       vos_mem_copy(&(pwdiFltPktSetMcListReqParamsType->mcAddrList.multicastAddr[i]),
                    &(pRcvFltMcAddrList->multicastAddr[i]),
                    sizeof(tSirMacAddr));
    }
-
    pwdiFltPktSetMcListReqParamsType->wdiReqStatusCB = NULL;
-
   /* WDA_VOS_ASSERT((NULL == pWDA->wdaMsgParam) && 
                   (NULL == pWDA->wdaWdiApiMsgParam)); */
-
    /* Store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)pwdiFltPktSetMcListReqParamsType;
    pWdaParams->pWdaContext = pWDA;
    /* Store param pointer as passed in by caller */
    pWdaParams->wdaMsgParam = pRcvFltMcAddrList;
-
    status = WDI_8023MulticastListReq(
                         pwdiFltPktSetMcListReqParamsType, 
                         (WDI_8023MulticastListCb)WDA_8023MulticastListReqCallback,
                         pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11968,10 +10699,8 @@
       vos_mem_free(pWdaParams->wdaMsgParam);
       vos_mem_free(pWdaParams);
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_ReceiveFilterSetFilterReqCallback
  * 
@@ -11979,12 +10708,9 @@
 void WDA_ReceiveFilterSetFilterReqCallback(WDI_Status status, void * pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    /*WDA_VOS_ASSERT(NULL != pWdaParams);*/
-
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -11996,14 +10722,11 @@
    vos_mem_free(pWdaParams->wdaMsgParam) ;
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    //print a msg, nothing else to do
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
               "WDA_ReceiveFilterSetFilterReqCallback invoked " );
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessReceiveFilterSetFilterReq
  * Request to WDI to set Receive Filters
@@ -12018,10 +10741,8 @@
       (WDI_SetRcvPktFilterReqParamsType *)vos_mem_malloc(allocSize) ;
    tWDA_ReqParams *pWdaParams ;
    tANI_U8         i;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == pwdiSetRcvPktFilterReqParamsType) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -12029,7 +10750,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if(NULL == pWdaParams)
    {
@@ -12039,11 +10759,15 @@
       vos_mem_free(pwdiSetRcvPktFilterReqParamsType);
       return VOS_STATUS_E_NOMEM;
    }
-
    pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.filterId = pRcvPktFilterCfg->filterId;
    pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.filterType = pRcvPktFilterCfg->filterType;   
    pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.numFieldParams = pRcvPktFilterCfg->numFieldParams;
    pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.coalesceTime = pRcvPktFilterCfg->coalesceTime;
+   vos_mem_copy(pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.selfMacAddr,
+                pRcvPktFilterCfg->selfMacAddr, sizeof(wpt_macAddr));
+
+   vos_mem_copy(pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.bssId,
+                      pRcvPktFilterCfg->bssId, sizeof(wpt_macAddr));
 
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
               "FID %d FT %d NParams %d CT %d",
@@ -12051,27 +10775,23 @@
               pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.filterType,
               pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.numFieldParams, 
               pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.coalesceTime);
-
    for ( i = 0; i < pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.numFieldParams; i++ )
    {
      wpalMemoryCopy(&pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.paramsData[i],
                     &pRcvPktFilterCfg->paramsData[i],
                     sizeof(pwdiSetRcvPktFilterReqParamsType->wdiPktFilterCfg.paramsData[i]));
-
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO, 
                  "Proto %d Comp Flag %d \n",
                  pwdiSetRcvPktFilterReqParamsType->
                          wdiPktFilterCfg.paramsData[i].protocolLayer, 
                  pwdiSetRcvPktFilterReqParamsType->
                          wdiPktFilterCfg.paramsData[i].cmpFlag);
-
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO, 
                  "Data Offset %d Data Len %d\n",
                  pwdiSetRcvPktFilterReqParamsType->
                          wdiPktFilterCfg.paramsData[i].dataOffset, 
                  pwdiSetRcvPktFilterReqParamsType->
                          wdiPktFilterCfg.paramsData[i].dataLength);
-
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO, 
                  "CData: %d:%d:%d:%d:%d:%d\n",
                  pwdiSetRcvPktFilterReqParamsType->
@@ -12086,7 +10806,6 @@
                          wdiPktFilterCfg.paramsData[i].compareData[4], 
                  pwdiSetRcvPktFilterReqParamsType->
                          wdiPktFilterCfg.paramsData[i].compareData[5]);
-
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO, 
                  "MData: %d:%d:%d:%d:%d:%d\n",
                  pwdiSetRcvPktFilterReqParamsType->
@@ -12101,21 +10820,16 @@
                          wdiPktFilterCfg.paramsData[i].dataMask[4], 
                  pwdiSetRcvPktFilterReqParamsType->
                          wdiPktFilterCfg.paramsData[i].dataMask[5]);
-
    }
-
    pwdiSetRcvPktFilterReqParamsType->wdiReqStatusCB = NULL;
-
    /* Store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)pwdiSetRcvPktFilterReqParamsType;
    pWdaParams->pWdaContext = pWDA;
    /* Store param pointer as passed in by caller */
    pWdaParams->wdaMsgParam = pRcvPktFilterCfg;
-
    status = WDI_ReceiveFilterSetFilterReq(pwdiSetRcvPktFilterReqParamsType,
            (WDI_ReceiveFilterSetFilterCb)WDA_ReceiveFilterSetFilterReqCallback,
            pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -12124,10 +10838,8 @@
       vos_mem_free(pWdaParams->wdaMsgParam);
       vos_mem_free(pWdaParams);
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_FilterMatchCountReqCallback
  * 
@@ -12144,20 +10856,27 @@
 
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
    /*WDA_VOS_ASSERT(NULL != pWdaParams);*/
 
+   if(NULL == pRcvFltPktMatchCntRsp)
+   {
+      VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+                 "%s: pRcvFltPktMatchCntRsp is NULL", __FUNCTION__);
+      VOS_ASSERT(0) ;
+	  vos_mem_free(pWdaParams);
+      return ;
+   }
+   
    if(NULL == pWdaParams)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                  "%s: pWdaParams received NULL", __FUNCTION__);
       VOS_ASSERT(0) ;
+	  vos_mem_free(pRcvFltPktMatchCntRsp);
       return ;
    }
-
    pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext ;
    pRcvFltPktMatchCntReq = (tpSirRcvFltPktMatchRsp)pWdaParams->wdaMsgParam;
-
    // Fill pRcvFltPktMatchCntRsp from pRcvFltPktMatchCntReq
    vos_mem_zero(pRcvFltPktMatchCntRsp,sizeof(tSirRcvFltPktMatchRsp));
 
@@ -12172,7 +10891,6 @@
       pRcvFltPktMatchCntRsp->filterMatchCnt[i].filterId = pRcvFltPktMatchCntReq->filterMatchCnt[i].filterId;
       pRcvFltPktMatchCntRsp->filterMatchCnt[i].matchCnt = pRcvFltPktMatchCntReq->filterMatchCnt[i].matchCnt;
    }
-
    /* VOS message wrapper */
    vosMsg.type = eWNI_PMC_PACKET_COALESCING_FILTER_MATCH_COUNT_RSP;
    vosMsg.bodyptr = (void *)pRcvFltPktMatchCntRsp;
@@ -12187,7 +10905,6 @@
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
 }
-
 /*
  * FUNCTION: WDA_ProcessPacketFilterMatchCountReq
  * Request to WDI to get PC Filter Match Count
@@ -12198,10 +10915,8 @@
    WDI_RcvFltPktMatchCntReqParamsType *pwdiRcvFltPktMatchCntReqParamsType = 
       (WDI_RcvFltPktMatchCntReqParamsType *)vos_mem_malloc(sizeof(WDI_RcvFltPktMatchCntReqParamsType));
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == pwdiRcvFltPktMatchCntReqParamsType) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -12209,7 +10924,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if(NULL == pWdaParams)
    {
@@ -12219,7 +10933,6 @@
       vos_mem_free(pwdiRcvFltPktMatchCntReqParamsType);
       return VOS_STATUS_E_NOMEM;
    }
-
    if((NULL != pWDA->wdaMsgParam) || (NULL != pWDA->wdaWdiApiMsgParam))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -12229,20 +10942,16 @@
       vos_mem_free(pWdaParams);
       return VOS_STATUS_E_FAILURE;
    }
-
    pwdiRcvFltPktMatchCntReqParamsType->wdiReqStatusCB = NULL;
 
-
    /* Store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)pwdiRcvFltPktMatchCntReqParamsType;
    pWdaParams->pWdaContext = pWDA;
    /* Store param pointer as passed in by caller */
    pWdaParams->wdaMsgParam = pRcvFltPktMatchRsp;
-
    status = WDI_FilterMatchCountReq(pwdiRcvFltPktMatchCntReqParamsType, 
                  (WDI_FilterMatchCountCb)WDA_FilterMatchCountReqCallback,
                  pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       /* failure returned by WDI API */
@@ -12253,10 +10962,8 @@
       pRcvFltPktMatchRsp->status = eSIR_FAILURE ;
       WDA_SendMsg(pWDA, WDA_PACKET_COALESCING_FILTER_MATCH_COUNT_RSP, (void *)pRcvFltPktMatchRsp, 0) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
-
 /*
  * FUNCTION: WDA_ReceiveFilterSetFilterReqCallback
  * 
@@ -12264,10 +10971,8 @@
 void WDA_ReceiveFilterClearFilterReqCallback(WDI_Status status, void * pUserData)
 {
    tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "<------ %s " ,__FUNCTION__);
-
 /*   WDA_VOS_ASSERT(NULL != pWdaParams); */
    if(NULL == pWdaParams)
    {
@@ -12280,14 +10985,11 @@
    vos_mem_free(pWdaParams->wdaMsgParam) ;
    vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
    vos_mem_free(pWdaParams) ;
-
    //print a msg, nothing else to do
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
               "WDA_ReceiveFilterClearFilterReqCallback invoked " );
-
    return ;
 }
-
 /*
  * FUNCTION: WDA_ProcessReceiveFilterClearFilterReq
  * Request to WDI to clear Receive Filters
@@ -12299,10 +11001,8 @@
    WDI_RcvFltPktClearReqParamsType *pwdiRcvFltPktClearReqParamsType =
       (WDI_RcvFltPktClearReqParamsType *)vos_mem_malloc(sizeof(WDI_RcvFltPktClearReqParamsType));
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == pwdiRcvFltPktClearReqParamsType)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -12310,7 +11010,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if(NULL == pWdaParams)
    {
@@ -12320,34 +11019,32 @@
       vos_mem_free(pwdiRcvFltPktClearReqParamsType);
       return VOS_STATUS_E_NOMEM;
    }
-
    pwdiRcvFltPktClearReqParamsType->filterClearParam.status = pRcvFltPktClearParam->status;
    pwdiRcvFltPktClearReqParamsType->filterClearParam.filterId = pRcvFltPktClearParam->filterId;
+   vos_mem_copy(pwdiRcvFltPktClearReqParamsType->filterClearParam.selfMacAddr,
+                     pRcvFltPktClearParam->selfMacAddr, sizeof(wpt_macAddr));
+   vos_mem_copy(pwdiRcvFltPktClearReqParamsType->filterClearParam.bssId,
+                         pRcvFltPktClearParam->bssId, sizeof(wpt_macAddr));
 
    pwdiRcvFltPktClearReqParamsType->wdiReqStatusCB = NULL;
-
    /* Store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)pwdiRcvFltPktClearReqParamsType;
    pWdaParams->pWdaContext = pWDA;
    /* Store param pointer as passed in by caller */
    pWdaParams->wdaMsgParam = pRcvFltPktClearParam;
-
    status = WDI_ReceiveFilterClearFilterReq(pwdiRcvFltPktClearReqParamsType,
        (WDI_ReceiveFilterClearFilterCb)WDA_ReceiveFilterClearFilterReqCallback,
        pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
               "Failure in WDA_ProcessReceiveFilterClearFilterReq(), free all the memory " );
       vos_mem_free(pWdaParams->wdaWdiApiMsgParam) ;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
 #endif // WLAN_FEATURE_PACKET_FILTERING
 
-
 /*
  * FUNCTION: WDA_ProcessSetPowerParamsReq
  * Request to WDI to set power params 
@@ -12358,12 +11055,9 @@
    WDI_Status status;
    WDI_SetPowerParamsReqParamsType *pwdiSetPowerParamsReqInfo = 
       (WDI_SetPowerParamsReqParamsType *)vos_mem_malloc(sizeof(WDI_SetPowerParamsReqParamsType)) ;
-
    tWDA_ReqParams *pWdaParams ;
-
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if(NULL == pwdiSetPowerParamsReqInfo) 
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -12371,7 +11065,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_NOMEM;
    }
-
    pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams)) ;
    if(NULL == pWdaParams)
    {
@@ -12381,14 +11074,12 @@
       vos_mem_free(pwdiSetPowerParamsReqInfo);
       return VOS_STATUS_E_NOMEM;
    }
-
+   
    
    pwdiSetPowerParamsReqInfo->wdiSetPowerParamsInfo.uIgnoreDTIM       = 
       pPowerParams->uIgnoreDTIM;
-
    pwdiSetPowerParamsReqInfo->wdiSetPowerParamsInfo.uDTIMPeriod       = 
       pPowerParams->uDTIMPeriod;
-
    pwdiSetPowerParamsReqInfo->wdiSetPowerParamsInfo.uListenInterval   = 
       pPowerParams->uListenInterval;
    pwdiSetPowerParamsReqInfo->wdiSetPowerParamsInfo.uBcastMcastFilter = 
@@ -12397,9 +11088,7 @@
       pPowerParams->uEnableBET;
    pwdiSetPowerParamsReqInfo->wdiSetPowerParamsInfo.uBETInterval      = 
       pPowerParams->uBETInterval; 
-
    pwdiSetPowerParamsReqInfo->wdiReqStatusCB = NULL;
-
    if((NULL != pWDA->wdaMsgParam) || (NULL != pWDA->wdaWdiApiMsgParam))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -12409,17 +11098,14 @@
       vos_mem_free(pWdaParams);
       return VOS_STATUS_E_FAILURE;
    }
-
    /* Store Params pass it to WDI */
    pWdaParams->wdaWdiApiMsgParam = (void *)pwdiSetPowerParamsReqInfo;
    pWdaParams->pWdaContext = pWDA;
    /* Store param pointer as passed in by caller */
    pWdaParams->wdaMsgParam = pPowerParams;
-
    status = WDI_SetPowerParamsReq( pwdiSetPowerParamsReqInfo, 
                                  (WDI_SetPowerParamsCb)WDA_SetPowerParamsCallback, 
                                  pWdaParams);
-
    if(IS_WDI_STATUS_FAILURE(status))
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -12429,7 +11115,6 @@
       pWdaParams->wdaWdiApiMsgParam = NULL;
       pWdaParams->wdaMsgParam = NULL;
    }
-
    return CONVERT_WDI2VOS_STATUS(status) ;
 }
 
@@ -12527,14 +11212,12 @@
    
    VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
                                           "------> %s " ,__FUNCTION__);
-
    if( pTxCtrlParam == NULL )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
                            "%s: Input tpTxControlParams is NULL", __FUNCTION__); 
       return VOS_STATUS_E_FAILURE;
    }
-
    if( pTxCtrlParam->stopTx == eANI_BOOLEAN_TRUE )
    {
       wdaStatus = WDA_SuspendDataTx(pWDA);
@@ -12543,7 +11226,6 @@
    {
       wdaStatus = WDA_ResumeDataTx(pWDA);
    }
-
    return wdaStatus;
 }
 
@@ -12592,7 +11274,6 @@
    //tANI_U8    eventIdx = 0;
    VOS_STATUS status = VOS_STATUS_SUCCESS;
    tWDA_CbContext *pWDA = (tWDA_CbContext *)VOS_GET_WDA_CTXT(pVosContext);
-
    if (NULL == pWDA)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -12600,7 +11281,6 @@
       VOS_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
-
    /* FTM mode stay START_STATE */
    if( (WDA_READY_STATE != pWDA->wdaState) &&
          (WDA_INIT_STATE != pWDA->wdaState) &&
@@ -12608,7 +11288,6 @@
    {
       VOS_ASSERT(0);
    }
-
    if(NULL != pWDA->wdaWdiApiMsgParam)
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -12618,16 +11297,13 @@
        * initiated by WLAN driver (WDI timeout) */
       vos_mem_free(pWDA->wdaWdiApiMsgParam);
    }
-
    if ( eDRIVER_TYPE_MFG != pWDA->driverMode )
    {
       wdaDestroyTimers(pWDA);
    }
    pWDA->wdaWdiApiMsgParam = NULL;
-
    /* call WDI shutdown */
    wdiStatus = WDI_Shutdown(closeTransport);
-
    if (IS_WDI_STATUS_FAILURE(wdiStatus) )
    {
       VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -12637,7 +11313,6 @@
    /* WDI stop is synchrnous, shutdown is complete when it returns */
    pWDA->wdaState = WDA_STOP_STATE;
 
-
    /* shutdown should perform the stop & close actions. */
    /* Destroy the event */
    status = vos_event_destroy(&pWDA->txFrameEvent);
@@ -12661,7 +11336,6 @@
                   "VOS Event destroy failed - status = %d\n", status);
       status = VOS_STATUS_E_FAILURE;
    }
-
    /* free WDA context */
    status = vos_free_context(pVosContext,VOS_MODULE_ID_WDA,pWDA);
    if ( !VOS_IS_STATUS_SUCCESS(status) )
@@ -12670,6 +11344,27 @@
                                   "error in WDA close " );
       status = VOS_STATUS_E_FAILURE;
    }
-
    return status;
 }
+/*
+ * FUNCTION: WDA_stopFailed
+ * WDA stop failed
+ */
+
+void WDA_stopFailed(v_PVOID_t pVosContext)
+{
+   tWDA_CbContext *pWDA = (tWDA_CbContext *)VOS_GET_WDA_CTXT(pVosContext);
+   pWDA->needShutdown  = TRUE;
+}
+/*
+ * FUNCTION: WDA_needShutdown
+ * WDA needs a shutdown
+ */
+
+v_BOOL_t WDA_needShutdown(v_PVOID_t pVosContext)
+{
+   tWDA_CbContext *pWDA = (tWDA_CbContext *)VOS_GET_WDA_CTXT(pVosContext);
+   return pWDA->needShutdown;   
+}
+
+
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi.h b/CORE/WDI/CP/inc/wlan_qct_wdi.h
index 9da9d88..c0768fb 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi.h
@@ -177,7 +177,17 @@
 {
   WDI_SECONDARY_CHANNEL_OFFSET_NONE   = 0,
   WDI_SECONDARY_CHANNEL_OFFSET_UP     = 1,
-  WDI_SECONDARY_CHANNEL_OFFSET_DOWN   = 3
+  WDI_SECONDARY_CHANNEL_OFFSET_DOWN   = 3,
+#ifdef WLAN_FEATURE_11AC
+  WDI_CHANNEL_20MHZ_LOW_40MHZ_CENTERED = 4, //20/40MHZ offset LOW 40/80MHZ offset CENTERED
+  WDI_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED = 5, //20/40MHZ offset CENTERED 40/80MHZ offset CENTERED
+  WDI_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED = 6, //20/40MHZ offset HIGH 40/80MHZ offset CENTERED
+  WDI_CHANNEL_20MHZ_LOW_40MHZ_LOW = 7,//20/40MHZ offset LOW 40/80MHZ offset LOW
+  WDI_CHANNEL_20MHZ_HIGH_40MHZ_LOW = 8, //20/40MHZ offset HIGH 40/80MHZ offset LOW
+  WDI_CHANNEL_20MHZ_LOW_40MHZ_HIGH = 9, //20/40MHZ offset LOW 40/80MHZ offset HIGH
+  WDI_CHANNEL_20MHZ_HIGH_40MHZ_HIGH = 10,//20/40MHZ offset-HIGH 40/80MHZ offset HIGH
+#endif
+  WDI_SECONDARY_CHANNEL_OFFSET_MAX
 }WDI_HTSecondaryChannelOffset;
 
 /*---------------------------------------------------------------------------
@@ -883,7 +893,17 @@
   WDI_PHY_SINGLE_CHANNEL_CENTERED = 0,            
   WDI_PHY_DOUBLE_CHANNEL_LOW_PRIMARY = 1,     
   WDI_PHY_DOUBLE_CHANNEL_CENTERED = 2,            
-  WDI_PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3     
+  WDI_PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3,
+#ifdef WLAN_FEATURE_11AC
+  WDI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED = 4, //20/40MHZ offset LOW 40/80MHZ offset CENTERED
+  WDI_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED = 5, //20/40MHZ offset CENTERED 40/80MHZ offset CENTERED
+  WDI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED = 6, //20/40MHZ offset HIGH 40/80MHZ offset CENTERED
+  WDI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW = 7,//20/40MHZ offset LOW 40/80MHZ offset LOW
+  WDI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW = 8, //20/40MHZ offset HIGH 40/80MHZ offset LOW
+  WDI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH = 9, //20/40MHZ offset LOW 40/80MHZ offset HIGH
+  WDI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH = 10,//20/40MHZ offset-HIGH 40/80MHZ offset HIGH
+#endif
+  WDI_MAX_CB_STATE
 } WDI_PhyChanBondState;
 
 /*---------------------------------------------------------------------------
@@ -1151,6 +1171,20 @@
      */
     wpt_uint16         aRxHighestDataRate;
 
+   
+#ifdef WLAN_FEATURE_11AC
+   /*Indicates the Maximum MCS that can be received for each number
+        of spacial streams */
+    wpt_uint16         vhtRxMCSMap;
+  /*Indicate the highest VHT data rate that the STA is able to receive*/
+    wpt_uint16         vhtRxHighestDataRate;
+  /*Indicates the Maximum MCS that can be transmitted  for each number
+       of spacial streams */
+    wpt_uint16         vhtTxMCSMap;
+  /*Indicate the highest VHT data rate that the STA is able to transmit*/
+    wpt_uint16         vhtTxHighestDataRate;
+#endif
+
 } WDI_SupportedRates;
 
 /*-------------------------------------------------------------------------- 
@@ -1263,6 +1297,10 @@
   wpt_uint8                 ucDsssCckMode40Mhz;
 
   wpt_uint8                 ucP2pCapableSta;
+#ifdef WLAN_FEATURE_11AC
+  wpt_uint8                 ucVhtCapableSta;
+  wpt_uint8                 ucVhtTxChannelWidthSet;
+#endif
 }WDI_ConfigStaReqInfoType;
 
 
@@ -1796,6 +1834,11 @@
   WDI_SetSTAKeyReqInfoType  wdiExtSetKeyParam;
 #endif
 
+#ifdef WLAN_FEATURE_11AC
+  wpt_uint8                 ucVhtCapableSta;
+  wpt_uint8                 ucVhtTxChannelWidthSet;
+#endif
+
 }WDI_ConfigBSSReqInfoType;
 
 /*---------------------------------------------------------------------------
@@ -3032,6 +3075,7 @@
 typedef struct
 {
    wpt_uint8     ucSendDataNull;
+   wpt_uint8     bssIdx;
 }WDI_ExitBmpsReqinfoType;
 
 /*---------------------------------------------------------------------------
@@ -3065,6 +3109,7 @@
    wpt_uint8     ucBeTriggerEnabled:1;
    wpt_uint8     ucViTriggerEnabled:1;
    wpt_uint8     ucVoTriggerEnabled:1;
+   wpt_uint8     bssIdx;
 }WDI_EnterUapsdReqinfoType;
 
 /*---------------------------------------------------------------------------
@@ -3249,6 +3294,7 @@
    wpt_uint8 srcIPv6AddrValid : 1;
    wpt_uint8 targetIPv6Addr1Valid : 1;
    wpt_uint8 targetIPv6Addr2Valid : 1;
+   wpt_uint8 bssIdx;
 } WDI_NSOffloadParams;
 #endif //WLAN_NS_OFFLOAD
 
@@ -3256,6 +3302,7 @@
 {
    wpt_uint8 ucOffloadType;
    wpt_uint8 ucEnableOrDisable;
+   wpt_uint8 bssIdx;
    union
    {
        wpt_uint8 aHostIpv4Addr [4];
@@ -3294,6 +3341,7 @@
     wpt_uint8  aHostIpv4Addr[4];
     wpt_uint8  aDestIpv4Addr[4];
     wpt_uint8  aDestMacAddr[6];
+    wpt_uint8  bssIdx;
 } WDI_KeepAliveReqType;
 
 /*---------------------------------------------------------------------------
@@ -3329,6 +3377,7 @@
    wpt_uint8  ucPatternMask[WDI_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
    wpt_uint8  ucPatternExt[WDI_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra pattern
    wpt_uint8  ucPatternMaskExt[WDI_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra pattern mask
+   wpt_uint8  bssIdx;
 } WDI_WowlAddBcPtrnInfoType;
 
 /*---------------------------------------------------------------------------
@@ -3558,6 +3607,52 @@
   void*             pUserData;
 }WDI_BtAmpEventParamsType;
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+#ifndef OEM_DATA_REQ_SIZE
+#define OEM_DATA_REQ_SIZE 70
+#endif
+#ifndef OEM_DATA_RSP_SIZE
+#define OEM_DATA_RSP_SIZE 968
+#endif
+
+/*----------------------------------------------------------------------------
+  WDI_oemDataReqInfoType
+----------------------------------------------------------------------------*/
+typedef struct
+{
+  wpt_macAddr                  selfMacAddr;
+  wpt_uint8                    oemDataReq[OEM_DATA_REQ_SIZE];
+}WDI_oemDataReqInfoType;
+
+/*----------------------------------------------------------------------------
+  WDI_oemDataReqParamsType
+----------------------------------------------------------------------------*/
+typedef struct
+{
+  /*Request status callback offered by UMAC - it is called if the current
+    req has returned PENDING as status; it delivers the status of sending
+    the message over the BUS */
+  WDI_ReqStatusCb                wdiReqStatusCB; 
+
+  /*The user data passed in by UMAC, it will be sent back when the above
+    function pointer will be called */
+  void*                          pUserData;
+
+  /*OEM DATA REQ Info */
+  WDI_oemDataReqInfoType         wdiOemDataReqInfo;
+
+}WDI_oemDataReqParamsType;
+
+/*----------------------------------------------------------------------------
+  WDI_oemDataRspParamsType
+----------------------------------------------------------------------------*/
+typedef struct
+{
+  wpt_uint8           oemDataRsp[OEM_DATA_RSP_SIZE];
+}WDI_oemDataRspParamsType;
+
+#endif /* FEATURE_OEM_DATA_SUPPORT */
 
 #ifdef WLAN_FEATURE_VOWIFI_11R
 /*---------------------------------------------------------------------------
@@ -4165,6 +4260,8 @@
   wpt_uint32                      numFieldParams;
   wpt_uint32                      coalesceTime;
   WDI_RcvPktFilterFieldParams     paramsData[1];
+  wpt_macAddr                     selfMacAddr;
+  wpt_macAddr                     bssId;
 }WDI_RcvPktFilterCfgType;
 
 typedef struct 
@@ -4240,6 +4337,8 @@
 {
   wpt_uint32   status;  /* only valid for response message */
   wpt_uint8    filterId;
+  wpt_macAddr  selfMacAddr;
+  wpt_macAddr  bssId;
 }WDI_RcvFltPktClearParam;
 
 typedef struct
@@ -4262,6 +4361,8 @@
 {
   wpt_uint32     ulMulticastAddrCnt;
   wpt_macAddr    multicastAddr[WDI_MAX_NUM_MULTICAST_ADDRESS];
+  wpt_macAddr    selfMacAddr;
+  wpt_macAddr    bssId;
 } WDI_RcvFltMcAddrListType;
 
 typedef struct
@@ -5596,6 +5697,30 @@
 typedef void  (*WDI_BtAmpEventRspCb)(WDI_Status   wdiStatus,
                                      void*        pUserData);
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/*---------------------------------------------------------------------------
+   WDI_oemDataRspCb
+ 
+   DESCRIPTION   
+ 
+   This callback is invoked by DAL when it has received a Start oem data response from
+   the underlying device.
+ 
+   PARAMETERS 
+
+    IN
+    wdiStatus:  response status received from HAL
+    pUserData:  user data  
+    
+    
+  
+  RETURN VALUE 
+    The result code associated with performing the operation
+---------------------------------------------------------------------------*/
+typedef void  (*WDI_oemDataRspCb)(WDI_oemDataRspParamsType* wdiOemDataRspParams, 
+                                  void*                     pUserData);
+
+#endif
 
 /*---------------------------------------------------------------------------
    WDI_HostResumeEventRspCb
@@ -7787,6 +7912,38 @@
   void*                     pUserData
 );
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/**
+ @brief WDI_Start oem data Req will be called when the upper MAC 
+        wants to notify the lower mac on a oem data Req event.Upon
+        the call of this API the WLAN DAL will pack and send a
+        HAL OEM Data Req event request message to the lower RIVA
+        sub-system if DAL is in state STARTED.
+
+        In state BUSY this request will be queued. Request won't
+        be allowed in any other state. 
+
+  
+ @param pWdiOemDataReqParams: the oem data req parameters as 
+                      specified by the Device Interface
+  
+        wdiStartOemDataRspCb: callback for passing back the
+        response of the Oem Data Req received from the
+        device
+  
+        pUserData: user data will be passed back with the
+        callback 
+ 
+ @return Result of the function call
+*/
+WDI_Status 
+WDI_StartOemDataReq
+(
+  WDI_oemDataReqParamsType*       pWdiOemDataReqParams,
+  WDI_oemDataRspCb                wdiOemDataRspCb,
+  void*                           pUserData
+);
+#endif
 
 /*======================================================================== 
  
@@ -8633,8 +8790,8 @@
  
  @param 
   
-        feat_enum_value: enum value for the feature as in placeHolderInCapBitmap
-                                    in wlan_hal_msg.h.
+        feat_enum_value: enum value for the feature as in placeHolderInCapBitmap 
+        in wlan_hal_msg.h.
 
  @see
  @return 
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi_bd.h b/CORE/WDI/CP/inc/wlan_qct_wdi_bd.h
index 8c91bb6..dd73dcf 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi_bd.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi_bd.h
@@ -94,13 +94,32 @@
         /** This bit filled by rxp when set indicates if the current tsf is smaller
         than received tsf */
         wpt_uint32 rtsf:1;
-    
+
+#ifdef WCN_PRONTO_CSU
+        /** No valid header found during parsing. Therefore no checksum was validated */
+        wpt_uint32 csuNoValHd:1;
+
+        /** 0 = CSU did not verify TCP/UDP (Transport Layer TL) checksum; 1 = CSU verified TCP/UDP checksum */
+        wpt_uint32 csuVerifiedTLChksum:1;
+
+        /** 0 = CSU did not verify IP checksum; 1 = CSU verified IP checksum */
+        wpt_uint32 csuVerifiedIPChksum:1;
+
+        /** 0 = BD field checksum is not valid; 1 = BD field checksum is valid */
+        wpt_uint32 csuChksumValid:1;
+
+        /** 0 = No TCP/UDP checksum error; 1 = Has TCP/UDP checksum error */
+        wpt_uint32 csuTLChksumError:1;
+
+        /** 0 = No IPv4/IPv6 checksum error; 1 = Has IPv4/IPv6 checksum error */
+        wpt_uint32 csuIPChksumError:1;
+#else /*WCN_PRONTO*/
         /** These two fields are used by SW to carry the Rx Channel number and SCAN bit in RxBD*/
         wpt_uint32 rxChannel:4;
         wpt_uint32 scanLearn:1;
-
         wpt_uint32 reserved0:1;
-    
+#endif /*WCN_PRONTO*/
+
         /** LLC Removed
         This bit is only used in Libra rsvd for Virgo1.0/Virgo2.0
         Filled by ADU when it is set LLC is removed from packet */
@@ -167,11 +186,22 @@
         wpt_uint32 rxKeyId:3;
         wpt_uint32 ub:1;
         wpt_uint32 rmf:1;
-        wpt_uint32 reserved1:1;
-        wpt_uint32 llc:1;
+        wpt_uint32 umaByPass:1;
+        wpt_uint32 llcr:1;
+
+#ifdef WCN_PRONTO_CSU
+        wpt_uint32 csuIPChksumError:1;
+        wpt_uint32 csuTLChksumError:1;
+        wpt_uint32 csuChksumValid:1;
+        wpt_uint32 csuVerifiedIPChksum:1;
+        wpt_uint32 csuVerifiedTLChksum:1;
+        wpt_uint32 csuNoValHd:1;
+#else /*WCN_PRONTO*/
         wpt_uint32 reserved0:1;
         wpt_uint32 scanLearn:1;
         wpt_uint32 rxChannel:4;
+#endif /*WCN_PRONTO*/
+
         wpt_uint32 rtsf:1;
         wpt_uint32 bsf:1;
         wpt_uint32 A2HF:1;
@@ -188,14 +218,24 @@
         Used in ADU (for AMSDU deaggregation) */
         wpt_uint32 penultimatePduIdx:16;
     
+#ifdef WCN_PRONTO 
+        wpt_uint32 aduFeedback:7;
+        wpt_uint32 dpuMagicPacket: 1; 
+#else
         wpt_uint32 aduFeedback:8;
+#endif //WCN_PRONTO
     
         /** DPU feedback */
         wpt_uint32 dpuFeedback:8;
         
 #else
         wpt_uint32 dpuFeedback:8;
+#ifdef WCN_PRONTO 
+        wpt_uint32 dpuMagicPacket: 1; 
+        wpt_uint32 aduFeedback:7;
+#else
         wpt_uint32 aduFeedback:8;
+#endif //WCN_PRONTO
         wpt_uint32 penultimatePduIdx:16;
 #endif
     
@@ -254,7 +294,13 @@
         (header and data). Note that the length does not include FCS field. */
         wpt_uint32 mpduLength:16;
     
+#ifdef WCN_PRONTO
+        wpt_uint32 reserved3: 3;
+        wpt_uint32 rxDXEPriorityRouting:1; 
+#else
         wpt_uint32 reserved3:4;
+#endif //WCN_PRONTO
+    
     
         /** Traffic Identifier
         Indicates the traffic class the frame belongs to. For non QoS frames,
@@ -265,7 +311,13 @@
 #else
         wpt_uint32 reserved4:8;
         wpt_uint32 tid:4;
+#ifdef WCN_PRONTO
+        wpt_uint32 rxDXEPriorityRouting:1; 
+        wpt_uint32 reserved3: 3;
+#else
         wpt_uint32 reserved3:4;
+#endif //WCN_PRONTO
+    
         wpt_uint32 mpduLength:16;
 #endif
     
@@ -329,9 +381,22 @@
         wpt_uint32 pmiCmd4to23[5];               /* PMI cmd rcvd from RxP */
     
         /* 0x3c */
+#ifdef WCN_PRONTO
+#ifdef WPT_BIG_BYTE_ENDIAN
+        /** The bits from the PMI command as received from the PHY RX. */
+        wpt_uint32 pmiCmd24to25:16;
+
+        /* 16-bit CSU Checksum value for the fragmented receive frames */
+        wpt_uint32 csuChecksum:16;
+#else
+        wpt_uint32 csuChecksum:16;
+        wpt_uint32 pmiCmd24to25:16;
+#endif
+#else /*WCN_PRONTO*/
         /** The bits from the PMI command as received from the PHY RX. */
         wpt_uint32 pmiCmd24to25;
-    
+#endif /*WCN_PRONTO*/
+
         /* 0x40 */
 #ifdef WPT_BIG_BYTE_ENDIAN
     
@@ -352,9 +417,23 @@
         applied to AMPDU packets. */
         wpt_uint32 reorderSlotIdx:6;
         
-        wpt_uint32 reserved7:4;
+#ifdef WCN_PRONTO
+        wpt_uint32 reserved7: 2;
+        wpt_uint32 outOfOrderForward: 1;
+        wpt_uint32 reorderEnable: 1;
 #else
         wpt_uint32 reserved7:4;
+#endif //WCN_PRONTO
+
+#else
+
+#ifdef WCN_PRONTO
+        wpt_uint32 reorderEnable: 1;
+        wpt_uint32 outOfOrderForward: 1;
+        wpt_uint32 reserved7: 2;
+#else
+        wpt_uint32 reserved7:4;
+#endif //WCN_PRONTO
         wpt_uint32 reorderSlotIdx:6;
         wpt_uint32 reorderFwdIdx:6;
         wpt_uint32 reserved6:12;
@@ -736,9 +815,65 @@
     
         /** DPU signature. Filled by Host in Virgo 1.0 but by ADU in Virgo 2.0 */
         wpt_uint32 dpuSignature:3;
-    
+
+#ifdef WCN_PRONTO        
+        /** Reserved  */
+        wpt_uint32 reserved0:2;
+
+         /** Set to '1' to terminate the current AMPDU session. Added based on the 
+        request for WiFi Display */
+        wpt_uint32 terminateAMPDU:1;
+
+       /** Bssid index to indicate ADU to use which of the 4 default MAC address 
+        to use while 802.3 to 802.11 translation in case search in ADU UMA table 
+        fails. The default MAC address should be appropriately programmed in the 
+        uma_tx_default_wmacaddr_u(_1,_2,_3) and uma_tx_default_wmacaddr_l(_1,_2,_3)
+         registers */
+        wpt_uint32 umaBssidIdx:2;
+
+        /** Set to 1 to enable uma filling the BD when FT is not enabled.
+        Ignored when FT is enabled. */
+        wpt_uint32 umaBDEnable:1;
+
+        /** (Only used by the CSU)
+        0: No action
+        1: Host will indicate TCP/UPD header start location and provide pseudo header value in BD.
+        */
+        wpt_uint32 csuSWMode:1;
+
+        /** Enable/Disable CSU on TX direction.
+        0: Disable Checksum Unit (CSU) for Transmit.
+        1: Enable 
+        */
+        wpt_uint32 csuTXEnable:1;
+
+        /** Enable/Disable Transport layer Checksum in CSU
+        0: Disable TCP UDP checksum generation for TX.
+        1: Enable TCP UDP checksum generation for TX.
+        */
+        wpt_uint32 csuEnableTLCksum:1;
+
+        /** Enable/Disable IP layer Checksum in CSU
+        0: Disable IPv4/IPv6 checksum generation for TX
+        1: Enable  IPv4/IPv6 checksum generation for TX
+        */
+        wpt_uint32 csuEnableIPCksum:1;
+
+        /** Filled by CSU to indicate whether transport layer Checksum is generated by CSU or not
+        0: TCP/UDP checksum is being generated for TX.
+        1: TCP/UDP checksum is NOT being generated for TX.
+         */
+        wpt_uint32 csuTLCksumGenerated:1;
+
+        /** Filled by CSU in error scenario
+        1: No valid header found during parsing. Therefore no checksum was validated.
+        0: Valid header found
+        */
+        wpt_uint32 csuNoValidHeader:1;
+#else /*WCN_PRONTO*/
         wpt_uint32 reserved0:12;
-    
+#endif /*WCN_PRONTO*/
+
         /** Only available in Virgo 2.0 and reserved in Virgo 1.0.
         This bit indicates to DPU that the packet is a robust management frame
         which requires  encryption(this bit is only valid for certain management
@@ -794,7 +929,20 @@
         wpt_uint32 reserved1:1;
         wpt_uint32 ub:1;
         wpt_uint32 rmf:1;
+#ifdef WCN_PRONTO        
+        wpt_uint32 csuNoValidHeader:1;
+        wpt_uint32 csuTLCksumGenerated:1;
+        wpt_uint32 csuEnableIPCksum:1;
+        wpt_uint32 csuEnableTLCksum:1;
+        wpt_uint32 csuTXEnable:1;
+        wpt_uint32 csuSWMode:1;
+        wpt_uint32 umaBDEnable:1;
+        wpt_uint32 umaBssidIdx:2;
+        wpt_uint32 terminateAMPDU:1;
+        wpt_uint32 reserved0:2;
+#else /*WCN_PRONTO*/
         wpt_uint32 reserved0:12;
+#endif /*WCN_PRONTO*/
         wpt_uint32 dpuSignature:3;
         wpt_uint32 dpuRF:8;
 #endif
@@ -951,6 +1099,24 @@
         /* Timestamp filled by DXE. Timestamp for previous transfer */
         wpt_uint32 dxeH2BEndTimestamp;
 
+#ifdef WCN_PRONTO
+#ifdef WPT_BIG_BYTE_ENDIAN
+        /** 10 bit value to indicate the start of TCP UDP frame relative to 
+         * the first IP frame header */
+        wpt_uint32 csuTcpUdpStartOffset:10;
+
+        /** 16 bit pseudo header for TCP UDP used by CSU to generate TCP/UDP 
+         * frame checksum */
+        wpt_uint32 csuPseudoHeaderCksum:16;
+
+        wpt_uint32 reserved7:6;
+#else
+        wpt_uint32 reserved7:6;
+        wpt_uint32 csuPseudoHeaderCksum:16;
+        wpt_uint32 csuTcpUdpStartOffset:10;
+#endif
+#endif /*WCN_PRONTO*/
+
 } WDI_TxBdType;
 
 /*---------------------------------------------------------------------------         
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi_dp.h b/CORE/WDI/CP/inc/wlan_qct_wdi_dp.h
index 3e0d851..f946867 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi_dp.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi_dp.h
@@ -244,7 +244,7 @@
 
 #define WDI_RX_BD_GET_NE( _pvBDHeader )         (((WDI_RxBdType*)_pvBDHeader)->dpuNE)
 
-#define WDI_RX_BD_GET_LLCR( _pvBDHeader )         (((WDI_RxBdType*)_pvBDHeader)->llc)
+#define WDI_RX_BD_GET_LLCR( _pvBDHeader )         (((WDI_RxBdType*)_pvBDHeader)->llcr)
 
 #define WDI_RX_BD_GET_TIMESTAMP( _pvBDHeader )         (((WDI_RxBdType*)_pvBDHeader)->mclkRxTimestamp)
 
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi_i.h b/CORE/WDI/CP/inc/wlan_qct_wdi_i.h
index 8ac7fba..f5e90e1 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi_i.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi_i.h
@@ -363,8 +363,8 @@
   /* WLAN FTM Command request */
   WDI_FTM_CMD_REQ            = 59,
 
-  /*WLAN START INNAV MEAS Request*/
-  WDI_START_INNAV_MEAS_REQ   = 60,
+  /*WLAN START OEM_DATA MEAS Request*/
+  WDI_START_OEM_DATA_REQ   = 60,
   /* WLAN host resume request */
   WDI_HOST_RESUME_REQ      = 61,
   
@@ -604,8 +604,8 @@
   /*Delete Self STA Response*/
   WDI_DEL_STA_SELF_RESP       = 57,
 
-  /*WLAN START INNAV MEAS Response*/
-  WDI_START_INNAV_MEAS_RESP   = 58,
+  /*WLAN START OEM_DATA Response*/
+  WDI_START_OEM_DATA_RESP   = 58,
 
   /* WLAN host resume request */
   WDI_HOST_RESUME_RESP        = 59,
@@ -654,8 +654,8 @@
 
   WDI_TSM_STATS_RESP                            = 74,
   /* GTK Rekey Offload */
-  WDI_GTK_OFFLOAD_RESP                    = 75, 
-  WDI_GTK_OFFLOAD_GETINFO_RESP         = 76, 
+  WDI_GTK_OFFLOAD_RESP                          = 75, 
+  WDI_GTK_OFFLOAD_GETINFO_RESP                  = 76, 
 
   WDI_SET_TM_LEVEL_RESP                         = 77,
 
@@ -2442,6 +2442,24 @@
   WDI_EventInfoType*     pEventData
 );
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/**
+ @brief Process Start Oem Data Request function (called when Main 
+        FSM allows it)
+ 
+ @param  pWDICtx:         pointer to the WLAN DAL context 
+         pEventData:      pointer to the event information structure 
+  
+ @see
+ @return Result of the function call
+*/
+WDI_Status
+WDI_ProcessStartOemDataReq
+( 
+  WDI_ControlBlockType*  pWDICtx,
+  WDI_EventInfoType*     pEventData
+);
+#endif
 
 /**
  @brief Process Host Resume Request function (called when Main 
@@ -3646,6 +3664,24 @@
   WDI_EventInfoType*     pEventData
 );
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/**
+ @brief Start Oem Data Rsp function (called when a 
+        response is being received over the bus from HAL)
+ 
+ @param  pWDICtx:         pointer to the WLAN DAL context 
+         pEventData:      pointer to the event information structure 
+  
+ @see
+ @return Result of the function call
+*/
+WDI_Status
+WDI_ProcessStartOemDataRsp
+( 
+  WDI_ControlBlockType*  pWDICtx,
+  WDI_EventInfoType*     pEventData
+);
+#endif
 
  /**
  @brief WDI_ProcessHostResumeRsp function (called when a 
diff --git a/CORE/WDI/CP/src/wlan_qct_wdi.c b/CORE/WDI/CP/src/wlan_qct_wdi.c
index 7d10de1..bef4e30 100644
--- a/CORE/WDI/CP/src/wlan_qct_wdi.c
+++ b/CORE/WDI/CP/src/wlan_qct_wdi.c
@@ -25,10 +25,10 @@
 
   OVERVIEW:
 
-  This software unit holds the implementation of the WLAN Device Abstraction     
+  This software unit holds the implementation of the WLAN Device Abstraction
   Layer Interface.
 
-  The functions externalized by this module are to be called by any upper     
+  The functions externalized by this module are to be called by any upper
   MAC implementation that wishes to use the WLAN Device.
 
   DEPENDENCIES:
@@ -63,12 +63,12 @@
 /*----------------------------------------------------------------------------
  * Include Files
  * -------------------------------------------------------------------------*/
-#include "wlan_qct_wdi.h" 
-#include "wlan_qct_wdi_i.h" 
-#include "wlan_qct_wdi_sta.h" 
-#include "wlan_qct_wdi_dp.h" 
+#include "wlan_qct_wdi.h"
+#include "wlan_qct_wdi_i.h"
+#include "wlan_qct_wdi_sta.h"
+#include "wlan_qct_wdi_dp.h"
 
-#include "wlan_qct_wdi_cts.h" 
+#include "wlan_qct_wdi_cts.h"
 
 #include "wlan_qct_pal_api.h"
 #include "wlan_qct_pal_type.h"
@@ -78,7 +78,7 @@
 #include "wlan_qct_pal_trace.h"
 #include "wlan_qct_pal_packet.h"
 
-#include "wlan_qct_wdi_dts.h" 
+#include "wlan_qct_wdi_dts.h"
 
 #include "wlan_hal_msg.h"
 
@@ -87,10 +87,13 @@
 #endif /* ANI_MANF_DIAG */
 
 /*===========================================================================
-   WLAN DAL Control Path Internal Data Definitions and Declarations 
+   WLAN DAL Control Path Internal Data Definitions and Declarations
  ===========================================================================*/
 #define WDI_WCTS_ACTION_TIMEOUT       2000 /* in msec a very high upper limit */
 
+#define MAC_ADDR_ARRAY(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
+#define MAC_ADDRESS_STR "%02x:%02x:%02x:%02x:%02x:%02x"
+
 
 #ifdef FEATURE_WLAN_SCAN_PNO
 #define WDI_PNO_VERSION_MASK 0x8000
@@ -104,12 +107,12 @@
  * and other two places - wlan_hal_msg.h and halMsg.c (FW file)
  */
 static placeHolderInCapBitmap supportEnabledFeatures[] =
-   {MCC, P2P};
+   {MCC, P2P, DOT11AC};
 
 /*-------------------------------------------------------------------------- 
    WLAN DAL  State Machine
  --------------------------------------------------------------------------*/
-WPT_STATIC const WDI_MainFsmEntryType wdiMainFSM[WDI_MAX_ST] = 
+WPT_STATIC const WDI_MainFsmEntryType wdiMainFSM[WDI_MAX_ST] =
 {
   /*WDI_INIT_ST*/
   {{
@@ -152,12 +155,12 @@
   }}
 };
 
-/*--------------------------------------------------------------------------- 
+/*---------------------------------------------------------------------------
   DAL Request Processing Array  - the functions in this table will only be
   called when the processing of the specific request is allowed by the
-  Main FSM 
+  Main FSM
  ---------------------------------------------------------------------------*/
-WDI_ReqProcFuncType  pfnReqProcTbl[WDI_MAX_UMAC_IND] = 
+WDI_ReqProcFuncType  pfnReqProcTbl[WDI_MAX_UMAC_IND] =
 {
   /*INIT*/
   WDI_ProcessStartReq,      /* WDI_START_REQ  */
@@ -249,11 +252,15 @@
 #else
   NULL,
 #endif /* ANI_MANF_DIAG */
-  
+
+#ifdef FEATURE_OEM_DATA_SUPPORT
+  WDI_ProcessStartOemDataReq,     /*WDI_START_OEM_DATA_REQ*/
+#else
   NULL,
+#endif /*FEATURE_OEM_DATA_SUPPORT*/
   WDI_ProcessHostResumeReq,            /*WDI_HOST_RESUME_REQ*/
-  
-  WDI_ProcessKeepAliveReq,       /* WDI_KEEP_ALIVE_REQ */    
+
+  WDI_ProcessKeepAliveReq,       /* WDI_KEEP_ALIVE_REQ */
 
 #ifdef FEATURE_WLAN_SCAN_PNO
   WDI_ProcessSetPreferredNetworkReq,  /* WDI_SET_PREF_NETWORK_REQ */
@@ -266,23 +273,23 @@
 #endif /* FEATURE_WLAN_SCAN_PNO */
 
   WDI_ProcessSetTxPerTrackingReq,     /* WDI_SET_TX_PER_TRACKING_REQ  */
-  
+
 #ifdef WLAN_FEATURE_PACKET_FILTERING
   /* WDI_8023_MULTICAST_LIST_REQ */
-  WDI_Process8023MulticastListReq,          
+  WDI_Process8023MulticastListReq,
   /* WDI_RECEIVE_FILTER_SET_FILTER_REQ */
-  WDI_ProcessReceiveFilterSetFilterReq,     
+  WDI_ProcessReceiveFilterSetFilterReq,
   /* WDI_PACKET_COALESCING_FILTER_MATCH_COUNT_REQ */
-  WDI_ProcessFilterMatchCountReq,    
+  WDI_ProcessFilterMatchCountReq,
   /* WDI_RECEIVE_FILTER_CLEAR_FILTER_REQ */
-  WDI_ProcessReceiveFilterClearFilterReq,   
+  WDI_ProcessReceiveFilterClearFilterReq,
 #else
   NULL,
   NULL,
   NULL,
   NULL,
 #endif // WLAN_FEATURE_PACKET_FILTERING
-  WDI_ProcessInitScanReq,               /* WDI_INIT_SCAN_CON_REQ */ 
+  WDI_ProcessInitScanReq,               /* WDI_INIT_SCAN_CON_REQ */
   WDI_ProcessHALDumpCmdReq,             /*WDI_HAL_DUMP_CMD_REQ */
   WDI_ProcessShutdownReq,               /* WDI_SHUTDOWN_REQ  */
 
@@ -310,12 +317,12 @@
 };
 
 
-/*--------------------------------------------------------------------------- 
+/*---------------------------------------------------------------------------
   DAL Request Processing Array  - the functions in this table will only be
   called when the processing of the specific request is allowed by the
-  Main FSM 
+  Main FSM
  ---------------------------------------------------------------------------*/
-WDI_RspProcFuncType  pfnRspProcTbl[WDI_MAX_RESP] = 
+WDI_RspProcFuncType  pfnRspProcTbl[WDI_MAX_RESP] =
 {
   /*INIT*/
   WDI_ProcessStartRsp,            /* WDI_START_RESP  */
@@ -358,7 +365,7 @@
   /* BA APIs*/
   WDI_ProcessAddBARsp,             /* WDI_ADD_BA_RESP  */
   WDI_ProcessTriggerBARsp,         /* WDI_TRIGGER_BA_RESP  */
-  
+
   /* IBSS APIs*/
   WDI_ProcessUpdateBeaconParamsRsp, /* WDI_UPD_BCON_PRMS_RSP */
   WDI_ProcessSendBeaconParamsRsp,   /* WDI_SND_BCON_RSP */
@@ -388,7 +395,7 @@
   WDI_ProcessWowlEnterRsp,         /* WDI_WOWL_ENTER_RESP  */
   WDI_ProcessWowlExitRsp,          /* WDI_WOWL_EXIT_RESP  */
   WDI_ProcessConfigureAppsCpuWakeupStateRsp, /* WDI_CONFIGURE_APPS_CPU_WAKEUP_STATE_RESP  */
-  
+
 
   WDI_ProcessNvDownloadRsp, /* WDI_NV_DOWNLOAD_RESP*/
 
@@ -401,7 +408,11 @@
 #endif /* WLAN_FEATURE_VOWIFI_11R */
   WDI_ProcessAddSTASelfRsp,          /* WDI_ADD_STA_SELF_RESP */
   WDI_ProcessDelSTASelfRsp,          /* WDI_DEL_STA_SELF_RESP */
+#ifdef FEATURE_OEM_DATA_SUPPORT
+  WDI_ProcessStartOemDataRsp,     /*WDI_START_OEM_DATA_RESP*/
+#else
   NULL,
+#endif /*FEATURE_OEM_DATA_SUPPORT*/
   WDI_ProcessHostResumeRsp,        /*WDI_HOST_RESUME_RESP*/
 
 #ifdef WLAN_FEATURE_P2P
@@ -416,8 +427,8 @@
   NULL,
 #endif /* ANI_MANF_DIAG */
 
-  WDI_ProcessKeepAliveRsp,       /* WDI_KEEP_ALIVE_RESP  */  
-  
+  WDI_ProcessKeepAliveRsp,       /* WDI_KEEP_ALIVE_RESP  */
+
 #ifdef FEATURE_WLAN_SCAN_PNO
   WDI_ProcessSetPreferredNetworkRsp,     /* WDI_SET_PREF_NETWORK_RESP */
   WDI_ProcessSetRssiFilterRsp,           /* WDI_SET_RSSI_FILTER_RESP */
@@ -435,13 +446,13 @@
   ---------------------------------------------------------------------*/
 #ifdef WLAN_FEATURE_PACKET_FILTERING
   /* WDI_8023_MULTICAST_LIST_RESP */
-  WDI_Process8023MulticastListRsp,          
+  WDI_Process8023MulticastListRsp,
   /* WDI_RECEIVE_FILTER_SET_FILTER_RESP */
-  WDI_ProcessReceiveFilterSetFilterRsp,     
+  WDI_ProcessReceiveFilterSetFilterRsp,
   /* WDI_PACKET_COALESCING_FILTER_MATCH_COUNT_RESP */
-  WDI_ProcessFilterMatchCountRsp,   
+  WDI_ProcessFilterMatchCountRsp,
   /* WDI_RECEIVE_FILTER_CLEAR_FILTER_RESP */
-  WDI_ProcessReceiveFilterClearFilterRsp,   
+  WDI_ProcessReceiveFilterClearFilterRsp,
 #else
   NULL,
   NULL,
@@ -460,14 +471,14 @@
 #endif
   
 #ifdef WLAN_FEATURE_GTK_OFFLOAD
-  WDI_ProcessGtkOffloadRsp,           /* WDI_GTK_OFFLOAD_RESP  */
-  WDI_ProcessGTKOffloadGetInfoRsp,    /* WDI_GTK_OFFLOAD_GETINFO_RESP  */
+  WDI_ProcessGtkOffloadRsp,             /* WDI_GTK_OFFLOAD_RESP  */
+  WDI_ProcessGTKOffloadGetInfoRsp,      /* WDI_GTK_OFFLOAD_GETINFO_RESP  */
 #else
   NULL,
   NULL,
 #endif // WLAN_FEATURE_GTK_OFFLOAD
-  WDI_ProcessSetTmLevelRsp,       /* WDI_SET_TM_LEVEL_RESP */
-  WDI_ProcessFeatureCapsExchangeRsp,     /* WDI_FEATURE_CAPS_EXCHANGE_RESP */  
+  WDI_ProcessSetTmLevelRsp,             /* WDI_SET_TM_LEVEL_RESP */
+  WDI_ProcessFeatureCapsExchangeRsp,    /* WDI_FEATURE_CAPS_EXCHANGE_RESP */
 
   /*---------------------------------------------------------------------
     Indications
@@ -505,22 +516,22 @@
 };
 
 
-/*--------------------------------------------------------------------------- 
+/*---------------------------------------------------------------------------
   WLAN DAL Global Control Block
  ---------------------------------------------------------------------------*/
-WDI_ControlBlockType  gWDICb; 
+WDI_ControlBlockType  gWDICb;
 static wpt_uint8      gWDIInitialized = eWLAN_PAL_FALSE;
 
-const wpt_uint8 szTransportChName[] = "WLAN_CTRL"; 
+const wpt_uint8 szTransportChName[] = "WLAN_CTRL";
 
 /*Helper routine for retrieving the PAL Context from WDI*/
-WPT_INLINE 
+WPT_INLINE
 void* WDI_GET_PAL_CTX( void )
 {
-  return gWDICb.pPALContext; 
+  return gWDICb.pPALContext;
 }/*WDI_GET_PAL_CTX*/
 
-/*============================================================================ 
+/*============================================================================
   Helper inline converters
  ============================================================================*/
 /*Convert WDI driver type into HAL driver type*/
@@ -566,7 +577,7 @@
 );
 
 /*Convert WDI sec ch offset into HAL sec ch offset type*/
-WPT_STATIC WPT_INLINE tSirMacHTSecondaryChannelOffset
+WPT_STATIC WPT_INLINE ePhyChanBondState
 WDI_2_HAL_SEC_CH_OFFSET
 (
   WDI_HTSecondaryChannelOffset wdiSecChOffset
@@ -628,19 +639,19 @@
   WDI_LinkStateType  wdiLinkState
 );
 
-/*Translate a STA Context from WDI into HAL*/ 
-WPT_STATIC WPT_INLINE 
+/*Translate a STA Context from WDI into HAL*/
+WPT_STATIC WPT_INLINE
 void
 WDI_CopyWDIStaCtxToHALStaCtx
-( 
+(
   tConfigStaParams*          phalConfigSta,
   WDI_ConfigStaReqInfoType*  pwdiConfigSta
 );
- 
-/*Translate a Rate set info from WDI into HAL*/ 
-WPT_STATIC WPT_INLINE void 
+
+/*Translate a Rate set info from WDI into HAL*/
+WPT_STATIC WPT_INLINE void
 WDI_CopyWDIRateSetToHALRateSet
-( 
+(
   tSirMacRateSet* pHalRateSet,
   WDI_RateSet*    pwdiRateSet
 );
@@ -648,7 +659,7 @@
 /*Translate an EDCA Parameter Record from WDI into HAL*/
 WPT_STATIC WPT_INLINE void
 WDI_CopyWDIEDCAParamsToHALEDCAParams
-( 
+(
   tSirMacEdcaParamRecord* phalEdcaParam,
   WDI_EdcaParamRecord*    pWDIEdcaParam
 );
@@ -669,19 +680,19 @@
   WDI_ConfigBSSReqInfoType* pwdiConfigBSS
 );
 
-/*Extract the request CB function and user data from a request structure 
+/*Extract the request CB function and user data from a request structure
   pointed to by user data */
 WPT_STATIC WPT_INLINE void
 WDI_ExtractRequestCBFromEvent
 (
   WDI_EventInfoType* pEvent,
-  WDI_ReqStatusCb*   ppfnReqCB, 
+  WDI_ReqStatusCb*   ppfnReqCB,
   void**             ppUserData
 );
 
 wpt_uint8
 WDI_FindEmptySession
-( 
+(
   WDI_ControlBlockType*   pWDICtx,
   WDI_BSSSessionType**    ppSession
 );
@@ -695,7 +706,7 @@
 );
 
 WDI_Status WDI_SendNvBlobReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 );
@@ -713,10 +724,10 @@
 
 /**
  @brief WDI_getReqMsgString prints the WDI request message in string.
-  
- @param wdiReqMsgId: WDI Message request Id 
-  
- @see 
+
+ @param wdiReqMsgId: WDI Message request Id
+
+ @see
  @return Result of the function call
 */
 static char *WDI_getReqMsgString(wpt_uint16 wdiReqMsgId)
@@ -783,7 +794,7 @@
     CASE_RETURN_STRING( WDI_ADD_STA_SELF_REQ );
     CASE_RETURN_STRING( WDI_DEL_STA_SELF_REQ );
     CASE_RETURN_STRING( WDI_FTM_CMD_REQ );
-    CASE_RETURN_STRING( WDI_START_INNAV_MEAS_REQ );
+    CASE_RETURN_STRING( WDI_START_OEM_DATA_REQ );
     CASE_RETURN_STRING( WDI_HOST_RESUME_REQ );
     CASE_RETURN_STRING( WDI_KEEP_ALIVE_REQ);
   #ifdef FEATURE_WLAN_SCAN_PNO
@@ -809,10 +820,10 @@
 
 /**
  @brief WDI_getRespMsgString prints the WDI resonse message in string.
-  
- @param wdiRespMsgId: WDI Message response Id 
-  
- @see 
+
+ @param wdiRespMsgId: WDI Message response Id
+
+ @see
  @return Result of the function call
 */
 static char *WDI_getRespMsgString(wpt_uint16 wdiRespMsgId)
@@ -879,7 +890,7 @@
     CASE_RETURN_STRING( WDI_ADD_STA_SELF_RESP );
     CASE_RETURN_STRING( WDI_DEL_STA_SELF_RESP );
     CASE_RETURN_STRING( WDI_FTM_CMD_RESP );
-    CASE_RETURN_STRING( WDI_START_INNAV_MEAS_RESP );
+    CASE_RETURN_STRING( WDI_START_OEM_DATA_RESP );
     CASE_RETURN_STRING( WDI_HOST_RESUME_RESP );
     CASE_RETURN_STRING( WDI_KEEP_ALIVE_RESP);
   #ifdef FEATURE_WLAN_SCAN_PNO
@@ -902,10 +913,10 @@
 
 /**
  @brief WDI_getHALStatusMsgString prints the HAL status in string.
-  
- @param halStatusId: HAL status Id 
-  
- @see 
+
+ @param halStatusId: HAL status Id
+
+ @see
  @return Result of the function call
 */
 static char *WDI_getHALStatusMsgString(wpt_uint16 halStatusId)
@@ -950,19 +961,19 @@
   }
 }
 
-/*======================================================================== 
- 
+/*========================================================================
+
                              INITIALIZATION APIs
- 
+
 ==========================================================================*/
 
 /**
  @brief WDI_Init is used to initialize the DAL.
- 
+
  DAL will allocate all the resources it needs. It will open PAL, it will also
  open both the data and the control transport which in their turn will open
- DXE/SMD or any other drivers that they need. 
- 
+ DXE/SMD or any other drivers that they need.
+
  @param pOSContext: pointer to the OS context provided by the UMAC
                     will be passed on to PAL on Open
         ppWDIGlobalCtx: output pointer of Global Context
@@ -970,9 +981,9 @@
 
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_Init
-( 
+(
   void*                      pOSContext,
   void**                     ppWDIGlobalCtx,
   WDI_DeviceCapabilityType*  pWdiDevCapability,
@@ -980,9 +991,9 @@
 )
 {
   wpt_uint8               i;
-  wpt_status              wptStatus; 
+  wpt_status              wptStatus;
   WDI_Status              wdiStatus;
-  WCTS_TransportCBsType   wctsCBs; 
+  WCTS_TransportCBsType   wctsCBs;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
 
   /*---------------------------------------------------------------------
@@ -993,29 +1004,29 @@
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "Invalid input parameters in WDI_Init");
 
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   /*---------------------------------------------------------------------
-    Check to see if the module has already been initialized or not 
+    Check to see if the module has already been initialized or not
   ---------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE != gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
               "WDI module already initialized - return");
 
-    return WDI_STATUS_SUCCESS; 
+    return WDI_STATUS_SUCCESS;
   }
 
   /*Module is now initialized - this flag is to ensure the fact that multiple
    init will not happen on WDI
    !! - potential race does exist because read and set are not atomic,
    however an atomic operation would be closely here - reanalyze if necessary*/
-  gWDIInitialized = eWLAN_PAL_TRUE; 
+  gWDIInitialized = eWLAN_PAL_TRUE;
 
   /*Setup the control block */
   WDI_CleanCB(&gWDICb);
-  gWDICb.pOSContext = pOSContext; 
+  gWDICb.pOSContext = pOSContext;
 
   /*Setup the STA Table*/
   wdiStatus = WDI_STATableInit(&gWDICb);
@@ -1052,8 +1063,8 @@
 
   /*Initialize the response timer - it will be used to time all messages
     expected as response from device*/
-  wptStatus = wpalTimerInit( &gWDICb.wptResponseTimer, 
-                             WDI_ResponseTimerCB, 
+  wptStatus = wpalTimerInit( &gWDICb.wptResponseTimer,
+                             WDI_ResponseTimerCB,
                              &gWDICb);
   if ( eWLAN_PAL_STATUS_SUCCESS != wptStatus )
   {
@@ -1113,7 +1124,7 @@
 
   /* Init Set power state event */
   wptStatus = wpalEventInit(&gWDICb.setPowerStateEvent);
-  if ( eWLAN_PAL_STATUS_SUCCESS != wptStatus ) 
+  if ( eWLAN_PAL_STATUS_SUCCESS != wptStatus )
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
                 "%s: Failed to initialize power state event, status %d",
@@ -1123,7 +1134,7 @@
 
   /* Init WCTS action event */
   wptStatus = wpalEventInit(&gWDICb.wctsActionEvent);
-  if ( eWLAN_PAL_STATUS_SUCCESS !=  wptStatus ) 
+  if ( eWLAN_PAL_STATUS_SUCCESS !=  wptStatus )
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
                 "%s: Failed to initialize WCTS action event, status %d",
@@ -1132,17 +1143,17 @@
   }
 
   /*------------------------------------------------------------------------
-    Open the Transport Services for Control and Data 
+    Open the Transport Services for Control and Data
    ------------------------------------------------------------------------*/
   wctsCBs.wctsNotifyCB      = WDI_NotifyMsgCTSCB;
   wctsCBs.wctsNotifyCBData  = &gWDICb;
-  wctsCBs.wctsRxMsgCB       = WDI_RXMsgCTSCB; 
+  wctsCBs.wctsRxMsgCB       = WDI_RXMsgCTSCB;
   wctsCBs.wctsRxMsgCBData   = &gWDICb;
 
-  gWDICb.bCTOpened          = eWLAN_PAL_FALSE; 
+  gWDICb.bCTOpened          = eWLAN_PAL_FALSE;
   gWDICb.wctsHandle = WCTS_OpenTransport( szTransportChName ,
-                                          WDI_CT_CHANNEL_SIZE, 
-                                          &wctsCBs ); 
+                                          WDI_CT_CHANNEL_SIZE,
+                                          &wctsCBs );
 
   if ( NULL == gWDICb.wctsHandle )
   {
@@ -1154,7 +1165,7 @@
   gWDICb.driverMode = (tDriverType)driverType;
   /* FTM mode not need to open Transport Driver */
   if(eDRIVER_TYPE_MFG != (tDriverType)driverType)
-  {  
+  {
     /*------------------------------------------------------------------------
      Open the Data Transport
      ------------------------------------------------------------------------*/
@@ -1167,13 +1178,13 @@
   }
 
   /*The WDI is initialized - set state to init */
-  gWDICb.uGlobalState = WDI_INIT_ST; 
+  gWDICb.uGlobalState = WDI_INIT_ST;
 
   /*Send the context as a ptr to the global WDI Control Block*/
   *ppWDIGlobalCtx = &gWDICb;
 
   /*Fill in the device capabilities*/
-  pWdiDevCapability->bFrameXtlSupported = eWLAN_PAL_FALSE; 
+  pWdiDevCapability->bFrameXtlSupported = eWLAN_PAL_FALSE;
   pWdiDevCapability->ucMaxSTASupported  = gWDICb.ucMaxStations;
   pWdiDevCapability->ucMaxBSSSupported  = gWDICb.ucMaxBssids;
   return WDI_STATUS_SUCCESS;
@@ -1192,7 +1203,7 @@
      */
 
      eventStatus = wpalEventReset(&gWDICb.wctsActionEvent);
-     if ( eWLAN_PAL_STATUS_SUCCESS != eventStatus ) 
+     if ( eWLAN_PAL_STATUS_SUCCESS != eventStatus )
      {
         WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                    "%s: Failed to reset WCTS action event", __FUNCTION__);
@@ -1206,7 +1217,7 @@
         the channel to be closed */
      if ( eWLAN_PAL_STATUS_SUCCESS == eventStatus )
      {
-        eventStatus = wpalEventWait(&gWDICb.wctsActionEvent, 
+        eventStatus = wpalEventWait(&gWDICb.wctsActionEvent,
                                     WDI_WCTS_ACTION_TIMEOUT);
         if ( eWLAN_PAL_STATUS_SUCCESS != eventStatus )
         {
@@ -1262,23 +1273,23 @@
          If the RIVA sub-system is not yet up and running DAL
          will queue the request for Open and will wait for the
          SMD notification before attempting to send down the
-         message to HAL. 
+         message to HAL.
 
  WDI_Init must have been called.
 
- @param wdiStartParams: the start parameters as specified by 
+ @param wdiStartParams: the start parameters as specified by
                       the Device Interface
-  
+
         wdiStartRspCb: callback for passing back the response of
         the start operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_Start
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_Start
 (
   WDI_StartReqParamsType*  pwdiStartParams,
@@ -1290,23 +1301,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_START_REQ;
-  wdiEventData.pEventData      = pwdiStartParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiStartParams); 
-  wdiEventData.pCBfnc          = wdiStartRspCb; 
+  wdiEventData.pEventData      = pwdiStartParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiStartParams);
+  wdiEventData.pCBfnc          = wdiStartRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -1321,24 +1332,24 @@
         in started state.
 
          In state BUSY this request will be queued.
-  
-         Request will not be accepted in any other state. 
+
+         Request will not be accepted in any other state.
 
  WDI_Start must have been called.
 
- @param wdiStopParams: the stop parameters as specified by 
+ @param wdiStopParams: the stop parameters as specified by
                       the Device Interface
-  
+
         wdiStopRspCb: callback for passing back the response of
         the stop operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_Start
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_Stop
 (
   WDI_StopReqParamsType*  pwdiStopParams,
@@ -1351,14 +1362,14 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*Access to the global state must be locked before cleaning */
@@ -1378,9 +1389,9 @@
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_STOP_REQ;
-  wdiEventData.pEventData      = pwdiStopParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiStopParams); 
-  wdiEventData.pCBfnc          = wdiStopRspCb; 
+  wdiEventData.pEventData      = pwdiStopParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiStopParams);
+  wdiEventData.pCBfnc          = wdiStopRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_STOP_EVENT, &wdiEventData);
@@ -1390,20 +1401,20 @@
 
 
 /**
- @brief WDI_Close will be called when the upper MAC no longer 
+ @brief WDI_Close will be called when the upper MAC no longer
         needs to interact with DAL. DAL will free its control
         block.
-  
-        It is only accepted in state STOPPED.  
+
+        It is only accepted in state STOPPED.
 
  WDI_Stop must have been called.
 
  @param none
-  
+
  @see WDI_Stop
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_Close
 (
   void
@@ -1416,21 +1427,21 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*Reset WCTS action event prior to posting the WDI_CLOSE_REQ
    (the control transport will be closed by the FSM and we'll want
    to wait until that completes)*/
   eventStatus = wpalEventReset(&gWDICb.wctsActionEvent);
-  if ( eWLAN_PAL_STATUS_SUCCESS != eventStatus ) 
+  if ( eWLAN_PAL_STATUS_SUCCESS != eventStatus )
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Failed to reset WCTS action event", __FUNCTION__);
@@ -1441,9 +1452,9 @@
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_CLOSE_REQ;
-  wdiEventData.pEventData      = NULL; 
-  wdiEventData.uEventDataSize  = 0; 
-  wdiEventData.pCBfnc          = NULL; 
+  wdiEventData.pEventData      = NULL;
+  wdiEventData.uEventDataSize  = 0;
+  wdiEventData.pCBfnc          = NULL;
   wdiEventData.pUserData       = NULL;
 
   gWDIInitialized = eWLAN_PAL_FALSE;
@@ -1454,7 +1465,7 @@
     (but only if we were able to reset the event flag*/
   if ( eWLAN_PAL_STATUS_SUCCESS == eventStatus )
   {
-     eventStatus = wpalEventWait(&gWDICb.wctsActionEvent, 
+     eventStatus = wpalEventWait(&gWDICb.wctsActionEvent,
                                  WDI_WCTS_ACTION_TIMEOUT);
      if ( eWLAN_PAL_STATUS_SUCCESS != eventStatus )
      {
@@ -1469,7 +1480,7 @@
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "WDI Close failed to destroy an event");
-     WDI_ASSERT(0); 
+     WDI_ASSERT(0);
   }
 
    /* Destroy the Set Power State event */
@@ -1479,7 +1490,7 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "WDI Close failed to destroy an event");
 
-      WDI_ASSERT(0); 
+      WDI_ASSERT(0);
    }
 
   /*------------------------------------------------------------------------
@@ -1490,7 +1501,7 @@
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
               "WDI Init failed to close the DP Util Module");
 
-    WDI_ASSERT(0); 
+    WDI_ASSERT(0);
   }
 
   /*destroy the BSS sessions pending Queue */
@@ -1504,7 +1515,7 @@
 
   /* destroy the WDI Pending Request Queue*/
   wpal_list_destroy(&(gWDICb.wptPendingQueue));
-  
+
   /*destroy the response timer */
   wptStatus = wpalTimerDelete( &gWDICb.wptResponseTimer);
 
@@ -1634,37 +1645,37 @@
 }/*WDI_Shutdown*/
 
 
-/*======================================================================== 
- 
+/*========================================================================
+
                              SCAN APIs
- 
+
 ==========================================================================*/
 
 /**
- @brief WDI_InitScanReq will be called when the upper MAC wants 
+ @brief WDI_InitScanReq will be called when the upper MAC wants
         the WLAN Device to get ready for a scan procedure. Upon
         the call of this API the WLAN DAL will pack and send a
         HAL Init Scan request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_Start must have been called.
 
  @param wdiInitScanParams: the init scan parameters as specified
                       by the Device Interface
-  
+
         wdiInitScanRspCb: callback for passing back the response
         of the init scan operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_Start
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_InitScanReq
 (
   WDI_InitScanReqParamsType*  pwdiInitScanParams,
@@ -1676,23 +1687,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_INIT_SCAN_REQ;
-  wdiEventData.pEventData      = pwdiInitScanParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiInitScanParams); 
-  wdiEventData.pCBfnc          = wdiInitScanRspCb; 
+  wdiEventData.pEventData      = pwdiInitScanParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiInitScanParams);
+  wdiEventData.pCBfnc          = wdiInitScanRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -1700,31 +1711,31 @@
 }/*WDI_InitScanReq*/
 
 /**
- @brief WDI_StartScanReq will be called when the upper MAC 
+ @brief WDI_StartScanReq will be called when the upper MAC
         wishes to change the Scan channel on the WLAN Device.
         Upon the call of this API the WLAN DAL will pack and
         send a HAL Start Scan request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_InitScanReq must have been called.
 
- @param wdiStartScanParams: the start scan parameters as 
+ @param wdiStartScanParams: the start scan parameters as
                       specified by the Device Interface
-  
+
         wdiStartScanRspCb: callback for passing back the
         response of the start scan operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_InitScanReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_StartScanReq
 (
   WDI_StartScanReqParamsType*  pwdiStartScanParams,
@@ -1736,23 +1747,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_START_SCAN_REQ;
-  wdiEventData.pEventData      = pwdiStartScanParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiStartScanParams); 
-  wdiEventData.pCBfnc          = wdiStartScanRspCb; 
+  wdiEventData.pEventData      = pwdiStartScanParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiStartScanParams);
+  wdiEventData.pCBfnc          = wdiStartScanRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -1761,7 +1772,7 @@
 
 
 /**
- @brief WDI_EndScanReq will be called when the upper MAC is 
+ @brief WDI_EndScanReq will be called when the upper MAC is
         wants to end scanning for a particular channel that it
         had set before by calling Scan Start on the WLAN Device.
         Upon the call of this API the WLAN DAL will pack and
@@ -1769,23 +1780,23 @@
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_StartScanReq must have been called.
 
- @param wdiEndScanParams: the end scan parameters as specified 
+ @param wdiEndScanParams: the end scan parameters as specified
                       by the Device Interface
-  
+
         wdiEndScanRspCb: callback for passing back the response
         of the end scan operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_StartScanReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_EndScanReq
 (
   WDI_EndScanReqParamsType* pwdiEndScanParams,
@@ -1797,23 +1808,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_END_SCAN_REQ;
-  wdiEventData.pEventData      = pwdiEndScanParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiEndScanParams); 
-  wdiEventData.pCBfnc          = wdiEndScanRspCb; 
+  wdiEventData.pEventData      = pwdiEndScanParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiEndScanParams);
+  wdiEventData.pCBfnc          = wdiEndScanRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -1822,31 +1833,31 @@
 
 
 /**
- @brief WDI_FinishScanReq will be called when the upper MAC has 
+ @brief WDI_FinishScanReq will be called when the upper MAC has
         completed the scan process on the WLAN Device. Upon the
         call of this API the WLAN DAL will pack and send a HAL
         Finish Scan Request request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_InitScanReq must have been called.
 
- @param wdiFinishScanParams: the finish scan  parameters as 
+ @param wdiFinishScanParams: the finish scan  parameters as
                       specified by the Device Interface
-  
+
         wdiFinishScanRspCb: callback for passing back the
         response of the finish scan operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_InitScanReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_FinishScanReq
 (
   WDI_FinishScanReqParamsType* pwdiFinishScanParams,
@@ -1858,60 +1869,60 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_FINISH_SCAN_REQ;
-  wdiEventData.pEventData      = pwdiFinishScanParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiFinishScanParams); 
-  wdiEventData.pCBfnc          = wdiFinishScanRspCb; 
+  wdiEventData.pEventData      = pwdiFinishScanParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiFinishScanParams);
+  wdiEventData.pCBfnc          = wdiFinishScanRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 
 }/*WDI_FinishScanReq*/
 
-/*======================================================================== 
- 
+/*========================================================================
+
                           ASSOCIATION APIs
- 
+
 ==========================================================================*/
 
 /**
- @brief WDI_JoinReq will be called when the upper MAC is ready 
+ @brief WDI_JoinReq will be called when the upper MAC is ready
         to start an association procedure to a BSS. Upon the
         call of this API the WLAN DAL will pack and send a HAL
         Join request message to the lower RIVA sub-system if
         DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_Start must have been called.
 
- @param wdiJoinParams: the join parameters as specified by 
+ @param wdiJoinParams: the join parameters as specified by
                       the Device Interface
-  
+
         wdiJoinRspCb: callback for passing back the response of
         the join operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_Start
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_JoinReq
 (
   WDI_JoinReqParamsType* pwdiJoinParams,
@@ -1923,23 +1934,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_JOIN_REQ;
-  wdiEventData.pEventData      = pwdiJoinParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiJoinParams); 
-  wdiEventData.pCBfnc          = wdiJoinRspCb; 
+  wdiEventData.pEventData      = pwdiJoinParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiJoinParams);
+  wdiEventData.pCBfnc          = wdiJoinRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -1947,7 +1958,7 @@
 }/*WDI_JoinReq*/
 
 /**
- @brief WDI_ConfigBSSReq will be called when the upper MAC 
+ @brief WDI_ConfigBSSReq will be called when the upper MAC
         wishes to configure the newly acquired or in process of
         being acquired BSS to the HW . Upon the call of this API
         the WLAN DAL will pack and send a HAL Config BSS request
@@ -1955,24 +1966,24 @@
         STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_JoinReq must have been called.
 
- @param wdiConfigBSSParams: the config BSS parameters as 
+ @param wdiConfigBSSParams: the config BSS parameters as
                       specified by the Device Interface
-  
+
         wdiConfigBSSRspCb: callback for passing back the
         response of the config BSS operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_JoinReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_ConfigBSSReq
 (
   WDI_ConfigBSSReqParamsType* pwdiConfigBSSParams,
@@ -1984,23 +1995,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_CONFIG_BSS_REQ;
-  wdiEventData.pEventData      = pwdiConfigBSSParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiConfigBSSParams); 
-  wdiEventData.pCBfnc          = wdiConfigBSSRspCb; 
+  wdiEventData.pEventData      = pwdiConfigBSSParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiConfigBSSParams);
+  wdiEventData.pCBfnc          = wdiConfigBSSRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2008,30 +2019,30 @@
 }/*WDI_ConfigBSSReq*/
 
 /**
- @brief WDI_DelBSSReq will be called when the upper MAC is 
+ @brief WDI_DelBSSReq will be called when the upper MAC is
         disassociating from the BSS and wishes to notify HW.
         Upon the call of this API the WLAN DAL will pack and
         send a HAL Del BSS request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_ConfigBSSReq or WDI_PostAssocReq must have been called.
 
- @param wdiDelBSSParams: the del BSS parameters as specified by 
+ @param wdiDelBSSParams: the del BSS parameters as specified by
                       the Device Interface
-  
+
         wdiDelBSSRspCb: callback for passing back the response
         of the del bss operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
- @see WDI_ConfigBSSReq, WDI_PostAssocReq 
+        callback
+
+ @see WDI_ConfigBSSReq, WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_DelBSSReq
 (
   WDI_DelBSSReqParamsType* pwdiDelBSSParams,
@@ -2043,23 +2054,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_DEL_BSS_REQ;
-  wdiEventData.pEventData      = pwdiDelBSSParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiDelBSSParams); 
-  wdiEventData.pCBfnc          = wdiDelBSSRspCb; 
+  wdiEventData.pEventData      = pwdiDelBSSParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiDelBSSParams);
+  wdiEventData.pCBfnc          = wdiDelBSSRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2067,31 +2078,31 @@
 }/*WDI_DelBSSReq*/
 
 /**
- @brief WDI_PostAssocReq will be called when the upper MAC has 
+ @brief WDI_PostAssocReq will be called when the upper MAC has
         associated to a BSS and wishes to configure HW for
         associated state. Upon the call of this API the WLAN DAL
         will pack and send a HAL Post Assoc request message to
         the lower RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_JoinReq must have been called.
 
  @param wdiPostAssocReqParams: the assoc parameters as specified
                       by the Device Interface
-  
+
         wdiPostAssocRspCb: callback for passing back the
         response of the post assoc operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_JoinReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_PostAssocReq
 (
   WDI_PostAssocReqParamsType* pwdiPostAssocReqParams,
@@ -2103,23 +2114,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_POST_ASSOC_REQ;
-  wdiEventData.pEventData      = pwdiPostAssocReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiPostAssocReqParams); 
-  wdiEventData.pCBfnc          = wdiPostAssocRspCb; 
+  wdiEventData.pEventData      = pwdiPostAssocReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiPostAssocReqParams);
+  wdiEventData.pCBfnc          = wdiPostAssocRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2127,7 +2138,7 @@
 }/*WDI_PostAssocReq*/
 
 /**
- @brief WDI_DelSTAReq will be called when the upper MAC when an 
+ @brief WDI_DelSTAReq will be called when the upper MAC when an
         association with another STA has ended and the station
         must be deleted from HW. Upon the call of this API the
         WLAN DAL will pack and send a HAL Del STA request
@@ -2135,23 +2146,23 @@
         STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param wdiDelSTAParams: the Del STA parameters as specified by 
+ @param wdiDelSTAParams: the Del STA parameters as specified by
                       the Device Interface
-  
+
         wdiDelSTARspCb: callback for passing back the response
         of the del STA operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_DelSTAReq
 (
   WDI_DelSTAReqParamsType* pwdiDelSTAParams,
@@ -2163,33 +2174,33 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_DEL_STA_REQ;
-  wdiEventData.pEventData      = pwdiDelSTAParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiDelSTAParams); 
-  wdiEventData.pCBfnc          = wdiDelSTARspCb; 
+  wdiEventData.pEventData      = pwdiDelSTAParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiDelSTAParams);
+  wdiEventData.pCBfnc          = wdiDelSTARspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 
 }/*WDI_DelSTAReq*/
 
-/*======================================================================== 
- 
+/*========================================================================
+
                              SECURITY APIs
- 
+
 ==========================================================================*/
 
 /**
@@ -2200,24 +2211,24 @@
         STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param wdiSetBSSKeyParams: the BSS Key set parameters as 
+ @param wdiSetBSSKeyParams: the BSS Key set parameters as
                       specified by the Device Interface
-  
+
         wdiSetBSSKeyRspCb: callback for passing back the
         response of the set BSS Key operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetBSSKeyReq
 (
   WDI_SetBSSKeyReqParamsType* pwdiSetBSSKeyParams,
@@ -2229,23 +2240,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_SET_BSS_KEY_REQ;
-  wdiEventData.pEventData      = pwdiSetBSSKeyParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiSetBSSKeyParams); 
-  wdiEventData.pCBfnc          = wdiSetBSSKeyRspCb; 
+  wdiEventData.pEventData      = pwdiSetBSSKeyParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiSetBSSKeyParams);
+  wdiEventData.pCBfnc          = wdiSetBSSKeyRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2260,24 +2271,24 @@
         STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_SetBSSKeyReq must have been called.
 
- @param wdiRemoveBSSKeyParams: the remove BSS key parameters as 
+ @param wdiRemoveBSSKeyParams: the remove BSS key parameters as
                       specified by the Device Interface
-  
+
         wdiRemoveBSSKeyRspCb: callback for passing back the
         response of the remove BSS key operation received from
         the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_SetBSSKeyReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_RemoveBSSKeyReq
 (
   WDI_RemoveBSSKeyReqParamsType* pwdiRemoveBSSKeyParams,
@@ -2289,23 +2300,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_RMV_BSS_KEY_REQ;
-  wdiEventData.pEventData      = pwdiRemoveBSSKeyParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiRemoveBSSKeyParams); 
-  wdiEventData.pCBfnc          = wdiRemoveBSSKeyRspCb; 
+  wdiEventData.pEventData      = pwdiRemoveBSSKeyParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiRemoveBSSKeyParams);
+  wdiEventData.pCBfnc          = wdiRemoveBSSKeyRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2314,31 +2325,31 @@
 
 
 /**
- @brief WDI_SetSTAKeyReq will be called when the upper MAC is 
+ @brief WDI_SetSTAKeyReq will be called when the upper MAC is
         ready to install a STA(ast) encryption key in HW. Upon
         the call of this API the WLAN DAL will pack and send a
         HAL Set STA Key request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param wdiSetSTAKeyParams: the set STA key parameters as 
+ @param wdiSetSTAKeyParams: the set STA key parameters as
                       specified by the Device Interface
-  
+
         wdiSetSTAKeyRspCb: callback for passing back the
         response of the set STA key operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetSTAKeyReq
 (
   WDI_SetSTAKeyReqParamsType* pwdiSetSTAKeyParams,
@@ -2350,23 +2361,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_SET_STA_KEY_REQ;
-  wdiEventData.pEventData      = pwdiSetSTAKeyParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiSetSTAKeyParams); 
-  wdiEventData.pCBfnc          = wdiSetSTAKeyRspCb; 
+  wdiEventData.pEventData      = pwdiSetSTAKeyParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiSetSTAKeyParams);
+  wdiEventData.pCBfnc          = wdiSetSTAKeyRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2375,31 +2386,31 @@
 
 
 /**
- @brief WDI_RemoveSTAKeyReq will be called when the upper MAC 
+ @brief WDI_RemoveSTAKeyReq will be called when the upper MAC
         wants to uninstall a previously set STA key in HW. Upon
         the call of this API the WLAN DAL will pack and send a
         HAL Remove STA Key request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_SetSTAKeyReq must have been called.
 
- @param wdiRemoveSTAKeyParams: the remove STA key parameters as 
+ @param wdiRemoveSTAKeyParams: the remove STA key parameters as
                       specified by the Device Interface
-  
+
         wdiRemoveSTAKeyRspCb: callback for passing back the
         response of the remove STA key operation received from
         the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_SetSTAKeyReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_RemoveSTAKeyReq
 (
   WDI_RemoveSTAKeyReqParamsType* pwdiRemoveSTAKeyParams,
@@ -2411,23 +2422,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_RMV_STA_KEY_REQ;
-  wdiEventData.pEventData      = pwdiRemoveSTAKeyParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiRemoveSTAKeyParams); 
-  wdiEventData.pCBfnc          = wdiRemoveSTAKeyRspCb; 
+  wdiEventData.pEventData      = pwdiRemoveSTAKeyParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiRemoveSTAKeyParams);
+  wdiEventData.pCBfnc          = wdiRemoveSTAKeyRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2436,31 +2447,31 @@
 
 
 /**
- @brief WDI_SetSTABcastKeyReq will be called when the upper MAC 
+ @brief WDI_SetSTABcastKeyReq will be called when the upper MAC
         wants to install a STA Bcast encryption key on the HW.
         Upon the call of this API the WLAN DAL will pack and
         send a HAL Start request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param pwdiSetSTABcastKeyParams: the BSS Key set parameters as 
+ @param pwdiSetSTABcastKeyParams: the BSS Key set parameters as
                       specified by the Device Interface
-  
+
         wdiSetSTABcastKeyRspCb: callback for passing back the
         response of the set BSS Key operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetSTABcastKeyReq
 (
   WDI_SetSTAKeyReqParamsType* pwdiSetSTABcastKeyParams,
@@ -2473,23 +2484,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_SET_STA_BCAST_KEY_REQ;
-  wdiEventData.pEventData      = pwdiSetSTABcastKeyParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiSetSTABcastKeyParams); 
-  wdiEventData.pCBfnc          = wdiSetSTABcastKeyRspCb; 
+  wdiEventData.pEventData      = pwdiSetSTABcastKeyParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiSetSTABcastKeyParams);
+  wdiEventData.pCBfnc          = wdiSetSTABcastKeyRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2497,32 +2508,32 @@
 }/*WDI_SetSTABcastKeyReq*/
 
 /**
- @brief WDI_RemoveSTABcastKeyReq will be called when the upper 
+ @brief WDI_RemoveSTABcastKeyReq will be called when the upper
         MAC wants to uninstall a STA Bcast key from HW. Upon the
         call of this API the WLAN DAL will pack and send a HAL
         Remove STA Bcast Key request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_SetSTABcastKeyReq must have been called.
 
- @param pwdiRemoveSTABcastKeyParams: the remove BSS key 
+ @param pwdiRemoveSTABcastKeyParams: the remove BSS key
                       parameters as specified by the Device
                       Interface
-  
+
         wdiRemoveSTABcastKeyRspCb: callback for passing back the
         response of the remove STA Bcast key operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_SetSTABcastKeyReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_RemoveSTABcastKeyReq
 (
   WDI_RemoveSTAKeyReqParamsType* pwdiRemoveSTABcastKeyParams,
@@ -2534,23 +2545,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_RMV_STA_BCAST_KEY_REQ;
-  wdiEventData.pEventData      = pwdiRemoveSTABcastKeyParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiRemoveSTABcastKeyParams); 
-  wdiEventData.pCBfnc          = wdiRemoveSTABcastKeyRspCb; 
+  wdiEventData.pEventData      = pwdiRemoveSTABcastKeyParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiRemoveSTABcastKeyParams);
+  wdiEventData.pCBfnc          = wdiRemoveSTABcastKeyRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2558,32 +2569,32 @@
 }/*WDI_RemoveSTABcastKeyReq*/
 
 /**
- @brief WDI_SetMaxTxPowerReq will be called when the upper 
+ @brief WDI_SetMaxTxPowerReq will be called when the upper
         MAC wants to set Max Tx Power to HW. Upon the
         call of this API the WLAN DAL will pack and send a HAL
         Remove STA Bcast Key request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_SetSTABcastKeyReq must have been called.
 
- @param pwdiRemoveSTABcastKeyParams: the remove BSS key 
+ @param pwdiRemoveSTABcastKeyParams: the remove BSS key
                       parameters as specified by the Device
                       Interface
-  
+
         wdiRemoveSTABcastKeyRspCb: callback for passing back the
         response of the remove STA Bcast key operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_SetMaxTxPowerReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetMaxTxPowerReq
 (
   WDI_SetMaxTxPowerParamsType*   pwdiSetMaxTxPowerParams,
@@ -2595,23 +2606,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_SET_MAX_TX_POWER_REQ;
-  wdiEventData.pEventData      = pwdiSetMaxTxPowerParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiSetMaxTxPowerParams); 
-  wdiEventData.pCBfnc          = wdiReqStatusCb; 
+  wdiEventData.pEventData      = pwdiSetMaxTxPowerParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiSetMaxTxPowerParams);
+  wdiEventData.pCBfnc          = wdiReqStatusCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2628,7 +2639,6 @@
 {
   WDI_EventInfoType wdiEventData;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-
   /*------------------------------------------------------------------------
     Sanity Check 
   ------------------------------------------------------------------------*/
@@ -2657,7 +2667,7 @@
 /*======================================================================== 
  
                             QoS and BA APIs
- 
+
 ==========================================================================*/
 
 /**
@@ -2670,23 +2680,23 @@
         DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
  @param wdiAddTsReqParams: the add TS parameters as specified by
                       the Device Interface
-  
+
         wdiAddTsRspCb: callback for passing back the response of
         the add TS operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_AddTSReq
 (
   WDI_AddTSReqParamsType* pwdiAddTsReqParams,
@@ -2698,23 +2708,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_ADD_TS_REQ;
-  wdiEventData.pEventData      = pwdiAddTsReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiAddTsReqParams); 
-  wdiEventData.pCBfnc          = wdiAddTsRspCb; 
+  wdiEventData.pEventData      = pwdiAddTsReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiAddTsReqParams);
+  wdiEventData.pCBfnc          = wdiAddTsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2732,23 +2742,23 @@
         in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_AddTSReq must have been called.
 
  @param wdiDelTsReqParams: the del TS parameters as specified by
                       the Device Interface
-  
+
         wdiDelTsRspCb: callback for passing back the response of
         the del TS operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_AddTSReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_DelTSReq
 (
   WDI_DelTSReqParamsType* pwdiDelTsReqParams,
@@ -2760,23 +2770,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_DEL_TS_REQ;
-  wdiEventData.pEventData      = pwdiDelTsReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiDelTsReqParams); 
-  wdiEventData.pCBfnc          = wdiDelTsRspCb; 
+  wdiEventData.pEventData      = pwdiDelTsReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiDelTsReqParams);
+  wdiEventData.pCBfnc          = wdiDelTsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2786,7 +2796,7 @@
 
 
 /**
- @brief WDI_UpdateEDCAParams will be called when the upper MAC 
+ @brief WDI_UpdateEDCAParams will be called when the upper MAC
         wishes to update the EDCA parameters used by HW for QoS
         data traffic. Upon the call of this API the WLAN DAL
         will pack and send a HAL Update EDCA Params request
@@ -2794,23 +2804,23 @@
         STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param wdiUpdateEDCAParams: the start parameters as specified 
+ @param wdiUpdateEDCAParams: the start parameters as specified
                       by the Device Interface
-  
+
         wdiUpdateEDCAParamsRspCb: callback for passing back the
         response of the start operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_UpdateEDCAParams
 (
   WDI_UpdateEDCAParamsType*    pwdiUpdateEDCAParams,
@@ -2822,23 +2832,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_UPD_EDCA_PRMS_REQ;
-  wdiEventData.pEventData      = pwdiUpdateEDCAParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiUpdateEDCAParams); 
-  wdiEventData.pCBfnc          = wdiUpdateEDCAParamsRspCb; 
+  wdiEventData.pEventData      = pwdiUpdateEDCAParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiUpdateEDCAParams);
+  wdiEventData.pCBfnc          = wdiUpdateEDCAParamsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2855,23 +2865,23 @@
         in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
  @param wdiAddBAReqParams: the add BA parameters as specified by
                       the Device Interface
-  
+
         wdiAddBARspCb: callback for passing back the response of
         the add BA operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_AddBASessionReq
 (
   WDI_AddBASessionReqParamsType* pwdiAddBASessionReqParams,
@@ -2883,23 +2893,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_ADD_BA_SESSION_REQ;
-  wdiEventData.pEventData      = pwdiAddBASessionReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiAddBASessionReqParams); 
-  wdiEventData.pCBfnc          = wdiAddBASessionRspCb; 
+  wdiEventData.pEventData      = pwdiAddBASessionReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiAddBASessionReqParams);
+  wdiEventData.pCBfnc          = wdiAddBASessionRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -2907,30 +2917,30 @@
 }/*WDI_AddBASessionReq*/
 
 /**
- @brief WDI_DelBAReq will be called when the upper MAC wants to 
+ @brief WDI_DelBAReq will be called when the upper MAC wants to
         inform HW that it has deleted a previously created BA
         session. Upon the call of this API the WLAN DAL will
         pack and send a HAL Del BA request message to the lower
         RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_AddBAReq must have been called.
 
  @param wdiDelBAReqParams: the del BA parameters as specified by
                       the Device Interface
-  
+
         wdiDelBARspCb: callback for passing back the response of
         the del BA operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_AddBAReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_DelBAReq
 (
   WDI_DelBAReqParamsType* pwdiDelBAReqParams,
@@ -2942,61 +2952,61 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_DEL_BA_REQ;
-  wdiEventData.pEventData      = pwdiDelBAReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiDelBAReqParams); 
-  wdiEventData.pCBfnc          = wdiDelBARspCb; 
+  wdiEventData.pEventData      = pwdiDelBAReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiDelBAReqParams);
+  wdiEventData.pCBfnc          = wdiDelBARspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 
 }/*WDI_DelBAReq*/
 
-/*======================================================================== 
- 
+/*========================================================================
+
                             Power Save APIs
- 
+
 ==========================================================================*/
 
 /**
- @brief WDI_SetPwrSaveCfgReq will be called when the upper MAC 
+ @brief WDI_SetPwrSaveCfgReq will be called when the upper MAC
         wants to set the power save related configurations of
         the WLAN Device. Upon the call of this API the WLAN DAL
         will pack and send a HAL Update CFG request message to
         the lower RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_Start must have been called.
 
- @param pwdiPowerSaveCfg: the power save cfg parameters as 
+ @param pwdiPowerSaveCfg: the power save cfg parameters as
                       specified by the Device Interface
-  
+
         wdiSetPwrSaveCfgCb: callback for passing back the
         response of the set power save cfg operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_Start
- @return Result of the function call  
-*/ 
-WDI_Status 
+ @return Result of the function call
+*/
+WDI_Status
 WDI_SetPwrSaveCfgReq
 (
   WDI_UpdateCfgReqParamsType*   pwdiPowerSaveCfg,
@@ -3008,23 +3018,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_UPDATE_CFG_REQ;
-  wdiEventData.pEventData      = pwdiPowerSaveCfg; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiPowerSaveCfg); 
-  wdiEventData.pCBfnc          = wdiSetPwrSaveCfgCb; 
+  wdiEventData.pEventData      = pwdiPowerSaveCfg;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiPowerSaveCfg);
+  wdiEventData.pCBfnc          = wdiSetPwrSaveCfgCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -3032,27 +3042,27 @@
 }/*WDI_SetPwrSaveCfgReq*/
 
 /**
- @brief WDI_EnterImpsReq will be called when the upper MAC to 
+ @brief WDI_EnterImpsReq will be called when the upper MAC to
         request the device to get into IMPS power state. Upon
         the call of this API the WLAN DAL will send a HAL Enter
         IMPS request message to the lower RIVA sub-system if DAL
         is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
-  
- @param wdiEnterImpsRspCb: callback for passing back the 
+
+ @param wdiEnterImpsRspCb: callback for passing back the
         response of the Enter IMPS operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_Start
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_EnterImpsReq
 (
    WDI_EnterImpsRspCb  wdiEnterImpsRspCb,
@@ -3063,23 +3073,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_ENTER_IMPS_REQ;
-  wdiEventData.pEventData      = NULL; 
-  wdiEventData.uEventDataSize  = 0; 
-  wdiEventData.pCBfnc          = wdiEnterImpsRspCb; 
+  wdiEventData.pEventData      = NULL;
+  wdiEventData.uEventDataSize  = 0;
+  wdiEventData.pCBfnc          = wdiEnterImpsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -3087,27 +3097,27 @@
 }/*WDI_EnterImpsReq*/
 
 /**
- @brief WDI_ExitImpsReq will be called when the upper MAC to 
+ @brief WDI_ExitImpsReq will be called when the upper MAC to
         request the device to get out of IMPS power state. Upon
         the call of this API the WLAN DAL will send a HAL Exit
         IMPS request message to the lower RIVA sub-system if DAL
         is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
- 
 
- @param wdiExitImpsRspCb: callback for passing back the response 
+
+ @param wdiExitImpsRspCb: callback for passing back the response
         of the Exit IMPS operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_Start
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_ExitImpsReq
 (
    WDI_ExitImpsRspCb  wdiExitImpsRspCb,
@@ -3118,23 +3128,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_EXIT_IMPS_REQ;
-  wdiEventData.pEventData      = NULL; 
-  wdiEventData.uEventDataSize  = 0; 
-  wdiEventData.pCBfnc          = wdiExitImpsRspCb; 
+  wdiEventData.pEventData      = NULL;
+  wdiEventData.uEventDataSize  = 0;
+  wdiEventData.pCBfnc          = wdiExitImpsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -3142,31 +3152,31 @@
 }/*WDI_ExitImpsReq*/
 
 /**
- @brief WDI_EnterBmpsReq will be called when the upper MAC to 
+ @brief WDI_EnterBmpsReq will be called when the upper MAC to
         request the device to get into BMPS power state. Upon
         the call of this API the WLAN DAL will pack and send a
         HAL Enter BMPS request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param pwdiEnterBmpsReqParams: the Enter BMPS parameters as 
+ @param pwdiEnterBmpsReqParams: the Enter BMPS parameters as
                       specified by the Device Interface
-  
+
         wdiEnterBmpsRspCb: callback for passing back the
         response of the Enter BMPS operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_EnterBmpsReq
 (
    WDI_EnterBmpsReqParamsType *pwdiEnterBmpsReqParams,
@@ -3178,23 +3188,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_ENTER_BMPS_REQ;
-  wdiEventData.pEventData      = pwdiEnterBmpsReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiEnterBmpsReqParams); 
-  wdiEventData.pCBfnc          = wdiEnterBmpsRspCb; 
+  wdiEventData.pEventData      = pwdiEnterBmpsReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiEnterBmpsReqParams);
+  wdiEventData.pCBfnc          = wdiEnterBmpsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -3202,30 +3212,30 @@
 }/*WDI_EnterBmpsReq*/
 
 /**
- @brief WDI_ExitBmpsReq will be called when the upper MAC to 
+ @brief WDI_ExitBmpsReq will be called when the upper MAC to
         request the device to get out of BMPS power state. Upon
         the call of this API the WLAN DAL will pack and send a
         HAL Exit BMPS request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param pwdiExitBmpsReqParams: the Exit BMPS parameters as 
+ @param pwdiExitBmpsReqParams: the Exit BMPS parameters as
                       specified by the Device Interface
-  
+
         wdiExitBmpsRspCb: callback for passing back the response
         of the Exit BMPS operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_ExitBmpsReq
 (
    WDI_ExitBmpsReqParamsType *pwdiExitBmpsReqParams,
@@ -3237,23 +3247,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_EXIT_BMPS_REQ;
-  wdiEventData.pEventData      = pwdiExitBmpsReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiExitBmpsReqParams); 
-  wdiEventData.pCBfnc          = wdiExitBmpsRspCb; 
+  wdiEventData.pEventData      = pwdiExitBmpsReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiExitBmpsReqParams);
+  wdiEventData.pCBfnc          = wdiExitBmpsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -3261,32 +3271,32 @@
 }/*WDI_ExitBmpsReq*/
 
 /**
- @brief WDI_EnterUapsdReq will be called when the upper MAC to 
+ @brief WDI_EnterUapsdReq will be called when the upper MAC to
         request the device to get into UAPSD power state. Upon
         the call of this API the WLAN DAL will pack and send a
         HAL Enter UAPSD request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
  WDI_SetUapsdAcParamsReq must have been called.
-  
- @param pwdiEnterUapsdReqParams: the Enter UAPSD parameters as 
+
+ @param pwdiEnterUapsdReqParams: the Enter UAPSD parameters as
                       specified by the Device Interface
-  
+
         wdiEnterUapsdRspCb: callback for passing back the
         response of the Enter UAPSD operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq, WDI_SetUapsdAcParamsReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_EnterUapsdReq
 (
    WDI_EnterUapsdReqParamsType *pwdiEnterUapsdReqParams,
@@ -3298,23 +3308,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_ENTER_UAPSD_REQ;
-  wdiEventData.pEventData      = pwdiEnterUapsdReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiEnterUapsdReqParams); 
-  wdiEventData.pCBfnc          = wdiEnterUapsdRspCb; 
+  wdiEventData.pEventData      = pwdiEnterUapsdReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiEnterUapsdReqParams);
+  wdiEventData.pCBfnc          = wdiEnterUapsdRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -3322,28 +3332,28 @@
 }/*WDI_EnterUapsdReq*/
 
 /**
- @brief WDI_ExitUapsdReq will be called when the upper MAC to 
+ @brief WDI_ExitUapsdReq will be called when the upper MAC to
         request the device to get out of UAPSD power state. Upon
         the call of this API the WLAN DAL will send a HAL Exit
         UAPSD request message to the lower RIVA sub-system if
         DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param wdiExitUapsdRspCb: callback for passing back the 
+ @param wdiExitUapsdRspCb: callback for passing back the
         response of the Exit UAPSD operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_ExitUapsdReq
 (
    WDI_ExitUapsdRspCb  wdiExitUapsdRspCb,
@@ -3354,23 +3364,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_EXIT_UAPSD_REQ;
-  wdiEventData.pEventData      = NULL; 
-  wdiEventData.uEventDataSize  = 0; 
-  wdiEventData.pCBfnc          = wdiExitUapsdRspCb; 
+  wdiEventData.pEventData      = NULL;
+  wdiEventData.uEventDataSize  = 0;
+  wdiEventData.pCBfnc          = wdiExitUapsdRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -3378,7 +3388,7 @@
 }/*WDI_ExitUapsdReq*/
 
 /**
- @brief WDI_UpdateUapsdParamsReq will be called when the upper 
+ @brief WDI_UpdateUapsdParamsReq will be called when the upper
         MAC wants to set the UAPSD related configurations
         of an associated STA (while acting as an AP) to the WLAN
         Device. Upon the call of this API the WLAN DAL will pack
@@ -3386,24 +3396,24 @@
         the lower RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_ConfigBSSReq must have been called.
 
- @param pwdiUpdateUapsdReqParams: the UAPSD parameters 
+ @param pwdiUpdateUapsdReqParams: the UAPSD parameters
                       as specified by the Device Interface
-  
+
         wdiUpdateUapsdParamsCb: callback for passing back the
         response of the update UAPSD params operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_ConfigBSSReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_UpdateUapsdParamsReq
 (
    WDI_UpdateUapsdReqParamsType *pwdiUpdateUapsdReqParams,
@@ -3415,23 +3425,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_UPDATE_UAPSD_PARAM_REQ;
-  wdiEventData.pEventData      = pwdiUpdateUapsdReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiUpdateUapsdReqParams);; 
-  wdiEventData.pCBfnc          = wdiUpdateUapsdParamsCb; 
+  wdiEventData.pEventData      = pwdiUpdateUapsdReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiUpdateUapsdReqParams);;
+  wdiEventData.pCBfnc          = wdiUpdateUapsdParamsCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -3439,7 +3449,7 @@
 }/*WDI_UpdateUapsdParamsReq*/
 
 /**
- @brief WDI_SetUapsdAcParamsReq will be called when the upper 
+ @brief WDI_SetUapsdAcParamsReq will be called when the upper
         MAC wants to set the UAPSD related configurations before
         requesting for enter UAPSD power state to the WLAN
         Device. Upon the call of this API the WLAN DAL will pack
@@ -3447,24 +3457,24 @@
         the lower RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
  @param pwdiUapsdInfo: the UAPSD parameters as specified by
                       the Device Interface
-  
+
         wdiSetUapsdAcParamsCb: callback for passing back the
         response of the set UAPSD params operation received from
         the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetUapsdAcParamsReq
 (
   WDI_SetUapsdAcParamsReqParamsType*      pwdiUapsdInfo,
@@ -3476,23 +3486,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_SET_UAPSD_PARAM_REQ;
-  wdiEventData.pEventData      = pwdiUapsdInfo; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiUapsdInfo); 
-  wdiEventData.pCBfnc          = wdiSetUapsdAcParamsCb; 
+  wdiEventData.pEventData      = pwdiUapsdInfo;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiUapsdInfo);
+  wdiEventData.pCBfnc          = wdiSetUapsdAcParamsCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -3500,30 +3510,30 @@
 }/*WDI_SetUapsdAcParamsReq*/
 
 /**
- @brief WDI_ConfigureRxpFilterReq will be called when the upper 
+ @brief WDI_ConfigureRxpFilterReq will be called when the upper
         MAC wants to set/reset the RXP filters for received pkts
         (MC, BC etc.). Upon the call of this API the WLAN DAL will pack
         and send a HAL configure RXP filter request message to
         the lower RIVA sub-system.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
-  
- @param pwdiConfigureRxpFilterReqParams: the RXP 
+
+ @param pwdiConfigureRxpFilterReqParams: the RXP
                       filter as specified by the Device
                       Interface
-  
+
         wdiConfigureRxpFilterCb: callback for passing back the
         response of the configure RXP filter operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_ConfigureRxpFilterReq
 (
    WDI_ConfigureRxpFilterReqParamsType *pwdiConfigureRxpFilterReqParams,
@@ -3535,23 +3545,23 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_CONFIGURE_RXP_FILTER_REQ;
-   wdiEventData.pEventData      = pwdiConfigureRxpFilterReqParams; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiConfigureRxpFilterReqParams); 
-   wdiEventData.pCBfnc          = wdiConfigureRxpFilterCb; 
+   wdiEventData.pEventData      = pwdiConfigureRxpFilterReqParams;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiConfigureRxpFilterReqParams);
+   wdiEventData.pCBfnc          = wdiConfigureRxpFilterCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -3565,23 +3575,23 @@
         lower RIVA sub-system.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
-  
- @param pwdiBeaconFilterReqParams: the beacon 
+
+ @param pwdiBeaconFilterReqParams: the beacon
                       filter as specified by the Device
                       Interface
-  
+
         wdiBeaconFilterCb: callback for passing back the
         response of the set beacon filter operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetBeaconFilterReq
 (
    WDI_BeaconFilterReqParamsType   *pwdiBeaconFilterReqParams,
@@ -3593,23 +3603,23 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_SET_BEACON_FILTER_REQ;
-   wdiEventData.pEventData      = pwdiBeaconFilterReqParams; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiBeaconFilterReqParams);; 
-   wdiEventData.pCBfnc          = wdiBeaconFilterCb; 
+   wdiEventData.pEventData      = pwdiBeaconFilterReqParams;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiBeaconFilterReqParams);;
+   wdiEventData.pCBfnc          = wdiBeaconFilterCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -3623,23 +3633,23 @@
         message to the lower RIVA sub-system.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
-  
- @param pwdiBeaconFilterReqParams: the beacon 
+
+ @param pwdiBeaconFilterReqParams: the beacon
                       filter as specified by the Device
                       Interface
-  
+
         wdiBeaconFilterCb: callback for passing back the
         response of the remove beacon filter operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_RemBeaconFilterReq
 (
    WDI_RemBeaconFilterReqParamsType *pwdiBeaconFilterReqParams,
@@ -3651,30 +3661,30 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_REM_BEACON_FILTER_REQ;
-   wdiEventData.pEventData      = pwdiBeaconFilterReqParams; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiBeaconFilterReqParams);; 
-   wdiEventData.pCBfnc          = wdiBeaconFilterCb; 
+   wdiEventData.pEventData      = pwdiBeaconFilterReqParams;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiBeaconFilterReqParams);;
+   wdiEventData.pCBfnc          = wdiBeaconFilterCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }/*WDI_RemBeaconFilterReq*/
 
 /**
- @brief WDI_SetRSSIThresholdsReq will be called when the upper 
+ @brief WDI_SetRSSIThresholdsReq will be called when the upper
         MAC wants to set the RSSI thresholds related
         configurations while in power save. Upon the call of
         this API the WLAN DAL will pack and send a HAL Set RSSI
@@ -3682,24 +3692,24 @@
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
  @param pwdiUapsdInfo: the UAPSD parameters as specified by
                       the Device Interface
-  
+
         wdiSetUapsdAcParamsCb: callback for passing back the
         response of the set UAPSD params operation received from
         the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetRSSIThresholdsReq
 (
   WDI_SetRSSIThresholdsReqParamsType*      pwdiRSSIThresholdsParams,
@@ -3711,30 +3721,30 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_SET_RSSI_THRESHOLDS_REQ;
-   wdiEventData.pEventData      = pwdiRSSIThresholdsParams; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiRSSIThresholdsParams);; 
-   wdiEventData.pCBfnc          = wdiSetRSSIThresholdsCb; 
+   wdiEventData.pEventData      = pwdiRSSIThresholdsParams;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiRSSIThresholdsParams);;
+   wdiEventData.pCBfnc          = wdiSetRSSIThresholdsCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }/* WDI_SetRSSIThresholdsReq*/
 
 /**
- @brief WDI_HostOffloadReq will be called when the upper MAC 
+ @brief WDI_HostOffloadReq will be called when the upper MAC
         wants to set the filter to minimize unnecessary host
         wakeup due to broadcast traffic while in power save.
         Upon the call of this API the WLAN DAL will pack and
@@ -3742,24 +3752,24 @@
         lower RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param pwdiHostOffloadParams: the host offload as specified 
+ @param pwdiHostOffloadParams: the host offload as specified
                       by the Device Interface
-  
+
         wdiHostOffloadCb: callback for passing back the response
         of the host offload operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_HostOffloadReq
 (
   WDI_HostOffloadReqParamsType*      pwdiHostOffloadParams,
@@ -3771,55 +3781,55 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_HOST_OFFLOAD_REQ;
-   wdiEventData.pEventData      = pwdiHostOffloadParams; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiHostOffloadParams);; 
-   wdiEventData.pCBfnc          = wdiHostOffloadCb; 
+   wdiEventData.pEventData      = pwdiHostOffloadParams;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiHostOffloadParams);;
+   wdiEventData.pCBfnc          = wdiHostOffloadCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }/*WDI_HostOffloadReq*/
 
 /**
- @brief WDI_KeepAliveReq will be called when the upper MAC 
-        wants to set the filter to send NULL or unsolicited ARP responses 
+ @brief WDI_KeepAliveReq will be called when the upper MAC
+        wants to set the filter to send NULL or unsolicited ARP responses
         and minimize unnecessary host wakeups due to while in power save.
         Upon the call of this API the WLAN DAL will pack and
         send a HAL Keep Alive request message to the
         lower RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param pwdiKeepAliveParams: the Keep Alive as specified 
+ @param pwdiKeepAliveParams: the Keep Alive as specified
                       by the Device Interface
-  
+
         wdiKeepAliveCb: callback for passing back the response
         of the Keep Alive operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_KeepAliveReq
 (
   WDI_KeepAliveReqParamsType*        pwdiKeepAliveParams,
@@ -3831,7 +3841,7 @@
     /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
     /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
     ------------------------------------------------------------------------*/
     if ( eWLAN_PAL_FALSE == gWDIInitialized )
     {
@@ -3839,23 +3849,23 @@
                     "WDI_KeepAliveReq: WDI API call before module "
                     "is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
     }
 
     /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
     ------------------------------------------------------------------------*/
     wdiEventData.wdiRequest      = WDI_KEEP_ALIVE_REQ;
-    wdiEventData.pEventData      = pwdiKeepAliveParams; 
-    wdiEventData.uEventDataSize  = sizeof(*pwdiKeepAliveParams); 
-    wdiEventData.pCBfnc          = wdiKeepAliveCb; 
+    wdiEventData.pEventData      = pwdiKeepAliveParams;
+    wdiEventData.uEventDataSize  = sizeof(*pwdiKeepAliveParams);
+    wdiEventData.pCBfnc          = wdiKeepAliveCb;
     wdiEventData.pUserData       = pUserData;
 
     return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }/*WDI_KeepAliveReq*/
 
 /**
- @brief WDI_WowlAddBcPtrnReq will be called when the upper MAC 
+ @brief WDI_WowlAddBcPtrnReq will be called when the upper MAC
         wants to set the Wowl Bcast ptrn to minimize unnecessary
         host wakeup due to broadcast traffic while in power
         save. Upon the call of this API the WLAN DAL will pack
@@ -3863,24 +3873,24 @@
         lower RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param pwdiWowlAddBcPtrnParams: the Wowl bcast ptrn as 
+ @param pwdiWowlAddBcPtrnParams: the Wowl bcast ptrn as
                       specified by the Device Interface
-  
+
         wdiWowlAddBcPtrnCb: callback for passing back the
         response of the add Wowl bcast ptrn operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_WowlAddBcPtrnReq
 (
   WDI_WowlAddBcPtrnReqParamsType*    pwdiWowlAddBcPtrnParams,
@@ -3892,54 +3902,54 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_WOWL_ADD_BC_PTRN_REQ;
-   wdiEventData.pEventData      = pwdiWowlAddBcPtrnParams; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiWowlAddBcPtrnParams);; 
-   wdiEventData.pCBfnc          = wdiWowlAddBcPtrnCb; 
+   wdiEventData.pEventData      = pwdiWowlAddBcPtrnParams;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiWowlAddBcPtrnParams);;
+   wdiEventData.pCBfnc          = wdiWowlAddBcPtrnCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }/*WDI_WowlAddBcPtrnReq*/
 
 /**
- @brief WDI_WowlDelBcPtrnReq will be called when the upper MAC 
+ @brief WDI_WowlDelBcPtrnReq will be called when the upper MAC
         wants to clear the Wowl Bcast ptrn. Upon the call of
         this API the WLAN DAL will pack and send a HAL delete
         Wowl Bcast ptrn request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_WowlAddBcPtrnReq must have been called.
 
- @param pwdiWowlDelBcPtrnParams: the Wowl bcast ptrn as 
+ @param pwdiWowlDelBcPtrnParams: the Wowl bcast ptrn as
                       specified by the Device Interface
-  
+
         wdiWowlDelBcPtrnCb: callback for passing back the
         response of the del Wowl bcast ptrn operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_WowlAddBcPtrnReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_WowlDelBcPtrnReq
 (
   WDI_WowlDelBcPtrnReqParamsType*    pwdiWowlDelBcPtrnParams,
@@ -3951,30 +3961,30 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_WOWL_DEL_BC_PTRN_REQ;
-   wdiEventData.pEventData      = pwdiWowlDelBcPtrnParams; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiWowlDelBcPtrnParams);; 
-   wdiEventData.pCBfnc          = wdiWowlDelBcPtrnCb; 
+   wdiEventData.pEventData      = pwdiWowlDelBcPtrnParams;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiWowlDelBcPtrnParams);;
+   wdiEventData.pCBfnc          = wdiWowlDelBcPtrnCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }/*WDI_WowlDelBcPtrnReq*/
 
 /**
- @brief WDI_WowlEnterReq will be called when the upper MAC 
+ @brief WDI_WowlEnterReq will be called when the upper MAC
         wants to enter the Wowl state to minimize unnecessary
         host wakeup while in power save. Upon the call of this
         API the WLAN DAL will pack and send a HAL Wowl enter
@@ -3982,24 +3992,24 @@
         in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param pwdiWowlEnterReqParams: the Wowl enter info as 
+ @param pwdiWowlEnterReqParams: the Wowl enter info as
                       specified by the Device Interface
-  
+
         wdiWowlEnterReqCb: callback for passing back the
         response of the enter Wowl operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_WowlEnterReq
 (
   WDI_WowlEnterReqParamsType*    pwdiWowlEnterParams,
@@ -4011,53 +4021,53 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_WOWL_ENTER_REQ;
-   wdiEventData.pEventData      = pwdiWowlEnterParams; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiWowlEnterParams);; 
-   wdiEventData.pCBfnc          = wdiWowlEnterCb; 
+   wdiEventData.pEventData      = pwdiWowlEnterParams;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiWowlEnterParams);;
+   wdiEventData.pCBfnc          = wdiWowlEnterCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }/*WDI_WowlEnterReq*/
 
 /**
- @brief WDI_WowlExitReq will be called when the upper MAC 
+ @brief WDI_WowlExitReq will be called when the upper MAC
         wants to exit the Wowl state. Upon the call of this API
         the WLAN DAL will pack and send a HAL Wowl exit request
         message to the lower RIVA sub-system if DAL is in state
         STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_WowlEnterReq must have been called.
 
- @param pwdiWowlExitReqParams: the Wowl exit info as 
+ @param pwdiWowlExitReqParams: the Wowl exit info as
                       specified by the Device Interface
-  
+
         wdiWowlExitReqCb: callback for passing back the response
         of the exit Wowl operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_WowlEnterReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_WowlExitReq
 (
   WDI_WowlExitReqCb              wdiWowlExitCb,
@@ -4068,30 +4078,30 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_WOWL_EXIT_REQ;
-   wdiEventData.pEventData      = NULL; 
-   wdiEventData.uEventDataSize  = 0; 
-   wdiEventData.pCBfnc          = wdiWowlExitCb; 
+   wdiEventData.pEventData      = NULL;
+   wdiEventData.uEventDataSize  = 0;
+   wdiEventData.pCBfnc          = wdiWowlExitCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }/*WDI_WowlExitReq*/
 
 /**
- @brief WDI_ConfigureAppsCpuWakeupStateReq will be called when 
+ @brief WDI_ConfigureAppsCpuWakeupStateReq will be called when
         the upper MAC wants to dynamically adjusts the listen
         interval based on the WLAN/MSM activity. Upon the call
         of this API the WLAN DAL will pack and send a HAL
@@ -4099,23 +4109,23 @@
         lower RIVA sub-system.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
-  
- @param pwdiConfigureAppsCpuWakeupStateReqParams: the 
+
+ @param pwdiConfigureAppsCpuWakeupStateReqParams: the
                       Apps Cpu Wakeup State as specified by the
                       Device Interface
-  
+
         wdiConfigureAppsCpuWakeupStateCb: callback for passing
         back the response of the configure Apps Cpu Wakeup State
         operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_ConfigureAppsCpuWakeupStateReq
 (
    WDI_ConfigureAppsCpuWakeupStateReqParamsType *pwdiConfigureAppsCpuWakeupStateReqParams,
@@ -4127,52 +4137,52 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_CONFIGURE_APPS_CPU_WAKEUP_STATE_REQ;
-   wdiEventData.pEventData      = pwdiConfigureAppsCpuWakeupStateReqParams; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiConfigureAppsCpuWakeupStateReqParams); 
-   wdiEventData.pCBfnc          = wdiConfigureAppsCpuWakeupStateCb; 
+   wdiEventData.pEventData      = pwdiConfigureAppsCpuWakeupStateReqParams;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiConfigureAppsCpuWakeupStateReqParams);
+   wdiEventData.pCBfnc          = wdiConfigureAppsCpuWakeupStateCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }/*WDI_ConfigureAppsCpuWakeupStateReq*/
 /**
- @brief WDI_FlushAcReq will be called when the upper MAC wants 
+ @brief WDI_FlushAcReq will be called when the upper MAC wants
         to to perform a flush operation on a given AC. Upon the
         call of this API the WLAN DAL will pack and send a HAL
         Flush AC request message to the lower RIVA sub-system if
         DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_AddBAReq must have been called.
 
- @param pwdiFlushAcReqParams: the Flush AC parameters as 
+ @param pwdiFlushAcReqParams: the Flush AC parameters as
                       specified by the Device Interface
-  
+
         wdiFlushAcRspCb: callback for passing back the response
         of the Flush AC operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_AddBAReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_FlushAcReq
 (
   WDI_FlushAcReqParamsType* pwdiFlushAcReqParams,
@@ -4184,23 +4194,23 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_FLUSH_AC_REQ;
-   wdiEventData.pEventData      = pwdiFlushAcReqParams; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiFlushAcReqParams); 
-   wdiEventData.pCBfnc          = wdiFlushAcRspCb; 
+   wdiEventData.pEventData      = pwdiFlushAcReqParams;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiFlushAcReqParams);
+   wdiEventData.pCBfnc          = wdiFlushAcRspCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4208,7 +4218,7 @@
 }/*WDI_FlushAcReq*/
 
 /**
- @brief WDI_BtAmpEventReq will be called when the upper MAC 
+ @brief WDI_BtAmpEventReq will be called when the upper MAC
         wants to notify the lower mac on a BT AMP event. This is
         to inform BTC-SLM that some BT AMP event occurred. Upon
         the call of this API the WLAN DAL will pack and send a
@@ -4216,22 +4226,22 @@
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
-  
- @param wdiBtAmpEventReqParams: the BT AMP event parameters as 
+
+ @param wdiBtAmpEventReqParams: the BT AMP event parameters as
                       specified by the Device Interface
-  
+
         wdiBtAmpEventRspCb: callback for passing back the
         response of the BT AMP event operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
- 
+        callback
+
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_BtAmpEventReq
 (
   WDI_BtAmpEventParamsType* pwdiBtAmpEventReqParams,
@@ -4243,61 +4253,123 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_BTAMP_EVENT_REQ;
-   wdiEventData.pEventData      = pwdiBtAmpEventReqParams; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiBtAmpEventReqParams); 
-   wdiEventData.pCBfnc          = wdiBtAmpEventRspCb; 
+   wdiEventData.pEventData      = pwdiBtAmpEventReqParams;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiBtAmpEventReqParams);
+   wdiEventData.pCBfnc          = wdiBtAmpEventRspCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 
 }/*WDI_BtAmpEventReq*/
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/**
+ @brief WDI_Start Oem Data Req will be called when the upper MAC 
+        wants to notify the lower mac on a oem data Req event.Upon
+        the call of this API the WLAN DAL will pack and send a
+        HAL OEM Data Req event request message to the lower RIVA
+        sub-system if DAL is in state STARTED.
+
+        In state BUSY this request will be queued. Request won't
+        be allowed in any other state.
 
 
-/*======================================================================== 
- 
+  
+ @param pwdiOemDataReqParams: the Oem Data Req as 
+        specified by the Device Interface
+
+        wdiStartOemDataRspCb: callback for passing back the
+        response of the Oem Data Req received from the
+        device
+
+        pUserData: user data will be passed back with the
+        callback
+
+ @return Result of the function call
+*/
+WDI_Status
+WDI_StartOemDataReq
+(
+  WDI_oemDataReqParamsType*         pwdiOemDataReqParams,
+  WDI_oemDataRspCb                  wdiOemDataRspCb,
+  void*                             pUserData
+)
+{
+   WDI_EventInfoType      wdiEventData;
+   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+   /*------------------------------------------------------------------------
+     Sanity Check
+   ------------------------------------------------------------------------*/
+   if ( eWLAN_PAL_FALSE == gWDIInitialized )
+   {
+     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
+               "WDI API call before module is initialized - Fail request");
+
+     return WDI_STATUS_E_NOT_ALLOWED;
+   }
+
+   /*------------------------------------------------------------------------
+     Fill in Event data and post to the Main FSM
+   ------------------------------------------------------------------------*/
+   wdiEventData.wdiRequest      = WDI_START_OEM_DATA_REQ;
+   wdiEventData.pEventData      = pwdiOemDataReqParams; 
+   wdiEventData.uEventDataSize  = sizeof(*pwdiOemDataReqParams); 
+   wdiEventData.pCBfnc          = wdiOemDataRspCb; 
+   wdiEventData.pUserData       = pUserData;
+
+   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
+
+
+}
+
+#endif
+
+
+/*========================================================================
+
                              CONTROL APIs
- 
+
 ==========================================================================*/
 /**
- @brief WDI_SwitchChReq will be called when the upper MAC wants 
+ @brief WDI_SwitchChReq will be called when the upper MAC wants
         the WLAN HW to change the current channel of operation.
         Upon the call of this API the WLAN DAL will pack and
         send a HAL Start request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_Start must have been called.
 
- @param wdiSwitchChReqParams: the switch ch parameters as 
+ @param wdiSwitchChReqParams: the switch ch parameters as
                       specified by the Device Interface
-  
+
         wdiSwitchChRspCb: callback for passing back the response
         of the switch ch operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_Start
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SwitchChReq
 (
   WDI_SwitchChReqParamsType* pwdiSwitchChReqParams,
@@ -4309,23 +4381,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_CH_SWITCH_REQ;
-  wdiEventData.pEventData      = pwdiSwitchChReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiSwitchChReqParams); 
-  wdiEventData.pCBfnc          = wdiSwitchChRspCb; 
+  wdiEventData.pEventData      = pwdiSwitchChReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiSwitchChReqParams);
+  wdiEventData.pCBfnc          = wdiSwitchChRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4334,31 +4406,31 @@
 
 
 /**
- @brief WDI_ConfigSTAReq will be called when the upper MAC 
+ @brief WDI_ConfigSTAReq will be called when the upper MAC
         wishes to add or update a STA in HW. Upon the call of
         this API the WLAN DAL will pack and send a HAL Start
         message request message to the lower RIVA sub-system if
         DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_Start must have been called.
 
- @param wdiConfigSTAReqParams: the config STA parameters as 
+ @param wdiConfigSTAReqParams: the config STA parameters as
                       specified by the Device Interface
-  
+
         wdiConfigSTARspCb: callback for passing back the
         response of the config STA operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_Start
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_ConfigSTAReq
 (
   WDI_ConfigSTAReqParamsType* pwdiConfigSTAReqParams,
@@ -4370,23 +4442,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_CONFIG_STA_REQ;
-  wdiEventData.pEventData      = pwdiConfigSTAReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiConfigSTAReqParams); 
-  wdiEventData.pCBfnc          = wdiConfigSTARspCb; 
+  wdiEventData.pEventData      = pwdiConfigSTAReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiConfigSTAReqParams);
+  wdiEventData.pCBfnc          = wdiConfigSTARspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4394,31 +4466,31 @@
 }/*WDI_ConfigSTAReq*/
 
 /**
- @brief WDI_SetLinkStateReq will be called when the upper MAC 
+ @brief WDI_SetLinkStateReq will be called when the upper MAC
         wants to change the state of an ongoing link. Upon the
         call of this API the WLAN DAL will pack and send a HAL
         Start message request message to the lower RIVA
         sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_JoinStartReq must have been called.
 
- @param wdiSetLinkStateReqParams: the set link state parameters 
+ @param wdiSetLinkStateReqParams: the set link state parameters
                       as specified by the Device Interface
-  
+
         wdiSetLinkStateRspCb: callback for passing back the
         response of the set link state operation received from
         the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_JoinStartReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetLinkStateReq
 (
   WDI_SetLinkReqParamsType* pwdiSetLinkStateReqParams,
@@ -4430,23 +4502,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_SET_LINK_ST_REQ;
-  wdiEventData.pEventData      = pwdiSetLinkStateReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiSetLinkStateReqParams); 
-  wdiEventData.pCBfnc          = wdiSetLinkStateRspCb; 
+  wdiEventData.pEventData      = pwdiSetLinkStateReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiSetLinkStateReqParams);
+  wdiEventData.pCBfnc          = wdiSetLinkStateRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4455,30 +4527,30 @@
 
 
 /**
- @brief WDI_GetStatsReq will be called when the upper MAC wants 
+ @brief WDI_GetStatsReq will be called when the upper MAC wants
         to get statistics (MIB counters) from the device. Upon
         the call of this API the WLAN DAL will pack and send a
         HAL Start request message to the lower RIVA sub-system
         if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_Start must have been called.
 
- @param wdiGetStatsReqParams: the stats parameters to get as 
+ @param wdiGetStatsReqParams: the stats parameters to get as
                       specified by the Device Interface
-  
+
         wdiGetStatsRspCb: callback for passing back the response
         of the get stats operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_Start
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_GetStatsReq
 (
   WDI_GetStatsReqParamsType* pwdiGetStatsReqParams,
@@ -4490,23 +4562,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_GET_STATS_REQ;
-  wdiEventData.pEventData      = pwdiGetStatsReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiGetStatsReqParams); 
-  wdiEventData.pCBfnc          = wdiGetStatsRspCb; 
+  wdiEventData.pEventData      = pwdiGetStatsReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiGetStatsReqParams);
+  wdiEventData.pCBfnc          = wdiGetStatsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4515,31 +4587,31 @@
 
 
 /**
- @brief WDI_UpdateCfgReq will be called when the upper MAC when 
+ @brief WDI_UpdateCfgReq will be called when the upper MAC when
         it wishes to change the configuration of the WLAN
         Device. Upon the call of this API the WLAN DAL will pack
         and send a HAL Update CFG request message to the lower
         RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_Start must have been called.
 
- @param wdiUpdateCfgReqParams: the update cfg parameters as 
+ @param wdiUpdateCfgReqParams: the update cfg parameters as
                       specified by the Device Interface
-  
+
         wdiUpdateCfgsRspCb: callback for passing back the
         response of the update cfg operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_Start
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_UpdateCfgReq
 (
   WDI_UpdateCfgReqParamsType* pwdiUpdateCfgReqParams,
@@ -4551,23 +4623,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_UPDATE_CFG_REQ;
-  wdiEventData.pEventData      = pwdiUpdateCfgReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiUpdateCfgReqParams); 
-  wdiEventData.pCBfnc          = wdiUpdateCfgsRspCb; 
+  wdiEventData.pEventData      = pwdiUpdateCfgReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiUpdateCfgReqParams);
+  wdiEventData.pCBfnc          = wdiUpdateCfgsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4585,23 +4657,23 @@
         in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
  @param wdiAddBAReqParams: the add BA parameters as specified by
                       the Device Interface
-  
+
         wdiAddBARspCb: callback for passing back the response of
         the add BA operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_AddBAReq
 (
   WDI_AddBAReqParamsType* pwdiAddBAReqParams,
@@ -4613,23 +4685,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_ADD_BA_REQ;
-  wdiEventData.pEventData      = pwdiAddBAReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiAddBAReqParams); 
-  wdiEventData.pCBfnc          = wdiAddBARspCb; 
+  wdiEventData.pEventData      = pwdiAddBAReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiAddBAReqParams);
+  wdiEventData.pCBfnc          = wdiAddBARspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4646,23 +4718,23 @@
         in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
  @param wdiAddBAReqParams: the add BA parameters as specified by
                       the Device Interface
-  
+
         wdiAddBARspCb: callback for passing back the response of
         the add BA operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_TriggerBAReq
 (
   WDI_TriggerBAReqParamsType* pwdiTriggerBAReqParams,
@@ -4674,23 +4746,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_TRIGGER_BA_REQ;
-  wdiEventData.pEventData      = pwdiTriggerBAReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiTriggerBAReqParams); 
-  wdiEventData.pCBfnc          = wdiTriggerBARspCb; 
+  wdiEventData.pEventData      = pwdiTriggerBAReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiTriggerBAReqParams);
+  wdiEventData.pCBfnc          = wdiTriggerBARspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4698,30 +4770,30 @@
 }/*WDI_AddBAReq*/
 
 /**
- @brief WDI_UpdateBeaconParamsReq will be called when the upper MAC 
+ @brief WDI_UpdateBeaconParamsReq will be called when the upper MAC
         wishes to update any of the Beacon parameters used by HW.
         Upon the call of this API the WLAN DAL will pack and send a HAL Update Beacon Params request
         message to the lower RIVA sub-system if DAL is in state
         STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param wdiUpdateBeaconParams: the Beacon parameters as specified 
+ @param wdiUpdateBeaconParams: the Beacon parameters as specified
                       by the Device Interface
-  
+
         wdiUpdateBeaconParamsRspCb: callback for passing back the
         response of the start operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_UpdateBeaconParamsReq
 (
   WDI_UpdateBeaconParamsType*    pwdiUpdateBeaconParams,
@@ -4733,23 +4805,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_UPD_BCON_PRMS_REQ;
-  wdiEventData.pEventData      = pwdiUpdateBeaconParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiUpdateBeaconParams); 
-  wdiEventData.pCBfnc          = wdiUpdateBeaconParamsRspCb; 
+  wdiEventData.pEventData      = pwdiUpdateBeaconParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiUpdateBeaconParams);
+  wdiEventData.pCBfnc          = wdiUpdateBeaconParamsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4757,30 +4829,30 @@
 }/*WDI_UpdateBeaconParamsReq*/
 
 /**
- @brief WDI_SendBeaconParamsReq will be called when the upper MAC 
+ @brief WDI_SendBeaconParamsReq will be called when the upper MAC
         wishes to update  the Beacon template used by HW.
         Upon the call of this API the WLAN DAL will pack and send a HAL Update Beacon template request
         message to the lower RIVA sub-system if DAL is in state
         STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
- @param wdiSendBeaconParams: the Beacon parameters as specified 
+ @param wdiSendBeaconParams: the Beacon parameters as specified
                       by the Device Interface
-  
+
         wdiSendBeaconParamsRspCb: callback for passing back the
         response of the start operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SendBeaconParamsReq
 (
   WDI_SendBeaconParamsType*    pwdiSendBeaconParams,
@@ -4792,23 +4864,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_SND_BCON_REQ;
-  wdiEventData.pEventData      = pwdiSendBeaconParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiSendBeaconParams); 
-  wdiEventData.pCBfnc          = wdiSendBeaconParamsRspCb; 
+  wdiEventData.pEventData      = pwdiSendBeaconParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiSendBeaconParams);
+  wdiEventData.pCBfnc          = wdiSendBeaconParamsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4816,7 +4888,7 @@
 }/*WDI_SendBeaconParamsReq*/
 
 /**
- @brief WDI_UpdateProbeRspTemplateReq will be called when the 
+ @brief WDI_UpdateProbeRspTemplateReq will be called when the
         upper MAC wants to update the probe response template to
         be transmitted as Soft AP
          Upon the call of this API the WLAN DAL will
@@ -4824,24 +4896,24 @@
         lower RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
 
- @param pwdiUpdateProbeRspParams: the Update Beacon parameters as 
+ @param pwdiUpdateProbeRspParams: the Update Beacon parameters as
                       specified by the Device Interface
-  
+
         wdiSendBeaconParamsRspCb: callback for passing back the
         response of the Send Beacon Params operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_AddBAReq
  @return Result of the function call
 */
 
-WDI_Status 
+WDI_Status
 WDI_UpdateProbeRspTemplateReq
 (
   WDI_UpdateProbeRspTemplateParamsType*    pwdiUpdateProbeRspParams,
@@ -4853,23 +4925,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_UPD_PROBE_RSP_TEMPLATE_REQ;
-  wdiEventData.pEventData      = pwdiUpdateProbeRspParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiUpdateProbeRspParams); 
-  wdiEventData.pCBfnc          = wdiUpdateProbeRspParamsRspCb; 
+  wdiEventData.pEventData      = pwdiUpdateProbeRspParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiUpdateProbeRspParams);
+  wdiEventData.pCBfnc          = wdiUpdateProbeRspParamsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4883,17 +4955,17 @@
 
  @param wdiNvDownloadReqParams: the NV Download parameters as specified by
                       the Device Interface
-  
+
         wdiNvDownloadRspCb: callback for passing back the response of
         the NV Download operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_NvDownloadReq
 (
   WDI_NvDownloadReqParamsType* pwdiNvDownloadReqParams,
@@ -4904,23 +4976,23 @@
   WDI_EventInfoType      wdiEventData;
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
-  wdiEventData.wdiRequest      = WDI_NV_DOWNLOAD_REQ;            
-  wdiEventData.pEventData      = (void *)pwdiNvDownloadReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiNvDownloadReqParams); 
-  wdiEventData.pCBfnc          = wdiNvDownloadRspCb; 
+  wdiEventData.wdiRequest      = WDI_NV_DOWNLOAD_REQ;
+  wdiEventData.pEventData      = (void *)pwdiNvDownloadReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiNvDownloadReqParams);
+  wdiEventData.pCBfnc          = wdiNvDownloadRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_START_EVENT, &wdiEventData);
@@ -4929,26 +5001,26 @@
 
 #ifdef WLAN_FEATURE_P2P
 /**
- @brief WDI_SetP2PGONOAReq will be called when the 
+ @brief WDI_SetP2PGONOAReq will be called when the
         upper MAC wants to send Notice of Absence
          Upon the call of this API the WLAN DAL will
         pack and send the probe rsp template  message to the
         lower RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
 
- @param pwdiUpdateProbeRspParams: the Update Beacon parameters as 
+ @param pwdiUpdateProbeRspParams: the Update Beacon parameters as
                       specified by the Device Interface
-  
+
         wdiSendBeaconParamsRspCb: callback for passing back the
         response of the Send Beacon Params operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_AddBAReq
  @return Result of the function call
 */
@@ -4964,23 +5036,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_P2P_GO_NOTICE_OF_ABSENCE_REQ;
-  wdiEventData.pEventData      = pwdiP2PGONOAReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiP2PGONOAReqParams); 
-  wdiEventData.pCBfnc          = wdiP2PGONOAReqParamsRspCb; 
+  wdiEventData.pEventData      = pwdiP2PGONOAReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiP2PGONOAReqParams);
+  wdiEventData.pCBfnc          = wdiP2PGONOAReqParamsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -4989,19 +5061,19 @@
 #endif
 
 /**
- @brief WDI_AddSTASelfReq will be called when the 
+ @brief WDI_AddSTASelfReq will be called when the
         UMAC wanted to add STA self while opening any new session
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
 
- @param pwdiAddSTASelfParams: the add sta self parameters as 
+ @param pwdiAddSTASelfParams: the add sta self parameters as
                       specified by the Device Interface
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
- @see 
+        callback
+
+ @see
  @return Result of the function call
 */
 WDI_Status
@@ -5016,23 +5088,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_ADD_STA_SELF_REQ;
-  wdiEventData.pEventData      = pwdiAddSTASelfReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiAddSTASelfReqParams); 
-  wdiEventData.pCBfnc          = wdiAddSTASelfReqParamsRspCb; 
+  wdiEventData.pEventData      = pwdiAddSTASelfReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiAddSTASelfReqParams);
+  wdiEventData.pCBfnc          = wdiAddSTASelfReqParamsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -5040,7 +5112,7 @@
 }/*WDI_AddSTASelfReq*/
 
 
-#ifdef WLAN_FEATURE_VOWIFI_11R 
+#ifdef WLAN_FEATURE_VOWIFI_11R
 /**
  @brief WDI_AggrAddTSReq will be called when the upper MAC to inform
         the device of a successful add TSpec negotiation. HW
@@ -5051,23 +5123,23 @@
         DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
  WDI_PostAssocReq must have been called.
 
  @param wdiAddTsReqParams: the add TS parameters as specified by
                       the Device Interface
-  
+
         wdiAddTsRspCb: callback for passing back the response of
         the add TS operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_AggrAddTSReq
 (
   WDI_AggrAddTSReqParamsType* pwdiAggrAddTsReqParams,
@@ -5079,23 +5151,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_AGGR_ADD_TS_REQ;
-  wdiEventData.pEventData      = pwdiAggrAddTsReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiAggrAddTsReqParams); 
-  wdiEventData.pCBfnc          = wdiAggrAddTsRspCb; 
+  wdiEventData.pEventData      = pwdiAggrAddTsReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiAggrAddTsReqParams);
+  wdiEventData.pCBfnc          = wdiAggrAddTsRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -5108,15 +5180,15 @@
 /**
  @brief WDI_FTMCommandReq
         Post FTM Command Event
- 
- @param  ftmCommandReq:   FTM Command Body 
- @param  ftmCommandRspCb: FTM Response from HAL CB 
+
+ @param  ftmCommandReq:   FTM Command Body
+ @param  ftmCommandRspCb: FTM Response from HAL CB
  @param  pUserData:       Client Data
-  
+
  @see
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_FTMCommandReq
 (
   WDI_FTMCommandReqType *ftmCommandReq,
@@ -5128,14 +5200,14 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
@@ -5149,27 +5221,27 @@
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }
-#endif /* ANI_MANF_DIAG */ 
+#endif /* ANI_MANF_DIAG */
 /**
- @brief WDI_HostResumeReq will be called 
+ @brief WDI_HostResumeReq will be called
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
 
  @param pwdiResumeReqParams:  as specified by
                       the Device Interface
-  
+
         wdiResumeReqRspCb: callback for passing back the response of
         the  Resume Req received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
- @see 
+        callback
+
+ @see
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_HostResumeReq
 (
   WDI_ResumeParamsType*            pwdiResumeReqParams,
@@ -5181,23 +5253,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_HOST_RESUME_REQ;
-  wdiEventData.pEventData      = pwdiResumeReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiResumeReqParams); 
-  wdiEventData.pCBfnc          = wdiResumeReqRspCb; 
+  wdiEventData.pEventData      = pwdiResumeReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiResumeReqParams);
+  wdiEventData.pCBfnc          = wdiResumeReqRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -5205,25 +5277,25 @@
 }/*WDI_HostResumeReq*/
 
 /**
- @brief WDI_DelSTASelfReq will be called 
+ @brief WDI_DelSTASelfReq will be called
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
 
  @param pwdiDelStaSelfReqParams:  as specified by
                       the Device Interface
-  
+
         wdiDelStaSelfRspCb: callback for passing back the response of
         the add TS operation received from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_DelSTASelfReq
 (
   WDI_DelSTASelfReqParamsType*      pwdiDelStaSelfReqParams,
@@ -5235,23 +5307,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_DEL_STA_SELF_REQ;
-  wdiEventData.pEventData      = pwdiDelStaSelfReqParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiDelStaSelfReqParams); 
-  wdiEventData.pCBfnc          = wdiDelStaSelfRspCb; 
+  wdiEventData.pEventData      = pwdiDelStaSelfReqParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiDelStaSelfReqParams);
+  wdiEventData.pCBfnc          = wdiDelStaSelfRspCb;
   wdiEventData.pUserData       = pUserData;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -5259,28 +5331,28 @@
 }/*WDI_AggrAddTSReq*/
 
 /**
- @brief WDI_SetTxPerTrackingReq will be called when the upper MAC 
-        wants to set the Tx Per Tracking configurations. 
+ @brief WDI_SetTxPerTrackingReq will be called when the upper MAC
+        wants to set the Tx Per Tracking configurations.
         Upon the call of this API the WLAN DAL will pack
         and send a HAL Set Tx Per Tracking request message to the
         lower RIVA sub-system if DAL is in state STARTED.
 
         In state BUSY this request will be queued. Request won't
-        be allowed in any other state. 
+        be allowed in any other state.
 
- @param pwdiSetTxPerTrackingReqParams: the Set Tx PER Tracking configurations as 
+ @param pwdiSetTxPerTrackingReqParams: the Set Tx PER Tracking configurations as
                       specified by the Device Interface
-  
+
         pwdiSetTxPerTrackingRspCb: callback for passing back the
         response of the set Tx PER Tracking configurations operation received
         from the device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetTxPerTrackingReq
 (
   WDI_SetTxPerTrackingReqParamsType*      pwdiSetTxPerTrackingReqParams,
@@ -5292,23 +5364,23 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_SET_TX_PER_TRACKING_REQ;
-   wdiEventData.pEventData      = pwdiSetTxPerTrackingReqParams; 
+   wdiEventData.pEventData      = pwdiSetTxPerTrackingReqParams;
    wdiEventData.uEventDataSize  = sizeof(*pwdiSetTxPerTrackingReqParams);
-   wdiEventData.pCBfnc          = pwdiSetTxPerTrackingRspCb; 
+   wdiEventData.pCBfnc          = pwdiSetTxPerTrackingRspCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -5368,14 +5440,14 @@
   
         Suspend Indication from the upper layer will be sent
         down to HAL
-  
+
  @param WDI_SuspendResumeIndParamsType
- 
- @see 
-  
+
+ @see
+
  @return Status of the request
 */
-WDI_Status 
+WDI_Status
 WDI_HostSuspendInd
 (
   WDI_SuspendParamsType*    pwdiSuspendIndParams
@@ -5386,23 +5458,23 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Fill in Event data and post to the Main FSM
   ------------------------------------------------------------------------*/
   wdiEventData.wdiRequest      = WDI_HOST_SUSPEND_IND;
-  wdiEventData.pEventData      = pwdiSuspendIndParams; 
-  wdiEventData.uEventDataSize  = sizeof(*pwdiSuspendIndParams); 
-  wdiEventData.pCBfnc          = NULL; 
+  wdiEventData.pEventData      = pwdiSuspendIndParams;
+  wdiEventData.uEventDataSize  = sizeof(*pwdiSuspendIndParams);
+  wdiEventData.pCBfnc          = NULL;
   wdiEventData.pUserData       = NULL;
 
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -5412,11 +5484,11 @@
 /**
  @brief WDI_HALDumpCmdReq
         Post HAL DUMP Command Event
- 
- @param  halDumpCmdReqParams:   Hal Dump Command Body 
- @param  halDumpCmdRspCb: HAL DUMP Response from HAL CB 
+
+ @param  halDumpCmdReqParams:   Hal Dump Command Body
+ @param  halDumpCmdRspCb: HAL DUMP Response from HAL CB
  @param  pUserData:       Client Data
-  
+
  @see
  @return Result of the function call
 */
@@ -5431,14 +5503,14 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
@@ -5453,36 +5525,36 @@
   return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }
 
-/*============================================================================ 
- 
+/*============================================================================
+
             DAL Control Path Main FSM Function Implementation
- 
+
  ============================================================================*/
 
 /**
  @brief Main FSM Start function for all states except BUSY
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
          wdiEV:           event posted to the main DAL FSM
          pEventData:      pointer to the event information
-         structure 
-  
+         structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_PostMainEvent
 (
-  WDI_ControlBlockType*  pWDICtx, 
-  WDI_MainEventType      wdiEV, 
+  WDI_ControlBlockType*  pWDICtx,
+  WDI_MainEventType      wdiEV,
   WDI_EventInfoType*     pEventData
-  
+
 )
 {
-  WDI_Status         wdiStatus; 
-  WDI_MainFuncType   pfnWDIMainEvHdlr; 
-  WDI_MainStateType  wdiOldState; 
+  WDI_Status         wdiStatus;
+  WDI_MainFuncType   pfnWDIMainEvHdlr;
+  WDI_MainStateType  wdiOldState;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
@@ -5494,23 +5566,23 @@
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "Invalid state or event in Post Main Ev function ST: %d EV: %d",
                pWDICtx->uGlobalState, wdiEV);
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*Access to the global state must be locked */
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*Fetch event handler for state*/
-  pfnWDIMainEvHdlr = wdiMainFSM[pWDICtx->uGlobalState].pfnMainTbl[wdiEV]; 
+  pfnWDIMainEvHdlr = wdiMainFSM[pWDICtx->uGlobalState].pfnMainTbl[wdiEV];
 
   wdiOldState = pWDICtx->uGlobalState;
 
   /*
-  --Incase of WDI event is WDI_RESPONSE_EVENT and this is called when a 
-  response comes from CCPU for the request sent by host: 
-  the WDI global state will be in WDI_BUSY_ST already, so do not set it to BUSY again. 
+  --Incase of WDI event is WDI_RESPONSE_EVENT and this is called when a
+  response comes from CCPU for the request sent by host:
+  the WDI global state will be in WDI_BUSY_ST already, so do not set it to BUSY again.
   This state will be set to WDI_STARTED_ST in WDI_MainRsp, if it is a expected response.
-  --Incase of WDI event is WDI_RESPONSE_EVENT and it is an indication from the 
+  --Incase of WDI event is WDI_RESPONSE_EVENT and it is an indication from the
   CCPU:
   don't change the state */
   if ( WDI_RESPONSE_EVENT != wdiEV)
@@ -5522,19 +5594,19 @@
   }
   /* If the state function associated with the EV is NULL it means that this
      event is not allowed in this state*/
-  if ( NULL != pfnWDIMainEvHdlr ) 
+  if ( NULL != pfnWDIMainEvHdlr )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-              "Posting event %d in state: %d to the Main FSM", 
+              "Posting event %d in state: %d to the Main FSM",
               wdiEV, wdiOldState);
-    wdiStatus = pfnWDIMainEvHdlr( pWDICtx, pEventData); 
+    wdiStatus = pfnWDIMainEvHdlr( pWDICtx, pEventData);
   }
   else
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Unexpected event %d in state: %d", 
+              "Unexpected event %d in state: %d",
               wdiEV, wdiOldState);
-    wdiStatus = WDI_STATUS_E_NOT_ALLOWED; 
+    wdiStatus = WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /* If a request handles itself well it will end up in a success or in a
@@ -5542,11 +5614,11 @@
      Success - means that the request was processed and the proper state
      transition already occurred or will occur when the resp is received
      - NO other state transition or dequeueing is required
- 
+
      Pending - means the request could not be processed at this moment in time
      because the FSM was already busy so no state transition or dequeueing
      is necessary anymore
- 
+
      Success for synchronous case means that the transition may occur and
      processing of pending requests may continue - so it should go through
      and restores the state and continue processing queued requests*/
@@ -5562,45 +5634,45 @@
       WDI_STATE_TRANSITION( pWDICtx, wdiOldState);
     }
     WDI_DequeuePendingReq(pWDICtx);
-        
+
   }
 
   /* we have completed processing the event */
   wpalMutexRelease(&pWDICtx->wptMutex);
 
-  return wdiStatus; 
+  return wdiStatus;
 
 }/*WDI_PostMainEvent*/
 
 
 /*--------------------------------------------------------------------------
-  INIT State Functions 
+  INIT State Functions
 --------------------------------------------------------------------------*/
 /**
  @brief Main FSM Start function for all states except BUSY
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainStart
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
 
   /*--------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
   ----------------------------------------------------------------------*/
   if (( NULL ==  pWDICtx ) || ( NULL == pEventData ))
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-               "Invalid parameters on Main Start %x %x", 
+               "Invalid parameters on Main Start %x %x",
                pWDICtx, pEventData);
      return WDI_STATUS_E_FAILURE;
   }
@@ -5608,7 +5680,7 @@
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*--------------------------------------------------------------------
-     Check if the Control Transport has been opened 
+     Check if the Control Transport has been opened
   ----------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == pWDICtx->bCTOpened )
   {
@@ -5616,12 +5688,12 @@
                "Control Transport not yet Open - queueing the request");
 
      WDI_STATE_TRANSITION( pWDICtx, WDI_INIT_ST);
-     WDI_QueuePendingReq( pWDICtx, pEventData); 
+     WDI_QueuePendingReq( pWDICtx, pEventData);
 
      wpalMutexRelease(&pWDICtx->wptMutex);
      return WDI_STATUS_PENDING;
   }
- 
+
   wpalMutexRelease(&pWDICtx->wptMutex);
 
   /*Return Success*/
@@ -5632,24 +5704,24 @@
 /**
  @brief Main FSM Response function for state INIT
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainRspInit
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   /*------------------------------------------------------------------------
-    Not expecting a response from the device before it is started 
+    Not expecting a response from the device before it is started
   ------------------------------------------------------------------------*/
-  WDI_ASSERT(0); 
+  WDI_ASSERT(0);
 
   /*Return Success*/
   return WDI_STATUS_E_NOT_ALLOWED;
@@ -5658,28 +5730,28 @@
 /**
  @brief Main FSM Close function for all states except BUSY
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainClose
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
 
   /*--------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
   ----------------------------------------------------------------------*/
   if (( NULL ==  pWDICtx ) || ( NULL == pEventData ))
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-               "Invalid parameters on Main Close %x %x", 
+               "Invalid parameters on Main Close %x %x",
                pWDICtx, pEventData);
      return WDI_STATUS_E_FAILURE;
   }
@@ -5689,21 +5761,21 @@
 
 }/*WDI_MainClose*/
 /*--------------------------------------------------------------------------
-  STARTED State Functions 
+  STARTED State Functions
 --------------------------------------------------------------------------*/
 /**
  @brief Main FSM Start function for state STARTED
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainStartStarted
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -5712,21 +5784,21 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*--------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
   ----------------------------------------------------------------------*/
   if (( NULL ==  pWDICtx ) || ( NULL == pEventData ))
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-               "Invalid parameters on Main Start %x %x", 
+               "Invalid parameters on Main Start %x %x",
                pWDICtx, pEventData);
      return WDI_STATUS_E_FAILURE;
   }
 
   /*--------------------------------------------------------------------
-     Nothing to do transport was already started 
+     Nothing to do transport was already started
   ----------------------------------------------------------------------*/
   WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-    "Received start while transport was already started - nothing to do"); 
+    "Received start while transport was already started - nothing to do");
 
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
@@ -5736,12 +5808,12 @@
 
   /*Check to see if any request is pending*/
   WDI_DequeuePendingReq(pWDICtx);
-  
+
   wpalMutexRelease(&pWDICtx->wptMutex);
 
   /*Tell UMAC Success*/
-  wdiStartRspCb = (WDI_StartRspCb)pEventData->pCBfnc; 
-  
+  wdiStartRspCb = (WDI_StartRspCb)pEventData->pCBfnc;
+
    /*Notify UMAC*/
   wdiStartRspCb( &pWDICtx->wdiCachedStartRspParams, pWDICtx->pRspCBUserData);
 
@@ -5753,27 +5825,27 @@
 /**
  @brief Main FSM Stop function for state STARTED
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainStopStarted
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   /*--------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
   ----------------------------------------------------------------------*/
   if (( NULL ==  pWDICtx ) || ( NULL == pEventData ))
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-               "Invalid parameters on Main Start %x %x", 
+               "Invalid parameters on Main Start %x %x",
                pWDICtx, pEventData);
      return WDI_STATUS_E_FAILURE;
   }
@@ -5791,28 +5863,28 @@
 /**
  @brief Main FSM Request function for state started
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainReqStarted
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
 
   /*--------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
   ----------------------------------------------------------------------*/
   if (( NULL ==  pWDICtx ) || ( NULL == pEventData ))
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-               "Invalid parameters on Main Req Started %x %x", 
+               "Invalid parameters on Main Req Started %x %x",
                pWDICtx, pEventData);
      return WDI_STATUS_E_FAILURE;
   }
@@ -5828,30 +5900,30 @@
 /**
  @brief Main FSM Response function for all states except INIT
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
          pEventData:      pointer to the event information structure
-  
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
-  WDI_Status  wdiStatus; 
+  WDI_Status  wdiStatus;
   wpt_boolean expectedResponse;
 
   /*--------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
   ----------------------------------------------------------------------*/
   if (( NULL ==  pWDICtx ) || ( NULL == pEventData ))
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-               "Invalid parameters on Main Response %x %x", 
+               "Invalid parameters on Main Response %x %x",
                pWDICtx, pEventData);
      return WDI_STATUS_E_FAILURE;
   }
@@ -5889,48 +5961,48 @@
   2. device failure detected while processing response
   3. stop response received*/
   WDI_STATE_TRANSITION( pWDICtx, pWDICtx->ucExpectedStateTransition);
- 
+
   /*Dequeue request that may have been queued while we were waiting for the
     response */
   if ( expectedResponse )
   {
-     WDI_DequeuePendingReq(pWDICtx); 
+     WDI_DequeuePendingReq(pWDICtx);
   }
 
   wpalMutexRelease(&pWDICtx->wptMutex);
 
   /*Return Success - always */
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 
 }/*WDI_MainRsp*/
 
 /*--------------------------------------------------------------------------
-  STOPPED State Functions 
+  STOPPED State Functions
 --------------------------------------------------------------------------*/
 /**
  @brief Main FSM Stop function for state STOPPED
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainStopStopped
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   /*--------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
   ----------------------------------------------------------------------*/
   if (( NULL ==  pWDICtx ) || ( NULL == pEventData ))
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-               "Invalid parameters on Main Stop Stopped %x %x", 
+               "Invalid parameters on Main Stop Stopped %x %x",
                pWDICtx, pEventData);
      return WDI_STATUS_E_FAILURE;
   }
@@ -5949,44 +6021,44 @@
 }/*WDI_MainStopStopped*/
 
 /*--------------------------------------------------------------------------
-  BUSY State Functions 
+  BUSY State Functions
 --------------------------------------------------------------------------*/
 /**
  @brief Main FSM Start function for state BUSY
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainStartBusy
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   /*--------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
   ----------------------------------------------------------------------*/
   if (( NULL ==  pWDICtx ) || ( NULL == pEventData ))
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-               "Invalid parameters on Main Start in BUSY %x %x", 
+               "Invalid parameters on Main Start in BUSY %x %x",
                pWDICtx, pEventData);
      return WDI_STATUS_E_FAILURE;
   }
 
   /*--------------------------------------------------------------------
-     Check if the Control Transport has been opened 
+     Check if the Control Transport has been opened
   ----------------------------------------------------------------------*/
   WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
            "WDI Busy state - queue start request");
 
   /*Queue the start request*/
-  WDI_QueuePendingReq( pWDICtx, pEventData); 
+  WDI_QueuePendingReq( pWDICtx, pEventData);
 
   /*Return Success*/
   return WDI_STATUS_PENDING;
@@ -5995,118 +6067,118 @@
 /**
  @brief Main FSM Stop function for state BUSY
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainStopBusy
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   /*--------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
   ----------------------------------------------------------------------*/
   if (( NULL ==  pWDICtx ) || ( NULL == pEventData ))
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-               "Invalid parameters on Main Stop in BUSY %x %x", 
+               "Invalid parameters on Main Stop in BUSY %x %x",
                pWDICtx, pEventData);
      return WDI_STATUS_E_FAILURE;
   }
 
   /*--------------------------------------------------------------------
-     Check if the Control Transport has been opened 
+     Check if the Control Transport has been opened
   ----------------------------------------------------------------------*/
   WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
            "WDI Busy state - queue stop request");
 
-  WDI_QueuePendingReq( pWDICtx, pEventData); 
+  WDI_QueuePendingReq( pWDICtx, pEventData);
   return WDI_STATUS_PENDING;
-  
+
 }/*WDI_MainStopBusy*/
 
 /**
  @brief Main FSM Request function for state BUSY
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainReqBusy
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   /*--------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
   ----------------------------------------------------------------------*/
   if (( NULL ==  pWDICtx ) || ( NULL == pEventData ))
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-               "Invalid parameters on Main Request in BUSY %x %x", 
+               "Invalid parameters on Main Request in BUSY %x %x",
                pWDICtx, pEventData);
      return WDI_STATUS_E_FAILURE;
   }
 
   /*--------------------------------------------------------------------
-     Check if the Control Transport has been opened 
+     Check if the Control Transport has been opened
   ----------------------------------------------------------------------*/
   WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
            "WDI Busy state - queue request %d because waiting for response %d",
              pEventData->wdiRequest, pWDICtx->wdiExpectedResponse);
 
-  WDI_QueuePendingReq( pWDICtx, pEventData); 
+  WDI_QueuePendingReq( pWDICtx, pEventData);
   return WDI_STATUS_PENDING;
-  
+
 }/*WDI_MainReqBusy*/
 /**
  @brief Main FSM Close function for state BUSY
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_MainCloseBusy
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   /*--------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
   ----------------------------------------------------------------------*/
   if (( NULL ==  pWDICtx ) || ( NULL == pEventData ))
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-               "Invalid parameters on Main Close in BUSY %x %x", 
+               "Invalid parameters on Main Close in BUSY %x %x",
                pWDICtx, pEventData);
      return WDI_STATUS_E_FAILURE;
   }
 
   /*--------------------------------------------------------------------
-     Check if the Control Transport has been opened 
+     Check if the Control Transport has been opened
   ----------------------------------------------------------------------*/
   WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
            "WDI Busy state - queue close request");
 
-  WDI_QueuePendingReq( pWDICtx, pEventData); 
+  WDI_QueuePendingReq( pWDICtx, pEventData);
   return WDI_STATUS_PENDING;
-  
+
 }/*WDI_MainCloseBusy*/
 
 /**
@@ -6189,44 +6261,44 @@
 }/*WDI_MainShutdownBusy*/
 
 
-/*======================================================================= 
- 
+/*=======================================================================
+
            WLAN DAL Control Path Main Processing Functions
- 
+
 *=======================================================================*/
 
 /*========================================================================
-          Main DAL Control Path Request Processing API 
+          Main DAL Control Path Request Processing API
 ========================================================================*/
 /**
- @brief Process Start Request function (called when Main FSM 
+ @brief Process Start Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessStartReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_StartReqParamsType* pwdiStartParams    = NULL;
   WDI_StartRspCb          wdiStartRspCb      = NULL;
-  wpt_uint8*              pSendBuffer        = NULL; 
+  wpt_uint8*              pSendBuffer        = NULL;
   wpt_uint16              usDataOffset       = 0;
   wpt_uint16              usSendSize         = 0;
 
-  tHalMacStartReqMsg      halStartReq; 
-  wpt_uint16              usLen              = 0; 
+  tHalMacStartReqMsg      halStartReq;
+  wpt_uint16              usLen              = 0;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == (pwdiStartParams = (WDI_StartReqParamsType*)pEventData->pEventData)) ||
@@ -6235,16 +6307,16 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  usLen = sizeof(halStartReq.startReqParams) + 
+  usLen = sizeof(halStartReq.startReqParams) +
           pwdiStartParams->usConfigBufferLen;
 
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_START_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_START_REQ,
                         usLen,
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + usLen )))
@@ -6253,72 +6325,72 @@
               "Unable to get send buffer in start req %x %x %x",
                 pEventData, pwdiStartParams, wdiStartRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-----------------------------------------------------------------------
     Fill in the message
   -----------------------------------------------------------------------*/
-  halStartReq.startReqParams.driverType = 
-     WDI_2_HAL_DRV_TYPE(pwdiStartParams->wdiDriverType); 
+  halStartReq.startReqParams.driverType =
+     WDI_2_HAL_DRV_TYPE(pwdiStartParams->wdiDriverType);
 
-  halStartReq.startReqParams.uConfigBufferLen = 
-                  pwdiStartParams->usConfigBufferLen; 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halStartReq.startReqParams, 
-                  sizeof(halStartReq.startReqParams)); 
+  halStartReq.startReqParams.uConfigBufferLen =
+                  pwdiStartParams->usConfigBufferLen;
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halStartReq.startReqParams,
+                  sizeof(halStartReq.startReqParams));
 
-  usDataOffset  += sizeof(halStartReq.startReqParams); 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  pwdiStartParams->pConfigBuffer, 
-                  pwdiStartParams->usConfigBufferLen); 
+  usDataOffset  += sizeof(halStartReq.startReqParams);
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  pwdiStartParams->pConfigBuffer,
+                  pwdiStartParams->usConfigBufferLen);
 
   pWDICtx->wdiReqStatusCB     = pwdiStartParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiStartParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiStartParams->pUserData;
 
   /*Save Low Level Ind CB and associated user data - it will be used further
     on when an indication is coming from the lower MAC*/
   pWDICtx->wdiLowLevelIndCB   = pwdiStartParams->wdiLowLevelIndCB;
-  pWDICtx->pIndUserData       = pwdiStartParams->pIndUserData; 
+  pWDICtx->pIndUserData       = pwdiStartParams->pIndUserData;
 
-  pWDICtx->bFrameTransEnabled = pwdiStartParams->bFrameTransEnabled; 
+  pWDICtx->bFrameTransEnabled = pwdiStartParams->bFrameTransEnabled;
   /*-------------------------------------------------------------------------
-    Send Start Request to HAL 
+    Send Start Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiStartRspCb, pEventData->pUserData, WDI_START_RESP);
 
-  
+
 }/*WDI_ProcessStartReq*/
 
 /**
- @brief Process Stop Request function (called when Main FSM 
+ @brief Process Stop Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessStopReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_StopReqParamsType* pwdiStopParams      = NULL;
   WDI_StopRspCb          wdiStopRspCb        = NULL;
-  wpt_uint8*             pSendBuffer         = NULL; 
+  wpt_uint8*             pSendBuffer         = NULL;
   wpt_uint16             usDataOffset        = 0;
   wpt_uint16             usSendSize          = 0;
   wpt_status             status;
-  tHalMacStopReqMsg      halStopReq; 
+  tHalMacStopReqMsg      halStopReq;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
  /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == (pwdiStopParams = (WDI_StopReqParamsType*)pEventData->pEventData)) ||
@@ -6327,13 +6399,13 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_STOP_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_STOP_REQ,
                         sizeof(halStopReq.stopReqParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halStopReq.stopReqParams) )))
@@ -6342,7 +6414,7 @@
               "Unable to get send buffer in stop req %x %x %x",
                 pEventData, pwdiStopParams, wdiStopRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-----------------------------------------------------------------------
@@ -6351,12 +6423,12 @@
   halStopReq.stopReqParams.reason = WDI_2_HAL_STOP_REASON(
                                           pwdiStopParams->wdiStopReason);
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halStopReq.stopReqParams, 
-                  sizeof(halStopReq.stopReqParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halStopReq.stopReqParams,
+                  sizeof(halStopReq.stopReqParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiStopParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiStopParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiStopParams->pUserData;
 
   /*! TO DO: stop the data services */
   if ( eDRIVER_TYPE_MFG != pWDICtx->driverMode )
@@ -6372,13 +6444,13 @@
         WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "WDI Init failed to reset power state event");
 
-        WDI_ASSERT(0); 
+        WDI_ASSERT(0);
         return VOS_STATUS_E_FAILURE;
      }
      /* Stop Transport Driver, DXE */
      WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_DOWN, WDI_SetPowerStateCb);
      /*
-      * Wait for the event to be set once the ACK comes back from DXE 
+      * Wait for the event to be set once the ACK comes back from DXE
       */
      status = wpalEventWait(&pWDICtx->setPowerStateEvent, 
                             WDI_SET_POWER_STATE_TIMEOUT);
@@ -6387,47 +6459,47 @@
         WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "WDI Init failed to wait on an event");
 
-        WDI_ASSERT(0); 
+        WDI_ASSERT(0);
         return VOS_STATUS_E_FAILURE;
       }
   }
 
   /*-------------------------------------------------------------------------
-    Send Stop Request to HAL 
+    Send Stop Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiStopRspCb, pEventData->pUserData, WDI_STOP_RESP);
 
 }/*WDI_ProcessStopReq*/
 
 /**
- @brief Process Close Request function (called when Main FSM 
+ @brief Process Close Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessCloseReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
-   wpt_status              wptStatus; 
+   wpt_status              wptStatus;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*Lock control block for cleanup*/
    wpalMutexAcquire(&pWDICtx->wptMutex);
-       
+
    /*Clear all pending request*/
    WDI_ClearPendingRequests(pWDICtx);
 
    /* Close Control transport*/
-   WCTS_CloseTransport(pWDICtx->wctsHandle); 
+   WCTS_CloseTransport(pWDICtx->wctsHandle);
 
    /* Close Data transport*/
    /* FTM mode does not open Data Path */
@@ -6454,50 +6526,50 @@
    wpalMutexRelease(&pWDICtx->wptMutex);
 
    /*Make sure the expected state is properly defaulted to Init*/
-   pWDICtx->ucExpectedStateTransition = WDI_INIT_ST; 
+   pWDICtx->ucExpectedStateTransition = WDI_INIT_ST;
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessCloseReq*/
 
 
 /*===========================================================================
-                  SCANING REQUEST PROCESSING API 
+                  SCANING REQUEST PROCESSING API
 ===========================================================================*/
 
 /**
  @brief Process Init Scan Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessInitScanReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_InitScanReqParamsType*  pwdiInitScanParams    = NULL;
   WDI_InitScanRspCb           wdiInitScanRspCb      = NULL;
-  wpt_uint8*                  pSendBuffer           = NULL; 
+  wpt_uint8*                  pSendBuffer           = NULL;
   wpt_uint16                  usDataOffset          = 0;
   wpt_uint16                  usSendSize            = 0;
   wpt_uint8                   i = 0;
 
   tHalInitScanReqMsg          halInitScanReqMsg;
 
-  /*This is temporary fix. 
+  /*This is temporary fix.
    * It shold be removed once host and riva changes are in sync*/
   tHalInitScanConReqMsg       halInitScanConReqMsg;
 
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
     -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == (pwdiInitScanParams = (WDI_InitScanReqParamsType*)pEventData->pEventData)) ||
@@ -6506,7 +6578,7 @@
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
         "%s: Invalid parameters", __FUNCTION__);
     WDI_ASSERT(0);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
 #if 0
@@ -6514,7 +6586,7 @@
   /*-----------------------------------------------------------------------
     Check to see if SCAN is already in progress - if so reject the req
     We only allow one scan at a time
-    ! TO DO: - revisit this constraint 
+    ! TO DO: - revisit this constraint
     -----------------------------------------------------------------------*/
   if ( pWDICtx->bScanInProgress )
   {
@@ -6523,23 +6595,23 @@
         " until the first scan completes");
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
-  pWDICtx->bScanInProgress = eWLAN_PAL_TRUE; 
-  pWDICtx->uScanState      = WDI_SCAN_INITIALIZED_ST; 
+  pWDICtx->bScanInProgress = eWLAN_PAL_TRUE;
+  pWDICtx->uScanState      = WDI_SCAN_INITIALIZED_ST;
 
   wpalMutexRelease(&pWDICtx->wptMutex);
 #endif
 
   if (pwdiInitScanParams->wdiReqInfo.bUseNOA)
   {
-    /*This is temporary fix. 
+    /*This is temporary fix.
      * It shold be removed once host and riva changes are in sync*/
     /*-----------------------------------------------------------------------
       Get message buffer
       -----------------------------------------------------------------------*/
-    if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_INIT_SCAN_CON_REQ, 
+    if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_INIT_SCAN_CON_REQ,
             sizeof(halInitScanConReqMsg.initScanParams),
             &pSendBuffer, &usDataOffset, &usSendSize))||
         ( usSendSize < (usDataOffset + sizeof(halInitScanConReqMsg.initScanParams) )))
@@ -6548,24 +6620,24 @@
           "Unable to get send buffer in init scan req %x %x %x",
           pEventData, pwdiInitScanParams, wdiInitScanRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
     }
 
 
     /*-----------------------------------------------------------------------
       Fill in the message
       -----------------------------------------------------------------------*/
-    halInitScanConReqMsg.initScanParams.scanMode = 
+    halInitScanConReqMsg.initScanParams.scanMode =
       WDI_2_HAL_SCAN_MODE(pwdiInitScanParams->wdiReqInfo.wdiScanMode);
 
     wpalMemoryCopy(halInitScanConReqMsg.initScanParams.bssid,
         pwdiInitScanParams->wdiReqInfo.macBSSID, WDI_MAC_ADDR_LEN);
 
-    halInitScanConReqMsg.initScanParams.notifyBss = 
+    halInitScanConReqMsg.initScanParams.notifyBss =
       pwdiInitScanParams->wdiReqInfo.bNotifyBSS;
-    halInitScanConReqMsg.initScanParams.frameType = 
+    halInitScanConReqMsg.initScanParams.frameType =
       pwdiInitScanParams->wdiReqInfo.ucFrameType;
-    halInitScanConReqMsg.initScanParams.frameLength = 
+    halInitScanConReqMsg.initScanParams.frameLength =
       pwdiInitScanParams->wdiReqInfo.ucFrameLength;
 
     WDI_CopyWDIMgmFrameHdrToHALMgmFrameHdr( &halInitScanConReqMsg.initScanParams.macMgmtHdr,
@@ -6576,25 +6648,25 @@
     halInitScanConReqMsg.initScanParams.scanDuration = pwdiInitScanParams->wdiReqInfo.scanDuration;
 #endif
 
-    halInitScanConReqMsg.initScanParams.scanEntry.activeBSScnt = 
+    halInitScanConReqMsg.initScanParams.scanEntry.activeBSScnt =
       pwdiInitScanParams->wdiReqInfo.wdiScanEntry.activeBSScnt;
 
     for (i=0; i < pwdiInitScanParams->wdiReqInfo.wdiScanEntry.activeBSScnt; i++)
     {
-      halInitScanConReqMsg.initScanParams.scanEntry.bssIdx[i] = 
+      halInitScanConReqMsg.initScanParams.scanEntry.bssIdx[i] =
         pwdiInitScanParams->wdiReqInfo.wdiScanEntry.bssIdx[i];
     }
 
-    wpalMemoryCopy( pSendBuffer+usDataOffset, 
-        &halInitScanConReqMsg.initScanParams, 
-        sizeof(halInitScanConReqMsg.initScanParams)); 
+    wpalMemoryCopy( pSendBuffer+usDataOffset,
+        &halInitScanConReqMsg.initScanParams,
+        sizeof(halInitScanConReqMsg.initScanParams));
   }
   else
   {
     /*-----------------------------------------------------------------------
       Get message buffer
       -----------------------------------------------------------------------*/
-    if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_INIT_SCAN_REQ, 
+    if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_INIT_SCAN_REQ,
             sizeof(halInitScanReqMsg.initScanParams),
             &pSendBuffer, &usDataOffset, &usSendSize))||
         ( usSendSize < (usDataOffset + sizeof(halInitScanReqMsg.initScanParams) )))
@@ -6603,82 +6675,82 @@
           "Unable to get send buffer in init scan req %x %x %x",
           pEventData, pwdiInitScanParams, wdiInitScanRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
     }
 
 
     /*-----------------------------------------------------------------------
       Fill in the message
       -----------------------------------------------------------------------*/
-    halInitScanReqMsg.initScanParams.scanMode = 
+    halInitScanReqMsg.initScanParams.scanMode =
       WDI_2_HAL_SCAN_MODE(pwdiInitScanParams->wdiReqInfo.wdiScanMode);
 
     wpalMemoryCopy(halInitScanReqMsg.initScanParams.bssid,
         pwdiInitScanParams->wdiReqInfo.macBSSID, WDI_MAC_ADDR_LEN);
 
-    halInitScanReqMsg.initScanParams.notifyBss = 
+    halInitScanReqMsg.initScanParams.notifyBss =
       pwdiInitScanParams->wdiReqInfo.bNotifyBSS;
-    halInitScanReqMsg.initScanParams.frameType = 
+    halInitScanReqMsg.initScanParams.frameType =
       pwdiInitScanParams->wdiReqInfo.ucFrameType;
-    halInitScanReqMsg.initScanParams.frameLength = 
+    halInitScanReqMsg.initScanParams.frameLength =
       pwdiInitScanParams->wdiReqInfo.ucFrameLength;
 
     WDI_CopyWDIMgmFrameHdrToHALMgmFrameHdr( &halInitScanReqMsg.initScanParams.macMgmtHdr,
         &pwdiInitScanParams->wdiReqInfo.wdiMACMgmtHdr);
 
-    halInitScanReqMsg.initScanParams.scanEntry.activeBSScnt = 
+    halInitScanReqMsg.initScanParams.scanEntry.activeBSScnt =
       pwdiInitScanParams->wdiReqInfo.wdiScanEntry.activeBSScnt;
 
     for (i=0; i < pwdiInitScanParams->wdiReqInfo.wdiScanEntry.activeBSScnt; i++)
     {
-      halInitScanReqMsg.initScanParams.scanEntry.bssIdx[i] = 
+      halInitScanReqMsg.initScanParams.scanEntry.bssIdx[i] =
         pwdiInitScanParams->wdiReqInfo.wdiScanEntry.bssIdx[i];
     }
 
-    wpalMemoryCopy( pSendBuffer+usDataOffset, 
-        &halInitScanReqMsg.initScanParams, 
-        sizeof(halInitScanReqMsg.initScanParams)); 
+    wpalMemoryCopy( pSendBuffer+usDataOffset,
+        &halInitScanReqMsg.initScanParams,
+        sizeof(halInitScanReqMsg.initScanParams));
   }
 
   pWDICtx->wdiReqStatusCB     = pwdiInitScanParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiInitScanParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiInitScanParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Init Scan Request to HAL 
+    Send Init Scan Request to HAL
     -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
       wdiInitScanRspCb, pEventData->pUserData, WDI_INIT_SCAN_RESP);
 
 }/*WDI_ProcessInitScanReq*/
 
 /**
- @brief Process Start Scan Request function (called when Main 
+ @brief Process Start Scan Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessStartScanReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_StartScanReqParamsType*  pwdiStartScanParams    = NULL;
   WDI_StartScanRspCb           wdiStartScanRspCb      = NULL;
-  wpt_uint8*                   pSendBuffer            = NULL; 
+  wpt_uint8*                   pSendBuffer            = NULL;
   wpt_uint16                   usDataOffset           = 0;
   wpt_uint16                   usSendSize             = 0;
 
-  tHalStartScanReqMsg          halStartScanReqMsg; 
+  tHalStartScanReqMsg          halStartScanReqMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == (pwdiStartScanParams = (WDI_StartScanReqParamsType*)pEventData->pEventData)) ||
@@ -6687,7 +6759,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
 #if 0
@@ -6695,21 +6767,21 @@
   /*-----------------------------------------------------------------------
     Check to see if SCAN is already in progress - start scan is only
     allowed when a scan is ongoing and the state of the scan procedure
-    is either init or end 
+    is either init or end
   -----------------------------------------------------------------------*/
-  if (( !pWDICtx->bScanInProgress ) || 
+  if (( !pWDICtx->bScanInProgress ) ||
       (( WDI_SCAN_INITIALIZED_ST != pWDICtx->uScanState ) &&
        ( WDI_SCAN_ENDED_ST != pWDICtx->uScanState )))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_ERROR,
               "Scan start not allowed in this state %d %d",
                pWDICtx->bScanInProgress, pWDICtx->uScanState);
-    
+
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
-  pWDICtx->uScanState      = WDI_SCAN_STARTED_ST; 
+  pWDICtx->uScanState      = WDI_SCAN_STARTED_ST;
 
   wpalMutexRelease(&pWDICtx->wptMutex);
 #endif
@@ -6717,7 +6789,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_START_SCAN_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_START_SCAN_REQ,
                         sizeof(halStartScanReqMsg.startScanParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halStartScanReqMsg.startScanParams) )))
@@ -6726,54 +6798,54 @@
               "Unable to get send buffer in start scan req %x %x %x",
                 pEventData, pwdiStartScanParams, wdiStartScanRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  halStartScanReqMsg.startScanParams.scanChannel = 
+  halStartScanReqMsg.startScanParams.scanChannel =
                               pwdiStartScanParams->ucChannel;
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halStartScanReqMsg.startScanParams, 
-                  sizeof(halStartScanReqMsg.startScanParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halStartScanReqMsg.startScanParams,
+                  sizeof(halStartScanReqMsg.startScanParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiStartScanParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiStartScanParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiStartScanParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Start Scan Request to HAL 
+    Send Start Scan Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiStartScanRspCb, pEventData->pUserData, WDI_START_SCAN_RESP);
 }/*WDI_ProcessStartScanReq*/
 
 
 /**
- @brief Process End Scan Request function (called when Main FSM 
+ @brief Process End Scan Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessEndScanReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_EndScanReqParamsType*  pwdiEndScanParams    = NULL;
   WDI_EndScanRspCb           wdiEndScanRspCb      = NULL;
-  wpt_uint8*                 pSendBuffer          = NULL; 
+  wpt_uint8*                 pSendBuffer          = NULL;
   wpt_uint16                 usDataOffset         = 0;
   wpt_uint16                 usSendSize           = 0;
 
-  tHalEndScanReqMsg          halEndScanReqMsg;           
+  tHalEndScanReqMsg          halEndScanReqMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == (pwdiEndScanParams = (WDI_EndScanReqParamsType*)pEventData->pEventData)) ||
@@ -6782,11 +6854,11 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  /* commenting this check as UMAC is sending END_SCAN_REQ after FINISH_SCAN 
-  * sometimes  because of this check the scan request is not being 
+  /* commenting this check as UMAC is sending END_SCAN_REQ after FINISH_SCAN
+  * sometimes  because of this check the scan request is not being
   * forwarded to HAL and result in hang*/
 #if 0
   wpalMutexAcquire(&pWDICtx->wptMutex);
@@ -6795,18 +6867,18 @@
     allowed when a scan is ongoing and the state of the scan procedure
     is started
   -----------------------------------------------------------------------*/
-  if (( !pWDICtx->bScanInProgress ) || 
+  if (( !pWDICtx->bScanInProgress ) ||
       ( WDI_SCAN_STARTED_ST != pWDICtx->uScanState ))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
               "End start not allowed in this state %d %d",
                pWDICtx->bScanInProgress, pWDICtx->uScanState);
-    
+
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
-  pWDICtx->uScanState      = WDI_SCAN_ENDED_ST; 
+  pWDICtx->uScanState      = WDI_SCAN_ENDED_ST;
 
   wpalMutexRelease(&pWDICtx->wptMutex);
 #endif
@@ -6814,7 +6886,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_END_SCAN_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_END_SCAN_REQ,
                         sizeof(halEndScanReqMsg.endScanParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halEndScanReqMsg.endScanParams) )))
@@ -6823,55 +6895,55 @@
               "Unable to get send buffer in start scan req %x %x %x",
                 pEventData, pwdiEndScanParams, wdiEndScanRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   halEndScanReqMsg.endScanParams.scanChannel = pwdiEndScanParams->ucChannel;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halEndScanReqMsg.endScanParams, 
-                  sizeof(halEndScanReqMsg.endScanParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halEndScanReqMsg.endScanParams,
+                  sizeof(halEndScanReqMsg.endScanParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiEndScanParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiEndScanParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiEndScanParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send End Scan Request to HAL 
+    Send End Scan Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiEndScanRspCb, pEventData->pUserData, WDI_END_SCAN_RESP);
 }/*WDI_ProcessEndScanReq*/
 
 
 /**
- @brief Process Finish Scan Request function (called when Main 
+ @brief Process Finish Scan Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessFinishScanReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_FinishScanReqParamsType*  pwdiFinishScanParams;
   WDI_FinishScanRspCb           wdiFinishScanRspCb;
-  wpt_uint8*                    pSendBuffer          = NULL; 
+  wpt_uint8*                    pSendBuffer          = NULL;
   wpt_uint16                    usDataOffset         = 0;
   wpt_uint16                    usSendSize           = 0;
   wpt_uint8                     i                    = 0;
 
-  tHalFinishScanReqMsg          halFinishScanReqMsg; 
+  tHalFinishScanReqMsg          halFinishScanReqMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData) ||
@@ -6880,13 +6952,13 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiFinishScanParams = (WDI_FinishScanReqParamsType*)pEventData->pEventData;
   wdiFinishScanRspCb   = (WDI_FinishScanRspCb)pEventData->pCBfnc;
-  /* commenting this check as UMAC is sending END_SCAN_REQ after FINISH_SCAN 
-  * sometimes  because of this check the scan request is not being 
+  /* commenting this check as UMAC is sending END_SCAN_REQ after FINISH_SCAN
+  * sometimes  because of this check the scan request is not being
   * forwarded to HAL and result in hang*/
 #if 0
   wpalMutexAcquire(&pWDICtx->wptMutex);
@@ -6902,15 +6974,15 @@
                pWDICtx->bScanInProgress );
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*-----------------------------------------------------------------------
     It is safe to reset the scan flags here because until the response comes
-    back all subsequent requests will be blocked at BUSY state 
+    back all subsequent requests will be blocked at BUSY state
   -----------------------------------------------------------------------*/
-  pWDICtx->uScanState      = WDI_SCAN_FINISHED_ST; 
-  pWDICtx->bScanInProgress = eWLAN_PAL_FALSE; 
+  pWDICtx->uScanState      = WDI_SCAN_FINISHED_ST;
+  pWDICtx->bScanInProgress = eWLAN_PAL_FALSE;
   wpalMutexRelease(&pWDICtx->wptMutex);
 #endif
 
@@ -6923,7 +6995,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_FINISH_SCAN_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_FINISH_SCAN_REQ,
                         sizeof(halFinishScanReqMsg.finishScanParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halFinishScanReqMsg.finishScanParams) )))
@@ -6932,70 +7004,70 @@
               "Unable to get send buffer in start scan req %x %x %x",
                 pEventData, pwdiFinishScanParams, wdiFinishScanRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  halFinishScanReqMsg.finishScanParams.scanMode = 
+  halFinishScanReqMsg.finishScanParams.scanMode =
     WDI_2_HAL_SCAN_MODE(pwdiFinishScanParams->wdiReqInfo.wdiScanMode);
 
-  halFinishScanReqMsg.finishScanParams.currentOperChannel = 
+  halFinishScanReqMsg.finishScanParams.currentOperChannel =
     pwdiFinishScanParams->wdiReqInfo.ucCurrentOperatingChannel;
 
-  halFinishScanReqMsg.finishScanParams.cbState = 
+  halFinishScanReqMsg.finishScanParams.cbState =
     WDI_2_HAL_CB_STATE(pwdiFinishScanParams->wdiReqInfo.wdiCBState);
 
   wpalMemoryCopy(halFinishScanReqMsg.finishScanParams.bssid,
                  pwdiFinishScanParams->wdiReqInfo.macBSSID, WDI_MAC_ADDR_LEN);
 
-  halFinishScanReqMsg.finishScanParams.notifyBss   = 
+  halFinishScanReqMsg.finishScanParams.notifyBss   =
                               pwdiFinishScanParams->wdiReqInfo.bNotifyBSS ;
-  halFinishScanReqMsg.finishScanParams.frameType   = 
+  halFinishScanReqMsg.finishScanParams.frameType   =
                               pwdiFinishScanParams->wdiReqInfo.ucFrameType ;
-  halFinishScanReqMsg.finishScanParams.frameLength = 
+  halFinishScanReqMsg.finishScanParams.frameLength =
                               pwdiFinishScanParams->wdiReqInfo.ucFrameLength ;
 
-  halFinishScanReqMsg.finishScanParams.scanEntry.activeBSScnt = 
+  halFinishScanReqMsg.finishScanParams.scanEntry.activeBSScnt =
                    pwdiFinishScanParams->wdiReqInfo.wdiScanEntry.activeBSScnt ;
 
   for (i = 0; i < pwdiFinishScanParams->wdiReqInfo.wdiScanEntry.activeBSScnt; i++)
   {
-    halFinishScanReqMsg.finishScanParams.scanEntry.bssIdx[i] = 
+    halFinishScanReqMsg.finishScanParams.scanEntry.bssIdx[i] =
                pwdiFinishScanParams->wdiReqInfo.wdiScanEntry.bssIdx[i] ;
   }
 
   WDI_CopyWDIMgmFrameHdrToHALMgmFrameHdr( &halFinishScanReqMsg.finishScanParams.macMgmtHdr,
                               &pwdiFinishScanParams->wdiReqInfo.wdiMACMgmtHdr);
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halFinishScanReqMsg.finishScanParams, 
-                  sizeof(halFinishScanReqMsg.finishScanParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halFinishScanReqMsg.finishScanParams,
+                  sizeof(halFinishScanReqMsg.finishScanParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiFinishScanParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiFinishScanParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiFinishScanParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Finish Scan Request to HAL 
+    Send Finish Scan Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiFinishScanRspCb, pEventData->pUserData, WDI_FINISH_SCAN_RESP);
 }/*WDI_ProcessFinishScanReq*/
 
 
 /*==========================================================================
-                    ASSOCIATION REQUEST API 
+                    ASSOCIATION REQUEST API
 ==========================================================================*/
 /**
- @brief Process BSS Join for a given Session 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+ @brief Process BSS Join for a given Session
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessBSSSessionJoinReq
-( 
+(
   WDI_ControlBlockType*   pWDICtx,
   WDI_JoinReqParamsType*  pwdiJoinParams,
   WDI_JoinRspCb           wdiJoinRspCb,
@@ -7003,35 +7075,35 @@
 )
 {
   WDI_BSSSessionType*     pBSSSes             = NULL;
-  wpt_uint8*              pSendBuffer         = NULL; 
+  wpt_uint8*              pSendBuffer         = NULL;
   wpt_uint16              usDataOffset        = 0;
   wpt_uint16              usSendSize          = 0;
-  wpt_uint8               ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8               ucCurrentBSSSesIdx  = 0;
 
-  tHalJoinReqMsg          halJoinReqMsg; 
+  tHalJoinReqMsg          halJoinReqMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*------------------------------------------------------------------------
     Check to see if we have any session with this BSSID already stored, we
     should not
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
-                                   pwdiJoinParams->wdiReqInfo.macBSSID, 
-                                  &pBSSSes);  
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
+                                   pwdiJoinParams->wdiReqInfo.macBSSID,
+                                  &pBSSSes);
 
   if ( NULL != pBSSSes )
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "Association for this BSSID is already in place");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   wpalMutexAcquire(&pWDICtx->wptMutex);
   /*------------------------------------------------------------------------
-    Fetch an empty session block 
+    Fetch an empty session block
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindEmptySession( pWDICtx, &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindEmptySession( pWDICtx, &pBSSSes);
   if ( NULL == pBSSSes )
   {
 
@@ -7039,24 +7111,24 @@
               "DAL has no free sessions - cannot run another join");
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_RES_FAILURE; 
+    return WDI_STATUS_RES_FAILURE;
   }
 
   /*Save BSS Session Info*/
-  pBSSSes->bInUse = eWLAN_PAL_TRUE; 
-  wpalMemoryCopy( pBSSSes->macBSSID, pwdiJoinParams->wdiReqInfo.macBSSID, 
+  pBSSSes->bInUse = eWLAN_PAL_TRUE;
+  wpalMemoryCopy( pBSSSes->macBSSID, pwdiJoinParams->wdiReqInfo.macBSSID,
                   WDI_MAC_ADDR_LEN);
 
   /*Transition to state Joining*/
-  pBSSSes->wdiAssocState      = WDI_ASSOC_JOINING_ST; 
+  pBSSSes->wdiAssocState      = WDI_ASSOC_JOINING_ST;
   pWDICtx->ucCurrentBSSSesIdx = ucCurrentBSSSesIdx;
-  
+
   wpalMutexRelease(&pWDICtx->wptMutex);
 
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_JOIN_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_JOIN_REQ,
                         sizeof(halJoinReqMsg.joinReqParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halJoinReqMsg.joinReqParams) )))
@@ -7065,58 +7137,58 @@
               "Unable to get send buffer in join req %x %x %x",
                 pUserData, pwdiJoinParams, wdiJoinRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wpalMemoryCopy(halJoinReqMsg.joinReqParams.bssId,
-                 pwdiJoinParams->wdiReqInfo.macBSSID, WDI_MAC_ADDR_LEN); 
+                 pwdiJoinParams->wdiReqInfo.macBSSID, WDI_MAC_ADDR_LEN);
 
   wpalMemoryCopy(halJoinReqMsg.joinReqParams.selfStaMacAddr,
-                 pwdiJoinParams->wdiReqInfo.macSTASelf, 
-                 WDI_MAC_ADDR_LEN); 
+                 pwdiJoinParams->wdiReqInfo.macSTASelf,
+                 WDI_MAC_ADDR_LEN);
 
-  halJoinReqMsg.joinReqParams.ucChannel = 
+  halJoinReqMsg.joinReqParams.ucChannel =
     pwdiJoinParams->wdiReqInfo.wdiChannelInfo.ucChannel;
 
   halJoinReqMsg.joinReqParams.linkState = pwdiJoinParams->wdiReqInfo.linkState;
 
 #ifndef WLAN_FEATURE_VOWIFI
-  halJoinReqMsg.joinReqParams.ucLocalPowerConstraint = 
+  halJoinReqMsg.joinReqParams.ucLocalPowerConstraint =
     pwdiJoinParams->wdiReqInfo.wdiChannelInfo.ucLocalPowerConstraint;
 #endif
 
-  halJoinReqMsg.joinReqParams.secondaryChannelOffset =     
+  halJoinReqMsg.joinReqParams.secondaryChannelOffset =
      WDI_2_HAL_SEC_CH_OFFSET(pwdiJoinParams->wdiReqInfo.wdiChannelInfo.
                              wdiSecondaryChannelOffset);
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halJoinReqMsg.joinReqParams, 
-                  sizeof(halJoinReqMsg.joinReqParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halJoinReqMsg.joinReqParams,
+                  sizeof(halJoinReqMsg.joinReqParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiJoinParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiJoinParams->pUserData;  
+  pWDICtx->pReqStatusUserData = pwdiJoinParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Join Request to HAL 
+    Send Join Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiJoinRspCb, pUserData, WDI_JOIN_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiJoinRspCb, pUserData, WDI_JOIN_RESP);
 
 }/*WDI_ProcessBSSSessionJoinReq*/
 
 /**
- @brief Process Join Request function (called when Main FSM 
+ @brief Process Join Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessJoinReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -7127,7 +7199,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == (pwdiJoinParams = (WDI_JoinReqParamsType*)pEventData->pEventData)) ||
@@ -7136,12 +7208,12 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
-  
+
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
@@ -7151,12 +7223,12 @@
               "Association is currently in progress, queueing new join req");
 
     /*Association is in progress - queue current one*/
-    wdiStatus = WDI_QueueNewAssocRequest(pWDICtx, pEventData, 
+    wdiStatus = WDI_QueueNewAssocRequest(pWDICtx, pEventData,
                              pwdiJoinParams->wdiReqInfo.macBSSID);
 
     wpalMutexRelease(&pWDICtx->wptMutex);
 
-    return wdiStatus; 
+    return wdiStatus;
   }
 
   /*Starting a new association */
@@ -7171,37 +7243,37 @@
 
 
 /**
- @brief Process Config BSS Request function (called when Main 
+ @brief Process Config BSS Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessConfigBSSReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_ConfigBSSReqParamsType*  pwdiConfigBSSParams;
   WDI_ConfigBSSRspCb           wdiConfigBSSRspCb;
-  wpt_uint8                    ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                    ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*          pBSSSes             = NULL;
-  wpt_uint16                   uMsgSize            = 0; 
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint16                   uMsgSize            = 0;
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
-  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS;
 
-  tConfigBssReqMsg             halConfigBssReqMsg; 
+  tConfigBssReqMsg             halConfigBssReqMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData ) ||
@@ -7210,51 +7282,51 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiConfigBSSParams = (WDI_ConfigBSSReqParamsType*)pEventData->pEventData;
   wdiConfigBSSRspCb   = (WDI_ConfigBSSRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
-                                 pwdiConfigBSSParams->wdiReqInfo.macBSSID, 
-                                 &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
+                                 pwdiConfigBSSParams->wdiReqInfo.macBSSID,
+                                 &pBSSSes);
 
-  if ( NULL == pBSSSes ) 
+  if ( NULL == pBSSSes )
   {
 #ifdef WLAN_FEATURE_VOWIFI_11R
       /*------------------------------------------------------------------------
-        Fetch an empty session block 
+        Fetch an empty session block
       ------------------------------------------------------------------------*/
-      ucCurrentBSSSesIdx = WDI_FindEmptySession( pWDICtx, &pBSSSes); 
+      ucCurrentBSSSesIdx = WDI_FindEmptySession( pWDICtx, &pBSSSes);
       if ( NULL == pBSSSes )
       {
-    
+
         WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                   "DAL has no free sessions - cannot run another join");
-    
+
         wpalMutexRelease(&pWDICtx->wptMutex);
-        return WDI_STATUS_RES_FAILURE; 
+        return WDI_STATUS_RES_FAILURE;
       }
-    
+
       /*Save BSS Session Info*/
-      pBSSSes->bInUse = eWLAN_PAL_TRUE; 
-      wpalMemoryCopy( pBSSSes->macBSSID, pwdiConfigBSSParams->wdiReqInfo.macBSSID, 
+      pBSSSes->bInUse = eWLAN_PAL_TRUE;
+      wpalMemoryCopy( pBSSSes->macBSSID, pwdiConfigBSSParams->wdiReqInfo.macBSSID,
                       WDI_MAC_ADDR_LEN);
-    
+
       /*Transition to state Joining*/
-      pBSSSes->wdiAssocState      = WDI_ASSOC_JOINING_ST; 
+      pBSSSes->wdiAssocState      = WDI_ASSOC_JOINING_ST;
       pWDICtx->ucCurrentBSSSesIdx = ucCurrentBSSSesIdx;
 #else
-    /* If the BSS type is IBSS create the session here as there is no Join 
+    /* If the BSS type is IBSS create the session here as there is no Join
      * Request in case of IBSS*/
     if((pwdiConfigBSSParams->wdiReqInfo.wdiBSSType == WDI_IBSS_MODE) ||
        (pwdiConfigBSSParams->wdiReqInfo.wdiBSSType == WDI_INFRA_AP_MODE) ||
@@ -7262,68 +7334,79 @@
        (pwdiConfigBSSParams->wdiReqInfo.wdiBSSType == WDI_BTAMP_STA_MODE))
     {
       /*------------------------------------------------------------------------
-        Fetch an empty session block 
+        Fetch an empty session block
       ------------------------------------------------------------------------*/
-      ucCurrentBSSSesIdx = WDI_FindEmptySession( pWDICtx, &pBSSSes); 
+      ucCurrentBSSSesIdx = WDI_FindEmptySession( pWDICtx, &pBSSSes);
       if ( NULL == pBSSSes )
       {
-    
+
         WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                   "DAL has no free sessions - cannot run another join");
-    
+
         wpalMutexRelease(&pWDICtx->wptMutex);
-        return WDI_STATUS_RES_FAILURE; 
+        return WDI_STATUS_RES_FAILURE;
       }
-    
+
       /*Save BSS Session Info*/
-      pBSSSes->bInUse = eWLAN_PAL_TRUE; 
-      wpalMemoryCopy( pBSSSes->macBSSID, pwdiConfigBSSParams->wdiReqInfo.macBSSID, 
+      pBSSSes->bInUse = eWLAN_PAL_TRUE;
+      wpalMemoryCopy( pBSSSes->macBSSID, pwdiConfigBSSParams->wdiReqInfo.macBSSID,
                       WDI_MAC_ADDR_LEN);
-    
+
       /*Transition to state Joining*/
-      pBSSSes->wdiAssocState      = WDI_ASSOC_JOINING_ST; 
+      pBSSSes->wdiAssocState      = WDI_ASSOC_JOINING_ST;
       pWDICtx->ucCurrentBSSSesIdx = ucCurrentBSSSesIdx;
     }
     else
     {
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-                "Association sequence for this BSS does not yet exist");
+                "%s: Association sequence for this BSS does not yet exist." MAC_ADDRESS_STR "wdiBssType %d",
+                __func__, MAC_ADDR_ARRAY(pwdiConfigBSSParams->wdiReqInfo.macBSSID), 
+                pwdiConfigBSSParams->wdiReqInfo.wdiBSSType);
+      
       /* for IBSS testing */
       wpalMutexRelease(&pWDICtx->wptMutex);
-      return WDI_STATUS_E_NOT_ALLOWED; 
+      return WDI_STATUS_E_NOT_ALLOWED;
     }
 #endif
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. " MAC_ADDRESS_STR " bssIdx %d", 
+              __func__, MAC_ADDR_ARRAY(pwdiConfigBSSParams->wdiReqInfo.macBSSID), 
+              ucCurrentBSSSesIdx);
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
 
     wpalMutexRelease(&pWDICtx->wptMutex);
 
-    return wdiStatus; 
+    return wdiStatus;
   }
 
   /* Cache the request for response processing */
-  wpalMemoryCopy(&pWDICtx->wdiCachedConfigBssReq, 
-                 pwdiConfigBSSParams, 
+  wpalMemoryCopy(&pWDICtx->wdiCachedConfigBssReq,
+                 pwdiConfigBSSParams,
                  sizeof(pWDICtx->wdiCachedConfigBssReq));
 
   wpalMutexRelease(&pWDICtx->wptMutex);
 
-  uMsgSize = sizeof(halConfigBssReqMsg.configBssParams); 
+  /* Allocation of BssReqMsg Memory Based on Firmware Capabilities */
+#ifdef WLAN_FEATURE_11AC
+  if (WDI_getFwWlanFeatCaps(DOT11AC))
+	  uMsgSize = sizeof(halConfigBssReqMsg.uBssParams.configBssParams_V1); // Version - 1 For 11AC
+  else
+#endif
+	  uMsgSize = sizeof(halConfigBssReqMsg.uBssParams.configBssParams); // default Version - 0 Structure
 
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_CONFIG_BSS_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_CONFIG_BSS_REQ,
                     uMsgSize, &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + uMsgSize )))
   {
@@ -7331,68 +7414,68 @@
               "Unable to get send buffer in config bss req %x %x %x",
                 pEventData, pwdiConfigBSSParams, wdiConfigBSSRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*Copy the BSS request */
-  WDI_CopyWDIConfigBSSToHALConfigBSS( &halConfigBssReqMsg.configBssParams,
+  WDI_CopyWDIConfigBSSToHALConfigBSS( &halConfigBssReqMsg.uBssParams.configBssParams,
                                       &pwdiConfigBSSParams->wdiReqInfo);
 
   /* Need to fill in the STA Index to invalid, since at this point we have not
      yet received it from HAL */
-  halConfigBssReqMsg.configBssParams.staContext.staIdx = WDI_STA_INVALID_IDX;
+  halConfigBssReqMsg.uBssParams.configBssParams.staContext.staIdx = WDI_STA_INVALID_IDX;
 
   /* Need to fill in the BSS index */
-  halConfigBssReqMsg.configBssParams.staContext.bssIdx = pBSSSes->ucBSSIdx;
-  
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halConfigBssReqMsg.configBssParams, 
-                  sizeof(halConfigBssReqMsg.configBssParams)); 
+  halConfigBssReqMsg.uBssParams.configBssParams.staContext.bssIdx = pBSSSes->ucBSSIdx;
+
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halConfigBssReqMsg.uBssParams.configBssParams,
+                  uMsgSize);
 
   pWDICtx->wdiReqStatusCB     = pwdiConfigBSSParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiConfigBSSParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiConfigBSSParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Config BSS Request to HAL 
+    Send Config BSS Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiConfigBSSRspCb, pEventData->pUserData, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiConfigBSSRspCb, pEventData->pUserData,
                        WDI_CONFIG_BSS_RESP);
 
 }/*WDI_ProcessConfigBSSReq*/
 
 
 /**
- @brief Process Del BSS Request function (called when Main FSM 
+ @brief Process Del BSS Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessDelBSSReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_DelBSSReqParamsType*  pwdiDelBSSParams    = NULL;
   WDI_DelBSSRspCb           wdiDelBSSRspCb      = NULL;
-  wpt_uint8                 ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                 ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*       pBSSSes             = NULL;
-  wpt_uint8*                pSendBuffer         = NULL; 
+  wpt_uint8*                pSendBuffer         = NULL;
   wpt_uint16                usDataOffset        = 0;
   wpt_uint16                usSendSize          = 0;
-  WDI_Status                wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status                wdiStatus           = WDI_STATUS_SUCCESS;
 
-  tDeleteBssReqMsg          halBssReqMsg; 
+  tDeleteBssReqMsg          halBssReqMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == (pwdiDelBSSParams = (WDI_DelBSSReqParamsType*)pEventData->pEventData)) ||
@@ -7401,53 +7484,55 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSessionByBSSIdx( pWDICtx, 
-                                             pwdiDelBSSParams->ucBssIdx, 
-                                            &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSessionByBSSIdx( pWDICtx,
+                                             pwdiDelBSSParams->ucBssIdx,
+                                            &pBSSSes);
 
-  if ( NULL == pBSSSes ) 
+  if ( NULL == pBSSSes )
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+        "%s: BSS does not yet exist. ucBssIdx %d",
+        __func__, pwdiDelBSSParams->ucBssIdx);
 
     wpalMutexRelease(&pWDICtx->wptMutex);
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. ucBssIdx %d", 
+              __func__, pwdiDelBSSParams->ucBssIdx);
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
 
     wpalMutexRelease(&pWDICtx->wptMutex);
 
-    return wdiStatus; 
+    return wdiStatus;
   }
 
   /*-----------------------------------------------------------------------
     If we receive a Del BSS request for an association that is already in
     progress, it indicates that the assoc has failed => we no longer have
     an association in progress => we must check for pending associations
-    that were queued and start as soon as the Del BSS response is received 
+    that were queued and start as soon as the Del BSS response is received
   -----------------------------------------------------------------------*/
   if ( ucCurrentBSSSesIdx == pWDICtx->ucCurrentBSSSesIdx )
   {
@@ -7465,7 +7550,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_DEL_BSS_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_DEL_BSS_REQ,
                         sizeof(halBssReqMsg.deleteBssParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halBssReqMsg.deleteBssParams) )))
@@ -7474,64 +7559,64 @@
               "Unable to get send buffer in start req %x %x %x",
                 pEventData, pwdiDelBSSParams, wdiDelBSSRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*Fill in the message request structure*/
 
   /*BSS Index is saved on config BSS response and Post Assoc Response */
-  halBssReqMsg.deleteBssParams.bssIdx = pBSSSes->ucBSSIdx; 
+  halBssReqMsg.deleteBssParams.bssIdx = pBSSSes->ucBSSIdx;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halBssReqMsg.deleteBssParams, 
-                  sizeof(halBssReqMsg.deleteBssParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halBssReqMsg.deleteBssParams,
+                  sizeof(halBssReqMsg.deleteBssParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiDelBSSParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiDelBSSParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiDelBSSParams->pUserData;
 
- 
+
   /*-------------------------------------------------------------------------
-    Send Del BSS Request to HAL 
+    Send Del BSS Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiDelBSSRspCb, pEventData->pUserData, WDI_DEL_BSS_RESP);
 
-  
+
 }/*WDI_ProcessDelBSSReq*/
 
 /**
- @brief Process Post Assoc Request function (called when Main 
+ @brief Process Post Assoc Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessPostAssocReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_PostAssocReqParamsType* pwdiPostAssocParams   = NULL;
   WDI_PostAssocRspCb          wdiPostAssocRspCb     = NULL;
-  wpt_uint8                   ucCurrentBSSSesIdx    = 0; 
+  wpt_uint8                   ucCurrentBSSSesIdx    = 0;
   WDI_BSSSessionType*         pBSSSes               = NULL;
-  wpt_uint8*                  pSendBuffer           = NULL; 
+  wpt_uint8*                  pSendBuffer           = NULL;
   wpt_uint16                  usDataOffset          = 0;
   wpt_uint16                  usSendSize            = 0;
   wpt_uint16                  uMsgSize              = 0;
   wpt_uint16                  uOffset               = 0;
-  WDI_Status                  wdiStatus             = WDI_STATUS_SUCCESS; 
+  WDI_Status                  wdiStatus             = WDI_STATUS_SUCCESS;
 
-  tPostAssocReqMsg            halPostAssocReqMsg; 
+  tPostAssocReqMsg            halPostAssocReqMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == (pwdiPostAssocParams = (WDI_PostAssocReqParamsType*)pEventData->pEventData)) ||
@@ -7540,53 +7625,55 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
-                              pwdiPostAssocParams->wdiBSSParams.macBSSID, 
-                              &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
+                              pwdiPostAssocParams->wdiBSSParams.macBSSID,
+                              &pBSSSes);
 
   if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist - "
-              "operation not allowed");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+              "%s: Association sequence for this BSS does not yet exist - " 
+              "operation not allowed. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(pwdiPostAssocParams->wdiBSSParams.macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(pwdiPostAssocParams->wdiBSSParams.macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
 
     wpalMutexRelease(&pWDICtx->wptMutex);
 
-    return wdiStatus; 
+    return wdiStatus;
   }
 
   /*-----------------------------------------------------------------------
     If Post Assoc was not yet received - the current association must
     be in progress
     -----------------------------------------------------------------------*/
-  if (( ucCurrentBSSSesIdx != pWDICtx->ucCurrentBSSSesIdx ) || 
+  if (( ucCurrentBSSSesIdx != pWDICtx->ucCurrentBSSSesIdx ) ||
       ( eWLAN_PAL_FALSE == pWDICtx->bAssociationInProgress ))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
@@ -7594,11 +7681,11 @@
               "progress - not allowed");
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*-----------------------------------------------------------------------
-    Post Assoc Request is only allowed in Joining state 
+    Post Assoc Request is only allowed in Joining state
   -----------------------------------------------------------------------*/
   if ( WDI_ASSOC_JOINING_ST != pBSSSes->wdiAssocState)
   {
@@ -7606,7 +7693,7 @@
               "Post Assoc not allowed before JOIN - failing request");
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   wpalMutexRelease(&pWDICtx->wptMutex);
@@ -7614,9 +7701,9 @@
   uMsgSize = sizeof(halPostAssocReqMsg.postAssocReqParams.configStaParams) +
              sizeof(halPostAssocReqMsg.postAssocReqParams.configBssParams) ;
   /*-----------------------------------------------------------------------
-    Fill message for tx over the bus 
+    Fill message for tx over the bus
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_POST_ASSOC_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_POST_ASSOC_REQ,
                         uMsgSize,&pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + uMsgSize )))
   {
@@ -7624,7 +7711,7 @@
               "Unable to get send buffer in start req %x %x %x",
                 pEventData, pwdiPostAssocParams, wdiPostAssocRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*Copy the STA parameters */
@@ -7632,7 +7719,7 @@
                                &pwdiPostAssocParams->wdiSTAParams );
 
   /* Need to fill in the self STA Index */
-  if ( WDI_STATUS_SUCCESS != 
+  if ( WDI_STATUS_SUCCESS !=
        WDI_STATableFindStaidByAddr(pWDICtx,
                                    pwdiPostAssocParams->wdiSTAParams.macSTA,
                                    (wpt_uint8*)&halPostAssocReqMsg.postAssocReqParams.configStaParams.staIdx ))
@@ -7640,11 +7727,11 @@
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   /* Need to fill in the BSS index */
-  halPostAssocReqMsg.postAssocReqParams.configStaParams.bssIdx = 
+  halPostAssocReqMsg.postAssocReqParams.configStaParams.bssIdx =
      pBSSSes->ucBSSIdx;
 
   /*Copy the BSS parameters */
@@ -7652,82 +7739,82 @@
                                       &pwdiPostAssocParams->wdiBSSParams);
 
   /* Need to fill in the STA index of the peer */
-  if ( WDI_STATUS_SUCCESS != 
+  if ( WDI_STATUS_SUCCESS !=
        WDI_STATableFindStaidByAddr(pWDICtx,
                                    pwdiPostAssocParams->wdiBSSParams.wdiSTAContext.macSTA,
-                                   (wpt_uint8*)&halPostAssocReqMsg.postAssocReqParams.configBssParams.staContext.staIdx)) 
+                                   (wpt_uint8*)&halPostAssocReqMsg.postAssocReqParams.configBssParams.staContext.staIdx))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   /* Need to fill in the BSS index */
-  halPostAssocReqMsg.postAssocReqParams.configStaParams.bssIdx = 
+  halPostAssocReqMsg.postAssocReqParams.configStaParams.bssIdx =
      pBSSSes->ucBSSIdx;
 
-  
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halPostAssocReqMsg.postAssocReqParams.configStaParams, 
-                  sizeof(halPostAssocReqMsg.postAssocReqParams.configStaParams)); 
+
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halPostAssocReqMsg.postAssocReqParams.configStaParams,
+                  sizeof(halPostAssocReqMsg.postAssocReqParams.configStaParams));
 
   uOffset = sizeof(halPostAssocReqMsg.postAssocReqParams.configStaParams);
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset + uOffset, 
-                  &halPostAssocReqMsg.postAssocReqParams.configBssParams, 
-                  sizeof(halPostAssocReqMsg.postAssocReqParams.configBssParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset + uOffset,
+                  &halPostAssocReqMsg.postAssocReqParams.configBssParams,
+                  sizeof(halPostAssocReqMsg.postAssocReqParams.configBssParams));
 
- 
+
   pWDICtx->wdiReqStatusCB     = pwdiPostAssocParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiPostAssocParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiPostAssocParams->pUserData;
 
- 
-  wpalMemoryCopy( &pWDICtx->wdiCachedPostAssocReq, 
+
+  wpalMemoryCopy( &pWDICtx->wdiCachedPostAssocReq,
                   pwdiPostAssocParams,
-                  sizeof(pWDICtx->wdiCachedPostAssocReq));  
+                  sizeof(pWDICtx->wdiCachedPostAssocReq));
 
   /*-------------------------------------------------------------------------
-    Send Post Assoc Request to HAL 
+    Send Post Assoc Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiPostAssocRspCb, pEventData->pUserData, WDI_POST_ASSOC_RESP);
 
-  
+
 }/*WDI_ProcessPostAssocReq*/
 
 /**
- @brief Process Del STA Request function (called when Main FSM 
+ @brief Process Del STA Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessDelSTAReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_DelSTAReqParamsType*  pwdiDelSTAParams;
   WDI_DelSTARspCb           wdiDelSTARspCb;
-  wpt_uint8                 ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                 ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*       pBSSSes             = NULL;
-  wpt_uint8*                pSendBuffer         = NULL; 
+  wpt_uint8*                pSendBuffer         = NULL;
   wpt_uint16                usDataOffset        = 0;
   wpt_uint16                usSendSize          = 0;
-  wpt_macAddr               macBSSID; 
+  wpt_macAddr               macBSSID;
   WDI_Status                wdiStatus           = WDI_STATUS_SUCCESS;
 
-  tDeleteStaReqMsg          halDelStaReqMsg; 
+  tDeleteStaReqMsg          halDelStaReqMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -7735,59 +7822,61 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiDelSTAParams = (WDI_DelSTAReqParamsType*)pEventData->pEventData;
   wdiDelSTARspCb   = (WDI_DelSTARspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
     Find the BSS for which the request is made and identify WDI session
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                                                         pwdiDelSTAParams->ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                                                         pwdiDelSTAParams->ucSTAIdx,
                                                          &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
-  if ( NULL == pBSSSes ) 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+              "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR,
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
   wpalMutexRelease(&pWDICtx->wptMutex);
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_DEL_STA_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_DEL_STA_REQ,
                         sizeof(halDelStaReqMsg.delStaParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halDelStaReqMsg.delStaParams) )))
@@ -7796,61 +7885,61 @@
               "Unable to get send buffer in start req %x %x %x",
                 pEventData, pwdiDelSTAParams, wdiDelSTARspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  halDelStaReqMsg.delStaParams.staIdx = pwdiDelSTAParams->ucSTAIdx; 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halDelStaReqMsg.delStaParams, 
-                  sizeof(halDelStaReqMsg.delStaParams)); 
+  halDelStaReqMsg.delStaParams.staIdx = pwdiDelSTAParams->ucSTAIdx;
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halDelStaReqMsg.delStaParams,
+                  sizeof(halDelStaReqMsg.delStaParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiDelSTAParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiDelSTAParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiDelSTAParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Del STA Request to HAL 
+    Send Del STA Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiDelSTARspCb, pEventData->pUserData, WDI_DEL_STA_RESP);
 
 }/*WDI_ProcessDelSTAReq*/
 
 
 /*==========================================================================
-                 SECURITY REQUEST PROCESSING API 
+                 SECURITY REQUEST PROCESSING API
 ==========================================================================*/
 /**
  @brief Process Set BSS Key Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetBssKeyReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_SetBSSKeyReqParamsType*  pwdiSetBSSKeyParams;
   WDI_SetBSSKeyRspCb           wdiSetBSSKeyRspCb;
-  wpt_uint8                    ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                    ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*          pBSSSes             = NULL;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
-  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS;
   tSetBssKeyReqMsg             halSetBssKeyReqMsg  = {{0}};
   wpt_uint8                    keyIndex            = 0;
 
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -7858,45 +7947,47 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiSetBSSKeyParams = (WDI_SetBSSKeyReqParamsType*)pEventData->pEventData;
   wdiSetBSSKeyRspCb   = (WDI_SetBSSKeyRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSessionByBSSIdx( pWDICtx, 
-                           pwdiSetBSSKeyParams->wdiBSSKeyInfo.ucBssIdx, 
-                          &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSessionByBSSIdx( pWDICtx,
+                           pwdiSetBSSKeyParams->wdiBSSKeyInfo.ucBssIdx,
+                          &pBSSSes);
 
-  if ( NULL == pBSSSes ) 
+  if ( NULL == pBSSSes )
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+              "%s: Association sequence for this BSS does not yet exist. ucBssIdx %d", 
+              __func__, pwdiSetBSSKeyParams->wdiBSSKeyInfo.ucBssIdx);
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. ucBssIdx %d",
+              __func__, pwdiSetBSSKeyParams->wdiBSSKeyInfo.ucBssIdx);
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
@@ -7904,7 +7995,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_BSS_KEY_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_BSS_KEY_REQ,
                         sizeof(halSetBssKeyReqMsg.setBssKeyParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halSetBssKeyReqMsg.setBssKeyParams) )))
@@ -7913,88 +8004,88 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiSetBSSKeyParams, wdiSetBSSKeyRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-----------------------------------------------------------------------
     Copy the Key parameters into the HAL message
   -----------------------------------------------------------------------*/
 
-  halSetBssKeyReqMsg.setBssKeyParams.bssIdx = ucCurrentBSSSesIdx; 
+  halSetBssKeyReqMsg.setBssKeyParams.bssIdx = ucCurrentBSSSesIdx;
 
-  halSetBssKeyReqMsg.setBssKeyParams.encType = 
+  halSetBssKeyReqMsg.setBssKeyParams.encType =
              WDI_2_HAL_ENC_TYPE (pwdiSetBSSKeyParams->wdiBSSKeyInfo.wdiEncType);
 
-  halSetBssKeyReqMsg.setBssKeyParams.numKeys = 
+  halSetBssKeyReqMsg.setBssKeyParams.numKeys =
                                   pwdiSetBSSKeyParams->wdiBSSKeyInfo.ucNumKeys;
 
   for(keyIndex = 0; keyIndex < pwdiSetBSSKeyParams->wdiBSSKeyInfo.ucNumKeys ;
                                                                  keyIndex++)
   {
-    halSetBssKeyReqMsg.setBssKeyParams.key[keyIndex].keyId = 
+    halSetBssKeyReqMsg.setBssKeyParams.key[keyIndex].keyId =
                       pwdiSetBSSKeyParams->wdiBSSKeyInfo.aKeys[keyIndex].keyId;
     halSetBssKeyReqMsg.setBssKeyParams.key[keyIndex].unicast =
                      pwdiSetBSSKeyParams->wdiBSSKeyInfo.aKeys[keyIndex].unicast;
     halSetBssKeyReqMsg.setBssKeyParams.key[keyIndex].keyDirection =
                 pwdiSetBSSKeyParams->wdiBSSKeyInfo.aKeys[keyIndex].keyDirection;
     wpalMemoryCopy(halSetBssKeyReqMsg.setBssKeyParams.key[keyIndex].keyRsc,
-                     pwdiSetBSSKeyParams->wdiBSSKeyInfo.aKeys[keyIndex].keyRsc, 
+                     pwdiSetBSSKeyParams->wdiBSSKeyInfo.aKeys[keyIndex].keyRsc,
                      WDI_MAX_KEY_RSC_LEN);
-    halSetBssKeyReqMsg.setBssKeyParams.key[keyIndex].paeRole = 
+    halSetBssKeyReqMsg.setBssKeyParams.key[keyIndex].paeRole =
                      pwdiSetBSSKeyParams->wdiBSSKeyInfo.aKeys[keyIndex].paeRole;
-    halSetBssKeyReqMsg.setBssKeyParams.key[keyIndex].keyLength = 
+    halSetBssKeyReqMsg.setBssKeyParams.key[keyIndex].keyLength =
                    pwdiSetBSSKeyParams->wdiBSSKeyInfo.aKeys[keyIndex].keyLength;
     wpalMemoryCopy(halSetBssKeyReqMsg.setBssKeyParams.key[keyIndex].key,
-                         pwdiSetBSSKeyParams->wdiBSSKeyInfo.aKeys[keyIndex].key, 
+                         pwdiSetBSSKeyParams->wdiBSSKeyInfo.aKeys[keyIndex].key,
                         WDI_MAX_KEY_LENGTH);
    }
-                                                                  
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                    &halSetBssKeyReqMsg.setBssKeyParams, 
-                    sizeof(halSetBssKeyReqMsg.setBssKeyParams)); 
+
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                    &halSetBssKeyReqMsg.setBssKeyParams,
+                    sizeof(halSetBssKeyReqMsg.setBssKeyParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiSetBSSKeyParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiSetBSSKeyParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiSetBSSKeyParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Set BSS Key Request to HAL 
+    Send Set BSS Key Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiSetBSSKeyRspCb, pEventData->pUserData, 
-                       WDI_SET_BSS_KEY_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiSetBSSKeyRspCb, pEventData->pUserData,
+                       WDI_SET_BSS_KEY_RESP);
 
 }/*WDI_ProcessSetBssKeyReq*/
 
 /**
- @brief Process Remove BSS Key Request function (called when Main    
+ @brief Process Remove BSS Key Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessRemoveBssKeyReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_RemoveBSSKeyReqParamsType*  pwdiRemoveBSSKeyParams;
   WDI_RemoveBSSKeyRspCb           wdiRemoveBSSKeyRspCb;
-  wpt_uint8                       ucCurrentBSSSesIdx     = 0; 
+  wpt_uint8                       ucCurrentBSSSesIdx     = 0;
   WDI_BSSSessionType*             pBSSSes                = NULL;
-  wpt_uint8*                      pSendBuffer            = NULL; 
+  wpt_uint8*                      pSendBuffer            = NULL;
   wpt_uint16                      usDataOffset           = 0;
   wpt_uint16                      usSendSize             = 0;
-  WDI_Status                      wdiStatus              = WDI_STATUS_SUCCESS; 
+  WDI_Status                      wdiStatus              = WDI_STATUS_SUCCESS;
   tRemoveBssKeyReqMsg             halRemoveBssKeyReqMsg  = {{0}};
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -8002,45 +8093,47 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiRemoveBSSKeyParams = (WDI_RemoveBSSKeyReqParamsType*)pEventData->pEventData;
   wdiRemoveBSSKeyRspCb   = (WDI_RemoveBSSKeyRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSessionByBSSIdx( pWDICtx, 
-                           pwdiRemoveBSSKeyParams->wdiKeyInfo.ucBssIdx, 
-                          &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSessionByBSSIdx( pWDICtx,
+                           pwdiRemoveBSSKeyParams->wdiKeyInfo.ucBssIdx,
+                          &pBSSSes);
 
-  if ( NULL == pBSSSes ) 
+  if ( NULL == pBSSSes )
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+              "%s: Association sequence for this BSS does not yet exist. ucBssIdx %d", 
+              __func__, pwdiRemoveBSSKeyParams->wdiKeyInfo.ucBssIdx);
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. ucBssIdx %d",
+              __func__, pwdiRemoveBSSKeyParams->wdiKeyInfo.ucBssIdx);
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
@@ -8049,7 +8142,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_RMV_BSS_KEY_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_RMV_BSS_KEY_REQ,
                         sizeof(halRemoveBssKeyReqMsg.removeBssKeyParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halRemoveBssKeyReqMsg.removeBssKeyParams) )))
@@ -8058,49 +8151,49 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiRemoveBSSKeyParams, wdiRemoveBSSKeyRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
   /*-----------------------------------------------------------------------
     Copy the Key parameters into the HAL message
   -----------------------------------------------------------------------*/
   halRemoveBssKeyReqMsg.removeBssKeyParams.bssIdx = ucCurrentBSSSesIdx;
 
-  halRemoveBssKeyReqMsg.removeBssKeyParams.encType = 
+  halRemoveBssKeyReqMsg.removeBssKeyParams.encType =
       WDI_2_HAL_ENC_TYPE (pwdiRemoveBSSKeyParams->wdiKeyInfo.wdiEncType);
 
   halRemoveBssKeyReqMsg.removeBssKeyParams.keyId = pwdiRemoveBSSKeyParams->wdiKeyInfo.ucKeyId;
 
-  halRemoveBssKeyReqMsg.removeBssKeyParams.wepType = 
+  halRemoveBssKeyReqMsg.removeBssKeyParams.wepType =
       WDI_2_HAL_WEP_TYPE(pwdiRemoveBSSKeyParams->wdiKeyInfo.wdiWEPType);
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                    &halRemoveBssKeyReqMsg.removeBssKeyParams, 
-                    sizeof(halRemoveBssKeyReqMsg.removeBssKeyParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                    &halRemoveBssKeyReqMsg.removeBssKeyParams,
+                    sizeof(halRemoveBssKeyReqMsg.removeBssKeyParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiRemoveBSSKeyParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiRemoveBSSKeyParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiRemoveBSSKeyParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Remove BSS Key Request to HAL 
+    Send Remove BSS Key Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiRemoveBSSKeyRspCb, pEventData->pUserData,
-                       WDI_RMV_BSS_KEY_RESP); 
+                       WDI_RMV_BSS_KEY_RESP);
 }/*WDI_ProcessRemoveBssKeyReq*/
 
 /**
- @brief Process Set STA KeyRequest function (called when Main FSM 
+ @brief Process Set STA KeyRequest function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetStaKeyReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -8108,19 +8201,19 @@
   WDI_SetSTAKeyReqParamsType*  pwdiSetSTAKeyParams;
   WDI_SetSTAKeyRspCb           wdiSetSTAKeyRspCb;
   WDI_BSSSessionType*          pBSSSes             = NULL;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
-  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS;
   wpt_macAddr                  macBSSID;
-  wpt_uint8                    ucCurrentBSSSesIdx; 
+  wpt_uint8                    ucCurrentBSSSesIdx;
   tSetStaKeyReqMsg             halSetStaKeyReqMsg  = {{0}};
   wpt_uint8                    keyIndex            = 0;
 
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -8128,52 +8221,54 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
    pwdiSetSTAKeyParams = (WDI_SetSTAKeyReqParamsType*)pEventData->pEventData;
    wdiSetSTAKeyRspCb   = (WDI_SetSTAKeyRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
     Find the BSS for which the request is made and identify WDI session
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                                  pwdiSetSTAKeyParams->wdiKeyInfo.ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                                  pwdiSetSTAKeyParams->wdiKeyInfo.ucSTAIdx,
                                   &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
-  if ( NULL == pBSSSes ) 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+              "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
- 
+
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR,
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
@@ -8181,7 +8276,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_STA_KEY_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_STA_KEY_REQ,
                         sizeof(halSetStaKeyReqMsg.setStaKeyParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halSetStaKeyReqMsg.setStaKeyParams) )))
@@ -8190,15 +8285,15 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiSetSTAKeyParams, wdiSetSTAKeyRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
   /*-----------------------------------------------------------------------
     Copy the STA Key parameters into the HAL message
   -----------------------------------------------------------------------*/
-  halSetStaKeyReqMsg.setStaKeyParams.encType = 
+  halSetStaKeyReqMsg.setStaKeyParams.encType =
       WDI_2_HAL_ENC_TYPE (pwdiSetSTAKeyParams->wdiKeyInfo.wdiEncType);
 
-  halSetStaKeyReqMsg.setStaKeyParams.wepType = 
+  halSetStaKeyReqMsg.setStaKeyParams.wepType =
       WDI_2_HAL_WEP_TYPE (pwdiSetSTAKeyParams->wdiKeyInfo.wdiWEPType );
 
   halSetStaKeyReqMsg.setStaKeyParams.staIdx = pwdiSetSTAKeyParams->wdiKeyInfo.ucSTAIdx;
@@ -8211,71 +8306,71 @@
   for(keyIndex = 0; keyIndex < pwdiSetSTAKeyParams->wdiKeyInfo.ucNumKeys ;
                                                                  keyIndex++)
   {
-    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyId = 
+    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyId =
                       pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].keyId;
     halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].unicast =
                      pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].unicast;
     halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyDirection =
                 pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].keyDirection;
     wpalMemoryCopy(halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyRsc,
-                     pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].keyRsc, 
+                     pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].keyRsc,
                      WDI_MAX_KEY_RSC_LEN);
-    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].paeRole = 
+    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].paeRole =
                      pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].paeRole;
-    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyLength = 
+    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyLength =
                    pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].keyLength;
     wpalMemoryCopy(halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].key,
-                         pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].key, 
+                         pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].key,
                         WDI_MAX_KEY_LENGTH);
    }
 #else
-  halSetStaKeyReqMsg.setStaKeyParams.key.keyId = 
+  halSetStaKeyReqMsg.setStaKeyParams.key.keyId =
                       pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].keyId;
   halSetStaKeyReqMsg.setStaKeyParams.key.unicast =
                      pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].unicast;
   halSetStaKeyReqMsg.setStaKeyParams.key.keyDirection =
                 pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].keyDirection;
   wpalMemoryCopy(halSetStaKeyReqMsg.setStaKeyParams.key.keyRsc,
-                     pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].keyRsc, 
+                     pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].keyRsc,
                      WDI_MAX_KEY_RSC_LEN);
-  halSetStaKeyReqMsg.setStaKeyParams.key.paeRole = 
+  halSetStaKeyReqMsg.setStaKeyParams.key.paeRole =
                      pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].paeRole;
-  halSetStaKeyReqMsg.setStaKeyParams.key.keyLength = 
+  halSetStaKeyReqMsg.setStaKeyParams.key.keyLength =
                    pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].keyLength;
   wpalMemoryCopy(halSetStaKeyReqMsg.setStaKeyParams.key.key,
-                         pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].key, 
+                         pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].key,
                         WDI_MAX_KEY_LENGTH);
 #endif
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                    &halSetStaKeyReqMsg.setStaKeyParams, 
-                    sizeof(halSetStaKeyReqMsg.setStaKeyParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                    &halSetStaKeyReqMsg.setStaKeyParams,
+                    sizeof(halSetStaKeyReqMsg.setStaKeyParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiSetSTAKeyParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiSetSTAKeyParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiSetSTAKeyParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Set STA Key Request to HAL 
+    Send Set STA Key Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiSetSTAKeyRspCb, pEventData->pUserData, 
-                       WDI_SET_STA_KEY_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiSetSTAKeyRspCb, pEventData->pUserData,
+                       WDI_SET_STA_KEY_RESP);
 
 }/*WDI_ProcessSetSTAKeyReq*/
 
 /**
- @brief Process Remove STA Key Request function (called when 
+ @brief Process Remove STA Key Request function (called when
         Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessRemoveStaKeyReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -8283,17 +8378,17 @@
   WDI_RemoveSTAKeyReqParamsType*  pwdiRemoveSTAKeyParams;
   WDI_RemoveSTAKeyRspCb           wdiRemoveSTAKeyRspCb;
   WDI_BSSSessionType*             pBSSSes                = NULL;
-  wpt_uint8*                      pSendBuffer            = NULL; 
+  wpt_uint8*                      pSendBuffer            = NULL;
   wpt_uint16                      usDataOffset           = 0;
   wpt_uint16                      usSendSize             = 0;
-  WDI_Status                      wdiStatus              = WDI_STATUS_SUCCESS; 
+  WDI_Status                      wdiStatus              = WDI_STATUS_SUCCESS;
   wpt_macAddr                     macBSSID;
   wpt_uint8                       ucCurrentBSSSesIdx;
   tRemoveStaKeyReqMsg             halRemoveStaKeyReqMsg  = {{0}};
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
  if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -8301,52 +8396,54 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiRemoveSTAKeyParams = (WDI_RemoveSTAKeyReqParamsType*)pEventData->pEventData;
   wdiRemoveSTAKeyRspCb   = (WDI_RemoveSTAKeyRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
     Find the BSS for which the request is made and identify WDI session
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                             pwdiRemoveSTAKeyParams->wdiKeyInfo.ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                             pwdiRemoveSTAKeyParams->wdiKeyInfo.ucSTAIdx,
                              &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
-  if ( NULL == pBSSSes ) 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+              "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
- 
+
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
@@ -8355,7 +8452,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_RMV_STA_KEY_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_RMV_STA_KEY_REQ,
                         sizeof(halRemoveStaKeyReqMsg.removeStaKeyParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halRemoveStaKeyReqMsg.removeStaKeyParams) )))
@@ -8364,54 +8461,54 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiRemoveSTAKeyParams, wdiRemoveSTAKeyRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-----------------------------------------------------------------------
     Copy the Key parameters into the HAL message
   -----------------------------------------------------------------------*/
 
-  halRemoveStaKeyReqMsg.removeStaKeyParams.staIdx = 
+  halRemoveStaKeyReqMsg.removeStaKeyParams.staIdx =
       pwdiRemoveSTAKeyParams->wdiKeyInfo.ucSTAIdx;
 
-  halRemoveStaKeyReqMsg.removeStaKeyParams.encType = 
+  halRemoveStaKeyReqMsg.removeStaKeyParams.encType =
       WDI_2_HAL_ENC_TYPE (pwdiRemoveSTAKeyParams->wdiKeyInfo.wdiEncType);
 
-  halRemoveStaKeyReqMsg.removeStaKeyParams.keyId = 
+  halRemoveStaKeyReqMsg.removeStaKeyParams.keyId =
       pwdiRemoveSTAKeyParams->wdiKeyInfo.ucKeyId;
 
-  halRemoveStaKeyReqMsg.removeStaKeyParams.unicast = 
+  halRemoveStaKeyReqMsg.removeStaKeyParams.unicast =
       pwdiRemoveSTAKeyParams->wdiKeyInfo.ucUnicast;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                    &halRemoveStaKeyReqMsg.removeStaKeyParams, 
-                    sizeof(halRemoveStaKeyReqMsg.removeStaKeyParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                    &halRemoveStaKeyReqMsg.removeStaKeyParams,
+                    sizeof(halRemoveStaKeyReqMsg.removeStaKeyParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiRemoveSTAKeyParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiRemoveSTAKeyParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiRemoveSTAKeyParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Remove STA Key Request to HAL 
+    Send Remove STA Key Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiRemoveSTAKeyRspCb, pEventData->pUserData,
-                       WDI_RMV_STA_KEY_RESP); 
+                       WDI_RMV_STA_KEY_RESP);
 
 }/*WDI_ProcessRemoveSTAKeyReq*/
 
 /**
- @brief Process Set STA KeyRequest function (called when Main FSM 
+ @brief Process Set STA KeyRequest function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetStaBcastKeyReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -8419,19 +8516,19 @@
   WDI_SetSTAKeyReqParamsType*  pwdiSetSTAKeyParams;
   WDI_SetSTAKeyRspCb           wdiSetSTAKeyRspCb;
   WDI_BSSSessionType*          pBSSSes             = NULL;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
-  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS;
   wpt_macAddr                  macBSSID;
-  wpt_uint8                    ucCurrentBSSSesIdx; 
+  wpt_uint8                    ucCurrentBSSSesIdx;
   tSetStaKeyReqMsg             halSetStaKeyReqMsg  = {{0}};
   wpt_uint8                    keyIndex            = 0;
 
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -8439,52 +8536,54 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
    pwdiSetSTAKeyParams = (WDI_SetSTAKeyReqParamsType*)pEventData->pEventData;
    wdiSetSTAKeyRspCb   = (WDI_SetSTAKeyRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
     Find the BSS for which the request is made and identify WDI session
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                                  pwdiSetSTAKeyParams->wdiKeyInfo.ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                                  pwdiSetSTAKeyParams->wdiKeyInfo.ucSTAIdx,
                                   &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
-  if ( NULL == pBSSSes ) 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
+  if ( NULL == pBSSSes )
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+              "Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR,
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
- 
+
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR,
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
@@ -8492,7 +8591,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_STA_KEY_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_STA_KEY_REQ,
                         sizeof(halSetStaKeyReqMsg.setStaKeyParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halSetStaKeyReqMsg.setStaKeyParams) )))
@@ -8501,15 +8600,15 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiSetSTAKeyParams, wdiSetSTAKeyRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
   /*-----------------------------------------------------------------------
     Copy the STA Key parameters into the HAL message
   -----------------------------------------------------------------------*/
-  halSetStaKeyReqMsg.setStaKeyParams.encType = 
+  halSetStaKeyReqMsg.setStaKeyParams.encType =
       WDI_2_HAL_ENC_TYPE (pwdiSetSTAKeyParams->wdiKeyInfo.wdiEncType);
 
-  halSetStaKeyReqMsg.setStaKeyParams.wepType = 
+  halSetStaKeyReqMsg.setStaKeyParams.wepType =
       WDI_2_HAL_WEP_TYPE (pwdiSetSTAKeyParams->wdiKeyInfo.wdiWEPType );
 
   halSetStaKeyReqMsg.setStaKeyParams.staIdx = pwdiSetSTAKeyParams->wdiKeyInfo.ucSTAIdx;
@@ -8522,71 +8621,71 @@
   for(keyIndex = 0; keyIndex < pwdiSetSTAKeyParams->wdiKeyInfo.ucNumKeys ;
                                                                  keyIndex++)
   {
-    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyId = 
+    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyId =
                       pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].keyId;
     halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].unicast =
                      pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].unicast;
     halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyDirection =
                 pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].keyDirection;
     wpalMemoryCopy(halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyRsc,
-                     pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].keyRsc, 
+                     pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].keyRsc,
                      WDI_MAX_KEY_RSC_LEN);
-    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].paeRole = 
+    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].paeRole =
                      pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].paeRole;
-    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyLength = 
+    halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].keyLength =
                    pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].keyLength;
     wpalMemoryCopy(halSetStaKeyReqMsg.setStaKeyParams.key[keyIndex].key,
-                         pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].key, 
+                         pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[keyIndex].key,
                         WDI_MAX_KEY_LENGTH);
    }
 #else
-  halSetStaKeyReqMsg.setStaKeyParams.key.keyId = 
+  halSetStaKeyReqMsg.setStaKeyParams.key.keyId =
                       pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].keyId;
   halSetStaKeyReqMsg.setStaKeyParams.key.unicast =
                      pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].unicast;
   halSetStaKeyReqMsg.setStaKeyParams.key.keyDirection =
                 pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].keyDirection;
   wpalMemoryCopy(halSetStaKeyReqMsg.setStaKeyParams.key.keyRsc,
-                     pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].keyRsc, 
+                     pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].keyRsc,
                      WDI_MAX_KEY_RSC_LEN);
-  halSetStaKeyReqMsg.setStaKeyParams.key.paeRole = 
+  halSetStaKeyReqMsg.setStaKeyParams.key.paeRole =
                      pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].paeRole;
-  halSetStaKeyReqMsg.setStaKeyParams.key.keyLength = 
+  halSetStaKeyReqMsg.setStaKeyParams.key.keyLength =
                    pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].keyLength;
   wpalMemoryCopy(halSetStaKeyReqMsg.setStaKeyParams.key.key,
-                         pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].key, 
+                         pwdiSetSTAKeyParams->wdiKeyInfo.wdiKey[0].key,
                         WDI_MAX_KEY_LENGTH);
 #endif
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                    &halSetStaKeyReqMsg.setStaKeyParams, 
-                    sizeof(halSetStaKeyReqMsg.setStaKeyParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                    &halSetStaKeyReqMsg.setStaKeyParams,
+                    sizeof(halSetStaKeyReqMsg.setStaKeyParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiSetSTAKeyParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiSetSTAKeyParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiSetSTAKeyParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Set STA Key Request to HAL 
+    Send Set STA Key Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiSetSTAKeyRspCb, pEventData->pUserData, 
-                       WDI_SET_STA_KEY_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiSetSTAKeyRspCb, pEventData->pUserData,
+                       WDI_SET_STA_KEY_RESP);
 
 }/*WDI_ProcessSetSTABcastKeyReq*/
 
 /**
- @brief Process Remove STA Key Request function (called when 
+ @brief Process Remove STA Key Request function (called when
         Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessRemoveStaBcastKeyReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -8594,17 +8693,17 @@
   WDI_RemoveSTAKeyReqParamsType*  pwdiRemoveSTABcastKeyParams;
   WDI_RemoveSTAKeyRspCb           wdiRemoveSTAKeyRspCb;
   WDI_BSSSessionType*             pBSSSes                = NULL;
-  wpt_uint8*                      pSendBuffer            = NULL; 
+  wpt_uint8*                      pSendBuffer            = NULL;
   wpt_uint16                      usDataOffset           = 0;
   wpt_uint16                      usSendSize             = 0;
-  WDI_Status                      wdiStatus              = WDI_STATUS_SUCCESS; 
+  WDI_Status                      wdiStatus              = WDI_STATUS_SUCCESS;
   wpt_macAddr                     macBSSID;
   wpt_uint8                       ucCurrentBSSSesIdx;
   tRemoveStaKeyReqMsg             halRemoveStaBcastKeyReqMsg = {{0}};
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
  if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -8612,52 +8711,54 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiRemoveSTABcastKeyParams = (WDI_RemoveSTAKeyReqParamsType*)pEventData->pEventData;
   wdiRemoveSTAKeyRspCb   = (WDI_RemoveSTAKeyRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
     Find the BSS for which the request is made and identify WDI session
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                             pwdiRemoveSTABcastKeyParams->wdiKeyInfo.ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                             pwdiRemoveSTABcastKeyParams->wdiKeyInfo.ucSTAIdx,
                              &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
-  if ( NULL == pBSSSes ) 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+              "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
- 
+
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR, 
+               __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
@@ -8666,7 +8767,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_RMV_STA_BCAST_KEY_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_RMV_STA_BCAST_KEY_REQ,
                         sizeof(halRemoveStaBcastKeyReqMsg.removeStaKeyParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halRemoveStaBcastKeyReqMsg.removeStaKeyParams) )))
@@ -8675,76 +8776,76 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiRemoveSTABcastKeyParams, wdiRemoveSTAKeyRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-----------------------------------------------------------------------
     Copy the Key parameters into the HAL message
   -----------------------------------------------------------------------*/
 
-  halRemoveStaBcastKeyReqMsg.removeStaKeyParams.staIdx = 
+  halRemoveStaBcastKeyReqMsg.removeStaKeyParams.staIdx =
       pwdiRemoveSTABcastKeyParams->wdiKeyInfo.ucSTAIdx;
 
-  halRemoveStaBcastKeyReqMsg.removeStaKeyParams.encType = 
+  halRemoveStaBcastKeyReqMsg.removeStaKeyParams.encType =
       WDI_2_HAL_ENC_TYPE (pwdiRemoveSTABcastKeyParams->wdiKeyInfo.wdiEncType);
 
-  halRemoveStaBcastKeyReqMsg.removeStaKeyParams.keyId = 
+  halRemoveStaBcastKeyReqMsg.removeStaKeyParams.keyId =
       pwdiRemoveSTABcastKeyParams->wdiKeyInfo.ucKeyId;
 
-  halRemoveStaBcastKeyReqMsg.removeStaKeyParams.unicast = 
+  halRemoveStaBcastKeyReqMsg.removeStaKeyParams.unicast =
       pwdiRemoveSTABcastKeyParams->wdiKeyInfo.ucUnicast;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                    &halRemoveStaBcastKeyReqMsg.removeStaKeyParams, 
-                    sizeof(halRemoveStaBcastKeyReqMsg.removeStaKeyParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                    &halRemoveStaBcastKeyReqMsg.removeStaKeyParams,
+                    sizeof(halRemoveStaBcastKeyReqMsg.removeStaKeyParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiRemoveSTABcastKeyParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiRemoveSTABcastKeyParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiRemoveSTABcastKeyParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Remove STA Key Request to HAL 
+    Send Remove STA Key Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiRemoveSTAKeyRspCb, pEventData->pUserData,
-                       WDI_RMV_STA_KEY_RESP); 
+                       WDI_RMV_STA_KEY_RESP);
 
 }/*WDI_ProcessRemoveSTABcastKeyReq*/
 
 /*==========================================================================
-                   QOS and BA PROCESSING REQUEST API 
+                   QOS and BA PROCESSING REQUEST API
 ==========================================================================*/
 /**
  @brief Process Add TSpec Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessAddTSpecReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_AddTSReqParamsType*  pwdiAddTSParams;
   WDI_AddTsRspCb           wdiAddTSRspCb;
-  wpt_uint8                ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*      pBSSSes             = NULL;
-  wpt_uint8*               pSendBuffer         = NULL; 
+  wpt_uint8*               pSendBuffer         = NULL;
   wpt_uint16               usDataOffset        = 0;
   wpt_uint16               usSendSize          = 0;
-  WDI_Status               wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status               wdiStatus           = WDI_STATUS_SUCCESS;
   wpt_macAddr              macBSSID;
   tAddTsParams             halAddTsParams      = {0};
-  
+
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -8752,62 +8853,64 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiAddTSParams = (WDI_AddTSReqParamsType*)pEventData->pEventData;
   wdiAddTSRspCb   = (WDI_AddTsRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
     Find the BSS for which the request is made and identify WDI session
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                                        pwdiAddTSParams->wdiTsInfo.ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                                        pwdiAddTSParams->wdiTsInfo.ucSTAIdx,
                                         &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
-  if ( NULL == pBSSSes ) 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+              "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
- 
+
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR,
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
   wpalMutexRelease(&pWDICtx->wptMutex);
   /*-----------------------------------------------------------------------
     Get message buffer
-    ! TO DO : proper conversion into the HAL Message Request Format 
+    ! TO DO : proper conversion into the HAL Message Request Format
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_ADD_TS_REQ, 
-                                                    sizeof(halAddTsParams), 
-                                                    &pSendBuffer, &usDataOffset, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_ADD_TS_REQ,
+                                                    sizeof(halAddTsParams),
+                                                    &pSendBuffer, &usDataOffset,
                                                     &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halAddTsParams) )))
   {
@@ -8815,7 +8918,7 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiAddTSParams, wdiAddTSRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   halAddTsParams.staIdx = pwdiAddTSParams->wdiTsInfo.ucSTAIdx;
@@ -8824,104 +8927,104 @@
   //TSPEC IE
   halAddTsParams.tspec.type = pwdiAddTSParams->wdiTsInfo.wdiTspecIE.ucType;
   halAddTsParams.tspec.length = pwdiAddTSParams->wdiTsInfo.wdiTspecIE.ucLength;
-  halAddTsParams.tspec.nomMsduSz = 
+  halAddTsParams.tspec.nomMsduSz =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.usNomMsduSz;
-  halAddTsParams.tspec.maxMsduSz = 
+  halAddTsParams.tspec.maxMsduSz =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.usMaxMsduSz;
-  halAddTsParams.tspec.minSvcInterval = 
+  halAddTsParams.tspec.minSvcInterval =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.uMinSvcInterval;
-  halAddTsParams.tspec.maxSvcInterval = 
+  halAddTsParams.tspec.maxSvcInterval =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.uMaxSvcInterval;
-  halAddTsParams.tspec.inactInterval = 
+  halAddTsParams.tspec.inactInterval =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.uInactInterval;
-  halAddTsParams.tspec.suspendInterval = 
+  halAddTsParams.tspec.suspendInterval =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.uSuspendInterval;
-  halAddTsParams.tspec.svcStartTime = 
+  halAddTsParams.tspec.svcStartTime =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.uSvcStartTime;
-  halAddTsParams.tspec.minDataRate = 
+  halAddTsParams.tspec.minDataRate =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.uMinDataRate;
-  halAddTsParams.tspec.meanDataRate = 
+  halAddTsParams.tspec.meanDataRate =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.uMeanDataRate;
-  halAddTsParams.tspec.peakDataRate = 
+  halAddTsParams.tspec.peakDataRate =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.uPeakDataRate;
-  halAddTsParams.tspec.maxBurstSz = 
+  halAddTsParams.tspec.maxBurstSz =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.uMaxBurstSz;
-  halAddTsParams.tspec.delayBound = 
+  halAddTsParams.tspec.delayBound =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.uDelayBound;
-  halAddTsParams.tspec.minPhyRate = 
+  halAddTsParams.tspec.minPhyRate =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.uMinPhyRate;
-  halAddTsParams.tspec.surplusBw = 
+  halAddTsParams.tspec.surplusBw =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.usSurplusBw;
-  halAddTsParams.tspec.mediumTime = 
+  halAddTsParams.tspec.mediumTime =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.usMediumTime;
 
   //TSPEC IE : TS INFO : TRAFFIC
-  halAddTsParams.tspec.tsinfo.traffic.ackPolicy = 
+  halAddTsParams.tspec.tsinfo.traffic.ackPolicy =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.wdiTSinfo.wdiTraffic.accessPolicy;
-  halAddTsParams.tspec.tsinfo.traffic.userPrio = 
+  halAddTsParams.tspec.tsinfo.traffic.userPrio =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.wdiTSinfo.wdiTraffic.userPrio;
-  halAddTsParams.tspec.tsinfo.traffic.psb = 
+  halAddTsParams.tspec.tsinfo.traffic.psb =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.wdiTSinfo.wdiTraffic.psb;
-  halAddTsParams.tspec.tsinfo.traffic.aggregation = 
+  halAddTsParams.tspec.tsinfo.traffic.aggregation =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.wdiTSinfo.wdiTraffic.aggregation;
-  halAddTsParams.tspec.tsinfo.traffic.direction = 
+  halAddTsParams.tspec.tsinfo.traffic.direction =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.wdiTSinfo.wdiTraffic.direction;
-  halAddTsParams.tspec.tsinfo.traffic.tsid = 
+  halAddTsParams.tspec.tsinfo.traffic.tsid =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.wdiTSinfo.wdiTraffic.tsid;
-  halAddTsParams.tspec.tsinfo.traffic.trafficType = 
+  halAddTsParams.tspec.tsinfo.traffic.trafficType =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.wdiTSinfo.wdiTraffic.trafficType;
 
   //TSPEC IE : TS INFO : SCHEDULE
-  halAddTsParams.tspec.tsinfo.schedule.rsvd = 
+  halAddTsParams.tspec.tsinfo.schedule.rsvd =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.wdiTSinfo.wdiSchedule.rsvd;
-  halAddTsParams.tspec.tsinfo.schedule.schedule = 
+  halAddTsParams.tspec.tsinfo.schedule.schedule =
      pwdiAddTSParams->wdiTsInfo.wdiTspecIE.wdiTSinfo.wdiSchedule.schedule;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halAddTsParams, 
-                  sizeof(halAddTsParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halAddTsParams,
+                  sizeof(halAddTsParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiAddTSParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiAddTSParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiAddTSParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Add TS Request to HAL 
+    Send Add TS Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiAddTSRspCb, pEventData->pUserData,
-                       WDI_ADD_TS_RESP); 
+                       WDI_ADD_TS_RESP);
 }/*WDI_ProcessAddTSpecReq*/
 
 
 /**
  @brief Process Del TSpec Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessDelTSpecReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_DelTSReqParamsType*      pwdiDelTSParams;
   WDI_DelTsRspCb               wdiDelTSRspCb;
-  wpt_uint8                    ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                    ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*          pBSSSes             = NULL;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
-  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -8929,7 +9032,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiDelTSParams = (WDI_DelTSReqParamsType*)pEventData->pEventData;
@@ -8937,47 +9040,49 @@
 
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
-                           pwdiDelTSParams->wdiDelTSInfo.macBSSID, 
-                          &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
+                           pwdiDelTSParams->wdiDelTSInfo.macBSSID,
+                          &pBSSSes);
 
-  if ( NULL == pBSSSes ) 
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
-
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+            "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+            __func__, MAC_ADDR_ARRAY(pwdiDelTSParams->wdiDelTSInfo.macBSSID));
+    
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(pwdiDelTSParams->wdiDelTSInfo.macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
   wpalMutexRelease(&pWDICtx->wptMutex);
   /*-----------------------------------------------------------------------
     Get message buffer
-    ! TO DO : proper conversion into the HAL Message Request Format 
+    ! TO DO : proper conversion into the HAL Message Request Format
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_DEL_TS_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_DEL_TS_REQ,
                         sizeof(pwdiDelTSParams->wdiDelTSInfo),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(pwdiDelTSParams->wdiDelTSInfo) )))
@@ -8986,52 +9091,52 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiDelTSParams, wdiDelTSRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &pwdiDelTSParams->wdiDelTSInfo, 
-                  sizeof(pwdiDelTSParams->wdiDelTSInfo)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &pwdiDelTSParams->wdiDelTSInfo,
+                  sizeof(pwdiDelTSParams->wdiDelTSInfo));
 
   pWDICtx->wdiReqStatusCB     = pwdiDelTSParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiDelTSParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiDelTSParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Del TS Request to HAL 
+    Send Del TS Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiDelTSRspCb, pEventData->pUserData, WDI_DEL_TS_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiDelTSRspCb, pEventData->pUserData, WDI_DEL_TS_RESP);
 }/*WDI_ProcessDelTSpecReq*/
 
 /**
  @brief Process Update EDCA Params Request function (called when
         Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateEDCAParamsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_UpdateEDCAParamsType*    pwdiUpdateEDCAParams;
   WDI_UpdateEDCAParamsRspCb    wdiUpdateEDCARspCb;
-  wpt_uint8                    ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                    ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*          pBSSSes             = NULL;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset         = 0;
   wpt_uint16                   usSendSize           = 0;
-  WDI_Status                   wdiStatus; 
+  WDI_Status                   wdiStatus;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -9039,54 +9144,56 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiUpdateEDCAParams = (WDI_UpdateEDCAParamsType*)pEventData->pEventData;
   wdiUpdateEDCARspCb   = (WDI_UpdateEDCAParamsRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSessionByBSSIdx( pWDICtx, 
-                           pwdiUpdateEDCAParams->wdiEDCAInfo.ucBssIdx, 
-                          &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSessionByBSSIdx( pWDICtx,
+                           pwdiUpdateEDCAParams->wdiEDCAInfo.ucBssIdx,
+                          &pBSSSes);
 
-  if ( NULL == pBSSSes ) 
+  if ( NULL == pBSSSes )
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+            "%s: Association sequence for this BSS does not yet exist. ucBssIdx %d", 
+            __func__, pwdiUpdateEDCAParams->wdiEDCAInfo.ucBssIdx);
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. ucBssIdx %d",
+              __func__, pwdiUpdateEDCAParams->wdiEDCAInfo.ucBssIdx);
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
   wpalMutexRelease(&pWDICtx->wptMutex);
   /*-----------------------------------------------------------------------
     Get message buffer
-    ! TO DO : proper conversion into the HAL Message Request Format 
+    ! TO DO : proper conversion into the HAL Message Request Format
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPD_EDCA_PRMS_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPD_EDCA_PRMS_REQ,
                         sizeof(pwdiUpdateEDCAParams->wdiEDCAInfo),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(pwdiUpdateEDCAParams->wdiEDCAInfo) )))
@@ -9095,56 +9202,56 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiUpdateEDCAParams, wdiUpdateEDCARspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &pwdiUpdateEDCAParams->wdiEDCAInfo, 
-                  sizeof(pwdiUpdateEDCAParams->wdiEDCAInfo)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &pwdiUpdateEDCAParams->wdiEDCAInfo,
+                  sizeof(pwdiUpdateEDCAParams->wdiEDCAInfo));
 
   pWDICtx->wdiReqStatusCB     = pwdiUpdateEDCAParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiUpdateEDCAParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiUpdateEDCAParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Update EDCA Params Request to HAL 
+    Send Update EDCA Params Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiUpdateEDCARspCb, pEventData->pUserData, 
-                       WDI_UPD_EDCA_PRMS_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiUpdateEDCARspCb, pEventData->pUserData,
+                       WDI_UPD_EDCA_PRMS_RESP);
 }/*WDI_ProcessUpdateEDCAParamsReq*/
 
 /**
- @brief Process Add BA Request function (called when Main FSM 
+ @brief Process Add BA Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessAddBASessionReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_AddBASessionReqParamsType*  pwdiAddBASessionParams;
   WDI_AddBASessionRspCb           wdiAddBASessionRspCb;
-  wpt_uint8                       ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                       ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*             pBSSSes             = NULL;
-  wpt_uint8*                      pSendBuffer         = NULL; 
+  wpt_uint8*                      pSendBuffer         = NULL;
   wpt_uint16                      usDataOffset        = 0;
   wpt_uint16                      usSendSize          = 0;
-  WDI_Status                      wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status                      wdiStatus           = WDI_STATUS_SUCCESS;
   wpt_macAddr                     macBSSID;
 
   tAddBASessionReqMsg             halAddBASessionReq;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -9152,56 +9259,58 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  pwdiAddBASessionParams = 
+  pwdiAddBASessionParams =
                   (WDI_AddBASessionReqParamsType*)pEventData->pEventData;
-  wdiAddBASessionRspCb = 
+  wdiAddBASessionRspCb =
                   (WDI_AddBASessionRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                   pwdiAddBASessionParams->wdiBASessionInfoType.ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                   pwdiAddBASessionParams->wdiBASessionInfoType.ucSTAIdx,
                    &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
 
-  if ( NULL == pBSSSes ) 
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
-
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+          "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+          __func__, MAC_ADDR_ARRAY(macBSSID));
+      
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR, 
+               __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
@@ -9209,18 +9318,18 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, 
-                        WDI_ADD_BA_SESSION_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,
+                        WDI_ADD_BA_SESSION_REQ,
                         sizeof(halAddBASessionReq.addBASessionParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
-      ( usSendSize < 
+      ( usSendSize <
             (usDataOffset + sizeof(halAddBASessionReq.addBASessionParams) )))
   {
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
               "Unable to get send buffer in Add BA session req %x %x %x",
                 pEventData, pwdiAddBASessionParams, wdiAddBASessionRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   halAddBASessionReq.addBASessionParams.staIdx =
@@ -9241,52 +9350,52 @@
   halAddBASessionReq.addBASessionParams.baDirection =
                   pwdiAddBASessionParams->wdiBASessionInfoType.ucBaDirection;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halAddBASessionReq.addBASessionParams, 
-                  sizeof(halAddBASessionReq.addBASessionParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halAddBASessionReq.addBASessionParams,
+                  sizeof(halAddBASessionReq.addBASessionParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiAddBASessionParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiAddBASessionParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiAddBASessionParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Start Request to HAL 
+    Send Start Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiAddBASessionRspCb, pEventData->pUserData, 
-                        WDI_ADD_BA_SESSION_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiAddBASessionRspCb, pEventData->pUserData,
+                        WDI_ADD_BA_SESSION_RESP);
 }/*WDI_ProcessAddBASessionReq*/
 
 /**
- @brief Process Del BA Request function (called when Main FSM 
+ @brief Process Del BA Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessDelBAReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_DelBAReqParamsType*      pwdiDelBAParams;
   WDI_DelBARspCb               wdiDelBARspCb;
-  wpt_uint8                    ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                    ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*          pBSSSes             = NULL;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
-  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS;
   wpt_macAddr                  macBSSID;
   tDelBAParams                 halDelBAparam;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -9294,57 +9403,59 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiDelBAParams = (WDI_DelBAReqParamsType*)pEventData->pEventData;
   wdiDelBARspCb   = (WDI_DelBARspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                                     pwdiDelBAParams->wdiBAInfo.ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                                     pwdiDelBAParams->wdiBAInfo.ucSTAIdx,
                                      &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
 
-  if ( NULL == pBSSSes ) 
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+            "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+            __func__, MAC_ADDR_ARRAY(macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR,
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
   wpalMutexRelease(&pWDICtx->wptMutex);
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_DEL_BA_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_DEL_BA_REQ,
                         sizeof(halDelBAparam),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halDelBAparam) )))
@@ -9353,25 +9464,25 @@
               "Unable to get send buffer for DEL BA req %x %x %x",
                 pEventData, pwdiDelBAParams, wdiDelBARspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   halDelBAparam.staIdx = pwdiDelBAParams->wdiBAInfo.ucSTAIdx;
   halDelBAparam.baTID = pwdiDelBAParams->wdiBAInfo.ucBaTID;
   halDelBAparam.baDirection = pwdiDelBAParams->wdiBAInfo.ucBaDirection;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halDelBAparam, 
-                  sizeof(halDelBAparam)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halDelBAparam,
+                  sizeof(halDelBAparam));
 
   pWDICtx->wdiReqStatusCB     = pwdiDelBAParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiDelBAParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiDelBAParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Start Request to HAL 
+    Send Start Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiDelBARspCb, pEventData->pUserData, WDI_DEL_BA_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiDelBARspCb, pEventData->pUserData, WDI_DEL_BA_RESP);
 }/*WDI_ProcessDelBAReq*/
 
 #ifdef FEATURE_WLAN_CCX
@@ -9418,8 +9529,9 @@
   ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, pwdiTSMParams->wdiTsmStatsParamsInfo.bssid, &pBSSSes); 
   if ( NULL == pBSSSes ) 
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+            "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+            __func__, MAC_ADDR_ARRAY(pwdiTSMParams->wdiTsmStatsParamsInfo.bssid));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
     return WDI_STATUS_E_NOT_ALLOWED; 
@@ -9431,8 +9543,9 @@
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(pwdiTSMParams->wdiTsmStatsParamsInfo.bssid));
 
     wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
     wpalMutexRelease(&pWDICtx->wptMutex);
@@ -9479,31 +9592,31 @@
 
 
 /**
- @brief Process Flush AC Request function (called when Main FSM 
+ @brief Process Flush AC Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessFlushAcReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_FlushAcReqParamsType*    pwdiFlushAcParams = NULL;
    WDI_FlushAcRspCb             wdiFlushAcRspCb;
-   wpt_uint8*                   pSendBuffer         = NULL; 
+   wpt_uint8*                   pSendBuffer         = NULL;
    wpt_uint16                   usDataOffset        = 0;
    wpt_uint16                   usSendSize          = 0;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
        ( NULL == pEventData->pCBfnc ))
@@ -9511,16 +9624,16 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    pwdiFlushAcParams = (WDI_FlushAcReqParamsType*)pEventData->pEventData;
    wdiFlushAcRspCb   = (WDI_FlushAcRspCb)pEventData->pCBfnc;
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_FLUSH_AC_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_FLUSH_AC_REQ,
                          sizeof(pwdiFlushAcParams->wdiFlushAcInfo),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(pwdiFlushAcParams->wdiFlushAcInfo) )))
@@ -9529,43 +9642,43 @@
                "Unable to get send buffer in set bss key req %x %x %x",
                  pEventData, pwdiFlushAcParams, wdiFlushAcRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &pwdiFlushAcParams->wdiFlushAcInfo, 
-                   sizeof(pwdiFlushAcParams->wdiFlushAcInfo)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &pwdiFlushAcParams->wdiFlushAcInfo,
+                   sizeof(pwdiFlushAcParams->wdiFlushAcInfo));
 
    pWDICtx->wdiReqStatusCB     = pwdiFlushAcParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiFlushAcParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiFlushAcParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Start Request to HAL 
+     Send Start Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiFlushAcRspCb, pEventData->pUserData, WDI_FLUSH_AC_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiFlushAcRspCb, pEventData->pUserData, WDI_FLUSH_AC_RESP);
 }/*WDI_ProcessFlushAcReq*/
 
 /**
- @brief Process BT AMP event Request function (called when Main 
+ @brief Process BT AMP event Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessBtAmpEventReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_BtAmpEventParamsType*    pwdiBtAmpEventParams = NULL;
    WDI_BtAmpEventRspCb          wdiBtAmpEventRspCb;
-   wpt_uint8*                   pSendBuffer         = NULL; 
+   wpt_uint8*                   pSendBuffer         = NULL;
    wpt_uint16                   usDataOffset        = 0;
    wpt_uint16                   usSendSize          = 0;
 
@@ -9573,7 +9686,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
        ( NULL == pEventData->pCBfnc ))
@@ -9581,16 +9694,16 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    pwdiBtAmpEventParams = (WDI_BtAmpEventParamsType*)pEventData->pEventData;
    wdiBtAmpEventRspCb   = (WDI_BtAmpEventRspCb)pEventData->pCBfnc;
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_BTAMP_EVENT_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_BTAMP_EVENT_REQ,
                          sizeof(haltBtAmpEventMsg.btAmpEventParams),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(haltBtAmpEventMsg.btAmpEventParams) )))
@@ -9599,52 +9712,52 @@
                "Unable to get send buffer in BT AMP event req %x %x %x",
                  pEventData, pwdiBtAmpEventParams, wdiBtAmpEventRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   haltBtAmpEventMsg.btAmpEventParams.btAmpEventType = 
+   haltBtAmpEventMsg.btAmpEventParams.btAmpEventType =
       pwdiBtAmpEventParams->wdiBtAmpEventInfo.ucBtAmpEventType;
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &haltBtAmpEventMsg.btAmpEventParams, 
-                   sizeof(haltBtAmpEventMsg.btAmpEventParams)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &haltBtAmpEventMsg.btAmpEventParams,
+                   sizeof(haltBtAmpEventMsg.btAmpEventParams));
 
    pWDICtx->wdiReqStatusCB     = pwdiBtAmpEventParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiBtAmpEventParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiBtAmpEventParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Start Request to HAL 
+     Send Start Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiBtAmpEventRspCb, pEventData->pUserData, WDI_BTAMP_EVENT_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiBtAmpEventRspCb, pEventData->pUserData, WDI_BTAMP_EVENT_RESP);
 }/*WDI_ProcessBtAmpEventReq*/
 
 /**
  @brief Process Add STA self Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessAddSTASelfReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_AddSTASelfReqParamsType*          pwdiAddSTASelfReqParams;
   WDI_AddSTASelfParamsRspCb             wdiAddSTASelfReqRspCb;
-  wpt_uint8*                            pSendBuffer         = NULL; 
+  wpt_uint8*                            pSendBuffer         = NULL;
   wpt_uint16                            usDataOffset        = 0;
   wpt_uint16                            usSendSize          = 0;
-  tAddStaSelfParams                     halAddSTASelfParams; 
+  tAddStaSelfParams                     halAddSTASelfParams;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData) ||
@@ -9653,18 +9766,18 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  pwdiAddSTASelfReqParams = 
+  pwdiAddSTASelfReqParams =
     (WDI_AddSTASelfReqParamsType*)pEventData->pEventData;
-  wdiAddSTASelfReqRspCb = 
+  wdiAddSTASelfReqRspCb =
     (WDI_AddSTASelfParamsRspCb)pEventData->pCBfnc;
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, 
-                        WDI_ADD_STA_SELF_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,
+                        WDI_ADD_STA_SELF_REQ,
                         sizeof(tAddStaSelfParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(tAddStaSelfParams) )))
@@ -9673,59 +9786,59 @@
               "Unable to get send buffer in ADD STA SELF REQ %x %x %x",
      pEventData, pwdiAddSTASelfReqParams, wdiAddSTASelfReqRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /* Cache the request for response processing */
-  wpalMemoryCopy(&pWDICtx->wdiCacheAddSTASelfReq, pwdiAddSTASelfReqParams, 
+  wpalMemoryCopy(&pWDICtx->wdiCacheAddSTASelfReq, pwdiAddSTASelfReqParams,
                  sizeof(pWDICtx->wdiCacheAddSTASelfReq));
 
-  wpalMemoryCopy(halAddSTASelfParams.selfMacAddr, 
+  wpalMemoryCopy(halAddSTASelfParams.selfMacAddr,
                    pwdiAddSTASelfReqParams->wdiAddSTASelfInfo.selfMacAddr, 6) ;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, &halAddSTASelfParams, 
-                                         sizeof(tAddStaSelfParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset, &halAddSTASelfParams,
+                                         sizeof(tAddStaSelfParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiAddSTASelfReqParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiAddSTASelfReqParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiAddSTASelfReqParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Update Probe Resp Template Request to HAL 
+    Send Update Probe Resp Template Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiAddSTASelfReqRspCb, pEventData->pUserData, 
-                       WDI_ADD_STA_SELF_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiAddSTASelfReqRspCb, pEventData->pUserData,
+                       WDI_ADD_STA_SELF_RESP);
 }/*WDI_ProcessAddSTASelfReq*/
 
 
 
 /**
- @brief Process Del Sta Self Request function (called when Main 
+ @brief Process Del Sta Self Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessDelSTASelfReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_DelSTASelfReqParamsType*      pwdiDelStaSelfReqParams;
   WDI_DelSTASelfRspCb               wdiDelStaSelfRspCb;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
   tDelStaSelfParams            halSetDelSelfSTAParams;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -9733,69 +9846,145 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  pwdiDelStaSelfReqParams = 
+  pwdiDelStaSelfReqParams =
                  (WDI_DelSTASelfReqParamsType*)pEventData->pEventData;
   wdiDelStaSelfRspCb      = (WDI_DelSTASelfRspCb)pEventData->pCBfnc;
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_DEL_STA_SELF_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_DEL_STA_SELF_REQ,
                          sizeof(pwdiDelStaSelfReqParams->wdiDelStaSelfInfo),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
-    ( usSendSize < 
+    ( usSendSize <
          (usDataOffset + sizeof(pwdiDelStaSelfReqParams->wdiDelStaSelfInfo) )))
    {
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
                "Unable to get send buffer in Del Sta Self req %x %x %x",
                  pEventData, pwdiDelStaSelfReqParams, wdiDelStaSelfRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
   }
 
-  wpalMemoryCopy(halSetDelSelfSTAParams.selfMacAddr, 
+  wpalMemoryCopy(halSetDelSelfSTAParams.selfMacAddr,
                    pwdiDelStaSelfReqParams->wdiDelStaSelfInfo.selfMacAddr, 6) ;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, &halSetDelSelfSTAParams, 
-                                         sizeof(tDelStaSelfParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset, &halSetDelSelfSTAParams,
+                                         sizeof(tDelStaSelfParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiDelStaSelfReqParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiDelStaSelfReqParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiDelStaSelfReqParams->pUserData;
 
   /*-------------------------------------------------------------------------
-     Send Start Request to HAL 
+     Send Start Request to HAL
    -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiDelStaSelfRspCb, pEventData->pUserData, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiDelStaSelfRspCb, pEventData->pUserData,
                                                      WDI_DEL_STA_SELF_RESP);
 
 }
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/**
+ @brief Process Start Oem Data Request function (called when Main 
+        FSM allows it)
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
+ @see
+ @return Result of the function call
+*/
+WDI_Status
+WDI_ProcessStartOemDataReq
+(
+  WDI_ControlBlockType*  pWDICtx,
+  WDI_EventInfoType*     pEventData
+)
+{
+  WDI_oemDataReqParamsType*    pwdiOemDataReqParams = NULL;
+  WDI_oemDataRspCb             wdiOemDataRspCb;
+  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint16                   usDataOffset        = 0;
+  wpt_uint16                   usSendSize          = 0;
+  wpt_uint16                   reqLen;
+  tStartOemDataReqParams*      halStartOemDataReqParams;
+
+  /*-------------------------------------------------------------------------
+  Sanity check
+  -------------------------------------------------------------------------*/
+  if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
+      ( NULL == pEventData->pCBfnc ))
+  {
+      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+                  "%s: Invalid parameters", __FUNCTION__);
+      WDI_ASSERT(0);
+      return WDI_STATUS_E_FAILURE;
+  }
+
+  pwdiOemDataReqParams = (WDI_oemDataReqParamsType*)pEventData->pEventData;
+  wdiOemDataRspCb   = (WDI_oemDataRspCb)pEventData->pCBfnc;
+
+  /*-----------------------------------------------------------------------
+     Get message buffer
+   -----------------------------------------------------------------------*/
+
+  reqLen = sizeof(tStartOemDataReqParams);
+
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, 
+                         WDI_START_OEM_DATA_REQ, reqLen,
+                              &pSendBuffer, &usDataOffset, &usSendSize))||
+        (usSendSize < (usDataOffset + reqLen)))
+  {
+      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
+               "Unable to get send buffer in Start Oem Data req %x %x %x",
+                 pEventData, pwdiOemDataReqParams, wdiOemDataRspCb);
+      WDI_ASSERT(0);
+      return WDI_STATUS_E_FAILURE;
+  }
+
+  //copying WDI OEM DATA REQ PARAMS to shared memory
+  halStartOemDataReqParams = (tStartOemDataReqParams *)(pSendBuffer + usDataOffset );
+
+  wpalMemoryCopy(&halStartOemDataReqParams->selfMacAddr, &pwdiOemDataReqParams->wdiOemDataReqInfo.selfMacAddr, sizeof(wpt_macAddr));
+  wpalMemoryCopy(&halStartOemDataReqParams->oemDataReq, &pwdiOemDataReqParams->wdiOemDataReqInfo.oemDataReq, OEM_DATA_REQ_SIZE);
+
+  pWDICtx->wdiReqStatusCB     = pwdiOemDataReqParams->wdiReqStatusCB;
+  pWDICtx->pReqStatusUserData = pwdiOemDataReqParams->pUserData; 
+
+  /*-------------------------------------------------------------------------
+    Send Start Request to HAL
+  -------------------------------------------------------------------------*/
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+                        wdiOemDataRspCb, pEventData->pUserData, 
+                                            WDI_START_OEM_DATA_RESP); 
+}/*WDI_ProcessStartOemDataReq*/
+#endif
 
 /**
- @brief Process Host Resume Request function (called when Main 
+ @brief Process Host Resume Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessHostResumeReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_ResumeParamsType*          pwdiHostResumeParams = NULL;
   WDI_HostResumeEventRspCb       wdiHostResumeRspCb;
-  wpt_uint8*                     pSendBuffer         = NULL; 
+  wpt_uint8*                     pSendBuffer         = NULL;
   wpt_uint16                     usDataOffset        = 0;
   wpt_uint16                     usSendSize          = 0;
   tHalWlanHostResumeReqParam     halResumeReqParams;
@@ -9803,7 +9992,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-  Sanity check 
+  Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -9811,7 +10000,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
                "%s: Invalid parameters ",__FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
   }
 
    pwdiHostResumeParams = (WDI_ResumeParamsType*)pEventData->pEventData;
@@ -9820,63 +10009,63 @@
   /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,
                          WDI_HOST_RESUME_REQ, sizeof(halResumeReqParams),
                               &pSendBuffer, &usDataOffset, &usSendSize))||
         (usSendSize < (usDataOffset + sizeof(halResumeReqParams))))
   {
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
-               "Unable to get send buffer in Start In Nav Meas req %x %x %x",
+               "Unable to get send buffer in Start Oem Data req %x %x %x",
                  pEventData, pwdiHostResumeParams, wdiHostResumeRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
   }
 
-  halResumeReqParams.configuredMcstBcstFilterSetting = 
+  halResumeReqParams.configuredMcstBcstFilterSetting =
      pwdiHostResumeParams->wdiResumeParams.ucConfiguredMcstBcstFilterSetting;
-       
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halResumeReqParams, 
-                  sizeof(halResumeReqParams)); 
+
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halResumeReqParams,
+                  sizeof(halResumeReqParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiHostResumeParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiHostResumeParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiHostResumeParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Start Request to HAL 
+    Send Start Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiHostResumeRspCb, pEventData->pUserData, 
-                                            WDI_HOST_RESUME_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiHostResumeRspCb, pEventData->pUserData,
+                                            WDI_HOST_RESUME_RESP);
 }/*WDI_ProcessHostResumeReq*/
 
 /**
- @brief Process set Tx Per Tracking Parameters Request function (called 
+ @brief Process set Tx Per Tracking Parameters Request function (called
         when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetTxPerTrackingReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_SetTxPerTrackingReqParamsType* pwdiSetTxPerTrackingReqParams = NULL;
    WDI_SetTxPerTrackingRspCb          pwdiSetTxPerTrackingRspCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    tHalTxPerTrackingReqParam     halTxPerTrackingReqParam;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
        ( NULL == pEventData->pCBfnc ))
@@ -9884,17 +10073,17 @@
        WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters ",__FUNCTION__);
        WDI_ASSERT(0);
-       return WDI_STATUS_E_FAILURE; 
+       return WDI_STATUS_E_FAILURE;
    }
 
    pwdiSetTxPerTrackingReqParams = (WDI_SetTxPerTrackingReqParamsType*)pEventData->pEventData;
    pwdiSetTxPerTrackingRspCb   = (WDI_SetTxPerTrackingRspCb)pEventData->pCBfnc;
-   
+
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_TX_PER_TRACKING_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_TX_PER_TRACKING_REQ,
                          sizeof(halTxPerTrackingReqParam),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(halTxPerTrackingReqParam) )))
@@ -9903,26 +10092,26 @@
                   "Unable to get send buffer in set tx per tracking req %x %x %x",
                   pEventData, pwdiSetTxPerTrackingReqParams, pwdiSetTxPerTrackingRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
-   
+
    halTxPerTrackingReqParam.ucTxPerTrackingEnable = pwdiSetTxPerTrackingReqParams->wdiTxPerTrackingParam.ucTxPerTrackingEnable;
    halTxPerTrackingReqParam.ucTxPerTrackingPeriod = pwdiSetTxPerTrackingReqParams->wdiTxPerTrackingParam.ucTxPerTrackingPeriod;
    halTxPerTrackingReqParam.ucTxPerTrackingRatio = pwdiSetTxPerTrackingReqParams->wdiTxPerTrackingParam.ucTxPerTrackingRatio;
    halTxPerTrackingReqParam.uTxPerTrackingWatermark = pwdiSetTxPerTrackingReqParams->wdiTxPerTrackingParam.uTxPerTrackingWatermark;
-      
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &halTxPerTrackingReqParam, 
-                   sizeof(halTxPerTrackingReqParam)); 
+
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &halTxPerTrackingReqParam,
+                   sizeof(halTxPerTrackingReqParam));
 
    pWDICtx->wdiReqStatusCB     = pwdiSetTxPerTrackingReqParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiSetTxPerTrackingReqParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiSetTxPerTrackingReqParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        pwdiSetTxPerTrackingRspCb, pEventData->pUserData, WDI_SET_TX_PER_TRACKING_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        pwdiSetTxPerTrackingRspCb, pEventData->pUserData, WDI_SET_TX_PER_TRACKING_RESP);
 }/*WDI_ProcessSetTxPerTrackingReq*/
 
 /*=========================================================================
@@ -9931,22 +10120,22 @@
 
 /**
  @brief Process Suspend Indications function (called when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessHostSuspendInd
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_SuspendParamsType          *pSuspendIndParams;
-  wpt_uint8*                     pSendBuffer         = NULL; 
+  wpt_uint8*                     pSendBuffer         = NULL;
   wpt_uint16                     usDataOffset        = 0;
   wpt_uint16                     usSendSize          = 0;
   WDI_Status                     wdiStatus;
@@ -9954,14 +10143,14 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ))
   {
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
                "%s: Invalid parameters in Suspend ind",__FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
   }
 
   pSuspendIndParams = (WDI_SuspendParamsType *)pEventData->pEventData;
@@ -9969,8 +10158,8 @@
    /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, 
-                         WDI_HOST_SUSPEND_IND, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,
+                         WDI_HOST_SUSPEND_IND,
                      sizeof(halWlanSuspendIndparams),
                      &pSendBuffer, &usDataOffset, &usSendSize))||
         (usSendSize < (usDataOffset + sizeof(halWlanSuspendIndparams))))
@@ -9978,58 +10167,58 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
                   "Unable to get send buffer in Suspend Ind ");
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
   }
 
   halWlanSuspendIndparams.configuredMcstBcstFilterSetting =
        pSuspendIndParams->wdiSuspendParams.ucConfiguredMcstBcstFilterSetting;
 
-  halWlanSuspendIndparams.activeSessionCount = 
+  halWlanSuspendIndparams.activeSessionCount =
        WDI_GetActiveSessionsCount(pWDICtx);
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, &halWlanSuspendIndparams, 
-                                         sizeof(tHalWlanHostSuspendIndParam)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset, &halWlanSuspendIndparams,
+                                         sizeof(tHalWlanHostSuspendIndParam));
 
   /*-------------------------------------------------------------------------
-    Send Suspend Request to HAL 
+    Send Suspend Request to HAL
   -------------------------------------------------------------------------*/
   pWDICtx->wdiReqStatusCB     = pSuspendIndParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pSuspendIndParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pSuspendIndParams->pUserData;
 
-  wdiStatus = WDI_SendIndication( pWDICtx, pSendBuffer, usSendSize); 
+  wdiStatus = WDI_SendIndication( pWDICtx, pSendBuffer, usSendSize);
   return  ( wdiStatus != WDI_STATUS_SUCCESS )?wdiStatus:WDI_STATUS_SUCCESS_SYNC;
 }/*WDI_ProcessHostSuspendInd*/
 
 /*==========================================================================
-                  MISC CONTROL PROCESSING REQUEST API 
+                  MISC CONTROL PROCESSING REQUEST API
 ==========================================================================*/
 /**
- @brief Process Channel Switch Request function (called when 
+ @brief Process Channel Switch Request function (called when
         Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessChannelSwitchReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_SwitchChReqParamsType*   pwdiSwitchChParams;
   WDI_SwitchChRspCb            wdiSwitchChRspCb;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
   tSwitchChannelReqMsg         halSwitchChannelReq = {{0}};
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -10037,16 +10226,16 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiSwitchChParams = (WDI_SwitchChReqParamsType*)pEventData->pEventData;
   wdiSwitchChRspCb   = (WDI_SwitchChRspCb)pEventData->pCBfnc;
   /*-----------------------------------------------------------------------
     Get message buffer
-    ! TO DO : proper conversion into the HAL Message Request Format 
+    ! TO DO : proper conversion into the HAL Message Request Format
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_CH_SWITCH_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_CH_SWITCH_REQ,
                         sizeof(halSwitchChannelReq.switchChannelParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halSwitchChannelReq.switchChannelParams) )))
@@ -10055,21 +10244,21 @@
               "Unable to get send buffer in channel switch req %x %x %x",
                 pEventData, pwdiSwitchChParams, wdiSwitchChRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  halSwitchChannelReq.switchChannelParams.channelNumber = 
+  halSwitchChannelReq.switchChannelParams.channelNumber =
                        pwdiSwitchChParams->wdiChInfo.ucChannel;
-#ifndef WLAN_FEATURE_VOWIFI    
-  halSwitchChannelReq.switchChannelParams.localPowerConstraint = 
+#ifndef WLAN_FEATURE_VOWIFI
+  halSwitchChannelReq.switchChannelParams.localPowerConstraint =
                        pwdiSwitchChParams->wdiChInfo.ucLocalPowerConstraint;
 #endif
-  halSwitchChannelReq.switchChannelParams.secondaryChannelOffset = 
+  halSwitchChannelReq.switchChannelParams.secondaryChannelOffset =
                        pwdiSwitchChParams->wdiChInfo.wdiSecondaryChannelOffset;
 
 #ifdef WLAN_FEATURE_VOWIFI
   halSwitchChannelReq.switchChannelParams.maxTxPower
-                            = pwdiSwitchChParams->wdiChInfo.cMaxTxPower; 
+                            = pwdiSwitchChParams->wdiChInfo.cMaxTxPower;
   wpalMemoryCopy(halSwitchChannelReq.switchChannelParams.selfStaMacAddr,
                   pwdiSwitchChParams->wdiChInfo.macSelfStaMacAddr,
                   WDI_MAC_ADDR_LEN);
@@ -10077,51 +10266,52 @@
                   pwdiSwitchChParams->wdiChInfo.macBSSId,
                   WDI_MAC_ADDR_LEN);
 #endif
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halSwitchChannelReq.switchChannelParams, 
-                  sizeof(halSwitchChannelReq.switchChannelParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halSwitchChannelReq.switchChannelParams,
+                  sizeof(halSwitchChannelReq.switchChannelParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiSwitchChParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiSwitchChParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiSwitchChParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Switch Channel Request to HAL 
+    Send Switch Channel Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiSwitchChRspCb, pEventData->pUserData, WDI_CH_SWITCH_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiSwitchChRspCb, pEventData->pUserData, WDI_CH_SWITCH_RESP);
 }/*WDI_ProcessChannelSwitchReq*/
 
 /**
- @brief Process Config STA Request function (called when Main FSM 
+ @brief Process Config STA Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessConfigStaReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_ConfigSTAReqParamsType*  pwdiConfigSTAParams;
   WDI_ConfigSTARspCb           wdiConfigSTARspCb;
-  wpt_uint8                    ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                    ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*          pBSSSes             = NULL;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
-  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS;
 
-  tConfigStaReqMsg             halConfigStaReqMsg; 
+  tConfigStaReqMsg             halConfigStaReqMsg;
+  wpt_uint16                   uMsgSize            = 0;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -10129,140 +10319,151 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiConfigSTAParams = (WDI_ConfigSTAReqParamsType*)pEventData->pEventData;
   wdiConfigSTARspCb   = (WDI_ConfigSTARspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
-                           pwdiConfigSTAParams->wdiReqInfo.macBSSID, 
-                          &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
+                           pwdiConfigSTAParams->wdiReqInfo.macBSSID,
+                          &pBSSSes);
 
-  if ( NULL == pBSSSes ) 
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+          "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+          __func__, MAC_ADDR_ARRAY(pwdiConfigSTAParams->wdiReqInfo.macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(pwdiConfigSTAParams->wdiReqInfo.macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
   wpalMutexRelease(&pWDICtx->wptMutex);
+  
+  /* Allocation of StaReqMsg Memory Based on Firmware Capabilities */
+#ifdef WLAN_FEATURE_11AC
+  if (WDI_getFwWlanFeatCaps(DOT11AC))
+	  uMsgSize = sizeof(halConfigStaReqMsg.uStaParams.configStaParams_V1); // Version-1 For 11AC
+  else
+#endif
+	  uMsgSize = sizeof(halConfigStaReqMsg.uStaParams.configStaParams); // Version-0 Default
+
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_CONFIG_STA_REQ, 
-                        sizeof(halConfigStaReqMsg.configStaParams),
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_CONFIG_STA_REQ,
+                        uMsgSize,
                         &pSendBuffer, &usDataOffset, &usSendSize))||
-      ( usSendSize < (usDataOffset + sizeof(halConfigStaReqMsg.configStaParams) )))
+      ( usSendSize < (usDataOffset + uMsgSize )))
   {
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
               "Unable to get send buffer in config sta req %x %x %x",
                 pEventData, pwdiConfigSTAParams, wdiConfigSTARspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*Copy the station context*/
-  WDI_CopyWDIStaCtxToHALStaCtx( &halConfigStaReqMsg.configStaParams,
+  WDI_CopyWDIStaCtxToHALStaCtx( &halConfigStaReqMsg.uStaParams.configStaParams,
                                 &pwdiConfigSTAParams->wdiReqInfo);
 
   if(pwdiConfigSTAParams->wdiReqInfo.wdiSTAType == WDI_STA_ENTRY_SELF)
   {
     /* Need to fill in the self STA Index */
-    if ( WDI_STATUS_SUCCESS != 
+    if ( WDI_STATUS_SUCCESS !=
          WDI_STATableFindStaidByAddr(pWDICtx,
                                      pwdiConfigSTAParams->wdiReqInfo.macSTA,
-                                     (wpt_uint8*)&halConfigStaReqMsg.configStaParams.staIdx ))
+                                     (wpt_uint8*)&halConfigStaReqMsg.uStaParams.configStaParams.staIdx ))
     {
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
                "This station does not exist in the WDI Station Table %d");
       wpalMutexRelease(&pWDICtx->wptMutex);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
     }
   }
   else
   {
   /* Need to fill in the STA Index to invalid, since at this point we have not
      yet received it from HAL */
-    halConfigStaReqMsg.configStaParams.staIdx = WDI_STA_INVALID_IDX;
+    halConfigStaReqMsg.uStaParams.configStaParams.staIdx = WDI_STA_INVALID_IDX;
   }
 
   /* Need to fill in the BSS index */
-  halConfigStaReqMsg.configStaParams.bssIdx = pBSSSes->ucBSSIdx;
+  halConfigStaReqMsg.uStaParams.configStaParams.bssIdx = pBSSSes->ucBSSIdx;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halConfigStaReqMsg.configStaParams, 
-                  sizeof(halConfigStaReqMsg.configStaParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halConfigStaReqMsg.uStaParams,
+                  sizeof(halConfigStaReqMsg.uStaParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiConfigSTAParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiConfigSTAParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiConfigSTAParams->pUserData;
 
-  wpalMemoryCopy( &pWDICtx->wdiCachedConfigStaReq, 
-                  pwdiConfigSTAParams, 
+  wpalMemoryCopy( &pWDICtx->wdiCachedConfigStaReq,
+                  pwdiConfigSTAParams,
                   sizeof(pWDICtx->wdiCachedConfigStaReq));
 
   /*-------------------------------------------------------------------------
-    Send Config STA Request to HAL 
+    Send Config STA Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiConfigSTARspCb, pEventData->pUserData, WDI_CONFIG_STA_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiConfigSTARspCb, pEventData->pUserData, WDI_CONFIG_STA_RESP);
 }/*WDI_ProcessConfigStaReq*/
 
 
 /**
- @brief Process Set Link State Request function (called when 
+ @brief Process Set Link State Request function (called when
         Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetLinkStateReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_SetLinkReqParamsType*    pwdiSetLinkParams;
   WDI_SetLinkStateRspCb        wdiSetLinkRspCb;
-  wpt_uint8                    ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                    ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*          pBSSSes             = NULL;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
   WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS;
-  tLinkStateParams             halLinkStateReqMsg; 
+  tLinkStateParams             halLinkStateReqMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -10270,58 +10471,60 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiSetLinkParams = (WDI_SetLinkReqParamsType*)pEventData->pEventData;
   wdiSetLinkRspCb   = (WDI_SetLinkStateRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
-                           pwdiSetLinkParams->wdiLinkInfo.macBSSID, 
-                          &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
+                           pwdiSetLinkParams->wdiLinkInfo.macBSSID,
+                          &pBSSSes);
 
-  if ( NULL == pBSSSes ) 
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
-              "Set link request received outside association session");
+     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+     "%s: Set link request received outside association session. macBSSID " MAC_ADDRESS_STR, 
+     __func__, MAC_ADDR_ARRAY(pwdiSetLinkParams->wdiLinkInfo.macBSSID));
   }
   else
   {
     /*------------------------------------------------------------------------
       Check if this BSS is being currently processed or queued,
-      if queued - queue the new request as well 
+      if queued - queue the new request as well
     ------------------------------------------------------------------------*/
     if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
     {
-      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-                "Association sequence for this BSS exists but currently queued");
-  
-      wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+                "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR, 
+                __func__, MAC_ADDR_ARRAY(pwdiSetLinkParams->wdiLinkInfo.macBSSID));
+
+      wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
       wpalMutexRelease(&pWDICtx->wptMutex);
-      return wdiStatus; 
+      return wdiStatus;
     }
   }
   /* If the link is set to enter IDLE - the Session allocated for this BSS
      will be deleted on the Set Link State response coming from HAL
    - cache the request for response processing */
-  wpalMemoryCopy(&pWDICtx->wdiCacheSetLinkStReq, pwdiSetLinkParams, 
+  wpalMemoryCopy(&pWDICtx->wdiCacheSetLinkStReq, pwdiSetLinkParams,
                  sizeof(pWDICtx->wdiCacheSetLinkStReq));
 
   wpalMutexRelease(&pWDICtx->wptMutex);
   /*-----------------------------------------------------------------------
     Get message buffer
-    ! TO DO : proper conversion into the HAL Message Request Format 
+    ! TO DO : proper conversion into the HAL Message Request Format
   -----------------------------------------------------------------------*/
-  
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_LINK_ST_REQ, 
+
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_LINK_ST_REQ,
                         sizeof(halLinkStateReqMsg),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halLinkStateReqMsg) )))
@@ -10330,7 +10533,7 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiSetLinkParams, wdiSetLinkRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wpalMemoryCopy(halLinkStateReqMsg.bssid,
@@ -10339,55 +10542,55 @@
   wpalMemoryCopy(halLinkStateReqMsg.selfMacAddr,
                  pwdiSetLinkParams->wdiLinkInfo.macSelfStaMacAddr, WDI_MAC_ADDR_LEN);
 
-  halLinkStateReqMsg.state = 
+  halLinkStateReqMsg.state =
      WDI_2_HAL_LINK_STATE(pwdiSetLinkParams->wdiLinkInfo.wdiLinkState);
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halLinkStateReqMsg, 
-                  sizeof(halLinkStateReqMsg)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halLinkStateReqMsg,
+                  sizeof(halLinkStateReqMsg));
 
   pWDICtx->wdiReqStatusCB     = pwdiSetLinkParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiSetLinkParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiSetLinkParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Set Link State Request to HAL 
+    Send Set Link State Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiSetLinkRspCb, pEventData->pUserData, WDI_SET_LINK_ST_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiSetLinkRspCb, pEventData->pUserData, WDI_SET_LINK_ST_RESP);
 }/*WDI_ProcessSetLinkStateReq*/
 
 
 /**
  @brief Process Get Stats Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessGetStatsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_GetStatsReqParamsType*   pwdiGetStatsParams;
   WDI_GetStatsRspCb            wdiGetStatsRspCb;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
-  wpt_uint8                    ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                    ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*          pBSSSes             = NULL;
   wpt_macAddr                  macBSSID;
-  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS;
   tHalStatsReqMsg              halStatsReqMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData) ||
       ( NULL == pEventData->pCBfnc ) )
@@ -10395,7 +10598,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiGetStatsParams = (WDI_GetStatsReqParamsType*)pEventData->pEventData;
@@ -10403,45 +10606,47 @@
 
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                        pwdiGetStatsParams->wdiGetStatsParamsInfo.ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                        pwdiGetStatsParams->wdiGetStatsParamsInfo.ucSTAIdx,
                         &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
-  if ( NULL == pBSSSes ) 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+        "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+        __func__, MAC_ADDR_ARRAY(macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
@@ -10450,7 +10655,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_GET_STATS_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_GET_STATS_REQ,
                         sizeof(halStatsReqMsg.statsReqParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halStatsReqMsg.statsReqParams) )))
@@ -10459,40 +10664,40 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiGetStatsParams, wdiGetStatsRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  halStatsReqMsg.statsReqParams.staId = 
+  halStatsReqMsg.statsReqParams.staId =
                   pwdiGetStatsParams->wdiGetStatsParamsInfo.ucSTAIdx;
-  halStatsReqMsg.statsReqParams.statsMask = 
+  halStatsReqMsg.statsReqParams.statsMask =
                   pwdiGetStatsParams->wdiGetStatsParamsInfo.uStatsMask;
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halStatsReqMsg.statsReqParams, 
-                  sizeof(halStatsReqMsg.statsReqParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halStatsReqMsg.statsReqParams,
+                  sizeof(halStatsReqMsg.statsReqParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiGetStatsParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiGetStatsParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiGetStatsParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Get STA Request to HAL 
+    Send Get STA Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiGetStatsRspCb, pEventData->pUserData, WDI_GET_STATS_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiGetStatsRspCb, pEventData->pUserData, WDI_GET_STATS_RESP);
 }/*WDI_ProcessGetStatsReq*/
 
 /**
- @brief Process Update Cfg Request function (called when Main 
+ @brief Process Update Cfg Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateCfgReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -10500,13 +10705,13 @@
   WDI_UpdateCfgReqParamsType*  pwdiUpdateCfgParams = NULL;
   WDI_UpdateCfgRspCb           wdiUpdateCfgRspCb = NULL;
 
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset         = 0;
   wpt_uint16                   usSendSize          = 0;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc))
@@ -10514,7 +10719,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiUpdateCfgParams = (WDI_UpdateCfgReqParamsType*)pEventData->pEventData;
@@ -10522,10 +10727,10 @@
 
   /*-----------------------------------------------------------------------
     Get message buffer
-    ! TO DO : proper conversion into the HAL Message Request Format 
+    ! TO DO : proper conversion into the HAL Message Request Format
   -----------------------------------------------------------------------*/
 
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPDATE_CFG_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPDATE_CFG_REQ,
                         pwdiUpdateCfgParams->uConfigBufferLen + sizeof(wpt_uint32),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset +  pwdiUpdateCfgParams->uConfigBufferLen)))
@@ -10534,61 +10739,61 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiUpdateCfgParams, wdiUpdateCfgRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &pwdiUpdateCfgParams->uConfigBufferLen, 
-                  sizeof(wpt_uint32)); 
-  wpalMemoryCopy( pSendBuffer+usDataOffset+sizeof(wpt_uint32), 
-                  pwdiUpdateCfgParams->pConfigBuffer, 
-                  pwdiUpdateCfgParams->uConfigBufferLen); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &pwdiUpdateCfgParams->uConfigBufferLen,
+                  sizeof(wpt_uint32));
+  wpalMemoryCopy( pSendBuffer+usDataOffset+sizeof(wpt_uint32),
+                  pwdiUpdateCfgParams->pConfigBuffer,
+                  pwdiUpdateCfgParams->uConfigBufferLen);
 
   pWDICtx->wdiReqStatusCB     = pwdiUpdateCfgParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiUpdateCfgParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiUpdateCfgParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Update Cfg Request to HAL 
+    Send Update Cfg Request to HAL
   -------------------------------------------------------------------------*/
 
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiUpdateCfgRspCb, pEventData->pUserData, WDI_UPDATE_CFG_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiUpdateCfgRspCb, pEventData->pUserData, WDI_UPDATE_CFG_RESP);
 
 }/*WDI_ProcessUpdateCfgReq*/
 
 
 /**
- @brief Process Add BA Request function (called when Main FSM 
+ @brief Process Add BA Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessAddBAReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_AddBAReqParamsType*  pwdiAddBAParams;
   WDI_AddBARspCb           wdiAddBARspCb;
-  wpt_uint8                ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*      pBSSSes             = NULL;
-  wpt_uint8*               pSendBuffer         = NULL; 
+  wpt_uint8*               pSendBuffer         = NULL;
   wpt_uint16               usDataOffset        = 0;
   wpt_uint16               usSendSize          = 0;
-  WDI_Status               wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status               wdiStatus           = WDI_STATUS_SUCCESS;
   wpt_macAddr              macBSSID;
 
   tAddBAReqMsg             halAddBAReq;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData) ||
@@ -10597,7 +10802,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiAddBAParams = (WDI_AddBAReqParamsType*)pEventData->pEventData;
@@ -10605,45 +10810,47 @@
 
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                                  pwdiAddBAParams->wdiBAInfoType.ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                                  pwdiAddBAParams->wdiBAInfoType.ucSTAIdx,
                                   &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
-  if ( NULL == pBSSSes ) 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+            "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+            __func__, MAC_ADDR_ARRAY(macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
@@ -10651,79 +10858,79 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_ADD_BA_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_ADD_BA_REQ,
                         sizeof(halAddBAReq.addBAParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
-      ( usSendSize < 
+      ( usSendSize <
             (usDataOffset + sizeof(halAddBAReq.addBAParams) )))
   {
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
               "Unable to get send buffer in Add BA req %x %x %x",
                 pEventData, pwdiAddBAParams, wdiAddBARspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  halAddBAReq.addBAParams.baSessionID = 
+  halAddBAReq.addBAParams.baSessionID =
                              pwdiAddBAParams->wdiBAInfoType.ucBaSessionID;
   halAddBAReq.addBAParams.winSize = pwdiAddBAParams->wdiBAInfoType.ucWinSize;
 #ifdef FEATURE_ON_CHIP_REORDERING
-  halAddBAReq.addBAParams.isReorderingDoneOnChip = 
+  halAddBAReq.addBAParams.isReorderingDoneOnChip =
                        pwdiAddBAParams->wdiBAInfoType.bIsReorderingDoneOnChip;
 #endif
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halAddBAReq.addBAParams, 
-                  sizeof(halAddBAReq.addBAParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halAddBAReq.addBAParams,
+                  sizeof(halAddBAReq.addBAParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiAddBAParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiAddBAParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiAddBAParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Start Request to HAL 
+    Send Start Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiAddBARspCb, pEventData->pUserData, 
-                        WDI_ADD_BA_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiAddBARspCb, pEventData->pUserData,
+                        WDI_ADD_BA_RESP);
 }/*WDI_ProcessAddBAReq*/
 
 
 
 /**
- @brief Process Trigger BA Request function (called when Main FSM 
+ @brief Process Trigger BA Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessTriggerBAReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_TriggerBAReqParamsType*  pwdiTriggerBAParams;
   WDI_TriggerBARspCb           wdiTriggerBARspCb;
-  wpt_uint8                    ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                    ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*          pBSSSes             = NULL;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
-  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status                   wdiStatus           = WDI_STATUS_SUCCESS;
   wpt_uint16                   index;
   wpt_macAddr                  macBSSID;
-  
+
   tTriggerBAReqMsg               halTriggerBAReq;
   tTriggerBaReqCandidate*        halTriggerBACandidate;
   WDI_TriggerBAReqCandidateType* wdiTriggerBACandidate;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData ) ||
@@ -10732,52 +10939,54 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiTriggerBAParams = (WDI_TriggerBAReqParamsType*)pEventData->pEventData;
   wdiTriggerBARspCb = (WDI_TriggerBARspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                                  pwdiTriggerBAParams->wdiTriggerBAInfoType.ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                                  pwdiTriggerBAParams->wdiTriggerBAInfoType.ucSTAIdx,
                                   &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
-  if ( NULL == pBSSSes ) 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+        "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+        __func__, MAC_ADDR_ARRAY(macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR, 
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
 
@@ -10785,39 +10994,39 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, 
-                  WDI_TRIGGER_BA_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,
+                  WDI_TRIGGER_BA_REQ,
                   sizeof(halTriggerBAReq.triggerBAParams) +
-                  (sizeof(tTriggerBaReqCandidate) * 
+                  (sizeof(tTriggerBaReqCandidate) *
                   pwdiTriggerBAParams->wdiTriggerBAInfoType.usBACandidateCnt),
                   &pSendBuffer, &usDataOffset, &usSendSize))||
-      ( usSendSize < 
+      ( usSendSize <
             (usDataOffset + sizeof(halTriggerBAReq.triggerBAParams)+
-               (sizeof(tTriggerBaReqCandidate) * 
+               (sizeof(tTriggerBaReqCandidate) *
                pwdiTriggerBAParams->wdiTriggerBAInfoType.usBACandidateCnt) )))
   {
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
               "Unable to get send buffer in Trigger BA req %x %x %x",
                 pEventData, pwdiTriggerBAParams, wdiTriggerBARspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  halTriggerBAReq.triggerBAParams.baSessionID = 
+  halTriggerBAReq.triggerBAParams.baSessionID =
                   pwdiTriggerBAParams->wdiTriggerBAInfoType.ucBASessionID;
-  halTriggerBAReq.triggerBAParams.baCandidateCnt = 
+  halTriggerBAReq.triggerBAParams.baCandidateCnt =
                   pwdiTriggerBAParams->wdiTriggerBAInfoType.usBACandidateCnt;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halTriggerBAReq.triggerBAParams, 
-                  sizeof(halTriggerBAReq.triggerBAParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halTriggerBAReq.triggerBAParams,
+                  sizeof(halTriggerBAReq.triggerBAParams));
 
-  wdiTriggerBACandidate = 
+  wdiTriggerBACandidate =
     (WDI_TriggerBAReqCandidateType*)(pwdiTriggerBAParams + 1);
   halTriggerBACandidate = (tTriggerBaReqCandidate*)(pSendBuffer+usDataOffset+
                                  sizeof(halTriggerBAReq.triggerBAParams));
-  
-  for(index = 0 ; index < halTriggerBAReq.triggerBAParams.baCandidateCnt ; 
+
+  for(index = 0 ; index < halTriggerBAReq.triggerBAParams.baCandidateCnt ;
                                                                      index++)
   {
     halTriggerBACandidate->staIdx = wdiTriggerBACandidate->ucSTAIdx;
@@ -10827,14 +11036,14 @@
   }
 
   pWDICtx->wdiReqStatusCB     = pwdiTriggerBAParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiTriggerBAParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiTriggerBAParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Start Request to HAL 
+    Send Start Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiTriggerBARspCb, pEventData->pUserData, 
-                        WDI_TRIGGER_BA_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiTriggerBARspCb, pEventData->pUserData,
+                        WDI_TRIGGER_BA_RESP);
 }/*WDI_ProcessTriggerBAReq*/
 
 
@@ -10842,30 +11051,30 @@
 /**
  @brief Process Update Beacon Params  Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateBeaconParamsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_UpdateBeaconParamsType*  pwdiUpdateBeaconParams;
   WDI_UpdateBeaconParamsRspCb  wdiUpdateBeaconParamsRspCb;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
-  tUpdateBeaconParams          halUpdateBeaconParams; 
+  tUpdateBeaconParams          halUpdateBeaconParams;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData) ||
@@ -10874,7 +11083,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiUpdateBeaconParams = (WDI_UpdateBeaconParamsType*)pEventData->pEventData;
@@ -10882,7 +11091,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPD_BCON_PRMS_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPD_BCON_PRMS_REQ,
                         sizeof(halUpdateBeaconParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halUpdateBeaconParams) )))
@@ -10891,7 +11100,7 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiUpdateBeaconParams, wdiUpdateBeaconParamsRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*BSS Index of the BSS*/
@@ -10899,44 +11108,44 @@
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucBssIdx;
   /*shortPreamble mode. HAL should update all the STA rates when it
     receives this message*/
-  halUpdateBeaconParams.fShortPreamble = 
+  halUpdateBeaconParams.fShortPreamble =
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucfShortPreamble;
   /* short Slot time.*/
-  halUpdateBeaconParams.fShortSlotTime = 
+  halUpdateBeaconParams.fShortSlotTime =
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucfShortSlotTime;
   /* Beacon Interval */
-  halUpdateBeaconParams.beaconInterval = 
+  halUpdateBeaconParams.beaconInterval =
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.usBeaconInterval;
 
   /*Protection related */
-  halUpdateBeaconParams.llaCoexist = 
+  halUpdateBeaconParams.llaCoexist =
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucllaCoexist;
-  halUpdateBeaconParams.llbCoexist = 
+  halUpdateBeaconParams.llbCoexist =
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucllbCoexist;
-  halUpdateBeaconParams.llgCoexist = 
+  halUpdateBeaconParams.llgCoexist =
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucllgCoexist;
-  halUpdateBeaconParams.ht20MhzCoexist  = 
+  halUpdateBeaconParams.ht20MhzCoexist  =
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucHt20MhzCoexist;
-  halUpdateBeaconParams.llnNonGFCoexist = 
+  halUpdateBeaconParams.llnNonGFCoexist =
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucllnNonGFCoexist;
-  halUpdateBeaconParams.fLsigTXOPProtectionFullSupport = 
+  halUpdateBeaconParams.fLsigTXOPProtectionFullSupport =
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucfLsigTXOPProtectionFullSupport;
   halUpdateBeaconParams.fRIFSMode =
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.ucfRIFSMode;
-  halUpdateBeaconParams.paramChangeBitmap = 
+  halUpdateBeaconParams.paramChangeBitmap =
     pwdiUpdateBeaconParams->wdiUpdateBeaconParamsInfo.usChangeBitmap;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, &halUpdateBeaconParams, 
-                  sizeof(halUpdateBeaconParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset, &halUpdateBeaconParams,
+                  sizeof(halUpdateBeaconParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiUpdateBeaconParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiUpdateBeaconParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiUpdateBeaconParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Del TS Request to HAL 
+    Send Del TS Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiUpdateBeaconParamsRspCb, pEventData->pUserData, WDI_UPD_BCON_PRMS_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiUpdateBeaconParamsRspCb, pEventData->pUserData, WDI_UPD_BCON_PRMS_RESP);
 }/*WDI_ProcessUpdateBeaconParamsReq*/
 
 
@@ -10944,30 +11153,30 @@
 /**
  @brief Process Send Beacon template  Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSendBeaconParamsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_SendBeaconParamsType*    pwdiSendBeaconParams;
   WDI_SendBeaconParamsRspCb    wdiSendBeaconParamsRspCb;
-  wpt_uint8*                   pSendBuffer         = NULL; 
+  wpt_uint8*                   pSendBuffer         = NULL;
   wpt_uint16                   usDataOffset        = 0;
   wpt_uint16                   usSendSize          = 0;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   tSendBeaconReqMsg            halSendBeaconReq;
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData ) ||
@@ -10976,7 +11185,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiSendBeaconParams = (WDI_SendBeaconParamsType*)pEventData->pEventData;
@@ -10984,7 +11193,7 @@
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SND_BCON_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SND_BCON_REQ,
                         sizeof(halSendBeaconReq.sendBeaconParam),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halSendBeaconReq.sendBeaconParam) )))
@@ -10993,67 +11202,67 @@
               "Unable to get send buffer in send beacon req %x %x %x",
                 pEventData, pwdiSendBeaconParams, wdiSendBeaconParamsRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wpalMemoryCopy(halSendBeaconReq.sendBeaconParam.bssId,
                   pwdiSendBeaconParams->wdiSendBeaconParamsInfo.macBSSID,
                   WDI_MAC_ADDR_LEN);
-  halSendBeaconReq.sendBeaconParam.beaconLength = 
+  halSendBeaconReq.sendBeaconParam.beaconLength =
                   pwdiSendBeaconParams->wdiSendBeaconParamsInfo.beaconLength;
   wpalMemoryCopy(halSendBeaconReq.sendBeaconParam.beacon,
                   pwdiSendBeaconParams->wdiSendBeaconParamsInfo.beacon,
                   pwdiSendBeaconParams->wdiSendBeaconParamsInfo.beaconLength);
 #ifdef WLAN_SOFTAP_FEATURE
-  halSendBeaconReq.sendBeaconParam.timIeOffset = 
+  halSendBeaconReq.sendBeaconParam.timIeOffset =
                   pwdiSendBeaconParams->wdiSendBeaconParamsInfo.timIeOffset;
 #endif
 #ifdef WLAN_FEATURE_P2P
-  halSendBeaconReq.sendBeaconParam.p2pIeOffset = 
+  halSendBeaconReq.sendBeaconParam.p2pIeOffset =
                   pwdiSendBeaconParams->wdiSendBeaconParamsInfo.usP2PIeOffset;
 #endif
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halSendBeaconReq.sendBeaconParam, 
-                  sizeof(halSendBeaconReq.sendBeaconParam)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halSendBeaconReq.sendBeaconParam,
+                  sizeof(halSendBeaconReq.sendBeaconParam));
 
   pWDICtx->wdiReqStatusCB     = pwdiSendBeaconParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiSendBeaconParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiSendBeaconParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Del TS Request to HAL 
+    Send Del TS Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiSendBeaconParamsRspCb, pEventData->pUserData, WDI_SND_BCON_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiSendBeaconParamsRspCb, pEventData->pUserData, WDI_SND_BCON_RESP);
 }/*WDI_ProcessSendBeaconParamsReq*/
 
 /**
  @brief Process Update Beacon Params  Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateProbeRspTemplateReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_UpdateProbeRspTemplateParamsType*  pwdiUpdateProbeRespTmplParams;
   WDI_UpdateProbeRspTemplateRspCb        wdiUpdateProbeRespTmplRspCb;
-  wpt_uint8*                             pSendBuffer         = NULL; 
+  wpt_uint8*                             pSendBuffer         = NULL;
   wpt_uint16                             usDataOffset        = 0;
   wpt_uint16                             usSendSize          = 0;
-  tSendProbeRespReqParams                halUpdateProbeRspTmplParams; 
+  tSendProbeRespReqParams                halUpdateProbeRspTmplParams;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData) ||
@@ -11062,17 +11271,17 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  pwdiUpdateProbeRespTmplParams = 
+  pwdiUpdateProbeRespTmplParams =
     (WDI_UpdateProbeRspTemplateParamsType*)pEventData->pEventData;
-  wdiUpdateProbeRespTmplRspCb = 
+  wdiUpdateProbeRespTmplRspCb =
     (WDI_UpdateProbeRspTemplateRspCb)pEventData->pCBfnc;
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPD_PROBE_RSP_TEMPLATE_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPD_PROBE_RSP_TEMPLATE_REQ,
                         sizeof(halUpdateProbeRspTmplParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halUpdateProbeRspTmplParams) )))
@@ -11081,53 +11290,53 @@
               "Unable to get send buffer in set bss key req %x %x %x",
      pEventData, pwdiUpdateProbeRespTmplParams, wdiUpdateProbeRespTmplRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wpalMemoryCopy(halUpdateProbeRspTmplParams.bssId,
-                 pwdiUpdateProbeRespTmplParams->wdiProbeRspTemplateInfo.macBSSID, 
+                 pwdiUpdateProbeRespTmplParams->wdiProbeRspTemplateInfo.macBSSID,
                  WDI_MAC_ADDR_LEN);
 
-  halUpdateProbeRspTmplParams.probeRespTemplateLen = 
+  halUpdateProbeRspTmplParams.probeRespTemplateLen =
     pwdiUpdateProbeRespTmplParams->wdiProbeRspTemplateInfo.uProbeRespTemplateLen;
 
   wpalMemoryCopy(halUpdateProbeRspTmplParams.pProbeRespTemplate,
     pwdiUpdateProbeRespTmplParams->wdiProbeRspTemplateInfo.pProbeRespTemplate,
-                 BEACON_TEMPLATE_SIZE);     
+                 BEACON_TEMPLATE_SIZE);
 
 
   wpalMemoryCopy(halUpdateProbeRspTmplParams.ucProxyProbeReqValidIEBmap,
            pwdiUpdateProbeRespTmplParams->wdiProbeRspTemplateInfo.uaProxyProbeReqValidIEBmap,
                  WDI_PROBE_REQ_BITMAP_IE_LEN);
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halUpdateProbeRspTmplParams, 
-                  sizeof(halUpdateProbeRspTmplParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halUpdateProbeRspTmplParams,
+                  sizeof(halUpdateProbeRspTmplParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiUpdateProbeRespTmplParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiUpdateProbeRespTmplParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiUpdateProbeRespTmplParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Update Probe Resp Template Request to HAL 
+    Send Update Probe Resp Template Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiUpdateProbeRespTmplRspCb, pEventData->pUserData, 
-                       WDI_UPD_PROBE_RSP_TEMPLATE_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiUpdateProbeRespTmplRspCb, pEventData->pUserData,
+                       WDI_UPD_PROBE_RSP_TEMPLATE_RESP);
 }/*WDI_ProcessUpdateProbeRspTemplateReq*/
 
 /**
- @brief Process NV blob download function (called when Main FSM 
+ @brief Process NV blob download function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessNvDownloadReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -11137,30 +11346,30 @@
   WDI_NvDownloadRspCb      wdiNvDownloadRspCb = NULL;
 
   /*-------------------------------------------------------------------------
-     Sanity check       
+     Sanity check
    -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
-      ( NULL == (pwdiNvDownloadReqParams = 
+      ( NULL == (pwdiNvDownloadReqParams =
                  (WDI_NvDownloadReqParamsType*)pEventData->pEventData)) ||
-      ( NULL == (wdiNvDownloadRspCb = 
+      ( NULL == (wdiNvDownloadRspCb =
                 (WDI_NvDownloadRspCb)pEventData->pCBfnc)))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
     WDI_ASSERT(0);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   /*Intialize the Nv Blob Info */
-  pWDICtx->wdiNvBlobInfo.usTotalFragment = 
+  pWDICtx->wdiNvBlobInfo.usTotalFragment =
                 TOTALFRAGMENTS(pwdiNvDownloadReqParams->wdiBlobInfo.uBlobSize);
 
   /*cache the wdi nv request message here if the the first fragment
    * To issue the request to HAL for the next fragment */
   if( 0 == pWDICtx->wdiNvBlobInfo.usCurrentFragment)
   {
-    wpalMemoryCopy(&pWDICtx->wdiCachedNvDownloadReq, 
-                 pwdiNvDownloadReqParams, 
+    wpalMemoryCopy(&pWDICtx->wdiCachedNvDownloadReq,
+                 pwdiNvDownloadReqParams,
                  sizeof(pWDICtx->wdiCachedNvDownloadReq)); 
 
     pWDICtx->pfncRspCB = pEventData->pCBfnc;
@@ -11171,12 +11380,12 @@
 }
 
 /**
- @brief Process Set Max Tx Power Request function (called when Main    
+ @brief Process Set Max Tx Power Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
@@ -11188,14 +11397,14 @@
 {
   WDI_SetMaxTxPowerParamsType*      pwdiSetMaxTxPowerParams = NULL;
   WDA_SetMaxTxPowerRspCb            wdiSetMaxTxPowerRspCb;
-  wpt_uint8*                        pSendBuffer         = NULL; 
+  wpt_uint8*                        pSendBuffer         = NULL;
   wpt_uint16                        usDataOffset        = 0;
   wpt_uint16                        usSendSize          = 0;
   tSetMaxTxPwrReq                   halSetMaxTxPower;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData ) ||
@@ -11204,27 +11413,27 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
-  pwdiSetMaxTxPowerParams = 
+  pwdiSetMaxTxPowerParams =
     (WDI_SetMaxTxPowerParamsType*)pEventData->pEventData;
-  wdiSetMaxTxPowerRspCb = 
+  wdiSetMaxTxPowerRspCb =
     (WDA_SetMaxTxPowerRspCb)pEventData->pCBfnc;
 
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_MAX_TX_POWER_REQ, 
+if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_MAX_TX_POWER_REQ,
                         sizeof(halSetMaxTxPower.setMaxTxPwrParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
-      ( usSendSize < (usDataOffset + sizeof(halSetMaxTxPower.setMaxTxPwrParams) 
+      ( usSendSize < (usDataOffset + sizeof(halSetMaxTxPower.setMaxTxPwrParams)
 )))
   {
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_ERROR,
               "Unable to get Set Max Tx Power req %x %x %x",
                 pEventData, pwdiSetMaxTxPowerParams, wdiSetMaxTxPowerRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wpalMemoryCopy(halSetMaxTxPower.setMaxTxPwrParams.bssId,
@@ -11234,23 +11443,23 @@
   wpalMemoryCopy(halSetMaxTxPower.setMaxTxPwrParams.selfStaMacAddr,
                   pwdiSetMaxTxPowerParams->wdiMaxTxPowerInfo.macSelfStaMacAddr,
                   WDI_MAC_ADDR_LEN);
-  halSetMaxTxPower.setMaxTxPwrParams.power = 
+  halSetMaxTxPower.setMaxTxPwrParams.power =
                   pwdiSetMaxTxPowerParams->wdiMaxTxPowerInfo.ucPower;
-  
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halSetMaxTxPower.setMaxTxPwrParams, 
-                  sizeof(halSetMaxTxPower.setMaxTxPwrParams)); 
+
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halSetMaxTxPower.setMaxTxPwrParams,
+                  sizeof(halSetMaxTxPower.setMaxTxPwrParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiSetMaxTxPowerParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiSetMaxTxPowerParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiSetMaxTxPowerParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Del TS Request to HAL 
+    Send Del TS Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiSetMaxTxPowerRspCb, pEventData->pUserData, 
-                                                      WDI_SET_MAX_TX_POWER_RESP); 
-  
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiSetMaxTxPowerRspCb, pEventData->pUserData,
+                                                      WDI_SET_MAX_TX_POWER_RESP);
+
 }
 
 #ifdef WLAN_FEATURE_P2P
@@ -11258,30 +11467,30 @@
 /**
  @brief Process P2P Notice Of Absence Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessP2PGONOAReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_SetP2PGONOAReqParamsType*          pwdiP2PGONOAReqParams;
   WDI_SetP2PGONOAReqParamsRspCb          wdiP2PGONOAReqRspCb;
-  wpt_uint8*                             pSendBuffer         = NULL; 
+  wpt_uint8*                             pSendBuffer         = NULL;
   wpt_uint16                             usDataOffset        = 0;
   wpt_uint16                             usSendSize          = 0;
-  tSetP2PGONOAParams                     halSetP2PGONOAParams; 
+  tSetP2PGONOAParams                     halSetP2PGONOAParams;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData) ||
@@ -11290,18 +11499,18 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  pwdiP2PGONOAReqParams = 
+  pwdiP2PGONOAReqParams =
     (WDI_SetP2PGONOAReqParamsType*)pEventData->pEventData;
-  wdiP2PGONOAReqRspCb = 
+  wdiP2PGONOAReqRspCb =
     (WDI_SetP2PGONOAReqParamsRspCb)pEventData->pCBfnc;
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, 
-                        WDI_P2P_GO_NOTICE_OF_ABSENCE_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,
+                        WDI_P2P_GO_NOTICE_OF_ABSENCE_REQ,
                         sizeof(halSetP2PGONOAParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halSetP2PGONOAParams) )))
@@ -11310,48 +11519,48 @@
               "Unable to get send buffer in set P2P GO NOA REQ %x %x %x",
      pEventData, pwdiP2PGONOAReqParams, wdiP2PGONOAReqRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  halSetP2PGONOAParams.opp_ps = 
+  halSetP2PGONOAParams.opp_ps =
                            pwdiP2PGONOAReqParams->wdiP2PGONOAInfo.ucOpp_ps;
-  halSetP2PGONOAParams.ctWindow = 
+  halSetP2PGONOAParams.ctWindow =
                            pwdiP2PGONOAReqParams->wdiP2PGONOAInfo.uCtWindow;
   halSetP2PGONOAParams.count = pwdiP2PGONOAReqParams->wdiP2PGONOAInfo.ucCount;
-  halSetP2PGONOAParams.duration = 
+  halSetP2PGONOAParams.duration =
                            pwdiP2PGONOAReqParams->wdiP2PGONOAInfo.uDuration;
-  halSetP2PGONOAParams.interval = 
+  halSetP2PGONOAParams.interval =
                            pwdiP2PGONOAReqParams->wdiP2PGONOAInfo.uInterval;
-  halSetP2PGONOAParams.single_noa_duration = 
+  halSetP2PGONOAParams.single_noa_duration =
                  pwdiP2PGONOAReqParams->wdiP2PGONOAInfo.uSingle_noa_duration;
-  halSetP2PGONOAParams.psSelection = 
+  halSetP2PGONOAParams.psSelection =
                    pwdiP2PGONOAReqParams->wdiP2PGONOAInfo.ucPsSelection;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halSetP2PGONOAParams, 
-                  sizeof(halSetP2PGONOAParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halSetP2PGONOAParams,
+                  sizeof(halSetP2PGONOAParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiP2PGONOAReqParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiP2PGONOAReqParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiP2PGONOAReqParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Update Probe Resp Template Request to HAL 
+    Send Update Probe Resp Template Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiP2PGONOAReqRspCb, pEventData->pUserData, 
-                       WDI_P2P_GO_NOTICE_OF_ABSENCE_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiP2PGONOAReqRspCb, pEventData->pUserData,
+                       WDI_P2P_GO_NOTICE_OF_ABSENCE_RESP);
 }/*WDI_ProcessP2PGONOAReq*/
 
 #endif
 
 
 /**
- @brief    Function to handle the ack from DXE once the power 
+ @brief    Function to handle the ack from DXE once the power
            state is set.
- @param    None 
-    
- @see 
- @return void 
+ @param    None
+
+ @see
+ @return void
 */
 void
 WDI_SetPowerStateCb
@@ -11368,17 +11577,17 @@
    {
       //it shouldn't happen, put an error msg
    }
-   /* 
-    * Trigger the event to bring the Enter BMPS req function to come 
-    * out of wait 
+   /*
+    * Trigger the event to bring the Enter BMPS req function to come
+    * out of wait
 */
    if( NULL != pContext )
    {
-      pCB = (WDI_ControlBlockType *)pContext; 
+      pCB = (WDI_ControlBlockType *)pContext;
    }
    else
    {
-      //put an error msg 
+      //put an error msg
       pCB = &gWDICb;
    }
    pCB->dxePhyAddr = dxePhyAddr;
@@ -11388,38 +11597,38 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "Failed to set an event");
 
-      WDI_ASSERT(0); 
+      WDI_ASSERT(0);
    }
    return;
 }
 
 
 /**
- @brief Process Enter IMPS Request function (called when 
+ @brief Process Enter IMPS Request function (called when
         Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessEnterImpsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    wpt_status               wptStatus; 
    WDI_EnterImpsRspCb       wdiEnterImpsRspCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (wdiEnterImpsRspCb   = (WDI_EnterImpsRspCb)pEventData->pCBfnc)))
@@ -11427,14 +11636,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_ENTER_IMPS_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_ENTER_IMPS_REQ,
                                                      0,
                                                      &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset )))
@@ -11443,7 +11652,7 @@
                "Unable to get send buffer in Enter IMPS req %x %x",
                  pEventData, wdiEnterImpsRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /* Reset the event to be not signalled */
@@ -11453,7 +11662,7 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "WDI Init failed to reset an event");
 
-      WDI_ASSERT(0); 
+      WDI_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
 
@@ -11461,7 +11670,7 @@
    WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_IMPS, WDI_SetPowerStateCb);
 
    /*
-    * Wait for the event to be set once the ACK comes back from DXE 
+    * Wait for the event to be set once the ACK comes back from DXE
     */
    wptStatus = wpalEventWait(&pWDICtx->setPowerStateEvent, 
                              WDI_SET_POWER_STATE_TIMEOUT);
@@ -11470,42 +11679,42 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "WDI Init failed to wait on an event");
 
-      WDI_ASSERT(0); 
+      WDI_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiEnterImpsRspCb, pEventData->pUserData, WDI_ENTER_IMPS_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiEnterImpsRspCb, pEventData->pUserData, WDI_ENTER_IMPS_RESP);
 }/*WDI_ProcessEnterImpsReq*/
 
 /**
- @brief Process Exit IMPS Request function (called when 
+ @brief Process Exit IMPS Request function (called when
         Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessExitImpsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_ExitImpsRspCb        wdiExitImpsRspCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (wdiExitImpsRspCb   = (WDI_ExitImpsRspCb)pEventData->pCBfnc)))
@@ -11513,14 +11722,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_EXIT_IMPS_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_EXIT_IMPS_REQ,
                                                      0,
                                                      &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset )))
@@ -11529,36 +11738,36 @@
                "Unable to get send buffer in Exit IMPS req %x %x",
                  pEventData, wdiExitImpsRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiExitImpsRspCb, pEventData->pUserData, WDI_EXIT_IMPS_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiExitImpsRspCb, pEventData->pUserData, WDI_EXIT_IMPS_RESP);
 }/*WDI_ProcessExitImpsReq*/
 
 /**
- @brief Process Enter BMPS Request function (called when Main 
+ @brief Process Enter BMPS Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessEnterBmpsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_EnterBmpsReqParamsType*  pwdiEnterBmpsReqParams = NULL;
    WDI_EnterBmpsRspCb           wdiEnterBmpsRspCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    tHalEnterBmpsReqParams   enterBmpsReq;
@@ -11567,7 +11776,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
   -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiEnterBmpsReqParams = (WDI_EnterBmpsReqParamsType*)pEventData->pEventData)) ||
@@ -11576,14 +11785,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_ENTER_BMPS_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_ENTER_BMPS_REQ,
                          sizeof(enterBmpsReq),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(enterBmpsReq) )))
@@ -11592,7 +11801,7 @@
                "Unable to get send buffer in Enter BMPS req %x %x %x",
                  pEventData, pwdiEnterBmpsReqParams, wdiEnterBmpsRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /* Reset the event to be not signalled */
@@ -11602,7 +11811,7 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "WDI Init failed to reset an event");
 
-      WDI_ASSERT(0); 
+      WDI_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
 
@@ -11610,7 +11819,7 @@
    WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_BMPS, WDI_SetPowerStateCb);
 
 /*
-    * Wait for the event to be set once the ACK comes back from DXE 
+    * Wait for the event to be set once the ACK comes back from DXE
     */
    wptStatus = wpalEventWait(&pWDICtx->setPowerStateEvent, 
                              WDI_SET_POWER_STATE_TIMEOUT);
@@ -11619,7 +11828,7 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "WDI Init failed to wait on an event");
 
-      WDI_ASSERT(0); 
+      WDI_ASSERT(0);
       return VOS_STATUS_E_FAILURE;
    }
 
@@ -11640,42 +11849,42 @@
                    sizeof(enterBmpsReq)); 
 
    pWDICtx->wdiReqStatusCB     = pwdiEnterBmpsReqParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiEnterBmpsReqParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiEnterBmpsReqParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiEnterBmpsRspCb, pEventData->pUserData, WDI_ENTER_BMPS_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiEnterBmpsRspCb, pEventData->pUserData, WDI_ENTER_BMPS_RESP);
 }/*WDI_ProcessEnterBmpsReq*/
 
 /**
  @brief Process Exit BMPS Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessExitBmpsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_ExitBmpsReqParamsType*  pwdiExitBmpsReqParams = NULL;
    WDI_ExitBmpsRspCb           wdiExitBmpsRspCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    tHalExitBmpsReqParams    exitBmpsReq;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiExitBmpsReqParams = (WDI_ExitBmpsReqParamsType*)pEventData->pEventData)) ||
@@ -11684,14 +11893,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_EXIT_BMPS_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_EXIT_BMPS_REQ,
                          sizeof(exitBmpsReq),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(exitBmpsReq) )))
@@ -11700,51 +11909,53 @@
                "Unable to get send buffer in Exit BMPS req %x %x %x",
                  pEventData, pwdiExitBmpsReqParams, wdiExitBmpsRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
    exitBmpsReq.sendDataNull = pwdiExitBmpsReqParams->wdiExitBmpsInfo.ucSendDataNull;
 
+   exitBmpsReq.bssIdx = pwdiExitBmpsReqParams->wdiExitBmpsInfo.bssIdx;
+
    wpalMemoryCopy( pSendBuffer+usDataOffset, 
                    &exitBmpsReq, 
                    sizeof(exitBmpsReq)); 
 
    pWDICtx->wdiReqStatusCB     = pwdiExitBmpsReqParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiExitBmpsReqParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiExitBmpsReqParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiExitBmpsRspCb, pEventData->pUserData, WDI_EXIT_BMPS_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiExitBmpsRspCb, pEventData->pUserData, WDI_EXIT_BMPS_RESP);
 }/*WDI_ProcessExitBmpsReq*/
 
 /**
- @brief Process Enter UAPSD Request function (called when Main 
+ @brief Process Enter UAPSD Request function (called when Main
         FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessEnterUapsdReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_EnterUapsdReqParamsType*  pwdiEnterUapsdReqParams = NULL;
    WDI_EnterUapsdRspCb           wdiEnterUapsdRspCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    tUapsdReqParams          enterUapsdReq;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiEnterUapsdReqParams = (WDI_EnterUapsdReqParamsType*)pEventData->pEventData)) ||
@@ -11753,14 +11964,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_ENTER_UAPSD_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_ENTER_UAPSD_REQ,
                          sizeof(enterUapsdReq),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(enterUapsdReq) )))
@@ -11769,7 +11980,7 @@
                "Unable to get send buffer in Enter UAPSD req %x %x %x",
                  pEventData, pwdiEnterUapsdReqParams, wdiEnterUapsdRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    enterUapsdReq.beDeliveryEnabled  = pwdiEnterUapsdReqParams->wdiEnterUapsdInfo.ucBeDeliveryEnabled;
@@ -11780,46 +11991,47 @@
    enterUapsdReq.viTriggerEnabled   = pwdiEnterUapsdReqParams->wdiEnterUapsdInfo.ucViTriggerEnabled;
    enterUapsdReq.voDeliveryEnabled  = pwdiEnterUapsdReqParams->wdiEnterUapsdInfo.ucVoDeliveryEnabled;
    enterUapsdReq.voTriggerEnabled   = pwdiEnterUapsdReqParams->wdiEnterUapsdInfo.ucVoTriggerEnabled;
+   enterUapsdReq.bssIdx             = pwdiEnterUapsdReqParams->wdiEnterUapsdInfo.bssIdx;
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &enterUapsdReq, 
-                   sizeof(enterUapsdReq)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &enterUapsdReq,
+                   sizeof(enterUapsdReq));
 
    pWDICtx->wdiReqStatusCB     = pwdiEnterUapsdReqParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiEnterUapsdReqParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiEnterUapsdReqParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiEnterUapsdRspCb, pEventData->pUserData, WDI_ENTER_UAPSD_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiEnterUapsdRspCb, pEventData->pUserData, WDI_ENTER_UAPSD_RESP);
 }/*WDI_ProcessEnterUapsdReq*/
 
 /**
- @brief Process Exit UAPSD Request function (called when 
+ @brief Process Exit UAPSD Request function (called when
         Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessExitUapsdReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_ExitUapsdRspCb       wdiExitUapsdRspCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (wdiExitUapsdRspCb   = (WDI_ExitUapsdRspCb)pEventData->pCBfnc)))
@@ -11827,14 +12039,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_EXIT_UAPSD_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_EXIT_UAPSD_REQ,
                                                      0,
                                                      &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset )))
@@ -11843,43 +12055,43 @@
                "Unable to get send buffer in Exit UAPSD req %x %x",
                  pEventData, wdiExitUapsdRspCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiExitUapsdRspCb, pEventData->pUserData, WDI_EXIT_UAPSD_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiExitUapsdRspCb, pEventData->pUserData, WDI_EXIT_UAPSD_RESP);
 }/*WDI_ProcessExitUapsdReq*/
 
 /**
- @brief Process Set UAPSD params Request function (called when 
+ @brief Process Set UAPSD params Request function (called when
         Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetUapsdAcParamsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_SetUapsdAcParamsReqParamsType*  pwdiSetUapsdAcParams = NULL;
   WDI_SetUapsdAcParamsCb              wdiSetUapsdAcParamsCb = NULL;
-  wpt_uint8*               pSendBuffer         = NULL; 
+  wpt_uint8*               pSendBuffer         = NULL;
   wpt_uint16               usDataOffset        = 0;
   wpt_uint16               usSendSize          = 0;
   tUapsdInfo               uapsdAcParamsReq;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == (pwdiSetUapsdAcParams = (WDI_SetUapsdAcParamsReqParamsType*)pEventData->pEventData)) ||
@@ -11888,14 +12100,14 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-----------------------------------------------------------------------
     Get message buffer
-    ! TO DO : proper conversion into the HAL Message Request Format 
+    ! TO DO : proper conversion into the HAL Message Request Format
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_UAPSD_PARAM_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_UAPSD_PARAM_REQ,
                         sizeof(uapsdAcParamsReq),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(uapsdAcParamsReq) )))
@@ -11904,7 +12116,7 @@
               "Unable to get send buffer in Set UAPSD params req %x %x %x",
                 pEventData, pwdiSetUapsdAcParams, wdiSetUapsdAcParamsCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   uapsdAcParamsReq.ac = pwdiSetUapsdAcParams->wdiUapsdInfo.ucAc;
@@ -11914,46 +12126,46 @@
   uapsdAcParamsReq.srvInterval = pwdiSetUapsdAcParams->wdiUapsdInfo.uSrvInterval;
   uapsdAcParamsReq.susInterval = pwdiSetUapsdAcParams->wdiUapsdInfo.uSusInterval;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &uapsdAcParamsReq, 
-                  sizeof(uapsdAcParamsReq)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &uapsdAcParamsReq,
+                  sizeof(uapsdAcParamsReq));
 
   pWDICtx->wdiReqStatusCB     = pwdiSetUapsdAcParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiSetUapsdAcParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiSetUapsdAcParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Get STA Request to HAL 
+    Send Get STA Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiSetUapsdAcParamsCb, pEventData->pUserData, WDI_SET_UAPSD_PARAM_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiSetUapsdAcParamsCb, pEventData->pUserData, WDI_SET_UAPSD_PARAM_RESP);
 }/*WDI_ProcessSetUapsdAcParamsReq*/
 
 /**
- @brief Process update UAPSD params Request function (called 
+ @brief Process update UAPSD params Request function (called
         when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateUapsdParamsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_UpdateUapsdReqParamsType*  pwdiUpdateUapsdReqParams = NULL;
    WDI_UpdateUapsdParamsCb        wdiUpdateUapsdParamsCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiUpdateUapsdReqParams = (WDI_UpdateUapsdReqParamsType*)pEventData->pEventData)) ||
@@ -11962,14 +12174,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPDATE_UAPSD_PARAM_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPDATE_UAPSD_PARAM_REQ,
                          sizeof(pwdiUpdateUapsdReqParams->wdiUpdateUapsdInfo),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(pwdiUpdateUapsdReqParams->wdiUpdateUapsdInfo) )))
@@ -11978,43 +12190,43 @@
                "Unable to get send buffer in Update UAPSD params req %x %x %x",
                  pEventData, pwdiUpdateUapsdReqParams, wdiUpdateUapsdParamsCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &pwdiUpdateUapsdReqParams->wdiUpdateUapsdInfo, 
-                   sizeof(pwdiUpdateUapsdReqParams->wdiUpdateUapsdInfo)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &pwdiUpdateUapsdReqParams->wdiUpdateUapsdInfo,
+                   sizeof(pwdiUpdateUapsdReqParams->wdiUpdateUapsdInfo));
 
    pWDICtx->wdiReqStatusCB     = pwdiUpdateUapsdReqParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiUpdateUapsdReqParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiUpdateUapsdReqParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiUpdateUapsdParamsCb, pEventData->pUserData, WDI_UPDATE_UAPSD_PARAM_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiUpdateUapsdParamsCb, pEventData->pUserData, WDI_UPDATE_UAPSD_PARAM_RESP);
 }/*WDI_ProcessUpdateUapsdParamsReq*/
 
 /**
- @brief Process Configure RXP filter Request function (called 
+ @brief Process Configure RXP filter Request function (called
         when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessConfigureRxpFilterReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_ConfigureRxpFilterReqParamsType*  pwdiRxpFilterParams = NULL;
   WDI_ConfigureRxpFilterCb              wdiConfigureRxpFilterCb = NULL;
-  wpt_uint8*               pSendBuffer         = NULL; 
+  wpt_uint8*               pSendBuffer         = NULL;
   wpt_uint16               usDataOffset        = 0;
   wpt_uint16               usSendSize          = 0;
   tHalConfigureRxpFilterReqParams     halRxpFilterParams;
@@ -12022,7 +12234,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == (pwdiRxpFilterParams = (WDI_ConfigureRxpFilterReqParamsType*)pEventData->pEventData)) ||
@@ -12031,13 +12243,13 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
    /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_CONFIGURE_RXP_FILTER_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_CONFIGURE_RXP_FILTER_REQ,
                         sizeof(halRxpFilterParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(halRxpFilterParams) )))
@@ -12046,54 +12258,54 @@
               "Unable to get send buffer in Set UAPSD params req %x %x %x",
                 pEventData, pwdiRxpFilterParams, wdiConfigureRxpFilterCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  halRxpFilterParams.setMcstBcstFilterSetting = 
+  halRxpFilterParams.setMcstBcstFilterSetting =
       pwdiRxpFilterParams->wdiRxpFilterParam.ucSetMcstBcstFilterSetting;
-  halRxpFilterParams.setMcstBcstFilter = 
+  halRxpFilterParams.setMcstBcstFilter =
       pwdiRxpFilterParams->wdiRxpFilterParam.ucSetMcstBcstFilter;
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halRxpFilterParams, 
-                  sizeof(halRxpFilterParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halRxpFilterParams,
+                  sizeof(halRxpFilterParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiRxpFilterParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiRxpFilterParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiRxpFilterParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Get STA Request to HAL 
+    Send Get STA Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                       wdiConfigureRxpFilterCb, pEventData->pUserData, WDI_CONFIGURE_RXP_FILTER_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                       wdiConfigureRxpFilterCb, pEventData->pUserData, WDI_CONFIGURE_RXP_FILTER_RESP);
 }/*WDI_ProcessConfigureRxpFilterReq*/
 
 /**
- @brief Process set beacon filter Request function (called 
+ @brief Process set beacon filter Request function (called
         when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetBeaconFilterReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_BeaconFilterReqParamsType*  pwdiBeaconFilterParams = NULL;
    WDI_SetBeaconFilterCb           wdiBeaconFilterCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiBeaconFilterParams = (WDI_BeaconFilterReqParamsType*)pEventData->pEventData)) ||
@@ -12102,14 +12314,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_BEACON_FILTER_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_BEACON_FILTER_REQ,
                          sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo) + pwdiBeaconFilterParams->wdiBeaconFilterInfo.usIeNum * sizeof(tBeaconFilterIe),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo) )))
@@ -12118,52 +12330,52 @@
                "Unable to get send buffer in Set beacon filter req %x %x %x",
                  pEventData, pwdiBeaconFilterParams, wdiBeaconFilterCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &pwdiBeaconFilterParams->wdiBeaconFilterInfo, 
-                   sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo)); 
-   wpalMemoryCopy( pSendBuffer+usDataOffset+sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo), 
-                   &pwdiBeaconFilterParams->aFilters[0], 
-                   pwdiBeaconFilterParams->wdiBeaconFilterInfo.usIeNum * sizeof(tBeaconFilterIe)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &pwdiBeaconFilterParams->wdiBeaconFilterInfo,
+                   sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo));
+   wpalMemoryCopy( pSendBuffer+usDataOffset+sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo),
+                   &pwdiBeaconFilterParams->aFilters[0],
+                   pwdiBeaconFilterParams->wdiBeaconFilterInfo.usIeNum * sizeof(tBeaconFilterIe));
 
    pWDICtx->wdiReqStatusCB     = pwdiBeaconFilterParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiBeaconFilterParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiBeaconFilterParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiBeaconFilterCb, pEventData->pUserData, WDI_SET_BEACON_FILTER_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiBeaconFilterCb, pEventData->pUserData, WDI_SET_BEACON_FILTER_RESP);
 }/*WDI_ProcessSetBeaconFilterReq*/
 
 /**
- @brief Process remove beacon filter Request function (called 
+ @brief Process remove beacon filter Request function (called
         when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessRemBeaconFilterReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_RemBeaconFilterReqParamsType*  pwdiBeaconFilterParams = NULL;
    WDI_RemBeaconFilterCb              wdiBeaconFilterCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiBeaconFilterParams = (WDI_RemBeaconFilterReqParamsType*)pEventData->pEventData)) ||
@@ -12172,14 +12384,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_REM_BEACON_FILTER_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_REM_BEACON_FILTER_REQ,
                          sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo) )))
@@ -12188,43 +12400,43 @@
                   "Unable to get send buffer in remove beacon filter req %x %x %x",
                   pEventData, pwdiBeaconFilterParams, wdiBeaconFilterCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &pwdiBeaconFilterParams->wdiBeaconFilterInfo, 
-                   sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &pwdiBeaconFilterParams->wdiBeaconFilterInfo,
+                   sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo));
 
    pWDICtx->wdiReqStatusCB     = pwdiBeaconFilterParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiBeaconFilterParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiBeaconFilterParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiBeaconFilterCb, pEventData->pUserData, WDI_REM_BEACON_FILTER_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiBeaconFilterCb, pEventData->pUserData, WDI_REM_BEACON_FILTER_RESP);
 }
 
 /**
- @brief Process set RSSI thresholds Request function (called 
+ @brief Process set RSSI thresholds Request function (called
         when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetRSSIThresholdsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_SetRSSIThresholdsReqParamsType*  pwdiRSSIThresholdsParams = NULL;
    WDI_SetRSSIThresholdsCb              wdiRSSIThresholdsCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    tHalRSSIThresholds       rssiThresholdsReq;
@@ -12232,7 +12444,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiRSSIThresholdsParams = (WDI_SetRSSIThresholdsReqParamsType*)pEventData->pEventData)) ||
@@ -12241,14 +12453,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_RSSI_THRESHOLDS_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_RSSI_THRESHOLDS_REQ,
                          sizeof(rssiThresholdsReq),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(rssiThresholdsReq) )))
@@ -12257,36 +12469,36 @@
                   "Unable to get send buffer in remove beacon filter req %x %x %x",
                   pEventData, pwdiRSSIThresholdsParams, wdiRSSIThresholdsCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   rssiThresholdsReq.bReserved10 = 
+   rssiThresholdsReq.bReserved10 =
       pwdiRSSIThresholdsParams->wdiRSSIThresholdsInfo.bReserved10;
-   rssiThresholdsReq.bRssiThres1NegNotify = 
+   rssiThresholdsReq.bRssiThres1NegNotify =
       pwdiRSSIThresholdsParams->wdiRSSIThresholdsInfo.bRssiThres1NegNotify;
-   rssiThresholdsReq.bRssiThres1PosNotify = 
+   rssiThresholdsReq.bRssiThres1PosNotify =
       pwdiRSSIThresholdsParams->wdiRSSIThresholdsInfo.bRssiThres1PosNotify;
-   rssiThresholdsReq.bRssiThres2NegNotify = 
+   rssiThresholdsReq.bRssiThres2NegNotify =
       pwdiRSSIThresholdsParams->wdiRSSIThresholdsInfo.bRssiThres2NegNotify;
-   rssiThresholdsReq.bRssiThres2PosNotify = 
+   rssiThresholdsReq.bRssiThres2PosNotify =
       pwdiRSSIThresholdsParams->wdiRSSIThresholdsInfo.bRssiThres2PosNotify;
-   rssiThresholdsReq.bRssiThres3NegNotify = 
+   rssiThresholdsReq.bRssiThres3NegNotify =
       pwdiRSSIThresholdsParams->wdiRSSIThresholdsInfo.bRssiThres3NegNotify;
-   rssiThresholdsReq.bRssiThres3PosNotify = 
+   rssiThresholdsReq.bRssiThres3PosNotify =
       pwdiRSSIThresholdsParams->wdiRSSIThresholdsInfo.bRssiThres3PosNotify;
-   rssiThresholdsReq.ucRssiThreshold1 = 
+   rssiThresholdsReq.ucRssiThreshold1 =
       pwdiRSSIThresholdsParams->wdiRSSIThresholdsInfo.ucRssiThreshold1;
-   rssiThresholdsReq.ucRssiThreshold2 = 
+   rssiThresholdsReq.ucRssiThreshold2 =
       pwdiRSSIThresholdsParams->wdiRSSIThresholdsInfo.ucRssiThreshold2;
-   rssiThresholdsReq.ucRssiThreshold3 = 
+   rssiThresholdsReq.ucRssiThreshold3 =
       pwdiRSSIThresholdsParams->wdiRSSIThresholdsInfo.ucRssiThreshold3;
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &rssiThresholdsReq, 
-                   sizeof(rssiThresholdsReq)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &rssiThresholdsReq,
+                   sizeof(rssiThresholdsReq));
 
    pWDICtx->wdiReqStatusCB     = pwdiRSSIThresholdsParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiRSSIThresholdsParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiRSSIThresholdsParams->pUserData;
 
    /*-------------------------------------------------------------------------
      Send Set threshold req to HAL 
@@ -12307,25 +12519,25 @@
 }
 
 /**
- @brief Process set RSSI thresholds Request function (called 
+ @brief Process set RSSI thresholds Request function (called
         when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessHostOffloadReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_HostOffloadReqParamsType*  pwdiHostOffloadParams = NULL;
    WDI_HostOffloadCb              wdiHostOffloadCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    tHalHostOffloadReq       hostOffloadParams;
@@ -12334,7 +12546,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiHostOffloadParams = (WDI_HostOffloadReqParamsType*)pEventData->pEventData)) ||
@@ -12343,14 +12555,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_HOST_OFFLOAD_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_HOST_OFFLOAD_REQ,
                          sizeof(hostOffloadParams)+sizeof(nsOffloadParams),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(hostOffloadParams) + sizeof(nsOffloadParams) )))
@@ -12359,11 +12571,12 @@
                   "Unable to get send buffer in host offload req %x %x %x",
                   pEventData, pwdiHostOffloadParams, wdiHostOffloadCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    hostOffloadParams.offloadType = pwdiHostOffloadParams->wdiHostOffloadInfo.ucOffloadType;
    hostOffloadParams.enableOrDisable = pwdiHostOffloadParams->wdiHostOffloadInfo.ucEnableOrDisable;
+
    if( HAL_IPV4_ARP_REPLY_OFFLOAD == hostOffloadParams.offloadType )
    {
       // ARP Offload
@@ -12398,6 +12611,9 @@
         nsOffloadParams.srcIPv6AddrValid = pwdiHostOffloadParams->wdiNsOffloadParams.srcIPv6AddrValid;
         nsOffloadParams.targetIPv6Addr1Valid = pwdiHostOffloadParams->wdiNsOffloadParams.targetIPv6Addr1Valid;
         nsOffloadParams.targetIPv6Addr2Valid = pwdiHostOffloadParams->wdiNsOffloadParams.targetIPv6Addr2Valid;
+
+        nsOffloadParams.bssIdx = pwdiHostOffloadParams->wdiNsOffloadParams.bssIdx;
+
 #endif // WLAN_NS_OFFLOAD
    }
 
@@ -12417,42 +12633,42 @@
 #endif // WLAN_NS_OFFLOAD
 
    pWDICtx->wdiReqStatusCB     = pwdiHostOffloadParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiHostOffloadParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiHostOffloadParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiHostOffloadCb, pEventData->pUserData, WDI_HOST_OFFLOAD_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiHostOffloadCb, pEventData->pUserData, WDI_HOST_OFFLOAD_RESP);
 }/*WDI_ProcessHostOffloadReq*/
 
 /**
- @brief Process Keep Alive Request function (called 
+ @brief Process Keep Alive Request function (called
         when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessKeepAliveReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_KeepAliveReqParamsType*  pwdiKeepAliveParams = NULL;
    WDI_KeepAliveCb              wdiKeepAliveCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    tHalKeepAliveReq         keepAliveReq;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiKeepAliveParams = (WDI_KeepAliveReqParamsType*)pEventData->pEventData)) ||
@@ -12461,14 +12677,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_ERROR,
                "Invalid parameters in Keep Alive req");
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_KEEP_ALIVE_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_KEEP_ALIVE_REQ,
                          sizeof(keepAliveReq),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(keepAliveReq) )))
@@ -12477,12 +12693,14 @@
                   "Unable to get send buffer in keep alive req %x %x %x",
                   pEventData, pwdiKeepAliveParams, wdiKeepAliveCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    keepAliveReq.packetType = pwdiKeepAliveParams->wdiKeepAliveInfo.ucPacketType;
    keepAliveReq.timePeriod = pwdiKeepAliveParams->wdiKeepAliveInfo.ucTimePeriod;
 
+   keepAliveReq.bssIdx = pwdiKeepAliveParams->wdiKeepAliveInfo.bssIdx;
+
    if(pwdiKeepAliveParams->wdiKeepAliveInfo.ucPacketType == 2)
    {
    wpalMemoryCopy(keepAliveReq.hostIpv4Addr,
@@ -12490,15 +12708,15 @@
                      HAL_IPV4_ADDR_LEN);
    wpalMemoryCopy(keepAliveReq.destIpv4Addr,
                      pwdiKeepAliveParams->wdiKeepAliveInfo.aDestIpv4Addr,
-                     HAL_IPV4_ADDR_LEN);   
+                     HAL_IPV4_ADDR_LEN);
    wpalMemoryCopy(keepAliveReq.destMacAddr,
                      pwdiKeepAliveParams->wdiKeepAliveInfo.aDestMacAddr,
                      HAL_MAC_ADDR_LEN);
    }
-      
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &keepAliveReq, 
-                   sizeof(keepAliveReq)); 
+
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &keepAliveReq,
+                   sizeof(keepAliveReq));
 
    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_INFO,
                "Process keep alive req %d",sizeof(keepAliveReq));
@@ -12507,46 +12725,46 @@
                "Process keep alive req time period %d",keepAliveReq.timePeriod);
 
    pWDICtx->wdiReqStatusCB     = pwdiKeepAliveParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiKeepAliveParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiKeepAliveParams->pUserData;
 
   WPAL_TRACE(eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_INFO,
                   "Sending keep alive req to HAL");
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiKeepAliveCb, pEventData->pUserData, WDI_KEEP_ALIVE_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiKeepAliveCb, pEventData->pUserData, WDI_KEEP_ALIVE_RESP);
 }/*WDI_ProcessKeepAliveReq*/
 
 
 /**
- @brief Process Wowl add bc ptrn Request function (called 
+ @brief Process Wowl add bc ptrn Request function (called
         when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessWowlAddBcPtrnReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_WowlAddBcPtrnReqParamsType*  pwdiWowlAddBcPtrnParams = NULL;
    WDI_WowlAddBcPtrnCb              wdiWowlAddBcPtrnCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    tHalWowlAddBcastPtrn     wowlAddBcPtrnReq;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiWowlAddBcPtrnParams = (WDI_WowlAddBcPtrnReqParamsType*)pEventData->pEventData)) ||
@@ -12555,14 +12773,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_WOWL_ADD_BC_PTRN_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_WOWL_ADD_BC_PTRN_REQ,
                          sizeof(wowlAddBcPtrnReq),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(wowlAddBcPtrnReq) )))
@@ -12571,16 +12789,16 @@
                   "Unable to get send buffer in Wowl add bc ptrn req %x %x %x",
                   pEventData, pwdiWowlAddBcPtrnParams, wdiWowlAddBcPtrnCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wowlAddBcPtrnReq.ucPatternId = 
+   wowlAddBcPtrnReq.ucPatternId =
       pwdiWowlAddBcPtrnParams->wdiWowlAddBcPtrnInfo.ucPatternId;
-   wowlAddBcPtrnReq.ucPatternByteOffset = 
+   wowlAddBcPtrnReq.ucPatternByteOffset =
       pwdiWowlAddBcPtrnParams->wdiWowlAddBcPtrnInfo.ucPatternByteOffset;
-   wowlAddBcPtrnReq.ucPatternMaskSize = 
+   wowlAddBcPtrnReq.ucPatternMaskSize =
       pwdiWowlAddBcPtrnParams->wdiWowlAddBcPtrnInfo.ucPatternMaskSize;
-   wowlAddBcPtrnReq.ucPatternSize = 
+   wowlAddBcPtrnReq.ucPatternSize =
       pwdiWowlAddBcPtrnParams->wdiWowlAddBcPtrnInfo.ucPatternSize;
 
    if (pwdiWowlAddBcPtrnParams->wdiWowlAddBcPtrnInfo.ucPatternSize <= HAL_WOWL_BCAST_PATTERN_MAX_SIZE)
@@ -12614,42 +12832,42 @@
                    sizeof(wowlAddBcPtrnReq)); 
 
    pWDICtx->wdiReqStatusCB     = pwdiWowlAddBcPtrnParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiWowlAddBcPtrnParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiWowlAddBcPtrnParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiWowlAddBcPtrnCb, pEventData->pUserData, WDI_WOWL_ADD_BC_PTRN_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiWowlAddBcPtrnCb, pEventData->pUserData, WDI_WOWL_ADD_BC_PTRN_RESP);
 }/*WDI_ProcessWowlAddBcPtrnReq*/
 
 /**
- @brief Process Wowl delete bc ptrn Request function (called 
+ @brief Process Wowl delete bc ptrn Request function (called
         when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessWowlDelBcPtrnReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_WowlDelBcPtrnReqParamsType*  pwdiWowlDelBcPtrnParams = NULL;
    WDI_WowlDelBcPtrnCb              wdiWowlDelBcPtrnCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    tHalWowlDelBcastPtrn     wowlDelBcPtrnReq;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiWowlDelBcPtrnParams = (WDI_WowlDelBcPtrnReqParamsType*)pEventData->pEventData)) ||
@@ -12658,14 +12876,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_WOWL_DEL_BC_PTRN_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_WOWL_DEL_BC_PTRN_REQ,
                          sizeof(wowlDelBcPtrnReq),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(wowlDelBcPtrnReq) )))
@@ -12674,52 +12892,52 @@
                   "Unable to get send buffer in Wowl del bc ptrn req %x %x %x",
                   pEventData, pwdiWowlDelBcPtrnParams, wdiWowlDelBcPtrnCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wowlDelBcPtrnReq.ucPatternId = 
+   wowlDelBcPtrnReq.ucPatternId =
       pwdiWowlDelBcPtrnParams->wdiWowlDelBcPtrnInfo.ucPatternId;
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &wowlDelBcPtrnReq, 
-                   sizeof(wowlDelBcPtrnReq)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &wowlDelBcPtrnReq,
+                   sizeof(wowlDelBcPtrnReq));
 
    pWDICtx->wdiReqStatusCB     = pwdiWowlDelBcPtrnParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiWowlDelBcPtrnParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiWowlDelBcPtrnParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiWowlDelBcPtrnCb, pEventData->pUserData, WDI_WOWL_DEL_BC_PTRN_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiWowlDelBcPtrnCb, pEventData->pUserData, WDI_WOWL_DEL_BC_PTRN_RESP);
 }/*WDI_ProcessWowlDelBcPtrnReq*/
 
 /**
- @brief Process Wowl enter Request function (called 
+ @brief Process Wowl enter Request function (called
         when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessWowlEnterReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_WowlEnterReqParamsType*  pwdiWowlEnterParams = NULL;
    WDI_WowlEnterReqCb           wdiWowlEnterCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    tHalWowlEnterParams      wowlEnterReq;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiWowlEnterParams = (WDI_WowlEnterReqParamsType*)pEventData->pEventData)) ||
@@ -12728,14 +12946,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_WOWL_ENTER_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_WOWL_ENTER_REQ,
                          sizeof(wowlEnterReq),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(wowlEnterReq) )))
@@ -12744,24 +12962,24 @@
                   "Unable to get send buffer in Wowl enter req %x %x %x",
                   pEventData, pwdiWowlEnterParams, wdiWowlEnterCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wowlEnterReq.ucMagicPktEnable = 
+   wowlEnterReq.ucMagicPktEnable =
       pwdiWowlEnterParams->wdiWowlEnterInfo.ucMagicPktEnable;
-   wowlEnterReq.ucPatternFilteringEnable = 
+   wowlEnterReq.ucPatternFilteringEnable =
       pwdiWowlEnterParams->wdiWowlEnterInfo.ucPatternFilteringEnable;
-   wowlEnterReq.ucUcastPatternFilteringEnable = 
+   wowlEnterReq.ucUcastPatternFilteringEnable =
       pwdiWowlEnterParams->wdiWowlEnterInfo.ucUcastPatternFilteringEnable;
-   wowlEnterReq.ucWowChnlSwitchRcv = 
+   wowlEnterReq.ucWowChnlSwitchRcv =
       pwdiWowlEnterParams->wdiWowlEnterInfo.ucWowChnlSwitchRcv;
-   wowlEnterReq.ucWowDeauthRcv = 
+   wowlEnterReq.ucWowDeauthRcv =
       pwdiWowlEnterParams->wdiWowlEnterInfo.ucWowDeauthRcv;
-   wowlEnterReq.ucWowDisassocRcv = 
+   wowlEnterReq.ucWowDisassocRcv =
       pwdiWowlEnterParams->wdiWowlEnterInfo.ucWowDisassocRcv;
-   wowlEnterReq.ucWowMaxMissedBeacons = 
+   wowlEnterReq.ucWowMaxMissedBeacons =
       pwdiWowlEnterParams->wdiWowlEnterInfo.ucWowMaxMissedBeacons;
-   wowlEnterReq.ucWowMaxSleepUsec = 
+   wowlEnterReq.ucWowMaxSleepUsec =
       pwdiWowlEnterParams->wdiWowlEnterInfo.ucWowMaxSleepUsec;
 
 #ifdef WLAN_WAKEUP_EVENTS
@@ -12785,45 +13003,45 @@
                   pwdiWowlEnterParams->wdiWowlEnterInfo.magicPtrn,
                   sizeof(tSirMacAddr));
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &wowlEnterReq, 
-                   sizeof(wowlEnterReq)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &wowlEnterReq,
+                   sizeof(wowlEnterReq));
 
    pWDICtx->wdiReqStatusCB     = pwdiWowlEnterParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiWowlEnterParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiWowlEnterParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiWowlEnterCb, pEventData->pUserData, WDI_WOWL_ENTER_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiWowlEnterCb, pEventData->pUserData, WDI_WOWL_ENTER_RESP);
 }/*WDI_ProcessWowlEnterReq*/
 
 /**
  @brief Process Wowl exit Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessWowlExitReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_WowlExitReqCb           wdiWowlExitCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (wdiWowlExitCb   = (WDI_WowlExitReqCb)pEventData->pCBfnc)))
@@ -12831,14 +13049,14 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
-     ! TO DO : proper conversion into the HAL Message Request Format 
+     ! TO DO : proper conversion into the HAL Message Request Format
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_WOWL_EXIT_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_WOWL_EXIT_REQ,
                                                      0,
                                                      &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset )))
@@ -12847,43 +13065,43 @@
                "Unable to get send buffer in Wowl Exit req %x %x",
                  pEventData, wdiWowlExitCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiWowlExitCb, pEventData->pUserData, WDI_WOWL_EXIT_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiWowlExitCb, pEventData->pUserData, WDI_WOWL_EXIT_RESP);
 }/*WDI_ProcessWowlExitReq*/
 
 /**
  @brief Process Configure Apps Cpu Wakeup State Request function
         (called when Main FSM allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessConfigureAppsCpuWakeupStateReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_ConfigureAppsCpuWakeupStateReqParamsType*  pwdiAppsCpuWakeupStateParams = NULL;
    WDI_ConfigureAppsCpuWakeupStateCb              wdiConfigureAppsCpuWakeupStateCb = NULL;
-   wpt_uint8*               pSendBuffer         = NULL; 
+   wpt_uint8*               pSendBuffer         = NULL;
    wpt_uint16               usDataOffset        = 0;
    wpt_uint16               usSendSize          = 0;
    tHalConfigureAppsCpuWakeupStateReqParams  halCfgAppsCpuWakeupStateReqParams;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiAppsCpuWakeupStateParams = (WDI_ConfigureAppsCpuWakeupStateReqParamsType*)pEventData->pEventData)) ||
@@ -12892,13 +13110,13 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_CONFIGURE_APPS_CPU_WAKEUP_STATE_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_CONFIGURE_APPS_CPU_WAKEUP_STATE_REQ,
                          sizeof(halCfgAppsCpuWakeupStateReqParams),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(pwdiAppsCpuWakeupStateParams->bIsAppsAwake) )))
@@ -12907,60 +13125,60 @@
                "Unable to get send buffer in Apps CPU Wakeup State req %x %x %x",
                  pEventData, pwdiAppsCpuWakeupStateParams, wdiConfigureAppsCpuWakeupStateCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   halCfgAppsCpuWakeupStateReqParams.isAppsCpuAwake = 
+   halCfgAppsCpuWakeupStateReqParams.isAppsCpuAwake =
                            pwdiAppsCpuWakeupStateParams->bIsAppsAwake;
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &halCfgAppsCpuWakeupStateReqParams, 
-                   sizeof(halCfgAppsCpuWakeupStateReqParams)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &halCfgAppsCpuWakeupStateReqParams,
+                   sizeof(halCfgAppsCpuWakeupStateReqParams));
 
    pWDICtx->wdiReqStatusCB     = pwdiAppsCpuWakeupStateParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiAppsCpuWakeupStateParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiAppsCpuWakeupStateParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiConfigureAppsCpuWakeupStateCb, pEventData->pUserData, 
-                        WDI_CONFIGURE_APPS_CPU_WAKEUP_STATE_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiConfigureAppsCpuWakeupStateCb, pEventData->pUserData,
+                        WDI_CONFIGURE_APPS_CPU_WAKEUP_STATE_RESP);
 }/*WDI_ProcessConfigureAppsCpuWakeupStateReq*/
 
 #ifdef WLAN_FEATURE_VOWIFI_11R
 /**
  @brief Process Aggregated Add TSpec Request function (called when Main FSM
         allows it)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessAggrAddTSpecReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_AggrAddTSReqParamsType*  pwdiAggrAddTSParams;
   WDI_AggrAddTsRspCb           wdiAggrAddTSRspCb;
-  wpt_uint8                ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*      pBSSSes             = NULL;
-  wpt_uint8*               pSendBuffer         = NULL; 
+  wpt_uint8*               pSendBuffer         = NULL;
   wpt_uint16               usDataOffset        = 0;
   wpt_uint16               usSendSize          = 0;
-  WDI_Status               wdiStatus           = WDI_STATUS_SUCCESS; 
+  WDI_Status               wdiStatus           = WDI_STATUS_SUCCESS;
   wpt_macAddr              macBSSID;
   tAggrAddTsReq            halAggrAddTsReq;
   int i;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ) ||
       ( NULL == pEventData->pCBfnc ))
@@ -12968,60 +13186,62 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
   wpalMemoryFill( &halAggrAddTsReq, sizeof(tAggrAddTsReq), 0 );
   pwdiAggrAddTSParams = (WDI_AggrAddTSReqParamsType*)pEventData->pEventData;
   wdiAggrAddTSRspCb   = (WDI_AggrAddTsRspCb)pEventData->pCBfnc;
   /*-------------------------------------------------------------------------
     Check to see if we are in the middle of an association, if so queue, if
-    not it means it is free to process request 
+    not it means it is free to process request
   -------------------------------------------------------------------------*/
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
     Find the BSS for which the request is made and identify WDI session
   ------------------------------------------------------------------------*/
-  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx, 
-                                        pwdiAggrAddTSParams->wdiAggrTsInfo.ucSTAIdx, 
+  if ( WDI_STATUS_SUCCESS != WDI_STATableGetStaBSSIDAddr(pWDICtx,
+                                        pwdiAggrAddTSParams->wdiAggrTsInfo.ucSTAIdx,
                                         &macBSSID))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
              "This station does not exist in the WDI Station Table %d");
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes); 
-  if ( NULL == pBSSSes ) 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, macBSSID, &pBSSSes);
+  if ( NULL == pBSSSes )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
+        "%s: Association sequence for this BSS does not yet exist. macBSSID " MAC_ADDRESS_STR, 
+        __func__, MAC_ADDR_ARRAY(macBSSID));
 
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
- 
+
   /*------------------------------------------------------------------------
     Check if this BSS is being currently processed or queued,
-    if queued - queue the new request as well 
+    if queued - queue the new request as well
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_TRUE == pBSSSes->bAssocReqQueued )
   {
-    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS exists but currently queued");
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+              "%s: Association sequence for this BSS exists but currently queued. macBSSID " MAC_ADDRESS_STR,
+              __func__, MAC_ADDR_ARRAY(macBSSID));
 
-    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData); 
+    wdiStatus = WDI_QueueAssocRequest( pWDICtx, pBSSSes, pEventData);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return wdiStatus; 
+    return wdiStatus;
   }
 
   wpalMutexRelease(&pWDICtx->wptMutex);
   /*-----------------------------------------------------------------------
     Get message buffer
-    ! TO DO : proper conversion into the HAL Message Request Format 
+    ! TO DO : proper conversion into the HAL Message Request Format
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_AGGR_ADD_TS_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_AGGR_ADD_TS_REQ,
                         sizeof(tAggrAddTsParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
       ( usSendSize < (usDataOffset + sizeof(tAggrAddTsParams) )))
@@ -13030,95 +13250,95 @@
               "Unable to get send buffer in set bss key req %x %x %x",
                 pEventData, pwdiAggrAddTSParams, wdiAggrAddTSRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  halAggrAddTsReq.aggrAddTsParam.staIdx = 
+  halAggrAddTsReq.aggrAddTsParam.staIdx =
      pwdiAggrAddTSParams->wdiAggrTsInfo.ucSTAIdx;
-  halAggrAddTsReq.aggrAddTsParam.tspecIdx = 
+  halAggrAddTsReq.aggrAddTsParam.tspecIdx =
      pwdiAggrAddTSParams->wdiAggrTsInfo.ucTspecIdx;
 
   for( i = 0; i < WLAN_HAL_MAX_AC; i++ )
   {
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].type = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].type =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].ucType;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].length = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].length =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].ucLength;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.ackPolicy = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.ackPolicy =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiTraffic.
         ackPolicy;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.accessPolicy = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.accessPolicy =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiTraffic.
         accessPolicy;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.userPrio = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.userPrio =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiTraffic.
         userPrio;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.psb = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.psb =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiTraffic.
         psb;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.aggregation = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.aggregation =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiTraffic.
         aggregation;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.direction = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.direction =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiTraffic.
         direction;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.tsid = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.tsid =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiTraffic.
         trafficType;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.tsid = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.traffic.tsid =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiTraffic.
         trafficType;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.schedule.rsvd = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.schedule.rsvd =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiSchedule.rsvd;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.schedule.schedule = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].tsinfo.schedule.schedule =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].wdiTSinfo.wdiSchedule.schedule;
-        
-                  
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].nomMsduSz = 
+
+
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].nomMsduSz =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].usNomMsduSz;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].maxMsduSz = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].maxMsduSz =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].usMaxMsduSz;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].minSvcInterval = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].minSvcInterval =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].uMinSvcInterval;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].maxSvcInterval = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].maxSvcInterval =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].uMaxSvcInterval;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].inactInterval = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].inactInterval =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].uInactInterval;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].suspendInterval = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].suspendInterval =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].uSuspendInterval;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].svcStartTime = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].svcStartTime =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].uSvcStartTime;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].minDataRate = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].minDataRate =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].uMinDataRate;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].meanDataRate = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].meanDataRate =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].uMeanDataRate;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].peakDataRate = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].peakDataRate =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].uPeakDataRate;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].maxBurstSz = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].maxBurstSz =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].uMaxBurstSz;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].delayBound = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].delayBound =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].uDelayBound;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].minPhyRate = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].minPhyRate =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].uMinPhyRate;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].surplusBw = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].surplusBw =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].usSurplusBw;
-     halAggrAddTsReq.aggrAddTsParam.tspec[i].mediumTime = 
+     halAggrAddTsReq.aggrAddTsParam.tspec[i].mediumTime =
         pwdiAggrAddTSParams->wdiAggrTsInfo.wdiTspecIE[i].usMediumTime;
   }
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halAggrAddTsReq, 
-                  sizeof(halAggrAddTsReq)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halAggrAddTsReq,
+                  sizeof(halAggrAddTsReq));
 
   pWDICtx->wdiReqStatusCB     = pwdiAggrAddTSParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiAggrAddTSParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiAggrAddTSParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Add TS Request to HAL 
+    Send Add TS Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                        wdiAggrAddTSRspCb, pEventData->pUserData,
-                       WDI_AGGR_ADD_TS_RESP); 
+                       WDI_AGGR_ADD_TS_RESP);
 }/*WDI_ProcessAggrAddTSpecReq*/
 #endif /* WLAN_FEATURE_VOWIFI_11R */
 
@@ -13145,7 +13365,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
      -------------------------------------------------------------------------*/
    if ( NULL == pEventData )
    {
@@ -13195,29 +13415,29 @@
    wpalMutexRelease(&pWDICtx->wptMutex);
 
    /*Make sure the expected state is properly defaulted to Init*/
-   pWDICtx->ucExpectedStateTransition = WDI_INIT_ST; 
+   pWDICtx->ucExpectedStateTransition = WDI_INIT_ST;
 
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessShutdownReq*/
 
 /*========================================================================
-          Main DAL Control Path Response Processing API 
+          Main DAL Control Path Response Processing API
 ========================================================================*/
 
 /**
  @brief Process Start Response function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessStartRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -13232,9 +13452,9 @@
 #endif
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  wdiStartRspCb = (WDI_StartRspCb)pWDICtx->pfncRspCB; 
+  wdiStartRspCb = (WDI_StartRspCb)pWDICtx->pfncRspCB;
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData) ||
@@ -13243,7 +13463,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
@@ -13256,12 +13476,12 @@
                  "Invalid response length in Start Resp Expect %x Rcvd %x",
                  sizeof(tHalMacStartRspParams), pEventData->uEventDataSize);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
     Unpack HAL Response Message - the header was already extracted by the
-    main Response Handling procedure 
+    main Response Handling procedure
   -------------------------------------------------------------------------*/
   startRspParams = (tHalMacStartRspParams *) pEventData->pEventData;
 
@@ -13294,7 +13514,7 @@
 
     /*Cache the start response for further use*/
     wpalMemoryCopy( &pWDICtx->wdiCachedStartRspParams ,
-                  &wdiRspParams, 
+                  &wdiRspParams,
                   sizeof(pWDICtx->wdiCachedStartRspParams));
 
   }
@@ -13313,14 +13533,14 @@
 
      /*Notify UMAC*/
     wdiStartRspCb( &wdiRspParams, pWDICtx->pRspCBUserData);
-    
+
     WDI_DetectedDeviceError(pWDICtx, wdiRspParams.wdiStatus);
 
     /*Although the response is an error - it was processed by our function
     so as far as the caller is concerned this is a succesful reponse processing*/
     return WDI_STATUS_SUCCESS;
   }
-  
+
   wpalMutexRelease(&pWDICtx->wptMutex);
 
   if(eDRIVER_TYPE_MFG == pWDICtx->driverMode)
@@ -13373,23 +13593,23 @@
   /*Notify UMAC*/
   wdiStartRspCb( &wdiRspParams, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessStartRsp*/
 
 
 /**
  @brief Process Stop Response function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessStopRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -13397,12 +13617,12 @@
   WDI_Status          wdiStatus;
   WDI_StopRspCb       wdiStopRspCb = NULL;
 
-  tHalMacStopRspMsg   halMacStopRspMsg; 
+  tHalMacStopRspMsg   halMacStopRspMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  wdiStopRspCb = (WDI_StopRspCb)pWDICtx->pfncRspCB; 
+  wdiStopRspCb = (WDI_StopRspCb)pWDICtx->pfncRspCB;
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData) ||
@@ -13411,7 +13631,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
@@ -13423,23 +13643,23 @@
               "Invalid response length in Stop Resp %x %x",
                 pEventData->uEventDataSize);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
     Unpack HAL Response Message - the header was already extracted by the
-    main Response Handling procedure 
+    main Response Handling procedure
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halMacStopRspMsg.stopRspParams,  
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halMacStopRspMsg.stopRspParams,
+                  pEventData->pEventData,
                   sizeof(halMacStopRspMsg.stopRspParams));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halMacStopRspMsg.stopRspParams.status); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halMacStopRspMsg.stopRspParams.status);
 
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*--------------------------------------------------------------------------
-    Check to see if the stop went OK 
+    Check to see if the stop went OK
   --------------------------------------------------------------------------*/
   if ( WDI_STATUS_SUCCESS != wdiStatus  )
   {
@@ -13448,12 +13668,12 @@
                WDI_getHALStatusMsgString(halMacStopRspMsg.stopRspParams.status),
                halMacStopRspMsg.stopRspParams.status);
 
-    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE); 
-    
+    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE);
+
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
-  
+
   pWDICtx->ucExpectedStateTransition = WDI_STOPPED_ST;
 
   /*Transition now as WDI may get preempted imediately after it sends
@@ -13467,22 +13687,22 @@
   /*Notify UMAC*/
   wdiStopRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessStopRsp*/
 
 /**
  @brief Process Close Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessCloseRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -13490,38 +13710,38 @@
   /*There is no close response comming from HAL - function just kept for
   simmetry */
   WDI_ASSERT(0);
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessCloseRsp*/
 
 
 /*============================================================================
-                      SCAN RESPONSE PROCESSING API 
+                      SCAN RESPONSE PROCESSING API
 ============================================================================*/
 
 /**
  @brief Process Init Scan Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessInitScanRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_Status            wdiStatus;
   WDI_InitScanRspCb     wdiInitScanRspCb;
-  tHalInitScanRspMsg    halInitScanRspMsg; 
+  tHalInitScanRspMsg    halInitScanRspMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -13529,7 +13749,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiInitScanRspCb = (WDI_InitScanRspCb)pWDICtx->pfncRspCB;
@@ -13538,18 +13758,18 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
                  "%s: call back function is NULL", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
     Unpack HAL Response Message - the header was already extracted by the
-    main Response Handling procedure 
+    main Response Handling procedure
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halInitScanRspMsg.initScanRspParams, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halInitScanRspMsg.initScanRspParams,
+                  pEventData->pEventData,
                   sizeof(halInitScanRspMsg.initScanRspParams));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halInitScanRspMsg.initScanRspParams.status); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halInitScanRspMsg.initScanRspParams.status);
 
   if ( pWDICtx->bInBmps )
   {
@@ -13560,35 +13780,35 @@
   /*Notify UMAC*/
   wdiInitScanRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessInitScanRsp*/
 
 
 /**
  @brief Process Start Scan Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessStartScanRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_StartScanRspParamsType   wdiStartScanParams;
   WDI_StartScanRspCb           wdiStartScanRspCb;
-  
-  tHalStartScanRspMsg          halStartScanRspMsg; 
+
+  tHalStartScanRspMsg          halStartScanRspMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -13596,7 +13816,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiStartScanRspCb = (WDI_StartScanRspCb)pWDICtx->pfncRspCB;
@@ -13605,25 +13825,25 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
                  "%s: call back function is NULL", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halStartScanRspMsg.startScanRspParams, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halStartScanRspMsg.startScanRspParams,
+                  pEventData->pEventData,
                   sizeof(halStartScanRspMsg.startScanRspParams));
 
   wdiStartScanParams.wdiStatus   =   WDI_HAL_2_WDI_STATUS(
                              halStartScanRspMsg.startScanRspParams.status);
 #ifdef WLAN_FEATURE_VOWIFI
-  wdiStartScanParams.ucTxMgmtPower = 
+  wdiStartScanParams.ucTxMgmtPower =
                              halStartScanRspMsg.startScanRspParams.txMgmtPower;
-  wpalMemoryCopy( wdiStartScanParams.aStartTSF, 
+  wpalMemoryCopy( wdiStartScanParams.aStartTSF,
                   halStartScanRspMsg.startScanRspParams.startTSF,
                   2);
-#endif 
+#endif
 
   if ( eHAL_STATUS_SUCCESS != halStartScanRspMsg.startScanRspParams.status )
   {
@@ -13637,24 +13857,24 @@
   /*Notify UMAC*/
   wdiStartScanRspCb( &wdiStartScanParams, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 
 }/*WDI_ProcessStartScanRsp*/
 
 
 /**
- @brief Process End Scan Response function (called when a 
+ @brief Process End Scan Response function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessEndScanRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -13665,7 +13885,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -13673,7 +13893,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiEndScanRspCb = (WDI_EndScanRspCb)pWDICtx->pfncRspCB;
@@ -13681,11 +13901,11 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halEndScanRspMsg.endScanRspParams, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halEndScanRspMsg.endScanRspParams,
+                  pEventData->pEventData,
                   sizeof(halEndScanRspMsg.endScanRspParams));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halEndScanRspMsg.endScanRspParams.status); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halEndScanRspMsg.endScanRspParams.status);
 
   if ( eHAL_STATUS_SUCCESS != halEndScanRspMsg.endScanRspParams.status )
   {
@@ -13699,35 +13919,35 @@
   /*Notify UMAC*/
   wdiEndScanRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessEndScanRsp*/
 
 
 /**
- @brief Process Finish Scan Response function (called when a 
+ @brief Process Finish Scan Response function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessFinishScanRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
-)  
+)
 {
   WDI_Status            wdiStatus;
   WDI_FinishScanRspCb   wdiFinishScanRspCb;
-  
-  tHalFinishScanRspMsg  halFinishScanRspMsg; 
+
+  tHalFinishScanRspMsg  halFinishScanRspMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -13735,7 +13955,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiFinishScanRspCb = (WDI_FinishScanRspCb)pWDICtx->pfncRspCB;
@@ -13743,14 +13963,14 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( (void *)&halFinishScanRspMsg.finishScanRspParams.status, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( (void *)&halFinishScanRspMsg.finishScanRspParams.status,
+                  pEventData->pEventData,
                   sizeof(halFinishScanRspMsg.finishScanRspParams.status));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halFinishScanRspMsg.finishScanRspParams.status); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halFinishScanRspMsg.finishScanRspParams.status);
 
   WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_INFO_LOW,
-              "Finish scan response reported status: %d", 
+              "Finish scan response reported status: %d",
               halFinishScanRspMsg.finishScanRspParams.status);
 
   if (( eHAL_STATUS_SUCCESS != halFinishScanRspMsg.finishScanRspParams.status )&&
@@ -13766,22 +13986,22 @@
   /*Notify UMAC*/
   wdiFinishScanRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessFinishScanRsp*/
 
 /**
  @brief Process Join Response function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessJoinRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -13789,12 +14009,12 @@
   WDI_Status                    wdiStatus;
   WDI_JoinRspCb                 wdiJoinRspCb;
   WDI_BSSSessionType*           pBSSSes             = NULL;
-  
-  tHalJoinRspMsg                halJoinRspMsg; 
+
+  tHalJoinRspMsg                halJoinRspMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) ||
       ( NULL == pWDICtx->pfncRspCB ) ||
@@ -13804,7 +14024,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiJoinRspCb = (WDI_JoinRspCb)pWDICtx->pfncRspCB;
@@ -13812,34 +14032,35 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halJoinRspMsg.joinRspParams, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halJoinRspMsg.joinRspParams,
+                  pEventData->pEventData,
                   sizeof(halJoinRspMsg.joinRspParams));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halJoinRspMsg.joinRspParams.status); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halJoinRspMsg.joinRspParams.status);
 
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*-----------------------------------------------------------------------
     Join response can only be received for an existing assoc that
-    is current and in progress 
+    is current and in progress
     -----------------------------------------------------------------------*/
-  if (( !WDI_VALID_SESSION_IDX(pWDICtx->ucCurrentBSSSesIdx )) || 
+  if (( !WDI_VALID_SESSION_IDX(pWDICtx->ucCurrentBSSSesIdx )) ||
       ( eWLAN_PAL_FALSE == pWDICtx->bAssociationInProgress ))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Association sequence for this BSS does not yet exist or "
-              "association no longer in progress - mysterious HAL response");
+              "%s: Association sequence for this BSS does not yet exist (bssIdx %d) or "
+              "association no longer in progress %d - mysterious HAL response",
+              __func__, pWDICtx->ucCurrentBSSSesIdx, pWDICtx->bAssociationInProgress);
 
-    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE); 
+    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE);
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   pBSSSes = &pWDICtx->aBSSSessions[pWDICtx->ucCurrentBSSSesIdx];
 
   /*-----------------------------------------------------------------------
-    Join Response is only allowed in init state 
+    Join Response is only allowed in init state
   -----------------------------------------------------------------------*/
   if ( WDI_ASSOC_JOINING_ST != pBSSSes->wdiAssocState)
   {
@@ -13847,15 +14068,15 @@
               "Join only allowed in Joining state - failure state is %d "
               "strange HAL response", pBSSSes->wdiAssocState);
 
-    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE); 
-    
+    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE);
+
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
 
   /*-----------------------------------------------------------------------
-    If assoc has failed the current session will be deleted 
+    If assoc has failed the current session will be deleted
   -----------------------------------------------------------------------*/
   if ( WDI_STATUS_SUCCESS != wdiStatus )
   {
@@ -13867,13 +14088,13 @@
 
     /*Association no longer in progress - prepare pending assoc for processing*/
     WDI_DequeueAssocRequest(pWDICtx);
-  
+
   }
   else
   {
     /*Transition to state Joining - this may be redundant as we are supposed
       to be in this state already - but just to be safe*/
-    pBSSSes->wdiAssocState = WDI_ASSOC_JOINING_ST; 
+    pBSSSes->wdiAssocState = WDI_ASSOC_JOINING_ST;
   }
 
   wpalMutexRelease(&pWDICtx->wptMutex);
@@ -13881,40 +14102,40 @@
   /*Notify UMAC*/
   wdiJoinRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessJoinRsp*/
 
 
 /**
- @brief Process Config BSS Response function (called when a 
+ @brief Process Config BSS Response function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessConfigBSSRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_ConfigBSSRspParamsType    wdiConfigBSSParams;
   WDI_ConfigBSSRspCb            wdiConfigBSSRspCb;
-  wpt_uint8                     ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                     ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*           pBSSSes             = NULL;
 
-  tConfigBssRspMsg              halConfigBssRspMsg; 
+  tConfigBssRspMsg              halConfigBssRspMsg;
   WDI_AddStaParams              wdiBcastAddSTAParam = {0};
   WDI_AddStaParams              wdiAddSTAParam = {0};
-  
+
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -13922,141 +14143,141 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiConfigBSSRspCb = (WDI_ConfigBSSRspCb)pWDICtx->pfncRspCB;
 
   /*-------------------------------------------------------------------------
-    Extract response and send it to UMAC 
+    Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halConfigBssRspMsg.configBssRspParams, 
-                   pEventData->pEventData, 
+  wpalMemoryCopy( &halConfigBssRspMsg.configBssRspParams,
+                   pEventData->pEventData,
                    sizeof(halConfigBssRspMsg.configBssRspParams));
 
   wdiConfigBSSParams.wdiStatus = WDI_HAL_2_WDI_STATUS(
                             halConfigBssRspMsg.configBssRspParams.status);
   if(WDI_STATUS_SUCCESS == wdiConfigBSSParams.wdiStatus)
   {
-    wpalMemoryCopy( wdiConfigBSSParams.macBSSID, 
+    wpalMemoryCopy( wdiConfigBSSParams.macBSSID,
                     pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.macBSSID,
                     WDI_MAC_ADDR_LEN);
-  
+
     wdiConfigBSSParams.ucBSSIdx = halConfigBssRspMsg.configBssRspParams.bssIdx;
-  
-    wdiConfigBSSParams.ucBcastSig = 
+
+    wdiConfigBSSParams.ucBcastSig =
        halConfigBssRspMsg.configBssRspParams.bcastDpuSignature;
-  
-    wdiConfigBSSParams.ucUcastSig = 
+
+    wdiConfigBSSParams.ucUcastSig =
        halConfigBssRspMsg.configBssRspParams.ucastDpuSignature;
-  
+
     wdiConfigBSSParams.ucSTAIdx = halConfigBssRspMsg.configBssRspParams.bssStaIdx;
-  
+
   #ifdef WLAN_FEATURE_VOWIFI
-    wdiConfigBSSParams.ucTxMgmtPower = 
+    wdiConfigBSSParams.ucTxMgmtPower =
                                halConfigBssRspMsg.configBssRspParams.txMgmtPower;
   #endif
      wpalMemoryCopy( wdiConfigBSSParams.macSTA,
                      halConfigBssRspMsg.configBssRspParams.staMac,
                      WDI_MAC_ADDR_LEN );
-  
+
     wpalMutexAcquire(&pWDICtx->wptMutex);
     /*------------------------------------------------------------------------
-      Find the BSS for which the request is made 
+      Find the BSS for which the request is made
     ------------------------------------------------------------------------*/
-    ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
-                                               wdiConfigBSSParams.macBSSID, 
-                                              &pBSSSes); 
-  
+    ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
+                                               wdiConfigBSSParams.macBSSID,
+                                              &pBSSSes);
+
     /*-----------------------------------------------------------------------
       Config BSS response can only be received for an existing assoc that
-      is current and in progress 
+      is current and in progress
       -----------------------------------------------------------------------*/
     if ( NULL == pBSSSes )
     {
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                 "Association sequence for this BSS does not yet exist "
                 "- mysterious HAL response");
-  
-      WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE); 
-      
+
+      WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE);
+
       wpalMutexRelease(&pWDICtx->wptMutex);
-      return WDI_STATUS_E_NOT_ALLOWED; 
+      return WDI_STATUS_E_NOT_ALLOWED;
     }
-  
+
     /*Save data for this BSS*/
     pBSSSes->wdiBssType = pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.wdiBSSType;
     pBSSSes->ucBSSIdx = halConfigBssRspMsg.configBssRspParams.bssIdx;
-    pBSSSes->bcastDpuIndex     = 
+    pBSSSes->bcastDpuIndex     =
       halConfigBssRspMsg.configBssRspParams.bcastDpuDescIndx;
-    pBSSSes->bcastDpuSignature = 
+    pBSSSes->bcastDpuSignature =
       halConfigBssRspMsg.configBssRspParams.bcastDpuSignature;
-    pBSSSes->bcastMgmtDpuIndex = 
+    pBSSSes->bcastMgmtDpuIndex =
       halConfigBssRspMsg.configBssRspParams.mgmtDpuDescIndx;
-    pBSSSes->bcastMgmtDpuSignature = 
+    pBSSSes->bcastMgmtDpuSignature =
       halConfigBssRspMsg.configBssRspParams.mgmtDpuSignature;
-    pBSSSes->ucRmfEnabled      = 
+    pBSSSes->ucRmfEnabled      =
       pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.ucRMFEnabled;
     pBSSSes->bcastStaIdx =
        halConfigBssRspMsg.configBssRspParams.bssBcastStaIdx;
-  
+
     /* !TO DO: Shuould we be updating the RMF Capability of self STA here? */
-  
+
     /*-------------------------------------------------------------------------
         Add Peer STA
       -------------------------------------------------------------------------*/
-    wdiAddSTAParam.ucSTAIdx = halConfigBssRspMsg.configBssRspParams.bssStaIdx; 
+    wdiAddSTAParam.ucSTAIdx = halConfigBssRspMsg.configBssRspParams.bssStaIdx;
     wdiAddSTAParam.dpuIndex = halConfigBssRspMsg.configBssRspParams.dpuDescIndx;
     wdiAddSTAParam.dpuSig   = halConfigBssRspMsg.configBssRspParams.ucastDpuSignature;
-     
+
      /*This info can be retrieved from the cached initial request*/
-    wdiAddSTAParam.ucWmmEnabled = 
+    wdiAddSTAParam.ucWmmEnabled =
         pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.wdiSTAContext.ucWMMEnabled;
-    wdiAddSTAParam.ucHTCapable  = 
-        pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.wdiSTAContext.ucHTCapable; 
-    wdiAddSTAParam.ucStaType    = 
-        pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.wdiSTAContext.wdiSTAType;  
-  
+    wdiAddSTAParam.ucHTCapable  =
+        pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.wdiSTAContext.ucHTCapable;
+    wdiAddSTAParam.ucStaType    =
+        pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.wdiSTAContext.wdiSTAType;
+
      /* MAC Address of STA */
-    wpalMemoryCopy(wdiAddSTAParam.staMacAddr, 
-                   halConfigBssRspMsg.configBssRspParams.staMac, 
+    wpalMemoryCopy(wdiAddSTAParam.staMacAddr,
+                   halConfigBssRspMsg.configBssRspParams.staMac,
                    WDI_MAC_ADDR_LEN);
-  
-    wpalMemoryCopy(wdiAddSTAParam.macBSSID, 
-                   pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.wdiSTAContext.macBSSID , 
-                   WDI_MAC_ADDR_LEN); 
-     
+
+    wpalMemoryCopy(wdiAddSTAParam.macBSSID,
+                   pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.wdiSTAContext.macBSSID ,
+                   WDI_MAC_ADDR_LEN);
+
     /*Add BSS specific parameters*/
-    wdiAddSTAParam.bcastMgmtDpuIndex     = 
+    wdiAddSTAParam.bcastMgmtDpuIndex     =
         halConfigBssRspMsg.configBssRspParams.mgmtDpuDescIndx;
-    wdiAddSTAParam.bcastMgmtDpuSignature = 
+    wdiAddSTAParam.bcastMgmtDpuSignature =
         halConfigBssRspMsg.configBssRspParams.mgmtDpuSignature;
-    wdiAddSTAParam.bcastDpuIndex         = 
+    wdiAddSTAParam.bcastDpuIndex         =
         halConfigBssRspMsg.configBssRspParams.bcastDpuDescIndx;
-    wdiAddSTAParam.bcastDpuSignature     = 
+    wdiAddSTAParam.bcastDpuSignature     =
         halConfigBssRspMsg.configBssRspParams.bcastDpuSignature;
-    wdiAddSTAParam.ucRmfEnabled          =  
+    wdiAddSTAParam.ucRmfEnabled          =
         pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.ucRMFEnabled;
-    wdiAddSTAParam.ucBSSIdx = 
+    wdiAddSTAParam.ucBSSIdx =
        halConfigBssRspMsg.configBssRspParams.bssIdx;
-  
+
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
                 "Add STA to the table index: %d", wdiAddSTAParam.ucSTAIdx );
-  
+
     WDI_STATableAddSta(pWDICtx,&wdiAddSTAParam);
     /*-------------------------------------------------------------------------
         Add Broadcast STA only in AP mode
       -------------------------------------------------------------------------*/
-    if( pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.ucOperMode == 
+    if( pWDICtx->wdiCachedConfigBssReq.wdiReqInfo.ucOperMode ==
         WDI_BSS_OPERATIONAL_MODE_AP )
     {
        WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
                   "Add BCAST STA to table for index: %d",
                   halConfigBssRspMsg.configBssRspParams.bssBcastStaIdx );
-  
-       wpalMemoryCopy( &wdiBcastAddSTAParam, &wdiAddSTAParam, 
+
+       wpalMemoryCopy( &wdiBcastAddSTAParam, &wdiAddSTAParam,
                        sizeof(WDI_AddStaParams) );
-  
+
        WDI_AddBcastSTAtoSTATable( pWDICtx, &wdiBcastAddSTAParam,
                                   halConfigBssRspMsg.configBssRspParams.bssBcastStaIdx );
     }
@@ -14067,10 +14288,10 @@
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                   "Config BSS RSP failed with status : %s(%d)",
                   WDI_getHALStatusMsgString(
-                  halConfigBssRspMsg.configBssRspParams.status), 
+                  halConfigBssRspMsg.configBssRspParams.status),
                   halConfigBssRspMsg.configBssRspParams.status);
 
-    
+
     /*Association was failed by HAL - remove session*/
     WDI_DeleteSession(pWDICtx, pBSSSes);
 
@@ -14085,37 +14306,37 @@
   /*Notify UMAC*/
   wdiConfigBSSRspCb( &wdiConfigBSSParams, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessConfigBSSRsp*/
 
 
 /**
  @brief Process Del BSS Response function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessDelBSSRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_DelBSSRspParamsType       wdiDelBSSParams;
   WDI_DelBSSRspCb               wdiDelBSSRspCb;
-  wpt_uint8                     ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                     ucCurrentBSSSesIdx  = 0;
   WDI_BSSSessionType*           pBSSSes             = NULL;
 
-  tDeleteBssRspMsg              halDelBssRspMsg; 
+  tDeleteBssRspMsg              halDelBssRspMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14123,34 +14344,34 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiDelBSSRspCb = (WDI_DelBSSRspCb)pWDICtx->pfncRspCB;
 
   /*-------------------------------------------------------------------------
-    Extract response and send it to UMAC 
+    Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halDelBssRspMsg.deleteBssRspParams, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halDelBssRspMsg.deleteBssRspParams,
+                  pEventData->pEventData,
                   sizeof(halDelBssRspMsg.deleteBssRspParams));
 
 
   wdiDelBSSParams.wdiStatus   =   WDI_HAL_2_WDI_STATUS(
-                                 halDelBssRspMsg.deleteBssRspParams.status); 
+                                 halDelBssRspMsg.deleteBssRspParams.status);
 
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSessionByBSSIdx( pWDICtx, 
-                             halDelBssRspMsg.deleteBssRspParams.bssIdx, 
-                             &pBSSSes); 
+  ucCurrentBSSSesIdx = WDI_FindAssocSessionByBSSIdx( pWDICtx,
+                             halDelBssRspMsg.deleteBssRspParams.bssIdx,
+                             &pBSSSes);
 
   /*-----------------------------------------------------------------------
     Del BSS response can only be received for an existing assoc that
-    is current and in progress 
+    is current and in progress
     -----------------------------------------------------------------------*/
   if ( NULL == pBSSSes )
   {
@@ -14158,23 +14379,24 @@
               "Association sequence for this BSS does not yet exist or "
               "association no longer in progress - mysterious HAL response");
 
-    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE); 
-    
+    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE);
+
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*Extract BSSID for the response to UMAC*/
-  wpalMemoryCopy(wdiDelBSSParams.macBSSID, 
+  wpalMemoryCopy(wdiDelBSSParams.macBSSID,
                  pBSSSes->macBSSID, WDI_MAC_ADDR_LEN);
 
   wdiDelBSSParams.ucBssIdx = halDelBssRspMsg.deleteBssRspParams.bssIdx;
 
   /*-----------------------------------------------------------------------
-    The current session will be deleted 
+    The current session will be deleted
   -----------------------------------------------------------------------*/
   WDI_DeleteSession(pWDICtx, pBSSSes);
 
+
   /* Delete the BCAST STA entry from the STA table if SAP/GO session is deleted */
   if(WDI_INFRA_AP_MODE == pBSSSes->wdiBssType)
   {
@@ -14183,41 +14405,41 @@
   
    /* Delete the STA's in this BSS */
   WDI_STATableBSSDelSta(pWDICtx, halDelBssRspMsg.deleteBssRspParams.bssIdx);
-  
+
   wpalMutexRelease(&pWDICtx->wptMutex);
 
   /*Notify UMAC*/
   wdiDelBSSRspCb( &wdiDelBSSParams, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessDelBSSRsp*/
 
 /**
  @brief Process Post Assoc Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessPostAssocRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_PostAssocRspParamsType    wdiPostAssocParams;
   WDI_PostAssocRspCb            wdiPostAssocRspCb;
-  wpt_uint8                     ucCurrentBSSSesIdx     = 0; 
+  wpt_uint8                     ucCurrentBSSSesIdx     = 0;
   WDI_BSSSessionType*           pBSSSes                = NULL;
-  tPostAssocRspMsg              halPostAssocRspMsg; 
+  tPostAssocRspMsg              halPostAssocRspMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14225,7 +14447,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiPostAssocRspCb = (WDI_PostAssocRspCb)pWDICtx->pfncRspCB;
@@ -14233,81 +14455,81 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halPostAssocRspMsg.postAssocRspParams, 
-                   pEventData->pEventData, 
+  wpalMemoryCopy( &halPostAssocRspMsg.postAssocRspParams,
+                   pEventData->pEventData,
                    sizeof(halPostAssocRspMsg.postAssocRspParams));
 
   /*Extract the Post Assoc STA Params */
 
-  wdiPostAssocParams.staParams.ucSTAIdx   = 
+  wdiPostAssocParams.staParams.ucSTAIdx   =
     halPostAssocRspMsg.postAssocRspParams.configStaRspParams.staIdx;
-  wdiPostAssocParams.staParams.ucUcastSig = 
+  wdiPostAssocParams.staParams.ucUcastSig =
     halPostAssocRspMsg.postAssocRspParams.configStaRspParams.ucUcastSig;
-  wdiPostAssocParams.staParams.ucBcastSig = 
+  wdiPostAssocParams.staParams.ucBcastSig =
     halPostAssocRspMsg.postAssocRspParams.configStaRspParams.ucBcastSig;
 
- wdiPostAssocParams.wdiStatus = 
-    WDI_HAL_2_WDI_STATUS(halPostAssocRspMsg.postAssocRspParams.configStaRspParams.status); 
+ wdiPostAssocParams.wdiStatus =
+    WDI_HAL_2_WDI_STATUS(halPostAssocRspMsg.postAssocRspParams.configStaRspParams.status);
 
  /*Copy the MAC addresses from the cached storage in the WDI CB as they are not
    included in the response */
-  wpalMemoryCopy( wdiPostAssocParams.staParams.macSTA, 
-                  pWDICtx->wdiCachedPostAssocReq.wdiSTAParams.macSTA, 
+  wpalMemoryCopy( wdiPostAssocParams.staParams.macSTA,
+                  pWDICtx->wdiCachedPostAssocReq.wdiSTAParams.macSTA,
                   WDI_MAC_ADDR_LEN);
 
   /* Extract Post Assoc BSS Params */
 
-  wpalMemoryCopy( wdiPostAssocParams.bssParams.macBSSID, 
-                  pWDICtx->wdiCachedPostAssocReq.wdiBSSParams.macBSSID, 
-                  WDI_MAC_ADDR_LEN); 
+  wpalMemoryCopy( wdiPostAssocParams.bssParams.macBSSID,
+                  pWDICtx->wdiCachedPostAssocReq.wdiBSSParams.macBSSID,
+                  WDI_MAC_ADDR_LEN);
 
   /*Copy the MAC addresses from the cached storage in the WDI CB as they are not
    included in the response */
-  wpalMemoryCopy( wdiPostAssocParams.bssParams.macSTA, 
+  wpalMemoryCopy( wdiPostAssocParams.bssParams.macSTA,
                   pWDICtx->wdiCachedPostAssocReq.wdiBSSParams.wdiSTAContext
                   .macSTA, WDI_MAC_ADDR_LEN);
 
-  wdiPostAssocParams.bssParams.ucBcastSig = 
+  wdiPostAssocParams.bssParams.ucBcastSig =
      halPostAssocRspMsg.postAssocRspParams.configStaRspParams.ucBcastSig;
 
-  wdiPostAssocParams.bssParams.ucUcastSig = 
+  wdiPostAssocParams.bssParams.ucUcastSig =
      halPostAssocRspMsg.postAssocRspParams.configStaRspParams.ucUcastSig;
 
   wdiPostAssocParams.bssParams.ucBSSIdx =
      halPostAssocRspMsg.postAssocRspParams.configBssRspParams.bssIdx;
 
-  wdiPostAssocParams.bssParams.ucSTAIdx = 
+  wdiPostAssocParams.bssParams.ucSTAIdx =
      halPostAssocRspMsg.postAssocRspParams.configBssRspParams.bssStaIdx;
 
   wpalMutexAcquire(&pWDICtx->wptMutex);
 
   /*------------------------------------------------------------------------
-    Find the BSS for which the request is made 
+    Find the BSS for which the request is made
   ------------------------------------------------------------------------*/
-  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
+  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
                                              wdiPostAssocParams.bssParams.
-                                             macBSSID, &pBSSSes); 
+                                             macBSSID, &pBSSSes);
 
   /*-----------------------------------------------------------------------
     Post assoc response can only be received for an existing assoc that
-    is current and in progress 
+    is current and in progress
     -----------------------------------------------------------------------*/
   if (( NULL == pBSSSes ) ||
-      ( ucCurrentBSSSesIdx != pWDICtx->ucCurrentBSSSesIdx ) || 
+      ( ucCurrentBSSSesIdx != pWDICtx->ucCurrentBSSSesIdx ) ||
       ( eWLAN_PAL_FALSE == pWDICtx->bAssociationInProgress ))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "Association sequence for this BSS does not yet exist or "
               "association no longer in progress - mysterious HAL response");
 
-    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE); 
-    
+    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE);
+
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*-----------------------------------------------------------------------
-    Post Assoc Request is only allowed in Joining state 
+    Post Assoc Request is only allowed in Joining state
   -----------------------------------------------------------------------*/
   if ( WDI_ASSOC_JOINING_ST != pBSSSes->wdiAssocState)
   {
@@ -14315,14 +14537,14 @@
               "Post Assoc not allowed before JOIN - failing request "
               "strange HAL response");
 
-    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE); 
-    
+    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE);
+
     wpalMutexRelease(&pWDICtx->wptMutex);
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
   /*-----------------------------------------------------------------------
-    If assoc has failed the current session will be deleted 
+    If assoc has failed the current session will be deleted
   -----------------------------------------------------------------------*/
   if ( WDI_STATUS_SUCCESS != wdiPostAssocParams.wdiStatus )
   {
@@ -14332,19 +14554,19 @@
   else
   {
     /*Transition to state POST Assoc*/
-    pBSSSes->wdiAssocState = WDI_ASSOC_POST_ST; 
+    pBSSSes->wdiAssocState = WDI_ASSOC_POST_ST;
 
     /*Save DPU Info*/
-    pBSSSes->bcastMgmtDpuIndex     = 
+    pBSSSes->bcastMgmtDpuIndex     =
       halPostAssocRspMsg.postAssocRspParams.configBssRspParams.mgmtDpuDescIndx;
-    pBSSSes->bcastMgmtDpuSignature = 
+    pBSSSes->bcastMgmtDpuSignature =
       halPostAssocRspMsg.postAssocRspParams.configBssRspParams.mgmtDpuSignature;
-    pBSSSes->bcastDpuIndex         = 
+    pBSSSes->bcastDpuIndex         =
       halPostAssocRspMsg.postAssocRspParams.configBssRspParams.bcastDpuDescIndx;
-    pBSSSes->bcastDpuSignature     = 
+    pBSSSes->bcastDpuSignature     =
       halPostAssocRspMsg.postAssocRspParams.configBssRspParams.bcastDpuSignature;
 
-    pBSSSes->ucBSSIdx              = 
+    pBSSSes->ucBSSIdx              =
       halPostAssocRspMsg.postAssocRspParams.configBssRspParams.bssIdx;
   }
 
@@ -14359,22 +14581,22 @@
   /*Notify UMAC*/
   wdiPostAssocRspCb( &wdiPostAssocParams, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessPostAssocRsp*/
 
 /**
- @brief Process Del STA Rsp function (called when a response is 
+ @brief Process Del STA Rsp function (called when a response is
         being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessDelSTARsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -14382,11 +14604,11 @@
   WDI_DelSTARspParamsType   wdiDelSTARsp;
   WDI_DelSTARspCb           wdiDelSTARspCb;
   wpt_uint8                 staType;
-  tDeleteStaRspMsg          halDelStaRspMsg; 
+  tDeleteStaRspMsg          halDelStaRspMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14394,7 +14616,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiDelSTARspCb = (WDI_DelSTARspCb)pWDICtx->pfncRspCB;
@@ -14403,12 +14625,12 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   wpalMemoryCopy( &halDelStaRspMsg.delStaRspParams,
-                  pEventData->pEventData, 
+                  pEventData->pEventData,
                   sizeof(halDelStaRspMsg.delStaRspParams));
 
   wdiDelSTARsp.ucSTAIdx    = halDelStaRspMsg.delStaRspParams.staId;
-  wdiDelSTARsp.wdiStatus   =   
-    WDI_HAL_2_WDI_STATUS(halDelStaRspMsg.delStaRspParams.status); 
+  wdiDelSTARsp.wdiStatus   =
+    WDI_HAL_2_WDI_STATUS(halDelStaRspMsg.delStaRspParams.status);
 
   WDI_STATableGetStaType(pWDICtx, wdiDelSTARsp.ucSTAIdx, &staType);
 
@@ -14443,27 +14665,27 @@
   /*Notify UMAC*/
   wdiDelSTARspCb( &wdiDelSTARsp, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessDelSTARsp*/
 
 
 /*==========================================================================
-                   Security Response Processing Functions 
+                   Security Response Processing Functions
 ==========================================================================*/
 
 /**
  @brief Process Set BSS Key Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetBssKeyRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -14474,7 +14696,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14482,7 +14704,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiSetBSSKeyRspCb = (WDI_SetBSSKeyRspCb)pWDICtx->pfncRspCB;
@@ -14491,7 +14713,7 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   if ( eHAL_STATUS_SUCCESS != halStatus )
   {
@@ -14505,22 +14727,22 @@
   /*Notify UMAC*/
   wdiSetBSSKeyRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetBssKeyRsp*/
 
 /**
  @brief Process Remove BSS Key Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessRemoveBssKeyRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -14531,7 +14753,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14539,7 +14761,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiRemoveBSSKeyRspCb = (WDI_RemoveBSSKeyRspCb)pWDICtx->pfncRspCB;
@@ -14548,7 +14770,7 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   if ( eHAL_STATUS_SUCCESS != halStatus )
   {
@@ -14562,23 +14784,23 @@
   /*Notify UMAC*/
   wdiRemoveBSSKeyRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetBssKeyRsp*/
 
 
 /**
  @brief Process Set STA Key Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetStaKeyRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -14589,7 +14811,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14597,7 +14819,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiSetSTAKeyRspCb = (WDI_SetSTAKeyRspCb)pWDICtx->pfncRspCB;
@@ -14606,7 +14828,7 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   if ( eHAL_STATUS_SUCCESS != halStatus )
   {
@@ -14620,22 +14842,22 @@
   /*Notify UMAC*/
   wdiSetSTAKeyRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetSTAKeyRsp*/
 
 /**
- @brief Process Remove STA Key Rsp function (called when a 
+ @brief Process Remove STA Key Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessRemoveStaKeyRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -14646,7 +14868,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14654,7 +14876,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiRemoveSTAKeyRspCb = (WDI_RemoveSTAKeyRspCb)pWDICtx->pfncRspCB;
@@ -14663,7 +14885,7 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   if ( eHAL_STATUS_SUCCESS != halStatus )
   {
@@ -14677,22 +14899,22 @@
   /*Notify UMAC*/
   wdiRemoveSTAKeyRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessRemoveStaKeyRsp*/
 
 /**
- @brief Process Set STA Bcast Key Rsp function (called when a 
+ @brief Process Set STA Bcast Key Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetStaBcastKeyRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -14703,7 +14925,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14711,7 +14933,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiSetSTABcastKeyRspCb = (WDI_SetSTAKeyRspCb)pWDICtx->pfncRspCB;
@@ -14719,11 +14941,11 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halStatus, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halStatus,
+                  pEventData->pEventData,
                   sizeof(halStatus));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   if ( eHAL_STATUS_SUCCESS != halStatus )
   {
@@ -14737,22 +14959,22 @@
   /*Notify UMAC*/
   wdiSetSTABcastKeyRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetSTABcastKeyRsp*/
 
 /**
  @brief Process Remove STA Bcast Key Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessRemoveStaBcastKeyRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -14763,7 +14985,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14771,7 +14993,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiRemoveSTABcastKeyRspCb = (WDI_RemoveSTAKeyRspCb)pWDICtx->pfncRspCB;
@@ -14779,11 +15001,11 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halStatus, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halStatus,
+                  pEventData->pEventData,
                   sizeof(halStatus));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   if ( eHAL_STATUS_SUCCESS != halStatus )
   {
@@ -14797,27 +15019,27 @@
   /*Notify UMAC*/
   wdiRemoveSTABcastKeyRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessRemoveStaBcastKeyRsp*/
 
 
 /*==========================================================================
-                   QoS and BA Response Processing Functions 
+                   QoS and BA Response Processing Functions
 ==========================================================================*/
 
 /**
  @brief Process Add TSpec Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessAddTSpecRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -14828,7 +15050,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14836,7 +15058,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiAddTsRspCb = (WDI_AddTsRspCb)pWDICtx->pfncRspCB;
@@ -14845,28 +15067,28 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiAddTsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessAddTSpecRsp*/
 
 
 /**
  @brief Process Del TSpec Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessDelTSpecRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -14877,7 +15099,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14885,7 +15107,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiDelTsRspCb = (WDI_DelTsRspCb)pWDICtx->pfncRspCB;
@@ -14894,27 +15116,27 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiDelTsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessDelTSpecRsp*/
 
 /**
- @brief Process Update EDCA Parameters Rsp function (called when a  
+ @brief Process Update EDCA Parameters Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateEDCAParamsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -14925,7 +15147,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14933,7 +15155,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiUpdateEDCAParamsRspCb = (WDI_UpdateEDCAParamsRspCb)pWDICtx->pfncRspCB;
@@ -14942,28 +15164,28 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiUpdateEDCAParamsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessUpdateEDCAParamsRsp*/
 
 
 /**
  @brief Process Add BA Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessAddBASessionRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -14973,11 +15195,11 @@
   tAddBASessionRspParams        halBASessionRsp;
   WDI_AddBASessionRspParamsType wdiBASessionRsp;
 
-  
+
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -14985,7 +15207,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiAddBASessionRspCb = (WDI_AddBASessionRspCb)pWDICtx->pfncRspCB;
@@ -14993,8 +15215,8 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halBASessionRsp, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halBASessionRsp,
+                  pEventData->pEventData,
                   sizeof(halBASessionRsp));
 
   wdiBASessionRsp.wdiStatus = WDI_HAL_2_WDI_STATUS(halBASessionRsp.status);
@@ -15013,23 +15235,23 @@
   /*Notify UMAC*/
   wdiAddBASessionRspCb( &wdiBASessionRsp, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessAddSessionBARsp*/
 
 
 /**
  @brief Process Del BA Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessDelBARsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15040,7 +15262,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -15048,7 +15270,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiDelBARspCb = (WDI_DelBARspCb)pWDICtx->pfncRspCB;
@@ -15057,7 +15279,7 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   if ( eHAL_STATUS_SUCCESS == halStatus )
   {
@@ -15067,7 +15289,7 @@
   /*Notify UMAC*/
   wdiDelBARspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessDelBARsp*/
 
 #ifdef FEATURE_WLAN_CCX
@@ -15141,16 +15363,16 @@
 /**
  @brief Process Flush AC Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessFlushAcRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15161,7 +15383,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -15169,7 +15391,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiFlushAcRspCb = (WDI_FlushAcRspCb)pWDICtx->pfncRspCB;
@@ -15177,31 +15399,31 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halStatus, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halStatus,
+                  pEventData->pEventData,
                   sizeof(halStatus));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiFlushAcRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessFlushAcRsp*/
 
 /**
- @brief Process BT AMP event Rsp function (called when a 
+ @brief Process BT AMP event Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessBtAmpEventRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15212,7 +15434,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData))
@@ -15220,7 +15442,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiBtAmpEventRspCb = (WDI_BtAmpEventRspCb)pWDICtx->pfncRspCB;
@@ -15228,32 +15450,32 @@
    /*-------------------------------------------------------------------------
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
-   wpalMemoryCopy( &halStatus, 
-                   pEventData->pEventData, 
+   wpalMemoryCopy( &halStatus,
+                   pEventData->pEventData,
                    sizeof(halStatus));
 
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiBtAmpEventRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessBtAmpEventRsp*/
 
 
 /**
- @brief Process ADD STA SELF Rsp function (called 
+ @brief Process ADD STA SELF Rsp function (called
         when a response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessAddSTASelfRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15265,7 +15487,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -15273,28 +15495,28 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  wdiAddSTASelfReqParamsRspCb = 
+  wdiAddSTASelfReqParamsRspCb =
                          (WDI_AddSTASelfParamsRspCb)pWDICtx->pfncRspCB;
 
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halAddStaSelfRsp.addStaSelfRspParams, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halAddStaSelfRsp.addStaSelfRspParams,
+                  pEventData->pEventData,
                   sizeof(halAddStaSelfRsp.addStaSelfRspParams));
 
 
-  wdiAddSTASelfParams.wdiStatus   =   
-    WDI_HAL_2_WDI_STATUS(halAddStaSelfRsp.addStaSelfRspParams.status); 
+  wdiAddSTASelfParams.wdiStatus   =
+    WDI_HAL_2_WDI_STATUS(halAddStaSelfRsp.addStaSelfRspParams.status);
 
-  wdiAddSTASelfParams.ucSTASelfIdx   = 
+  wdiAddSTASelfParams.ucSTASelfIdx   =
     halAddStaSelfRsp.addStaSelfRspParams.selfStaIdx;
-  wdiAddSTASelfParams.dpuIdx = 
+  wdiAddSTASelfParams.dpuIdx =
     halAddStaSelfRsp.addStaSelfRspParams.dpuIdx;
-  wdiAddSTASelfParams.dpuSignature = 
+  wdiAddSTASelfParams.dpuSignature =
     halAddStaSelfRsp.addStaSelfRspParams.dpuSignature;
 
   wpalMemoryCopy(wdiAddSTASelfParams.macSelfSta,
@@ -15313,7 +15535,7 @@
   //all DPU indices are the same for self STA
 
   /*DPU Information*/
-  wdiAddSTAParam.dpuIndex              = wdiAddSTASelfParams.dpuIdx; 
+  wdiAddSTAParam.dpuIndex              = wdiAddSTASelfParams.dpuIdx;
   wdiAddSTAParam.dpuSig                = wdiAddSTASelfParams.dpuSignature;
   wdiAddSTAParam.bcastDpuSignature     = wdiAddSTASelfParams.dpuSignature;
   wdiAddSTAParam.bcastMgmtDpuSignature = wdiAddSTASelfParams.dpuSignature;
@@ -15326,7 +15548,7 @@
   wdiAddSTAParam.ucStaType = WDI_STA_ENTRY_SELF; /* 0 - self */
   wdiAddSTAParam.ucSTAIdx = wdiAddSTASelfParams.ucSTASelfIdx;
 
-  if(halAddStaSelfRsp.addStaSelfRspParams.status 
+  if(halAddStaSelfRsp.addStaSelfRspParams.status
      != eHAL_STATUS_ADD_STA_SELF_IGNORED_REF_COUNT_NOT_ZERO)
   {
      (void)WDI_STATableAddSta(pWDICtx,&wdiAddSTAParam);
@@ -15336,24 +15558,24 @@
   /*Notify UMAC*/
   wdiAddSTASelfReqParamsRspCb( &wdiAddSTASelfParams, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessAddSTASelfRsp*/
 
 
 
 /**
- @brief WDI_ProcessDelSTASelfRsp function (called when a 
+ @brief WDI_ProcessDelSTASelfRsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessDelSTASelfRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15366,7 +15588,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
     -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -15374,7 +15596,7 @@
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
     WDI_ASSERT(0);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   wdiDelStaSelfRspCb = (WDI_DelSTASelfRspCb)pWDICtx->pfncRspCB;
@@ -15383,19 +15605,19 @@
     Extract response and send it to UMAC
     -------------------------------------------------------------------------*/
 
-  wpalMemoryCopy( &delStaSelfRspParams, 
+  wpalMemoryCopy( &delStaSelfRspParams,
                         (wpt_uint8*)pEventData->pEventData,
                               sizeof(tDelStaSelfRspParams));
 
-  wdiDelStaSelfRspParams.wdiStatus   =   
-    WDI_HAL_2_WDI_STATUS(delStaSelfRspParams.status); 
+  wdiDelStaSelfRspParams.wdiStatus   =
+    WDI_HAL_2_WDI_STATUS(delStaSelfRspParams.status);
 
-  /* delStaSelfRspParams.status is not 
+  /* delStaSelfRspParams.status is not
    eHAL_STATUS_DEL_STA_SELF_IGNORED_REF_COUNT_NOT_ZERO*/
   if( eHAL_STATUS_SUCCESS == delStaSelfRspParams.status )
   {
     WDI_Status wdiStatus;
-    wdiStatus = WDI_STATableFindStaidByAddr(pWDICtx, 
+    wdiStatus = WDI_STATableFindStaidByAddr(pWDICtx,
                                delStaSelfRspParams.selfMacAddr,
                                &ucStaIdx);
     if(WDI_STATUS_E_FAILURE == wdiStatus)
@@ -15403,7 +15625,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                  "%s: Unable to extract the STA Idx ", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
     }
     WDI_STATableDelSta(pWDICtx, ucStaIdx);
   }
@@ -15414,25 +15636,95 @@
   return WDI_STATUS_SUCCESS;
 }
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/**
+ @brief Start Oem Data Rsp function (called when a 
+        response is being received over the bus from HAL)
 
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
+ @see
+ @return Result of the function call
+*/
+#define OFFSET_OF(structType,fldName)   (&((structType*)0)->fldName)
+
+WDI_Status
+WDI_ProcessStartOemDataRsp
+(
+  WDI_ControlBlockType*  pWDICtx,
+  WDI_EventInfoType*     pEventData
+)
+{
+  WDI_oemDataRspCb           wdiOemDataRspCb;
+  WDI_oemDataRspParamsType*  wdiOemDataRspParams;
+  tStartOemDataRspParams*    halStartOemDataRspParams;
+
+  /*-------------------------------------------------------------------------
+    Sanity check
+  -------------------------------------------------------------------------*/
+  if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
+      ( NULL == pEventData->pEventData))
+  {
+     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+                 "%s: Invalid parameters", __FUNCTION__);
+     WDI_ASSERT(0);
+     return WDI_STATUS_E_FAILURE;
+  }
+
+  wdiOemDataRspCb = (WDI_oemDataRspCb)pWDICtx->pfncRspCB;
+
+   /*-------------------------------------------------------------------------
+     Extract response and send it to UMAC
+   -------------------------------------------------------------------------*/
+  halStartOemDataRspParams = (tStartOemDataRspParams *)pEventData->pEventData;
+
+
+  //It is the responsibility of the application code to check for failure
+  //conditions!
+
+  //Allocate memory for WDI OEM DATA RSP structure
+  wdiOemDataRspParams = wpalMemoryAllocate(sizeof(WDI_oemDataRspParamsType)) ;
+
+  if(NULL == wdiOemDataRspParams)
+  {
+    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
+            "Failed to allocate memory in OEM DATA Response %x %x %x ",
+                pWDICtx, pEventData, pEventData->pEventData);
+    WDI_ASSERT(0);
+    return WDI_STATUS_E_FAILURE;
+  }
+
+  /* Populate WDI structure members */
+  wpalMemoryCopy(wdiOemDataRspParams->oemDataRsp, halStartOemDataRspParams->oemDataRsp, OEM_DATA_RSP_SIZE);
+
+  /*Notify UMAC*/
+  wdiOemDataRspCb(wdiOemDataRspParams, pWDICtx->pRspCBUserData);
+
+  //Free memory allocated for WDI OEM_DATA MEAS RSP structure
+  wpalMemoryFree(wdiOemDataRspParams);
+
+  return WDI_STATUS_SUCCESS;
+}/*WDI_PrcoessStartOemDataRsp*/
+#endif
 
 /*===========================================================================
-           Miscellaneous Control Response Processing API 
+           Miscellaneous Control Response Processing API
 ===========================================================================*/
 
 /**
  @brief Process Channel Switch Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessChannelSwitchRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15443,7 +15735,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -15451,7 +15743,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiChSwitchRspCb = (WDI_SwitchChRspCb)pWDICtx->pfncRspCB;
@@ -15459,38 +15751,38 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halSwitchChannelRsp, 
+  wpalMemoryCopy( &halSwitchChannelRsp,
                   (wpt_uint8*)pEventData->pEventData,
                   sizeof(halSwitchChannelRsp));
 
-  wdiSwitchChRsp.wdiStatus   =  
-               WDI_HAL_2_WDI_STATUS(halSwitchChannelRsp.status); 
+  wdiSwitchChRsp.wdiStatus   =
+               WDI_HAL_2_WDI_STATUS(halSwitchChannelRsp.status);
   wdiSwitchChRsp.ucChannel = halSwitchChannelRsp.channelNumber;
 
 #ifdef WLAN_FEATURE_VOWIFI
-  wdiSwitchChRsp.ucTxMgmtPower =  halSwitchChannelRsp.txMgmtPower; 
+  wdiSwitchChRsp.ucTxMgmtPower =  halSwitchChannelRsp.txMgmtPower;
 #endif
 
   /*Notify UMAC*/
   wdiChSwitchRspCb( &wdiSwitchChRsp, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessChannelSwitchRsp*/
 
 
 /**
  @brief Process Config STA Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessConfigStaRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15500,13 +15792,13 @@
   WDI_AddStaParams              wdiAddSTAParam;
 
   WDI_BSSSessionType*           pBSSSes             = NULL;
-  wpt_uint8                     ucCurrentBSSSesIdx  = 0; 
+  wpt_uint8                     ucCurrentBSSSesIdx  = 0;
 
-  tConfigStaRspMsg              halConfigStaRsp; 
+  tConfigStaRspMsg              halConfigStaRsp;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -15514,7 +15806,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiConfigSTARspCb = (WDI_ConfigSTARspCb)pWDICtx->pfncRspCB;
@@ -15522,8 +15814,8 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halConfigStaRsp.configStaRspParams, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halConfigStaRsp.configStaRspParams,
+                  pEventData->pEventData,
                   sizeof(halConfigStaRsp.configStaRspParams));
 
 
@@ -15536,11 +15828,11 @@
    /* MAC Address of STA - take from cache as it does not come back in the
    response*/
    wpalMemoryCopy( wdiCfgSTAParams.macSTA,
-          pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.macSTA, 
+          pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.macSTA,
           WDI_MAC_ADDR_LEN);
-  
-  wdiCfgSTAParams.wdiStatus   =   
-    WDI_HAL_2_WDI_STATUS(halConfigStaRsp.configStaRspParams.status); 
+
+  wdiCfgSTAParams.wdiStatus   =
+    WDI_HAL_2_WDI_STATUS(halConfigStaRsp.configStaRspParams.status);
 
   wdiCfgSTAParams.ucDpuIndex = halConfigStaRsp.configStaRspParams.dpuIndex;
   wdiCfgSTAParams.ucBcastDpuIndex = halConfigStaRsp.configStaRspParams.bcastDpuIndex;
@@ -15551,71 +15843,71 @@
     if ( WDI_ADD_STA == pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.wdiAction )
     {
       /* ADD STA to table */
-      wdiAddSTAParam.ucSTAIdx = halConfigStaRsp.configStaRspParams.staIdx; 
+      wdiAddSTAParam.ucSTAIdx = halConfigStaRsp.configStaRspParams.staIdx;
       wdiAddSTAParam.dpuSig   = halConfigStaRsp.configStaRspParams.ucUcastSig;
       wdiAddSTAParam.dpuIndex = halConfigStaRsp.configStaRspParams.dpuIndex;
-       
+
       /*This info can be retrieved from the cached initial request*/
-      wdiAddSTAParam.ucWmmEnabled = 
+      wdiAddSTAParam.ucWmmEnabled =
         pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.ucWMMEnabled;
-      wdiAddSTAParam.ucHTCapable  = 
-        pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.ucHTCapable; 
-      wdiAddSTAParam.ucStaType    = 
-        pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.wdiSTAType;  
-   
+      wdiAddSTAParam.ucHTCapable  =
+        pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.ucHTCapable;
+      wdiAddSTAParam.ucStaType    =
+        pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.wdiSTAType;
+
       /* MAC Address of STA */
-      wpalMemoryCopy(wdiAddSTAParam.staMacAddr, 
-                     pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.macSTA, 
+      wpalMemoryCopy(wdiAddSTAParam.staMacAddr,
+                     pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.macSTA,
                      WDI_MAC_ADDR_LEN);
-  
-      wpalMemoryCopy(wdiAddSTAParam.macBSSID, 
-                     pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.macBSSID , 
-                     WDI_MAC_ADDR_LEN); 
-  
-      ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
-                    pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.macBSSID, 
-                    &pBSSSes);  
+
+      wpalMemoryCopy(wdiAddSTAParam.macBSSID,
+                     pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.macBSSID ,
+                     WDI_MAC_ADDR_LEN);
+
+      ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
+                    pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.macBSSID,
+                    &pBSSSes);
 
       if ( NULL == pBSSSes )
       {
         WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                   "Association for this BSSID is not in place");
-    
+
         WDI_ASSERT(0);
-        return WDI_STATUS_E_NOT_ALLOWED; 
+        return WDI_STATUS_E_NOT_ALLOWED;
       }
 
       /*Add BSS specific parameters*/
-      wdiAddSTAParam.bcastMgmtDpuIndex = 
+      wdiAddSTAParam.bcastMgmtDpuIndex =
          halConfigStaRsp.configStaRspParams.bcastMgmtDpuIdx;
-      wdiAddSTAParam.bcastMgmtDpuSignature = 
+      wdiAddSTAParam.bcastMgmtDpuSignature =
          halConfigStaRsp.configStaRspParams.ucMgmtSig;
-      wdiAddSTAParam.bcastDpuIndex  = 
+      wdiAddSTAParam.bcastDpuIndex  =
          halConfigStaRsp.configStaRspParams.bcastDpuIndex;
-      wdiAddSTAParam.bcastDpuSignature = 
+      wdiAddSTAParam.bcastDpuSignature =
          halConfigStaRsp.configStaRspParams.ucBcastSig;
       wdiAddSTAParam.ucRmfEnabled          = pBSSSes->ucRmfEnabled;
       wdiAddSTAParam.ucBSSIdx              = ucCurrentBSSSesIdx;
-      
+
       WDI_STATableAddSta(pWDICtx,&wdiAddSTAParam);
     }
     if( WDI_UPDATE_STA == pWDICtx->wdiCachedConfigStaReq.wdiReqInfo.wdiAction )
     {
        WDI_StaStruct* pSTATable = (WDI_StaStruct*) pWDICtx->staTable;
 
-       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].bcastDpuIndex = 
+       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].bcastDpuIndex =
           halConfigStaRsp.configStaRspParams.bcastDpuIndex;
-       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].bcastDpuSignature = 
+       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].bcastDpuSignature =
           halConfigStaRsp.configStaRspParams.ucBcastSig;
-       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].bcastMgmtDpuIndex = 
+       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].bcastMgmtDpuIndex =
           halConfigStaRsp.configStaRspParams.bcastMgmtDpuIdx;
-       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].bcastMgmtDpuSignature = 
+       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].bcastMgmtDpuSignature =
           halConfigStaRsp.configStaRspParams.ucMgmtSig;
-       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].bssIdx = 
+       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].bssIdx =
           halConfigStaRsp.configStaRspParams.bssIdx;
-       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].dpuIndex = 
+       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].dpuIndex =
           halConfigStaRsp.configStaRspParams.dpuIndex;
-       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].dpuSig = 
+       pSTATable[halConfigStaRsp.configStaRspParams.staIdx].dpuSig =
           halConfigStaRsp.configStaRspParams.ucUcastSig;
     }
   }
@@ -15623,23 +15915,23 @@
   /*Notify UMAC*/
   wdiConfigSTARspCb( &wdiCfgSTAParams, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessConfigStaRsp*/
 
 
 /**
- @brief Process Set Link State Rsp function (called when a 
+ @brief Process Set Link State Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetLinkStateRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15649,11 +15941,11 @@
   WDI_SetLinkStateRspCb   wdiSetLinkStateRspCb;
 
   WDI_BSSSessionType*     pBSSSes              = NULL;
-  wpt_uint8               ucCurrentBSSSesIdx   = 0; 
+  wpt_uint8               ucCurrentBSSSesIdx   = 0;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -15661,7 +15953,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiSetLinkStateRspCb = (WDI_SetLinkStateRspCb)pWDICtx->pfncRspCB;
@@ -15671,19 +15963,19 @@
   /*If the link is being transitioned to idle - the BSS is to be deleted
   - this type of ending a session is possible when UMAC has failed an
   - association session during Join*/
-  if ( WDI_LINK_IDLE_STATE == 
+  if ( WDI_LINK_IDLE_STATE ==
        pWDICtx->wdiCacheSetLinkStReq.wdiLinkInfo.wdiLinkState )
   {
     /*------------------------------------------------------------------------
-      Find the BSS for which the request is made 
+      Find the BSS for which the request is made
     ------------------------------------------------------------------------*/
-    ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
-                        pWDICtx->wdiCacheSetLinkStReq.wdiLinkInfo.macBSSID, 
-                        &pBSSSes); 
-  
+    ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
+                        pWDICtx->wdiCacheSetLinkStReq.wdiLinkInfo.macBSSID,
+                        &pBSSSes);
+
     /*-----------------------------------------------------------------------
       Del BSS response can only be received for an existing assoc that
-      is current and in progress 
+      is current and in progress
       -----------------------------------------------------------------------*/
     if ( NULL == pBSSSes )
     {
@@ -15699,7 +15991,7 @@
          ( WDI_BTAMP_AP_MODE != pBSSSes->wdiBssType ))
       {
          /*-----------------------------------------------------------------------
-           The current session will be deleted 
+           The current session will be deleted
          -----------------------------------------------------------------------*/
          WDI_DeleteSession(pWDICtx, pBSSSes);
 
@@ -15708,7 +16000,7 @@
            flag as this has ended
          -----------------------------------------------------------------------*/
          if ( ucCurrentBSSSesIdx == pWDICtx->ucCurrentBSSSesIdx )
-         {  
+         {
            /*Association no longer in progress  */
            pWDICtx->bAssociationInProgress = eWLAN_PAL_FALSE;
            /*Association no longer in progress - prepare pending assoc for processing*/
@@ -15719,7 +16011,7 @@
   }
   /* If the link state has been set to POST ASSOC, reset the "association in
      progress" flag */
-  if ( WDI_LINK_POSTASSOC_STATE == 
+  if ( WDI_LINK_POSTASSOC_STATE ==
        pWDICtx->wdiCacheSetLinkStReq.wdiLinkInfo.wdiLinkState )
   {
      pWDICtx->bAssociationInProgress = eWLAN_PAL_FALSE;
@@ -15731,31 +16023,31 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halStatus, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halStatus,
+                  pEventData->pEventData,
                   sizeof(halStatus));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiSetLinkStateRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetLinkStateRsp*/
 
 /**
- @brief Process Get Stats Rsp function (called when a response is   
+ @brief Process Get Stats Rsp function (called when a response is
         being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessGetStatsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15763,11 +16055,11 @@
   WDI_GetStatsRspParamsType   *wdiGetStatsRsp;
   WDI_GetStatsRspCb           wdiGetStatsRspCb;
   tHalStatsRspParams*         pHalStatsRspParams;
-  
+
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -15775,7 +16067,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
@@ -15794,7 +16086,7 @@
                 "Failed to allocate memory in Get Stats Response %x %x %x ",
                  pWDICtx, pEventData, pEventData->pEventData);
     WDI_ASSERT(0);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   wdiGetStatsRspCb = (WDI_GetStatsRspCb)pWDICtx->pfncRspCB;
@@ -15816,23 +16108,23 @@
 
   wpalMemoryFree(wdiGetStatsRsp);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessGetStatsRsp*/
 
 
 /**
- @brief Process Update Cfg Rsp function (called when a response is  
+ @brief Process Update Cfg Rsp function (called when a response is
         being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateCfgRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15843,7 +16135,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -15851,7 +16143,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiUpdateCfgRspCb = (WDI_UpdateCfgRspCb)pWDICtx->pfncRspCB;
@@ -15860,12 +16152,12 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiUpdateCfgRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessUpdateCfgRsp*/
 
 
@@ -15873,16 +16165,16 @@
 /**
  @brief Process Add BA Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessAddBARsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15895,7 +16187,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -15903,7 +16195,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiAddBARspCb = (WDI_AddBARspCb)pWDICtx->pfncRspCB;
@@ -15911,8 +16203,8 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halAddBARsp, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halAddBARsp,
+                  pEventData->pEventData,
                   sizeof(halAddBARsp));
 
   wdiAddBARsp.wdiStatus = WDI_HAL_2_WDI_STATUS(halAddBARsp.status);
@@ -15925,22 +16217,22 @@
   /*Notify UMAC*/
   wdiAddBARspCb( &wdiAddBARsp, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessAddSessionBARsp*/
 
 /**
  @brief Process Add BA Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessTriggerBARsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -15953,11 +16245,11 @@
   WDI_TriggerBARspCandidateType* wdiTriggerBARspCandidate;
   wpt_uint16                     index;
   wpt_uint16                     TidIndex;
-  
+
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -15965,7 +16257,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiTriggerBARspCb = (WDI_TriggerBARspCb)pWDICtx->pfncRspCB;
@@ -15975,8 +16267,8 @@
   -------------------------------------------------------------------------*/
   halTriggerBARsp = (tTriggerBARspParams *)pEventData->pEventData;
 
-  wdiTriggerBARsp = wpalMemoryAllocate(sizeof(WDI_TriggerBARspParamsType) + 
-                      halTriggerBARsp->baCandidateCnt * 
+  wdiTriggerBARsp = wpalMemoryAllocate(sizeof(WDI_TriggerBARspParamsType) +
+                      halTriggerBARsp->baCandidateCnt *
                       sizeof(WDI_TriggerBARspCandidateType));
   if(NULL == wdiTriggerBARsp)
   {
@@ -15985,7 +16277,7 @@
                  pWDICtx, pEventData, pEventData->pEventData);
     wpalMemoryFree(halTriggerBARsp);
     WDI_ASSERT(0);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   wdiTriggerBARsp->wdiStatus = WDI_HAL_2_WDI_STATUS(halTriggerBARsp->status);
@@ -15993,7 +16285,7 @@
   if ( WDI_STATUS_SUCCESS == wdiTriggerBARsp->wdiStatus)
   {
     wdiTriggerBARsp->usBaCandidateCnt = halTriggerBARsp->baCandidateCnt;
-    wpalMemoryCopy(wdiTriggerBARsp->macBSSID, 
+    wpalMemoryCopy(wdiTriggerBARsp->macBSSID,
                                  halTriggerBARsp->bssId , WDI_MAC_ADDR_LEN);
 
     wdiTriggerBARspCandidate = (WDI_TriggerBARspCandidateType*)(wdiTriggerBARsp + 1);
@@ -16001,13 +16293,13 @@
 
     for(index = 0; index < wdiTriggerBARsp->usBaCandidateCnt; index++)
     {
-      wpalMemoryCopy(wdiTriggerBARspCandidate->macSTA, 
+      wpalMemoryCopy(wdiTriggerBARspCandidate->macSTA,
                                   halBaCandidate->staAddr, WDI_MAC_ADDR_LEN);
       for(TidIndex = 0; TidIndex < STA_MAX_TC; TidIndex++)
       {
-        wdiTriggerBARspCandidate->wdiBAInfo[TidIndex].fBaEnable = 
+        wdiTriggerBARspCandidate->wdiBAInfo[TidIndex].fBaEnable =
                             halBaCandidate->baInfo[TidIndex].fBaEnable;
-        wdiTriggerBARspCandidate->wdiBAInfo[TidIndex].startingSeqNum = 
+        wdiTriggerBARspCandidate->wdiBAInfo[TidIndex].startingSeqNum =
                             halBaCandidate->baInfo[TidIndex].startingSeqNum;
       }
       wdiTriggerBARspCandidate++;
@@ -16019,22 +16311,22 @@
   wdiTriggerBARspCb( wdiTriggerBARsp, pWDICtx->pRspCBUserData);
 
   wpalMemoryFree(wdiTriggerBARsp);
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessAddSessionBARsp*/
 
 /**
  @brief Process Update Beacon Params Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateBeaconParamsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16045,7 +16337,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16053,7 +16345,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiUpdateBeaconParamsRspCb = (WDI_UpdateBeaconParamsRspCb)pWDICtx->pfncRspCB;
@@ -16061,31 +16353,31 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halStatus, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halStatus,
+                  pEventData->pEventData,
                   sizeof(halStatus));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiUpdateBeaconParamsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessUpdateBeaconParamsRsp*/
 
 /**
  @brief Process Send Beacon template Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSendBeaconParamsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16096,7 +16388,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16104,7 +16396,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiSendBeaconParamsRspCb = (WDI_SendBeaconParamsRspCb)pWDICtx->pfncRspCB;
@@ -16112,32 +16404,32 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halStatus, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halStatus,
+                  pEventData->pEventData,
                   sizeof(halStatus));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiSendBeaconParamsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSendBeaconParamsRsp*/
 
-  
+
 /**
- @brief Process Update Probe Resp Template Rsp function (called 
+ @brief Process Update Probe Resp Template Rsp function (called
         when a response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateProbeRspTemplateRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16148,7 +16440,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16156,7 +16448,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiUpdProbeRspTemplRspCb = (WDI_UpdateProbeRspTemplateRspCb)pWDICtx->pfncRspCB;
@@ -16164,44 +16456,44 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halStatus, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halStatus,
+                  pEventData->pEventData,
                   sizeof(halStatus));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiUpdProbeRspTemplRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessUpdateProbeRspTemplateRsp*/
 
   /**
  @brief Process Set Max Tx Power Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetMaxTxPowerRsp
-( 
+(
   WDI_ControlBlockType*          pWDICtx,
   WDI_EventInfoType*             pEventData
 )
 {
   tSetMaxTxPwrRspMsg             halTxpowerrsp;
-  
+
   WDI_SetMaxTxPowerRspMsg        wdiSetMaxTxPowerRspMsg;
-  
+
   WDA_SetMaxTxPowerRspCb         wdiReqStatusCb;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16209,7 +16501,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiReqStatusCb = (WDA_SetMaxTxPowerRspCb)pWDICtx->pfncRspCB;
@@ -16217,42 +16509,42 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halTxpowerrsp.setMaxTxPwrRspParams, 
-                           pEventData->pEventData, 
-                           sizeof(halTxpowerrsp.setMaxTxPwrRspParams)); 
+  wpalMemoryCopy( &halTxpowerrsp.setMaxTxPwrRspParams,
+                           pEventData->pEventData,
+                           sizeof(halTxpowerrsp.setMaxTxPwrRspParams));
 
   if ( eHAL_STATUS_SUCCESS != halTxpowerrsp.setMaxTxPwrRspParams.status )
   {
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_ERROR,
               "Error status returned in Set Max Tx Power Response ");
-     WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE); 
-     return WDI_STATUS_E_FAILURE; 
+     WDI_DetectedDeviceError( pWDICtx, WDI_ERR_BASIC_OP_FAILURE);
+     return WDI_STATUS_E_FAILURE;
   }
 
-  wdiSetMaxTxPowerRspMsg.wdiStatus = 
+  wdiSetMaxTxPowerRspMsg.wdiStatus =
          WDI_HAL_2_WDI_STATUS(halTxpowerrsp.setMaxTxPwrRspParams.status);
-  wdiSetMaxTxPowerRspMsg.ucPower  = halTxpowerrsp.setMaxTxPwrRspParams.power; 
+  wdiSetMaxTxPowerRspMsg.ucPower  = halTxpowerrsp.setMaxTxPwrRspParams.power;
 
   /*Notify UMAC*/
   wdiReqStatusCb( &wdiSetMaxTxPowerRspMsg, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }
 
 #ifdef WLAN_FEATURE_P2P
 /**
- @brief Process P2P Group Owner Notice Of Absense Rsp function (called 
+ @brief Process P2P Group Owner Notice Of Absense Rsp function (called
         when a response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessP2PGONOARsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16263,7 +16555,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16271,7 +16563,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiP2PGONOAReqParamsRspCb = (WDI_SetP2PGONOAReqParamsRspCb)pWDICtx->pfncRspCB;
@@ -16279,31 +16571,31 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halStatus, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halStatus,
+                  pEventData->pEventData,
                   sizeof(halStatus));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiP2PGONOAReqParamsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessP2PGONOARsp*/
 #endif
 /**
- @brief Process Enter IMPS Rsp function (called when a response 
+ @brief Process Enter IMPS Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessEnterImpsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16314,7 +16606,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16322,7 +16614,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiEnterImpsRspCb = (WDI_EnterImpsRspCb)pWDICtx->pfncRspCB;
@@ -16332,27 +16624,27 @@
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiEnterImpsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessEnterImpsRsp*/
 
 /**
- @brief Process Exit IMPS Rsp function (called when a response 
+ @brief Process Exit IMPS Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessExitImpsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16363,7 +16655,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16371,7 +16663,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiExitImpsRspCb = (WDI_ExitImpsRspCb)pWDICtx->pfncRspCB;
@@ -16380,7 +16672,7 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   // notify DTS that we are entering Full power
   WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
@@ -16388,22 +16680,22 @@
   /*Notify UMAC*/
   wdiExitImpsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessExitImpsRsp*/
 
 /**
- @brief Process Enter BMPS Rsp function (called when a response 
+ @brief Process Enter BMPS Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessEnterBmpsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16414,7 +16706,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16422,7 +16714,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiEnterBmpsRspCb = (WDI_EnterBmpsRspCb)pWDICtx->pfncRspCB;
@@ -16431,27 +16723,27 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiEnterBmpsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessEnterBmpsRsp*/
 
 /**
- @brief Process Exit BMPS Rsp function (called when a response 
+ @brief Process Exit BMPS Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessExitBmpsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16462,7 +16754,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16470,7 +16762,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiExitBmpsRspCb = (WDI_ExitBmpsRspCb)pWDICtx->pfncRspCB;
@@ -16479,7 +16771,7 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   // notify DTS that we are entering Full power
   WDTS_SetPowerState(pWDICtx, WDTS_POWER_STATE_FULL, NULL);
@@ -16489,22 +16781,22 @@
   /*Notify UMAC*/
   wdiExitBmpsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessExitBmpsRsp*/
 
 /**
  @brief Process Enter UAPSD Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessEnterUapsdRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16515,7 +16807,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16523,7 +16815,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiEnterUapsdRspCb = (WDI_EnterUapsdRspCb)pWDICtx->pfncRspCB;
@@ -16532,7 +16824,7 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   if(WDI_STATUS_SUCCESS == wdiStatus)
   {
@@ -16551,22 +16843,22 @@
   /*Notify UMAC*/
   wdiEnterUapsdRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessEnterUapsdRsp*/
 
 /**
- @brief Process Exit UAPSD Rsp function (called when a response 
+ @brief Process Exit UAPSD Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessExitUapsdRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16577,7 +16869,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16585,7 +16877,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiExitUapsdRspCb = (WDI_ExitUapsdRspCb)pWDICtx->pfncRspCB;
@@ -16594,7 +16886,7 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    // Restore back the DPU routing flag in the TxBD, for DPU to push the TxBDs to BTQM
    // directly instead of the FW WQ.
@@ -16608,22 +16900,22 @@
   /*Notify UMAC*/
   wdiExitUapsdRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessExitUapsdRsp*/
 
 /**
- @brief Process set UAPSD params Rsp function (called when a 
+ @brief Process set UAPSD params Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetUapsdAcParamsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16634,7 +16926,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16642,7 +16934,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiSetUapsdAcParamsCb = (WDI_SetUapsdAcParamsCb)pWDICtx->pfncRspCB;
@@ -16651,27 +16943,27 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiSetUapsdAcParamsCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetUapsdAcParamsRsp*/
 
 /**
- @brief Process update UAPSD params Rsp function (called when a 
+ @brief Process update UAPSD params Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateUapsdParamsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16682,7 +16974,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16690,7 +16982,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiUpdateUapsdParamsCb = (WDI_UpdateUapsdParamsCb)pWDICtx->pfncRspCB;
@@ -16699,27 +16991,27 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiUpdateUapsdParamsCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessUpdateUapsdParamsRsp*/
 
 /**
  @brief Process Configure RXP filter Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessConfigureRxpFilterRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16730,7 +17022,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -16738,7 +17030,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiConfigureRxpFilterCb = (WDI_ConfigureRxpFilterCb)pWDICtx->pfncRspCB;
@@ -16747,27 +17039,27 @@
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   wdiConfigureRxpFilterCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessConfigureRxpFilterRsp*/
 
 /**
  @brief Process Set beacon filter Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetBeaconFilterRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16778,7 +17070,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData))
@@ -16786,7 +17078,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiBeaconFilterCb = (WDI_SetBeaconFilterCb)pWDICtx->pfncRspCB;
@@ -16795,27 +17087,27 @@
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiBeaconFilterCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetBeaconFilterRsp*/
 
 /**
  @brief Process remove beacon filter Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessRemBeaconFilterRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16826,7 +17118,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData))
@@ -16834,7 +17126,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiBeaconFilterCb = (WDI_RemBeaconFilterCb)pWDICtx->pfncRspCB;
@@ -16843,27 +17135,27 @@
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiBeaconFilterCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessRemBeaconFilterRsp*/
 
 /**
  @brief Process set RSSI thresholds Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetRSSIThresoldsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16874,7 +17166,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData))
@@ -16882,7 +17174,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiRSSIThresholdsCb = (WDI_SetRSSIThresholdsCb)pWDICtx->pfncRspCB;
@@ -16891,27 +17183,27 @@
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiRSSIThresholdsCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetRSSIThresoldsRsp*/
 
 /**
  @brief Process host offload Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessHostOffloadRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16922,7 +17214,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData))
@@ -16930,7 +17222,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiHostOffloadCb = (WDI_HostOffloadCb)pWDICtx->pfncRspCB;
@@ -16939,27 +17231,27 @@
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiHostOffloadCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessHostOffloadRsp*/
 
 /**
  @brief Process keep alive Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessKeepAliveRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -16973,7 +17265,7 @@
 
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData))
@@ -16981,36 +17273,36 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wdiKeepAliveCb = (WDI_KeepAliveCb)pWDICtx->pfncRspCB; 
-   
+   wdiKeepAliveCb = (WDI_KeepAliveCb)pWDICtx->pfncRspCB;
+
    /*-------------------------------------------------------------------------
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiKeepAliveCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessKeepAliveRsp*/
 
 /**
  @brief Process wowl add ptrn Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessWowlAddBcPtrnRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17021,7 +17313,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData))
@@ -17029,7 +17321,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiWowlAddBcPtrnCb = (WDI_WowlAddBcPtrnCb)pWDICtx->pfncRspCB;
@@ -17038,27 +17330,27 @@
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiWowlAddBcPtrnCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessWowlAddBcPtrnRsp*/
 
 /**
- @brief Process wowl delete ptrn Rsp function (called when a 
+ @brief Process wowl delete ptrn Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessWowlDelBcPtrnRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17069,7 +17361,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData))
@@ -17077,7 +17369,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiWowlDelBcPtrnCb = (WDI_WowlDelBcPtrnCb)pWDICtx->pfncRspCB;
@@ -17086,27 +17378,27 @@
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiWowlDelBcPtrnCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessWowlDelBcPtrnRsp*/
 
 /**
- @brief Process wowl enter Rsp function (called when a response 
+ @brief Process wowl enter Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessWowlEnterRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17117,7 +17409,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData))
@@ -17125,7 +17417,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiWowlEnterCb = (WDI_WowlEnterReqCb)pWDICtx->pfncRspCB;
@@ -17134,27 +17426,27 @@
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiWowlEnterCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessWowlEnterRsp*/
 
 /**
- @brief Process wowl exit Rsp function (called when a response 
+ @brief Process wowl exit Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessWowlExitRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17165,7 +17457,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData))
@@ -17173,7 +17465,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiWowlExitCb = (WDI_WowlExitReqCb)pWDICtx->pfncRspCB;
@@ -17182,28 +17474,28 @@
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiWowlExitCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessWowlExitRsp*/
 
 /**
- @brief Process Configure Apps CPU wakeup State Rsp function 
+ @brief Process Configure Apps CPU wakeup State Rsp function
         (called when a response is being received over the bus
         from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessConfigureAppsCpuWakeupStateRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17214,7 +17506,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData))
@@ -17222,7 +17514,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiConfigureAppsCpuWakeupStateCb = (WDI_ConfigureAppsCpuWakeupStateCb)pWDICtx->pfncRspCB;
@@ -17231,28 +17523,28 @@
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiConfigureAppsCpuWakeupStateCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessConfigureAppsCpuWakeupStateRsp*/
 
 
 /**
  @brief Process Nv download(called when a response
         is being received over the bus from HAL,will check if the responce is )
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessNvDownloadRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17263,7 +17555,7 @@
   WDI_NvDownloadRspInfoType wdiNvDownloadRsp;
 
   /*-------------------------------------------------------------------------
-   Sanity check 
+   Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
     ( NULL == pEventData->pEventData))
@@ -17271,24 +17563,24 @@
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
     WDI_ASSERT(0);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halNvDownloadRsp, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halNvDownloadRsp,
+                  pEventData->pEventData,
                   sizeof(halNvDownloadRsp));
 
   wdiNvDownloadRsp.wdiStatus = WDI_HAL_2_WDI_STATUS(halNvDownloadRsp.status);
 
   if((wdiNvDownloadRsp.wdiStatus == WDI_STATUS_SUCCESS) &&
-    (pWDICtx->wdiNvBlobInfo.usCurrentFragment != 
-         pWDICtx->wdiNvBlobInfo.usTotalFragment )) 
+    (pWDICtx->wdiNvBlobInfo.usCurrentFragment !=
+         pWDICtx->wdiNvBlobInfo.usTotalFragment ))
   {
     WDI_NvDownloadReq(&pWDICtx->wdiCachedNvDownloadReq,
-       (WDI_NvDownloadRspCb)pWDICtx->pfncRspCB, pWDICtx->pRspCBUserData); 
+       (WDI_NvDownloadRspCb)pWDICtx->pfncRspCB, pWDICtx->pRspCBUserData);
   }
   else
   {
@@ -17301,22 +17593,22 @@
     wdiNvDownloadRspCb( &wdiNvDownloadRsp, pWDICtx->pRspCBUserData);
   }
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }
 #ifdef WLAN_FEATURE_VOWIFI_11R
 /**
  @brief Process Add TSpec Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessAggrAddTSpecRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17327,7 +17619,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -17335,7 +17627,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   wdiAggrAddTsRspCb = (WDI_AddTsRspCb)pWDICtx->pfncRspCB;
@@ -17343,33 +17635,33 @@
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &aggrAddTsRsp, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &aggrAddTsRsp,
+                  pEventData->pEventData,
                   sizeof(aggrAddTsRsp));
 
   /* What is the difference between status0 and status1? */
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(aggrAddTsRsp.status0); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(aggrAddTsRsp.status0);
 
   /*Notify UMAC*/
   wdiAggrAddTsRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessAddTSpecRsp*/
 #endif /* WLAN_FEATURE_VOWIFI_11R */
 
 /**
- @brief WDI_ProcessHostResumeRsp function (called when a 
+ @brief WDI_ProcessHostResumeRsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessHostResumeRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17380,7 +17672,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
     -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -17388,7 +17680,7 @@
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
     WDI_ASSERT(0);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   wdiHostResumeRspCb = (WDI_HostResumeEventRspCb)pWDICtx->pfncRspCB;
@@ -17397,12 +17689,12 @@
     Extract response and send it to UMAC
     -------------------------------------------------------------------------*/
 
-  wpalMemoryCopy( &hostResumeRspMsg, 
+  wpalMemoryCopy( &hostResumeRspMsg,
       (wpt_uint8*)pEventData->pEventData,
       sizeof(hostResumeRspMsg));
 
-  wdiResumeRspParams.wdiStatus   =   
-    WDI_HAL_2_WDI_STATUS(hostResumeRspMsg.status); 
+  wdiResumeRspParams.wdiStatus   =
+    WDI_HAL_2_WDI_STATUS(hostResumeRspMsg.status);
 
   /*Notify UMAC*/
   wdiHostResumeRspCb(&wdiResumeRspParams, (void*) pWDICtx->pRspCBUserData);
@@ -17411,18 +17703,18 @@
 }
 
 /**
- @brief Process Set Tx PER Rsp function (called when a response 
+ @brief Process Set Tx PER Rsp function (called when a response
         is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetTxPerTrackingRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17433,7 +17725,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -17441,40 +17733,40 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
-  
-  pwdiSetTxPerTrackingRspCb = (WDI_SetTxPerTrackingRspCb)pWDICtx->pfncRspCB; 
+
+  pwdiSetTxPerTrackingRspCb = (WDI_SetTxPerTrackingRspCb)pWDICtx->pfncRspCB;
 
   /*-------------------------------------------------------------------------
     Extract response and send it to UMAC
   -------------------------------------------------------------------------*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Notify UMAC*/
   pwdiSetTxPerTrackingRspCb( wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetTxPerTrackingRsp*/
 
 /*==========================================================================
                         Indications from HAL
  ==========================================================================*/
 /**
- @brief Process Low RSSI Indication function (called when an 
+ @brief Process Low RSSI Indication function (called when an
         indication of this kind is being received over the bus
         from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessLowRSSIInd
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17484,7 +17776,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -17492,14 +17784,14 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
     Extract indication and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( (void *)&halRSSINotificationIndMsg.rssiNotificationParams, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( (void *)&halRSSINotificationIndMsg.rssiNotificationParams,
+                  pEventData->pEventData,
                   sizeof(tHalRSSINotification));
 
   /*Fill in the indication parameters*/
@@ -17519,25 +17811,25 @@
 
   /*Notify UMAC*/
   pWDICtx->wdiLowLevelIndCB( &wdiInd, pWDICtx->pIndUserData );
-  
-  return WDI_STATUS_SUCCESS; 
+
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessLowRSSIInd*/
 
 
 /**
- @brief Process Missed Beacon Indication function (called when 
+ @brief Process Missed Beacon Indication function (called when
         an indication of this kind is being received over the
         bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessMissedBeaconInd
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17548,7 +17840,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -17556,7 +17848,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
@@ -17564,32 +17856,32 @@
   -------------------------------------------------------------------------*/
   /*! TO DO: Parameters need to be unpacked according to HAL struct*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Fill in the indication parameters*/
-  wdiInd.wdiIndicationType = WDI_MISSED_BEACON_IND; 
-  
+  wdiInd.wdiIndicationType = WDI_MISSED_BEACON_IND;
+
   /*Notify UMAC*/
   pWDICtx->wdiLowLevelIndCB( &wdiInd, pWDICtx->pIndUserData );
-  
-  return WDI_STATUS_SUCCESS; 
+
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessMissedBeaconInd*/
 
 
 /**
- @brief Process Unk Addr Frame Indication function (called when 
+ @brief Process Unk Addr Frame Indication function (called when
         an indication of this kind is being received over the
         bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUnkAddrFrameInd
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17600,7 +17892,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -17608,7 +17900,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
@@ -17616,34 +17908,34 @@
   -------------------------------------------------------------------------*/
   /*! TO DO: Parameters need to be unpacked according to HAL struct*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   /*Fill in the indication parameters*/
-  wdiInd.wdiIndicationType = WDI_UNKNOWN_ADDR2_FRAME_RX_IND; 
+  wdiInd.wdiIndicationType = WDI_UNKNOWN_ADDR2_FRAME_RX_IND;
   /* ! TO DO - fill in from HAL struct:
     wdiInd.wdiIndicationData.wdiUnkAddr2FrmInfo*/
 
   /*Notify UMAC*/
   pWDICtx->wdiLowLevelIndCB( &wdiInd, pWDICtx->pIndUserData );
-  
-  return WDI_STATUS_SUCCESS; 
+
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessUnkAddrFrameInd*/
 
 
 /**
- @brief Process MIC Failure Indication function (called when an 
+ @brief Process MIC Failure Indication function (called when an
         indication of this kind is being received over the bus
         from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessMicFailureInd
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17654,7 +17946,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -17662,16 +17954,16 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
-  
+
   pHalMicFailureInd = (tpSirMicFailureInd)pEventData->pEventData;
   /*-------------------------------------------------------------------------
     Extract indication and send it to UMAC
   -------------------------------------------------------------------------*/
 
   /*Fill in the indication parameters*/
-  wdiInd.wdiIndicationType = WDI_MIC_FAILURE_IND; 
+  wdiInd.wdiIndicationType = WDI_MIC_FAILURE_IND;
   wpalMemoryCopy(wdiInd.wdiIndicationData.wdiMICFailureInfo.bssId,
                  pHalMicFailureInd->bssId, WDI_MAC_ADDR_LEN);
   wpalMemoryCopy(wdiInd.wdiIndicationData.wdiMICFailureInfo.macSrcAddr,
@@ -17680,11 +17972,11 @@
                  pHalMicFailureInd->info.taMacAddr, WDI_MAC_ADDR_LEN);
   wpalMemoryCopy(wdiInd.wdiIndicationData.wdiMICFailureInfo.macDstAddr,
                  pHalMicFailureInd->info.dstMacAddr, WDI_MAC_ADDR_LEN);
-  wdiInd.wdiIndicationData.wdiMICFailureInfo.ucMulticast = 
+  wdiInd.wdiIndicationData.wdiMICFailureInfo.ucMulticast =
                  pHalMicFailureInd->info.multicast;
-  wdiInd.wdiIndicationData.wdiMICFailureInfo.ucIV1 = 
+  wdiInd.wdiIndicationData.wdiMICFailureInfo.ucIV1 =
                  pHalMicFailureInd->info.IV1;
-  wdiInd.wdiIndicationData.wdiMICFailureInfo.keyId= 
+  wdiInd.wdiIndicationData.wdiMICFailureInfo.keyId=
                  pHalMicFailureInd->info.keyId;
   wpalMemoryCopy(wdiInd.wdiIndicationData.wdiMICFailureInfo.TSC,
                  pHalMicFailureInd->info.TSC,WDI_CIPHER_SEQ_CTR_SIZE);
@@ -17692,25 +17984,25 @@
                  pHalMicFailureInd->info.rxMacAddr, WDI_MAC_ADDR_LEN);
   /*Notify UMAC*/
   pWDICtx->wdiLowLevelIndCB( &wdiInd, pWDICtx->pIndUserData );
-  
-  return WDI_STATUS_SUCCESS; 
+
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessMicFailureInd*/
 
 
 /**
- @brief Process Fatal Failure Indication function (called when 
+ @brief Process Fatal Failure Indication function (called when
         an indication of this kind is being received over the
         bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessFatalErrorInd
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17721,7 +18013,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -17729,7 +18021,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
@@ -17738,35 +18030,35 @@
 
   /*! TO DO: Parameters need to be unpacked according to HAL struct*/
   halStatus = *((eHalStatus*)pEventData->pEventData);
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
   WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_ERROR,
               "Fatal failure received from device %d ", halStatus );
-  
+
   /*Fill in the indication parameters*/
-  wdiInd.wdiIndicationType             = WDI_FATAL_ERROR_IND; 
-  wdiInd.wdiIndicationData.usErrorCode = WDI_ERR_DEV_INTERNAL_FAILURE; 
+  wdiInd.wdiIndicationType             = WDI_FATAL_ERROR_IND;
+  wdiInd.wdiIndicationData.usErrorCode = WDI_ERR_DEV_INTERNAL_FAILURE;
 
   /*Notify UMAC*/
   pWDICtx->wdiLowLevelIndCB( &wdiInd, pWDICtx->pIndUserData );
-  
-  return WDI_STATUS_SUCCESS; 
+
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessFatalErrorInd*/
 
 /**
- @brief Process Delete STA Indication function (called when 
+ @brief Process Delete STA Indication function (called when
         an indication of this kind is being received over the
         bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessDelSTAInd
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17776,7 +18068,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -17784,7 +18076,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
@@ -17792,45 +18084,45 @@
   -------------------------------------------------------------------------*/
 
   /* Parameters need to be unpacked according to HAL struct*/
-  wpalMemoryCopy( &halDelSTACtx, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halDelSTACtx,
+                  pEventData->pEventData,
                   sizeof(halDelSTACtx));
 
   /*Fill in the indication parameters*/
-  wdiInd.wdiIndicationType             = WDI_DEL_STA_IND; 
+  wdiInd.wdiIndicationType             = WDI_DEL_STA_IND;
 
   wpalMemoryCopy(wdiInd.wdiIndicationData.wdiDeleteSTAIndType.macADDR2,
                  halDelSTACtx.addr2, WDI_MAC_ADDR_LEN);
   wpalMemoryCopy(wdiInd.wdiIndicationData.wdiDeleteSTAIndType.macBSSID,
                  halDelSTACtx.bssId, WDI_MAC_ADDR_LEN);
 
-  wdiInd.wdiIndicationData.wdiDeleteSTAIndType.usAssocId = 
+  wdiInd.wdiIndicationData.wdiDeleteSTAIndType.usAssocId =
     halDelSTACtx.assocId;
-  wdiInd.wdiIndicationData.wdiDeleteSTAIndType.ucSTAIdx  = 
+  wdiInd.wdiIndicationData.wdiDeleteSTAIndType.ucSTAIdx  =
     halDelSTACtx.staId;
-  wdiInd.wdiIndicationData.wdiDeleteSTAIndType.wptReasonCode = 
-    halDelSTACtx.reasonCode; 
+  wdiInd.wdiIndicationData.wdiDeleteSTAIndType.wptReasonCode =
+    halDelSTACtx.reasonCode;
 
   /*Notify UMAC*/
   pWDICtx->wdiLowLevelIndCB( &wdiInd, pWDICtx->pIndUserData );
-  
-  return WDI_STATUS_SUCCESS; 
+
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessDelSTAInd*/
 
 /**
 *@brief Process Coex Indication function (called when
         an indication of this kind is being received over the
         bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessCoexInd
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17841,7 +18133,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData ))
@@ -17849,53 +18141,53 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT( 0 );
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
     Extract indication and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halCoexIndMsg.coexIndParams, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halCoexIndMsg.coexIndParams,
+                  pEventData->pEventData,
                   sizeof(halCoexIndMsg.coexIndParams) );
 
   /*Fill in the indication parameters*/
-  wdiInd.wdiIndicationType = WDI_COEX_IND; 
-  wdiInd.wdiIndicationData.wdiCoexInfo.coexIndType = halCoexIndMsg.coexIndParams.coexIndType; 
+  wdiInd.wdiIndicationType = WDI_COEX_IND;
+  wdiInd.wdiIndicationData.wdiCoexInfo.coexIndType = halCoexIndMsg.coexIndParams.coexIndType;
   for (index = 0; index < WDI_COEX_IND_DATA_SIZE; index++)
   {
-    wdiInd.wdiIndicationData.wdiCoexInfo.coexIndData[index] = halCoexIndMsg.coexIndParams.coexIndData[index]; 
+    wdiInd.wdiIndicationData.wdiCoexInfo.coexIndData[index] = halCoexIndMsg.coexIndParams.coexIndData[index];
   }
 
   // DEBUG
   WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_INFO,
               "[COEX WDI] Coex Ind Type (%x) data (%x %x %x %x)",
-              wdiInd.wdiIndicationData.wdiCoexInfo.coexIndType, 
-              wdiInd.wdiIndicationData.wdiCoexInfo.coexIndData[0], 
-              wdiInd.wdiIndicationData.wdiCoexInfo.coexIndData[1], 
-              wdiInd.wdiIndicationData.wdiCoexInfo.coexIndData[2], 
-              wdiInd.wdiIndicationData.wdiCoexInfo.coexIndData[3] ); 
+              wdiInd.wdiIndicationData.wdiCoexInfo.coexIndType,
+              wdiInd.wdiIndicationData.wdiCoexInfo.coexIndData[0],
+              wdiInd.wdiIndicationData.wdiCoexInfo.coexIndData[1],
+              wdiInd.wdiIndicationData.wdiCoexInfo.coexIndData[2],
+              wdiInd.wdiIndicationData.wdiCoexInfo.coexIndData[3] );
 
   /*Notify UMAC*/
   pWDICtx->wdiLowLevelIndCB( &wdiInd, pWDICtx->pIndUserData );
-  
-  return WDI_STATUS_SUCCESS; 
+
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessCoexInd*/
 
 /**
 *@brief Process Tx Complete Indication function (called when
         an indication of this kind is being received over the
         bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessTxCompleteInd
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -17919,19 +18211,19 @@
   /*-------------------------------------------------------------------------
     Extract indication and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( &halTxComplIndMsg.txComplParams, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( &halTxComplIndMsg.txComplParams,
+                  pEventData->pEventData,
                   sizeof(halTxComplIndMsg.txComplParams) );
 
   /*Fill in the indication parameters*/
-  wdiInd.wdiIndicationType = WDI_TX_COMPLETE_IND; 
-  wdiInd.wdiIndicationData.tx_complete_status 
-                               = halTxComplIndMsg.txComplParams.status; 
+  wdiInd.wdiIndicationType = WDI_TX_COMPLETE_IND;
+  wdiInd.wdiIndicationData.tx_complete_status
+                               = halTxComplIndMsg.txComplParams.status;
 
   /*Notify UMAC*/
   pWDICtx->wdiLowLevelIndCB( &wdiInd, pWDICtx->pIndUserData );
-  
-  return WDI_STATUS_SUCCESS; 
+
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessTxCompleteInd*/
 
 #ifdef WLAN_FEATURE_P2P
@@ -17978,17 +18270,17 @@
 
   /*Fill in the indication parameters*/
   wdiInd.wdiIndicationType = WDI_P2P_NOA_ATTR_IND;
-  
+
   wdiInd.wdiIndicationData.wdiP2pNoaAttrInfo.status
                           = halNoaAttrIndMsg.noaAttrIndParams.status;
-  
+
   wdiInd.wdiIndicationData.wdiP2pNoaAttrInfo.ucIndex
                           = halNoaAttrIndMsg.noaAttrIndParams.index;
   wdiInd.wdiIndicationData.wdiP2pNoaAttrInfo.ucOppPsFlag
                           = halNoaAttrIndMsg.noaAttrIndParams.oppPsFlag;
   wdiInd.wdiIndicationData.wdiP2pNoaAttrInfo.usCtWin
                           = halNoaAttrIndMsg.noaAttrIndParams.ctWin;
-  
+
   wdiInd.wdiIndicationData.wdiP2pNoaAttrInfo.usNoa1IntervalCnt
                           = halNoaAttrIndMsg.noaAttrIndParams.uNoa1IntervalCnt;
   wdiInd.wdiIndicationData.wdiP2pNoaAttrInfo.uslNoa1Duration
@@ -17997,7 +18289,7 @@
                              = halNoaAttrIndMsg.noaAttrIndParams.uNoa1Interval;
   wdiInd.wdiIndicationData.wdiP2pNoaAttrInfo.uslNoa1StartTime
                           = halNoaAttrIndMsg.noaAttrIndParams.uNoa1StartTime;
-  
+
   wdiInd.wdiIndicationData.wdiP2pNoaAttrInfo.usNoa2IntervalCnt
                           = halNoaAttrIndMsg.noaAttrIndParams.uNoa2IntervalCnt;
   wdiInd.wdiIndicationData.wdiP2pNoaAttrInfo.uslNoa2Duration
@@ -18015,52 +18307,52 @@
 #endif
 
 /**
- @brief Process Tx PER Hit Indication function (called when 
+ @brief Process Tx PER Hit Indication function (called when
         an indication of this kind is being received over the
         bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessTxPerHitInd
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
   WDI_LowLevelIndType  wdiInd;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-  
+
   /*-------------------------------------------------------------------------
     Extract indication and send it to UMAC
   -------------------------------------------------------------------------*/
   /*Fill in the indication parameters*/
-  wdiInd.wdiIndicationType = WDI_TX_PER_HIT_IND; 
-  
+  wdiInd.wdiIndicationType = WDI_TX_PER_HIT_IND;
+
   /*Notify UMAC*/
   pWDICtx->wdiLowLevelIndCB( &wdiInd, pWDICtx->pIndUserData );
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessTxPerHitInd*/
 
 #ifdef ANI_MANF_DIAG
 /**
  @brief WDI_ProcessFTMCommandReq
         Process FTM Command, simply route to HAL
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessFTMCommandReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -18070,7 +18362,7 @@
   wpt_uint16              dataOffset;
   wpt_uint16              bufferSize;
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -18079,7 +18371,7 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   ftmCommandReq = (WDI_FTMCommandReqType *)pEventData->pEventData;
@@ -18108,16 +18400,16 @@
 /**
  @brief WDI_ProcessFTMCommandRsp
         Process FTM Command Response from HAL, simply route to HDD FTM
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessFTMCommandRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -18127,7 +18419,7 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -18135,36 +18427,36 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   ftmCMDRspCb = (WDI_FTMCommandRspCb)pWDICtx->pfncRspCB;
 
   ftmCMDRspData = (tProcessPttRspParams *)pEventData->pEventData;
 
-  wpalMemoryCopy((void *)pWDICtx->ucFTMCommandRspBuffer, 
-                 (void *)&ftmCMDRspData->pttMsgBuffer, 
+  wpalMemoryCopy((void *)pWDICtx->ucFTMCommandRspBuffer,
+                 (void *)&ftmCMDRspData->pttMsgBuffer,
                  ftmCMDRspData->pttMsgBuffer.msgBodyLength);
 
   /*Notify UMAC*/
   ftmCMDRspCb((void *)pWDICtx->ucFTMCommandRspBuffer, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }
 #endif /* ANI_MANF_DIAG */
 /**
  @brief WDI_ProcessHalDumpCmdReq
         Process hal dump Command, simply route to HAL
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessHALDumpCmdReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -18174,10 +18466,10 @@
   wpt_uint16               usDataOffset        = 0;
   wpt_uint16               usSendSize          = 0;
   tHalDumpCmdReqMsg        halDumpCmdReqMsg;
-  wpt_uint8*               pSendBuffer         = NULL; 
+  wpt_uint8*               pSendBuffer         = NULL;
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData) ||
@@ -18186,68 +18478,68 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   pwdiHALDumpCmdParams = (WDI_HALDumpCmdReqParamsType*)pEventData->pEventData;
   wdiHALDumpCmdRspCb   = (WDI_HALDumpCmdRspCb)pEventData->pCBfnc;
 
   /* Copying the HAL DUMP Command Information HAL Structure*/
-  halDumpCmdReqMsg.dumpCmdReqParams.argument1 = 
+  halDumpCmdReqMsg.dumpCmdReqParams.argument1 =
                 pwdiHALDumpCmdParams->wdiHALDumpCmdInfoType.command;
-  halDumpCmdReqMsg.dumpCmdReqParams.argument2 = 
+  halDumpCmdReqMsg.dumpCmdReqParams.argument2 =
                 pwdiHALDumpCmdParams->wdiHALDumpCmdInfoType.argument1;
-  halDumpCmdReqMsg.dumpCmdReqParams.argument3 = 
+  halDumpCmdReqMsg.dumpCmdReqParams.argument3 =
                 pwdiHALDumpCmdParams->wdiHALDumpCmdInfoType.argument2;
-  halDumpCmdReqMsg.dumpCmdReqParams.argument4 = 
+  halDumpCmdReqMsg.dumpCmdReqParams.argument4 =
                 pwdiHALDumpCmdParams->wdiHALDumpCmdInfoType.argument3;
-  halDumpCmdReqMsg.dumpCmdReqParams.argument5 = 
+  halDumpCmdReqMsg.dumpCmdReqParams.argument5 =
                 pwdiHALDumpCmdParams->wdiHALDumpCmdInfoType.argument4;
-  
+
   /*-----------------------------------------------------------------------
     Get message buffer
   -----------------------------------------------------------------------*/
-  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_HAL_DUMP_CMD_REQ, 
+  if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_HAL_DUMP_CMD_REQ,
                         sizeof(halDumpCmdReqMsg.dumpCmdReqParams),
                         &pSendBuffer, &usDataOffset, &usSendSize))||
-      ( usSendSize < 
+      ( usSendSize <
             (usDataOffset + sizeof(halDumpCmdReqMsg.dumpCmdReqParams) )))
   {
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
               "Unable to get send buffer in HAL Dump Command req %x %x %x",
                 pEventData, pwdiHALDumpCmdParams, wdiHALDumpCmdRspCb);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                  &halDumpCmdReqMsg.dumpCmdReqParams, 
-                  sizeof(halDumpCmdReqMsg.dumpCmdReqParams)); 
+  wpalMemoryCopy( pSendBuffer+usDataOffset,
+                  &halDumpCmdReqMsg.dumpCmdReqParams,
+                  sizeof(halDumpCmdReqMsg.dumpCmdReqParams));
 
   pWDICtx->wdiReqStatusCB     = pwdiHALDumpCmdParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiHALDumpCmdParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiHALDumpCmdParams->pUserData;
 
   /*-------------------------------------------------------------------------
-    Send Start Request to HAL 
+    Send Start Request to HAL
   -------------------------------------------------------------------------*/
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiHALDumpCmdRspCb, pEventData->pUserData, 
-                        WDI_HAL_DUMP_CMD_RESP); 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiHALDumpCmdRspCb, pEventData->pUserData,
+                        WDI_HAL_DUMP_CMD_RESP);
 }
 
 /**
  @brief WDI_ProcessHalDumpCmdRsp
-        Process hal Dump Command Response from HAL, simply route to HDD 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+        Process hal Dump Command Response from HAL, simply route to HDD
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessHALDumpCmdRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -18257,7 +18549,7 @@
   WDI_HALDumpCmdRspParamsType wdiHALDumpCmdRsp;
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData))
@@ -18265,19 +18557,19 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT(0);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
-  wdiHALDumpCmdRspCb = (WDI_HALDumpCmdRspCb)pWDICtx->pfncRspCB; 
+  wdiHALDumpCmdRspCb = (WDI_HALDumpCmdRspCb)pWDICtx->pfncRspCB;
 
   /*Initialize the WDI Response structure */
   wdiHALDumpCmdRsp.usBufferLen = 0;
   wdiHALDumpCmdRsp.pBuffer = NULL;
 
   halDumpCmdRspParams = (tHalDumpCmdRspParams *)pEventData->pEventData;
-  
-  wdiHALDumpCmdRsp.wdiStatus   = 
-              WDI_HAL_2_WDI_STATUS(halDumpCmdRspParams->status); 
+
+  wdiHALDumpCmdRsp.wdiStatus   =
+              WDI_HAL_2_WDI_STATUS(halDumpCmdRspParams->status);
 
   if (( wdiHALDumpCmdRsp.wdiStatus  ==  WDI_STATUS_SUCCESS) &&
       (halDumpCmdRspParams->rspLength != 0))
@@ -18285,11 +18577,11 @@
       /* Copy the response data */
       wdiHALDumpCmdRsp.usBufferLen = halDumpCmdRspParams->rspLength;
       wdiHALDumpCmdRsp.pBuffer = wpalMemoryAllocate(halDumpCmdRspParams->rspLength);
-      wpalMemoryCopy( &halDumpCmdRspParams->rspBuffer, 
-                  wdiHALDumpCmdRsp.pBuffer, 
+      wpalMemoryCopy( &halDumpCmdRspParams->rspBuffer,
+                  wdiHALDumpCmdRsp.pBuffer,
                   sizeof(wdiHALDumpCmdRsp.usBufferLen));
   }
-  
+
   /*Notify UMAC*/
   wdiHALDumpCmdRspCb(&wdiHALDumpCmdRsp, pWDICtx->pRspCBUserData);
 
@@ -18303,34 +18595,34 @@
 
 /*==========================================================================
                      CONTRL TRANSPORT INTERACTION
- 
+
     Callback function registered with the control transport - for receiving
-    notifications and packets 
+    notifications and packets
 ==========================================================================*/
 /**
- @brief    This callback is invoked by the control transport 
+ @brief    This callback is invoked by the control transport
    when it wishes to send up a notification like the ones
    mentioned above.
- 
+
  @param
-    
-    wctsHandle:       handle to the control transport service 
+
+    wctsHandle:       handle to the control transport service
     wctsEvent:        the event being notified
-    wctsNotifyCBData: the callback data of the user 
-    
+    wctsNotifyCBData: the callback data of the user
+
  @see  WCTS_OpenTransport
-  
- @return None 
+
+ @return None
 */
-void 
+void
 WDI_NotifyMsgCTSCB
 (
-  WCTS_HandleType        wctsHandle, 
+  WCTS_HandleType        wctsHandle,
   WCTS_NotifyEventType   wctsEvent,
   void*                  wctsNotifyCBData
 )
 {
-  WDI_ControlBlockType*  pWDICtx = (WDI_ControlBlockType*)wctsNotifyCBData; 
+  WDI_ControlBlockType*  pWDICtx = (WDI_ControlBlockType*)wctsNotifyCBData;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   if (NULL == pWDICtx )
@@ -18338,7 +18630,7 @@
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
     WDI_ASSERT(0);
-    return; 
+    return;
   }
 
   if (WDI_CONTROL_BLOCK_MAGIC != pWDICtx->magic)
@@ -18346,7 +18638,7 @@
     /* callback presumably occurred after close */
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid control block", __FUNCTION__);
-    return; 
+    return;
   }
 
   if ( WCTS_EVENT_OPEN == wctsEvent )
@@ -18354,22 +18646,22 @@
     /*Flag must be set atomically as it is checked from incoming request
       functions*/
     wpalMutexAcquire(&pWDICtx->wptMutex);
-    pWDICtx->bCTOpened   = eWLAN_PAL_TRUE; 
+    pWDICtx->bCTOpened   = eWLAN_PAL_TRUE;
 
     /*Nothing to do - so try to dequeue any pending request that may have
      occurred while we were trying to establish this*/
     WDI_DequeuePendingReq(pWDICtx);
-    wpalMutexRelease(&pWDICtx->wptMutex);   
+    wpalMutexRelease(&pWDICtx->wptMutex);
   }
-  else if  ( WCTS_EVENT_CLOSE == wctsEvent ) 
+  else if  ( WCTS_EVENT_CLOSE == wctsEvent )
   {
     /*Flag must be set atomically as it is checked from incoming request
       functions*/
     wpalMutexAcquire(&pWDICtx->wptMutex);
-    pWDICtx->bCTOpened   = eWLAN_PAL_FALSE; 
+    pWDICtx->bCTOpened   = eWLAN_PAL_FALSE;
 
     /*No other request will be processed from now on - fail all*/
-    WDI_ClearPendingRequests(pWDICtx); 
+    WDI_ClearPendingRequests(pWDICtx);
     wpalMutexRelease(&pWDICtx->wptMutex);
 
     /*Notify that the Control Channel is closed */
@@ -18380,45 +18672,45 @@
 
 
 /**
- @brief    This callback is invoked by the control transport 
+ @brief    This callback is invoked by the control transport
            when it wishes to send up a packet received over the
            bus.
- 
+
  @param
-    
-    wctsHandle:  handle to the control transport service 
+
+    wctsHandle:  handle to the control transport service
     pMsg:        the packet
     uLen:        the packet length
-    wctsRxMsgCBData: the callback data of the user 
-    
+    wctsRxMsgCBData: the callback data of the user
+
  @see  WCTS_OpenTransport
-  
- @return None 
+
+ @return None
 */
-void 
-WDI_RXMsgCTSCB 
+void
+WDI_RXMsgCTSCB
 (
-  WCTS_HandleType       wctsHandle, 
+  WCTS_HandleType       wctsHandle,
   void*                 pMsg,
   wpt_uint32            uLen,
   void*                 wctsRxMsgCBData
 )
 {
-  tHalMsgHeader          *pHalMsgHeader; 
-  WDI_EventInfoType      wdiEventData; 
+  tHalMsgHeader          *pHalMsgHeader;
+  WDI_EventInfoType      wdiEventData;
   WDI_ControlBlockType*  pWDICtx = (WDI_ControlBlockType*)wctsRxMsgCBData;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
 
   /*------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   ------------------------------------------------------------------------*/
-  if ((NULL == pWDICtx ) || ( NULL == pMsg ) || 
+  if ((NULL == pWDICtx ) || ( NULL == pMsg ) ||
       ( uLen < sizeof(tHalMsgHeader)))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
     WDI_ASSERT(0);
-    return; 
+    return;
   }
 
   if (WDI_CONTROL_BLOCK_MAGIC != pWDICtx->magic)
@@ -18426,10 +18718,10 @@
     /* callback presumably occurred after close */
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid control block", __FUNCTION__);
-    return; 
+    return;
   }
 
-  /*The RX Callback is expected to be serialized in the proper control thread 
+  /*The RX Callback is expected to be serialized in the proper control thread
     context - so no serialization is necessary here
     ! - revisit this assumption */
 
@@ -18439,8 +18731,8 @@
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "Invalid packet received from HAL - catastrophic failure");
-    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_INVALID_RSP_FMT); 
-    return; 
+    WDI_DetectedDeviceError( pWDICtx, WDI_ERR_INVALID_RSP_FMT);
+    return;
   }
 
   wdiEventData.wdiResponse = HAL_2_WDI_RSP_TYPE( pHalMsgHeader->msgType );
@@ -18464,7 +18756,7 @@
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
                "Received response %s (%d) when expecting %s (%d) - catastrophic failure",
                WDI_getRespMsgString(wdiEventData.wdiResponse),
-               wdiEventData.wdiResponse, 
+               wdiEventData.wdiResponse,
                WDI_getRespMsgString(pWDICtx->wdiExpectedResponse),
                pWDICtx->wdiExpectedResponse);
     /* WDI_DetectedDeviceError( pWDICtx, WDI_ERR_INVALID_RSP_FMT); */
@@ -18481,13 +18773,13 @@
 
 
 /*========================================================================
-         Internal Helper Routines 
+         Internal Helper Routines
 ========================================================================*/
 
 /**
- @brief WDI_CleanCB - internal helper routine used to clean the 
+ @brief WDI_CleanCB - internal helper routine used to clean the
         WDI Main Control Block
- 
+
  @param pWDICtx - pointer to the control block
 
  @return Result of the function call
@@ -18501,9 +18793,9 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
 
   /*Clean the WDI Control Block*/
-  wpalMemoryZero( pWDICtx, sizeof(*pWDICtx)); 
+  wpalMemoryZero( pWDICtx, sizeof(*pWDICtx));
 
-  pWDICtx->uGlobalState  = WDI_MAX_ST; 
+  pWDICtx->uGlobalState  = WDI_MAX_ST;
   pWDICtx->ucMaxBssids   = WDI_MAX_SUPPORTED_BSS;
   pWDICtx->ucMaxStations = WDI_MAX_SUPPORTED_STAS;
 
@@ -18514,12 +18806,12 @@
 
 
 /**
- @brief Process request helper function 
+ @brief Process request helper function
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
@@ -18532,12 +18824,12 @@
 {
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  /*!! Skip sanity check as this is called from the FSM functionss which 
+  /*!! Skip sanity check as this is called from the FSM functionss which
     already checked these pointers*/
 
   if (( pEventData->wdiRequest < WDI_MAX_UMAC_IND ) &&
       ( NULL != pfnReqProcTbl[pEventData->wdiRequest] ))
-  {  
+  {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
               "Calling request processing function for req %s (%d) %x",
               WDI_getReqMsgString(pEventData->wdiRequest),
@@ -18547,7 +18839,7 @@
   else
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Operation %d is not yet implemented ", 
+              "Operation %d is not yet implemented ",
                pEventData->wdiRequest);
     return WDI_STATUS_E_NOT_IMPLEMENT;
   }
@@ -18555,11 +18847,11 @@
 
 
 /**
- @brief Get message helper function - it allocates memory for a 
+ @brief Get message helper function - it allocates memory for a
         message that is to be sent to HAL accross the bus and
-        prefixes it with a send message header 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
+        prefixes it with a send message header
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
          wdiReqType:      type of the request being sent
          uBufferLen:      message buffer len
          pMsgBuffer:      resulting allocated buffer
@@ -18567,62 +18859,70 @@
          can start copying its message data
          puBufferSize:    the resulting buffer size (offset+buff
          len)
-  
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_GetMessageBuffer
-( 
-  WDI_ControlBlockType*  pWDICtx, 
-  WDI_RequestEnumType    wdiReqType, 
+(
+  WDI_ControlBlockType*  pWDICtx,
+  WDI_RequestEnumType    wdiReqType,
   wpt_uint16             usBufferLen,
-  wpt_uint8**            pMsgBuffer, 
-  wpt_uint16*            pusDataOffset, 
+  wpt_uint8**            pMsgBuffer,
+  wpt_uint16*            pusDataOffset,
   wpt_uint16*            pusBufferSize
 )
 {
   tHalMsgHeader  halMsgHeader;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  /*!! No sanity check here as we trust the called - ! check this assumption 
+  /*!! No sanity check here as we trust the called - ! check this assumption
     again*/
 
   /*-------------------------------------------------------------------------
-     Try to allocate message buffer from PAL 
+     Try to allocate message buffer from PAL
   -------------------------------------------------------------------------*/
-  *pusBufferSize = sizeof(halMsgHeader) + usBufferLen; 
+  *pusBufferSize = sizeof(halMsgHeader) + usBufferLen;
   *pMsgBuffer   = (wpt_uint8*)wpalMemoryAllocate(*pusBufferSize);
   if ( NULL ==  *pMsgBuffer )
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "Unable to allocate message buffer for req %s (%d)",
                WDI_getReqMsgString(wdiReqType),
-               wdiReqType); 
+               wdiReqType);
      WDI_ASSERT(0);
-     return WDI_STATUS_MEM_FAILURE; 
+     return WDI_STATUS_MEM_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
      Fill in the message header
   -------------------------------------------------------------------------*/
-  halMsgHeader.msgType = WDI_2_HAL_REQ_TYPE(wdiReqType); 
-  halMsgHeader.msgLen  = sizeof(halMsgHeader) + usBufferLen; 
-  *pusDataOffset       = sizeof(halMsgHeader); 
-  wpalMemoryCopy(*pMsgBuffer, &halMsgHeader, sizeof(halMsgHeader)); 
+  halMsgHeader.msgType = WDI_2_HAL_REQ_TYPE(wdiReqType);
+  /* Fill msgVersion */
+#ifdef WLAN_FEATURE_11AC
+  if (WDI_getFwWlanFeatCaps(DOT11AC))
+	  halMsgHeader.msgVersion = WLAN_HAL_MSG_VERSION1; 
+  else
+#endif
+	  halMsgHeader.msgVersion = WLAN_HAL_MSG_VERSION0;
 
-  return WDI_STATUS_SUCCESS; 
+  halMsgHeader.msgLen  = sizeof(halMsgHeader) + usBufferLen;
+  *pusDataOffset       = sizeof(halMsgHeader);
+  wpalMemoryCopy(*pMsgBuffer, &halMsgHeader, sizeof(halMsgHeader));
+
+  return WDI_STATUS_SUCCESS;
 }/*WDI_GetMessageBuffer*/
 
 
 /**
- @brief Send message helper function - sends a message over the 
+ @brief Send message helper function - sends a message over the
         bus using the control tranport and saves some info in
-        the CB 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
+        the CB
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
          pSendBuffer:     buffer to be sent
-  
+
          usSendSize          size of the buffer to be sent
          pRspCb:            response callback - save in the WDI
          CB
@@ -18630,17 +18930,17 @@
          callback
          wdiExpectedResponse: the code of the response that is
          expected to be rx-ed for this request
-  
+
  @see
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SendMsg
-( 
-  WDI_ControlBlockType*  pWDICtx,  
-  wpt_uint8*             pSendBuffer, 
-  wpt_uint32             usSendSize, 
-  void*                  pRspCb, 
+(
+  WDI_ControlBlockType*  pWDICtx,
+  wpt_uint8*             pSendBuffer,
+  wpt_uint32             usSendSize,
+  void*                  pRspCb,
   void*                  pUserData,
   WDI_ResponseEnumType   wdiExpectedResponse
 )
@@ -18649,11 +18949,11 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
 
   /*------------------------------------------------------------------------
-    Save needed info in the CB 
+    Save needed info in the CB
   ------------------------------------------------------------------------*/
   pWDICtx->pRspCBUserData      = pUserData;
-  pWDICtx->pfncRspCB           = pRspCb; 
-  pWDICtx->wdiExpectedResponse = wdiExpectedResponse; 
+  pWDICtx->pfncRspCB           = pRspCb;
+  pWDICtx->wdiExpectedResponse = wdiExpectedResponse;
 
    /*-----------------------------------------------------------------------
      Call the CTS to send this message over - free message afterwards
@@ -18705,22 +19005,22 @@
 
 
 /**
- @brief Send indication helper function - sends a message over 
+ @brief Send indication helper function - sends a message over
         the bus using the control transport and saves some info
         in the CB
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
          pSendBuffer:     buffer to be sent
          usSendSize: size of the buffer to be sent
-  
+
  @see
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SendIndication
-( 
-  WDI_ControlBlockType*  pWDICtx,  
-  wpt_uint8*             pSendBuffer, 
+(
+  WDI_ControlBlockType*  pWDICtx,
+  wpt_uint8*             pSendBuffer,
   wpt_uint32             usSendSize
 )
 {
@@ -18728,10 +19028,10 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
 
    /*-----------------------------------------------------------------------
-     Call the CTS to send this message over 
+     Call the CTS to send this message over
      Note: CTS is reponsible for freeing the message buffer.
    -----------------------------------------------------------------------*/
-   uStatus = WCTS_SendMessage( pWDICtx->wctsHandle, 
+   uStatus = WCTS_SendMessage( pWDICtx->wctsHandle,
                                (void*)pSendBuffer, usSendSize );
 
    /*Inform Upper MAC about the outcome of the request*/
@@ -18741,8 +19041,8 @@
                 "Send indication status : %d", uStatus);
 
       pWDICtx->wdiReqStatusCB( (uStatus != 0 ) ? WDI_STATUS_E_FAILURE:
-                                                 WDI_STATUS_SUCCESS, 
-                               pWDICtx->pReqStatusUserData); 
+                                                 WDI_STATUS_SUCCESS,
+                               pWDICtx->pReqStatusUserData);
    }
 
    /*If sending of the message failed - it is considered catastrophic and
@@ -18750,26 +19050,26 @@
    if ( 0 != uStatus)
    {
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
-                "Failed to send indication over the bus - catastrophic failure"); 
+                "Failed to send indication over the bus - catastrophic failure");
 
       WDI_DetectedDeviceError( pWDICtx, WDI_ERR_TRANSPORT_FAILURE);
       return WDI_STATUS_E_FAILURE;
    }
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_SendIndication*/
 
 
 /**
- @brief WDI_DetectedDeviceError - called internally by DAL when 
-        it has detected a failure in the device 
- 
- @param  pWDICtx:        pointer to the WLAN DAL context 
+ @brief WDI_DetectedDeviceError - called internally by DAL when
+        it has detected a failure in the device
+
+ @param  pWDICtx:        pointer to the WLAN DAL context
          usErrorCode:    error code detected by WDI or received
                          from HAL
-  
+
  @see
- @return None 
+ @return None
 */
 void
 WDI_DetectedDeviceError
@@ -18796,9 +19096,9 @@
   pWDICtx->ucExpectedStateTransition =  WDI_STOPPED_ST;
 
   /*Transition to stopped to fail all incomming requests from this point on*/
-  WDI_STATE_TRANSITION( pWDICtx, WDI_STOPPED_ST); 
+  WDI_STATE_TRANSITION( pWDICtx, WDI_STOPPED_ST);
 
-  WDI_ClearPendingRequests(pWDICtx); 
+  WDI_ClearPendingRequests(pWDICtx);
 
   /*TO DO: -  there should be an attempt to reset the device here*/
 
@@ -18809,26 +19109,26 @@
   ------------------------------------------------------------------------*/
   if (pWDICtx->wdiLowLevelIndCB)
   {
-     wdiInd.wdiIndicationType             = WDI_FATAL_ERROR_IND; 
-     wdiInd.wdiIndicationData.usErrorCode = usErrorCode; 
+     wdiInd.wdiIndicationType             = WDI_FATAL_ERROR_IND;
+     wdiInd.wdiIndicationData.usErrorCode = usErrorCode;
 
      pWDICtx->wdiLowLevelIndCB( &wdiInd,  pWDICtx->pIndUserData);
   }
 }/*WDI_DetectedDeviceError*/
 
 /**
- @brief    This callback is invoked by the wpt when a timer that 
+ @brief    This callback is invoked by the wpt when a timer that
            we started on send message has expire - this should
            never happen - it means device is stuck and cannot
-           reply - trigger catastrophic failure 
- @param 
-    
+           reply - trigger catastrophic failure
+ @param
+
     pUserData: the callback data of the user (ptr to WDI CB)
-    
- @see 
- @return None 
+
+ @see
+ @return None
 */
-void 
+void
 WDI_ResponseTimerCB
 (
   void *pUserData
@@ -18842,7 +19142,7 @@
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
     WDI_ASSERT(0);
-    return; 
+    return;
   }
 
   if ( WDI_MAX_RESP != pWDICtx->wdiExpectedResponse )
@@ -18850,7 +19150,7 @@
 
   WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
             "Timeout occurred while waiting for %s (%d) message from device "
-            " - catastrophic failure", 
+            " - catastrophic failure",
             WDI_getRespMsgString(pWDICtx->wdiExpectedResponse),
             pWDICtx->wdiExpectedResponse);
   /* WDI timeout means Riva is not responding or SMD communication to Riva
@@ -18871,12 +19171,12 @@
 
 
 /**
- @brief Process response helper function 
+ @brief Process response helper function
 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
@@ -18889,14 +19189,14 @@
 {
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  /* Skip sanity check as this is called from the FSM functions which 
+  /* Skip sanity check as this is called from the FSM functions which
     already checked these pointers
     ! - revisit this assumption */
   if (( pEventData->wdiResponse < WDI_MAX_RESP ) &&
       ( NULL != pfnRspProcTbl[pEventData->wdiResponse] ))
-  {  
+  {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
-              "Calling response processing function for resp %s (%d) %x", 
+              "Calling response processing function for resp %s (%d) %x",
               WDI_getRespMsgString(pEventData->wdiResponse),
               pEventData->wdiResponse, pfnRspProcTbl[pEventData->wdiResponse]);
     return pfnRspProcTbl[pEventData->wdiResponse](pWDICtx, pEventData);
@@ -18904,7 +19204,7 @@
   else
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Operation %d is not yet implemented ", 
+              "Operation %d is not yet implemented ",
               pEventData->wdiResponse);
     return WDI_STATUS_E_NOT_IMPLEMENT;
   }
@@ -18912,20 +19212,20 @@
 
 
 /*=========================================================================
-                   QUEUE SUPPORT UTILITY FUNCTIONS 
+                   QUEUE SUPPORT UTILITY FUNCTIONS
 =========================================================================*/
 
 /**
- @brief    Utility function used by the DAL Core to help queue a 
-           request that cannot be processed right away. 
- @param 
-    
+ @brief    Utility function used by the DAL Core to help queue a
+           request that cannot be processed right away.
+ @param
+
     pWDICtx: - pointer to the WDI control block
     pEventData: - pointer to the evnt info that needs to be
-    queued 
-    
- @see 
- @return Result of the operation  
+    queued
+
+ @see
+ @return Result of the operation
 */
 WDI_Status
 WDI_QueuePendingReq
@@ -18934,15 +19234,15 @@
   WDI_EventInfoType*     pEventData
 )
 {
-  wpt_list_node*      pNode; 
+  wpt_list_node*      pNode;
   WDI_EventInfoType*  pEventDataQueue = wpalMemoryAllocate(sizeof(*pEventData));
-  void*               pEventInfo = NULL; 
+  void*               pEventInfo = NULL;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   if ( NULL ==  pEventDataQueue )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Cannot allocate memory for queueing"); 
+              "Cannot allocate memory for queueing");
     WDI_ASSERT(0);
     return WDI_STATUS_MEM_FAILURE;
   }
@@ -18951,54 +19251,54 @@
   pEventDataQueue->pUserData       = pEventData->pUserData;
   pEventDataQueue->uEventDataSize  = pEventData->uEventDataSize;
   pEventDataQueue->wdiRequest      = pEventData->wdiRequest;
-  pEventDataQueue->wdiResponse     = pEventData->wdiResponse; 
+  pEventDataQueue->wdiResponse     = pEventData->wdiResponse;
 
   if( pEventData->uEventDataSize != 0 && pEventData->pEventData != NULL )
   {
      pEventInfo = wpalMemoryAllocate(pEventData->uEventDataSize);
-   
+
      if ( NULL ==  pEventInfo )
      {
        WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-                 "Cannot allocate memory for queueing event data info"); 
+                 "Cannot allocate memory for queueing event data info");
        WDI_ASSERT(0);
        wpalMemoryFree(pEventDataQueue);
        return WDI_STATUS_MEM_FAILURE;
      }
-   
+
      wpalMemoryCopy(pEventInfo, pEventData->pEventData, pEventData->uEventDataSize);
 
   }
   pEventDataQueue->pEventData = pEventInfo;
 
   /*Send wpt a pointer to the node (this is the 1st element in the event data)*/
-  pNode = (wpt_list_node*)pEventDataQueue; 
+  pNode = (wpt_list_node*)pEventDataQueue;
 
-  wpal_list_insert_back(&(pWDICtx->wptPendingQueue), pNode); 
+  wpal_list_insert_back(&(pWDICtx->wptPendingQueue), pNode);
 
   return WDI_STATUS_SUCCESS;
 }/*WDI_QueuePendingReq*/
 
 /**
- @brief    Callback function for serializing queued message 
+ @brief    Callback function for serializing queued message
            processing in the control context
- @param 
-    
-    pMsg - pointer to the message 
-    
- @see 
- @return Result of the operation  
+ @param
+
+    pMsg - pointer to the message
+
+ @see
+ @return Result of the operation
 */
-void 
+void
 WDI_PALCtrlMsgCB
 (
  wpt_msg *pMsg
 )
 {
   WDI_EventInfoType*     pEventData = NULL;
-  WDI_ControlBlockType*  pWDICtx    = NULL; 
-  WDI_Status             wdiStatus; 
-  WDI_ReqStatusCb        pfnReqStatusCB; 
+  WDI_ControlBlockType*  pWDICtx    = NULL;
+  WDI_Status             wdiStatus;
+  WDI_ReqStatusCb        pfnReqStatusCB;
   void*                  pUserData;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
@@ -19007,9 +19307,9 @@
       ( NULL == (pWDICtx  = (WDI_ControlBlockType*)pMsg->pContext )))
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-              "Invalid message received on serialize ctrl context API"); 
+              "Invalid message received on serialize ctrl context API");
     WDI_ASSERT(0);
-    return; 
+    return;
   }
 
   /*Transition back to the state that we had before serialization
@@ -19017,21 +19317,19 @@
   ! TO DO L: possible race condition here if a request comes in between the
    state transition and the post function*/
 
-  WDI_STATE_TRANSITION( pWDICtx, pMsg->val); 
+  WDI_STATE_TRANSITION( pWDICtx, pMsg->val);
 
   /*-----------------------------------------------------------------------
      Check to see what type of event we are serializing
-     - responses are never expected to come through here 
+     - responses are never expected to come through here
   -----------------------------------------------------------------------*/
   switch ( pEventData->wdiRequest )
   {
 
-  case WDI_STOP_REQ:
-      
+  case WDI_STOP_REQ:      
       wdiStatus = WDI_PostMainEvent(&gWDICb, WDI_STOP_EVENT, pEventData);
       break;
 
-
   case WDI_NV_DOWNLOAD_REQ:
       // When WDI State is WDI_STARTED_ST, send WDI request message with event type WDI_REQUEST_EVENT.
       // In this case, because this request is called from response process, we could call WDI_ProcessRequest() directly.
@@ -19078,20 +19376,20 @@
   {
      wpalMemoryFree(pMsg);
   }
-  
+
 }/*WDI_PALCtrlMsgCB*/
 
 /**
  @brief    Utility function used by the DAL Core to help dequeue
-           and schedule for execution a pending request 
- @param 
-    
+           and schedule for execution a pending request
+ @param
+
     pWDICtx: - pointer to the WDI control block
     pEventData: - pointer to the evnt info that needs to be
-    queued 
-    
- @see 
- @return Result of the operation  
+    queued
+
+ @see
+ @return Result of the operation
 */
 WDI_Status
 WDI_DequeuePendingReq
@@ -19099,23 +19397,23 @@
   WDI_ControlBlockType*  pWDICtx
 )
 {
-  wpt_list_node*      pNode      = NULL; 
+  wpt_list_node*      pNode      = NULL;
   WDI_EventInfoType*  pEventData;
-  wpt_msg*            palMsg; 
+  wpt_msg*            palMsg;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  wpal_list_remove_front(&(pWDICtx->wptPendingQueue), &pNode); 
+  wpal_list_remove_front(&(pWDICtx->wptPendingQueue), &pNode);
 
   if ( NULL ==  pNode )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-              "List is empty - return"); 
+              "List is empty - return");
     return WDI_STATUS_SUCCESS;
   }
 
   /*The node actually points to the 1st element inside the Event Data struct -
     just cast it back to the struct*/
-  pEventData = (WDI_EventInfoType*)pNode; 
+  pEventData = (WDI_EventInfoType*)pNode;
 
   /*Serialize processing in the control thread
      !TO DO: - check to see if these are all the messages params that need
@@ -19125,20 +19423,20 @@
   if ( NULL ==  palMsg )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-               "WDI_DequeuePendingReq: Cannot allocate memory for palMsg."); 
+               "WDI_DequeuePendingReq: Cannot allocate memory for palMsg.");
     WDI_ASSERT(0);
-    return WDI_STATUS_MEM_FAILURE; 
+    return WDI_STATUS_MEM_FAILURE;
   }
-  palMsg->pContext = pWDICtx; 
+  palMsg->pContext = pWDICtx;
   palMsg->callback = WDI_PALCtrlMsgCB;
   palMsg->ptr      = pEventData;
 
   /*Save the global state as we need it on the other side*/
-  palMsg->val      = pWDICtx->uGlobalState; 
-    
+  palMsg->val      = pWDICtx->uGlobalState;
+
   /*Transition back to BUSY as we need to handle a queued request*/
   WDI_STATE_TRANSITION( pWDICtx, WDI_BUSY_ST);
-  
+
   wpalPostCtrlMsg(pWDICtx->pPALContext, palMsg);
 
   return WDI_STATUS_PENDING;
@@ -19146,17 +19444,17 @@
 
 
 /**
- @brief    Utility function used by the DAL Core to help queue 
+ @brief    Utility function used by the DAL Core to help queue
            an association request that cannot be processed right
-           away.- The assoc requests will be queued by BSSID 
- @param 
-    
+           away.- The assoc requests will be queued by BSSID
+ @param
+
     pWDICtx: - pointer to the WDI control block
     pEventData: pointer to the evnt info that needs to be queued
     macBSSID: bssid
-    
- @see 
- @return Result of the operation  
+
+ @see
+ @return Result of the operation
 */
 WDI_Status
 WDI_QueueNewAssocRequest
@@ -19166,42 +19464,42 @@
   wpt_macAddr            macBSSID
 )
 {
-  wpt_uint8 i; 
-  WDI_BSSSessionType*     pSession = NULL; 
-  wpt_list_node*          pNode; 
+  wpt_uint8 i;
+  WDI_BSSSessionType*     pSession = NULL;
+  wpt_list_node*          pNode;
   WDI_EventInfoType*      pEventDataQueue;
-  void*                   pEventInfo; 
-  WDI_NextSessionIdType*  pSessionIdElement; 
+  void*                   pEventInfo;
+  WDI_NextSessionIdType*  pSessionIdElement;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-  
 
-  /*------------------------------------------------------------------------ 
-      Search for a session that matches the BSSID 
+
+  /*------------------------------------------------------------------------
+      Search for a session that matches the BSSID
     ------------------------------------------------------------------------*/
   for ( i = 0; i < WDI_MAX_BSS_SESSIONS; i++ )
   {
      if ( eWLAN_PAL_FALSE == pWDICtx->aBSSSessions[i].bInUse )
      {
        /*Found an empty session*/
-       pSession = &pWDICtx->aBSSSessions[i]; 
-       break; 
+       pSession = &pWDICtx->aBSSSessions[i];
+       break;
      }
   }
 
   if ( i >=  WDI_MAX_BSS_SESSIONS )
   {
     /*Cannot find any empty sessions*/
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
-  
+
   /*------------------------------------------------------------------------
     Fill in the BSSID for this session and set the usage flag
   ------------------------------------------------------------------------*/
   wpalMemoryCopy(pWDICtx->aBSSSessions[i].macBSSID, macBSSID, WDI_MAC_ADDR_LEN);
-  pWDICtx->aBSSSessions[i].bInUse = eWLAN_PAL_TRUE; 
+  pWDICtx->aBSSSessions[i].bInUse = eWLAN_PAL_TRUE;
 
   /*------------------------------------------------------------------------
-    Allocate memory for this and place it in the queue 
+    Allocate memory for this and place it in the queue
   ------------------------------------------------------------------------*/
   pEventDataQueue = (WDI_EventInfoType*)wpalMemoryAllocate(sizeof(WDI_EventInfoType));
   if ( NULL == pEventDataQueue )
@@ -19237,28 +19535,28 @@
   pEventDataQueue->pUserData       = pEventData->pUserData;
   pEventDataQueue->uEventDataSize  = pEventData->uEventDataSize;
   pEventDataQueue->wdiRequest      = pEventData->wdiRequest;
-  pEventDataQueue->wdiResponse     = pEventData->wdiResponse; 
+  pEventDataQueue->wdiResponse     = pEventData->wdiResponse;
 
   wpalMemoryCopy(pEventInfo, pEventData->pEventData, pEventData->uEventDataSize);
   pEventDataQueue->pEventData = pEventInfo;
 
   /*Send wpt a pointer to the node (this is the 1st element in the event data)*/
-  pNode = (wpt_list_node*)pEventDataQueue; 
+  pNode = (wpt_list_node*)pEventDataQueue;
 
   /*This association is currently being queued*/
-  pSession->bAssocReqQueued = eWLAN_PAL_TRUE; 
+  pSession->bAssocReqQueued = eWLAN_PAL_TRUE;
 
-  wpal_list_insert_back(&(pSession->wptPendingQueue), pNode); 
+  wpal_list_insert_back(&(pSession->wptPendingQueue), pNode);
 
   /*We need to maintain a separate list that keeps track of the order in which
   the new assoc requests are being queued such that we can start processing
   them in the order that they had arrived*/
-  pSessionIdElement->ucIndex = i; 
-  pNode = (wpt_list_node*)pSessionIdElement; 
+  pSessionIdElement->ucIndex = i;
+  pNode = (wpt_list_node*)pSessionIdElement;
 
   WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
        "Queueing up new assoc session : %d ", pSessionIdElement->ucIndex);
-  wpal_list_insert_back(&pWDICtx->wptPendingAssocSessionIdQueue, pNode); 
+  wpal_list_insert_back(&pWDICtx->wptPendingAssocSessionIdQueue, pNode);
 
   /*Return pending as this is what the status of the request is since it has
     been queued*/
@@ -19266,18 +19564,18 @@
 }/*WDI_QueueNewAssocRequest*/
 
 /**
- @brief    Utility function used by the DAL Core to help queue 
+ @brief    Utility function used by the DAL Core to help queue
            an association request that cannot be processed right
-           away.- The assoc requests will be queued by BSSID 
- @param 
-    
+           away.- The assoc requests will be queued by BSSID
+ @param
+
     pWDICtx: - pointer to the WDI control block
     pSession: - session in which to queue
     pEventData: pointer to the event info that needs to be
     queued
-    
- @see 
- @return Result of the operation  
+
+ @see
+ @return Result of the operation
 */
 WDI_Status
 WDI_QueueAssocRequest
@@ -19287,12 +19585,12 @@
   WDI_EventInfoType*     pEventData
 )
 {
-  wpt_list_node*      pNode; 
+  wpt_list_node*      pNode;
   WDI_EventInfoType*  pEventDataQueue;
-  void*               pEventInfo; 
+  void*               pEventInfo;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-  
-  /*------------------------------------------------------------------------ 
+
+  /*------------------------------------------------------------------------
       Sanity check
     ------------------------------------------------------------------------*/
   if (( NULL == pSession ) || ( NULL == pWDICtx ))
@@ -19300,17 +19598,17 @@
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
 
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   /*------------------------------------------------------------------------
-    Allocate memory for this and place it in the queue 
+    Allocate memory for this and place it in the queue
   ------------------------------------------------------------------------*/
   pEventDataQueue = (WDI_EventInfoType*)wpalMemoryAllocate(sizeof(WDI_EventInfoType));
   if ( NULL ==  pEventDataQueue )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-               "%s: Cannot allocate memory for queueing", __FUNCTION__); 
+               "%s: Cannot allocate memory for queueing", __FUNCTION__);
     WDI_ASSERT(0);
     return WDI_STATUS_MEM_FAILURE;
   }
@@ -19330,18 +19628,18 @@
   pEventDataQueue->pUserData       = pEventData->pUserData;
   pEventDataQueue->uEventDataSize  = pEventData->uEventDataSize;
   pEventDataQueue->wdiRequest      = pEventData->wdiRequest;
-  pEventDataQueue->wdiResponse     = pEventData->wdiResponse; 
+  pEventDataQueue->wdiResponse     = pEventData->wdiResponse;
   pEventDataQueue->pEventData      = pEventInfo;
 
   wpalMemoryCopy(pEventInfo, pEventData->pEventData, pEventData->uEventDataSize);
 
   /*Send wpt a pointer to the node (this is the 1st element in the event data)*/
-  pNode = (wpt_list_node*)pEventDataQueue; 
+  pNode = (wpt_list_node*)pEventDataQueue;
 
   /*This association is currently being queued*/
-  pSession->bAssocReqQueued = eWLAN_PAL_TRUE; 
+  pSession->bAssocReqQueued = eWLAN_PAL_TRUE;
 
-  wpal_list_insert_back(&(pSession->wptPendingQueue), pNode); 
+  wpal_list_insert_back(&(pSession->wptPendingQueue), pNode);
 
   /*The result of this operation is pending because the request has been
     queued and it will be processed at a later moment in time */
@@ -19353,13 +19651,13 @@
            an association request that was pending
            The request will be queued up in front of the main
            pending queue for imediate processing
- @param 
-    
+ @param
+
     pWDICtx: - pointer to the WDI control block
-  
-    
- @see 
- @return Result of the operation  
+
+
+ @see
+ @return Result of the operation
 */
 WDI_Status
 WDI_DequeueAssocRequest
@@ -19367,12 +19665,12 @@
   WDI_ControlBlockType*  pWDICtx
 )
 {
-  wpt_list_node*          pNode = NULL; 
-  WDI_NextSessionIdType*  pSessionIdElement; 
+  wpt_list_node*          pNode = NULL;
+  WDI_NextSessionIdType*  pSessionIdElement;
   WDI_BSSSessionType*     pSession;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-  
-  /*------------------------------------------------------------------------ 
+
+  /*------------------------------------------------------------------------
       Sanity check
     ------------------------------------------------------------------------*/
   if ( NULL == pWDICtx )
@@ -19380,7 +19678,7 @@
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
 
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   /*------------------------------------------------------------------------
@@ -19392,18 +19690,18 @@
     (bc they needed to be processed in order to be placed in this queue)
     => they will be placed at the front of the busy queue
   ------------------------------------------------------------------------*/
-  wpal_list_remove_front(&(pWDICtx->wptPendingAssocSessionIdQueue), &pNode); 
+  wpal_list_remove_front(&(pWDICtx->wptPendingAssocSessionIdQueue), &pNode);
 
   if ( NULL ==  pNode )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
-              "List is empty - return"); 
+              "List is empty - return");
     return WDI_STATUS_SUCCESS;
   }
 
   /*The node actually points to the 1st element inside the Session Id struct -
     just cast it back to the struct*/
-  pSessionIdElement = (WDI_NextSessionIdType*)pNode; 
+  pSessionIdElement = (WDI_NextSessionIdType*)pNode;
 
   WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
        "Dequeueing new assoc session : %d ", pSessionIdElement->ucIndex);
@@ -19411,67 +19709,68 @@
   if ( pSessionIdElement->ucIndex < WDI_MAX_BSS_SESSIONS )
   {
       pSession = &pWDICtx->aBSSSessions[pSessionIdElement->ucIndex];
-      
+
       /*Transfer all the pending requests in this assoc queue to
-      the front of the main waiting queue for subsequent execution*/      
-      wpal_list_remove_back(&(pSession->wptPendingQueue), &pNode); 
+      the front of the main waiting queue for subsequent execution*/
+      wpal_list_remove_back(&(pSession->wptPendingQueue), &pNode);
       while ( NULL !=  pNode )
       {
         /*Place it in front of the main pending list*/
-        wpal_list_insert_front( &(pWDICtx->wptPendingQueue), &pNode); 
-        wpal_list_remove_back(&(pSession->wptPendingQueue), &pNode); 
+        wpal_list_insert_front( &(pWDICtx->wptPendingQueue), &pNode);
+        wpal_list_remove_back(&(pSession->wptPendingQueue), &pNode);
       }
+      pSession->bAssocReqQueued = eWLAN_PAL_FALSE;
   }
   else
   {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
-              "Invalid session id queued up for assoc"); 
+              "Invalid session id queued up for assoc");
      WPAL_ASSERT(0);
      wpalMemoryFree(pSessionIdElement);
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
-  
+
   /*Clean this up as it is no longer needed in order to prevent memory leak*/
   wpalMemoryFree(pSessionIdElement);
   return WDI_STATUS_SUCCESS;
 }/*WDI_DequeueAssocRequest*/
 
 /**
- @brief    Utility function used by the DAL Core to clear any 
+ @brief    Utility function used by the DAL Core to clear any
            pending requests - all req cb will be called with
            failure and the queue will be emptied.
- @param 
-    
+ @param
+
     pWDICtx: - pointer to the WDI control block
-    
- @see 
- @return Result of the operation  
+
+ @see
+ @return Result of the operation
 */
 WDI_Status
 WDI_ClearPendingRequests
-( 
+(
   WDI_ControlBlockType*  pWDICtx
 )
 {
-  wpt_list_node*      pNode = NULL; 
+  wpt_list_node*      pNode = NULL;
   WDI_EventInfoType*  pEventDataQueue = NULL;
-  WDI_ReqStatusCb     pfnReqStatusCB; 
+  WDI_ReqStatusCb     pfnReqStatusCB;
   void*               pUserData;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-  wpal_list_remove_front(&(pWDICtx->wptPendingQueue), &pNode); 
+  wpal_list_remove_front(&(pWDICtx->wptPendingQueue), &pNode);
 
   /*------------------------------------------------------------------------
     Go through all the requests and fail them - this will only be called
     when device is being stopped or an error was detected - either case the
-    pending requests can no longer be sent down to HAL 
+    pending requests can no longer be sent down to HAL
   ------------------------------------------------------------------------*/
   while( pNode )
   {
       /*The node actually points to the 1st element inside the Event Data struct -
     just cast it back to the struct*/
-    pEventDataQueue = (WDI_EventInfoType*)pNode; 
-  
+    pEventDataQueue = (WDI_EventInfoType*)pNode;
+
     WDI_ExtractRequestCBFromEvent(pEventDataQueue, &pfnReqStatusCB, &pUserData);
     if ( NULL != pfnReqStatusCB )
     {
@@ -19489,26 +19788,26 @@
     {
         break;
     }
-  } 
- 
+  }
+
   return WDI_STATUS_SUCCESS;
 }/*WDI_ClearPendingRequests*/
 
 /**
- @brief Helper routine used to init the BSS Sessions in the WDI control block 
-  
- 
- @param  pWDICtx:       pointer to the WLAN DAL context 
-  
+ @brief Helper routine used to init the BSS Sessions in the WDI control block
+
+
+ @param  pWDICtx:       pointer to the WLAN DAL context
+
  @see
 */
 void
 WDI_ResetAssocSessions
-( 
+(
   WDI_ControlBlockType*   pWDICtx
 )
 {
-  wpt_uint8 i; 
+  wpt_uint8 i;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
 
   /*-------------------------------------------------------------------------
@@ -19516,7 +19815,7 @@
   -------------------------------------------------------------------------*/
   for ( i = 0; i < WDI_MAX_BSS_SESSIONS; i++ )
   {
-    wpalMemoryZero( &pWDICtx->aBSSSessions[i], sizeof(WDI_BSSSessionType) ); 
+    wpalMemoryZero( &pWDICtx->aBSSSessions[i], sizeof(WDI_BSSSessionType) );
     pWDICtx->aBSSSessions[i].wdiAssocState = WDI_ASSOC_INIT_ST;
     pWDICtx->aBSSSessions[i].bcastStaIdx = WDI_STA_INVALID_IDX;
     pWDICtx->aBSSSessions[i].ucBSSIdx = WDI_BSS_INVALID_IDX;
@@ -19524,120 +19823,120 @@
 }/*WDI_ResetAssocSessions*/
 
 /**
- @brief Helper routine used to find a session based on the BSSID 
-  
- 
- @param  pWDICtx:       pointer to the WLAN DAL context 
+ @brief Helper routine used to find a session based on the BSSID
+
+
+ @param  pWDICtx:       pointer to the WLAN DAL context
          macBSSID:      BSSID of the session
-         pSession:      pointer to the session (if found) 
-  
+         pSession:      pointer to the session (if found)
+
  @see
- @return Index of the session in the array 
+ @return Index of the session in the array
 */
 wpt_uint8
 WDI_FindAssocSession
-( 
+(
   WDI_ControlBlockType*   pWDICtx,
   wpt_macAddr             macBSSID,
   WDI_BSSSessionType**    ppSession
 )
 {
-  wpt_uint8 i; 
+  wpt_uint8 i;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if ( NULL == ppSession )
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
-     return WDI_MAX_BSS_SESSIONS; 
+     return WDI_MAX_BSS_SESSIONS;
   }
 
-  *ppSession = NULL; 
+  *ppSession = NULL;
 
-  /*------------------------------------------------------------------------ 
-      Search for a session that matches the BSSID 
+  /*------------------------------------------------------------------------
+      Search for a session that matches the BSSID
     ------------------------------------------------------------------------*/
   for ( i = 0; i < WDI_MAX_BSS_SESSIONS; i++ )
   {
-     if ( eWLAN_PAL_TRUE == 
+     if ( eWLAN_PAL_TRUE ==
           wpalMemoryCompare(pWDICtx->aBSSSessions[i].macBSSID, macBSSID, WDI_MAC_ADDR_LEN) )
      {
        /*Found the session*/
-       *ppSession = &pWDICtx->aBSSSessions[i]; 
+       *ppSession = &pWDICtx->aBSSSessions[i];
        return i;
      }
   }
 
-  return i; 
+  return i;
 }/*WDI_FindAssocSession*/
 
 /**
- @brief Helper routine used to find a session based on the BSSID 
-  
- 
- @param  pWDICtx:   pointer to the WLAN DAL context 
+ @brief Helper routine used to find a session based on the BSSID
+
+
+ @param  pWDICtx:   pointer to the WLAN DAL context
          ucBSSIdx:  BSS Index of the session
          ppSession: out pointer to the session (if found)
-  
+
  @see
- @return Index of the session in the array 
+ @return Index of the session in the array
 */
 wpt_uint8
 WDI_FindAssocSessionByBSSIdx
-( 
+(
   WDI_ControlBlockType*   pWDICtx,
   wpt_uint16              ucBSSIdx,
   WDI_BSSSessionType**    ppSession
 )
 {
-  wpt_uint8 i; 
+  wpt_uint8 i;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if ( NULL == ppSession )
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
-     return WDI_MAX_BSS_SESSIONS; 
+     return WDI_MAX_BSS_SESSIONS;
   }
 
-  *ppSession = NULL; 
+  *ppSession = NULL;
 
-  /*------------------------------------------------------------------------ 
-      Search for a session that matches the BSSID 
+  /*------------------------------------------------------------------------
+      Search for a session that matches the BSSID
     ------------------------------------------------------------------------*/
   for ( i = 0; i < WDI_MAX_BSS_SESSIONS; i++ )
   {
      if ( ucBSSIdx == pWDICtx->aBSSSessions[i].ucBSSIdx )
      {
        /*Found the session*/
-       *ppSession = &pWDICtx->aBSSSessions[i]; 
+       *ppSession = &pWDICtx->aBSSSessions[i];
        return i;
      }
   }
 
-  return i; 
+  return i;
 }/*WDI_FindAssocSessionByBSSIdx*/
 
 /**
- @brief Helper routine used to find a session based on the BSSID 
-  
- 
- @param  pWDICtx:   pointer to the WLAN DAL context 
+ @brief Helper routine used to find a session based on the BSSID
+
+
+ @param  pWDICtx:   pointer to the WLAN DAL context
          ucBSSIdx:  BSS Index of the session
          ppSession: out pointer to the session (if found)
-  
+
  @see
- @return Index of the session in the array 
+ @return Index of the session in the array
 */
 wpt_uint8
 WDI_FindAssocSessionByIdx
-( 
+(
   WDI_ControlBlockType*   pWDICtx,
   wpt_uint16              usIdx,
   WDI_BSSSessionType**    ppSession
@@ -19646,91 +19945,91 @@
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if ( NULL == ppSession || usIdx >= WDI_MAX_BSS_SESSIONS )
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
-     return WDI_MAX_BSS_SESSIONS; 
+     return WDI_MAX_BSS_SESSIONS;
   }
 
   /*Found the session*/
-  *ppSession = &pWDICtx->aBSSSessions[usIdx]; 
+  *ppSession = &pWDICtx->aBSSSessions[usIdx];
 
   return usIdx;
-  
+
 }/*WDI_FindAssocSessionByBSSIdx*/
 
 /**
- @brief Helper routine used to find an empty session in the WDI 
+ @brief Helper routine used to find an empty session in the WDI
         CB
-  
- 
- @param  pWDICtx:       pointer to the WLAN DAL context 
-         pSession:      pointer to the session (if found) 
-  
+
+
+ @param  pWDICtx:       pointer to the WLAN DAL context
+         pSession:      pointer to the session (if found)
+
  @see
- @return Index of the session in the array 
+ @return Index of the session in the array
 */
 wpt_uint8
 WDI_FindEmptySession
-( 
+(
   WDI_ControlBlockType*   pWDICtx,
   WDI_BSSSessionType**    ppSession
 )
 {
-  wpt_uint8 i; 
+  wpt_uint8 i;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
    /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if ( NULL == ppSession )
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
-     return WDI_MAX_BSS_SESSIONS; 
+     return WDI_MAX_BSS_SESSIONS;
   }
 
-  *ppSession = NULL; 
+  *ppSession = NULL;
 
-  /*------------------------------------------------------------------------ 
-      Search for a session that it is not in use 
+  /*------------------------------------------------------------------------
+      Search for a session that it is not in use
     ------------------------------------------------------------------------*/
   for ( i = 0; i < WDI_MAX_BSS_SESSIONS; i++ )
   {
      if ( ! pWDICtx->aBSSSessions[i].bInUse )
      {
        /*Found a session*/
-       *ppSession = &pWDICtx->aBSSSessions[i]; 
+       *ppSession = &pWDICtx->aBSSSessions[i];
        return i;
      }
   }
 
-  return i; 
+  return i;
 }/*WDI_FindEmptySession*/
 
 
 /**
- @brief Helper routine used to get the total count of active 
+ @brief Helper routine used to get the total count of active
         sessions
-  
- 
- @param  pWDICtx:       pointer to the WLAN DAL context 
-  
+
+
+ @param  pWDICtx:       pointer to the WLAN DAL context
+
  @see
  @return Number of sessions in use
 */
 wpt_uint8
 WDI_GetActiveSessionsCount
-( 
+(
   WDI_ControlBlockType*   pWDICtx
 )
 {
-  wpt_uint8 i, ucCount = 0; 
+  wpt_uint8 i, ucCount = 0;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
-  
-  /*------------------------------------------------------------------------ 
+
+  /*------------------------------------------------------------------------
       Count all sessions in use
     ------------------------------------------------------------------------*/
   for ( i = 0; i < WDI_MAX_BSS_SESSIONS; i++ )
@@ -19741,59 +20040,59 @@
      }
   }
 
-  return ucCount; 
+  return ucCount;
 }/*WDI_GetActiveSessionsCount*/
 
 /**
- @brief Helper routine used to delete session in the WDI 
+ @brief Helper routine used to delete session in the WDI
         CB
-  
- 
- @param  pWDICtx:       pointer to the WLAN DAL context 
-         pSession:      pointer to the session (if found) 
-  
+
+
+ @param  pWDICtx:       pointer to the WLAN DAL context
+         pSession:      pointer to the session (if found)
+
  @see
- @return Index of the session in the array 
+ @return Index of the session in the array
 */
-void 
+void
 WDI_DeleteSession
-( 
+(
   WDI_ControlBlockType*   pWDICtx,
   WDI_BSSSessionType*     ppSession
 )
 {
    /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if ( NULL == ppSession )
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
-     return ; 
+     return ;
   }
 
-  /*------------------------------------------------------------------------ 
-      Reset the entries int session 
+  /*------------------------------------------------------------------------
+      Reset the entries int session
     ------------------------------------------------------------------------*/
   wpal_list_destroy(&ppSession->wptPendingQueue);
   wpalMemoryZero(ppSession,  sizeof(*ppSession));
-  ppSession->wdiAssocState = WDI_ASSOC_INIT_ST; 
-  ppSession->bInUse        = eWLAN_PAL_FALSE; 
+  ppSession->wdiAssocState = WDI_ASSOC_INIT_ST;
+  ppSession->bInUse        = eWLAN_PAL_FALSE;
   ppSession->wdiBssType    = WDI_INFRASTRUCTURE_MODE;
   wpal_list_init(&ppSession->wptPendingQueue);
 
 }/*WDI_DeleteSession*/
 
 /**
- @brief    Utility function to add the broadcast STA to the the STA table. 
+ @brief    Utility function to add the broadcast STA to the the STA table.
  The bcast STA ID is assigned by HAL and must be valid.
- @param 
-    
+ @param
+
     WDI_AddStaParams: - pointer to the WDI Add STA params
     usBcastStaIdx: - Broadcast STA index passed by HAL
-    
- @see 
- @return void 
+
+ @see
+ @return void
 */
 void
 WDI_AddBcastSTAtoSTATable
@@ -19815,7 +20114,7 @@
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                 "%s: Invalid parameters", __FUNCTION__);
 
-    return; 
+    return;
   }
 
   wdiAddSTAParam.bcastDpuIndex = staParams->bcastDpuIndex;
@@ -19833,23 +20132,23 @@
   wdiAddSTAParam.ucStaType = WDI_STA_ENTRY_BCAST;
   wdiAddSTAParam.ucWmmEnabled = staParams->ucWmmEnabled;
   wdiAddSTAParam.ucSTAIdx = usBcastStaIdx;
-    
+
   (void)WDI_STATableAddSta(pWDICtx,&wdiAddSTAParam);
 }
 
 /**
- @brief NV blob will be divided into fragments of size 4kb and 
- Sent to HAL 
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+ @brief NV blob will be divided into fragments of size 4kb and
+ Sent to HAL
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
  */
 
 WDI_Status WDI_SendNvBlobReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -19868,7 +20167,7 @@
   WDI_ASSERT(NULL != wdiNvDownloadRspCb);
   pwdiNvDownloadReqParams = (WDI_NvDownloadReqParamsType*)pEventData->pEventData;
 
-  /* Sanity Check is done by the caller */ 
+  /* Sanity Check is done by the caller */
   pSrcBuffer =(wpt_uint8 *) pwdiNvDownloadReqParams->wdiBlobInfo.pBlobAddress;
 
   /* Update the current  Fragment Number */
@@ -19880,14 +20179,14 @@
                                      pWDICtx->wdiNvBlobInfo.usCurrentFragment-1;
 
   /*    Divide the NV Image to size of 'FRAGMENT_SIZE' fragments and send it to HAL.
-       If the size of the Image is less than 'FRAGMENT_SIZE' then in one iteration total 
+       If the size of the Image is less than 'FRAGMENT_SIZE' then in one iteration total
        image will be sent to HAL*/
 
-  if(pWDICtx->wdiNvBlobInfo.usTotalFragment 
+  if(pWDICtx->wdiNvBlobInfo.usTotalFragment
                          == pWDICtx->wdiNvBlobInfo.usCurrentFragment)
-  { 
+  {
     /*     Taking care of boundry condition */
-    if( !(usCurrentFragmentSize = 
+    if( !(usCurrentFragmentSize =
                  pwdiNvDownloadReqParams->wdiBlobInfo.uBlobSize%FRAGMENT_SIZE ))
       usCurrentFragmentSize = FRAGMENT_SIZE;
 
@@ -19897,7 +20196,7 @@
 
   }
   else
-  { 
+  {
     usCurrentFragmentSize = FRAGMENT_SIZE;
 
     /*Update the HAL REQ structure */
@@ -19911,18 +20210,18 @@
   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,WDI_NV_DOWNLOAD_REQ,
          sizeof(halNvImgDownloadParam.nvImageReqParams)+ usCurrentFragmentSize,
                     &pSendBuffer, &usDataOffset, &usSendSize))||
-      ( usSendSize < 
+      ( usSendSize <
            (usDataOffset + sizeof(halNvImgDownloadParam.nvImageReqParams) + usCurrentFragmentSize )))
   {
     WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_WARN,
          "Unable to get send buffer in NV Download req %x %x ",
          pEventData, pwdiNvDownloadReqParams);
     WDI_ASSERT(0);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   /* Copying the Hal NV download REQ structure */
-  wpalMemoryCopy(pSendBuffer + usDataOffset , 
+  wpalMemoryCopy(pSendBuffer + usDataOffset ,
     &halNvImgDownloadParam.nvImageReqParams ,sizeof(tHalNvImgDownloadReqParams));
 
   /* Appending the NV image fragment */
@@ -19931,25 +20230,25 @@
                   usCurrentFragmentSize);
 
   pWDICtx->wdiReqStatusCB     = pwdiNvDownloadReqParams->wdiReqStatusCB;
-  pWDICtx->pReqStatusUserData = pwdiNvDownloadReqParams->pUserData; 
+  pWDICtx->pReqStatusUserData = pwdiNvDownloadReqParams->pUserData;
 
-  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                           wdiNvDownloadRspCb, pEventData->pUserData, 
+  return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                           wdiNvDownloadRspCb, pEventData->pUserData,
                            WDI_NV_DOWNLOAD_RESP);
 
 }
-/*============================================================================ 
-  Helper inline functions for 
+/*============================================================================
+  Helper inline functions for
  ============================================================================*/
 /**
- @brief Helper routine used to find a session based on the BSSID 
- @param  pContext:   pointer to the WLAN DAL context 
- @param  pDPContext:   pointer to the Datapath context 
-  
+ @brief Helper routine used to find a session based on the BSSID
+ @param  pContext:   pointer to the WLAN DAL context
+ @param  pDPContext:   pointer to the Datapath context
+
  @see
- @return 
+ @return
 */
-WPT_INLINE void 
+WPT_INLINE void
 WDI_DS_AssignDatapathContext (void *pContext, void *pDPContext)
 {
    WDI_ControlBlockType *pCB = (WDI_ControlBlockType *)pContext;
@@ -19959,56 +20258,56 @@
 }
 
 /**
- @brief Helper routine used to find a session based on the BSSID 
-  
- 
- @param  pContext:   pointer to the WLAN DAL context 
-  
+ @brief Helper routine used to find a session based on the BSSID
+
+
+ @param  pContext:   pointer to the WLAN DAL context
+
  @see
  @return pointer to Datapath context
 */
-WPT_INLINE void * 
+WPT_INLINE void *
 WDI_DS_GetDatapathContext (void *pContext)
 {
    WDI_ControlBlockType *pCB = (WDI_ControlBlockType *)pContext;
    return pCB->pDPContext;
 }
 /**
- @brief Helper routine used to find a session based on the BSSID 
-  
- 
- @param  pContext:   pointer to the WLAN DAL context 
- @param  pDTDriverContext:   pointer to the Transport Driver context 
-  
+ @brief Helper routine used to find a session based on the BSSID
+
+
+ @param  pContext:   pointer to the WLAN DAL context
+ @param  pDTDriverContext:   pointer to the Transport Driver context
+
  @see
  @return void
 */
-WPT_INLINE void  
+WPT_INLINE void
 WDT_AssignTransportDriverContext (void *pContext, void *pDTDriverContext)
 {
    WDI_ControlBlockType *pCB = (WDI_ControlBlockType *)pContext;
 
    pCB->pDTDriverContext = pDTDriverContext;
-   return; 
+   return;
 }
 
 /**
- @brief Helper routine used to find a session based on the BSSID 
-  
- 
- @param  pWDICtx:   pointer to the WLAN DAL context 
-  
+ @brief Helper routine used to find a session based on the BSSID
+
+
+ @param  pWDICtx:   pointer to the WLAN DAL context
+
  @see
- @return pointer to datapath context 
+ @return pointer to datapath context
 */
-WPT_INLINE void * 
+WPT_INLINE void *
 WDT_GetTransportDriverContext (void *pContext)
 {
    WDI_ControlBlockType *pCB = (WDI_ControlBlockType *)pContext;
-   return(pCB->pDTDriverContext); 
+   return(pCB->pDTDriverContext);
 }
 
-/*============================================================================ 
+/*============================================================================
   Helper inline converters
  ============================================================================*/
 /*Convert WDI driver type into HAL driver type*/
@@ -20018,7 +20317,7 @@
   eHalStatus halStatus
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch(  halStatus )
   {
@@ -20029,14 +20328,14 @@
   case eHAL_STATUS_FAILURE:
     return WDI_STATUS_E_FAILURE;
   case eHAL_STATUS_FAILED_ALLOC:
-    return WDI_STATUS_MEM_FAILURE;    
-   /*The rest of the HAL error codes must be kept hidden from the UMAC as 
+    return WDI_STATUS_MEM_FAILURE;
+   /*The rest of the HAL error codes must be kept hidden from the UMAC as
      they refer to specific internal modules of our device*/
-  default: 
-    return WDI_STATUS_DEV_INTERNAL_FAILURE; 
-  } 
+  default:
+    return WDI_STATUS_DEV_INTERNAL_FAILURE;
+  }
 
-  return WDI_STATUS_E_FAILURE; 
+  return WDI_STATUS_E_FAILURE;
 }/*WDI_HAL_2_WDI_STATUS*/
 
 /*Convert WDI request type into HAL request type*/
@@ -20046,53 +20345,53 @@
   WDI_RequestEnumType    wdiReqType
 )
 {
-   /*Lightweight function - no sanity checks and no unecessary code to increase 
+   /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch(  wdiReqType )
-  {    
+  {
   case WDI_START_REQ:
-    return WLAN_HAL_START_REQ; 
+    return WLAN_HAL_START_REQ;
   case WDI_STOP_REQ:
-    return WLAN_HAL_STOP_REQ; 
+    return WLAN_HAL_STOP_REQ;
   case WDI_INIT_SCAN_REQ:
-    return WLAN_HAL_INIT_SCAN_REQ; 
+    return WLAN_HAL_INIT_SCAN_REQ;
   case WDI_START_SCAN_REQ:
-    return WLAN_HAL_START_SCAN_REQ; 
+    return WLAN_HAL_START_SCAN_REQ;
   case WDI_END_SCAN_REQ:
-    return WLAN_HAL_END_SCAN_REQ; 
+    return WLAN_HAL_END_SCAN_REQ;
   case WDI_FINISH_SCAN_REQ:
-    return WLAN_HAL_FINISH_SCAN_REQ; 
+    return WLAN_HAL_FINISH_SCAN_REQ;
   case WDI_JOIN_REQ:
-    return WLAN_HAL_JOIN_REQ; 
+    return WLAN_HAL_JOIN_REQ;
   case WDI_CONFIG_BSS_REQ:
-    return WLAN_HAL_CONFIG_BSS_REQ; 
+    return WLAN_HAL_CONFIG_BSS_REQ;
   case WDI_DEL_BSS_REQ:
-    return WLAN_HAL_DELETE_BSS_REQ; 
+    return WLAN_HAL_DELETE_BSS_REQ;
   case WDI_POST_ASSOC_REQ:
-    return WLAN_HAL_POST_ASSOC_REQ; 
+    return WLAN_HAL_POST_ASSOC_REQ;
   case WDI_DEL_STA_REQ:
-    return WLAN_HAL_DELETE_STA_REQ; 
+    return WLAN_HAL_DELETE_STA_REQ;
   case WDI_SET_BSS_KEY_REQ:
-    return WLAN_HAL_SET_BSSKEY_REQ; 
+    return WLAN_HAL_SET_BSSKEY_REQ;
   case WDI_RMV_BSS_KEY_REQ:
-    return WLAN_HAL_RMV_BSSKEY_REQ; 
+    return WLAN_HAL_RMV_BSSKEY_REQ;
   case WDI_SET_STA_KEY_REQ:
-    return WLAN_HAL_SET_STAKEY_REQ; 
+    return WLAN_HAL_SET_STAKEY_REQ;
   case WDI_RMV_STA_KEY_REQ:
-    return WLAN_HAL_RMV_STAKEY_REQ; 
+    return WLAN_HAL_RMV_STAKEY_REQ;
   case WDI_SET_STA_BCAST_KEY_REQ:
-    return WLAN_HAL_SET_BCASTKEY_REQ; 
+    return WLAN_HAL_SET_BCASTKEY_REQ;
   case WDI_RMV_STA_BCAST_KEY_REQ:
-    //Some conflict in the old code - check this: return WLAN_HAL_RMV_BCASTKEY_REQ; 
+    //Some conflict in the old code - check this: return WLAN_HAL_RMV_BCASTKEY_REQ;
     return WLAN_HAL_RMV_STAKEY_REQ;
   case WDI_ADD_TS_REQ:
-    return WLAN_HAL_ADD_TS_REQ; 
+    return WLAN_HAL_ADD_TS_REQ;
   case WDI_DEL_TS_REQ:
-    return WLAN_HAL_DEL_TS_REQ; 
+    return WLAN_HAL_DEL_TS_REQ;
   case WDI_UPD_EDCA_PRMS_REQ:
-    return WLAN_HAL_UPD_EDCA_PARAMS_REQ; 
+    return WLAN_HAL_UPD_EDCA_PARAMS_REQ;
   case WDI_ADD_BA_REQ:
-    return WLAN_HAL_ADD_BA_REQ; 
+    return WLAN_HAL_ADD_BA_REQ;
   case WDI_DEL_BA_REQ:
     return WLAN_HAL_DEL_BA_REQ; 
 #ifdef FEATURE_WLAN_CCX
@@ -20100,23 +20399,23 @@
     return WLAN_HAL_TSM_STATS_REQ; 
 #endif
   case WDI_CH_SWITCH_REQ:
-    return WLAN_HAL_CH_SWITCH_REQ; 
+    return WLAN_HAL_CH_SWITCH_REQ;
   case WDI_CONFIG_STA_REQ:
-    return WLAN_HAL_CONFIG_STA_REQ; 
+    return WLAN_HAL_CONFIG_STA_REQ;
   case WDI_SET_LINK_ST_REQ:
-    return WLAN_HAL_SET_LINK_ST_REQ; 
+    return WLAN_HAL_SET_LINK_ST_REQ;
   case WDI_GET_STATS_REQ:
-    return WLAN_HAL_GET_STATS_REQ; 
+    return WLAN_HAL_GET_STATS_REQ;
   case WDI_UPDATE_CFG_REQ:
-    return WLAN_HAL_UPDATE_CFG_REQ; 
+    return WLAN_HAL_UPDATE_CFG_REQ;
   case WDI_ADD_BA_SESSION_REQ:
     return WLAN_HAL_ADD_BA_SESSION_REQ;
   case WDI_TRIGGER_BA_REQ:
     return WLAN_HAL_TRIGGER_BA_REQ;
   case WDI_UPD_BCON_PRMS_REQ:
-    return WLAN_HAL_UPDATE_BEACON_REQ; 
+    return WLAN_HAL_UPDATE_BEACON_REQ;
   case WDI_SND_BCON_REQ:
-    return WLAN_HAL_SEND_BEACON_REQ; 
+    return WLAN_HAL_SEND_BEACON_REQ;
   case WDI_UPD_PROBE_RSP_TEMPLATE_REQ:
     return WLAN_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ;
    case WDI_SET_MAX_TX_POWER_REQ:
@@ -20126,25 +20425,25 @@
     return WLAN_HAL_SET_P2P_GONOA_REQ;
 #endif
   case WDI_ENTER_IMPS_REQ:
-    return WLAN_HAL_ENTER_IMPS_REQ; 
+    return WLAN_HAL_ENTER_IMPS_REQ;
   case WDI_EXIT_IMPS_REQ:
-    return WLAN_HAL_EXIT_IMPS_REQ; 
+    return WLAN_HAL_EXIT_IMPS_REQ;
   case WDI_ENTER_BMPS_REQ:
-    return WLAN_HAL_ENTER_BMPS_REQ; 
+    return WLAN_HAL_ENTER_BMPS_REQ;
   case WDI_EXIT_BMPS_REQ:
-    return WLAN_HAL_EXIT_BMPS_REQ; 
+    return WLAN_HAL_EXIT_BMPS_REQ;
   case WDI_ENTER_UAPSD_REQ:
-    return WLAN_HAL_ENTER_UAPSD_REQ; 
+    return WLAN_HAL_ENTER_UAPSD_REQ;
   case WDI_EXIT_UAPSD_REQ:
-    return WLAN_HAL_EXIT_UAPSD_REQ; 
+    return WLAN_HAL_EXIT_UAPSD_REQ;
   case WDI_SET_UAPSD_PARAM_REQ:
-    return WLAN_HAL_SET_UAPSD_AC_PARAMS_REQ; 
+    return WLAN_HAL_SET_UAPSD_AC_PARAMS_REQ;
   case WDI_UPDATE_UAPSD_PARAM_REQ:
-    return WLAN_HAL_UPDATE_UAPSD_PARAM_REQ; 
+    return WLAN_HAL_UPDATE_UAPSD_PARAM_REQ;
   case WDI_CONFIGURE_RXP_FILTER_REQ:
-    return WLAN_HAL_CONFIGURE_RXP_FILTER_REQ; 
+    return WLAN_HAL_CONFIGURE_RXP_FILTER_REQ;
   case WDI_SET_BEACON_FILTER_REQ:
-    return WLAN_HAL_ADD_BCN_FILTER_REQ; 
+    return WLAN_HAL_ADD_BCN_FILTER_REQ;
   case WDI_REM_BEACON_FILTER_REQ:
     return WLAN_HAL_REM_BCN_FILTER_REQ;
   case WDI_SET_RSSI_THRESHOLDS_REQ:
@@ -20179,6 +20478,10 @@
     return WLAN_HAL_ADD_STA_SELF_REQ;
   case WDI_DEL_STA_SELF_REQ:
     return WLAN_HAL_DEL_STA_SELF_REQ;
+#ifdef FEATURE_OEM_DATA_SUPPORT
+  case WDI_START_OEM_DATA_REQ:
+    return WLAN_HAL_START_OEM_DATA_REQ;
+#endif /* FEATURE_OEM_DATA_SUPPORT */
   case WDI_HOST_RESUME_REQ:
     return WLAN_HAL_HOST_RESUME_REQ;
   case WDI_HOST_SUSPEND_IND:
@@ -20200,7 +20503,7 @@
   case WDI_8023_MULTICAST_LIST_REQ:
     return WLAN_HAL_8023_MULTICAST_LIST_REQ;
   case WDI_RECEIVE_FILTER_SET_FILTER_REQ:
-    return WLAN_HAL_SET_PACKET_FILTER_REQ; 
+    return WLAN_HAL_SET_PACKET_FILTER_REQ;
   case WDI_PACKET_COALESCING_FILTER_MATCH_COUNT_REQ:
     return WLAN_HAL_PACKET_FILTER_MATCH_COUNT_REQ;
   case WDI_RECEIVE_FILTER_CLEAR_FILTER_REQ:
@@ -20224,9 +20527,9 @@
   case WDI_FEATURE_CAPS_EXCHANGE_REQ:
     return WLAN_HAL_FEATURE_CAPS_EXCHANGE_REQ;
   default:
-    return WLAN_HAL_MSG_MAX; 
+    return WLAN_HAL_MSG_MAX;
   }
-  
+
 }/*WDI_2_HAL_REQ_TYPE*/
 
 /*Convert WDI response type into HAL response type*/
@@ -20236,7 +20539,7 @@
   tHalHostMsgType halMsg
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch(  halMsg )
   {
@@ -20338,23 +20641,23 @@
     return WDI_P2P_GO_NOTICE_OF_ABSENCE_RESP;
 #endif
   case WLAN_HAL_ENTER_IMPS_RSP:
-    return WDI_ENTER_IMPS_RESP; 
+    return WDI_ENTER_IMPS_RESP;
   case WLAN_HAL_EXIT_IMPS_RSP:
-    return WDI_EXIT_IMPS_RESP; 
+    return WDI_EXIT_IMPS_RESP;
   case WLAN_HAL_ENTER_BMPS_RSP:
-    return WDI_ENTER_BMPS_RESP; 
+    return WDI_ENTER_BMPS_RESP;
   case WLAN_HAL_EXIT_BMPS_RSP:
-    return WDI_EXIT_BMPS_RESP; 
+    return WDI_EXIT_BMPS_RESP;
   case WLAN_HAL_ENTER_UAPSD_RSP:
-    return WDI_ENTER_UAPSD_RESP; 
+    return WDI_ENTER_UAPSD_RESP;
   case WLAN_HAL_EXIT_UAPSD_RSP:
-    return WDI_EXIT_UAPSD_RESP; 
+    return WDI_EXIT_UAPSD_RESP;
   case WLAN_HAL_SET_UAPSD_AC_PARAMS_RSP:
-    return WDI_SET_UAPSD_PARAM_RESP; 
+    return WDI_SET_UAPSD_PARAM_RESP;
   case WLAN_HAL_UPDATE_UAPSD_PARAM_RSP:
-    return WDI_UPDATE_UAPSD_PARAM_RESP; 
+    return WDI_UPDATE_UAPSD_PARAM_RESP;
   case WLAN_HAL_CONFIGURE_RXP_FILTER_RSP:
-    return WDI_CONFIGURE_RXP_FILTER_RESP; 
+    return WDI_CONFIGURE_RXP_FILTER_RESP;
   case WLAN_HAL_ADD_BCN_FILTER_RSP:
     return WDI_SET_BEACON_FILTER_RESP;
   case WLAN_HAL_REM_BCN_FILTER_RSP:
@@ -20387,6 +20690,10 @@
     return WDI_ADD_STA_SELF_RESP;
 case WLAN_HAL_DEL_STA_SELF_RSP:
     return WDI_DEL_STA_SELF_RESP;
+#ifdef FEATURE_OEM_DATA_SUPPORT
+  case WLAN_HAL_START_OEM_DATA_RSP:
+    return WDI_START_OEM_DATA_RESP;
+#endif /* FEATURE_OEM_DATA_SUPPORT */
   case WLAN_HAL_HOST_RESUME_RSP:
     return WDI_HOST_RESUME_RESP;
   case WLAN_HAL_KEEP_ALIVE_RSP:
@@ -20395,7 +20702,7 @@
   case WLAN_HAL_SET_PREF_NETWORK_RSP:
     return WDI_SET_PREF_NETWORK_RESP;
   case WLAN_HAL_SET_RSSI_FILTER_RSP:
-    return WDI_SET_RSSI_FILTER_RESP; 
+    return WDI_SET_RSSI_FILTER_RESP;
   case WLAN_HAL_UPDATE_SCAN_PARAM_RSP:
     return WDI_UPDATE_SCAN_PARAMS_RESP;
   case WLAN_HAL_PREF_NETW_FOUND_IND:
@@ -20439,7 +20746,7 @@
   case WLAN_HAL_FEATURE_CAPS_EXCHANGE_RSP:
       return WDI_FEATURE_CAPS_EXCHANGE_RESP;
   default:
-    return eDRIVER_TYPE_MAX; 
+    return eDRIVER_TYPE_MAX;
   }
 
 }/*HAL_2_WDI_RSP_TYPE*/
@@ -20452,7 +20759,7 @@
   WDI_DriverType wdiDriverType
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch(  wdiDriverType )
   {
@@ -20464,7 +20771,7 @@
     return eDRIVER_TYPE_DVT;
   }
 
-  return eDRIVER_TYPE_MAX; 
+  return eDRIVER_TYPE_MAX;
 }/*WDI_2_HAL_DRV_TYPE*/
 
 
@@ -20475,7 +20782,7 @@
   WDI_StopType wdiDriverType
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch(  wdiDriverType )
   {
@@ -20487,7 +20794,7 @@
     return HAL_STOP_TYPE_RF_KILL;
   }
 
-  return HAL_STOP_TYPE_MAX; 
+  return HAL_STOP_TYPE_MAX;
 }/*WDI_2_HAL_STOP_REASON*/
 
 
@@ -20498,7 +20805,7 @@
   WDI_ScanMode wdiScanMode
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch(  wdiScanMode )
   {
@@ -20514,29 +20821,47 @@
     return eHAL_SYS_MODE_SUSPEND_LINK;
   }
 
-  return eHAL_SYS_MODE_MAX; 
+  return eHAL_SYS_MODE_MAX;
 }/*WDI_2_HAL_SCAN_MODE*/
 
 /*Convert WDI sec ch offset into HAL sec ch offset type*/
-WPT_STATIC WPT_INLINE tSirMacHTSecondaryChannelOffset
+WPT_STATIC WPT_INLINE ePhyChanBondState
 WDI_2_HAL_SEC_CH_OFFSET
 (
   WDI_HTSecondaryChannelOffset wdiSecChOffset
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch(  wdiSecChOffset )
   {
   case WDI_SECONDARY_CHANNEL_OFFSET_NONE:
-    return eHT_SECONDARY_CHANNEL_OFFSET_NONE;
+    return PHY_SINGLE_CHANNEL_CENTERED;
   case WDI_SECONDARY_CHANNEL_OFFSET_UP:
-    return eHT_SECONDARY_CHANNEL_OFFSET_UP;
+    return PHY_DOUBLE_CHANNEL_LOW_PRIMARY;
   case WDI_SECONDARY_CHANNEL_OFFSET_DOWN:
-    return eHT_SECONDARY_CHANNEL_OFFSET_DOWN;
+    return PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
+#ifdef WLAN_FEATURE_11AC
+  case WDI_CHANNEL_20MHZ_LOW_40MHZ_CENTERED:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED;
+  case WDI_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED;
+  case WDI_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED;
+  case WDI_CHANNEL_20MHZ_LOW_40MHZ_LOW:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW;
+  case WDI_CHANNEL_20MHZ_HIGH_40MHZ_LOW:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW;
+  case WDI_CHANNEL_20MHZ_LOW_40MHZ_HIGH:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH;
+  case WDI_CHANNEL_20MHZ_HIGH_40MHZ_HIGH:
+     return PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH;
+#endif
+  default:
+      break;
   }
 
-  return eHT_SECONDARY_CHANNEL_OFFSET_MAX; 
+  return PHY_CHANNEL_BONDING_STATE_MAX; 
 }/*WDI_2_HAL_SEC_CH_OFFSET*/
 
 /*Convert WDI BSS type into HAL BSS type*/
@@ -20546,7 +20871,7 @@
   WDI_BssType wdiBSSType
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch(  wdiBSSType )
   {
@@ -20559,12 +20884,12 @@
   case WDI_BTAMP_STA_MODE:
     return eSIR_BTAMP_STA_MODE;
   case WDI_BTAMP_AP_MODE:
-    return eSIR_BTAMP_AP_MODE; 
+    return eSIR_BTAMP_AP_MODE;
   case WDI_BSS_AUTO_MODE:
     return eSIR_AUTO_MODE;
   }
 
-  return eSIR_DONOT_USE_BSS_TYPE; 
+  return eSIR_DONOT_USE_BSS_TYPE;
 }/*WDI_2_HAL_BSS_TYPE*/
 
 /*Convert WDI NW type into HAL NW type*/
@@ -20574,7 +20899,7 @@
   WDI_NwType wdiNWType
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch(  wdiNWType )
   {
@@ -20588,7 +20913,7 @@
     return eSIR_11N_NW_TYPE;
   }
 
-  return eSIR_DONOT_USE_NW_TYPE; 
+  return eSIR_DONOT_USE_NW_TYPE;
 }/*WDI_2_HAL_NW_TYPE*/
 
 /*Convert WDI chanel bonding type into HAL cb type*/
@@ -20598,7 +20923,7 @@
   WDI_PhyChanBondState wdiCbState
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch ( wdiCbState )
   {
@@ -20610,8 +20935,27 @@
     return PHY_DOUBLE_CHANNEL_CENTERED;
   case WDI_PHY_DOUBLE_CHANNEL_HIGH_PRIMARY:
     return PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
+#ifdef WLAN_FEATURE_11AC
+  case WDI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED;
+  case WDI_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED;
+  case WDI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED;
+  case WDI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW;
+  case WDI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW;
+  case WDI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH;
+  case WDI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH:
+    return PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH;
+#endif
+  case WDI_MAX_CB_STATE:
+  default:
+    break;
   }
-  
+
   return PHY_CHANNEL_BONDING_STATE_MAX;
 }/*WDI_2_HAL_CB_STATE*/
 
@@ -20622,7 +20966,7 @@
   WDI_HTOperatingMode wdiHTOperMode
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch ( wdiHTOperMode )
   {
@@ -20635,7 +20979,7 @@
   case WDI_HT_OP_MODE_MIXED:
     return eSIR_HT_OP_MODE_MIXED;
   }
-  
+
   return eSIR_HT_OP_MODE_MAX;
 }/*WDI_2_HAL_HT_OPER_MODE*/
 
@@ -20646,7 +20990,7 @@
   WDI_HTMIMOPowerSaveState wdiHTOperMode
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch ( wdiHTOperMode )
   {
@@ -20659,7 +21003,7 @@
   case WDI_HT_MIMO_PS_NO_LIMIT:
     return eSIR_HT_MIMO_PS_NO_LIMIT;
   }
-  
+
   return eSIR_HT_MIMO_PS_MAX;
 }/*WDI_2_HAL_MIMO_PS*/
 
@@ -20670,7 +21014,7 @@
   WDI_EncryptType wdiEncType
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch ( wdiEncType )
   {
@@ -20708,7 +21052,7 @@
   WDI_WepType  wdiWEPType
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch ( wdiWEPType )
   {
@@ -20718,7 +21062,7 @@
   case WDI_WEP_DYNAMIC:
     return eSIR_WEP_DYNAMIC;
   }
-  
+
   return eSIR_WEP_MAX;
 }/*WDI_2_HAL_WEP_TYPE*/
 
@@ -20728,7 +21072,7 @@
   WDI_LinkStateType  wdiLinkState
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
   switch ( wdiLinkState )
   {
@@ -20781,27 +21125,35 @@
 
   default:
     return eSIR_LINK_MAX;
-  }  
+  }
 }
 
-/*Translate a STA Context from WDI into HAL*/ 
-WPT_STATIC WPT_INLINE 
+/*Translate a STA Context from WDI into HAL*/
+WPT_STATIC WPT_INLINE
 void
 WDI_CopyWDIStaCtxToHALStaCtx
-( 
+(
   tConfigStaParams*          phalConfigSta,
   WDI_ConfigStaReqInfoType*  pwdiConfigSta
 )
 {
    wpt_uint8 i;
-   /*Lightweight function - no sanity checks and no unecessary code to increase 
+#ifdef WLAN_FEATURE_11AC
+   /* Get the Version 1 Handler */
+   tConfigStaParams_V1* phalConfigSta_V1 = NULL;
+   if (WDI_getFwWlanFeatCaps(DOT11AC))
+   {
+	   phalConfigSta_V1 = (tConfigStaParams_V1*)phalConfigSta;
+   }
+#endif
+   /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
 
-  wpalMemoryCopy(phalConfigSta->bssId, 
-                  pwdiConfigSta->macBSSID, WDI_MAC_ADDR_LEN); 
-  
-  wpalMemoryCopy(phalConfigSta->staMac, 
-                  pwdiConfigSta->macSTA, WDI_MAC_ADDR_LEN); 
+  wpalMemoryCopy(phalConfigSta->bssId,
+                  pwdiConfigSta->macBSSID, WDI_MAC_ADDR_LEN);
+
+  wpalMemoryCopy(phalConfigSta->staMac,
+                  pwdiConfigSta->macSTA, WDI_MAC_ADDR_LEN);
 
   phalConfigSta->assocId                 = pwdiConfigSta->usAssocId;
   phalConfigSta->staType                 = pwdiConfigSta->wdiSTAType;
@@ -20826,19 +21178,19 @@
   phalConfigSta->us32MaxAmpduDuration    = pwdiConfigSta->us32MaxAmpduDuratio;
   phalConfigSta->fDsssCckMode40Mhz       = pwdiConfigSta->ucDsssCckMode40Mhz;
   phalConfigSta->encryptType             = pwdiConfigSta->ucEncryptType;
-  
+
   phalConfigSta->mimoPS = WDI_2_HAL_MIMO_PS(pwdiConfigSta->wdiMIMOPS);
 
-  phalConfigSta->supportedRates.opRateMode = 
+  phalConfigSta->supportedRates.opRateMode =
                           pwdiConfigSta->wdiSupportedRates.opRateMode;
   for(i = 0; i < SIR_NUM_11B_RATES; i ++)
   {
-     phalConfigSta->supportedRates.llbRates[i] = 
+     phalConfigSta->supportedRates.llbRates[i] =
                           pwdiConfigSta->wdiSupportedRates.llbRates[i];
   }
   for(i = 0; i < SIR_NUM_11A_RATES; i ++)
   {
-     phalConfigSta->supportedRates.llaRates[i] = 
+     phalConfigSta->supportedRates.llaRates[i] =
                           pwdiConfigSta->wdiSupportedRates.llaRates[i];
   }
   for(i = 0; i < SIR_NUM_POLARIS_RATES; i ++)
@@ -20846,31 +21198,48 @@
      phalConfigSta->supportedRates.aniLegacyRates[i] =
                           pwdiConfigSta->wdiSupportedRates.aLegacyRates[i];
   }
-  phalConfigSta->supportedRates.aniEnhancedRateBitmap = 
+  phalConfigSta->supportedRates.aniEnhancedRateBitmap =
                           pwdiConfigSta->wdiSupportedRates.uEnhancedRateBitmap;
   for(i = 0; i < SIR_MAC_MAX_SUPPORTED_MCS_SET; i ++)
   {
-     phalConfigSta->supportedRates.supportedMCSSet[i] = 
+     phalConfigSta->supportedRates.supportedMCSSet[i] =
                           pwdiConfigSta->wdiSupportedRates.aSupportedMCSSet[i];
   }
   phalConfigSta->supportedRates.rxHighestDataRate =
                           pwdiConfigSta->wdiSupportedRates.aRxHighestDataRate;
 
+#ifdef WLAN_FEATURE_11AC
+  if(phalConfigSta_V1 != NULL)
+  {
+	  phalConfigSta_V1->supportedRates.vhtRxMCSMap = pwdiConfigSta->wdiSupportedRates.vhtRxMCSMap;
+	  phalConfigSta_V1->supportedRates.vhtRxHighestDataRate = pwdiConfigSta->wdiSupportedRates.vhtRxHighestDataRate;
+	  phalConfigSta_V1->supportedRates.vhtTxMCSMap = pwdiConfigSta->wdiSupportedRates.vhtTxMCSMap;
+	  phalConfigSta_V1->supportedRates.vhtTxHighestDataRate = pwdiConfigSta->wdiSupportedRates.vhtTxHighestDataRate;
+  }
+#endif
+
 #ifdef WLAN_FEATURE_P2P
   phalConfigSta->p2pCapableSta = pwdiConfigSta->ucP2pCapableSta ;
 #endif
 
+#ifdef WLAN_FEATURE_11AC
+  if(phalConfigSta_V1 != NULL)
+  {
+	  phalConfigSta_V1->vhtCapable = pwdiConfigSta->ucVhtCapableSta;
+	  phalConfigSta_V1->vhtTxChannelWidthSet = pwdiConfigSta->ucVhtTxChannelWidthSet;
+  }
+#endif
 }/*WDI_CopyWDIStaCtxToHALStaCtx*/;
- 
-/*Translate a Rate set info from WDI into HAL*/ 
-WPT_STATIC WPT_INLINE void 
+
+/*Translate a Rate set info from WDI into HAL*/
+WPT_STATIC WPT_INLINE void
 WDI_CopyWDIRateSetToHALRateSet
-( 
+(
   tSirMacRateSet* pHalRateSet,
   WDI_RateSet*    pwdiRateSet
 )
 {
-  wpt_uint8 i; 
+  wpt_uint8 i;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
   pHalRateSet->numRates = ( pwdiRateSet->ucNumRates <= SIR_MAC_RATESET_EID_MAX )?
@@ -20880,19 +21249,19 @@
   {
     pHalRateSet->rate[i] = pwdiRateSet->aRates[i];
   }
-  
+
 }/*WDI_CopyWDIRateSetToHALRateSet*/
 
 
 /*Translate an EDCA Parameter Record from WDI into HAL*/
 WPT_STATIC WPT_INLINE void
 WDI_CopyWDIEDCAParamsToHALEDCAParams
-( 
+(
   tSirMacEdcaParamRecord* phalEdcaParam,
   WDI_EdcaParamRecord*    pWDIEdcaParam
 )
 {
-  /*Lightweight function - no sanity checks and no unecessary code to increase 
+  /*Lightweight function - no sanity checks and no unecessary code to increase
     the chances of getting inlined*/
 
   phalEdcaParam->aci.rsvd   = pWDIEdcaParam->wdiACI.rsvd;
@@ -20929,11 +21298,11 @@
   pmacMgmtHdr->durationLo =  pwdiMacMgmtHdr->durationLo;
   pmacMgmtHdr->durationHi =  pwdiMacMgmtHdr->durationHi;
 
-  wpalMemoryCopy(pmacMgmtHdr->da, 
+  wpalMemoryCopy(pmacMgmtHdr->da,
                  pwdiMacMgmtHdr->da, 6);
-  wpalMemoryCopy(pmacMgmtHdr->sa, 
+  wpalMemoryCopy(pmacMgmtHdr->sa,
                  pwdiMacMgmtHdr->sa, 6);
-  wpalMemoryCopy(pmacMgmtHdr->bssId, 
+  wpalMemoryCopy(pmacMgmtHdr->bssId,
                  pwdiMacMgmtHdr->bssId, 6);
 
   pmacMgmtHdr->seqControl.fragNum  =  pwdiMacMgmtHdr->seqControl.fragNum;
@@ -20953,6 +21322,13 @@
 {
 
   wpt_uint8 keyIndex = 0;
+#ifdef WLAN_FEATURE_11AC
+  /* Get the Version 1 Handler */
+  tConfigBssParams_V1* phalConfigBSS_V1 = NULL;
+  if (WDI_getFwWlanFeatCaps(DOT11AC))
+	  phalConfigBSS_V1 = (tConfigBssParams_V1*)phalConfigBSS;
+#endif
+
   wpalMemoryCopy( phalConfigBSS->bssId,
                   pwdiConfigBSS->macBSSID,
                   WDI_MAC_ADDR_LEN);
@@ -20968,14 +21344,14 @@
   phalConfigBSS->operMode = pwdiConfigBSS->ucOperMode;
   phalConfigBSS->nwType   = WDI_2_HAL_NW_TYPE(pwdiConfigBSS->wdiNWType);
 
-  phalConfigBSS->shortSlotTimeSupported = 
+  phalConfigBSS->shortSlotTimeSupported =
      pwdiConfigBSS->ucShortSlotTimeSupported;
   phalConfigBSS->llaCoexist         = pwdiConfigBSS->ucllaCoexist;
   phalConfigBSS->llbCoexist         = pwdiConfigBSS->ucllbCoexist;
   phalConfigBSS->llgCoexist         = pwdiConfigBSS->ucllgCoexist;
   phalConfigBSS->ht20Coexist        = pwdiConfigBSS->ucHT20Coexist;
   phalConfigBSS->llnNonGFCoexist    = pwdiConfigBSS->ucllnNonGFCoexist;
-  phalConfigBSS->fLsigTXOPProtectionFullSupport = 
+  phalConfigBSS->fLsigTXOPProtectionFullSupport =
     pwdiConfigBSS->ucTXOPProtectionFullSupport;
   phalConfigBSS->fRIFSMode          = pwdiConfigBSS->ucRIFSMode;
   phalConfigBSS->beaconInterval     = pwdiConfigBSS->usBeaconInterval;
@@ -20988,8 +21364,8 @@
   phalConfigBSS->obssProtEnabled    = pwdiConfigBSS->ucObssProtEnabled;
   phalConfigBSS->rmfEnabled         = pwdiConfigBSS->ucRMFEnabled;
 
-  phalConfigBSS->htOperMode = 
-    WDI_2_HAL_HT_OPER_MODE(pwdiConfigBSS->wdiHTOperMod); 
+  phalConfigBSS->htOperMode =
+    WDI_2_HAL_HT_OPER_MODE(pwdiConfigBSS->wdiHTOperMod);
 
   phalConfigBSS->dualCTSProtection        = pwdiConfigBSS->ucDualCTSProtection;
   phalConfigBSS->ucMaxProbeRespRetryLimit = pwdiConfigBSS->ucMaxProbeRespRetryLimit;
@@ -21002,16 +21378,16 @@
 
   /*! Used 32 as magic number because that is how the ssid is declared inside the
    hal header - hal needs a macro for it */
-  phalConfigBSS->ssId.length = 
+  phalConfigBSS->ssId.length =
     (pwdiConfigBSS->wdiSSID.ucLength <= 32)?
     pwdiConfigBSS->wdiSSID.ucLength : 32;
   wpalMemoryCopy(phalConfigBSS->ssId.ssId,
-                 pwdiConfigBSS->wdiSSID.sSSID, 
-                 phalConfigBSS->ssId.length); 
+                 pwdiConfigBSS->wdiSSID.sSSID,
+                 phalConfigBSS->ssId.length);
 
   WDI_CopyWDIStaCtxToHALStaCtx( &phalConfigBSS->staContext,
                                 &pwdiConfigBSS->wdiSTAContext);
-  
+
   WDI_CopyWDIRateSetToHALRateSet( &phalConfigBSS->rateSet,
                                   &pwdiConfigBSS->wdiRateSet);
 
@@ -21029,24 +21405,24 @@
                                            &pwdiConfigBSS->wdiVOEDCAParams);
   }
 
-  phalConfigBSS->halPersona = pwdiConfigBSS->ucPersona; 
+  phalConfigBSS->halPersona = pwdiConfigBSS->ucPersona;
 
   phalConfigBSS->bSpectrumMgtEnable = pwdiConfigBSS->bSpectrumMgtEn;
 
 #ifdef WLAN_FEATURE_VOWIFI_11R
 
-  phalConfigBSS->extSetStaKeyParamValid = 
+  phalConfigBSS->extSetStaKeyParamValid =
      pwdiConfigBSS->bExtSetStaKeyParamValid;
-  
+
   if( phalConfigBSS->extSetStaKeyParamValid )
   {
      /*-----------------------------------------------------------------------
        Copy the STA Key parameters into the HAL message
      -----------------------------------------------------------------------*/
-     phalConfigBSS->extSetStaKeyParam.encType = 
+     phalConfigBSS->extSetStaKeyParam.encType =
         WDI_2_HAL_ENC_TYPE (pwdiConfigBSS->wdiExtSetKeyParam.wdiEncType);
 
-     phalConfigBSS->extSetStaKeyParam.wepType = 
+     phalConfigBSS->extSetStaKeyParam.wepType =
         WDI_2_HAL_WEP_TYPE (pwdiConfigBSS->wdiExtSetKeyParam.wdiWEPType );
 
      phalConfigBSS->extSetStaKeyParam.staIdx = pwdiConfigBSS->wdiExtSetKeyParam.ucSTAIdx;
@@ -21059,60 +21435,68 @@
      for(keyIndex = 0; keyIndex < pwdiConfigBSS->wdiExtSetKeyParam.ucNumKeys ;
           keyIndex++)
      {
-        phalConfigBSS->extSetStaKeyParam.key[keyIndex].keyId = 
+        phalConfigBSS->extSetStaKeyParam.key[keyIndex].keyId =
            pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[keyIndex].keyId;
         phalConfigBSS->extSetStaKeyParam.key[keyIndex].unicast =
            pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[keyIndex].unicast;
         phalConfigBSS->extSetStaKeyParam.key[keyIndex].keyDirection =
            pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[keyIndex].keyDirection;
         wpalMemoryCopy(phalConfigBSS->extSetStaKeyParam.key[keyIndex].keyRsc,
-                       pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[keyIndex].keyRsc, 
+                       pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[keyIndex].keyRsc,
                        WDI_MAX_KEY_RSC_LEN);
-        phalConfigBSS->extSetStaKeyParam.key[keyIndex].paeRole = 
+        phalConfigBSS->extSetStaKeyParam.key[keyIndex].paeRole =
            pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[keyIndex].paeRole;
-        phalConfigBSS->extSetStaKeyParam.key[keyIndex].keyLength = 
+        phalConfigBSS->extSetStaKeyParam.key[keyIndex].keyLength =
            pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[keyIndex].keyLength;
         wpalMemoryCopy(phalConfigBSS->extSetStaKeyParam.key[keyIndex].key,
-                       pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[keyIndex].key, 
+                       pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[keyIndex].key,
                        WDI_MAX_KEY_LENGTH);
      }
 #else
-     phalConfigBSS->extSetStaKeyParam.key.keyId = 
+     phalConfigBSS->extSetStaKeyParam.key.keyId =
         pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[0].keyId;
      phalConfigBSS->extSetStaKeyParam.key.unicast =
         pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[0].unicast;
      phalConfigBSS->extSetStaKeyParam.key.keyDirection =
         pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[0].keyDirection;
      wpalMemoryCopy(phalConfigBSS->extSetStaKeyParam.key.keyRsc,
-                    pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[0].keyRsc, 
+                    pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[0].keyRsc,
                     WDI_MAX_KEY_RSC_LEN);
-     phalConfigBSS->extSetStaKeyParam.key.paeRole = 
+     phalConfigBSS->extSetStaKeyParam.key.paeRole =
         pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[0].paeRole;
-     phalConfigBSS->extSetStaKeyParam.key.keyLength = 
+     phalConfigBSS->extSetStaKeyParam.key.keyLength =
         pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[0].keyLength;
      wpalMemoryCopy(phalConfigBSS->extSetStaKeyParam.key.key,
-                    pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[0].key, 
+                    pwdiConfigBSS->wdiExtSetKeyParam.wdiKey[0].key,
                     WDI_MAX_KEY_LENGTH);
 #endif
   }
   else/* phalConfigBSS->extSetStaKeyParamValid is not set */
   {
-     wpalMemoryZero( &phalConfigBSS->extSetStaKeyParam, 
+     wpalMemoryZero( &phalConfigBSS->extSetStaKeyParam,
                      sizeof(phalConfigBSS->extSetStaKeyParam) );
   }
 
 #endif /*WLAN_FEATURE_VOWIFI_11R*/
 
+#ifdef WLAN_FEATURE_11AC
+  if(phalConfigBSS_V1 != NULL)
+  {
+      phalConfigBSS_V1->vhtCapable = pwdiConfigBSS->ucVhtCapableSta;
+      phalConfigBSS_V1->vhtTxChannelWidthSet = pwdiConfigBSS->ucVhtTxChannelWidthSet;
+  }
+#endif
+
 }/*WDI_CopyWDIConfigBSSToHALConfigBSS*/
 
 
-/*Extract the request CB function and user data from a request structure 
+/*Extract the request CB function and user data from a request structure
   pointed to by user data */
 WPT_STATIC WPT_INLINE void
 WDI_ExtractRequestCBFromEvent
 (
   WDI_EventInfoType* pEvent,
-  WDI_ReqStatusCb*   ppfnReqCB, 
+  WDI_ReqStatusCb*   ppfnReqCB,
   void**             ppUserData
 )
 {
@@ -21273,7 +21657,7 @@
   case  WDI_REM_BEACON_FILTER_REQ:
     *ppfnReqCB   =  ((WDI_RemBeaconFilterReqParamsType*)pEvent->pEventData)->wdiReqStatusCB;
     *ppUserData  =  ((WDI_RemBeaconFilterReqParamsType*)pEvent->pEventData)->pUserData;
-     break; 
+     break;
   case  WDI_SET_RSSI_THRESHOLDS_REQ:
     *ppfnReqCB   =  ((WDI_SetRSSIThresholdsReqParamsType*)pEvent->pEventData)->wdiReqStatusCB;
     *ppUserData  =  ((WDI_SetRSSIThresholdsReqParamsType*)pEvent->pEventData)->pUserData;
@@ -21316,42 +21700,42 @@
   default:
     *ppfnReqCB   =  NULL;
     *ppUserData  =  NULL;
-      break; 
+      break;
   }
 }/*WDI_ExtractRequestCBFromEvent*/
 
 
 /**
- @brief WDI_IsHwFrameTxTranslationCapable checks to see if HW 
+ @brief WDI_IsHwFrameTxTranslationCapable checks to see if HW
         frame xtl is enabled for a particular STA.
 
  WDI_PostAssocReq must have been called.
 
- @param uSTAIdx: STA index 
-  
+ @param uSTAIdx: STA index
+
  @see WDI_PostAssocReq
  @return Result of the function call
 */
-wpt_boolean 
+wpt_boolean
 WDI_IsHwFrameTxTranslationCapable
 (
   wpt_uint8 uSTAIdx
 )
 {
-  /*!! FIX ME - this must eventually be per station - for now just feedback 
+  /*!! FIX ME - this must eventually be per station - for now just feedback
     uma value*/
   /*------------------------------------------------------------------------
-    Sanity Check 
+    Sanity Check
   ------------------------------------------------------------------------*/
   if ( eWLAN_PAL_FALSE == gWDIInitialized )
   {
     WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
               "WDI API call before module is initialized - Fail request");
 
-    return WDI_STATUS_E_NOT_ALLOWED; 
+    return WDI_STATUS_E_NOT_ALLOWED;
   }
 
-  
+
   return gWDICb.bFrameTransEnabled;
 }/*WDI_IsHwFrameTxTranslationCapable*/
 
@@ -21359,19 +21743,19 @@
 /**
  @brief WDI_SetPreferredNetworkList
 
- @param pwdiPNOScanReqParams: the Set PNO as specified 
+ @param pwdiPNOScanReqParams: the Set PNO as specified
                       by the Device Interface
-  
+
         wdiPNOScanCb: callback for passing back the response
         of the Set PNO operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetPreferredNetworkReq
 (
   WDI_PNOScanReqParamsType* pwdiPNOScanReqParams,
@@ -21383,23 +21767,23 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_SET_PREF_NETWORK_REQ;
-   wdiEventData.pEventData      = pwdiPNOScanReqParams; 
+   wdiEventData.pEventData      = pwdiPNOScanReqParams;
    wdiEventData.uEventDataSize  = sizeof(*pwdiPNOScanReqParams);
-   wdiEventData.pCBfnc          = wdiPNOScanCb; 
+   wdiEventData.pCBfnc          = wdiPNOScanCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -21409,19 +21793,19 @@
 /**
  @brief WDI_SetRssiFilterReq
 
- @param pwdiRssiFilterReqParams: the Set RSSI Filter as 
+ @param pwdiRssiFilterReqParams: the Set RSSI Filter as
                       specified by the Device Interface
-  
+
         wdiRssiFilterCb: callback for passing back the response
         of the Set RSSI Filter operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetRssiFilterReq
 (
   WDI_SetRssiFilterReqParamsType* pwdiRssiFilterReqParams,
@@ -21433,23 +21817,23 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_SET_RSSI_FILTER_REQ;
-   wdiEventData.pEventData      = pwdiRssiFilterReqParams; 
+   wdiEventData.pEventData      = pwdiRssiFilterReqParams;
    wdiEventData.uEventDataSize  = sizeof(*pwdiRssiFilterReqParams);
-   wdiEventData.pCBfnc          = wdiRssiFilterCb; 
+   wdiEventData.pCBfnc          = wdiRssiFilterCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -21458,19 +21842,19 @@
 /**
  @brief WDI_UpdateScanParamsReq
 
- @param pwdiUpdateScanParamsInfoType: the Update Scan Params as specified 
+ @param pwdiUpdateScanParamsInfoType: the Update Scan Params as specified
                       by the Device Interface
-  
+
         wdiUpdateScanParamsCb: callback for passing back the response
         of the Set PNO operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_UpdateScanParamsReq
 (
   WDI_UpdateScanParamsInfoType* pwdiUpdateScanParamsInfoType,
@@ -21482,38 +21866,38 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_UPDATE_SCAN_PARAMS_REQ;
-   wdiEventData.pEventData      = pwdiUpdateScanParamsInfoType; 
+   wdiEventData.pEventData      = pwdiUpdateScanParamsInfoType;
    wdiEventData.uEventDataSize  = sizeof(*pwdiUpdateScanParamsInfoType);
-   wdiEventData.pCBfnc          = wdiUpdateScanParamsCb; 
+   wdiEventData.pCBfnc          = wdiUpdateScanParamsCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }
 
 /**
- @brief Helper function to pack Set Preferred Network List 
+ @brief Helper function to pack Set Preferred Network List
         Request parameters
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
          pwdiPNOScanReqParams:      pointer to the info received
          from upper layers
          ppSendBuffer, pSize - out pointers of the packed buffer
-         and its size 
-  
+         and its size
+
  @return Result of the function call
 */
 
@@ -21526,7 +21910,7 @@
   wpt_uint16*                pSize
 )
 {
-   wpt_uint8*                 pSendBuffer           = NULL; 
+   wpt_uint8*                 pSendBuffer           = NULL;
    wpt_uint16                 usDataOffset          = 0;
    wpt_uint16                 usSendSize            = 0;
    tPrefNetwListParams        pPrefNetwListParams = {0};
@@ -21536,7 +21920,7 @@
    /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_PREF_NETWORK_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_PREF_NETWORK_REQ,
                          sizeof(pPrefNetwListParams),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(pPrefNetwListParams) )))
@@ -21545,25 +21929,25 @@
                   "Unable to get send buffer in Set PNO req %x ",
                    pwdiPNOScanReqParams);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-------------------------------------------------------------------------
      Fill prefNetwListParams from pwdiPNOScanReqParams->wdiPNOScanInfo
    -------------------------------------------------------------------------*/
-   pPrefNetwListParams.enable  = 
+   pPrefNetwListParams.enable  =
      pwdiPNOScanReqParams->wdiPNOScanInfo.bEnable;
-   pPrefNetwListParams.modePNO = 
+   pPrefNetwListParams.modePNO =
      pwdiPNOScanReqParams->wdiPNOScanInfo.wdiModePNO;
 
-   pPrefNetwListParams.ucNetworksCount = 
-     (pwdiPNOScanReqParams->wdiPNOScanInfo.ucNetworksCount < 
+   pPrefNetwListParams.ucNetworksCount =
+     (pwdiPNOScanReqParams->wdiPNOScanInfo.ucNetworksCount <
       WLAN_HAL_PNO_MAX_SUPP_NETWORKS)?
-     pwdiPNOScanReqParams->wdiPNOScanInfo.ucNetworksCount : 
+     pwdiPNOScanReqParams->wdiPNOScanInfo.ucNetworksCount :
       WLAN_HAL_PNO_MAX_SUPP_NETWORKS;
 
    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
-               "WDI SET PNO: Enable %d, Mode %d, Netw Count %d", 
+               "WDI SET PNO: Enable %d, Mode %d, Netw Count %d",
                pwdiPNOScanReqParams->wdiPNOScanInfo.bEnable,
                pwdiPNOScanReqParams->wdiPNOScanInfo.wdiModePNO,
                pwdiPNOScanReqParams->wdiPNOScanInfo.ucNetworksCount);
@@ -21579,16 +21963,16 @@
           pPrefNetwListParams.aNetworks[i].ssId.length);
 
      /*Authentication type for the network*/
-     pPrefNetwListParams.aNetworks[i].authentication = 
-       (tAuthType)pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].wdiAuth; 
+     pPrefNetwListParams.aNetworks[i].authentication =
+       (tAuthType)pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].wdiAuth;
 
      /*Encryption type for the network*/
-     pPrefNetwListParams.aNetworks[i].encryption = 
-       (tEdType)pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].wdiEncryption; 
+     pPrefNetwListParams.aNetworks[i].encryption =
+       (tEdType)pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].wdiEncryption;
 
-     /*Indicate the channel on which the Network can be found 
+     /*Indicate the channel on which the Network can be found
        0 - if all channels */
-     pPrefNetwListParams.aNetworks[i].ucChannelCount = 
+     pPrefNetwListParams.aNetworks[i].ucChannelCount =
        pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].ucChannelCount;
 
      wpalMemoryCopy(pPrefNetwListParams.aNetworks[i].aChannels,
@@ -21600,73 +21984,73 @@
        pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].rssiThreshold;
 
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-               "WDI SET PNO: SSID %d %s", 
+               "WDI SET PNO: SSID %d %s",
                pPrefNetwListParams.aNetworks[i].ssId.length,
                pPrefNetwListParams.aNetworks[i].ssId.ssId);
    }
 
-   pPrefNetwListParams.scanTimers.ucScanTimersCount = 
-     (pwdiPNOScanReqParams->wdiPNOScanInfo.scanTimers.ucScanTimersCount < 
+   pPrefNetwListParams.scanTimers.ucScanTimersCount =
+     (pwdiPNOScanReqParams->wdiPNOScanInfo.scanTimers.ucScanTimersCount <
       WLAN_HAL_PNO_MAX_SCAN_TIMERS)?
      pwdiPNOScanReqParams->wdiPNOScanInfo.scanTimers.ucScanTimersCount :
       WLAN_HAL_PNO_MAX_SCAN_TIMERS;
 
    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-               "WDI SET PNO: Scan timers count %d 24G P %d 5G Probe %d", 
+               "WDI SET PNO: Scan timers count %d 24G P %d 5G Probe %d",
                pPrefNetwListParams.scanTimers.ucScanTimersCount,
                pwdiPNOScanReqParams->wdiPNOScanInfo.us24GProbeSize,
                pwdiPNOScanReqParams->wdiPNOScanInfo.us5GProbeSize);
 
    for ( i = 0; i < pPrefNetwListParams.scanTimers.ucScanTimersCount; i++   )
    {
-     pPrefNetwListParams.scanTimers.aTimerValues[i].uTimerValue  = 
+     pPrefNetwListParams.scanTimers.aTimerValues[i].uTimerValue  =
        pwdiPNOScanReqParams->wdiPNOScanInfo.scanTimers.aTimerValues[i].uTimerValue;
-     pPrefNetwListParams.scanTimers.aTimerValues[i].uTimerRepeat = 
+     pPrefNetwListParams.scanTimers.aTimerValues[i].uTimerRepeat =
        pwdiPNOScanReqParams->wdiPNOScanInfo.scanTimers.aTimerValues[i].uTimerRepeat;
    }
 
    /*Copy the probe template*/
-   pPrefNetwListParams.us24GProbeSize = 
+   pPrefNetwListParams.us24GProbeSize =
      (pwdiPNOScanReqParams->wdiPNOScanInfo.us24GProbeSize<
      WLAN_HAL_PNO_MAX_PROBE_SIZE)?
      pwdiPNOScanReqParams->wdiPNOScanInfo.us24GProbeSize:
-     WLAN_HAL_PNO_MAX_PROBE_SIZE; 
+     WLAN_HAL_PNO_MAX_PROBE_SIZE;
 
-   wpalMemoryCopy(pPrefNetwListParams.a24GProbeTemplate, 
-                  pwdiPNOScanReqParams->wdiPNOScanInfo.a24GProbeTemplate, 
-                  pPrefNetwListParams.us24GProbeSize); 
+   wpalMemoryCopy(pPrefNetwListParams.a24GProbeTemplate,
+                  pwdiPNOScanReqParams->wdiPNOScanInfo.a24GProbeTemplate,
+                  pPrefNetwListParams.us24GProbeSize);
 
-   pPrefNetwListParams.us5GProbeSize = 
+   pPrefNetwListParams.us5GProbeSize =
      (pwdiPNOScanReqParams->wdiPNOScanInfo.us5GProbeSize <
      WLAN_HAL_PNO_MAX_PROBE_SIZE)?
      pwdiPNOScanReqParams->wdiPNOScanInfo.us5GProbeSize:
-     WLAN_HAL_PNO_MAX_PROBE_SIZE; 
+     WLAN_HAL_PNO_MAX_PROBE_SIZE;
 
-   wpalMemoryCopy(pPrefNetwListParams.a5GProbeTemplate, 
-                  pwdiPNOScanReqParams->wdiPNOScanInfo.a5GProbeTemplate, 
-                  pPrefNetwListParams.us5GProbeSize); 
+   wpalMemoryCopy(pPrefNetwListParams.a5GProbeTemplate,
+                  pwdiPNOScanReqParams->wdiPNOScanInfo.a5GProbeTemplate,
+                  pPrefNetwListParams.us5GProbeSize);
 
    /*Pack the buffer*/
-   wpalMemoryCopy( pSendBuffer+usDataOffset, &pPrefNetwListParams, 
-                   sizeof(pPrefNetwListParams)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset, &pPrefNetwListParams,
+                   sizeof(pPrefNetwListParams));
 
    /*Set the output values*/
    *ppSendBuffer = pSendBuffer;
-   *pSize        = usSendSize; 
+   *pSize        = usSendSize;
 
    return WDI_STATUS_SUCCESS;
 }/*WDI_PackPreferredNetworkList*/
 
 /**
- @brief Helper function to pack Set Preferred Network List 
+ @brief Helper function to pack Set Preferred Network List
         Request parameters
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
          pwdiPNOScanReqParams:      pointer to the info received
          from upper layers
          ppSendBuffer, pSize - out pointers of the packed buffer
-         and its size 
-  
+         and its size
+
  @return Result of the function call
 */
 
@@ -21679,7 +22063,7 @@
   wpt_uint16*                pSize
 )
 {
-   wpt_uint8*                 pSendBuffer           = NULL; 
+   wpt_uint8*                 pSendBuffer           = NULL;
    wpt_uint16                 usDataOffset          = 0;
    wpt_uint16                 usSendSize            = 0;
    tPrefNetwListParamsNew     pPrefNetwListParams;
@@ -21689,7 +22073,7 @@
    /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_PREF_NETWORK_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_PREF_NETWORK_REQ,
                          sizeof(pPrefNetwListParams),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(pPrefNetwListParams) )))
@@ -21698,25 +22082,25 @@
                   "Unable to get send buffer in Set PNO req %x  ",
                    pwdiPNOScanReqParams);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-------------------------------------------------------------------------
      Fill prefNetwListParams from pwdiPNOScanReqParams->wdiPNOScanInfo
    -------------------------------------------------------------------------*/
-   pPrefNetwListParams.enable  = 
+   pPrefNetwListParams.enable  =
      pwdiPNOScanReqParams->wdiPNOScanInfo.bEnable;
-   pPrefNetwListParams.modePNO = 
+   pPrefNetwListParams.modePNO =
      pwdiPNOScanReqParams->wdiPNOScanInfo.wdiModePNO;
 
-   pPrefNetwListParams.ucNetworksCount = 
-     (pwdiPNOScanReqParams->wdiPNOScanInfo.ucNetworksCount < 
+   pPrefNetwListParams.ucNetworksCount =
+     (pwdiPNOScanReqParams->wdiPNOScanInfo.ucNetworksCount <
       WLAN_HAL_PNO_MAX_SUPP_NETWORKS)?
-     pwdiPNOScanReqParams->wdiPNOScanInfo.ucNetworksCount : 
+     pwdiPNOScanReqParams->wdiPNOScanInfo.ucNetworksCount :
       WLAN_HAL_PNO_MAX_SUPP_NETWORKS;
 
    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
-               "WDI SET PNO: Enable %d, Mode %d, Netw Count %d", 
+               "WDI SET PNO: Enable %d, Mode %d, Netw Count %d",
                pwdiPNOScanReqParams->wdiPNOScanInfo.bEnable,
                pwdiPNOScanReqParams->wdiPNOScanInfo.wdiModePNO,
                pwdiPNOScanReqParams->wdiPNOScanInfo.ucNetworksCount);
@@ -21732,20 +22116,20 @@
           pPrefNetwListParams.aNetworks[i].ssId.length);
 
      /*Authentication type for the network*/
-     pPrefNetwListParams.aNetworks[i].authentication = 
-       (tAuthType)pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].wdiAuth; 
+     pPrefNetwListParams.aNetworks[i].authentication =
+       (tAuthType)pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].wdiAuth;
 
      /*Encryption type for the network*/
-     pPrefNetwListParams.aNetworks[i].encryption = 
-       (tEdType)pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].wdiEncryption; 
+     pPrefNetwListParams.aNetworks[i].encryption =
+       (tEdType)pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].wdiEncryption;
 
      /*SSID bcast type for the network*/
-     pPrefNetwListParams.aNetworks[i].bcastNetworkType = 
-       (tSSIDBcastType)pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].wdiBcastNetworkType; 
+     pPrefNetwListParams.aNetworks[i].bcastNetworkType =
+       (tSSIDBcastType)pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].wdiBcastNetworkType;
 
-     /*Indicate the channel on which the Network can be found 
+     /*Indicate the channel on which the Network can be found
        0 - if all channels */
-     pPrefNetwListParams.aNetworks[i].ucChannelCount = 
+     pPrefNetwListParams.aNetworks[i].ucChannelCount =
        pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].ucChannelCount;
 
      wpalMemoryCopy(pPrefNetwListParams.aNetworks[i].aChannels,
@@ -21757,86 +22141,86 @@
        pwdiPNOScanReqParams->wdiPNOScanInfo.aNetworks[i].rssiThreshold;
 
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
-               "WDI SET PNO: SSID %d %s", 
+               "WDI SET PNO: SSID %d %s",
                pPrefNetwListParams.aNetworks[i].ssId.length,
                pPrefNetwListParams.aNetworks[i].ssId.ssId);
    }
 
-   pPrefNetwListParams.scanTimers.ucScanTimersCount = 
-     (pwdiPNOScanReqParams->wdiPNOScanInfo.scanTimers.ucScanTimersCount < 
+   pPrefNetwListParams.scanTimers.ucScanTimersCount =
+     (pwdiPNOScanReqParams->wdiPNOScanInfo.scanTimers.ucScanTimersCount <
       WLAN_HAL_PNO_MAX_SCAN_TIMERS)?
      pwdiPNOScanReqParams->wdiPNOScanInfo.scanTimers.ucScanTimersCount :
       WLAN_HAL_PNO_MAX_SCAN_TIMERS;
 
    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
-               "WDI SET PNO: Scan timers count %d 24G P %d 5G Probe %d", 
+               "WDI SET PNO: Scan timers count %d 24G P %d 5G Probe %d",
                pPrefNetwListParams.scanTimers.ucScanTimersCount,
                pwdiPNOScanReqParams->wdiPNOScanInfo.us24GProbeSize,
                pwdiPNOScanReqParams->wdiPNOScanInfo.us5GProbeSize);
 
    for ( i = 0; i < pPrefNetwListParams.scanTimers.ucScanTimersCount; i++   )
    {
-     pPrefNetwListParams.scanTimers.aTimerValues[i].uTimerValue  = 
+     pPrefNetwListParams.scanTimers.aTimerValues[i].uTimerValue  =
        pwdiPNOScanReqParams->wdiPNOScanInfo.scanTimers.aTimerValues[i].uTimerValue;
-     pPrefNetwListParams.scanTimers.aTimerValues[i].uTimerRepeat = 
+     pPrefNetwListParams.scanTimers.aTimerValues[i].uTimerRepeat =
        pwdiPNOScanReqParams->wdiPNOScanInfo.scanTimers.aTimerValues[i].uTimerRepeat;
    }
 
    /*Copy the probe template*/
-   pPrefNetwListParams.us24GProbeSize = 
+   pPrefNetwListParams.us24GProbeSize =
      (pwdiPNOScanReqParams->wdiPNOScanInfo.us24GProbeSize<
      WLAN_HAL_PNO_MAX_PROBE_SIZE)?
      pwdiPNOScanReqParams->wdiPNOScanInfo.us24GProbeSize:
-     WLAN_HAL_PNO_MAX_PROBE_SIZE; 
+     WLAN_HAL_PNO_MAX_PROBE_SIZE;
 
-   wpalMemoryCopy(pPrefNetwListParams.a24GProbeTemplate, 
-                  pwdiPNOScanReqParams->wdiPNOScanInfo.a24GProbeTemplate, 
-                  pPrefNetwListParams.us24GProbeSize); 
+   wpalMemoryCopy(pPrefNetwListParams.a24GProbeTemplate,
+                  pwdiPNOScanReqParams->wdiPNOScanInfo.a24GProbeTemplate,
+                  pPrefNetwListParams.us24GProbeSize);
 
-   pPrefNetwListParams.us5GProbeSize = 
+   pPrefNetwListParams.us5GProbeSize =
      (pwdiPNOScanReqParams->wdiPNOScanInfo.us5GProbeSize <
      WLAN_HAL_PNO_MAX_PROBE_SIZE)?
      pwdiPNOScanReqParams->wdiPNOScanInfo.us5GProbeSize:
-     WLAN_HAL_PNO_MAX_PROBE_SIZE; 
+     WLAN_HAL_PNO_MAX_PROBE_SIZE;
 
-   wpalMemoryCopy(pPrefNetwListParams.a5GProbeTemplate, 
-                  pwdiPNOScanReqParams->wdiPNOScanInfo.a5GProbeTemplate, 
-                  pPrefNetwListParams.us5GProbeSize); 
+   wpalMemoryCopy(pPrefNetwListParams.a5GProbeTemplate,
+                  pwdiPNOScanReqParams->wdiPNOScanInfo.a5GProbeTemplate,
+                  pPrefNetwListParams.us5GProbeSize);
 
    /*Pack the buffer*/
-   wpalMemoryCopy( pSendBuffer+usDataOffset, &pPrefNetwListParams, 
-                   sizeof(pPrefNetwListParams)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset, &pPrefNetwListParams,
+                   sizeof(pPrefNetwListParams));
 
    /*Set the output values*/
    *ppSendBuffer = pSendBuffer;
-   *pSize        = usSendSize; 
+   *pSize        = usSendSize;
 
    return WDI_STATUS_SUCCESS;
 }/*WDI_PackPreferredNetworkListNew*/
 
 /**
  @brief Process Set Preferred Network List Request function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetPreferredNetworkReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_PNOScanReqParamsType*  pwdiPNOScanReqParams  = NULL;
    WDI_PNOScanCb              wdiPNOScanCb          = NULL;
-   wpt_uint8*                 pSendBuffer           = NULL; 
+   wpt_uint8*                 pSendBuffer           = NULL;
    wpt_uint16                 usSendSize            = 0;
-   WDI_Status                 wdiStatus; 
+   WDI_Status                 wdiStatus;
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiPNOScanReqParams = (WDI_PNOScanReqParamsType*)pEventData->pEventData)) ||
@@ -21845,7 +22229,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-------------------------------------------------------------------------
@@ -21854,7 +22238,7 @@
    if ( pWDICtx->wdiPNOVersion > 0 )
    {
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
-                  "%s: PNO new version %d ", __FUNCTION__, 
+                  "%s: PNO new version %d ", __FUNCTION__,
                   pWDICtx->wdiPNOVersion);
 
      wdiStatus = WDI_PackPreferredNetworkListNew( pWDICtx, pwdiPNOScanReqParams,
@@ -21863,7 +22247,7 @@
    else
    {
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
-                  "%s: PNO old version %d ", __FUNCTION__, 
+                  "%s: PNO old version %d ", __FUNCTION__,
                   pWDICtx->wdiPNOVersion);
 
      wdiStatus = WDI_PackPreferredNetworkList( pWDICtx, pwdiPNOScanReqParams,
@@ -21876,44 +22260,44 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: failed to pack request parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return wdiStatus; 
+      return wdiStatus;
    }
 
    pWDICtx->wdiReqStatusCB     = pwdiPNOScanReqParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiPNOScanReqParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiPNOScanReqParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-               wdiPNOScanCb, pEventData->pUserData, WDI_SET_PREF_NETWORK_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+               wdiPNOScanCb, pEventData->pUserData, WDI_SET_PREF_NETWORK_RESP);
 }
 
 /**
  @brief Process Set RSSI Filter Request function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetRssiFilterReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_SetRssiFilterReqParamsType* pwdiRssiFilterReqParams = NULL;
    WDI_RssiFilterCb                wdiRssiFilterCb         = NULL;
-   wpt_uint8*                      pSendBuffer             = NULL; 
+   wpt_uint8*                      pSendBuffer             = NULL;
    wpt_uint16                      usDataOffset            = 0;
    wpt_uint16                      usSendSize              = 0;
    wpt_uint8                       ucRssiThreshold;
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiRssiFilterReqParams = (WDI_SetRssiFilterReqParamsType*)pEventData->pEventData)) ||
@@ -21922,13 +22306,13 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_PREF_NETWORK_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_PREF_NETWORK_REQ,
                          sizeof(ucRssiThreshold),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(ucRssiThreshold) )))
@@ -21937,52 +22321,52 @@
                   "Unable to get send buffer in Set PNO req %x %x %x",
                   pEventData, pwdiRssiFilterReqParams, wdiRssiFilterCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    ucRssiThreshold = pwdiRssiFilterReqParams->rssiThreshold;
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &ucRssiThreshold, 
-                   sizeof(ucRssiThreshold)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &ucRssiThreshold,
+                   sizeof(ucRssiThreshold));
 
    pWDICtx->wdiReqStatusCB     = pwdiRssiFilterReqParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiRssiFilterReqParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiRssiFilterReqParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiRssiFilterCb, pEventData->pUserData, WDI_SET_RSSI_FILTER_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiRssiFilterCb, pEventData->pUserData, WDI_SET_RSSI_FILTER_RESP);
 }
 
 
 /**
  @brief Process Update Scan Params function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateScanParamsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_UpdateScanParamsInfoType* pwdiUpdateScanParams  = NULL;
    WDI_UpdateScanParamsCb        wdiUpdateScanParamsCb = NULL;
-   wpt_uint8*                    pSendBuffer           = NULL; 
+   wpt_uint8*                    pSendBuffer           = NULL;
    wpt_uint16                    usDataOffset          = 0;
    wpt_uint16                    usSendSize            = 0;
    tUpdateScanParams             updateScanParams = {0};
 
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiUpdateScanParams = (WDI_UpdateScanParamsInfoType*)pEventData->pEventData)) ||
@@ -21991,7 +22375,7 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_INFO,
@@ -21999,7 +22383,7 @@
    /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPDATE_SCAN_PARAMS_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_UPDATE_SCAN_PARAMS_REQ,
                          sizeof(updateScanParams),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(updateScanParams) )))
@@ -22008,7 +22392,7 @@
                   "Unable to get send buffer in Update Scan Params req %x %x %x",
                   pEventData, pwdiUpdateScanParams, wdiUpdateScanParamsCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    //
@@ -22017,13 +22401,13 @@
 
    updateScanParams.b11dEnabled    = pwdiUpdateScanParams->wdiUpdateScanParamsInfo.b11dEnabled;
    updateScanParams.b11dResolved   = pwdiUpdateScanParams->wdiUpdateScanParamsInfo.b11dResolved;
-   updateScanParams.ucChannelCount = 
+   updateScanParams.ucChannelCount =
      (pwdiUpdateScanParams->wdiUpdateScanParamsInfo.ucChannelCount <
      WLAN_HAL_PNO_MAX_NETW_CHANNELS)?
      pwdiUpdateScanParams->wdiUpdateScanParamsInfo.ucChannelCount :
      WLAN_HAL_PNO_MAX_NETW_CHANNELS;
 
-   wpalMemoryCopy( updateScanParams.aChannels, 
+   wpalMemoryCopy( updateScanParams.aChannels,
                    pwdiUpdateScanParams->wdiUpdateScanParamsInfo.aChannels,
                    updateScanParams.ucChannelCount);
 
@@ -22033,34 +22417,34 @@
    updateScanParams.usPassiveMaxChTime = pwdiUpdateScanParams->wdiUpdateScanParamsInfo.usPassiveMaxChTime;
    updateScanParams.cbState            = pwdiUpdateScanParams->wdiUpdateScanParamsInfo.cbState;
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &updateScanParams, 
-                   sizeof(updateScanParams)); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &updateScanParams,
+                   sizeof(updateScanParams));
 
    pWDICtx->wdiReqStatusCB     = pwdiUpdateScanParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiUpdateScanParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiUpdateScanParams->pUserData;
 
    WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_INFO,
                "End Update Scan Parameters");
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiUpdateScanParamsCb, pEventData->pUserData, WDI_UPDATE_SCAN_PARAMS_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiUpdateScanParamsCb, pEventData->pUserData, WDI_UPDATE_SCAN_PARAMS_RESP);
 }
 
 /**
  @brief Process Preferred Network Found Indication function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessPrefNetworkFoundInd
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -22070,7 +22454,7 @@
 
 
   /*-------------------------------------------------------------------------
-    Sanity check 
+    Sanity check
   -------------------------------------------------------------------------*/
   if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
       ( NULL == pEventData->pEventData ))
@@ -22078,27 +22462,27 @@
      WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                  "%s: Invalid parameters", __FUNCTION__);
      WDI_ASSERT( 0 );
-     return WDI_STATUS_E_FAILURE; 
+     return WDI_STATUS_E_FAILURE;
   }
 
   /*-------------------------------------------------------------------------
     Extract indication and send it to UMAC
   -------------------------------------------------------------------------*/
-  wpalMemoryCopy( (void *)&prefNetwFoundInd.prefNetwFoundParams, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( (void *)&prefNetwFoundInd.prefNetwFoundParams,
+                  pEventData->pEventData,
                   sizeof(tPrefNetwFoundParams));
 
   /*Fill in the indication parameters*/
-  wdiInd.wdiIndicationType = WDI_PREF_NETWORK_FOUND_IND; 
+  wdiInd.wdiIndicationType = WDI_PREF_NETWORK_FOUND_IND;
 
   wpalMemoryZero(wdiInd.wdiIndicationData.wdiPrefNetworkFoundInd.ssId.sSSID,32);
 
-  wdiInd.wdiIndicationData.wdiPrefNetworkFoundInd.ssId.ucLength = 
+  wdiInd.wdiIndicationData.wdiPrefNetworkFoundInd.ssId.ucLength =
      (prefNetwFoundInd.prefNetwFoundParams.ssId.length < 31 )?
-      prefNetwFoundInd.prefNetwFoundParams.ssId.length : 31; 
+      prefNetwFoundInd.prefNetwFoundParams.ssId.length : 31;
 
-  wpalMemoryCopy( wdiInd.wdiIndicationData.wdiPrefNetworkFoundInd.ssId.sSSID, 
-                  prefNetwFoundInd.prefNetwFoundParams.ssId.ssId, 
+  wpalMemoryCopy( wdiInd.wdiIndicationData.wdiPrefNetworkFoundInd.ssId.sSSID,
+                  prefNetwFoundInd.prefNetwFoundParams.ssId.ssId,
                   wdiInd.wdiIndicationData.wdiPrefNetworkFoundInd.ssId.ucLength);
 
   wdiInd.wdiIndicationData.wdiPrefNetworkFoundInd.rssi =
@@ -22113,23 +22497,23 @@
 
   /*Notify UMAC*/
   pWDICtx->wdiLowLevelIndCB( &wdiInd, pWDICtx->pIndUserData );
-  
-  return WDI_STATUS_SUCCESS; 
+
+  return WDI_STATUS_SUCCESS;
 }
 
 /**
  @brief Process PNO Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetPreferredNetworkRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -22140,7 +22524,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData ))
@@ -22148,37 +22532,37 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
 
-   wdiPNOScanCb = (WDI_PNOScanCb)pWDICtx->pfncRspCB; 
+   wdiPNOScanCb = (WDI_PNOScanCb)pWDICtx->pfncRspCB;
 
    /*-------------------------------------------------------------------------
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiPNOScanCb(wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetPreferredNetworkRsp*/
 
 /**
  @brief Process RSSI Filter Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetRssiFilterRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -22189,7 +22573,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData ))
@@ -22197,48 +22581,48 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wdiRssiFilterCb = (WDI_RssiFilterCb)pWDICtx->pfncRspCB; 
+   wdiRssiFilterCb = (WDI_RssiFilterCb)pWDICtx->pfncRspCB;
 
    /*-------------------------------------------------------------------------
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiRssiFilterCb(wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetRssiFilterRsp*/
 
 /**
  @brief Process Update Scan Params Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessUpdateScanParamsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_Status             wdiStatus;
-   tUpdateScanParamsResp  halUpdScanParams; 
+   tUpdateScanParamsResp  halUpdScanParams;
    WDI_UpdateScanParamsCb wdiUpdateScanParamsCb   = NULL;
-   wpt_uint32             uStatus; 
+   wpt_uint32             uStatus;
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData ))
@@ -22246,44 +22630,44 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
                   "Process UPD scan params ptr : %x", __FUNCTION__);
 
-  wdiUpdateScanParamsCb = (WDI_UpdateScanParamsCb)pWDICtx->pfncRspCB; 
+  wdiUpdateScanParamsCb = (WDI_UpdateScanParamsCb)pWDICtx->pfncRspCB;
 
   /*-------------------------------------------------------------------------
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
-  wpalMemoryCopy( (void *)&halUpdScanParams.status, 
-                  pEventData->pEventData, 
+  wpalMemoryCopy( (void *)&halUpdScanParams.status,
+                  pEventData->pEventData,
                   sizeof(halUpdScanParams.status));
 
   uStatus  = halUpdScanParams.status;
 
   /*Extract PNO version - 1st bit of the status */
-  pWDICtx->wdiPNOVersion = (uStatus & WDI_PNO_VERSION_MASK)? 1:0; 
+  pWDICtx->wdiPNOVersion = (uStatus & WDI_PNO_VERSION_MASK)? 1:0;
 
   /*Remove version bit*/
-  uStatus = uStatus & ( ~(WDI_PNO_VERSION_MASK)); 
+  uStatus = uStatus & ( ~(WDI_PNO_VERSION_MASK));
 
-  wdiStatus   =   WDI_HAL_2_WDI_STATUS(uStatus); 
+  wdiStatus   =   WDI_HAL_2_WDI_STATUS(uStatus);
 
   WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_INFO,
-              "UPD Scan Parameters rsp with status: %d", 
+              "UPD Scan Parameters rsp with status: %d",
               halUpdScanParams.status);
 
   /*Notify UMAC*/
   wdiUpdateScanParamsCb(wdiStatus, pWDICtx->pRspCBUserData);
 
-  return WDI_STATUS_SUCCESS; 
+  return WDI_STATUS_SUCCESS;
 }
 #endif // FEATURE_WLAN_SCAN_PNO
 
 #ifdef WLAN_FEATURE_PACKET_FILTERING
-WDI_Status 
+WDI_Status
 WDI_8023MulticastListReq
 (
   WDI_RcvFltPktSetMcListReqParamsType*  pwdiRcvFltPktSetMcListReqInfo,
@@ -22298,29 +22682,29 @@
              "%s", __FUNCTION__);
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_8023_MULTICAST_LIST_REQ;
-   wdiEventData.pEventData      = pwdiRcvFltPktSetMcListReqInfo; 
+   wdiEventData.pEventData      = pwdiRcvFltPktSetMcListReqInfo;
    wdiEventData.uEventDataSize  = sizeof(*pwdiRcvFltPktSetMcListReqInfo);
-   wdiEventData.pCBfnc          = wdi8023MulticastListCallback; 
+   wdiEventData.pCBfnc          = wdi8023MulticastListCallback;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }
 
-WDI_Status 
+WDI_Status
 WDI_ReceiveFilterSetFilterReq
 (
   WDI_SetRcvPktFilterReqParamsType* pwdiSetRcvPktFilterReqInfo,
@@ -22335,32 +22719,32 @@
              "%s",__FUNCTION__);
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_RECEIVE_FILTER_SET_FILTER_REQ;
-   wdiEventData.pEventData      = pwdiSetRcvPktFilterReqInfo; 
-   wdiEventData.uEventDataSize  = sizeof(*pwdiSetRcvPktFilterReqInfo) + 
-                                  (pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.numFieldParams 
+   wdiEventData.pEventData      = pwdiSetRcvPktFilterReqInfo;
+   wdiEventData.uEventDataSize  = sizeof(*pwdiSetRcvPktFilterReqInfo) +
+                                  (pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.numFieldParams
                                   * sizeof(WDI_RcvPktFilterFieldParams) - 1);
-   wdiEventData.pCBfnc          = wdiReceiveFilterSetFilterCallback; 
+   wdiEventData.pCBfnc          = wdiReceiveFilterSetFilterCallback;
    wdiEventData.pUserData       = pUserData;
 
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }
 
-WDI_Status 
+WDI_Status
 WDI_FilterMatchCountReq
 (
   WDI_RcvFltPktMatchCntReqParamsType* pwdiRcvFltPktMatchCntReqInfo,
@@ -22375,30 +22759,30 @@
              "%s",__FUNCTION__);
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_PACKET_COALESCING_FILTER_MATCH_COUNT_REQ;
-   wdiEventData.pEventData      = pwdiRcvFltPktMatchCntReqInfo; 
+   wdiEventData.pEventData      = pwdiRcvFltPktMatchCntReqInfo;
    wdiEventData.uEventDataSize  = sizeof(*pwdiRcvFltPktMatchCntReqInfo);
-   wdiEventData.pCBfnc          = wdiFilterMatchCountCallback; 
+   wdiEventData.pCBfnc          = wdiFilterMatchCountCallback;
    wdiEventData.pUserData       = pUserData;
 
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
 }
 
-WDI_Status 
+WDI_Status
 WDI_ReceiveFilterClearFilterReq
 (
   WDI_RcvFltPktClearReqParamsType*  pwdiRcvFltPktClearReqInfo,
@@ -22413,23 +22797,23 @@
              "%s",__FUNCTION__);
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_RECEIVE_FILTER_CLEAR_FILTER_REQ;
-   wdiEventData.pEventData      = pwdiRcvFltPktClearReqInfo; 
+   wdiEventData.pEventData      = pwdiRcvFltPktClearReqInfo;
    wdiEventData.uEventDataSize  = sizeof(*pwdiRcvFltPktClearReqInfo);
-   wdiEventData.pCBfnc          = wdiReceiveFilterClearFilterCallback; 
+   wdiEventData.pCBfnc          = wdiReceiveFilterClearFilterCallback;
    wdiEventData.pUserData       = pUserData;
 
 
@@ -22438,51 +22822,63 @@
 
 /**
  @brief Process 8023 Multicast List Request function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_Process8023MulticastListReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_RcvFltPktSetMcListReqParamsType* pwdiFltPktSetMcListReqParamsType  = NULL;
    WDI_8023MulticastListCb    wdi8023MulticastListCb = NULL;
-   wpt_uint8*                 pSendBuffer           = NULL; 
+   wpt_uint8*                 pSendBuffer           = NULL;
    wpt_uint16                 usDataOffset          = 0;
    wpt_uint16                 usSendSize            = 0;
    tHalRcvFltMcAddrListType   rcvFltMcAddrListType;
    wpt_uint8                  i;
+   wpt_uint8                  ucCurrentBSSSesIdx = 0;
+   WDI_BSSSessionType*        pBSSSes = NULL;
 
    WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
              "%s",__FUNCTION__);
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
-       ( NULL == (pwdiFltPktSetMcListReqParamsType = 
+       ( NULL == (pwdiFltPktSetMcListReqParamsType =
        (WDI_RcvFltPktSetMcListReqParamsType*)pEventData->pEventData)) ||
-       ( NULL == (wdi8023MulticastListCb = 
+       ( NULL == (wdi8023MulticastListCb =
        (WDI_8023MulticastListCb)pEventData->pCBfnc)))
    {
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
+   }
+
+   ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
+                            pwdiFltPktSetMcListReqParamsType->mcAddrList.bssId, 
+                            &pBSSSes);  
+   if ( NULL == pBSSSes )
+   {
+       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                 " %s : Association for this BSSID does not exist",__FUNCTION__);
+       return WDI_STATUS_E_FAILURE; 
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, 
-                         WDI_8023_MULTICAST_LIST_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,
+                         WDI_8023_MULTICAST_LIST_REQ,
                          sizeof(tHalRcvFltMcAddrListType),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(tHalRcvFltMcAddrListType))))
@@ -22493,11 +22889,11 @@
                   pEventData, pwdiFltPktSetMcListReqParamsType,
                   wdi8023MulticastListCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   rcvFltMcAddrListType.cMulticastAddr = 
-       pwdiFltPktSetMcListReqParamsType->mcAddrList.ulMulticastAddrCnt; 
+   rcvFltMcAddrListType.cMulticastAddr =
+       pwdiFltPktSetMcListReqParamsType->mcAddrList.ulMulticastAddrCnt;
    for( i = 0; i < rcvFltMcAddrListType.cMulticastAddr; i++ )
    {
       wpalMemoryCopy(rcvFltMcAddrListType.multicastAddr[i],
@@ -22505,63 +22901,76 @@
                  sizeof(tSirMacAddr));
    }
 
+   rcvFltMcAddrListType.bssIdx = pBSSSes->ucBSSIdx;
    wpalMemoryCopy( pSendBuffer+usDataOffset, 
                    &rcvFltMcAddrListType, 
                    sizeof(rcvFltMcAddrListType)); 
 
    pWDICtx->wdiReqStatusCB     = pwdiFltPktSetMcListReqParamsType->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiFltPktSetMcListReqParamsType->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiFltPktSetMcListReqParamsType->pUserData;
 
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                         wdi8023MulticastListCb, pEventData->pUserData,
-                        WDI_8023_MULTICAST_LIST_RESP); 
+                        WDI_8023_MULTICAST_LIST_RESP);
 }
 
 /**
  @brief Process Receive Filter Set Filter Request function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessReceiveFilterSetFilterReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_SetRcvPktFilterReqParamsType* pwdiSetRcvPktFilterReqInfo  = NULL;
    WDI_ReceiveFilterSetFilterCb      wdiReceiveFilterSetFilterCb = NULL;
-   wpt_uint8*                 pSendBuffer           = NULL; 
+   wpt_uint8*                 pSendBuffer           = NULL;
    wpt_uint16                 usDataOffset          = 0;
    wpt_uint16                 usSendSize            = 0;
    wpt_uint32                 usRcvPktFilterCfgSize;
    tHalRcvPktFilterCfgType    *pRcvPktFilterCfg;
    wpt_uint8                  i;
+   wpt_uint8                  ucCurrentBSSSesIdx = 0;
+   WDI_BSSSessionType*        pBSSSes = NULL;
 
    WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
              "%s",__FUNCTION__);
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
-       ( NULL == (pwdiSetRcvPktFilterReqInfo = 
+       ( NULL == (pwdiSetRcvPktFilterReqInfo =
        (WDI_SetRcvPktFilterReqParamsType*)pEventData->pEventData)) ||
-       ( NULL == (wdiReceiveFilterSetFilterCb = 
+       ( NULL == (wdiReceiveFilterSetFilterCb =
        (WDI_ReceiveFilterSetFilterCb)pEventData->pCBfnc)))
    {
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
+   }
+
+   ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
+                            pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.bssId, 
+                            &pBSSSes);  
+   if ( NULL == pBSSSes )
+   {
+       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                 " %s : Association for this BSSID does not exist",__FUNCTION__);
+       return WDI_STATUS_E_FAILURE; 
    }
 
    usRcvPktFilterCfgSize = sizeof(tHalRcvPktFilterCfgType) + 
@@ -22578,15 +22987,16 @@
             "tHalRcvPktFilterCfgType: %x %x %x ",
             __FUNCTION__, pWDICtx, pEventData, pEventData->pEventData);
     WDI_ASSERT(0);
-    return WDI_STATUS_E_FAILURE; 
+    return WDI_STATUS_E_FAILURE;
   }
 
   wpalMemoryZero(pRcvPktFilterCfg, usRcvPktFilterCfgSize);
 
    /*-----------------------------------------------------------------------
      Get message buffer
+
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_RECEIVE_FILTER_SET_FILTER_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_RECEIVE_FILTER_SET_FILTER_REQ,
                          usRcvPktFilterCfgSize,
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + usRcvPktFilterCfgSize)))
@@ -22598,35 +23008,36 @@
                   wdiReceiveFilterSetFilterCb);
       WDI_ASSERT(0);
       wpalMemoryFree(pRcvPktFilterCfg);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
-              "UsData Off %d UsSend %d cfg %d",usDataOffset, 
+              "UsData Off %d UsSend %d cfg %d",usDataOffset,
               usSendSize,usRcvPktFilterCfgSize);
 
    pRcvPktFilterCfg->filterId = pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.filterId;
-   pRcvPktFilterCfg->filterType = pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.filterType;   
+   pRcvPktFilterCfg->filterType = pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.filterType;
    pRcvPktFilterCfg->numParams = pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.numFieldParams;
-   pRcvPktFilterCfg->coleasceTime = pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.coalesceTime;
+   pRcvPktFilterCfg->coalesceTime = pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.coalesceTime;
 
+   //pRcvPktFilterCfg->bssIdx = pBSSSes->ucBSSIdx;
 
    WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
-              "Out: FID %d FT %d",pRcvPktFilterCfg->filterId, 
+              "Out: FID %d FT %d",pRcvPktFilterCfg->filterId,
               pRcvPktFilterCfg->filterType);
    WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
               "NParams %d CT %d",pRcvPktFilterCfg->numParams, 
-              pRcvPktFilterCfg->coleasceTime);
+              pRcvPktFilterCfg->coalesceTime);
 
    for ( i = 0; i < pRcvPktFilterCfg->numParams; i++ )
    {
-       pRcvPktFilterCfg->paramsData[i].protocolLayer = 
+       pRcvPktFilterCfg->paramsData[i].protocolLayer =
            pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.paramsData[i].protocolLayer;
-       pRcvPktFilterCfg->paramsData[i].cmpFlag = 
+       pRcvPktFilterCfg->paramsData[i].cmpFlag =
            pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.paramsData[i].cmpFlag;
-       pRcvPktFilterCfg->paramsData[i].dataOffset = 
+       pRcvPktFilterCfg->paramsData[i].dataOffset =
            pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.paramsData[i].dataOffset;
-        pRcvPktFilterCfg->paramsData[i].dataLength = 
+        pRcvPktFilterCfg->paramsData[i].dataLength =
             pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.paramsData[i].dataLength;
 
        wpalMemoryCopy(&pRcvPktFilterCfg->paramsData[i].compareData,
@@ -22638,65 +23049,65 @@
 
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
            "Out:Proto %d Comp Flag %d \n",
-           pRcvPktFilterCfg->paramsData[i].protocolLayer, 
+           pRcvPktFilterCfg->paramsData[i].protocolLayer,
            pRcvPktFilterCfg->paramsData[i].cmpFlag);
 
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
            "Data Offset %d Data Len %d\n",
-           pRcvPktFilterCfg->paramsData[i].dataOffset, 
+           pRcvPktFilterCfg->paramsData[i].dataOffset,
            pRcvPktFilterCfg->paramsData[i].dataLength);
 
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
            "CData: %d:%d:%d:%d:%d:%d\n",
-           pRcvPktFilterCfg->paramsData[i].compareData[0], 
-           pRcvPktFilterCfg->paramsData[i].compareData[1], 
-           pRcvPktFilterCfg->paramsData[i].compareData[2], 
+           pRcvPktFilterCfg->paramsData[i].compareData[0],
+           pRcvPktFilterCfg->paramsData[i].compareData[1],
+           pRcvPktFilterCfg->paramsData[i].compareData[2],
            pRcvPktFilterCfg->paramsData[i].compareData[3],
-           pRcvPktFilterCfg->paramsData[i].compareData[4], 
+           pRcvPktFilterCfg->paramsData[i].compareData[4],
            pRcvPktFilterCfg->paramsData[i].compareData[5]);
 
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
            "MData: %d:%d:%d:%d:%d:%d\n",
-           pRcvPktFilterCfg->paramsData[i].dataMask[0], 
-           pRcvPktFilterCfg->paramsData[i].dataMask[1], 
-           pRcvPktFilterCfg->paramsData[i].dataMask[2], 
+           pRcvPktFilterCfg->paramsData[i].dataMask[0],
+           pRcvPktFilterCfg->paramsData[i].dataMask[1],
+           pRcvPktFilterCfg->paramsData[i].dataMask[2],
            pRcvPktFilterCfg->paramsData[i].dataMask[3],
-           pRcvPktFilterCfg->paramsData[i].dataMask[4], 
+           pRcvPktFilterCfg->paramsData[i].dataMask[4],
            pRcvPktFilterCfg->paramsData[i].dataMask[5]);
    }
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   pRcvPktFilterCfg, 
-                   usRcvPktFilterCfgSize); 
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   pRcvPktFilterCfg,
+                   usRcvPktFilterCfgSize);
 
 
    pWDICtx->wdiReqStatusCB     = pwdiSetRcvPktFilterReqInfo->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiSetRcvPktFilterReqInfo->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiSetRcvPktFilterReqInfo->pUserData;
 
    WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
              "%s",__FUNCTION__);
    wpalMemoryFree(pRcvPktFilterCfg);
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                         wdiReceiveFilterSetFilterCb, pEventData->pUserData,
-                        WDI_RECEIVE_FILTER_SET_FILTER_RESP); 
+                        WDI_RECEIVE_FILTER_SET_FILTER_RESP);
 }
 
 /**
  @brief Process Packet Filter Match Count Request function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessFilterMatchCountReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -22705,7 +23116,7 @@
                                                                          NULL;
    WDI_FilterMatchCountCb                 wdiFilterMatchCountCb              =
                                                                          NULL;
-   wpt_uint8*                             pSendBuffer           = NULL; 
+   wpt_uint8*                             pSendBuffer           = NULL;
    wpt_uint16                             usDataOffset          = 0;
    wpt_uint16                             usSendSize            = 0;
 
@@ -22713,25 +23124,25 @@
              "%s",__FUNCTION__);
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
-       ( NULL == (pwdiRcvFltPktMatchCntReqParamsType = 
+       ( NULL == (pwdiRcvFltPktMatchCntReqParamsType =
        (WDI_RcvFltPktMatchCntReqParamsType*)pEventData->pEventData)) ||
-       ( NULL == (wdiFilterMatchCountCb = 
+       ( NULL == (wdiFilterMatchCountCb =
        (WDI_FilterMatchCountCb)pEventData->pCBfnc)))
    {
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, 
-                         WDI_PACKET_COALESCING_FILTER_MATCH_COUNT_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,
+                         WDI_PACKET_COALESCING_FILTER_MATCH_COUNT_REQ,
                          0,
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < usDataOffset))
@@ -22742,71 +23153,83 @@
                   pEventData, pwdiRcvFltPktMatchCntReqParamsType,
                   wdiFilterMatchCountCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    //
    // Don't need to fill send buffer other than header
    //
    pWDICtx->wdiReqStatusCB     = pwdiRcvFltPktMatchCntReqParamsType->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiRcvFltPktMatchCntReqParamsType->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiRcvFltPktMatchCntReqParamsType->pUserData;
 
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiFilterMatchCountCb, 
-                        pEventData->pUserData, 
-                        WDI_PACKET_COALESCING_FILTER_MATCH_COUNT_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiFilterMatchCountCb,
+                        pEventData->pUserData,
+                        WDI_PACKET_COALESCING_FILTER_MATCH_COUNT_RESP);
 }
 
 /**
  @brief Process Receive Filter Clear Filter Request function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessReceiveFilterClearFilterReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
-{ 
+{
    WDI_RcvFltPktClearReqParamsType* pwdiRcvFltPktClearReqParamsType = NULL;
    WDI_ReceiveFilterClearFilterCb   wdiRcvFltPktClearFilterCb       = NULL;
-   wpt_uint8*                       pSendBuffer           = NULL; 
+   wpt_uint8*                       pSendBuffer           = NULL;
    wpt_uint16                       usDataOffset          = 0;
    wpt_uint16                       usSendSize            = 0;
    tHalRcvFltPktClearParam          rcvFltPktClearParam;
+   wpt_uint8                        ucCurrentBSSSesIdx = 0;
+   WDI_BSSSessionType*              pBSSSes = NULL;
 
    WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
              "%s",__FUNCTION__);
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiRcvFltPktClearReqParamsType =
        (WDI_RcvFltPktClearReqParamsType*)pEventData->pEventData)) ||
-       ( NULL == (wdiRcvFltPktClearFilterCb = 
+       ( NULL == (wdiRcvFltPktClearFilterCb =
        (WDI_ReceiveFilterClearFilterCb)pEventData->pCBfnc)))
    {
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
+   }
+
+   ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx, 
+                            pwdiRcvFltPktClearReqParamsType->filterClearParam.bssId, 
+                            &pBSSSes);  
+   if ( NULL == pBSSSes )
+   {
+       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
+                 " %s : Association for this BSSID does not exist",__FUNCTION__);
+       return WDI_STATUS_E_FAILURE; 
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
    if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,
-                         WDI_RECEIVE_FILTER_CLEAR_FILTER_REQ, 
+                         WDI_RECEIVE_FILTER_CLEAR_FILTER_REQ,
                          sizeof(tHalRcvFltPktClearParam),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(tHalRcvFltPktClearParam))))
@@ -22817,43 +23240,44 @@
                   pEventData, pwdiRcvFltPktClearReqParamsType,
                   wdiRcvFltPktClearFilterCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
 
    rcvFltPktClearParam.status = pwdiRcvFltPktClearReqParamsType->
-                                                    filterClearParam.status; 
+                                                    filterClearParam.status;
    rcvFltPktClearParam.filterId = pwdiRcvFltPktClearReqParamsType->
-                                                    filterClearParam.filterId; 
+                                                    filterClearParam.filterId;
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &rcvFltPktClearParam, 
-                   sizeof(rcvFltPktClearParam)); 
+   rcvFltPktClearParam.bssIdx = pBSSSes->ucBSSIdx;
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &rcvFltPktClearParam,
+                   sizeof(rcvFltPktClearParam));
 
    pWDICtx->wdiReqStatusCB     = pwdiRcvFltPktClearReqParamsType->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiRcvFltPktClearReqParamsType->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiRcvFltPktClearReqParamsType->pUserData;
 
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
                         wdiRcvFltPktClearFilterCb, pEventData->pUserData,
-                        WDI_RECEIVE_FILTER_CLEAR_FILTER_RESP); 
+                        WDI_RECEIVE_FILTER_CLEAR_FILTER_RESP);
 }
 
 /**
  @brief Process 8023 Multicast List Response function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_Process8023MulticastListRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -22867,7 +23291,7 @@
              "%s",__FUNCTION__);
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData ))
@@ -22875,36 +23299,36 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wdi8023MulticastListCb = (WDI_8023MulticastListCb)pWDICtx->pfncRspCB; 
+   wdi8023MulticastListCb = (WDI_8023MulticastListCb)pWDICtx->pfncRspCB;
 
    /*-------------------------------------------------------------------------
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdi8023MulticastListCb(wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }
 
 /**
  @brief Process Set Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessReceiveFilterSetFilterRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -22918,7 +23342,7 @@
           "%s",__FUNCTION__);
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData ))
@@ -22926,36 +23350,36 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiReceiveFilterSetFilterCb = (WDI_ReceiveFilterSetFilterCb)pWDICtx->
-                                                                   pfncRspCB; 
+                                                                   pfncRspCB;
 
    /*-------------------------------------------------------------------------
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiReceiveFilterSetFilterCb(wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }
 
 /**
  @brief Process Packet Filter Match Count Response function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessFilterMatchCountRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -22971,7 +23395,7 @@
              "%s",__FUNCTION__);
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData ))
@@ -22979,35 +23403,35 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wdiFilterMatchCountCb = (WDI_FilterMatchCountCb)pWDICtx->pfncRspCB; 
+   wdiFilterMatchCountCb = (WDI_FilterMatchCountCb)pWDICtx->pfncRspCB;
 
    /*-------------------------------------------------------------------------
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiFilterMatchCountCb(wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }
 
 /**
  @brief Process Receive Filter Clear Filter Response function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessReceiveFilterClearFilterRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -23021,7 +23445,7 @@
              "%s",__FUNCTION__);
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData ))
@@ -23029,22 +23453,22 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    wdiReceiveFilterClearFilterCb = (WDI_ReceiveFilterClearFilterCb)pWDICtx->
-                                                                 pfncRspCB; 
+                                                                 pfncRspCB;
 
    /*-------------------------------------------------------------------------
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiReceiveFilterClearFilterCb(wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }
 #endif // WLAN_FEATURE_PACKET_FILTERING
 
@@ -23052,16 +23476,16 @@
  @brief Process Shutdown Rsp function
         There is no shutdown response comming from HAL
         - function just kept for simmetry
- 
+
  @param  pWDICtx:         pointer to the WLAN DAL context
-         pEventData:      pointer to the event information structure 
+         pEventData:      pointer to the event information structure
 
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessShutdownRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -23075,19 +23499,19 @@
 /**
  @brief WDI_SetPowerParamsReq
 
- @param pwdiPowerParamsReqParams: the Set Power Params as 
+ @param pwdiPowerParamsReqParams: the Set Power Params as
                       specified by the Device Interface
-  
+
         wdiPowerParamsCb: callback for passing back the response
         of the Set Power Params operation received from the
         device
-  
+
         pUserData: user data will be passed back with the
-        callback 
-  
+        callback
+
  @return Result of the function call
 */
-WDI_Status 
+WDI_Status
 WDI_SetPowerParamsReq
 (
   WDI_SetPowerParamsReqParamsType* pwdiPowerParamsReqParams,
@@ -23099,23 +23523,23 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*------------------------------------------------------------------------
-     Sanity Check 
+     Sanity Check
    ------------------------------------------------------------------------*/
    if ( eWLAN_PAL_FALSE == gWDIInitialized )
    {
      WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "WDI API call before module is initialized - Fail request");
 
-     return WDI_STATUS_E_NOT_ALLOWED; 
+     return WDI_STATUS_E_NOT_ALLOWED;
    }
 
    /*------------------------------------------------------------------------
      Fill in Event data and post to the Main FSM
    ------------------------------------------------------------------------*/
    wdiEventData.wdiRequest      = WDI_SET_POWER_PARAMS_REQ;
-   wdiEventData.pEventData      = pwdiPowerParamsReqParams; 
+   wdiEventData.pEventData      = pwdiPowerParamsReqParams;
    wdiEventData.uEventDataSize  = sizeof(*pwdiPowerParamsReqParams);
-   wdiEventData.pCBfnc          = wdiPowerParamsCb; 
+   wdiEventData.pCBfnc          = wdiPowerParamsCb;
    wdiEventData.pUserData       = pUserData;
 
    return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
@@ -23123,29 +23547,29 @@
 
 /**
  @brief Process Set Power Params Request function
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetPowerParamsReq
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
 {
    WDI_SetPowerParamsReqParamsType* pwdiPowerParamsReqParams = NULL;
    WDI_SetPowerParamsCb             wdiPowerParamsCb         = NULL;
-   wpt_uint8*                       pSendBuffer              = NULL; 
+   wpt_uint8*                       pSendBuffer              = NULL;
    wpt_uint16                       usDataOffset             = 0;
    wpt_uint16                       usSendSize               = 0;
    tSetPowerParamsType              powerParams;
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pEventData ) ||
        ( NULL == (pwdiPowerParamsReqParams = (WDI_SetPowerParamsReqParamsType*)pEventData->pEventData)) ||
@@ -23154,13 +23578,13 @@
       WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
    /*-----------------------------------------------------------------------
      Get message buffer
    -----------------------------------------------------------------------*/
-   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_POWER_PARAMS_REQ, 
+   if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_POWER_PARAMS_REQ,
                          sizeof(powerParams),
                          &pSendBuffer, &usDataOffset, &usSendSize))||
        ( usSendSize < (usDataOffset + sizeof(powerParams) )))
@@ -23169,61 +23593,61 @@
                   "Unable to get send buffer in Set PNO req %x %x %x",
                   pEventData, pwdiPowerParamsReqParams, wdiPowerParamsCb);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
   /*  Ignore DTIM */
-  powerParams.uIgnoreDTIM = 
+  powerParams.uIgnoreDTIM =
     pwdiPowerParamsReqParams->wdiSetPowerParamsInfo.uIgnoreDTIM;
 
   /*DTIM Period*/
-  powerParams.uDTIMPeriod = 
+  powerParams.uDTIMPeriod =
     pwdiPowerParamsReqParams->wdiSetPowerParamsInfo.uDTIMPeriod;
 
   /* Listen Interval */
-  powerParams.uListenInterval= 
+  powerParams.uListenInterval=
     pwdiPowerParamsReqParams->wdiSetPowerParamsInfo.uListenInterval;
 
   /* Broadcast Multicas Filter  */
-  powerParams.uBcastMcastFilter = 
+  powerParams.uBcastMcastFilter =
     pwdiPowerParamsReqParams->wdiSetPowerParamsInfo.uBcastMcastFilter;
 
   /* Beacon Early Termination */
-  powerParams.uEnableBET = 
+  powerParams.uEnableBET =
     pwdiPowerParamsReqParams->wdiSetPowerParamsInfo.uEnableBET;
 
   /* Beacon Early Termination Interval */
-  powerParams.uBETInterval = 
-    pwdiPowerParamsReqParams->wdiSetPowerParamsInfo.uBETInterval; 
-    
+  powerParams.uBETInterval =
+    pwdiPowerParamsReqParams->wdiSetPowerParamsInfo.uBETInterval;
 
-   wpalMemoryCopy( pSendBuffer+usDataOffset, 
-                   &powerParams, 
-                   sizeof(powerParams)); 
+
+   wpalMemoryCopy( pSendBuffer+usDataOffset,
+                   &powerParams,
+                   sizeof(powerParams));
 
    pWDICtx->wdiReqStatusCB     = pwdiPowerParamsReqParams->wdiReqStatusCB;
-   pWDICtx->pReqStatusUserData = pwdiPowerParamsReqParams->pUserData; 
+   pWDICtx->pReqStatusUserData = pwdiPowerParamsReqParams->pUserData;
 
    /*-------------------------------------------------------------------------
-     Send Get STA Request to HAL 
+     Send Get STA Request to HAL
    -------------------------------------------------------------------------*/
-   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, 
-                        wdiPowerParamsCb, pEventData->pUserData, WDI_SET_POWER_PARAMS_RESP); 
+   return  WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize,
+                        wdiPowerParamsCb, pEventData->pUserData, WDI_SET_POWER_PARAMS_RESP);
 }
 
 /**
  @brief Process Power Params Rsp function (called when a
         response is being received over the bus from HAL)
- 
- @param  pWDICtx:         pointer to the WLAN DAL context 
-         pEventData:      pointer to the event information structure 
-  
+
+ @param  pWDICtx:         pointer to the WLAN DAL context
+         pEventData:      pointer to the event information structure
+
  @see
  @return Result of the function call
 */
 WDI_Status
 WDI_ProcessSetPowerParamsRsp
-( 
+(
   WDI_ControlBlockType*  pWDICtx,
   WDI_EventInfoType*     pEventData
 )
@@ -23234,7 +23658,7 @@
    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
    /*-------------------------------------------------------------------------
-     Sanity check 
+     Sanity check
    -------------------------------------------------------------------------*/
    if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
        ( NULL == pEventData->pEventData ))
@@ -23242,21 +23666,21 @@
       WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
                   "%s: Invalid parameters", __FUNCTION__);
       WDI_ASSERT(0);
-      return WDI_STATUS_E_FAILURE; 
+      return WDI_STATUS_E_FAILURE;
    }
 
-   wdiPowerParamsCb = (WDI_SetPowerParamsCb)pWDICtx->pfncRspCB; 
+   wdiPowerParamsCb = (WDI_SetPowerParamsCb)pWDICtx->pfncRspCB;
 
    /*-------------------------------------------------------------------------
      Extract response and send it to UMAC
    -------------------------------------------------------------------------*/
    halStatus = *((eHalStatus*)pEventData->pEventData);
-   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus); 
+   wdiStatus   =   WDI_HAL_2_WDI_STATUS(halStatus);
 
    /*Notify UMAC*/
    wdiPowerParamsCb(wdiStatus, pWDICtx->pRspCBUserData);
 
-   return WDI_STATUS_SUCCESS; 
+   return WDI_STATUS_SUCCESS;
 }/*WDI_ProcessSetPowerParamsRsp*/
 
 #ifdef WLAN_FEATURE_GTK_OFFLOAD
@@ -23890,8 +24314,8 @@
    ------------------------------------------------------------------------*/
    FillAllFeatureCaps(gpHostWlanFeatCaps, supportEnabledFeatures,
       (sizeof(supportEnabledFeatures)/sizeof(supportEnabledFeatures[0])));
-   WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_ERROR,
-      "bit 0 - %x %x %x %x - bit 128\n",
+   WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_INFO,
+      "Host caps %x %x %x %x\n",
       gpHostWlanFeatCaps->featCaps[0],
       gpHostWlanFeatCaps->featCaps[1],
       gpHostWlanFeatCaps->featCaps[2],
@@ -23965,7 +24389,7 @@
   }
 
   WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_INFO,
-       "bit 0 - %x %x %x %x - bit 128\n",
+       "Host Caps - %x %x %x %x\n",
       ((tWlanFeatCaps *)pEventData->pEventData)->featCaps[0],
       ((tWlanFeatCaps *)pEventData->pEventData)->featCaps[1],
       ((tWlanFeatCaps *)pEventData->pEventData)->featCaps[2],
@@ -24043,14 +24467,14 @@
 
    wpalMemoryCopy(gpFwWlanFeatCaps,(tWlanFeatCaps *) pEventData -> pEventData,
                     fCapsStructSize);
-   WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_ERROR,
-      "bit 0 - %x %x %x %x - bit 128\n",
+   WPAL_TRACE( eWLAN_MODULE_DAL_CTRL,  eWLAN_PAL_TRACE_LEVEL_INFO,
+      "FW caps %x %x %x %x\n",
       gpFwWlanFeatCaps->featCaps[0],
       gpFwWlanFeatCaps->featCaps[1],
       gpFwWlanFeatCaps->featCaps[2],
       gpFwWlanFeatCaps->featCaps[3]
      );
-   
+
    wdiFeatureCapsExchangeCb = (WDI_featureCapsExchangeCb) pWDICtx -> pfncRspCB; 
 
    /*Notify UMAC - there is no callback right now but can be used in future if reqd */
diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h
index d71cba8..872a278 100644
--- a/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h
+++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h
@@ -295,4 +295,13 @@
 ---------------------------------------------------------------------------*/
 wpt_status wpalRivaSubystemRestart(void);
 
+/*---------------------------------------------------------------------------
+    wpalWlanReload -  Initiate WLAN Driver reload
+
+    Param:
+       None
+    Return:
+       NONE
+---------------------------------------------------------------------------*/
+void wpalWlanReload(void);
 #endif // __WLAN_QCT_PAL_API_H
diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_packet.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_packet.h
index 2c23501..17ae26c 100644
--- a/CORE/WDI/WPAL/inc/wlan_qct_pal_packet.h
+++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_packet.h
@@ -63,7 +63,11 @@
 //   18 BD/PDUs containing the remaining 2232 bytes of the payload
 //     2346 - 114 = 2232; 2232 / 124 = 18
 //   So 21 BD/PDUs are required
-#define VPKT_SIZE_BUFFER  (21 * 128)
+
+//The size of AMSDU frame per spec can be a max of 3839 bytes 
+// in BD/PDUs that means 30 (one BD = 128 bytes) 
+// we must add the size of the 802.11 header to that 
+#define VPKT_SIZE_BUFFER  (30 * 128) + 32
 
 typedef enum
 {
diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_api.c b/CORE/WDI/WPAL/src/wlan_qct_pal_api.c
index c973b73..b2cb276 100644
--- a/CORE/WDI/WPAL/src/wlan_qct_pal_api.c
+++ b/CORE/WDI/WPAL/src/wlan_qct_pal_api.c
@@ -376,3 +376,17 @@
     }
     return eWLAN_PAL_STATUS_E_FAILURE;
 }
+
+/*---------------------------------------------------------------------------
+    wpalWlanReload -  Initiate WLAN Driver reload
+
+    Param:
+       None
+    Return:
+       NONE
+---------------------------------------------------------------------------*/
+void wpalWlanReload(void)
+{
+   vos_wlanRestart();
+   return;
+}
\ No newline at end of file
diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_device.c b/CORE/WDI/WPAL/src/wlan_qct_pal_device.c
index f37200d..c846fea 100644
--- a/CORE/WDI/WPAL/src/wlan_qct_pal_device.c
+++ b/CORE/WDI/WPAL/src/wlan_qct_pal_device.c
@@ -67,9 +67,12 @@
  * Preprocessor Definitions and Constants
  * -------------------------------------------------------------------------*/
 
-// address in the 8960 physical memory map
+// address in the Host physical memory map
+#ifdef WCN_PRONTO
+#define WCNSS_BASE_ADDRESS 0xFB000000
+#else
 #define WCNSS_BASE_ADDRESS 0x03000000
-
+#endif
 /*----------------------------------------------------------------------------
  * Type Declarations
  * -------------------------------------------------------------------------*/
diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c b/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c
index 5391b91..98916ac 100644
--- a/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c
+++ b/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c
@@ -161,8 +161,6 @@
       else
       {
         wpalPacketAvailableCB = rxLowCB;
-        WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR,
-                    "Failed to allocate packet : %d ", (int)vosStatus);
       }
 #endif /* FEATURE_R33D */
       break;
diff --git a/Makefile b/Makefile
index 87c3eb9..5fbe151 100644
--- a/Makefile
+++ b/Makefile
@@ -72,7 +72,7 @@
 		$(HDD_SRC_DIR)/wlan_hdd_early_suspend.o \
 		$(HDD_SRC_DIR)/wlan_hdd_ftm.o \
 		$(HDD_SRC_DIR)/wlan_hdd_hostapd.o \
-		$(HDD_SRC_DIR)/wlan_hdd_innav.o \
+		$(HDD_SRC_DIR)/wlan_hdd_oemdata.o \
 		$(HDD_SRC_DIR)/wlan_hdd_main.o \
 		$(HDD_SRC_DIR)/wlan_hdd_mib.o \
 		$(HDD_SRC_DIR)/wlan_hdd_scan.o \
@@ -217,7 +217,7 @@
 
 SME_BTC_OBJS := $(SME_SRC_DIR)/btc/btcApi.o
 
-SME_MEAS_OBJS := $(SME_SRC_DIR)/meas/measApi.o
+SME_OEM_DATA_OBJS := $(SME_SRC_DIR)/oemData/oemDataApi.o
 
 SME_P2P_OBJS = $(SME_SRC_DIR)/p2p/p2p_Api.o
 
@@ -227,7 +227,7 @@
 		$(SME_CCM_OBJS) \
 		$(SME_CMN_OBJS) \
 		$(SME_CSR_OBJS) \
-		$(SME_MEAS_OBJS) \
+		$(SME_OEM_DATA_OBJS) \
 		$(SME_P2P_OBJS) \
 		$(SME_PMC_OBJS) \
 		$(SME_QOS_OBJS) \
@@ -470,6 +470,7 @@
 		-DWLAN_FEATURE_NEIGHBOR_ROAMING_DEBUG \
 		-DWLAN_FEATURE_VOWIFI_11R_DEBUG \
 		-DFEATURE_WLAN_WAPI \
+		-DFEATURE_OEM_DATA_SUPPORT \
 		-DSOFTAP_CHANNEL_RANGE \
 		-DWLAN_AP_STA_CONCURRENCY \
 		-DFEATURE_WLAN_SCAN_PNO \
@@ -524,6 +525,10 @@
 CDEFINES += -DWLAN_BTAMP_FEATURE
 endif
 
+CDEFINES += -DWLAN_FEATURE_11AC
+
+CDEFINES += -DWLAN_OPEN_SOURCE
+
 KBUILD_CPPFLAGS += $(CDEFINES)
 
 
diff --git a/firmware_bin/WCNSS_cfg.dat b/firmware_bin/WCNSS_cfg.dat
index 7f31c62..3364845 100644
--- a/firmware_bin/WCNSS_cfg.dat
+++ b/firmware_bin/WCNSS_cfg.dat
Binary files differ
diff --git a/firmware_bin/WCNSS_qcom_cfg.ini b/firmware_bin/WCNSS_qcom_cfg.ini
index 4a867da..cb32d0e 100644
--- a/firmware_bin/WCNSS_qcom_cfg.ini
+++ b/firmware_bin/WCNSS_qcom_cfg.ini
@@ -1,98 +1,157 @@
 # This file allows user to override the factory
+
 # defaults for the WLAN Driver
 
+
 # Enable IMPS or not
 gEnableImps=1
 
 # Enable/Disable Idle Scan
+
 gEnableIdleScan=0
 
+
 # Increase sleep duration (seconds) during IMPS
 # 0 implies no periodic wake up from IMPS. Periodic wakeup is 
 # unnecessary if Idle Scan is disabled.
 gImpsModSleepTime=0
 
+
 # Enable BMPS or not
 gEnableBmps=1
 
 # Enable suspend or not
+
 # 1: Enable standby, 2: Enable Deep sleep, 3: Enable Mcast/Bcast Filter
+
 gEnableSuspend=3
 
+
 # Phy Mode (auto, b, g, n, etc)
+# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac
 gDot11Mode=0
 
+
 # Handoff Enable(1) Disable(0)
+
 gEnableHandoff=0
 
+
 # CSR Roaming Enable(1) Disable(0)
+
 gRoamingTime=0
 
+
 # Assigned MAC Addresses - This will be used until NV items are in place
+
 # Each byte of MAC address is represented in Hex format as XX
+
 Intf0MacAddress=000AF58989FF
 Intf1MacAddress=000AF58989FE
 Intf2MacAddress=000AF58989FD
+
 Intf3MacAddress=000AF58989FC
 
+
 # UAPSD service interval for VO,VI, BE, BK traffic
+
 InfraUapsdVoSrvIntv=0
+
 InfraUapsdViSrvIntv=0
+
 InfraUapsdBeSrvIntv=0
+
 InfraUapsdBkSrvIntv=0
 
+
 # Disable RSSI FW filtering
+
 gEnableFWRssiMonitoring=0
 
+
 # Make 1x1 the default antenna configuration
+
 gNumRxAnt=1
 
+
 # Beacon filtering frequency (unit in beacon intervals)
+
 gNthBeaconFilter=50
 
+
 # Enable WAPI or not
+
 # WAPIIsEnabled=0
 
+
 # Flags to filter Mcast abd Bcast RX packets.
+
 # Value 0: No filtering, 1: Filter all Multicast.
+
 # 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast
+
 McastBcastFilter=3
 
+
 #Flag to enable HostARPOffload feature or not
+
 hostArpOffload=0
 
+
 #SoftAP Related Parameters
+
 # AP MAc addr
-gAPMacAddr=000AF58989EF
+
+gAPMacAddr=000AF589dcab
+
 
 # 802.11n Protection flag
+
 gEnableApProt=1
 
+
 #Enable OBSS protection
+
 gEnableApOBSSProt=0
 
+
 #Enable/Disable UAPSD for SoftAP
-gEnableApUapsd=1
+
+gEnableApUapsd=0
+
 
 # Fixed Rate
+
 gFixedRate=0
 
+
 # Maximum Tx power
+
 # gTxPowerCap=30
 
+
 # Fragmentation Threshold
+
 # gFragmentationThreshold=2346
 
+
 # RTS threshold
+
 RTSThreshold=2347
 
+
 # Intra-BSS forward
+
 gDisableIntraBssFwd=0
 
+
 # WMM Enable/Disable
+
 WmmIsEnabled=0
 
+
 # 802.11d support
+
 g11dSupportEnabled=1
 
 # CCX Support and fast transition
@@ -117,83 +176,162 @@
 #Check if the AP to which we are roaming is better than current AP in terms of RSSI.
 #Checking is disabled if set to Zero.Otherwise it will use this value as to how better 
 #the RSSI of the new/roamable AP should be for roaming
-RoamRssiDiff=0
+RoamRssiDiff=5
 
 # SAP Country code
+
 # Default Country Code is 2 bytes, 3rd byte is optional indoor or out door.
+
 # Example
+
 #   US Indoor, USI
+
 #   Korea Outdoor, KRO
+
 #   Japan without optional byte, JP
+
 #   France without optional byte, FR
+
 #gAPCntryCode=USI
 
+
 #Short Guard Interval Enable/disable
+
 gShortGI20Mhz=1
+
 gShortGI40Mhz=1
 
+
 #Auto Shutdown  Value in seconds. A value of 0 means Auto shutoff is disabled
+
 gAPAutoShutOff=0
 
+
 # SAP auto channel selection configuration
+
 # 0 = disable auto channel selection
+
 # 1 = enable auto channel selection, channel provided by supplicant will be ignored
+
 gApAutoChannelSelection=0
 
+
 # Listen Energy Detect Mode Configuration
+
 # Valid values 0-128
+
 # 128 means disable Energy Detect feature
+
 # 0-9 are threshold code and 7 is recommended value from system if feature is to be enabled.
+
 # 10-128 are reserved.
+
 # The EDET threshold mapping is as follows in 3dB step:
+
 # 0 = -60 dBm
+
 # 1 = -63 dBm
+
 # 2 = -66 dBm
+
 # ...
+
 # 7 = -81 dBm
+
 # 8 = -84 dBm
+
 # 9 = -87 dBm
+
 # Note: Any of these settings are valid. Setting 0 would yield the highest power saving (in a noisy environment) at the cost of more range. The range impact is approximately #calculated as:
+
 #
+
 #  Range Loss  (dB)  =  EDET threshold level (dBm) + 97 dBm.
+
 #
+
 gEnablePhyAgcListenMode=128
 
+
 #Preferred channel to start BT AMP AP mode (0 means, any channel)
+
 BtAmpPreferredChannel=0
 
+
 #Preferred band (both or 2.4 only or 5 only)
+
 BandCapability=0
 
+
 #Beacon Early Termination (1 = enable the BET feature, 0 = disable)
+
 enableBeaconEarlyTermination=0
+
 beaconEarlyTerminationWakeInterval=3
 
+
 #Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable)
+
 gEnableBtAmp=0
 
+
 #SOFTAP Channel Range selection 
+
 gAPChannelSelectStartChannel=1
+
 gAPChannelSelectEndChannel=11
 
+
 #SOFTAP Channel Range selection Operating band
+
 # 0:2.4GHZ 1: LOW-5GHZ 2:MID-5GHZ 3:HIGH-5GHZ 4: 4.9HZ BAND
+
 gAPChannelSelectOperatingBand=0
 
+
+#Channel Bonding
+gChannelBondingMode5GHz=6
+
+
 #Enable Keep alive with non-zero period value
+
 #gStaKeepAlivePeriod = 30
 
+
 #If set will start with active scan after driver load, otherwise will start with
+
 #passive scan to find out the domain
-gEnableBypass11d=1
+
+#gEnableBypass11d=1
+
 
 #If set to 0, will not scan DFS channels
+
 gEnableDFSChnlScan=1
 
-# Enable logp/SSR
+
+gVhtChannelWidth=2
 gEnableLogp=1
 
+
 # Enable Automatic Tx Power control
+
 gEnableAutomaticTxPowerControl=1
+
+# 0 for OLPC 1 for CLPC and SCPC
+gEnableCloseLoop=1
+
+#Data Inactivity Timeout when in powersave (in ms)
+gDataInactivityTimeout=200
+
+# VHT Tx/Rx MCS values
+# Valid values are 0,1,2. If commented out, the default value is 0.
+# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9
+gVhtRxMCS=2
+gVhtTxMCS=2
+
+
 END
+
 # Note: Configuration parser would not read anything past the END marker
+
diff --git a/firmware_bin/WCNSS_qcom_wlan_nv.bin b/firmware_bin/WCNSS_qcom_wlan_nv.bin
index 557f8a8..e946dec 100644
--- a/firmware_bin/WCNSS_qcom_wlan_nv.bin
+++ b/firmware_bin/WCNSS_qcom_wlan_nv.bin
Binary files differ
diff --git a/riva/inc/wlan_hal_msg.h b/riva/inc/wlan_hal_msg.h
index 336cad0..4234c32 100644
--- a/riva/inc/wlan_hal_msg.h
+++ b/riva/inc/wlan_hal_msg.h
@@ -27,7 +27,7 @@
  *
  *  @author:   Kumar Anand
  *
- *             Copyright (C) 2010, Qualcomm, Inc. 
+ *             Copyright (C) 2010, Qualcomm, Inc.
  *             All rights reserved.
  *
  *=========================================================================*/
@@ -39,7 +39,6 @@
 #include "halCompiler.h"
 #include "wlan_qct_dev_defs.h"
 #include "wlan_nv.h"
-
 /*---------------------------------------------------------------------------
   API VERSIONING INFORMATION
 
@@ -54,8 +53,8 @@
       or if a new API is added
   All values are in the range 0..255 (ie they are 8-bit values)
  ---------------------------------------------------------------------------*/
-#define WLAN_HAL_VER_MAJOR 0
-#define WLAN_HAL_VER_MINOR 1
+#define WLAN_HAL_VER_MAJOR 1
+#define WLAN_HAL_VER_MINOR 3
 #define WLAN_HAL_VER_VERSION 1
 #define WLAN_HAL_VER_REVISION 0
 
@@ -65,6 +64,7 @@
 
 //This is to force compiler to use the maximum of an int ( 4 bytes )
 #define WLAN_HAL_MAX_ENUM_SIZE    0x7FFFFFFF
+#define WLAN_HAL_MSG_TYPE_MAX_ENUM_SIZE    0x7FFF
 
 //Max no. of transmit categories
 #define STACFG_MAX_TC    8
@@ -82,9 +82,9 @@
 #define WLAN_HAL_BSS_INVALID_IDX 0xFF
 
 //Default Beacon template size
-#define BEACON_TEMPLATE_SIZE 0x180 
+#define BEACON_TEMPLATE_SIZE 0x180
 
-//Param Change Bitmap sent to HAL 
+//Param Change Bitmap sent to HAL
 #define PARAM_BCN_INTERVAL_CHANGED                      (1 << 0)
 #define PARAM_SHORT_PREAMBLE_CHANGED                 (1 << 1)
 #define PARAM_SHORT_SLOT_TIME_CHANGED                 (1 << 2)
@@ -105,11 +105,8 @@
 /*Version string max length (including NUL) */
 #define WLAN_HAL_VERSION_LENGTH  64
 
-/*Max Num Of BSSIDS in INNAV_MEAS_REQ*/
-#define MAX_BSSIDS_IN_INNAV_MEAS_REQ 1
-
 /* Message types for messages exchanged between WDI and HAL */
-typedef enum 
+typedef enum
 {
    //Init/De-Init
    WLAN_HAL_START_REQ = 0,
@@ -179,7 +176,7 @@
    WLAN_HAL_MIC_FAILURE_IND             = 52,
    WLAN_HAL_FATAL_ERROR_IND             = 53,
    WLAN_HAL_SET_KEYDONE_MSG             = 54,
-   
+
    //NV Interface
    WLAN_HAL_DOWNLOAD_NV_REQ             = 55,
    WLAN_HAL_DOWNLOAD_NV_RSP             = 56,
@@ -198,11 +195,11 @@
    WLAN_HAL_DELETE_STA_CONTEXT_IND         = 67,
    WLAN_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ  = 68,
    WLAN_HAL_UPDATE_PROBE_RSP_TEMPLATE_RSP  = 69,
-   
+
   // PTT interface support
    WLAN_HAL_PROCESS_PTT_REQ   = 70,
    WLAN_HAL_PROCESS_PTT_RSP   = 71,
-   
+
    // BTAMP related events
    WLAN_HAL_SIGNAL_BTAMP_EVENT_REQ  = 72,
    WLAN_HAL_SIGNAL_BTAMP_EVENT_RSP  = 73,
@@ -261,14 +258,14 @@
    //P2P  WLAN_FEATURE_P2P
    WLAN_HAL_SET_P2P_GONOA_REQ      = 119,
    WLAN_HAL_SET_P2P_GONOA_RSP      = 120,
-   
+
    //WLAN Dump commands
    WLAN_HAL_DUMP_COMMAND_REQ       = 121,
    WLAN_HAL_DUMP_COMMAND_RSP       = 122,
 
-   //INNAV FEATURE SUPPORT
-   WLAN_HAL_START_INNAV_MEAS_REQ   = 123,
-   WLAN_HAL_START_INNAV_MEAS_RSP   = 124,
+   //OEM_DATA FEATURE SUPPORT
+   WLAN_HAL_START_OEM_DATA_REQ   = 123,
+   WLAN_HAL_START_OEM_DATA_RSP   = 124,
 
    //ADD SELF STA REQ and RSP
    WLAN_HAL_ADD_STA_SELF_REQ       = 125,
@@ -281,7 +278,7 @@
    // Coex Indication
    WLAN_HAL_COEX_IND               = 129,
 
-   // Tx Complete Indication 
+   // Tx Complete Indication
    WLAN_HAL_OTA_TX_COMPL_IND       = 130,
 
    //Host Suspend/resume messages
@@ -295,7 +292,7 @@
    WLAN_HAL_GET_TX_POWER_RSP       = 137,
 
    WLAN_HAL_P2P_NOA_ATTR_IND       = 138,
-   
+
    WLAN_HAL_ENABLE_RADAR_DETECT_REQ  = 139,
    WLAN_HAL_ENABLE_RADAR_DETECT_RSP  = 140,
    WLAN_HAL_GET_TPC_REPORT_REQ       = 141,
@@ -303,7 +300,7 @@
    WLAN_HAL_RADAR_DETECT_IND         = 143,
    WLAN_HAL_RADAR_DETECT_INTR_IND    = 144,
    WLAN_HAL_KEEP_ALIVE_REQ           = 145,
-   WLAN_HAL_KEEP_ALIVE_RSP           = 146,      
+   WLAN_HAL_KEEP_ALIVE_RSP           = 146,
 
    /*PNO messages*/
    WLAN_HAL_SET_PREF_NETWORK_REQ     = 147,
@@ -312,25 +309,25 @@
    WLAN_HAL_SET_RSSI_FILTER_RSP      = 150,
    WLAN_HAL_UPDATE_SCAN_PARAM_REQ    = 151,
    WLAN_HAL_UPDATE_SCAN_PARAM_RSP    = 152,
-   WLAN_HAL_PREF_NETW_FOUND_IND      = 153, 
+   WLAN_HAL_PREF_NETW_FOUND_IND      = 153,
 
    WLAN_HAL_SET_TX_PER_TRACKING_REQ  = 154,
    WLAN_HAL_SET_TX_PER_TRACKING_RSP  = 155,
    WLAN_HAL_TX_PER_HIT_IND           = 156,
-   
+
    WLAN_HAL_8023_MULTICAST_LIST_REQ   = 157,
-   WLAN_HAL_8023_MULTICAST_LIST_RSP   = 158,   
+   WLAN_HAL_8023_MULTICAST_LIST_RSP   = 158,
 
    WLAN_HAL_SET_PACKET_FILTER_REQ     = 159,
-   WLAN_HAL_SET_PACKET_FILTER_RSP     = 160,   
+   WLAN_HAL_SET_PACKET_FILTER_RSP     = 160,
    WLAN_HAL_PACKET_FILTER_MATCH_COUNT_REQ   = 161,
-   WLAN_HAL_PACKET_FILTER_MATCH_COUNT_RSP   = 162,   
+   WLAN_HAL_PACKET_FILTER_MATCH_COUNT_RSP   = 162,
    WLAN_HAL_CLEAR_PACKET_FILTER_REQ         = 163,
-   WLAN_HAL_CLEAR_PACKET_FILTER_RSP         = 164,  
-   /*This is temp fix. Should be removed once 
+   WLAN_HAL_CLEAR_PACKET_FILTER_RSP         = 164,
+   /*This is temp fix. Should be removed once
     * Host and Riva code is in sync*/
    WLAN_HAL_INIT_SCAN_CON_REQ               = 165,
-    
+
    WLAN_HAL_SET_POWER_PARAMS_REQ            = 166,
    WLAN_HAL_SET_POWER_PARAMS_RSP            = 167,
 
@@ -339,7 +336,7 @@
 
    // wake reason indication (WOW)
    WLAN_HAL_WAKE_REASON_IND                 = 170,
-   // GTK offload support 
+   // GTK offload support
    WLAN_HAL_GTK_OFFLOAD_REQ                 = 171,
    WLAN_HAL_GTK_OFFLOAD_RSP                 = 172,
    WLAN_HAL_GTK_OFFLOAD_GETINFO_REQ         = 173,
@@ -352,11 +349,19 @@
    WLAN_HAL_SET_THERMAL_MITIGATION_REQ      = 178,
    WLAN_HAL_SET_THERMAL_MITIGATION_RSP      = 179,
 
-   WLAN_HAL_MSG_MAX = WLAN_HAL_MAX_ENUM_SIZE
+  WLAN_HAL_MSG_MAX = WLAN_HAL_MSG_TYPE_MAX_ENUM_SIZE
 }tHalHostMsgType;
 
+/* Enumeration for Version */
+typedef enum
+{
+   WLAN_HAL_MSG_VERSION0 = 0,
+   WLAN_HAL_MSG_VERSION1 = 1,
+   WLAN_HAL_MSG_VERSION_MAX_FIELD = 0x7FFF /*define as 2 bytes data*/
+}tHalHostMsgVersion;
+
 /* Enumeration for Boolean - False/True, On/Off */
-typedef enum tagAniBoolean 
+typedef enum tagAniBoolean
 {
     eANI_BOOLEAN_FALSE = 0,
     eANI_BOOLEAN_TRUE,
@@ -397,6 +402,15 @@
     PHY_DOUBLE_CHANNEL_LOW_PRIMARY = 1,  // 40MHz IF bandwidth with lower 20MHz supporting the primary channel
     PHY_DOUBLE_CHANNEL_CENTERED = 2,     // 40MHz IF bandwidth centered on IF carrier
     PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3, // 40MHz IF bandwidth with higher 20MHz supporting the primary channel
+#ifdef WLAN_FEATURE_11AC
+    PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED = 4, //20/40MHZ offset LOW 40/80MHZ offset CENTERED
+    PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED = 5, //20/40MHZ offset CENTERED 40/80MHZ offset CENTERED
+    PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED = 6, //20/40MHZ offset HIGH 40/80MHZ offset CENTERED
+    PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW = 7,//20/40MHZ offset LOW 40/80MHZ offset LOW
+    PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW = 8, //20/40MHZ offset HIGH 40/80MHZ offset LOW
+    PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH = 9, //20/40MHZ offset LOW 40/80MHZ offset HIGH
+    PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH = 10,//20/40MHZ offset-HIGH 40/80MHZ offset HIGH
+#endif
     PHY_CHANNEL_BONDING_STATE_MAX = WLAN_HAL_MAX_ENUM_SIZE
 }ePhyChanBondState;
 
@@ -419,6 +433,9 @@
     eSTA_11bg,
     eSTA_11a,
     eSTA_11n,
+#ifdef WLAN_FEATURE_11AC
+    eSTA_11ac,
+#endif
     eSTA_INVALID_RATE_MODE = WLAN_HAL_MAX_ENUM_SIZE
 } tStaRateMode, *tpStaRateMode;
 
@@ -462,14 +479,6 @@
   eSIR_HT_OP_MODE_MAX = WLAN_HAL_MAX_ENUM_SIZE
 } tSirMacHTOperatingMode;
 
-typedef enum eSirMacHTSecondaryChannelOffset
-{
-    eHT_SECONDARY_CHANNEL_OFFSET_NONE = 0,
-    eHT_SECONDARY_CHANNEL_OFFSET_UP = 1,
-    eHT_SECONDARY_CHANNEL_OFFSET_DOWN = 3,
-    eHT_SECONDARY_CHANNEL_OFFSET_MAX = WLAN_HAL_MAX_ENUM_SIZE
-} tSirMacHTSecondaryChannelOffset;
-
 /// Encryption type enum used with peer
 typedef enum eAniEdType
 {
@@ -523,7 +532,7 @@
     eSIR_LINK_BTAMP_POSTASSOC_STATE  = 6,
     eSIR_LINK_BTAMP_AP_STATE  = 7,
     eSIR_LINK_BTAMP_STA_STATE  = 8,
-    
+
     /* Reserved for HAL Internal Use */
     eSIR_LINK_LEARN_STATE       = 9,
     eSIR_LINK_SCAN_STATE        = 10,
@@ -547,7 +556,7 @@
 }eHalStatsMask;
 
 /* BT-AMP events type */
-typedef enum 
+typedef enum
 {
     BTAMP_EVENT_CONNECTION_START,
     BTAMP_EVENT_CONNECTION_STOP,
@@ -613,18 +622,18 @@
     tAniEdType      encType;
 
     /*STATIC/DYNAMIC - valid only for WEP*/
-    tAniWepType     wepType; 
+    tAniWepType     wepType;
 
     /*Default WEP key, valid only for static WEP, must between 0 and 3.*/
     tANI_U8         defWEPIdx;
 
 #ifdef WLAN_SOFTAP_FEATURE
     /* valid only for non-static WEP encyrptions */
-    tSirKeys        key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];            
+    tSirKeys        key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
 #else
     tSirKeys        key;
 #endif
-  
+
     /*Control for Replay Count, 1= Single TID based replay count on Tx
       0 = Per TID based replay count on TX */
     tANI_U8         singleTidRc;
@@ -636,7 +645,8 @@
 /* 4-byte control message header used by HAL*/
 typedef PACKED_PRE struct PACKED_POST
 {
-   tHalHostMsgType  msgType;
+   tHalHostMsgType  msgType:16;
+   tHalHostMsgVersion msgVersion:16;
    tANI_U32         msgLen;
 } tHalMsgHeader, *tpHalMsgHeader;
 
@@ -647,7 +657,7 @@
     * in shared header file between UMAC and HAL.*/
    tANI_U16   uCfgId;
 
-   /* Length of the Cfg. This parameter is used to go to next cfg 
+   /* Length of the Cfg. This parameter is used to go to next cfg
     * in the TLV format.*/
    tANI_U16   uCfgLen;
 
@@ -673,8 +683,8 @@
     /*Length of the config buffer*/
     tANI_U32  uConfigBufferLen;
 
-    /* Following this there is a TLV formatted buffer of length 
-     * "uConfigBufferLen" bytes containing all config values. 
+    /* Following this there is a TLV formatted buffer of length
+     * "uConfigBufferLen" bytes containing all config values.
      * The TLV is expected to be formatted like this:
      * 0           15            31           31+CFG_LEN-1        length-1
      * |   CFG_ID   |   CFG_LEN   |   CFG_BODY    |  CFG_ID  |......|
@@ -764,8 +774,8 @@
     /* Length of the config buffer. Allows UMAC to update multiple CFGs */
     tANI_U32  uConfigBufferLen;
 
-    /* Following this there is a TLV formatted buffer of length 
-     * "uConfigBufferLen" bytes containing all config values. 
+    /* Following this there is a TLV formatted buffer of length
+     * "uConfigBufferLen" bytes containing all config values.
      * The TLV is expected to be formatted like this:
      * 0           15            31           31+CFG_LEN-1        length-1
      * |   CFG_ID   |   CFG_LEN   |   CFG_BODY    |  CFG_ID  |......|
@@ -888,7 +898,7 @@
       frameType.*/
     tANI_U8 frameLength;
 
-    /* Following the framelength there is a MAC frame buffer if frameLength 
+    /* Following the framelength there is a MAC frame buffer if frameLength
        is non-zero. */
     tSirMacMgmtHdr macMgmtHdr;
 
@@ -925,7 +935,7 @@
       frameType.*/
     tANI_U8 frameLength;
 
-    /* Following the framelength there is a MAC frame buffer if frameLength 
+    /* Following the framelength there is a MAC frame buffer if frameLength
        is non-zero. */
     tSirMacMgmtHdr macMgmtHdr;
 
@@ -968,7 +978,7 @@
   WLAN_HAL_START_SCAN_REQ
 ---------------------------------------------------------------------------*/
 
-typedef PACKED_PRE struct PACKED_POST 
+typedef PACKED_PRE struct PACKED_POST
 {
    /*Indicates the channel to scan*/
    tANI_U8 scanChannel;
@@ -1069,9 +1079,9 @@
       macMgmtHdr. If zero, HAL will generate the appropriate MAC frame based on
       frameType.*/
     tANI_U8 frameLength;
-    
-    /*Following the framelength there is a MAC frame buffer if frameLength 
-      is non-zero.*/    
+
+    /*Following the framelength there is a MAC frame buffer if frameLength
+      is non-zero.*/
     tSirMacMgmtHdr macMgmtHdr;
 
     /*Entry to hold number of active BSS idx's*/
@@ -1179,7 +1189,7 @@
     /*RIFS mode 0 - NA, 1 - Allowed */
     tANI_U8 rifsMode;
 
-    /*L-SIG TXOP Protection mechanism 
+    /*L-SIG TXOP Protection mechanism
       0 - No Support, 1 - Supported
       SG - there is global field */
     tANI_U8 lsigTxopProtection;
@@ -1200,16 +1210,13 @@
     /*Short GI support for 20Mhz packets*/
     tANI_U8 fShortGI20Mhz;
 
-    /*These rates are the intersection of peer and self capabilities.*/
-    tSirSupportedRates supportedRates;
-
     /*Robust Management Frame (RMF) enabled/disabled*/
     tANI_U8 rmfEnabled;
 
     /* The unicast encryption type in the association */
     tANI_U32 encryptType;
-    
-    /*HAL should update the existing STA entry, if this flag is set. UMAC 
+
+    /*HAL should update the existing STA entry, if this flag is set. UMAC
       will set this flag in case of RE-ASSOC, where we want to reuse the old
       STA ID. 0 = Add, 1 = Update*/
     tANI_U8 action;
@@ -1231,10 +1238,10 @@
 
     /*Delayed BA Support*/
     tANI_U8 delayedBASupport;
-    
+
     /*Max AMPDU duration in 32us*/
     tANI_U8 us32MaxAmpduDuration;
-    
+
     /*HT STA should set it to 1 if it is enabled in BSS. HT STA should set
       it to 0 if AP does not support it. This indication is sent to HAL and
       HAL uses this flag to pickup up appropriate 40Mhz rates.*/
@@ -1250,12 +1257,190 @@
 
     tANI_U8  p2pCapableSta;
 
+    /*Reserved to align next field on a dword boundary*/
+    tANI_U8  reserved;
+
+    /*These rates are the intersection of peer and self capabilities.*/
+    tSirSupportedRates supportedRates;
+
 } tConfigStaParams, *tpConfigStaParams;
 
+/*------------------------------------------------------------------------
+ * WLAN_HAL_CONFIG_STA_REQ
+ * ----------------------------------------------------------------------*/
+
+typedef PACKED_PRE struct PACKED_POST {
+    /*
+    * For Self STA Entry: this represents Self Mode.
+    * For Peer Stations, this represents the mode of the peer.
+    * On Station:
+    * --this mode is updated when PE adds the Self Entry.
+    * -- OR when PE sends 'ADD_BSS' message and station context in BSS is used to indicate the mode of the AP.
+    * ON AP:
+    * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry for that BSS is used
+    *     to indicate the self mode of the AP.
+    * -- OR when a station is associated, PE sends 'ADD_STA' message with this mode updated.
+    */
+
+    tStaRateMode        opRateMode;
+    // 11b, 11a and aniLegacyRates are IE rates which gives rate in unit of 500Kbps
+    tANI_U16             llbRates[SIR_NUM_11B_RATES];
+    tANI_U16             llaRates[SIR_NUM_11A_RATES];
+    tANI_U16             aniLegacyRates[SIR_NUM_POLARIS_RATES];
+    tANI_U16             reserved;
+
+    //Taurus only supports 26 Titan Rates(no ESF/concat Rates will be supported)
+    //First 26 bits are reserved for those Titan rates and
+    //the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are reserved.
+    tANI_U32             aniEnhancedRateBitmap; //Titan and Taurus Rates
+
+    /*
+    * 0-76 bits used, remaining reserved
+    * bits 0-15 and 32 should be set.
+    */
+    tANI_U8 supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET];
+
+    /*
+     * RX Highest Supported Data Rate defines the highest data
+     * rate that the STA is able to receive, in unites of 1Mbps.
+     * This value is derived from "Supported MCS Set field" inside
+     * the HT capability element.
+     */
+    tANI_U16 rxHighestDataRate;
+
+    /* Indicates the Maximum MCS that can be received for each number
+        * of spacial streams */
+    tANI_U16 vhtRxMCSMap;
+
+    /*Indicate the highest VHT data rate that the STA is able to receive*/
+    tANI_U16 vhtRxHighestDataRate;
+
+    /* Indicates the Maximum MCS that can be transmitted  for each number
+         * of spacial streams */
+    tANI_U16 vhtTxMCSMap;
+
+    /*Indicate the highest VHT data rate that the STA is able to transmit*/
+    tANI_U16 vhtTxHighestDataRate;
+
+} tSirSupportedRates_V1, *tpSirSupportedRates_V1;
+
+typedef PACKED_PRE struct PACKED_POST
+{
+    /*BSSID of STA*/
+    tSirMacAddr bssId;
+
+    /*ASSOC ID, as assigned by UMAC*/
+    tANI_U16 assocId;
+
+    /* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
+    tANI_U8 staType;
+
+    /*Short Preamble Supported.*/
+    tANI_U8 shortPreambleSupported;
+
+    /*MAC Address of STA*/
+    tSirMacAddr staMac;
+
+    /*Listen interval of the STA*/
+    tANI_U16 listenInterval;
+
+    /*Support for 11e/WMM*/
+    tANI_U8 wmmEnabled;
+
+    /*11n HT capable STA*/
+    tANI_U8 htCapable;
+
+    /*TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz*/
+    tANI_U8 txChannelWidthSet;
+
+    /*RIFS mode 0 - NA, 1 - Allowed */
+    tANI_U8 rifsMode;
+
+    /*L-SIG TXOP Protection mechanism
+      0 - No Support, 1 - Supported
+      SG - there is global field */
+    tANI_U8 lsigTxopProtection;
+
+    /*Max Ampdu Size supported by STA. TPE programming.
+      0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
+    tANI_U8 maxAmpduSize;
+
+    /*Max Ampdu density. Used by RA.  3 : 0~7 : 2^(11nAMPDUdensity -4)*/
+    tANI_U8 maxAmpduDensity;
+
+    /*Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes*/
+    tANI_U8 maxAmsduSize;
+
+    /*Short GI support for 40Mhz packets*/
+    tANI_U8 fShortGI40Mhz;
+
+    /*Short GI support for 20Mhz packets*/
+    tANI_U8 fShortGI20Mhz;
+
+    /*Robust Management Frame (RMF) enabled/disabled*/
+    tANI_U8 rmfEnabled;
+
+    /* The unicast encryption type in the association */
+    tANI_U32 encryptType;
+
+    /*HAL should update the existing STA entry, if this flag is set. UMAC
+      will set this flag in case of RE-ASSOC, where we want to reuse the old
+      STA ID. 0 = Add, 1 = Update*/
+    tANI_U8 action;
+
+    /*U-APSD Flags: 1b per AC.  Encoded as follows:
+       b7 b6 b5 b4 b3 b2 b1 b0 =
+       X  X  X  X  BE BK VI VO */
+    tANI_U8 uAPSD;
+
+    /*Max SP Length*/
+    tANI_U8 maxSPLen;
+
+    /*11n Green Field preamble support
+      0 - Not supported, 1 - Supported */
+    tANI_U8 greenFieldCapable;
+
+    /*MIMO Power Save mode*/
+    tSirMacHTMIMOPowerSaveState mimoPS;
+
+    /*Delayed BA Support*/
+    tANI_U8 delayedBASupport;
+
+    /*Max AMPDU duration in 32us*/
+    tANI_U8 us32MaxAmpduDuration;
+
+    /*HT STA should set it to 1 if it is enabled in BSS. HT STA should set
+      it to 0 if AP does not support it. This indication is sent to HAL and
+      HAL uses this flag to pickup up appropriate 40Mhz rates.*/
+    tANI_U8 fDsssCckMode40Mhz;
+
+    /* Valid STA Idx when action=Update. Set to 0xFF when invalid!
+       Retained for backward compalibity with existing HAL code*/
+    tANI_U8 staIdx;
+
+    /* BSSID of BSS to which station is associated. Set to 0xFF when invalid.
+       Retained for backward compalibity with existing HAL code*/
+    tANI_U8 bssIdx;
+
+    tANI_U8  p2pCapableSta;
+
+    /*Reserved to align next field on a dword boundary*/
+    tANI_U8  reserved;
+        /*These rates are the intersection of peer and self capabilities.*/
+    tSirSupportedRates_V1 supportedRates;
+
+    tANI_U8  vhtCapable;
+    tANI_U8  vhtTxChannelWidthSet;
+
+} tConfigStaParams_V1, *tpConfigStaParams_V1;
+
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader header;
+   PACKED_PRE union PACKED_POST {
    tConfigStaParams configStaParams;
+    tConfigStaParams_V1 configStaParams_V1;
+   } uStaParams;
 }  tConfigStaReqMsg, *tpConfigStaReqMsg;
 
 /*---------------------------------------------------------------------------
@@ -1276,7 +1461,7 @@
   /* DPU Index for PTK */
   tANI_U8 dpuIndex;
 
-  /* DPU Index for GTK */  
+  /* DPU Index for GTK */
   tANI_U8 bcastDpuIndex;
 
   /*DPU Index for IGTK  */
@@ -1306,7 +1491,7 @@
 ---------------------------------------------------------------------------*/
 
 /* Delete STA Request params */
-typedef PACKED_PRE struct PACKED_POST 
+typedef PACKED_PRE struct PACKED_POST
 {
    /* Index of STA to delete */
    tANI_U8    staIdx;
@@ -1324,7 +1509,7 @@
 ---------------------------------------------------------------------------*/
 
 /* Delete STA Response Params */
-typedef PACKED_PRE struct PACKED_POST 
+typedef PACKED_PRE struct PACKED_POST
 {
    /*success or failure */
    tANI_U32   status;
@@ -1396,8 +1581,8 @@
 // Concurrency role.  These are generic IDs that identify the various roles
 // in the software system.
 typedef enum {
-    HAL_STA_MODE=0, 
-    HAL_STA_SAP_MODE=1, // to support softAp mode . This is misleading. It means AP MODE only. 
+    HAL_STA_MODE=0,
+    HAL_STA_SAP_MODE=1, // to support softAp mode . This is misleading. It means AP MODE only.
     HAL_P2P_CLIENT_MODE,
     HAL_P2P_GO_MODE,
     HAL_MONITOR_MODE,
@@ -1410,7 +1595,7 @@
 //bit 3 - p2p go mode
 typedef enum
 {
-    HAL_STA=1, 
+    HAL_STA=1,
     HAL_SAP=2,
     HAL_STA_SAP=3, //to support sta, softAp  mode . This means STA+AP mode
     HAL_P2P_CLIENT=4,
@@ -1479,11 +1664,142 @@
     /*Reserved to align next field on a dword boundary*/
     tANI_U8 reserved;
 
+    /*SSID of the BSS*/
+    tSirMacSSid ssId;
+
+    /*HAL should update the existing BSS entry, if this flag is set.
+      UMAC will set this flag in case of reassoc, where we want to resue the
+      the old BSSID and still return success 0 = Add, 1 = Update*/
+    tANI_U8 action;
+
+    /* MAC Rate Set */
+    tSirMacRateSet rateSet;
+
+    /*Enable/Disable HT capabilities of the BSS*/
+    tANI_U8 htCapable;
+
+    // Enable/Disable OBSS protection
+    tANI_U8 obssProtEnabled;
+
+    /*RMF enabled/disabled*/
+    tANI_U8 rmfEnabled;
+
+    /*HT Operating Mode operating mode of the 802.11n STA*/
+    tSirMacHTOperatingMode htOperMode;
+
+    /*Dual CTS Protection: 0 - Unused, 1 - Used*/
+    tANI_U8 dualCTSProtection;
+
+    /* Probe Response Max retries */
+    tANI_U8   ucMaxProbeRespRetryLimit;
+
+    /* To Enable Hidden ssid */
+    tANI_U8   bHiddenSSIDEn;
+
+    /* To Enable Disable FW Proxy Probe Resp */
+    tANI_U8   bProxyProbeRespEn;
+
+    /* Boolean to indicate if EDCA params are valid. UMAC might not have valid
+       EDCA params or might not desire to apply EDCA params during config BSS.
+       0 implies Not Valid ; Non-Zero implies valid*/
+    tANI_U8   edcaParamsValid;
+
+    /*EDCA Parameters for Best Effort Access Category*/
+    tSirMacEdcaParamRecord acbe;
+
+    /*EDCA Parameters forBackground Access Category*/
+    tSirMacEdcaParamRecord acbk;
+
+    /*EDCA Parameters for Video Access Category*/
+    tSirMacEdcaParamRecord acvi;
+
+    /*EDCA Parameters for Voice Access Category*/
+    tSirMacEdcaParamRecord acvo;
+
+#ifdef WLAN_FEATURE_VOWIFI_11R
+    tANI_U8 extSetStaKeyParamValid; //Ext Bss Config Msg if set
+    tSetStaKeyParams extSetStaKeyParam;  //SetStaKeyParams for ext bss msg
+#endif
+
+    /* Persona for the BSS can be STA,AP,GO,CLIENT value same as tHalConMode */
+    tANI_U8   halPersona;
+
+    tANI_U8 bSpectrumMgtEnable;
+
+    /*HAL fills in the tx power used for mgmt frames in txMgmtPower*/
+    tANI_S8     txMgmtPower;
+    /*maxTxPower has max power to be used after applying the power constraint if any */
+    tANI_S8     maxTxPower;
     /*Context of the station being added in HW
       Add a STA entry for "itself" -
       On AP  - Add the AP itself in an "STA context"
       On STA - Add the AP to which this STA is joining in an "STA context" */
     tConfigStaParams staContext;
+} tConfigBssParams, * tpConfigBssParams;
+
+
+/*--------------------------------------------------------------------------
+ * WLAN_HAL_CONFIG_BSS_REQ
+ *--------------------------------------------------------------------------*/
+typedef PACKED_PRE struct PACKED_POST
+{
+    /* BSSID */
+    tSirMacAddr bssId;
+
+#ifdef HAL_SELF_STA_PER_BSS
+    /* Self Mac Address */
+    tSirMacAddr  selfMacAddr;
+#endif
+
+    /* BSS type */
+    tSirBssType bssType;
+
+    /*Operational Mode: AP =0, STA = 1*/
+    tANI_U8 operMode;
+
+    /*Network Type*/
+    tSirNwType nwType;
+
+    /*Used to classify PURE_11G/11G_MIXED to program MTU*/
+    tANI_U8 shortSlotTimeSupported;
+
+    /*Co-exist with 11a STA*/
+    tANI_U8 llaCoexist;
+
+    /*Co-exist with 11b STA*/
+    tANI_U8 llbCoexist;
+
+    /*Co-exist with 11g STA*/
+    tANI_U8 llgCoexist;
+
+    /*Coexistence with 11n STA*/
+    tANI_U8 ht20Coexist;
+
+    /*Non GF coexist flag*/
+    tANI_U8 llnNonGFCoexist;
+
+    /*TXOP protection support*/
+    tANI_U8 fLsigTXOPProtectionFullSupport;
+    /*RIFS mode*/
+    tANI_U8 fRIFSMode;
+
+    /*Beacon Interval in TU*/
+    tSirMacBeaconInterval beaconInterval;
+
+    /*DTIM period*/
+    tANI_U8 dtimPeriod;
+
+    /*TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz*/
+    tANI_U8 txChannelWidthSet;
+
+    /*Operating channel*/
+    tANI_U8 currentOperChannel;
+
+    /*Extension channel for channel bonding*/
+    tANI_U8 currentExtChannel;
+
+    /*Reserved to align next field on a dword boundary*/
+    tANI_U8 reserved;
 
     /*SSID of the BSS*/
     tSirMacSSid ssId;
@@ -1520,14 +1836,14 @@
     /* To Enable Disable FW Proxy Probe Resp */
     tANI_U8   bProxyProbeRespEn;
 
-    /* Boolean to indicate if EDCA params are valid. UMAC might not have valid 
-       EDCA params or might not desire to apply EDCA params during config BSS. 
+    /* Boolean to indicate if EDCA params are valid. UMAC might not have valid
+       EDCA params or might not desire to apply EDCA params during config BSS.
        0 implies Not Valid ; Non-Zero implies valid*/
     tANI_U8   edcaParamsValid;
 
     /*EDCA Parameters for Best Effort Access Category*/
     tSirMacEdcaParamRecord acbe;
-    
+
     /*EDCA Parameters forBackground Access Category*/
     tSirMacEdcaParamRecord acbk;
 
@@ -1542,22 +1858,32 @@
     tSetStaKeyParams extSetStaKeyParam;  //SetStaKeyParams for ext bss msg
 #endif
 
-    /* Persona for the BSS can be STA,AP,GO,CLIENT value same as tHalConMode */    
+    /* Persona for the BSS can be STA,AP,GO,CLIENT value same as tHalConMode */
     tANI_U8   halPersona;
-   
+
     tANI_U8 bSpectrumMgtEnable;
 
     /*HAL fills in the tx power used for mgmt frames in txMgmtPower*/
     tANI_S8     txMgmtPower;
     /*maxTxPower has max power to be used after applying the power constraint if any */
     tANI_S8     maxTxPower;
-  
-} tConfigBssParams, * tpConfigBssParams;
+    /*Context of the station being added in HW
+      Add a STA entry for "itself" -
+      On AP  - Add the AP itself in an "STA context"
+      On STA - Add the AP to which this STA is joining in an "STA context" */
+    tConfigStaParams_V1 staContext;
+
+    tANI_U8   vhtCapable;
+    tANI_U8   vhtTxChannelWidthSet;
+} tConfigBssParams_V1, * tpConfigBssParams_V1;
 
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader header;
+   PACKED_PRE union PACKED_POST {
    tConfigBssParams configBssParams;
+    tConfigBssParams_V1 configBssParams_V1;
+   }uBssParams;
 }  tConfigBssReqMsg, *tpConfigBssReqMsg;
 
 /*---------------------------------------------------------------------------
@@ -1657,19 +1983,19 @@
 typedef PACKED_PRE struct PACKED_POST
 {
   /*Indicates the BSSID to which STA is going to associate*/
-  tSirMacAddr     bssId; 
+  tSirMacAddr     bssId;
 
   /*Indicates the channel to switch to.*/
   tANI_U8         ucChannel;
 
   /* Self STA MAC */
   tSirMacAddr selfStaMacAddr;
-     
+
   /*Local power constraint*/
   tANI_U8         ucLocalPowerConstraint;
 
   /*Secondary channel offset */
-  tSirMacHTSecondaryChannelOffset  secondaryChannelOffset;
+  ePhyChanBondState  secondaryChannelOffset;
 
   /*link State*/
   tSirLinkState   linkState;
@@ -1757,7 +2083,7 @@
 
     /*Array of keys.*/
     tSirKeys        key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
-  
+
     /*Control for Replay Count, 1= Single TID based replay count on Tx
     0 = Per TID based replay count on TX */
     tANI_U8         singleTidRc;
@@ -1829,7 +2155,7 @@
 {
     /*BSS Index of the BSS*/
     tANI_U8         bssIdx;
-    
+
     /*Encryption Type used with peer*/
     tAniEdType      encType;
 
@@ -1907,7 +2233,48 @@
    tRemoveStaKeyRspParams removeStaKeyRspParams;
 }  tRemoveStaKeyRspMsg, *tpRemoveStaKeyRspMsg;
 
+#ifdef FEATURE_OEM_DATA_SUPPORT
 
+#ifndef OEM_DATA_REQ_SIZE
+#define OEM_DATA_REQ_SIZE 70
+#endif
+
+#ifndef OEM_DATA_RSP_SIZE
+#define OEM_DATA_RSP_SIZE 968
+#endif
+
+/*-------------------------------------------------------------------------
+WLAN_HAL_START_OEM_DATA_REQ
+--------------------------------------------------------------------------*/
+typedef PACKED_PRE struct PACKED_POST
+{
+    tANI_U32                 status;
+    tSirMacAddr              selfMacAddr;
+    tANI_U8                 oemDataReq[OEM_DATA_REQ_SIZE];
+} tStartOemDataReqParams, *tpStartOemDataReqParams;
+
+typedef PACKED_PRE struct PACKED_POST
+{
+    tHalMsgHeader                header;
+    tStartOemDataReqParams  startOemDataReqParams;
+} tStartOemDataReqMsg, *tpStartOemDataReqMsg;
+
+/*-------------------------------------------------------------------------
+WLAN_HAL_START_OEM_DATA_RSP
+--------------------------------------------------------------------------*/
+
+typedef PACKED_PRE struct PACKED_POST
+{
+   tANI_U8                   oemDataRsp[OEM_DATA_RSP_SIZE];
+} tStartOemDataRspParams, *tpStartOemDataRspParams;
+
+typedef PACKED_PRE struct PACKED_POST
+{
+   tHalMsgHeader             header;
+   tStartOemDataRspParams    startOemDataRspParams;
+} tStartOemDataRspMsg, *tpStartOemDataRspMsg;
+
+#endif
 
 
 
@@ -1924,14 +2291,14 @@
     tANI_U8 localPowerConstraint;
 
     /*Secondary channel offset */
-    tSirMacHTSecondaryChannelOffset secondaryChannelOffset;
+    ePhyChanBondState secondaryChannelOffset;
 
     //HAL fills in the tx power used for mgmt frames in this field.
     tPowerdBm txMgmtPower;
 
     /* Max TX power */
     tPowerdBm maxTxPower;
-    
+
     /* Self STA MAC */
     tSirMacAddr selfStaMacAddr;
 
@@ -1943,7 +2310,7 @@
      * by way of ignoring if using new host/old FW or old host/new FW since it is at the end of this struct
      */
     tSirMacAddr bssId;
-   
+
 }tSwitchChannelParams, *tpSwitchChannelParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -1969,7 +2336,7 @@
 
     /* BSSID needed to identify session - same as in request*/
     tSirMacAddr bssId;
-    
+
 }tSwitchChannelRspParams, *tpSwitchChannelRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -1988,11 +2355,11 @@
    tANI_U16 bssIdx;
 
    /* Best Effort */
-   tSirMacEdcaParamRecord acbe; 
+   tSirMacEdcaParamRecord acbe;
 
    /* Background */
    tSirMacEdcaParamRecord acbk;
-   
+
    /* Video */
    tSirMacEdcaParamRecord acvi;
 
@@ -2035,10 +2402,10 @@
 
     /* Encryption mode */
     tANI_U8 encMode;
-    
+
     /* status */
     tANI_U32  status;
-    
+
     /* Statistics */
     tANI_U32  sendBlocks;
     tANI_U32  recvBlocks;
@@ -2076,20 +2443,20 @@
     tANI_U32 multiple_retry_cnt[4]; //The number of MSDU packets and MMPDU frames per AC that the 802.11
                                     // station successfully transmitted after more than one retransmission attempt
 
-    tANI_U32 tx_frm_cnt[4];         //Total number of packets(per AC) that were successfully transmitted 
-                                    //(with and without retries, including multi-cast, broadcast)     
-    tANI_U32 rx_frm_cnt;            //Total number of packets that were successfully received 
-                                    //(after appropriate filter rules including multi-cast, broadcast)    
+    tANI_U32 tx_frm_cnt[4];         //Total number of packets(per AC) that were successfully transmitted
+                                    //(with and without retries, including multi-cast, broadcast)
+    tANI_U32 rx_frm_cnt;            //Total number of packets that were successfully received
+                                    //(after appropriate filter rules including multi-cast, broadcast)
     tANI_U32 frm_dup_cnt;           //Total number of duplicate frames received successfully
     tANI_U32 fail_cnt[4];           //Total number packets(per AC) failed to transmit
     tANI_U32 rts_fail_cnt;          //Total number of RTS/CTS sequence failures for transmission of a packet
     tANI_U32 ack_fail_cnt;          //Total number packets failed transmit because of no ACK from the remote entity
-    tANI_U32 rts_succ_cnt;          //Total number of RTS/CTS sequence success for transmission of a packet 
-    tANI_U32 rx_discard_cnt;        //The sum of the receive error count and dropped-receive-buffer error count. 
+    tANI_U32 rts_succ_cnt;          //Total number of RTS/CTS sequence success for transmission of a packet
+    tANI_U32 rx_discard_cnt;        //The sum of the receive error count and dropped-receive-buffer error count.
                                     //HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
     tANI_U32 rx_error_cnt;          //The receive error count. HAL will provide the RxP FCS error global counter.
-    tANI_U32 tx_byte_cnt;           //The sum of the transmit-directed byte count, transmit-multicast byte count 
-                                    //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters 
+    tANI_U32 tx_byte_cnt;           //The sum of the transmit-directed byte count, transmit-multicast byte count
+                                    //and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
                                     //to provide this.
 }tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
 
@@ -2107,50 +2474,50 @@
 
 typedef PACKED_PRE struct PACKED_POST
 {
-    tANI_U32 rx_frag_cnt;              //The number of MPDU frames received by the 802.11 station for MSDU packets 
+    tANI_U32 rx_frag_cnt;              //The number of MPDU frames received by the 802.11 station for MSDU packets
                                        //or MMPDU frames
-    tANI_U32 promiscuous_rx_frag_cnt;  //The number of MPDU frames received by the 802.11 station for MSDU packets 
+    tANI_U32 promiscuous_rx_frag_cnt;  //The number of MPDU frames received by the 802.11 station for MSDU packets
                                        //or MMPDU frames when a promiscuous packet filter was enabled
-    tANI_U32 rx_input_sensitivity;     //The receiver input sensitivity referenced to a FER of 8% at an MPDU length 
-                                       //of 1024 bytes at the antenna connector. Each element of the array shall correspond 
+    tANI_U32 rx_input_sensitivity;     //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
+                                       //of 1024 bytes at the antenna connector. Each element of the array shall correspond
                                        //to a supported rate and the order shall be the same as the supporteRates parameter.
-    tANI_U32 max_pwr;                  //The maximum transmit power in dBm upto one decimal. 
-                                       //for eg: if it is 10.5dBm, the value would be 105 
-    tANI_U32 sync_fail_cnt;            //Number of times the receiver failed to synchronize with the incoming signal 
-                                       //after detecting the sync in the preamble of the transmitted PLCP protocol data unit. 
+    tANI_U32 max_pwr;                  //The maximum transmit power in dBm upto one decimal.
+                                       //for eg: if it is 10.5dBm, the value would be 105
+    tANI_U32 sync_fail_cnt;            //Number of times the receiver failed to synchronize with the incoming signal
+                                       //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
 
-    tANI_U32 tx_rate;                  //Legacy transmit rate, in units of 500 kbit/sec, for the most 
-                                       //recently transmitted frame    
+    tANI_U32 tx_rate;                  //Legacy transmit rate, in units of 500 kbit/sec, for the most
+                                       //recently transmitted frame
     tANI_U32  mcs_index;               //mcs index for HT20 and HT40 rates
-    tANI_U32  tx_rate_flags;           //to differentiate between HT20 and 
-                                       //HT40 rates;  short and long guard interval  
+    tANI_U32  tx_rate_flags;           //to differentiate between HT20 and
+                                       //HT40 rates;  short and long guard interval
 }tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
 
 typedef PACKED_PRE struct PACKED_POST
 {
-    tANI_U32 rx_wep_unencrypted_frm_cnt;  //The number of unencrypted received MPDU frames that the MAC layer discarded when 
-                                          //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object 
+    tANI_U32 rx_wep_unencrypted_frm_cnt;  //The number of unencrypted received MPDU frames that the MAC layer discarded when
+                                          //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
                                           //is enabled
-    tANI_U32 rx_mic_fail_cnt;             //The number of received MSDU packets that that the 802.11 station discarded 
+    tANI_U32 rx_mic_fail_cnt;             //The number of received MSDU packets that that the 802.11 station discarded
                                           //because of MIC failures
-    tANI_U32 tkip_icv_err;                //The number of encrypted MPDU frames that the 802.11 station failed to decrypt 
+    tANI_U32 tkip_icv_err;                //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
                                           //because of a TKIP ICV error
-    tANI_U32 aes_ccmp_format_err;         //The number of received MPDU frames that the 802.11 discarded because of an 
+    tANI_U32 aes_ccmp_format_err;         //The number of received MPDU frames that the 802.11 discarded because of an
                                           //invalid AES-CCMP format
-    tANI_U32 aes_ccmp_replay_cnt;         //The number of received MPDU frames that the 802.11 station discarded because of 
+    tANI_U32 aes_ccmp_replay_cnt;         //The number of received MPDU frames that the 802.11 station discarded because of
                                           //the AES-CCMP replay protection procedure
-    tANI_U32 aes_ccmp_decrpt_err;         //The number of received MPDU frames that the 802.11 station discarded because of 
+    tANI_U32 aes_ccmp_decrpt_err;         //The number of received MPDU frames that the 802.11 station discarded because of
                                           //errors detected by the AES-CCMP decryption algorithm
-    tANI_U32 wep_undecryptable_cnt;       //The number of encrypted MPDU frames received for which a WEP decryption key was 
+    tANI_U32 wep_undecryptable_cnt;       //The number of encrypted MPDU frames received for which a WEP decryption key was
                                           //not available on the 802.11 station
-    tANI_U32 wep_icv_err;                 //The number of encrypted MPDU frames that the 802.11 station failed to decrypt 
+    tANI_U32 wep_icv_err;                 //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
                                           //because of a WEP ICV error
-    tANI_U32 rx_decrypt_succ_cnt;         //The number of received encrypted packets that the 802.11 station successfully 
+    tANI_U32 rx_decrypt_succ_cnt;         //The number of received encrypted packets that the 802.11 station successfully
                                           //decrypted
     tANI_U32 rx_decrypt_fail_cnt;         //The number of encrypted packets that the 802.11 station failed to decrypt
 
 }tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
-   
+
 typedef PACKED_PRE struct PACKED_POST
 {
     tAniGlobalSecurityStats ucStats;
@@ -2159,26 +2526,26 @@
 
 typedef PACKED_PRE struct PACKED_POST
 {
-    tANI_U32 rx_amsdu_cnt;             //This counter shall be incremented for a received A-MSDU frame with the stations 
-                                       //MAC address in the address 1 field or an A-MSDU frame with a group address in the 
+    tANI_U32 rx_amsdu_cnt;             //This counter shall be incremented for a received A-MSDU frame with the stations
+                                       //MAC address in the address 1 field or an A-MSDU frame with a group address in the
                                        //address 1 field
     tANI_U32 rx_ampdu_cnt;             //This counter shall be incremented when the MAC receives an AMPDU from the PHY
-    tANI_U32 tx_20_frm_cnt;            //This counter shall be incremented when a Frame is transmitted only on the 
+    tANI_U32 tx_20_frm_cnt;            //This counter shall be incremented when a Frame is transmitted only on the
                                        //primary channel
     tANI_U32 rx_20_frm_cnt;            //This counter shall be incremented when a Frame is received only on the primary channel
-    tANI_U32 rx_mpdu_in_ampdu_cnt;     //This counter shall be incremented by the number of MPDUs received in the A-MPDU 
+    tANI_U32 rx_mpdu_in_ampdu_cnt;     //This counter shall be incremented by the number of MPDUs received in the A-MPDU
                                        //when an A-MPDU is received
-    tANI_U32 ampdu_delimiter_crc_err;  //This counter shall be incremented when an MPDU delimiter has a CRC error when this 
-                                       //is the first CRC error in the received AMPDU or when the previous delimiter has been 
+    tANI_U32 ampdu_delimiter_crc_err;  //This counter shall be incremented when an MPDU delimiter has a CRC error when this
+                                       //is the first CRC error in the received AMPDU or when the previous delimiter has been
                                        //decoded correctly
 }tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
 
 typedef PACKED_PRE struct PACKED_POST
 {
-    tANI_U32 tx_frag_cnt[4];        //The number of MPDU frames that the 802.11 station transmitted and acknowledged 
+    tANI_U32 tx_frag_cnt[4];        //The number of MPDU frames that the 802.11 station transmitted and acknowledged
                                     //through a received 802.11 ACK frame
-    tANI_U32 tx_ampdu_cnt;          //This counter shall be incremented when an A-MPDU is transmitted 
-    tANI_U32 tx_mpdu_in_ampdu_cnt;  //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU 
+    tANI_U32 tx_ampdu_cnt;          //This counter shall be incremented when an A-MPDU is transmitted
+    tANI_U32 tx_mpdu_in_ampdu_cnt;  //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
                                     //is transmitted
 }tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
 
@@ -2197,7 +2564,7 @@
    tANI_U16 msgType;
 
    /* length of the entire request, includes the pStatsBuf length too */
-   tANI_U16 msgLen;  
+   tANI_U16 msgLen;
 
 } tHalStatsRspParams, *tpHalStatsRspParams;
 
@@ -2331,7 +2698,7 @@
     tANI_U32 srvInterval[WLAN_HAL_MAX_AC];   // Service Interval
     tANI_U32 susInterval[WLAN_HAL_MAX_AC];   // Suspend Interval
     tANI_U32 delayInterval[WLAN_HAL_MAX_AC]; // Delay Interval
-           
+
 } tAddTsParams, *tpAddTsParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -2370,14 +2737,14 @@
     tANI_U16 tspecIdx;
 
     /* To lookup station id using the mac address */
-    tSirMacAddr bssId; 
+    tSirMacAddr bssId;
 
 } tDelTsParams, *tpDelTsParams;
 
 typedef PACKED_PRE struct PACKED_POST
 {
     tHalMsgHeader header;
-    tDelTsParams  delTsParams; 
+    tDelTsParams  delTsParams;
 }  tDelTsReqMsg, *tpDelTsReqMsg;
 
 /*---------------------------------------------------------------------------
@@ -2449,7 +2816,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     tHalMsgHeader header;
-    tAddBASessionParams  addBASessionParams; 
+    tAddBASessionParams  addBASessionParams;
 }tAddBASessionReqMsg, *tpAddBASessionReqMsg;
 
 /*---------------------------------------------------------------------------
@@ -2474,10 +2841,10 @@
 
     /* Reordering Window buffer */
     tANI_U8 winSize;
-    
+
     /*Station Index to id the sta */
     tANI_U8 STAID;
-    
+
     /* Starting Sequence Number */
     tANI_U16 SSN;
 } tAddBASessionRspParams, *tpAddBASessionRspParams;
@@ -2508,7 +2875,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     tHalMsgHeader header;
-    tAddBAParams  addBAParams; 
+    tAddBAParams  addBAParams;
 }  tAddBAReqMsg, *tpAddBAReqMsg;
 
 
@@ -2523,7 +2890,7 @@
 
     /* Dialog token */
     tANI_U8 baDialogToken;
- 
+
 } tAddBARspParams, *tpAddBARspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -2562,17 +2929,17 @@
     /* Session Id */
     tANI_U8 baSessionID;
 
-    /* baCandidateCnt is followed by trigger BA 
+    /* baCandidateCnt is followed by trigger BA
      * Candidate List(tTriggerBaCandidate)
      */
     tANI_U16 baCandidateCnt;
-    
+
 } tTriggerBAParams, *tpTriggerBAParams;
 
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader header;
-   tTriggerBAParams  triggerBAParams; 
+   tTriggerBAParams  triggerBAParams;
 }  tTriggerBAReqMsg, *tpTriggerBAReqMsg;
 
 
@@ -2582,18 +2949,18 @@
 
 typedef PACKED_PRE struct PACKED_POST
 {
-   
+
     /* TO SUPPORT BT-AMP */
-    tSirMacAddr  bssId; 
+    tSirMacAddr  bssId;
 
     /* success or failure */
     tANI_U32   status;
 
-    /* baCandidateCnt is followed by trigger BA 
+    /* baCandidateCnt is followed by trigger BA
      * Rsp Candidate List(tTriggerRspBaCandidate)
      */
     tANI_U16 baCandidateCnt;
-    
+
 
 } tTriggerBARspParams, *tpTriggerBARspParams;
 
@@ -2618,13 +2985,13 @@
     /* DELBA direction
        1 - Originator
        0 - Recipient */
-    tANI_U8 baDirection;  
+    tANI_U8 baDirection;
 } tDelBAParams, *tpDelBAParams;
 
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader header;
-   tDelBAParams  delBAParams; 
+   tDelBAParams  delBAParams;
 }  tDelBAReqMsg, *tpDelBAReqMsg;
 
 /*---------------------------------------------------------------------------
@@ -2660,7 +3027,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     tHalMsgHeader header;
-    tTsmStatsParams  tsmStatsParams; 
+    tTsmStatsParams  tsmStatsParams;
 }  tTsmStatsReqMsg, *tpTsmStatsReqMsg;
 
 
@@ -2672,25 +3039,25 @@
     /*success or failure */
     tANI_U32   status;
 
-    /* Uplink Packet Queue delay */ 
+    /* Uplink Packet Queue delay */
     tANI_U16      UplinkPktQueueDly;
 
-    /* Uplink Packet Queue delay histogram */ 
+    /* Uplink Packet Queue delay histogram */
     tANI_U16      UplinkPktQueueDlyHist[4];
 
-    /* Uplink Packet Transmit delay */ 
+    /* Uplink Packet Transmit delay */
     tANI_U32      UplinkPktTxDly;
 
-    /* Uplink Packet loss */ 
+    /* Uplink Packet loss */
     tANI_U16      UplinkPktLoss;
 
-    /* Uplink Packet count */ 
+    /* Uplink Packet count */
     tANI_U16      UplinkPktCount;
 
-    /* Roaming count */ 
+    /* Roaming count */
     tANI_U8       RoamingCount;
 
-    /* Roaming Delay */ 
+    /* Roaming Delay */
     tANI_U16      RoamingDly;
 } tTsmStatsRspParams, *tpTsmStatsRspParams;
 
@@ -2727,14 +3094,14 @@
 {
     /* Fragment sequence number of the NV Image. Note that NV Image might not
      * fit into one message due to size limitation of the SMD channel FIFO. UMAC
-     * can hence choose to chop the NV blob into multiple fragments starting with 
-     * seqeunce number 0, 1, 2 etc. The last fragment MUST be indicated by 
+     * can hence choose to chop the NV blob into multiple fragments starting with
+     * seqeunce number 0, 1, 2 etc. The last fragment MUST be indicated by
      * marking the isLastFragment field to 1. Note that all the NV blobs would be
      * concatenated together by HAL without any padding bytes in between.*/
     tANI_U16 fragNumber;
 
     /* Is this the last fragment? When set to 1 it indicates that no more fragments
-     * will be sent by UMAC and HAL can concatenate all the NV blobs rcvd & proceed 
+     * will be sent by UMAC and HAL can concatenate all the NV blobs rcvd & proceed
      * with the parsing. HAL would generate a WLAN_HAL_DOWNLOAD_NV_RSP to the
      * WLAN_HAL_DOWNLOAD_NV_REQ after it receives each fragment */
     tANI_U16 isLastFragment;
@@ -2781,7 +3148,7 @@
     /* Size of NV Blob */
     tANI_U32 nvBlobSize;
 
-    /* Following the 'nvBlobSize', there should be nvBlobSize bytes of 
+    /* Following the 'nvBlobSize', there should be nvBlobSize bytes of
      * NV blob i.e. uint8[nvBlobSize] */
 } tHalNvStoreParams, *tpHalNvStoreParams;
 
@@ -2803,10 +3170,10 @@
 
 typedef PACKED_PRE struct PACKED_POST
 {
-    tSirMacAddr  srcMacAddr;     //address used to compute MIC 
+    tSirMacAddr  srcMacAddr;     //address used to compute MIC
     tSirMacAddr  taMacAddr;      //transmitter address
     tSirMacAddr  dstMacAddr;
-    tANI_U8      multicast;             
+    tANI_U8      multicast;
     tANI_U8      IV1;            // first byte of IV
     tANI_U8      keyId;          // second byte of IV
     tANI_U8      TSC[SIR_CIPHER_SEQ_CTR_SIZE]; // sequence number
@@ -2919,7 +3286,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     tSirMacAddr BSSID;
-    tANI_U8   channel; 
+    tANI_U8   channel;
 }tSirEnableRadarInfoType, *tptSirEnableRadarInfoType;
 
 
@@ -2932,7 +3299,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     tHalMsgHeader header;
-    tEnableRadarReqParams  enableRadarReqParams; 
+    tEnableRadarReqParams  enableRadarReqParams;
 }tEnableRadarReqMsg, *tpEnableRadarReqMsg;
 
 /*---------------------------------------------------------------------------
@@ -2950,7 +3317,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     tHalMsgHeader header;
-    tEnableRadarRspParams  enableRadarRspParams; 
+    tEnableRadarRspParams  enableRadarRspParams;
 }tEnableRadarRspMsg, *tpEnableRadarRspMsg;
 
 /*---------------------------------------------------------------------------
@@ -2965,7 +3332,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     tHalMsgHeader header;
-    tRadarDetectIntrIndParams  radarDetectIntrIndParams; 
+    tRadarDetectIntrIndParams  radarDetectIntrIndParams;
 }tRadarDetectIntrIndMsg, *tptRadarDetectIntrIndMsg;
 
 /*---------------------------------------------------------------------------
@@ -2986,7 +3353,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader header;
-   tRadarDetectIndParams  radarDetectIndParams; 
+   tRadarDetectIndParams  radarDetectIndParams;
 }tRadarDetectIndMsg, *tptRadarDetectIndMsg;
 
 
@@ -3004,7 +3371,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader header;
-   tSirGetTpcReportReqParams  getTpcReportReqParams; 
+   tSirGetTpcReportReqParams  getTpcReportReqParams;
 }tSirGetTpcReportReqMsg, *tpSirGetTpcReportReqMsg;
 
 /*---------------------------------------------------------------------------
@@ -3020,7 +3387,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     tHalMsgHeader header;
-    tSirGetTpcReportRspParams  getTpcReportRspParams; 
+    tSirGetTpcReportRspParams  getTpcReportRspParams;
 }tSirGetTpcReportRspMsg, *tpSirGetTpcReportRspMsg;
 
 #endif
@@ -3045,7 +3412,7 @@
 }tSendProbeRespReqMsg, *tpSendProbeRespReqMsg;
 
 /*---------------------------------------------------------------------------
- *WLAN_HAL_UPDATE_PROBE_RSP_TEMPLATE_RSP 
+ *WLAN_HAL_UPDATE_PROBE_RSP_TEMPLATE_RSP
  *--------------------------------------------------------------------------*/
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3062,7 +3429,7 @@
 
 
 /*---------------------------------------------------------------------------
- *WLAN_HAL_UNKNOWN_ADDR2_FRAME_RX_IND 
+ *WLAN_HAL_UNKNOWN_ADDR2_FRAME_RX_IND
  *--------------------------------------------------------------------------*/
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3089,7 +3456,7 @@
                        // HAL copies bssid from the sta table.
 #ifdef WLAN_SOFTAP_FEATURE
     tSirMacAddr addr2;        //
-    tANI_U16    reasonCode;   // To unify the keepalive / unknown A2 / tim-based disa                                                                        
+    tANI_U16    reasonCode;   // To unify the keepalive / unknown A2 / tim-based disa
 #endif
 
 }tDeleteStaContextParams, *tpDeleteStaContextParams;
@@ -3233,6 +3600,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
    tANI_U8     sendDataNull;
+   tANI_U8     bssIdx;
 } tHalExitBmpsReqParams, *tpHalExitBmpsReqParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3253,7 +3621,7 @@
     tANI_U8     ref;
 } tEidByteInfo, *tpEidByteInfo;
 
-typedef PACKED_PRE struct PACKED_POST 
+typedef PACKED_PRE struct PACKED_POST
 {
     tANI_U16    capabilityInfo;
     tANI_U16    capabilityMask;
@@ -3278,7 +3646,7 @@
 /*---------------------------------------------------------------------------
  * WLAN_HAL_REM_BCN_FILTER_REQ
  *--------------------------------------------------------------------------*/
-typedef PACKED_PRE struct PACKED_POST 
+typedef PACKED_PRE struct PACKED_POST
 {
     tANI_U8  ucIeCount;
     tANI_U8  ucRemIeId[1];
@@ -3316,6 +3684,7 @@
    tANI_U8 targetIPv6Addr2Valid : 1;
    tANI_U8 reserved1 : 5;
    tANI_U8 reserved2;   //make it DWORD aligned
+   tANI_U8 bssIdx;
 } tHalNSOffloadParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3352,9 +3721,10 @@
 {
     tANI_U8          packetType;
     tANI_U32         timePeriod;
-    tHalIpv4Addr     hostIpv4Addr; 
+    tHalIpv4Addr     hostIpv4Addr;
     tHalIpv4Addr     destIpv4Addr;
     tSirMacAddr      destMacAddr;
+    tANI_U8          bssIdx;
 } tHalKeepAliveReq, *tpHalKeepAliveReq;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3379,7 +3749,7 @@
     tANI_U8   bRssiThres3NegNotify : 1;
     tANI_U8   bReserved10          : 2;
 } tHalRSSIThresholds, *tpHalRSSIThresholds;
-    
+
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader header;
@@ -3399,6 +3769,7 @@
     tANI_U8     beTriggerEnabled:1;
     tANI_U8     viTriggerEnabled:1;
     tANI_U8     voTriggerEnabled:1;
+    tANI_U8     bssIdx;
 } tUapsdReqParams, *tpUapsdReqParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3413,6 +3784,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader header;
+   tANI_U8       bssIdx;
 }  tHalExitUapsdReqMsg, *tpHalExitUapsdReqMsg;
 
 /*---------------------------------------------------------------------------
@@ -3426,13 +3798,14 @@
     tANI_U8  ucPatternId;           // Pattern ID
     // Pattern byte offset from beginning of the 802.11 packet to start of the
     // wake-up pattern
-    tANI_U8  ucPatternByteOffset;   
+    tANI_U8  ucPatternByteOffset;
     tANI_U8  ucPatternSize;         // Non-Zero Pattern size
     tANI_U8  ucPattern[HAL_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
     tANI_U8  ucPatternMaskSize;     // Non-zero pattern mask size
     tANI_U8  ucPatternMask[HAL_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
     tANI_U8  ucPatternExt[HAL_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra pattern
     tANI_U8  ucPatternMaskExt[HAL_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra pattern mask
+    tANI_U8  bssIdx;
 } tHalWowlAddBcastPtrn, *tpHalWowlAddBcastPtrn;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3441,6 +3814,8 @@
    tHalWowlAddBcastPtrn ptrnParams;
 }  tHalWowlAddBcastPtrnReqMsg, *tpHalWowlAddBcastPtrnReqMsg;
 
+
+
 /*---------------------------------------------------------------------------
  * WLAN_HAL_DEL_WOWL_BCAST_PTRN
  *--------------------------------------------------------------------------*/
@@ -3448,6 +3823,7 @@
 {
     /* Pattern ID of the wakeup pattern to be deleted */
     tANI_U8  ucPatternId;
+    tANI_U8  bssIdx;
 } tHalWowlDelBcastPtrn, *tpHalWowlDelBcastPtrn;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3462,59 +3838,59 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     /* Enables/disables magic packet filtering */
-    tANI_U8   ucMagicPktEnable; 
+    tANI_U8   ucMagicPktEnable;
 
     /* Magic pattern */
     tSirMacAddr magicPtrn;
 
-    /* Enables/disables packet pattern filtering in firmware. 
-       Enabling this flag enables broadcast pattern matching 
-       in Firmware. If unicast pattern matching is also desired,  
-       ucUcastPatternFilteringEnable flag must be set tot true 
-       as well 
+    /* Enables/disables packet pattern filtering in firmware.
+       Enabling this flag enables broadcast pattern matching
+       in Firmware. If unicast pattern matching is also desired,
+       ucUcastPatternFilteringEnable flag must be set tot true
+       as well
     */
     tANI_U8   ucPatternFilteringEnable;
 
-    /* Enables/disables unicast packet pattern filtering. 
-       This flag specifies whether we want to do pattern match 
-       on unicast packets as well and not just broadcast packets. 
-       This flag has no effect if the ucPatternFilteringEnable 
+    /* Enables/disables unicast packet pattern filtering.
+       This flag specifies whether we want to do pattern match
+       on unicast packets as well and not just broadcast packets.
+       This flag has no effect if the ucPatternFilteringEnable
        (main controlling flag) is set to false
     */
-    tANI_U8   ucUcastPatternFilteringEnable;                     
+    tANI_U8   ucUcastPatternFilteringEnable;
 
-    /* This configuration is valid only when magicPktEnable=1. 
-     * It requests hardware to wake up when it receives the 
+    /* This configuration is valid only when magicPktEnable=1.
+     * It requests hardware to wake up when it receives the
      * Channel Switch Action Frame.
      */
     tANI_U8   ucWowChnlSwitchRcv;
 
-    /* This configuration is valid only when magicPktEnable=1. 
-     * It requests hardware to wake up when it receives the 
-     * Deauthentication Frame. 
+    /* This configuration is valid only when magicPktEnable=1.
+     * It requests hardware to wake up when it receives the
+     * Deauthentication Frame.
      */
     tANI_U8   ucWowDeauthRcv;
 
-    /* This configuration is valid only when magicPktEnable=1. 
-     * It requests hardware to wake up when it receives the 
-     * Disassociation Frame. 
+    /* This configuration is valid only when magicPktEnable=1.
+     * It requests hardware to wake up when it receives the
+     * Disassociation Frame.
      */
     tANI_U8   ucWowDisassocRcv;
 
-    /* This configuration is valid only when magicPktEnable=1. 
+    /* This configuration is valid only when magicPktEnable=1.
      * It requests hardware to wake up when it has missed
      * consecutive beacons. This is a hardware register
-     * configuration (NOT a firmware configuration). 
+     * configuration (NOT a firmware configuration).
      */
     tANI_U8   ucWowMaxMissedBeacons;
 
-    /* This configuration is valid only when magicPktEnable=1. 
+    /* This configuration is valid only when magicPktEnable=1.
      * This is a timeout value in units of microsec. It requests
      * hardware to unconditionally wake up after it has stayed
-     * in WoWLAN mode for some time. Set 0 to disable this feature.      
+     * in WoWLAN mode for some time. Set 0 to disable this feature.
      */
     tANI_U8   ucWowMaxSleepUsec;
-    
+
     /* This configuration directs the WoW packet filtering to look for EAP-ID
      * requests embedded in EAPOL frames and use this as a wake source.
      */
@@ -3537,6 +3913,8 @@
      */
     tANI_U8   ucWoWBSSConnLoss;
 
+    tANI_U8   bssIdx;
+
 } tHalWowlEnterParams, *tpHalWowlEnterParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3548,9 +3926,17 @@
 /*---------------------------------------------------------------------------
  * WLAN_HAL_EXIT_WOWL_REQ
  *--------------------------------------------------------------------------*/
+
 typedef PACKED_PRE struct PACKED_POST
 {
-   tHalMsgHeader header;
+    tANI_U8   bssIdx;
+
+} tHalWowlExitParams, *tpHalWowlExitParams;
+
+typedef PACKED_PRE struct PACKED_POST
+{
+   tHalMsgHeader     header;
+   tHalWowlExitParams exitWowlParams;
 }  tHalWowlExitReqMsg, *tpHalWowlExitReqMsg;
 
 /*---------------------------------------------------------------------------
@@ -3630,6 +4016,7 @@
 {
     /* success or failure */
     tANI_U32   status;
+    tANI_U8    bssIdx;
 } tHalEnterBmpsRspParams, *tpHalEnterBmpsRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3645,6 +4032,7 @@
 {
     /* success or failure */
     tANI_U32   status;
+    tANI_U8    bssIdx;
 } tHalExitBmpsRspParams, *tpHalExitBmpsRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3660,6 +4048,7 @@
 {
     /* success or failure */
     tANI_U32    status;
+    tANI_U8     bssIdx;
 }tUapsdRspParams, *tpUapsdRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3675,6 +4064,7 @@
 {
     /* success or failure */
     tANI_U32   status;
+    tANI_U8    bssIdx;
 } tHalExitUapsdRspParams, *tpHalExitUapsdRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3725,7 +4115,8 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     /* success or failure */
-    tANI_U32   status;
+   tANI_U32   status;
+   tANI_U8    bssIdx;
 } tHalEnterWowlRspParams, *tpHalEnterWowlRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3740,7 +4131,8 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     /* success or failure */
-    tANI_U32   status;
+   tANI_U32   status;
+   tANI_U8    bssIdx;
 } tHalExitWowlRspParams, *tpHalExitWowlRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3785,7 +4177,8 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     /* success or failure */
-    tANI_U32   status;
+   tANI_U32   status;
+   tANI_U8    bssIdx;
 } tHalAddWowlBcastPtrnRspParams, *tpHalAddWowlBcastPtrnRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3800,7 +4193,8 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     /* success or failure */
-    tANI_U32   status;
+   tANI_U32   status;
+   tANI_U8    bssIdx;
 } tHalDelWowlBcastPtrnRspParams, *tpHalDelWowlBcastPtrnRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -3933,6 +4327,7 @@
 {
     /* TX Power in milli watts */
     tANI_U32  txPower;
+    tANI_U8   bssIdx;
 }tSetTxPwrReqParams, *tpSetTxPwrReqParams;
 
 
@@ -4001,7 +4396,7 @@
 {
   tANI_U8   opp_ps;
   tANI_U32  ctWindow;
-  tANI_U8   count; 
+  tANI_U8   count;
   tANI_U32  duration;
   tANI_U32  interval;
   tANI_U32  single_noa_duration;
@@ -4066,7 +4461,7 @@
 
    /* DPU Signature */
    tANI_U8 dpuSignature;
-   
+
 }tAddStaSelfRspParams, *tpAddStaSelfRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -4229,7 +4624,7 @@
     tANI_U32   rspLength;
     /*FiXME: Currently considering the  the responce will be less than 100bytes */
     tANI_U8    rspBuffer[DUMPCMD_RSP_BUFFER];
-    
+
 } tHalDumpCmdRspParams, *tpHalDumpCmdRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -4257,7 +4652,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader   header;
-   tCoexIndParams  coexIndParams; 
+   tCoexIndParams  coexIndParams;
 }tCoexIndMsg, *tpCoexIndMsg;
 
 /*---------------------------------------------------------------------------
@@ -4273,7 +4668,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader   header;
-   tTxComplParams  txComplParams; 
+   tTxComplParams  txComplParams;
 }tTxComplIndMsg, *tpTxComplIndMsg;
 
 /*---------------------------------------------------------------------------
@@ -4283,7 +4678,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     tANI_U32 configuredMcstBcstFilterSetting;
-    tANI_U32 activeSessionCount; 
+    tANI_U32 activeSessionCount;
 }tHalWlanHostSuspendIndParam,*tpHalWlanHostSuspendIndParam;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -4299,7 +4694,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     tANI_BOOLEAN bDot11ExcludeUnencrypted;
-    tSirMacAddr bssId; 
+    tSirMacAddr bssId;
 }tHalWlanExcludeUnEncryptedIndParam,*tpHalWlanExcludeUnEncryptedIndParam;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -4337,7 +4732,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader      header;
-   tNoaAttrIndParams  noaAttrIndParams; 
+   tNoaAttrIndParams  noaAttrIndParams;
 }tNoaAttrIndMsg, *tpNoaAttrIndMsg;
 #endif
 
@@ -4386,7 +4781,7 @@
 /*Maximum size of the probe template*/
 #define WLAN_HAL_PNO_MAX_PROBE_SIZE     450
 
-/*Type of PNO enabling 
+/*Type of PNO enabling
   Immediate - scanning will start immediately and PNO procedure will
   be repeated based on timer
   Suspend - scanning will start at suspend
@@ -4400,22 +4795,22 @@
 } ePNOMode;
 
 /*Authentication type*/
-typedef enum 
+typedef enum
 {
-    eAUTH_TYPE_ANY                   = 0,    
+    eAUTH_TYPE_ANY                   = 0,
     eAUTH_TYPE_OPEN_SYSTEM           = 1,
-    
+
     // Upper layer authentication types
     eAUTH_TYPE_WPA                   = 2,
     eAUTH_TYPE_WPA_PSK               = 3,
-    
+
     eAUTH_TYPE_RSN                   = 4,
     eAUTH_TYPE_RSN_PSK               = 5,
     eAUTH_TYPE_FT_RSN                = 6,
     eAUTH_TYPE_FT_RSN_PSK            = 7,
     eAUTH_TYPE_WAPI_WAI_CERTIFICATE  = 8,
     eAUTH_TYPE_WAPI_WAI_PSK          = 9,
-    
+
     eAUTH_TYPE_MAX = WLAN_HAL_MAX_ENUM_SIZE
 
 }tAuthType;
@@ -4429,7 +4824,7 @@
     eED_TKIP          = 3,
     eED_CCMP          = 4,
     eED_WPI           = 5,
-        
+
     eED_TYPE_MAX = WLAN_HAL_MAX_ENUM_SIZE
 } tEdType;
 
@@ -4443,7 +4838,7 @@
   eBCAST_TYPE_MAX     = WLAN_HAL_MAX_ENUM_SIZE
 } tSSIDBcastType;
 
-/* 
+/*
   The network description for which PNO will have to look for
 */
 typedef PACKED_PRE struct PACKED_POST
@@ -4452,51 +4847,51 @@
   tSirMacSSid ssId;
 
   /*Authentication type for the network*/
-  tAuthType   authentication; 
+  tAuthType   authentication;
 
   /*Encryption type for the network*/
-  tEdType     encryption; 
+  tEdType     encryption;
 
-  /*Indicate the channel on which the Network can be found 
+  /*Indicate the channel on which the Network can be found
     0 - if all channels */
   tANI_U8     ucChannelCount;
   tANI_U8     aChannels[WLAN_HAL_PNO_MAX_NETW_CHANNELS];
 
   /*Indicates the RSSI threshold for the network to be considered*/
   tANI_U8     rssiThreshold;
-}tNetworkType; 
+}tNetworkType;
 
 typedef PACKED_PRE struct PACKED_POST
 {
   /*How much it should wait */
-  tANI_U32    uTimerValue; 
+  tANI_U32    uTimerValue;
 
-  /*How many times it should repeat that wait value 
+  /*How many times it should repeat that wait value
     0 - keep using this timer until PNO is disabled*/
-  tANI_U32    uTimerRepeat; 
+  tANI_U32    uTimerRepeat;
 
-  /*e.g:   2 3 
-           4 0 
+  /*e.g:   2 3
+           4 0
     - it will wait 2s between consecutive scans for 3 times
     - after that it will wait 4s between consecutive scans until disabled*/
-}tScanTimer; 
+}tScanTimer;
 
-/* 
+/*
   The network parameters to be sent to the PNO algorithm
 */
 typedef PACKED_PRE struct PACKED_POST
 {
   /*set to 0 if you wish for PNO to use its default telescopic timer*/
-  tANI_U8     ucScanTimersCount; 
+  tANI_U8     ucScanTimersCount;
 
-  /*A set value represents the amount of time that PNO will wait between 
+  /*A set value represents the amount of time that PNO will wait between
     two consecutive scan procedures
     If the desired is for a uniform timer that fires always at the exact same
     interval - one single value is to be set
     If there is a desire for a more complex - telescopic like timer multiple
     values can be set - once PNO reaches the end of the array it will
     continue scanning at intervals presented by the last value*/
-  tScanTimer  aTimerValues[WLAN_HAL_PNO_MAX_SCAN_TIMERS]; 
+  tScanTimer  aTimerValues[WLAN_HAL_PNO_MAX_SCAN_TIMERS];
 
 }tScanTimersType;
 
@@ -4507,7 +4902,7 @@
 
     /*Immediate,  On Suspend,   On Resume*/
     ePNOMode         modePNO;
-    
+
     /*Number of networks sent for PNO*/
     tANI_U32          ucNetworksCount;
 
@@ -4515,20 +4910,20 @@
     tNetworkType     aNetworks[WLAN_HAL_PNO_MAX_SUPP_NETWORKS];
 
     /*The scan timers required for PNO*/
-    tScanTimersType  scanTimers; 
+    tScanTimersType  scanTimers;
 
     /*Probe template for 2.4GHz band*/
-    tANI_U16         us24GProbeSize; 
+    tANI_U16         us24GProbeSize;
     tANI_U8          a24GProbeTemplate[WLAN_HAL_PNO_MAX_PROBE_SIZE];
 
     /*Probe template for 5GHz band*/
-    tANI_U16         us5GProbeSize; 
+    tANI_U16         us5GProbeSize;
     tANI_U8          a5GProbeTemplate[WLAN_HAL_PNO_MAX_PROBE_SIZE];
 
 } tPrefNetwListParams, * tpPrefNetwListParams;
 
 /*
-  Preferred network list request 
+  Preferred network list request
 */
 typedef PACKED_PRE struct PACKED_POST
 {
@@ -4537,7 +4932,7 @@
 }  tSetPrefNetwListReq, *tpSetPrefNetwListReq;
 
 
-/* 
+/*
   The network description for which PNO will have to look for
 */
 typedef PACKED_PRE struct PACKED_POST
@@ -4546,22 +4941,22 @@
   tSirMacSSid ssId;
 
   /*Authentication type for the network*/
-  tAuthType   authentication; 
+  tAuthType   authentication;
 
   /*Encryption type for the network*/
-  tEdType     encryption; 
+  tEdType     encryption;
 
   /*SSID broadcast type, normal, hidden or unknown*/
   tSSIDBcastType bcastNetworkType;
 
-  /*Indicate the channel on which the Network can be found 
+  /*Indicate the channel on which the Network can be found
     0 - if all channels */
   tANI_U8     ucChannelCount;
   tANI_U8     aChannels[WLAN_HAL_PNO_MAX_NETW_CHANNELS];
 
   /*Indicates the RSSI threshold for the network to be considered*/
   tANI_U8     rssiThreshold;
-}tNetworkTypeNew; 
+}tNetworkTypeNew;
 
 typedef PACKED_PRE struct PACKED_POST {
 
@@ -4570,22 +4965,22 @@
 
     /*Immediate,  On Suspend,   On Resume*/
     ePNOMode         modePNO;
-    
+
     /*Number of networks sent for PNO*/
-    tANI_U32         ucNetworksCount; 
+    tANI_U32         ucNetworksCount;
 
     /*The networks that PNO needs to look for*/
     tNetworkTypeNew  aNetworks[WLAN_HAL_PNO_MAX_SUPP_NETWORKS];
 
     /*The scan timers required for PNO*/
-    tScanTimersType  scanTimers; 
+    tScanTimersType  scanTimers;
 
     /*Probe template for 2.4GHz band*/
-    tANI_U16         us24GProbeSize; 
+    tANI_U16         us24GProbeSize;
     tANI_U8          a24GProbeTemplate[WLAN_HAL_PNO_MAX_PROBE_SIZE];
 
     /*Probe template for 5GHz band*/
-    tANI_U16         us5GProbeSize; 
+    tANI_U16         us5GProbeSize;
     tANI_U8          a5GProbeTemplate[WLAN_HAL_PNO_MAX_PROBE_SIZE];
 
 } tPrefNetwListParamsNew, * tpPrefNetwListParamsNew;
@@ -4600,25 +4995,25 @@
 }  tSetPrefNetwListReqNew, *tpSetPrefNetwListReqNew;
 
 /*
-  Preferred network list response 
+  Preferred network list response
 */
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader header;
 
-   /*status of the request - just to indicate that PNO has acknowledged 
+   /*status of the request - just to indicate that PNO has acknowledged
      the request and will start scanning*/
    tANI_U32   status;
 }  tSetPrefNetwListResp, *tpSetPrefNetwListResp;
 
 /*
-  Preferred network indication parameters 
+  Preferred network indication parameters
 */
 typedef PACKED_PRE struct PACKED_POST {
 
   /*Network that was found with the highest RSSI*/
   tSirMacSSid ssId;
-  
+
   /*Indicates the RSSI */
   tANI_U8     rssi;
 
@@ -4642,7 +5037,7 @@
 } tRssiFilterParams, * tpRssiFilterParams;
 
 /*
-  RSSI Filter request 
+  RSSI Filter request
 */
 typedef PACKED_PRE struct PACKED_POST
 {
@@ -4659,32 +5054,32 @@
    tANI_U32   status;
 }  tSetRssiFilterResp, *tpSetRssiFilterResp;
 /*
-  Update scan params 
+  Update scan params
 */
-typedef PACKED_PRE struct PACKED_POST  
+typedef PACKED_PRE struct PACKED_POST
 {
 
   /*Host setting for 11d*/
-  tANI_U8   b11dEnabled; 
+  tANI_U8   b11dEnabled;
 
   /*Lets PNO know that host has determined the regulatory domain*/
   tANI_U8   b11dResolved;
 
   /*Channels on which PNO is allowed to scan*/
-  tANI_U8   ucChannelCount; 
-  tANI_U8   aChannels[WLAN_HAL_PNO_MAX_NETW_CHANNELS]; 
+  tANI_U8   ucChannelCount;
+  tANI_U8   aChannels[WLAN_HAL_PNO_MAX_NETW_CHANNELS];
 
   /*Minimum channel time*/
-  tANI_U16  usActiveMinChTime; 
+  tANI_U16  usActiveMinChTime;
 
   /*Maximum channel time*/
-  tANI_U16  usActiveMaxChTime; 
+  tANI_U16  usActiveMaxChTime;
 
   /*Minimum channel time*/
-  tANI_U16  usPassiveMinChTime; 
+  tANI_U16  usPassiveMinChTime;
 
   /*Maximum channel time*/
-  tANI_U16  usPassiveMaxChTime; 
+  tANI_U16  usPassiveMaxChTime;
 
   /*Cb State*/
   ePhyChanBondState cbState;
@@ -4693,7 +5088,7 @@
 
 /*
   Update scan params - sent from host to PNO
-  to be used during PNO scanning 
+  to be used during PNO scanning
 */
 typedef PACKED_PRE struct PACKED_POST{
 
@@ -4703,7 +5098,7 @@
 
 /*
   Update scan params - sent from host to PNO
-  to be used during PNO scanning 
+  to be used during PNO scanning
 */
 typedef PACKED_PRE struct PACKED_POST{
 
@@ -4770,7 +5165,7 @@
   HAL_RCV_FILTER_TYPE_MAX_ENUM_SIZE
 }tHalReceivePacketFilterType;
 
-typedef enum 
+typedef enum
 {
   HAL_FILTER_PROTO_TYPE_INVALID,
   HAL_FILTER_PROTO_TYPE_MAC,
@@ -4781,7 +5176,7 @@
   HAL_FILTER_PROTO_TYPE_MAX
 }tHalRcvPktFltProtocolType;
 
-typedef enum 
+typedef enum
 {
   HAL_FILTER_CMP_TYPE_INVALID,
   HAL_FILTER_CMP_TYPE_EQUAL,
@@ -4790,7 +5185,7 @@
   HAL_FILTER_CMP_TYPE_MAX
 }tHalRcvPktFltCmpFlagType;
 
-typedef PACKED_PRE struct PACKED_POST 
+typedef PACKED_PRE struct PACKED_POST
 {
     tANI_U8                          protocolLayer;
     tANI_U8                          cmpFlag;
@@ -4805,29 +5200,40 @@
 {
     tANI_U8                         filterId;
     tANI_U8                         filterType;
-    tANI_U8                         numParams; 
-    tANI_U32                        coleasceTime; 
+    tANI_U8                         numParams;
+    tANI_U32                        coalesceTime;
     tHalRcvPktFilterParams          paramsData[1];
 }tHalRcvPktFilterCfgType, *tpHalRcvPktFilterCfgType;
 
 typedef PACKED_PRE struct PACKED_POST
 {
+    tANI_U8                         filterId;
+    tANI_U8                         filterType;
+    tANI_U8                         numParams;
+    tANI_U32                        coleasceTime;
+    tANI_U8                         bssIdx;
+    tHalRcvPktFilterParams          paramsData[1];
+}tHalSessionizedRcvPktFilterCfgType, *tpHalSessionizedRcvPktFilterCfgType;
+
+typedef PACKED_PRE struct PACKED_POST
+{
   tHalMsgHeader                 header;
   tHalRcvPktFilterCfgType       pktFilterCfg;
 } tHalSetRcvPktFilterReqMsg, *tpHalSetRcvPktFilterReqMsg;
 
-
-typedef PACKED_PRE struct PACKED_POST 
+typedef PACKED_PRE struct PACKED_POST
 {
     tANI_U8         dataOffset; /* from start of the respective frame header */
     tANI_U32       cMulticastAddr;
     tSirMacAddr    multicastAddr[HAL_MAX_NUM_MULTICAST_ADDRESS];
+    tANI_U8        bssIdx;
 } tHalRcvFltMcAddrListType, *tpHalRcvFltMcAddrListType;
 
 typedef PACKED_PRE struct PACKED_POST
 {
     /* success or failure */
     tANI_U32   status;
+    tANI_U8    bssIdx;
 } tHalSetPktFilterRspParams, *tpHalSetPktFilterRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -4836,12 +5242,18 @@
    tHalSetPktFilterRspParams   pktFilterRspParams;
 }  tHalSetPktFilterRspMsg, *tpHalSetPktFilterRspMsg;
 
+typedef PACKED_PRE struct PACKED_POST
+{
+   tANI_U8    bssIdx;
+} tHalRcvFltPktMatchCntReqParams, *tpHalRcvFltPktMatchCntReqParams;
 
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader        header;
+   tHalRcvFltPktMatchCntReqParams   pktMatchCntReqParams;
 } tHalRcvFltPktMatchCntReqMsg, *tpHalRcvFltPktMatchCntReqMsg;
 
+
 typedef PACKED_PRE struct PACKED_POST
 {
    tANI_U8    filterId;
@@ -4851,8 +5263,9 @@
 {
    /* Success or Failure */
    tANI_U32                 status;
-   tANI_U32                 matchCnt;   
-   tHalRcvFltPktMatchCnt    filterMatchCnt[HAL_MAX_NUM_FILTERS]; 
+   tANI_U32                 matchCnt;
+   tHalRcvFltPktMatchCnt    filterMatchCnt[HAL_MAX_NUM_FILTERS];
+   tANI_U8                  bssIdx;
 } tHalRcvFltPktMatchRspParams, *tptHalRcvFltPktMatchRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -4865,6 +5278,7 @@
 {
     tANI_U32   status;  /* only valid for response message */
     tANI_U8    filterId;
+    tANI_U8    bssIdx;
 }tHalRcvFltPktClearParam, *tpHalRcvFltPktClearParam;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -4881,7 +5295,8 @@
 
 typedef PACKED_PRE struct PACKED_POST
 {
-    tANI_U32   status;  
+    tANI_U32   status;
+    tANI_U8    bssIdx;
 }tHalRcvFltPktSetMcListRspType, *tpHalRcvFltPktSetMcListRspType;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -4907,7 +5322,7 @@
   tANI_U32 uIgnoreDTIM;
 
   /*DTIM Period*/
-  tANI_U32 uDTIMPeriod; 
+  tANI_U32 uDTIMPeriod;
 
   /* Listen Interval */
   tANI_U32 uListenInterval;
@@ -4919,7 +5334,7 @@
   tANI_U32 uEnableBET;
 
   /* Beacon Early Termination Interval */
-  tANI_U32 uBETInterval; 
+  tANI_U32 uBETInterval;
 }tSetPowerParamsType, *tpSetPowerParamsType;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -4949,7 +5364,7 @@
 
 typedef PACKED_PRE struct PACKED_POST{
 
-   tHalMsgHeader header;    
+   tHalMsgHeader header;
    tWlanFeatCaps wlanFeatCaps;
 
 }  tWlanFeatCapsMsg, *tpWlanFeatCapsMsg;
@@ -4958,9 +5373,18 @@
 typedef enum {
     MCC        = 0,
     P2P        = 1,
+    DOT11AC    = 2,
+    SLM_SESSIONIZATION = 3,
     MAX_FEATURE_SUPPORTED = 128,
 } placeHolderInCapBitmap;
 
+
+#define IS_MCC_SUPPORTED_BY_HOST (!!(halMsg_GetHostWlanFeatCaps(MCC)))
+#define IS_SLM_SESSIONIZATION_SUPPORTED_BY_HOST (!!(halMsg_GetHostWlanFeatCaps(SLM_SESSIONIZATION)))
+
+
+tANI_U8 halMsg_GetHostWlanFeatCaps(tANI_U8 feat_enum_value);
+
 #define setFeatCaps(a,b)   {  tANI_U32 arr_index, bit_index; \
                               if ((b>=0) && (b<=127)) { \
                                 arr_index = b/32; \
@@ -4979,7 +5403,7 @@
                               if ((b>=0) && (b<=127)) { \
                                 arr_index = b/32; \
                                 bit_index = b % 32; \
-                                (a)->featCaps[arr_index] |= (0<<bit_index); \
+                                (a)->featCaps[arr_index] &= ~(1<<bit_index); \
                               } \
                            }
 
@@ -5053,6 +5477,8 @@
 {
     tHalMsgHeader       header;
     tWakeReasonParams   wakeReasonParams;
+    tANI_U32            uBssIdx : 8;
+    tANI_U32            bReserved : 24;
 } tHalWakeReasonInd, *tpHalWakeReasonInd;
 
 /*---------------------------------------------------------------------------
@@ -5067,9 +5493,10 @@
 typedef PACKED_PRE struct PACKED_POST
 {
   tANI_U32     ulFlags;             /* optional flags */
-  tANI_U8      aKCK[HAL_GTK_KCK_BYTES];  /* Key confirmation key */ 
+  tANI_U8      aKCK[HAL_GTK_KCK_BYTES];  /* Key confirmation key */
   tANI_U8      aKEK[HAL_GTK_KEK_BYTES];  /* key encryption key */
   tANI_U64     ullKeyReplayCounter; /* replay counter */
+  tANI_U8      bssIdx;
 } tHalGtkOffloadReqParams, *tpHalGtkOffloadReqParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -5084,6 +5511,7 @@
 typedef PACKED_PRE struct PACKED_POST
 {
     tANI_U32   ulStatus;   /* success or failure */
+    tANI_U8    bssIdx;
 } tHalGtkOffloadRspParams, *tpHalGtkOffloadRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -5096,10 +5524,16 @@
 /*---------------------------------------------------------------------------
 * WLAN_HAL_GTK_OFFLOAD_GETINFO_REQ
 *--------------------------------------------------------------------------*/
+typedef PACKED_PRE struct PACKED_POST
+{
+   tANI_U8    bssIdx;
+
+} tHalGtkOffloadGetInfoReqParams, *tptHalGtkOffloadGetInfoReqParams;
 
 typedef PACKED_PRE struct PACKED_POST
 {
    tHalMsgHeader header;
+   tHalGtkOffloadGetInfoReqParams gtkOffloadGetInfoReqParams;
 }  tHalGtkOffloadGetInfoReqMsg, *tpHalGtkOffloadGetInfoReqMsg;
 
 /*---------------------------------------------------------------------------
@@ -5113,6 +5547,7 @@
    tANI_U32   ulTotalRekeyCount;    /* total rekey attempts */
    tANI_U32   ulGTKRekeyCount;      /* successful GTK rekeys */
    tANI_U32   ulIGTKRekeyCount;     /* successful iGTK rekeys */
+   tANI_U8    bssIdx;
 } tHalGtkOffloadGetInfoRspParams, *tptHalGtkOffloadGetInfoRspParams;
 
 typedef PACKED_PRE struct PACKED_POST
@@ -5150,7 +5585,7 @@
    HAL_THERMAL_MITIGATION_LEVEL_3 - 3rd level of thermal mitigation
    HAL_THERMAL_MITIGATION_LEVEL_4 - 4th level of thermal mitigation
 */
-typedef enum 
+typedef enum
 {
   HAL_THERMAL_MITIGATION_LEVEL_INVALID = -1,
   HAL_THERMAL_MITIGATION_LEVEL_0,
@@ -5169,7 +5604,7 @@
 
    /* Thermal Mitigation Level */
    tHalThermalMitigationLevelType thermalMitLevel;
-    
+
 }tSetThermalMitgationType, *tpSetThermalMitgationType;
 
 /* WLAN_HAL_SET_THERMAL_MITIGATION_REQ */
diff --git a/riva/inc/wlan_nv.h b/riva/inc/wlan_nv.h
index de4ec17..d881276 100644
--- a/riva/inc/wlan_nv.h
+++ b/riva/inc/wlan_nv.h
@@ -523,10 +523,92 @@
     HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_135_MBPS,
     HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_150_MBPS,
 
+#ifdef WLAN_FEATURE_11AC
+    /*11A duplicate 80MHz Rates*/
+    HAL_PHY_RATE_11AC_DUP_6_MBPS,
+    HAL_PHY_RATE_11AC_DUP_9_MBPS,
+    HAL_PHY_RATE_11AC_DUP_12_MBPS,
+    HAL_PHY_RATE_11AC_DUP_18_MBPS,
+    HAL_PHY_RATE_11AC_DUP_24_MBPS,
+    HAL_PHY_RATE_11AC_DUP_36_MBPS,
+    HAL_PHY_RATE_11AC_DUP_48_MBPS,
+    HAL_PHY_RATE_11AC_DUP_54_MBPS,
+
+    /*11AC rate 20MHZ Normal GI*/
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_6_5_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_13_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_19_5_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_26_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_39_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_52_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_58_5_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_65_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_NGI_78_MBPS,
+    
+    /*11AC rate 20MHZ Shortl GI*/
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_7_2_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_14_4_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_21_6_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_28_8_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_43_3_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_57_7_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_65_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_72_2_MBPS,
+    HAL_PHY_RATE_VHT_20MHZ_MCS_1NSS_SGI_86_6_MBPS,
+    
+    /*11AC rates 40MHZ normal GI*/
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_13_5_MBPS ,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_27_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_40_5_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_54_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_81_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_108_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_121_5_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_135_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_162_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_NGI_180_MBPS,
+    
+    /*11AC rates 40MHZ short GI*/
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_15_MBPS ,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_30_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_45_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_60_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_90_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_120_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_135_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_150_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_180_MBPS,
+    HAL_PHY_RATE_VHT_40MHZ_MCS_1NSS_CB_SGI_200_MBPS,
+    
+    /*11AC rates 80 MHZ normal GI*/
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_29_3_MBPS ,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_58_5_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_87_8_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_117_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_175_5_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_234_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_263_3_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_292_5_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_351_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_NGI_390_MBPS,
+    
+    /*11AC rates 80 MHZ short GI*/
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_32_5_MBPS ,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_65_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_97_5_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_130_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_195_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_260_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_292_5_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_325_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_390_MBPS,
+    HAL_PHY_RATE_VHT_80MHZ_MCS_1NSS_CB_SGI_433_3_MBPS,
+#endif //WLAN_FEATURE_11AC
+
     NUM_HAL_PHY_RATES,
     HAL_PHY_RATE_INVALID,
     MIN_RATE_INDEX = 0,
-    MAX_RATE_INDEX = HAL_PHY_RATE_MCS_1NSS_MM_SG_CB_150_MBPS,
+    MAX_RATE_INDEX = NUM_HAL_PHY_RATES - 1,
     HAL_PHY_RATE_INVALID_MAX_FIELD = 0x7FFFFFFF  /* define as 4 bytes data */
 }eHalPhyRates;
 
diff --git a/riva/inc/wlan_qct_dev_defs.h b/riva/inc/wlan_qct_dev_defs.h
index c0e9ddb..87a2f84 100644
--- a/riva/inc/wlan_qct_dev_defs.h
+++ b/riva/inc/wlan_qct_dev_defs.h
@@ -37,14 +37,45 @@
  * --------------------------------------------------------------------
  */
 
+#ifdef WCN_PRONTO
+#ifdef WCN_PRONTO_V1
+
+/* In Pronto 1.0 TPE descriptor size is increased to 1K per station
+ * but not the cMEM allocated for hardware descriptors. Due to this
+ * memory limitation the number of stations are limited to 9 and BSS
+ * to 2 respectively. 
+ *
+ * In Pronto 2.0, TPE descriptor size is reverted
+ * back to 512 bytes and hence more stations and BSSs can be supported
+ * from Pronto 2.0
+ *
+ * In Pronto 1.0, 9 HW stations are supported including BCAST STA(staId 0)
+ * and SELF STA(staId 1). So total ASSOC stations which can connect to
+ * Pronto 1.0 Softap = 9 - 1(self sta) - 1(Bcast sta) = 7 stations
+ */
+#define HAL_NUM_STA                 9
+#define HAL_NUM_BSSID               2
+#define HAL_NUM_UMA_DESC_ENTRIES    9
+
+#else /* WCN_PRONTO_V1 */
+
+#define HAL_NUM_STA                 14
+#define HAL_NUM_BSSID               4
+#define HAL_NUM_UMA_DESC_ENTRIES    14
+
+#endif /* WCN_PRONTO_V1 */
+#else  /* WCN_PRONTO */
+
 /*In prima 12 HW stations are supported including BCAST STA(staId 0)
  and SELF STA(staId 1) so total ASSOC stations which can connect to Prima
  SoftAP = 12 - 1(Self STa) - 1(Bcast Sta) = 10 Stations. */
-
 #define HAL_NUM_STA                 12
 #define HAL_NUM_BSSID               2
 #define HAL_NUM_UMA_DESC_ENTRIES    12
 
+#endif /* WCN_PRONTO */
+
+
 #define HAL_INVALID_BSSIDX          HAL_NUM_BSSID
 
 #define MAX_NUM_OF_BACKOFFS         8
@@ -121,11 +152,21 @@
     /* Special WQ for BMU to dropping all frames coming to this WQ ID */
     BMUWQ_SINK = 255,
 
-    /* Total BMU WQ count in Volans */
+#ifdef WCN_PRONTO
+    BMUWQ_BMU_CMEM_IDLE_BD = 27,
+    /* Total BMU WQ count in Pronto */
+    BMUWQ_NUM = 28,
+    
+    //WQs 17 through 22 are enabled in Pronto. So, set not supported mask to 0.
+    BMUWQ_NOT_SUPPORTED_MASK = 0x0,
+#else
+    /* Total BMU WQ count in Prima */
     BMUWQ_NUM = 27,
 
-    //Volans has excluded support for WQs 17 through 22.
+    //Prima has excluded support for WQs 17 through 22.
     BMUWQ_NOT_SUPPORTED_MASK = 0x7e0000,
+#endif //WCN_PRONTO
+
 
     /* Aliases */
     BMUWQ_BTQM_TX_MGMT = BMUWQ_BTQM,