summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@qca.qualcomm.com>2014-06-12 06:26:30 -0700
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-06-21 02:10:05 -0700
commitf071747742e74b89df8d1d76562b71f0b5761fc6 (patch)
tree5bc437060d11020c0366d4ecabaa2b7d0d3a3ca2
parentbaa53e6f46782019dc84050985e2859bb0cdfb5b (diff)
wlan: correctly update WNI_CFG_HT_CAP_INFO
Previously Change-Id I2be31e9e5bd3ce5c8821156b28578fec39c719bc, "qcacld: hdd: Fix memory corruption while updating config dat", fixed potential stack corruptions when modifying WNI_CFG_HT_CAP_INFO. Recent comparison of the prima and qcacld implementions of this fix revealed a slight difference in the two fixes. Since the prima fix looks "more correct", align the qcacld fix to mirror the prima fix. Change-Id: Id2225f15717b4b939c00b5a0bad1aee4180bdbe8 CRs-fixed: 679359
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c8
-rwxr-xr-xCORE/HDD/src/wlan_hdd_main.c3
2 files changed, 6 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 3dafdf323ed3..e96fc9c36292 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -5416,10 +5416,10 @@ v_BOOL_t hdd_update_config_dat( hdd_context_t *pHddCtx )
phtCapInfo->rxSTBC = pConfig->enableRxSTBC;
phtCapInfo->txSTBC = pConfig->enableTxSTBC;
phtCapInfo->advCodingCap = pConfig->enableRxLDPC;
-
- if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_HT_CAP_INFO,
- *(tANI_U16 *)phtCapInfo, NULL, eANI_BOOLEAN_FALSE)
- ==eHAL_STATUS_FAILURE)
+ val = val16;
+ if (ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_HT_CAP_INFO,
+ val, NULL, eANI_BOOLEAN_FALSE)
+ == eHAL_STATUS_FAILURE)
{
fStatus = FALSE;
hddLog(LOGE, "Could not pass on WNI_CFG_HT_CAP_INFO to CCM");
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index e80070aefbb4..3f957643f8ac 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -6024,8 +6024,9 @@ static void hdd_update_tgt_ht_cap(hdd_context_t *hdd_ctx,
{
pconfig->enable2x2 = 0;
}
+ val32 = val16;
status = ccmCfgSetInt(hdd_ctx->hHal, WNI_CFG_HT_CAP_INFO,
- *(tANI_U16 *)phtCapInfo, NULL, eANI_BOOLEAN_FALSE);
+ val32, NULL, eANI_BOOLEAN_FALSE);
if (status != eHAL_STATUS_SUCCESS)
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
"%s: could not set HT capabilty to CCM",