wlan: Add support to configure RX buffer count

DXE driver will query total RX resource count, and will allocate
only 1/4 of the resource to each RX channel

Change-Id: I790c945710bcc680ab8facbad11c07d54065af12
CRs-Fixed: 490432
diff --git a/CORE/DXE/src/wlan_qct_dxe_cfg_i.c b/CORE/DXE/src/wlan_qct_dxe_cfg_i.c
index 24bd93c..6c782f3 100644
--- a/CORE/DXE/src/wlan_qct_dxe_cfg_i.c
+++ b/CORE/DXE/src/wlan_qct_dxe_cfg_i.c
@@ -386,7 +386,7 @@
       All the channels must have it's own configurations
 
   @  Parameters
-      WLANDXE_CtrlBlkType     *dxeCtrlBlk,
+      WLANDXE_CtrlBlkType:    *dxeCtrlBlk,
                                DXE host driver main control block
       WLANDXE_ChannelCBType   *channelEntry
                                Channel specific control block
@@ -409,6 +409,7 @@
    wpt_uint32                  dxeControlWriteEop = 0;
    wpt_uint32                  dxeControlWriteEopInt = 0;
    wpt_uint32                  idx;
+   wpt_uint32                  rxResourceCount = 0;
    WLANDXE_ChannelMappingType *mappedChannel = NULL;
 
    /* Sanity Check */
@@ -621,7 +622,16 @@
    channelEntry->extraConfig.intMask = channelInterruptMask[mappedChannel->DMAChannel];
 
 
-   channelEntry->numDesc            = mappedChannel->channelConfig->nDescs;
+   wpalGetNumRxRawPacket(&rxResourceCount);
+   if((WDTS_CHANNEL_TX_LOW_PRI == channelEntry->channelType) ||
+      (0 == rxResourceCount))
+   {
+      channelEntry->numDesc         = mappedChannel->channelConfig->nDescs;
+   }
+   else
+   {
+      channelEntry->numDesc         = rxResourceCount / 4;
+   }
    channelEntry->assignedDMAChannel = mappedChannel->DMAChannel;
    channelEntry->numFreeDesc             = 0;
    channelEntry->numRsvdDesc             = 0;