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
This commit is contained in:
Kabilan Kannan 2017-08-23 16:55:13 -07:00 • committed by snandini
commit edff06d0a1

View file

@ -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)) {