qcacld-3.0: Update channel in DS params and HT Info IE after CSA
After CSA, channel is not getting updated in DS params and HT info IE in BSS descriptor of corresponding session. As a result, channel in cfg80211 is still old due to which freq getting displayed in UI is still the older one. Update channel in DS params and HT info IE in BSS descriptor after CSA. Change-Id: I4a0f301ccd6155dc459fa1bfa4fbd0c59c04e0f8 CRs-Fixed: 2244619
This commit is contained in:
parent
ebe3fc868d
commit
71b9397810
@ -52,6 +52,7 @@
|
||||
#include <wlan_tdls_tgt_api.h>
|
||||
#include <wlan_cfg80211_scan.h>
|
||||
#include <wlan_scan_public_structs.h>
|
||||
#include <wlan_utility.h>
|
||||
|
||||
#define MAX_PWR_FCC_CHAN_12 8
|
||||
#define MAX_PWR_FCC_CHAN_13 2
|
||||
@ -114,6 +115,43 @@
|
||||
/* Static Type declarations */
|
||||
static struct csr_roam_session csr_roam_roam_session[CSR_ROAM_SESSION_MAX];
|
||||
|
||||
/**
|
||||
* csr_get_ielen_from_bss_description() - to get IE length
|
||||
* from tSirBssDescription structure
|
||||
* @pBssDescr: pBssDescr
|
||||
*
|
||||
* This function is called in various places to get IE length
|
||||
* from tSirBssDescription structure
|
||||
*
|
||||
* @Return: total IE length
|
||||
*/
|
||||
static inline uint16_t
|
||||
csr_get_ielen_from_bss_description(tpSirBssDescription pBssDescr)
|
||||
{
|
||||
uint16_t ielen;
|
||||
|
||||
if (!pBssDescr)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Length of BSS desription is without length of
|
||||
* length itself and length of pointer
|
||||
* that holds ieFields
|
||||
*
|
||||
* <------------sizeof(tSirBssDescription)-------------------->
|
||||
* +--------+---------------------------------+---------------+
|
||||
* | length | other fields | pointer to IEs|
|
||||
* +--------+---------------------------------+---------------+
|
||||
* ^
|
||||
* ieFields
|
||||
*/
|
||||
|
||||
ielen = (uint16_t)(pBssDescr->length + sizeof(pBssDescr->length) -
|
||||
GET_FIELD_OFFSET(tSirBssDescription, ieFields));
|
||||
|
||||
return ielen;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_SAE
|
||||
/**
|
||||
* csr_sae_callback - Update SAE info to CSR roam session
|
||||
@ -11867,6 +11905,8 @@ csr_roam_chk_lnk_swt_ch_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
|
||||
QDF_STATUS status;
|
||||
tpSirSmeSwitchChannelInd pSwitchChnInd;
|
||||
struct csr_roam_info roamInfo;
|
||||
tSirMacDsParamSetIE *ds_params_ie;
|
||||
tDot11fIEHTInfo *ht_info_ie;
|
||||
|
||||
/* in case of STA, the SWITCH_CHANNEL originates from its AP */
|
||||
sme_debug("eWNI_SME_SWITCH_CHL_IND from SME");
|
||||
@ -11889,6 +11929,29 @@ csr_roam_chk_lnk_swt_ch_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
|
||||
(uint8_t) pSwitchChnInd->newChannelId;
|
||||
}
|
||||
|
||||
ds_params_ie = (tSirMacDsParamSetIE *)wlan_get_ie_ptr_from_eid(
|
||||
DOT11F_EID_DSPARAMS,
|
||||
(uint8_t *)session->pConnectBssDesc->
|
||||
ieFields,
|
||||
csr_get_ielen_from_bss_description(
|
||||
session->pConnectBssDesc));
|
||||
if (ds_params_ie)
|
||||
ds_params_ie->channelNumber =
|
||||
(uint8_t)pSwitchChnInd->newChannelId;
|
||||
|
||||
ht_info_ie = (tDot11fIEHTInfo *)wlan_get_ie_ptr_from_eid(
|
||||
DOT11F_EID_HTINFO,
|
||||
(uint8_t *)session->pConnectBssDesc->
|
||||
ieFields,
|
||||
csr_get_ielen_from_bss_description(
|
||||
session->pConnectBssDesc));
|
||||
if (ht_info_ie) {
|
||||
ht_info_ie->primaryChannel =
|
||||
(uint8_t)pSwitchChnInd->newChannelId;
|
||||
ht_info_ie->secondaryChannelOffset =
|
||||
pSwitchChnInd->chan_params.sec_ch_offset;
|
||||
}
|
||||
|
||||
qdf_mem_set(&roamInfo, sizeof(struct csr_roam_info), 0);
|
||||
roamInfo.chan_info.chan_id = pSwitchChnInd->newChannelId;
|
||||
roamInfo.chan_info.ch_width =
|
||||
|
Loading…
Reference in New Issue
Block a user