wlan: Changes to set LDPC capability bit in HT info

Currently driver is not setting LDPC encoding into bit in ht
capability for association request.

Add changes to set LDPC capability bit in HT info

Change-Id: I8296d3983e6a426b4ff56e3b594462f5ae7fa608
CRs-Fixed: 2061835
diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c
index ef62a74..017867e 100644
--- a/CORE/SYS/legacy/src/utils/src/parserApi.c
+++ b/CORE/SYS/legacy/src/utils/src/parserApi.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -598,7 +598,7 @@
 
     uHTCapabilityInfo.nCfgValue16 = nCfgValue & 0xFFFF;
 
-    pDot11f->advCodingCap             = uHTCapabilityInfo.htCapInfo.advCodingCap;
+
     pDot11f->mimoPowerSave            = uHTCapabilityInfo.htCapInfo.mimoPowerSave;
     pDot11f->greenField               = uHTCapabilityInfo.htCapInfo.greenField;
     pDot11f->shortGI20MHz             = uHTCapabilityInfo.htCapInfo.shortGI20MHz;
@@ -616,10 +616,15 @@
     if (psessionEntry == NULL) // Only in case of NO session
     {
         pDot11f->supportedChannelWidthSet = uHTCapabilityInfo.htCapInfo.supportedChannelWidthSet;
+        pDot11f->advCodingCap = uHTCapabilityInfo.htCapInfo.advCodingCap;
     }
     else
     {
         pDot11f->supportedChannelWidthSet = psessionEntry->htSupportedChannelWidthSet;
+        if (psessionEntry->txLdpcIniFeatureEnabled & 0x1)
+            pDot11f->advCodingCap = 1;
+        else
+            pDot11f->advCodingCap = 0;
     }
 
     /* Ensure that shortGI40MHz is Disabled if supportedChannelWidthSet is
@@ -813,7 +818,10 @@
 
     nCfgValue = 0;
     CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_LDPC_CODING_CAP, nCfgValue );
-    pDot11f->ldpcCodingCap = (nCfgValue & 0x0001);
+    if (nCfgValue & 0x2)
+        pDot11f->ldpcCodingCap = 1;
+    else
+        pDot11f->ldpcCodingCap = 0;
 
     nCfgValue = 0;
     CFG_GET_INT( nStatus, pMac, WNI_CFG_VHT_SHORT_GI_80MHZ, nCfgValue );