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
This commit is contained in:
Kiran Kumar Lokere 2017-05-26 15:15:13 -07:00 • committed by snandini
commit 80d3e1a052

View file

@ -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;