From 93bf1753594885c84dc34e70472d1eae1fcf589f Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Fri, 15 Dec 2017 17:31:19 +0530 Subject: qcacld-3.0: Change pool mask to uint32_t from unsigned long There is a crash observed while turning on the wifi. In "hdd_apply_cfg_ini" api value from uint32_t type is getting copied to unsigned long values, which is resulting in a crash. Change the type of ini values "provisioned_intf_pool" and "derived_intf_pool" from unsigned long to uint32_t. Change-Id: I7e2f9fa906afe0348a123292a26ca9167ddcd415 CRs-Fixed: 2159801 --- core/hdd/inc/wlan_hdd_cfg.h | 4 ++-- core/hdd/src/wlan_hdd_cfg.c | 4 ++-- core/hdd/src/wlan_hdd_main.c | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 5388f194f5d2..ab00cb8da2cb 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -14766,8 +14766,8 @@ struct hdd_config { uint8_t tx_chain_mask_5g; uint8_t rx_chain_mask_5g; bool mac_provision; - unsigned long provisioned_intf_pool; - unsigned long derived_intf_pool; + uint32_t provisioned_intf_pool; + uint32_t derived_intf_pool; }; #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var)) diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index cd65c3704fc4..4b49e784df84 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -7227,10 +7227,10 @@ void hdd_cfg_print(hdd_context_t *pHddCtx) hdd_debug("Name = [%s] value = [0x%x]", CFG_ENABLE_MAC_PROVISION_NAME, pHddCtx->config->mac_provision); - hdd_debug("Name = [%s] value = [0x%lx]", + hdd_debug("Name = [%s] value = [0x%x]", CFG_PROVISION_INTERFACE_POOL_NAME, pHddCtx->config->provisioned_intf_pool); - hdd_debug("Name = [%s] value = [0x%lx]", + hdd_debug("Name = [%s] value = [0x%x]", CFG_DERIVED_INTERFACE_POOL_NAME, pHddCtx->config->derived_intf_pool); } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 9bb89a22bbbb..f266f25e8909 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2639,12 +2639,14 @@ uint8_t *wlan_hdd_get_intf_addr(hdd_context_t *hdd_ctx, uint8_t *mac_addr = NULL; if (qdf_atomic_test_bit(interface_type, - &hdd_ctx->config->provisioned_intf_pool)) + (unsigned long *) + (&hdd_ctx->config->provisioned_intf_pool))) mac_addr = wlan_hdd_get_provisioned_intf_addr(hdd_ctx); if ((!mac_addr) && (qdf_atomic_test_bit(interface_type, - &hdd_ctx->config->derived_intf_pool))) + (unsigned long *) + (&hdd_ctx->config->derived_intf_pool)))) mac_addr = wlan_hdd_get_derived_intf_addr(hdd_ctx); if (!mac_addr) -- cgit v1.2.3