From d42aa6376f925a1d7b83d5b0915fd5a511c613eb Mon Sep 17 00:00:00 2001 From: Bapiraju Alla Date: Wed, 1 Jul 2020 18:36:17 +0530 Subject: [PATCH] qcacld-3.0: Check channel bonding mode to HE 40MHz capability in 2g Add check to verify channel bonding mode before setting 40MHz capability in HE 2.4GHz. Change-Id: I22ca48c984cc833835d22d8b7ecfe8a3e194d406 CRs-Fixed: 2723207 --- core/hdd/src/wlan_hdd_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 469fc0828eb2..f21859fa5a98 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2122,6 +2122,9 @@ static void hdd_update_wiphy_he_cap(struct hdd_context *hdd_ctx) uint8_t *phy_info_5g = hdd_ctx->iftype_data_5g->he_cap.he_cap_elem.phy_cap_info; uint8_t max_fw_bw = sme_get_vht_ch_width(); + uint32_t channel_bonding_mode_2g; + uint8_t *phy_info_2g = + hdd_ctx->iftype_data_2g->he_cap.he_cap_elem.phy_cap_info; status = ucfg_mlme_cfg_get_he_caps(hdd_ctx->psoc, &he_cap_cfg); @@ -2134,8 +2137,12 @@ static void hdd_update_wiphy_he_cap(struct hdd_context *hdd_ctx) hdd_ctx->iftype_data_2g->he_cap.has_he = he_cap_cfg.present; band_2g->n_iftype_data = 1; band_2g->iftype_data = hdd_ctx->iftype_data_2g; - hdd_ctx->iftype_data_2g->he_cap.he_cap_elem.phy_cap_info[0] |= - IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G; + + ucfg_mlme_get_channel_bonding_24ghz(hdd_ctx->psoc, + &channel_bonding_mode_2g); + if (channel_bonding_mode_2g) + phy_info_2g[0] |= + IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G; } if (band_5g) { hdd_ctx->iftype_data_5g->types_mask =