qcacld-3.0: Replace channel with frequency in switch_channel_ind

Replace channel ID with frequency in struct switch_channel_ind.

Change-Id: I33a4da4271b083c166beebcec33ebed493072f38
This commit is contained in:
Tushnim Bhattacharyya 2019-07-11 14:26:17 -07:00 • committed by nshrivas
commit 2a1e7f23bc
3 changed files with 16 additions and 10 deletions

View file

@ -1340,7 +1340,7 @@ struct switch_channel_ind {
uint16_t messageType; /* eWNI_SME_SWITCH_CHL_IND */
uint16_t length;
uint8_t sessionId;
uint16_t newChannelId;
uint32_t freq;
struct ch_params chan_params;
struct qdf_mac_addr bssid; /* BSSID */
QDF_STATUS status;

View file

@ -2203,8 +2203,10 @@ void lim_switch_channel_cback(struct mac_context *mac, QDF_STATUS status,
pSirSmeSwitchChInd->messageType = eWNI_SME_SWITCH_CHL_IND;
pSirSmeSwitchChInd->length = sizeof(*pSirSmeSwitchChInd);
pSirSmeSwitchChInd->newChannelId =
pe_session->gLimChannelSwitch.primaryChannel;
pSirSmeSwitchChInd->freq =
wlan_reg_chan_to_freq(mac->pdev,
pe_session->
gLimChannelSwitch.primaryChannel);
pSirSmeSwitchChInd->sessionId = pe_session->smeSessionId;
pSirSmeSwitchChInd->chan_params.ch_width =
pe_session->gLimChannelSwitch.ch_width;
@ -2217,9 +2219,9 @@ void lim_switch_channel_cback(struct mac_context *mac, QDF_STATUS status,
pSirSmeSwitchChInd->status = status;
pe_debug(
"session: %d chan: %d width: %d sec offset: %d seg0: %d seg1: %d status %d",
"session: %d freq: %d width: %d sec offset: %d seg0: %d seg1: %d status %d",
pSirSmeSwitchChInd->sessionId,
pSirSmeSwitchChInd->newChannelId,
pSirSmeSwitchChInd->freq,
pSirSmeSwitchChInd->chan_params.ch_width,
pSirSmeSwitchChInd->chan_params.sec_ch_offset,
pSirSmeSwitchChInd->chan_params.center_freq_seg0,

View file

@ -11574,10 +11574,11 @@ csr_roam_chk_lnk_swt_ch_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
return;
}
session->connectedProfile.operationChannel =
(uint8_t) pSwitchChnInd->newChannelId;
wlan_reg_freq_to_chan(mac_ctx->pdev, pSwitchChnInd->freq);
if (session->pConnectBssDesc) {
session->pConnectBssDesc->channelId =
(uint8_t) pSwitchChnInd->newChannelId;
wlan_reg_freq_to_chan(mac_ctx->pdev,
pSwitchChnInd->freq);
ie_len = csr_get_ielen_from_bss_description(
session->pConnectBssDesc);
@ -11587,7 +11588,8 @@ csr_roam_chk_lnk_swt_ch_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
ie_len);
if (ds_params_ie)
ds_params_ie->channelNumber =
(uint8_t)pSwitchChnInd->newChannelId;
wlan_reg_freq_to_chan(mac_ctx->pdev,
pSwitchChnInd->freq);
ht_info_ie = (tDot11fIEHTInfo *)wlan_get_ie_ptr_from_eid(
DOT11F_EID_HTINFO,
@ -11595,7 +11597,8 @@ csr_roam_chk_lnk_swt_ch_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
ie_len);
if (ht_info_ie) {
ht_info_ie->primaryChannel =
(uint8_t)pSwitchChnInd->newChannelId;
wlan_reg_freq_to_chan(mac_ctx->pdev,
pSwitchChnInd->freq);
ht_info_ie->secondaryChannelOffset =
pSwitchChnInd->chan_params.sec_ch_offset;
}
@ -11604,7 +11607,8 @@ csr_roam_chk_lnk_swt_ch_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
roam_info = qdf_mem_malloc(sizeof(*roam_info));
if (!roam_info)
return;
roam_info->chan_info.chan_id = pSwitchChnInd->newChannelId;
roam_info->chan_info.chan_id =
wlan_reg_freq_to_chan(mac_ctx->pdev, pSwitchChnInd->freq);
roam_info->chan_info.ch_width = pSwitchChnInd->chan_params.ch_width;
roam_info->chan_info.sec_ch_offset =
pSwitchChnInd->chan_params.sec_ch_offset;