From 220ce5c328b944f1b149ce3f263c1cb49352e142 Mon Sep 17 00:00:00 2001 From: Amruta Kulkarni Date: Mon, 11 Nov 2019 10:00:15 -0800 Subject: [PATCH] qcacld-3.0: Fix uninitialized parameters Initialize parameters with default values in wlan_hdd_update_phymode(), csr_is_phy_mode_match() Change-Id: I2b3b2aff09448776b5ef1d2cdc24b3e0abf3ec39 CRs-Fixed: 2559005 --- core/hdd/src/wlan_hdd_wext.c | 2 +- core/sme/src/csr/csr_util.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index b2c8355bc130..19a178181ff9 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -3835,7 +3835,7 @@ int wlan_hdd_update_phymode(struct hdd_adapter *adapter, int new_phymode) mac_handle_t mac_handle = hdd_ctx->mac_handle; bool band_24 = false, band_5g = false; bool ch_bond24 = false, ch_bond5g = false; - struct sme_config_params *sme_config; + struct sme_config_params *sme_config = NULL; struct csr_config_params *csr_config; uint32_t chwidth = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE; uint8_t vhtchanwidth; diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index e9e6ceab2fa4..93544eb64b36 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -1933,7 +1933,8 @@ bool csr_is_phy_mode_match(struct mac_context *mac, uint32_t phyMode, tDot11fBeaconIEs *pIes) { bool fMatch = false; - eCsrPhyMode phyModeInBssDesc = eCSR_DOT11_MODE_AUTO, phyMode2; + eCsrPhyMode phyModeInBssDesc = eCSR_DOT11_MODE_AUTO; + eCsrPhyMode phyMode2 = eCSR_DOT11_MODE_AUTO; enum csr_cfgdot11mode cfgDot11ModeToUse = eCSR_CFG_DOT11_MODE_AUTO; uint32_t bitMask, loopCount; uint8_t bss_chan_id;