mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
qcacld-3.0: Refactor start bss request to channel frequency
Refactor the start bss request to use channel frequency instead of channel number. Change-Id: Ic936fe060a5b2bc8d058709950417f3939a3c3d4 CRs-Fixed: 2518026
This commit is contained in:
parent
b2ea027c0e
commit
987377e3ea
8 changed files with 22 additions and 25 deletions
|
|
@ -580,7 +580,7 @@ struct start_bss_req {
|
|||
#endif
|
||||
enum bss_type bssType;
|
||||
tSirMacSSid ssId;
|
||||
uint8_t channelId;
|
||||
uint32_t oper_ch_freq;
|
||||
ePhyChanBondState cbMode;
|
||||
uint8_t vht_channel_width;
|
||||
uint8_t center_freq_seg0;
|
||||
|
|
|
|||
|
|
@ -568,8 +568,7 @@ void ibss_bss_add(struct mac_context *mac, struct pe_session *pe_session)
|
|||
mlmStartReq.txChannelWidthSet = pe_session->htRecommendedTxWidthSet;
|
||||
|
||||
/* reading the channel num from session Table */
|
||||
mlmStartReq.channelNumber = wlan_reg_freq_to_chan(
|
||||
mac->pdev, pe_session->curr_op_freq);
|
||||
mlmStartReq.oper_ch_freq = pe_session->curr_op_freq;
|
||||
|
||||
mlmStartReq.cbMode = pe_session->pLimStartBssReq->cbMode;
|
||||
|
||||
|
|
|
|||
|
|
@ -302,6 +302,7 @@ lim_mlm_add_bss(struct mac_context *mac_ctx,
|
|||
struct bss_params *addbss_param = NULL;
|
||||
uint32_t retcode;
|
||||
bool is_ch_dfs = false;
|
||||
uint32_t chan_num;
|
||||
|
||||
/* Package WMA_ADD_BSS_REQ message parameters */
|
||||
addbss_param = qdf_mem_malloc(sizeof(struct bss_params));
|
||||
|
|
@ -338,9 +339,9 @@ lim_mlm_add_bss(struct mac_context *mac_ctx,
|
|||
wlan_reg_chan_to_freq(mac_ctx->pdev,
|
||||
session->ch_center_freq_seg1);
|
||||
|
||||
addbss_param->op_chan_freq =
|
||||
wlan_reg_chan_to_freq(mac_ctx->pdev,
|
||||
mlm_start_req->channelNumber);
|
||||
addbss_param->op_chan_freq = mlm_start_req->oper_ch_freq;
|
||||
chan_num = wlan_reg_freq_to_chan(mac_ctx->pdev,
|
||||
addbss_param->op_chan_freq);
|
||||
#ifdef WLAN_FEATURE_11W
|
||||
addbss_param->rmfEnabled = session->limRmfEnabled;
|
||||
#endif
|
||||
|
|
@ -376,8 +377,7 @@ lim_mlm_add_bss(struct mac_context *mac_ctx,
|
|||
if (session->ch_width == CH_WIDTH_160MHZ) {
|
||||
is_ch_dfs = true;
|
||||
} else if (session->ch_width == CH_WIDTH_80P80MHZ) {
|
||||
if (wlan_reg_get_channel_state(mac_ctx->pdev,
|
||||
mlm_start_req->channelNumber) ==
|
||||
if (wlan_reg_get_channel_state(mac_ctx->pdev, chan_num) ==
|
||||
CHANNEL_STATE_DFS ||
|
||||
wlan_reg_get_channel_state(mac_ctx->pdev,
|
||||
session->ch_center_freq_seg1 -
|
||||
|
|
@ -385,8 +385,7 @@ lim_mlm_add_bss(struct mac_context *mac_ctx,
|
|||
CHANNEL_STATE_DFS)
|
||||
is_ch_dfs = true;
|
||||
} else {
|
||||
if (wlan_reg_get_channel_state(mac_ctx->pdev,
|
||||
mlm_start_req->channelNumber) ==
|
||||
if (wlan_reg_get_channel_state(mac_ctx->pdev, chan_num) ==
|
||||
CHANNEL_STATE_DFS)
|
||||
is_ch_dfs = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -207,7 +207,8 @@ void lim_process_mlm_start_cnf(struct mac_context *mac, uint32_t *msg_buf)
|
|||
pe_session, smesessionId);
|
||||
if (pe_session &&
|
||||
(((tLimMlmStartCnf *)msg_buf)->resultCode == eSIR_SME_SUCCESS)) {
|
||||
channelId = pe_session->pLimStartBssReq->channelId;
|
||||
channelId = wlan_reg_freq_to_chan(mac->pdev,
|
||||
pe_session->pLimStartBssReq->oper_ch_freq);
|
||||
lim_ndi_mlme_vdev_up_transition(pe_session);
|
||||
|
||||
/* We should start beacon transmission only if the channel
|
||||
|
|
|
|||
|
|
@ -544,7 +544,8 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||
ret_code = eSIR_SME_INVALID_PARAMETERS;
|
||||
goto free;
|
||||
}
|
||||
|
||||
channel_number = wlan_reg_freq_to_chan(mac_ctx->pdev,
|
||||
sme_start_bss_req->oper_ch_freq);
|
||||
/*
|
||||
* This is the place where PE is going to create a session.
|
||||
* If session is not existed, then create a new session
|
||||
|
|
@ -571,7 +572,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||
/* Update the beacon/probe filter in mac_ctx */
|
||||
lim_set_bcn_probe_filter(mac_ctx, session,
|
||||
&sme_start_bss_req->ssId,
|
||||
sme_start_bss_req->channelId);
|
||||
channel_number);
|
||||
}
|
||||
|
||||
if (QDF_NDI_MODE != sme_start_bss_req->bssPersona) {
|
||||
|
|
@ -623,8 +624,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||
sme_start_bss_req->beaconInterval;
|
||||
|
||||
/* Store the oper freq in session Table */
|
||||
session->curr_op_freq = wlan_reg_chan_to_freq(
|
||||
mac_ctx->pdev, sme_start_bss_req->channelId);
|
||||
session->curr_op_freq = sme_start_bss_req->oper_ch_freq;
|
||||
|
||||
/* Store Persona */
|
||||
session->opmode = sme_start_bss_req->bssPersona;
|
||||
|
|
@ -741,13 +741,12 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||
}
|
||||
}
|
||||
|
||||
if (!sme_start_bss_req->channelId &&
|
||||
if (!sme_start_bss_req->oper_ch_freq &&
|
||||
sme_start_bss_req->bssType != eSIR_NDI_MODE) {
|
||||
pe_err("Received invalid eWNI_SME_START_BSS_REQ");
|
||||
ret_code = eSIR_SME_INVALID_PARAMETERS;
|
||||
goto free;
|
||||
}
|
||||
channel_number = sme_start_bss_req->channelId;
|
||||
#ifdef QCA_HT_2040_COEX
|
||||
if (sme_start_bss_req->obssEnabled)
|
||||
session->htSupportedChannelWidthSet =
|
||||
|
|
@ -880,8 +879,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||
}
|
||||
}
|
||||
/* store the channel num in mlmstart req structure */
|
||||
mlm_start_req->channelNumber = wlan_reg_freq_to_chan(
|
||||
mac_ctx->pdev, session->curr_op_freq);
|
||||
mlm_start_req->oper_ch_freq = session->curr_op_freq;
|
||||
mlm_start_req->cbMode = sme_start_bss_req->cbMode;
|
||||
mlm_start_req->beaconPeriod =
|
||||
session->beaconParams.beaconInterval;
|
||||
|
|
|
|||
|
|
@ -358,9 +358,9 @@ bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
|
|||
uint8_t i = 0;
|
||||
tSirMacRateSet *opr_rates = &start_bss_req->operationalRateSet;
|
||||
|
||||
pe_debug("Parsed START_BSS_REQ fields are bssType: %s (%d) channelId: %d SSID len: %d rsnIE len: %d nwType: %d rateset len: %d",
|
||||
pe_debug("Parsed START_BSS_REQ fields are bssType: %s (%d) chan_freq: %d SSID len: %d rsnIE len: %d nwType: %d rateset len: %d",
|
||||
lim_bss_type_to_string(start_bss_req->bssType),
|
||||
start_bss_req->bssType, start_bss_req->channelId,
|
||||
start_bss_req->bssType, start_bss_req->oper_ch_freq,
|
||||
start_bss_req->ssId.length, start_bss_req->rsnIE.length,
|
||||
start_bss_req->nwType, opr_rates->numRates);
|
||||
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ typedef struct sLimMlmStartReq {
|
|||
tSirMacBeaconInterval beaconPeriod;
|
||||
uint8_t dtimPeriod;
|
||||
tSirMacCfParamSet cfParamSet;
|
||||
tSirMacChanNum channelNumber;
|
||||
uint32_t oper_ch_freq;
|
||||
ePhyChanBondState cbMode;
|
||||
tSirMacRateSet rateSet;
|
||||
uint8_t sessionId; /* Added For BT-AMP Support */
|
||||
|
|
|
|||
|
|
@ -16640,8 +16640,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t
|
|||
#endif
|
||||
pMsg->bssType = csr_translate_bsstype_to_mac_type(bssType);
|
||||
qdf_mem_copy(&pMsg->ssId, &pParam->ssId, sizeof(pParam->ssId));
|
||||
pMsg->channelId =
|
||||
wlan_reg_freq_to_chan(mac->pdev, pParam->operation_chan_freq);
|
||||
pMsg->oper_ch_freq = pParam->operation_chan_freq;
|
||||
/* What should we really do for the cbmode. */
|
||||
pMsg->cbMode = (ePhyChanBondState) pParam->cbMode;
|
||||
pMsg->vht_channel_width = pParam->ch_params.ch_width;
|
||||
|
|
@ -16671,7 +16670,8 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t
|
|||
if (eSIR_IBSS_MODE == pMsg->bssType ||
|
||||
!policy_mgr_is_dbs_enable(mac->psoc))
|
||||
csr_set_ldpc_exception(mac, pSession,
|
||||
pMsg->channelId,
|
||||
wlan_reg_freq_to_chan(mac->pdev,
|
||||
pParam->operation_chan_freq),
|
||||
mac->mlme_cfg->ht_caps.
|
||||
ht_cap_info.adv_coding_cap);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue