From edff06d0a1d955faa03461a362424bc053edf7a7 Mon Sep 17 00:00:00 2001 From: Kabilan Kannan Date: Wed, 23 Aug 2017 16:55:13 -0700 Subject: [PATCH] qcacld-3.0: Pass correct phymode to FW for a TDLS peer as per its capability When AP is in 11b-only mode then for a TDLS peer, in the peer_assoc command to FW, pass phymode as per capability of the TDLS peer. Change-Id: If1a84b35c2e755aad8b6b67536cbbcc49d378fda CRs-Fixed: 2093277 --- core/wma/src/wma_utils.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index 4fbf3a095fb9..3e3a301151c5 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -3492,9 +3492,27 @@ WLAN_PHY_MODE wma_peer_phymode(tSirNwType nw_type, uint8_t sta_type, switch (nw_type) { case eSIR_11B_NW_TYPE: +#ifdef FEATURE_WLAN_TDLS + if (STA_ENTRY_TDLS_PEER == sta_type) { + if (is_vht) { + if (CH_WIDTH_80MHZ == ch_width) + phymode = MODE_11AC_VHT80; + else + phymode = (CH_WIDTH_40MHZ == ch_width) ? + MODE_11AC_VHT40 : + MODE_11AC_VHT20; + } else if (is_ht) { + phymode = (CH_WIDTH_40MHZ == ch_width) ? + MODE_11NG_HT40 : MODE_11NG_HT20; + } else + phymode = MODE_11B; + } else +#endif /* FEATURE_WLAN_TDLS */ + { phymode = MODE_11B; if (is_ht || is_vht || is_he) WMA_LOGE("HT/VHT is enabled with 11B NW type"); + } break; case eSIR_11G_NW_TYPE: if (!(is_ht || is_vht || is_he)) {