summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Brown <dustinb@codeaurora.org>2016-10-04 12:49:10 -0700
committerqcabuildsw <qcabuildsw@localhost>2016-10-11 14:56:30 -0700
commit5e06bd358d95b4f1060671331a8bdf506bfeab41 (patch)
treee7107bcf14fb163820a2e3b0485d32ba8662f44f
parentb4cbcd54235848b37313cce2602a2137d9f74d33 (diff)
qcacld-3.0: Null-check 5GHz band before configuration
There is a null pointer dereference during 5GHz band configure when wifi mode is forced to 802.11b in the ini config file. Perform a null check before 5GHz configuration and skip if needed. Change-Id: I70b7576e7bf49fa66a8c88de49dad9a1643cc7cb CRs-Fixed: 1074146
-rw-r--r--core/hdd/src/wlan_hdd_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index e5bffbaec4f0..75c5aec1d67f 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -1001,6 +1001,11 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
wiphy->bands[IEEE80211_BAND_5GHZ];
uint32_t temp = 0;
+ if (!band_5g) {
+ hdd_info("5GHz band disabled, skipping capability population");
+ return;
+ }
+
/* Get the current MPDU length */
status =
sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_VHT_MAX_MPDU_LENGTH,