diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c index 401b0159b161..a22afa4f8e2c 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c @@ -2848,6 +2848,7 @@ void lim_process_switch_channel_rsp(struct mac_context *mac, QDF_STATUS status; uint16_t channelChangeReasonCode; struct pe_session *pe_session; + struct wlan_channel *vdev_chan; /* we need to process the deferred message since the initiating req. there might be nested request. */ /* in the case of nested request the new request initiated from the response will take care of resetting */ /* the deffered flag. */ @@ -2865,6 +2866,18 @@ void lim_process_switch_channel_rsp(struct mac_context *mac, pe_session->chainMask = rsp->chain_mask; pe_session->smpsMode = rsp->smps_mode; pe_session->channelChangeReasonCode = 0xBAD; + + vdev_chan = wlan_vdev_mlme_get_des_chan(pe_session->vdev); + + if (WLAN_REG_IS_24GHZ_CH_FREQ(vdev_chan->ch_freq)) { + if (vdev_chan->ch_phymode == WLAN_PHYMODE_11B) + pe_session->nwType = eSIR_11B_NW_TYPE; + else + pe_session->nwType = eSIR_11G_NW_TYPE; + } else { + pe_session->nwType = eSIR_11A_NW_TYPE; + } + pe_debug("new network type for peer: %d", pe_session->nwType); switch (channelChangeReasonCode) { case LIM_SWITCH_CHANNEL_REASSOC: lim_process_switch_channel_re_assoc_req(mac, pe_session, status);