diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index dc5a9298bf22..e9fb021ffbe9 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1417,7 +1417,8 @@ static void hdd_update_tgt_ht_cap(struct hdd_context *hdd_ctx, if (sme_cfg_get_str(hdd_ctx->hHal, WNI_CFG_SUPPORTED_MCS_SET, mcs_set, &value) == QDF_STATUS_SUCCESS) { hdd_debug("Read MCS rate set"); - + if (cfg->num_rf_chains > SIZE_OF_SUPPORTED_MCS_SET) + cfg->num_rf_chains = SIZE_OF_SUPPORTED_MCS_SET; if (pconfig->enable2x2) { for (value = 0; value < cfg->num_rf_chains; value++) mcs_set[value] =