qcacld-3.0: Cleanup unused params from struct bss_params part 2

Cleanup unused params from struct bss_params after moving to
vdev target if for add bss request.

Change-Id: Ib3cf3726b4b4c692a0323669770632f2031d4e9a
CRs-Fixed: 2535156
This commit is contained in:
Abhishek Singh 2019-09-25 17:53:41 +05:30 • committed by nshrivas
commit 52dc8abc44
8 changed files with 16 additions and 158 deletions

View file

@ -2442,7 +2442,6 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
return status;
}
add_bss_params->vdev_id = roam_sync_ind_ptr->roamed_vdev_id;
curr_sta_ds->staIndex = add_bss_params->staContext.staIdx;
mac_ctx->roam.reassocRespLen = roam_sync_ind_ptr->reassocRespLength;
mac_ctx->roam.pReassocResp =

View file

@ -3435,19 +3435,8 @@ static void lim_update_vht_oper_assoc_resp(struct mac_context *mac_ctx,
struct bss_params *pAddBssParams,
tDot11fIEVHTOperation *vht_oper, struct pe_session *pe_session)
{
if (vht_oper->chanWidth &&
pe_session->ch_width) {
if (vht_oper->chanWidth && pe_session->ch_width)
pAddBssParams->ch_width = vht_oper->chanWidth + 1;
pAddBssParams->chan_freq_seg0 =
wlan_reg_chan_to_freq(mac_ctx->pdev,
vht_oper->chanCenterFreqSeg1);
pAddBssParams->chan_freq_seg1 =
wlan_reg_chan_to_freq(mac_ctx->pdev,
vht_oper->chanCenterFreqSeg2);
}
pe_debug("Updating VHT Operation in assoc Response");
}
#ifdef WLAN_SUPPORT_TWT
@ -3485,21 +3474,12 @@ void lim_sta_add_bss_update_ht_parameter(uint32_t bss_chan_freq,
if (!ht_inf->present)
return;
if (chan_width_support && ht_cap->supportedChannelWidthSet) {
if (chan_width_support && ht_cap->supportedChannelWidthSet)
add_bss->ch_width = ht_inf->recommendedTxWidthSet;
if (ht_inf->secondaryChannelOffset ==
PHY_DOUBLE_CHANNEL_LOW_PRIMARY)
add_bss->chan_freq_seg0 = bss_chan_freq + 10;
else if (ht_inf->secondaryChannelOffset ==
PHY_DOUBLE_CHANNEL_HIGH_PRIMARY)
add_bss->chan_freq_seg0 = bss_chan_freq - 10;
} else {
else
add_bss->ch_width = CH_WIDTH_20MHZ;
add_bss->chan_freq_seg0 = 0;
}
pe_debug("center_freq_0: %d ch_width %d", add_bss->chan_freq_seg0,
add_bss->ch_width);
pe_debug("ch_width %d", add_bss->ch_width);
}
QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp,
@ -3529,9 +3509,6 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,
sizeof(tSirMacAddr));
/* Fill in struct bss_params self_mac_addr */
qdf_mem_copy(pAddBssParams->self_mac_addr,
pe_session->self_mac_addr, sizeof(tSirMacAddr));
pe_debug("sessionid: %d updateEntry: %d limsystemrole: %d",
pe_session->smeSessionId, updateEntry,
@ -3539,9 +3516,6 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
pe_debug("BSSID: " QDF_MAC_ADDR_STR,
QDF_MAC_ADDR_ARRAY(pAddBssParams->bssId));
pAddBssParams->vdev_id = pe_session->smeSessionId;
pAddBssParams->beaconInterval = bssDescription->beaconInterval;
pAddBssParams->dtimPeriod = pBeaconStruct->tim.dtimPeriod;
@ -3565,10 +3539,6 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
pe_debug("nwType:%d shortSlotTimeSupported: %d llbCoexist: %d",
pAddBssParams->nwType, pAddBssParams->shortSlotTimeSupported,
pAddBssParams->llbCoexist);
pAddBssParams->dot11_mode = pe_session->dot11mode;
pe_debug("dot11_mode: %d", pAddBssParams->dot11_mode);
/* Use the advertised capabilities from the received beacon/PR */
if (IS_DOT11_MODE_HT(pe_session->dot11mode)) {
chan_width_support =
@ -3582,8 +3552,7 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
pAddBssParams);
}
pAddBssParams->op_chan_freq = bssDescription->chan_freq;
pe_debug("current op frequency %d", pAddBssParams->op_chan_freq);
pe_debug("current op frequency %d", bssDescription->chan_freq);
if (pe_session->vhtCapability && (pAssocRsp->VHTCaps.present)) {
pAddBssParams->vhtCapable = pAssocRsp->VHTCaps.present;
vht_caps = &pAssocRsp->VHTCaps;
@ -3607,10 +3576,8 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
vht_caps, pe_session);
}
pe_debug("vhtCapable %d TxChannelWidth %d center_freq_0 %d center_freq_1 %d",
pAddBssParams->vhtCapable, pAddBssParams->ch_width,
pAddBssParams->chan_freq_seg0,
pAddBssParams->chan_freq_seg1);
pe_debug("vhtCapable %d ch_width %d", pAddBssParams->vhtCapable,
pAddBssParams->ch_width);
if (lim_is_session_he_capable(pe_session) &&
(pAssocRsp->he_cap.present)) {
@ -3852,9 +3819,6 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
pAddBssParams->maxTxPower = pe_session->maxTxPower;
pe_debug("maxTxPower: %d", pAddBssParams->maxTxPower);
/* update persona */
pAddBssParams->halPersona = (uint8_t)pe_session->opmode;
if (QDF_P2P_CLIENT_MODE == pe_session->opmode)
pAddBssParams->staContext.p2pCapableSta = 1;
@ -3895,14 +3859,10 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
pAddBssParams->staContext.encryptType,
pAddBssParams->staContext.p2pCapableSta);
pe_debug("bSpectrumMgtEnabled: %d halPersona: %d setting "
"LimMlm state to %d",
pAddBssParams->bSpectrumMgtEnabled, pAddBssParams->halPersona,
pe_session->limMlmState);
pe_debug("bSpectrumMgtEnabled: %d LimMlm state to %d",
pAddBssParams->bSpectrumMgtEnabled, pe_session->limMlmState);
if (pe_session->isNonRoamReassoc)
pAddBssParams->nonRoamReassoc = 1;
pAddBssParams->nss = pe_session->nss;
pe_debug("nss value: %d", pAddBssParams->nss);
/* we need to defer the message until we get the response back from HAL. */
SET_LIM_PROCESS_DEFD_MESGS(mac, false);
@ -3970,9 +3930,6 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac,
qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,
sizeof(tSirMacAddr));
/* Fill in struct bss_params self_mac_addr */
qdf_mem_copy(pAddBssParams->self_mac_addr,
pe_session->self_mac_addr, sizeof(tSirMacAddr));
pe_debug("sessionid: %d limsystemrole = %d",
pe_session->smeSessionId,
GET_LIM_SYSTEM_ROLE(pe_session));
@ -4012,9 +3969,6 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac,
pAddBssParams);
}
pAddBssParams->op_chan_freq = bssDescription->chan_freq;
pe_debug("current Oper freq %d", pAddBssParams->op_chan_freq);
if (pe_session->vhtCapability &&
(IS_BSS_VHT_CAPABLE(pBeaconStruct->VHTCaps) ||
IS_BSS_VHT_CAPABLE(pBeaconStruct->vendor_vht_ie.VHTCaps))) {
@ -4027,15 +3981,6 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac,
pe_debug("VHT Operation is present in vendor Specific IE");
}
if (vht_oper && vht_oper->chanWidth && chan_width_support) {
pAddBssParams->chan_freq_seg0 =
wlan_reg_chan_to_freq(mac->pdev,
vht_oper->chanCenterFreqSeg1);
pAddBssParams->chan_freq_seg1 =
wlan_reg_chan_to_freq(mac->pdev,
vht_oper->chanCenterFreqSeg2);
}
/*
* in limExtractApCapability function intersection of FW
* advertised channel width and AP advertised channel width has
@ -4052,14 +3997,10 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac,
}
if (lim_is_session_he_capable(pe_session) &&
pBeaconStruct->he_cap.present) {
lim_update_bss_he_capable(mac, pAddBssParams);
pBeaconStruct->he_cap.present)
lim_add_bss_he_cfg(pAddBssParams, pe_session);
}
pe_debug("vhtCapable %d vhtTxChannelWidthSet %d center_freq_seg0 - %d, center_freq_seg1 - %d",
pAddBssParams->vhtCapable, pAddBssParams->ch_width,
pAddBssParams->chan_freq_seg0,
pAddBssParams->chan_freq_seg1);
pe_debug("vhtCapable %d ch_width %d", pAddBssParams->vhtCapable,
pAddBssParams->ch_width);
/*
* Populate the STA-related parameters here
* Note that the STA here refers to the AP
@ -4080,9 +4021,6 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac,
pe_debug("StaCtx: " QDF_MAC_ADDR_STR,
QDF_MAC_ADDR_ARRAY(pAddBssParams->staContext.staMac));
pAddBssParams->dot11_mode = pe_session->dot11mode;
pe_debug("dot11_mode:%d", pAddBssParams->dot11_mode);
if (IS_DOT11_MODE_HT(pe_session->dot11mode)
&& (pBeaconStruct->HTCaps.present)) {
pAddBssParams->staContext.htCapable = 1;
@ -4235,10 +4173,6 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac,
pAddBssParams->staContext.smesessionId = pe_session->smeSessionId;
pAddBssParams->staContext.sessionId = pe_session->peSessionId;
pAddBssParams->vdev_id = pe_session->smeSessionId;
pAddBssParams->halPersona = (uint8_t)pe_session->opmode;
pAddBssParams->bSpectrumMgtEnabled = pe_session->spectrumMgtEnabled;
pAddBssParams->extSetStaKeyParamValid = 0;
@ -4251,10 +4185,6 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac,
pAddBssParams->staContext.rmfEnabled = 1;
}
#endif
pAddBssParams->nss = pe_session->nss;
pe_debug("nss value: %d", pAddBssParams->nss);
/* Set a new state for MLME */
pe_session->limMlmState = eLIM_MLM_WT_ADD_BSS_RSP_PREASSOC_STATE;
@ -4268,10 +4198,8 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac,
pAddBssParams->staContext.encryptType,
pAddBssParams->staContext.p2pCapableSta);
pe_debug("bSpectrumMgtEnabled: %d halPersona: %d setting "
"LimMlm state to %d",
pAddBssParams->bSpectrumMgtEnabled, pAddBssParams->halPersona,
pe_session->limMlmState);
pe_debug("bSpectrumMgtEnabled: %d LimMlm state %d",
pAddBssParams->bSpectrumMgtEnabled, pe_session->limMlmState);
if (cds_is_5_mhz_enabled()) {
pAddBssParams->ch_width = CH_WIDTH_5MHZ;

View file

@ -149,10 +149,6 @@ void lim_ft_prepare_add_bss_req(struct mac_context *mac,
qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,
sizeof(tSirMacAddr));
/* Fill in struct bss_params self_mac_addr */
qdf_mem_copy(pAddBssParams->self_mac_addr, ft_session->self_mac_addr,
sizeof(tSirMacAddr));
pAddBssParams->beaconInterval = bssDescription->beaconInterval;
pAddBssParams->dtimPeriod = pBeaconStruct->tim.dtimPeriod;
@ -188,7 +184,6 @@ void lim_ft_prepare_add_bss_req(struct mac_context *mac,
sizeof(pAddBssParams->staContext.ht_caps));
}
pAddBssParams->op_chan_freq = bssDescription->chan_freq;
ft_session->htSecondaryChannelOffset =
pBeaconStruct->HTInfo.secondaryChannelOffset;
sta_ctx = &pAddBssParams->staContext;
@ -196,17 +191,9 @@ void lim_ft_prepare_add_bss_req(struct mac_context *mac,
if (ft_session->vhtCapability &&
ft_session->vhtCapabilityPresentInBeacon) {
pAddBssParams->vhtCapable = pBeaconStruct->VHTCaps.present;
if (pBeaconStruct->VHTOperation.chanWidth &&
chan_width_support) {
if (pBeaconStruct->VHTOperation.chanWidth && chan_width_support)
pAddBssParams->ch_width =
pBeaconStruct->VHTOperation.chanWidth + 1;
pAddBssParams->chan_freq_seg0 =
wlan_reg_chan_to_freq(mac->pdev,
pBeaconStruct->VHTOperation.chanCenterFreqSeg1);
pAddBssParams->chan_freq_seg1 =
wlan_reg_chan_to_freq(mac->pdev,
pBeaconStruct->VHTOperation.chanCenterFreqSeg2);
}
pAddBssParams->staContext.vht_caps =
((pBeaconStruct->VHTCaps.maxMPDULen <<
SIR_MAC_VHT_CAP_MAX_MPDU_LEN) |
@ -369,7 +356,6 @@ void lim_ft_prepare_add_bss_req(struct mac_context *mac,
#endif
pAddBssParams->staContext.sessionId = ft_session->peSessionId;
pAddBssParams->staContext.smesessionId = ft_session->smeSessionId;
pAddBssParams->vdev_id = ft_session->smeSessionId;
/* Set a new state for MLME */
if (!lim_is_roam_synch_in_progress(ft_session)) {
@ -380,8 +366,6 @@ void lim_ft_prepare_add_bss_req(struct mac_context *mac,
ft_session->peSessionId,
eLIM_MLM_WT_ADD_BSS_RSP_FT_REASSOC_STATE));
}
pAddBssParams->halPersona = (uint8_t)ft_session->opmode;
ft_session->ftPEContext.pAddBssReq = pAddBssParams;
pe_debug("Saving SIR_HAL_ADD_BSS_REQ for pre-auth ap");

View file

@ -2141,7 +2141,6 @@ void lim_process_sta_add_bss_rsp_pre_assoc(struct mac_context *mac_ctx,
add_bss_params->staContext.staMac, LOGE);
goto joinFailure;
}
session_entry->vdev_id = add_bss_params->vdev_id;
/* Success, handle below */
/* STA Index(genr by HAL) for the BSS entry is stored here */
sta->staIndex = add_bss_params->staContext.staIdx;

View file

@ -6719,7 +6719,6 @@ void lim_add_bss_he_cap(struct bss_params *add_bss, tpSirAssocRsp assoc_rsp)
he_cap = &assoc_rsp->he_cap;
he_op = &assoc_rsp->he_op;
add_bss->he_capable = he_cap->present;
if (he_cap)
qdf_mem_copy(&add_bss->staContext.he_config,
he_cap, sizeof(*he_cap));
@ -7127,12 +7126,6 @@ void lim_update_sta_he_capable(struct mac_context *mac,
pe_debug("he_capable: %d", add_sta_params->he_capable);
}
void lim_update_bss_he_capable(struct mac_context *mac, struct bss_params *add_bss)
{
add_bss->he_capable = true;
pe_debug("he_capable: %d", add_bss->he_capable);
}
void lim_update_stads_he_capable(tpDphHashNode sta_ds, tpSirAssocReq assoc_req)
{
sta_ds->mlmStaContext.he_capable = assoc_req->he_cap.present;

View file

@ -1128,15 +1128,6 @@ static inline bool lim_is_sta_he_capable(tpDphHashNode sta_ds)
return sta_ds->mlmStaContext.he_capable;
}
/**
* lim_update_bss_he_capable(): Update he_capable in add BSS params
* @mac: pointer to MAC context
* @add_bss: pointer to add BSS params
*
* Return: None
*/
void lim_update_bss_he_capable(struct mac_context *mac, struct bss_params *add_bss);
/**
* lim_update_stads_he_capable() - Update he_capable in sta ds context
* @sta_ds: pointer to sta ds
@ -1290,11 +1281,6 @@ static inline bool lim_is_sta_he_capable(tpDphHashNode sta_ds)
return false;
}
static inline void lim_update_bss_he_capable(struct mac_context *mac,
struct bss_params *add_bss)
{
}
static inline void lim_update_stads_he_capable(tpDphHashNode sta_ds,
tpSirAssocReq assoc_req)
{

View file

@ -329,7 +329,6 @@ typedef struct sLimMlmSetKeysReq {
/**
* struct struct bss_params - parameters required for add bss params
* @bssId: MAC Address/BSSID
* @self_mac_addr: Self Mac Address
* @nwType: network type
* @shortSlotTimeSupported: is short slot time supported or not
* @llbCoexist: 11b coexist supported or not
@ -337,31 +336,18 @@ typedef struct sLimMlmSetKeysReq {
* @dtimPeriod: DTIM period
* @htCapable: Enable/Disable HT capabilities
* @rmfEnabled: RMF enabled/disabled
* @op_chan_freq: Current Operating frequency
* @staContext: sta context
* @vdev_id: vdev id
* @updateBss: update the existing BSS entry, if this flag is set
* @ssId: Add BSSID info for rxp filter
* @txMgmtPower: tx power used for mgmt frames
* @maxTxPower: max power to be used after applying the power constraint
* @extSetStaKeyParamValid: Ext Bss Config Msg if set
* @extSetStaKeyParam: SetStaKeyParams for ext bss msg
* @bHiddenSSIDEn: To Enable Hidden ssid.
* @halPersona: Persona for the BSS can be STA,AP,GO,CLIENT value
* @bSpectrumMgtEnabled: Spectrum Management Capability, 1:Enabled, 0:Disabled.
* @vhtCapable: VHT capablity
* @vhtTxChannelWidthSet: VHT tx channel width
* @chan_freq_seg0: center freq seq 0
* @chan_freq_seg1: center freq seq 1
* @dot11_mode: 802.11 mode
* @he_capable: HE Capability
* @cac_duration_ms: cac duration in milliseconds
* @dfs_regdomain: dfs region
* @ch_width: VHT tx channel width
* @no_ptk_4_way: Do not need 4-way handshake
*/
struct bss_params {
tSirMacAddr bssId;
tSirMacAddr self_mac_addr;
tSirNwType nwType;
uint8_t shortSlotTimeSupported;
uint8_t llbCoexist;
@ -369,39 +355,23 @@ struct bss_params {
uint8_t dtimPeriod;
uint8_t htCapable;
uint8_t rmfEnabled;
uint32_t op_chan_freq;
tAddStaParams staContext;
uint8_t vdev_id;
/* HAL should update the existing BSS entry, if this flag is set.
* PE will set this flag in case of reassoc, where we want to resue the
* the old bssID and still return success.
*/
uint8_t updateBss;
tSirMacSSid ssId;
int8_t maxTxPower;
uint8_t extSetStaKeyParamValid;
tSetStaKeyParams extSetStaKeyParam;
uint8_t bHiddenSSIDEn;
uint8_t halPersona;
uint8_t bSpectrumMgtEnabled;
uint8_t vhtCapable;
enum phy_ch_width ch_width;
uint32_t chan_freq_seg0;
uint32_t chan_freq_seg1;
uint8_t dot11_mode;
uint8_t nonRoamReassoc;
uint8_t wps_state;
uint8_t nss;
uint16_t beacon_tx_rate;
#ifdef WLAN_FEATURE_11AX
bool he_capable;
tDot11fIEhe_op he_op;
uint32_t he_sta_obsspd;
#endif
uint32_t cac_duration_ms;
uint32_t dfs_regdomain;
bool no_ptk_4_way;
};

View file

@ -3531,7 +3531,6 @@ QDF_STATUS wma_save_bss_params(tp_wma_handle wma, struct bss_params *add_bss)
status = QDF_STATUS_E_FAILURE;
else
status = QDF_STATUS_SUCCESS;
add_bss->vdev_id = add_bss->staContext.smesessionId;
qdf_mem_copy(add_bss->staContext.staMac, add_bss->bssId,
sizeof(add_bss->staContext.staMac));