diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 02c5704098d0..1bc58d95dbce 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -2133,7 +2133,6 @@ lim_add_sta(tpAniSirGlobal mac_ctx, struct scheduler_msg msg_q; tSirRetStatus ret_code = eSIR_SUCCESS; tSirMacAddr sta_mac, *sta_Addr; - uint8_t i, nw_type_11b = 0; tpSirAssocReq assoc_req; tLimIbssPeerNode *peer_node; /* for IBSS mode */ uint8_t *p2p_ie = NULL; @@ -2485,18 +2484,7 @@ lim_add_sta(tpAniSirGlobal mac_ctx, if (add_sta_params->respReqd) SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, false); - for (i = 0; i < SIR_NUM_11A_RATES; i++) { - if (sirIsArate(sta_ds->supportedRates.llaRates[i] & 0x7F)) { - nw_type_11b = 0; - break; - } else { - nw_type_11b = 1; - } - } - if (nw_type_11b) - add_sta_params->nwType = eSIR_11B_NW_TYPE; - else - add_sta_params->nwType = session_entry->nwType; + add_sta_params->nwType = session_entry->nwType; msg_q.type = WMA_ADD_STA_REQ; diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 005cfbe599bf..d8eee2656790 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -5436,6 +5436,9 @@ tSirNwType lim_get_nw_type(tpAniSirGlobal pMac, uint8_t channelNum, uint32_t typ (pMac, LOG3, FL("Beacon, nwtype=G")); ) nwType = eSIR_11G_NW_TYPE; + } else if (pBeacon->HTInfo.present || + IS_BSS_VHT_CAPABLE(pBeacon->VHTCaps)) { + nwType = eSIR_11G_NW_TYPE; } } else { /* 11a packet */