From 8b9abea1558cdb5e1a8be51f7255adee07a7a51d Mon Sep 17 00:00:00 2001 From: Utkarsh Bhatnagar Date: Wed, 24 Aug 2022 16:27:47 +0530 Subject: [PATCH] qcacld-3.0: Populate TDLS peer HT/VHT Cap only if device supports Populate TDLS peer HT/VHT Cap only if selfdot11mode supports HT/VHT capabilities. Change-Id: Ic1eb45f26b00b2b51a516b8f0a7035918e917a72 CRs-Fixed: 3266169 --- core/mac/src/pe/lim/lim_process_tdls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index 1d66b92238..960b851249 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -3104,8 +3104,9 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac, wide_band_peer = lim_is_wide_band_set(add_sta_req->extn_capability) && wlan_cfg80211_tdls_is_fw_wideband_capable(pe_session->vdev); + selfDot11Mode = mac->mlme_cfg->dot11_mode.dot11_mode; htCaps = &htCap; - if (htCaps->present) { + if (htCaps->present && IS_DOT11_MODE_HT(selfDot11Mode)) { sta->mlmStaContext.htCapability = 1; sta->htGreenfield = htCaps->greenField; /* @@ -3154,7 +3155,7 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac, } lim_tdls_populate_dot11f_vht_caps(mac, add_sta_req, &vhtCap); pVhtCaps = &vhtCap; - if (pVhtCaps->present) { + if (pVhtCaps->present && IS_DOT11_MODE_VHT(selfDot11Mode)) { sta->mlmStaContext.vhtCapability = 1; /* @@ -3209,7 +3210,6 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac, WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ; } - selfDot11Mode = mac->mlme_cfg->dot11_mode.dot11_mode; if (IS_DOT11_MODE_HE(selfDot11Mode)) lim_tdls_update_node_he_caps(mac, add_sta_req, sta, pe_session, wide_band_peer);