qcacld-3.0: Validate 2.4 GHz band before accessing it

Add a safety check to verify if the 2.4GHz band is
enabled/supported before updating the target config.

Change-Id: I05c0ac956acee0cd9550114836a0d41cfc3359ed
CRs-Fixed: 2883567
This commit is contained in:
Aditya Kodukula 2021-02-23 20:17:21 -08:00 • committed by snandini
commit 3edd04f7eb

View file

@ -1809,7 +1809,13 @@ static void hdd_update_wiphy_vhtcap(struct hdd_context *hdd_ctx)
ucfg_mlme_cfg_get_vht_tx_mcs_map(hdd_ctx->psoc, &value2);
band_5g->vht_cap.vht_mcs.tx_mcs_map = value2;
if (!band_2g) {
hdd_debug("2GHz band disabled, skipping capability population");
return;
}
ucfg_mlme_get_vht_for_24ghz(hdd_ctx->psoc, &is_vht_24ghz);
if (is_vht_24ghz)
band_2g->vht_cap.vht_mcs.tx_mcs_map = value2;
}