From 80d3e1a052eca6269fc1241de571f9f937ff9cc1 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Lokere Date: Fri, 26 May 2017 15:15:13 -0700 Subject: [PATCH] qcacld-3.0: Set peer NW type as 11b if OFDM rates not present If peer is not ht/vht capable and if OFDM rates are not supported by peer then set the peer type as 11B to configure the correct peer phy mode to FW. Change-Id: I3115541a6fb51c78bf29a6473460dfb17bf9be51 CRs-Fixed: 2053227 --- core/mac/src/pe/lim/lim_assoc_utils.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 8b87f28993a4..24fce1aef875 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -2072,6 +2072,7 @@ lim_add_sta(tpAniSirGlobal mac_ctx, tSirRetStatus ret_code = eSIR_SUCCESS; tSirMacAddr sta_mac, *sta_Addr; tpSirAssocReq assoc_req; + uint8_t i, nw_type_11b = 0; tLimIbssPeerNode *peer_node; /* for IBSS mode */ uint8_t *p2p_ie = NULL; @@ -2418,6 +2419,19 @@ lim_add_sta(tpAniSirGlobal mac_ctx, add_sta_params->nwType = session_entry->nwType; + if (!(add_sta_params->htCapable || add_sta_params->vhtCapable)) { + nw_type_11b = 1; + for (i = 0; i < SIR_NUM_11A_RATES; i++) { + if (sirIsArate(sta_ds->supportedRates.llaRates[i] & + 0x7F)) { + nw_type_11b = 0; + break; + } + } + if (nw_type_11b) + add_sta_params->nwType = eSIR_11B_NW_TYPE; + } + msg_q.type = WMA_ADD_STA_REQ; msg_q.reserved = 0;