qcacld-3.0: Cleanup the start bss request flow
Remove redundant structures and operations in SME/CSR. Currently, start bss request is prepared in CSR module using csr_roam_profile, which is built from sap context. To remove redundencies, prepare the start bss request in SAP module and serialize the start bss request. Change-Id: Icd468fe2a48d5324c1485d83b05e27400c9dbd9a CRs-Fixed: 3142912
这个提交包含在:

提交者
Madan Koyyalamudi

父节点
d93a5bced6
当前提交
3d8ad3801b
@@ -331,12 +331,18 @@ end:
|
||||
static int hdd_ndi_start_bss(struct hdd_adapter *adapter)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
uint32_t roam_id;
|
||||
/* To be removed after SAP CSR cleanup changes */
|
||||
#ifndef SAP_CP_CLEANUP
|
||||
uint32_t roam_id;
|
||||
struct csr_roam_profile *roam_profile;
|
||||
#endif
|
||||
mac_handle_t mac_handle;
|
||||
#else
|
||||
struct bss_dot11_config dot11_cfg = {0};
|
||||
struct start_bss_config ndi_bss_cfg = {0};
|
||||
tCsrChannelInfo ch_info;
|
||||
mac_handle_t mac_handle = hdd_adapter_get_mac_handle(adapter);
|
||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
||||
#endif
|
||||
struct hdd_context *hdd_ctx;
|
||||
/* To be removed after SAP CSR cleanup changes */
|
||||
#ifndef SAP_CP_CLEANUP
|
||||
@@ -388,6 +394,43 @@ static int hdd_ndi_start_bss(struct hdd_adapter *adapter)
|
||||
mac_handle = hdd_adapter_get_mac_handle(adapter);
|
||||
status = sme_bss_start(mac_handle, adapter->vdev_id,
|
||||
roam_profile, &roam_id);
|
||||
#else
|
||||
status = hdd_ndi_config_ch_list(hdd_ctx, &ch_info);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("Unable to retrieve channel list for NAN");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dot11_cfg.vdev_id = adapter->vdev_id;
|
||||
dot11_cfg.bss_op_ch_freq = ch_info.freq_list[0];
|
||||
dot11_cfg.phy_mode = eCSR_DOT11_MODE_AUTO;
|
||||
if (!wlan_vdev_id_is_open_cipher(mac->pdev, adapter->vdev_id))
|
||||
dot11_cfg.privacy = 1;
|
||||
|
||||
sme_get_network_params(mac, &dot11_cfg);
|
||||
ndi_bss_cfg.vdev_id = adapter->vdev_id;
|
||||
ndi_bss_cfg.oper_ch_freq = dot11_cfg.bss_op_ch_freq;
|
||||
ndi_bss_cfg.nwType = dot11_cfg.nw_type;
|
||||
ndi_bss_cfg.dot11mode = dot11_cfg.dot11_mode;
|
||||
|
||||
if (dot11_cfg.opr_rates.numRates) {
|
||||
qdf_mem_copy(ndi_bss_cfg.operationalRateSet.rate,
|
||||
dot11_cfg.opr_rates.rate,
|
||||
dot11_cfg.opr_rates.numRates);
|
||||
ndi_bss_cfg.operationalRateSet.numRates =
|
||||
dot11_cfg.opr_rates.numRates;
|
||||
}
|
||||
|
||||
if (dot11_cfg.ext_rates.numRates) {
|
||||
qdf_mem_copy(ndi_bss_cfg.extendedRateSet.rate,
|
||||
dot11_cfg.ext_rates.rate,
|
||||
dot11_cfg.ext_rates.numRates);
|
||||
ndi_bss_cfg.extendedRateSet.numRates =
|
||||
dot11_cfg.ext_rates.numRates;
|
||||
}
|
||||
|
||||
status = sme_start_bss(mac_handle, adapter->vdev_id,
|
||||
&ndi_bss_cfg);
|
||||
#endif
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
hdd_err("NDI sme_RoamConnect session %d failed with status %d -> NotConnected",
|
||||
@@ -403,6 +446,8 @@ static int hdd_ndi_start_bss(struct hdd_adapter *adapter)
|
||||
qdf_mem_free(roam_profile->ChannelInfo.freq_list);
|
||||
roam_profile->ChannelInfo.freq_list = NULL;
|
||||
roam_profile->ChannelInfo.numOfChannels = 0;
|
||||
#else
|
||||
qdf_mem_free(ch_info.freq_list);
|
||||
#endif
|
||||
hdd_exit();
|
||||
|
||||
|
@@ -5275,23 +5275,23 @@ struct channel_change_req {
|
||||
* request configurations
|
||||
* @vdev_id: vdev id
|
||||
* @cmd_id: serialization command id
|
||||
* @ssid: ssid
|
||||
* @dtim_period: dtim period
|
||||
* @hidden_ssid: hidden ssid parameter
|
||||
* @ssId: ssid
|
||||
* @dtimPeriod: dtim period
|
||||
* @ssidHidden: hidden ssid parameter
|
||||
* @privacy: ssid privacy
|
||||
* @auth_type: authentication type
|
||||
* @rsnie: RSN IE of the AP
|
||||
* @authType: authentication type
|
||||
* @rsnIE: RSN IE of the AP
|
||||
* @add_ie_params: additional IEs
|
||||
* @oper_ch_freq: operating frequency
|
||||
* @channel_width: channel width
|
||||
* @vht_channel_width: channel width
|
||||
* @center_freq_seg0: channel center freq 0
|
||||
* @center_freq_seg1: channel center freq 1
|
||||
* @sec_ch_offset: secondary channel offset
|
||||
* @wps_state: wps config
|
||||
* @dot11mode: dot11 mode
|
||||
* @nw_type: nw type
|
||||
* @opr_rates: operational rates
|
||||
* @ext_rates: extended rates
|
||||
* @nwType: nw type
|
||||
* @operationalRateSet: operational rates
|
||||
* @extendedRateSet: extended rates
|
||||
* @beacon_tx_rate: Tx rate for beacon
|
||||
* @cac_duration_ms: cac duration in ms
|
||||
* @dfs_regdomain: dfs regdomain
|
||||
@@ -5299,28 +5299,28 @@ struct channel_change_req {
|
||||
struct start_bss_config {
|
||||
uint8_t vdev_id;
|
||||
uint32_t cmd_id;
|
||||
tSirMacSSid ssid;
|
||||
uint16_t bcn_int;
|
||||
uint32_t dtim_period;
|
||||
uint8_t hidden_ssid;
|
||||
tSirMacSSid ssId;
|
||||
uint16_t beaconInterval;
|
||||
uint32_t dtimPeriod;
|
||||
uint8_t ssidHidden;
|
||||
|
||||
uint8_t privacy;
|
||||
tAniAuthType auth_type;
|
||||
tSirRSNie rsn_ie;
|
||||
tAniAuthType authType;
|
||||
tSirRSNie rsnIE;
|
||||
struct add_ie_params add_ie_params;
|
||||
|
||||
uint32_t oper_ch_freq;
|
||||
uint8_t channel_width;
|
||||
uint8_t vht_channel_width;
|
||||
uint8_t center_freq_seg0;
|
||||
uint8_t center_freq_seg1;
|
||||
uint8_t sec_ch_offset;
|
||||
|
||||
uint8_t wps_state;
|
||||
uint8_t dot11mode;
|
||||
tSirNwType nw_type;
|
||||
tSirNwType nwType;
|
||||
|
||||
tSirMacRateSet opr_rates;
|
||||
tSirMacRateSet ext_rates;
|
||||
tSirMacRateSet operationalRateSet;
|
||||
tSirMacRateSet extendedRateSet;
|
||||
uint16_t beacon_tx_rate;
|
||||
uint32_t cac_duration_ms;
|
||||
uint32_t dfs_regdomain;
|
||||
|
@@ -233,7 +233,7 @@ struct pe_session {
|
||||
#ifndef SAP_CP_CLEANUP
|
||||
struct start_bss_req *pLimStartBssReq; /* handle to start bss req */
|
||||
#else
|
||||
struct start_bss_config *lim_start_bss_req;
|
||||
struct start_bss_config *pLimStartBssReq;
|
||||
#endif
|
||||
struct join_req *lim_join_req; /* handle to sme join req */
|
||||
struct join_req *pLimReAssocReq; /* handle to sme reassoc req */
|
||||
|
@@ -286,10 +286,8 @@ bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
|
||||
#endif
|
||||
{
|
||||
uint8_t i = 0;
|
||||
/* To be removed after SAP CSR cleanup changes */
|
||||
#ifndef SAP_CP_CLEANUP
|
||||
tSirMacRateSet *opr_rates = &start_bss_req->operationalRateSet;
|
||||
#endif
|
||||
|
||||
switch (bss_type) {
|
||||
case eSIR_INFRASTRUCTURE_MODE:
|
||||
/**
|
||||
|
@@ -2906,6 +2906,13 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
|
||||
mac_handle_t mac_handle)
|
||||
{
|
||||
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
|
||||
/* To be removed after SAP CSR cleanup changes */
|
||||
#ifdef SAP_CP_CLEANUP
|
||||
struct bss_dot11_config dot11_cfg = {0};
|
||||
tSirMacRateSet *opr_rates = &sap_ctx->sap_bss_cfg.operationalRateSet;
|
||||
tSirMacRateSet *ext_rates = &sap_ctx->sap_bss_cfg.extendedRateSet;
|
||||
uint8_t h2e;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* check if channel is in DFS_NOL or if the channel
|
||||
@@ -2972,6 +2979,74 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
|
||||
!!sap_ctx->csr_roamProfile.cac_duration_ms);
|
||||
sap_ctx->csr_roamProfile.beacon_tx_rate =
|
||||
sap_ctx->beacon_tx_rate;
|
||||
#else
|
||||
sap_get_cac_dur_dfs_region(sap_ctx,
|
||||
&sap_ctx->sap_bss_cfg.cac_duration_ms,
|
||||
&sap_ctx->sap_bss_cfg.dfs_regdomain,
|
||||
sap_ctx->chan_freq,
|
||||
&sap_ctx->ch_params);
|
||||
mlme_set_cac_required(sap_ctx->vdev,
|
||||
!!sap_ctx->sap_bss_cfg.cac_duration_ms);
|
||||
|
||||
sap_ctx->sap_bss_cfg.oper_ch_freq = sap_ctx->chan_freq;
|
||||
sap_ctx->sap_bss_cfg.vht_channel_width = sap_ctx->ch_params.ch_width;
|
||||
sap_ctx->sap_bss_cfg.center_freq_seg0 =
|
||||
sap_ctx->ch_params.center_freq_seg0;
|
||||
sap_ctx->sap_bss_cfg.center_freq_seg1 =
|
||||
sap_ctx->ch_params.center_freq_seg1;
|
||||
sap_ctx->sap_bss_cfg.sec_ch_offset = sap_ctx->ch_params.sec_ch_offset;
|
||||
|
||||
dot11_cfg.vdev_id = sap_ctx->sessionId;
|
||||
dot11_cfg.bss_op_ch_freq = sap_ctx->chan_freq;
|
||||
dot11_cfg.phy_mode = sap_ctx->phyMode;
|
||||
dot11_cfg.privacy = sap_ctx->sap_bss_cfg.privacy;
|
||||
|
||||
qdf_mem_copy(dot11_cfg.opr_rates.rate,
|
||||
opr_rates->rate, opr_rates->numRates);
|
||||
dot11_cfg.opr_rates.numRates = opr_rates->numRates;
|
||||
|
||||
qdf_mem_copy(dot11_cfg.ext_rates.rate,
|
||||
ext_rates->rate, ext_rates->numRates);
|
||||
dot11_cfg.ext_rates.numRates = ext_rates->numRates;
|
||||
|
||||
sme_get_network_params(mac_ctx, &dot11_cfg);
|
||||
|
||||
sap_ctx->sap_bss_cfg.nwType = dot11_cfg.nw_type;
|
||||
sap_ctx->sap_bss_cfg.dot11mode = dot11_cfg.dot11_mode;
|
||||
|
||||
if (dot11_cfg.opr_rates.numRates) {
|
||||
qdf_mem_copy(opr_rates->rate,
|
||||
dot11_cfg.opr_rates.rate,
|
||||
dot11_cfg.opr_rates.numRates);
|
||||
opr_rates->numRates = dot11_cfg.opr_rates.numRates;
|
||||
} else {
|
||||
qdf_mem_zero(opr_rates, sizeof(tSirMacRateSet));
|
||||
}
|
||||
|
||||
if (dot11_cfg.ext_rates.numRates) {
|
||||
qdf_mem_copy(ext_rates->rate,
|
||||
dot11_cfg.ext_rates.rate,
|
||||
dot11_cfg.ext_rates.numRates);
|
||||
ext_rates->numRates = dot11_cfg.ext_rates.numRates;
|
||||
} else {
|
||||
qdf_mem_zero(ext_rates, sizeof(tSirMacRateSet));
|
||||
}
|
||||
|
||||
if (sap_ctx->require_h2e) {
|
||||
h2e = WLAN_BASIC_RATE_MASK |
|
||||
WLAN_BSS_MEMBERSHIP_SELECTOR_SAE_H2E;
|
||||
if (ext_rates->numRates < SIR_MAC_MAX_NUMBER_OF_RATES) {
|
||||
ext_rates->rate[ext_rates->numRates] = h2e;
|
||||
ext_rates->numRates++;
|
||||
sap_debug("H2E bss membership add to ext support rate");
|
||||
} else if (opr_rates->numRates < SIR_MAC_MAX_NUMBER_OF_RATES) {
|
||||
opr_rates->rate[opr_rates->numRates] = h2e;
|
||||
opr_rates->numRates++;
|
||||
sap_debug("H2E bss membership add to support rate");
|
||||
} else {
|
||||
sap_err("rates full, can not add H2E bss membership");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
sap_debug("notify hostapd about chan freq selection: %d",
|
||||
sap_ctx->chan_freq);
|
||||
@@ -2991,6 +3066,9 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
|
||||
qdf_status = sme_bss_start(mac_handle, sap_ctx->sessionId,
|
||||
&sap_ctx->csr_roamProfile,
|
||||
&sap_ctx->csr_roamId);
|
||||
#else
|
||||
qdf_status = sme_start_bss(mac_handle, sap_ctx->sessionId,
|
||||
&sap_ctx->sap_bss_cfg);
|
||||
#endif
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
|
||||
sap_err("Failed to issue sme_roam_connect");
|
||||
@@ -4619,6 +4697,81 @@ void
|
||||
sap_build_start_bss_config(struct start_bss_config *sap_bss_cfg,
|
||||
struct sap_config *config)
|
||||
{
|
||||
qdf_mem_zero(&sap_bss_cfg->ssId.ssId, sizeof(sap_bss_cfg->ssId.ssId));
|
||||
sap_bss_cfg->ssId.length = config->SSIDinfo.ssid.length;
|
||||
qdf_mem_copy(&sap_bss_cfg->ssId.ssId, config->SSIDinfo.ssid.ssId,
|
||||
config->SSIDinfo.ssid.length);
|
||||
|
||||
if (config->authType == eSAP_SHARED_KEY)
|
||||
sap_bss_cfg->authType = eSIR_SHARED_KEY;
|
||||
else if (config->authType == eSAP_OPEN_SYSTEM)
|
||||
sap_bss_cfg->authType = eSIR_OPEN_SYSTEM;
|
||||
else
|
||||
sap_bss_cfg->authType = eSIR_AUTO_SWITCH;
|
||||
|
||||
sap_bss_cfg->beaconInterval = (uint16_t)config->beacon_int;
|
||||
sap_bss_cfg->privacy = config->privacy;
|
||||
sap_bss_cfg->ssidHidden = config->SSIDinfo.ssidHidden;
|
||||
sap_bss_cfg->dtimPeriod = config->dtim_period;
|
||||
sap_bss_cfg->wps_state = config->wps_state;
|
||||
sap_bss_cfg->beacon_tx_rate = config->beacon_tx_rate;
|
||||
|
||||
/* RSNIE */
|
||||
sap_bss_cfg->rsnIE.length = config->RSNWPAReqIELength;
|
||||
if (config->RSNWPAReqIELength)
|
||||
qdf_mem_copy(sap_bss_cfg->rsnIE.rsnIEdata,
|
||||
config->RSNWPAReqIE, config->RSNWPAReqIELength);
|
||||
|
||||
/* Probe response IE */
|
||||
if (config->probeRespIEsBufferLen > 0 &&
|
||||
config->pProbeRespIEsBuffer) {
|
||||
sap_bss_cfg->add_ie_params.probeRespDataLen =
|
||||
config->probeRespIEsBufferLen;
|
||||
sap_bss_cfg->add_ie_params.probeRespData_buff =
|
||||
config->pProbeRespIEsBuffer;
|
||||
} else {
|
||||
sap_bss_cfg->add_ie_params.probeRespDataLen = 0;
|
||||
sap_bss_cfg->add_ie_params.probeRespData_buff = NULL;
|
||||
}
|
||||
|
||||
/*assoc resp IE */
|
||||
if (config->assocRespIEsLen > 0 && config->pAssocRespIEsBuffer) {
|
||||
sap_bss_cfg->add_ie_params.assocRespDataLen =
|
||||
config->assocRespIEsLen;
|
||||
sap_bss_cfg->add_ie_params.assocRespData_buff =
|
||||
config->pAssocRespIEsBuffer;
|
||||
} else {
|
||||
sap_bss_cfg->add_ie_params.assocRespDataLen = 0;
|
||||
sap_bss_cfg->add_ie_params.assocRespData_buff = NULL;
|
||||
}
|
||||
|
||||
if (config->probeRespBcnIEsLen > 0 &&
|
||||
config->pProbeRespBcnIEsBuffer) {
|
||||
sap_bss_cfg->add_ie_params.probeRespBCNDataLen =
|
||||
config->probeRespBcnIEsLen;
|
||||
sap_bss_cfg->add_ie_params.probeRespBCNData_buff =
|
||||
config->pProbeRespBcnIEsBuffer;
|
||||
} else {
|
||||
sap_bss_cfg->add_ie_params.probeRespBCNDataLen = 0;
|
||||
sap_bss_cfg->add_ie_params.probeRespBCNData_buff = NULL;
|
||||
}
|
||||
|
||||
if (config->supported_rates.numRates) {
|
||||
qdf_mem_copy(sap_bss_cfg->operationalRateSet.rate,
|
||||
config->supported_rates.rate,
|
||||
config->supported_rates.numRates);
|
||||
sap_bss_cfg->operationalRateSet.numRates =
|
||||
config->supported_rates.numRates;
|
||||
}
|
||||
|
||||
if (config->extended_rates.numRates) {
|
||||
qdf_mem_copy(sap_bss_cfg->extendedRateSet.rate,
|
||||
config->extended_rates.rate,
|
||||
config->extended_rates.numRates);
|
||||
sap_bss_cfg->extendedRateSet.numRates =
|
||||
config->extended_rates.numRates;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@@ -142,10 +142,10 @@ struct sap_context {
|
||||
#ifndef SAP_CP_CLEANUP
|
||||
/* Include the SME(CSR) context here */
|
||||
struct csr_roam_profile csr_roamProfile;
|
||||
uint32_t csr_roamId;
|
||||
#else
|
||||
struct start_bss_config sap_bss_cfg;
|
||||
#endif
|
||||
uint32_t csr_roamId;
|
||||
|
||||
/* SAP event Callback to hdd */
|
||||
sap_event_cb sap_event_cb;
|
||||
@@ -250,6 +250,9 @@ struct sap_context {
|
||||
#ifdef FEATURE_WLAN_CH_AVOID_EXT
|
||||
uint32_t restriction_mask;
|
||||
#endif
|
||||
#ifdef SAP_CP_CLEANUP
|
||||
bool require_h2e;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
|
@@ -763,7 +763,6 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
|
||||
sap_ctx->disabled_mcs13 = false;
|
||||
sap_ctx->phyMode = config->SapHw_mode;
|
||||
sap_ctx->csa_reason = CSA_REASON_UNKNOWN;
|
||||
|
||||
/* To be removed after SAP CSR cleanup changes */
|
||||
#ifndef SAP_CP_CLEANUP
|
||||
/* Set the BSSID to your "self MAC Addr" read the mac address
|
||||
@@ -779,6 +778,10 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
|
||||
/* copy the configuration items to csrProfile */
|
||||
sapconvert_to_csr_profile(config, eCSR_BSS_TYPE_INFRA_AP,
|
||||
&sap_ctx->csr_roamProfile);
|
||||
#else
|
||||
sap_ctx->require_h2e = config->require_h2e;
|
||||
qdf_mem_copy(sap_ctx->bssid.bytes, config->self_macaddr.bytes,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
#endif
|
||||
qdf_mem_copy(sap_ctx->self_mac_addr,
|
||||
config->self_macaddr.bytes, QDF_MAC_ADDR_SIZE);
|
||||
@@ -841,6 +844,11 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
|
||||
/* Store the HDD callback in SAP context */
|
||||
sap_ctx->sap_event_cb = sap_event_cb;
|
||||
|
||||
/* To be removed after SAP CSR cleanup changes */
|
||||
#ifdef SAP_CP_CLEANUP
|
||||
sap_ctx->sap_bss_cfg.vdev_id = sap_ctx->sessionId;
|
||||
sap_build_start_bss_config(&sap_ctx->sap_bss_cfg, config);
|
||||
#endif
|
||||
/* Handle event */
|
||||
qdf_status = sap_fsm(sap_ctx, &sap_event);
|
||||
fail:
|
||||
@@ -848,6 +856,10 @@ fail:
|
||||
#ifndef SAP_CP_CLEANUP
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
||||
sap_free_roam_profile(&sap_ctx->csr_roamProfile);
|
||||
#else
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
||||
qdf_mem_zero(&sap_ctx->sap_bss_cfg,
|
||||
sizeof(sap_ctx->sap_bss_cfg));
|
||||
#endif
|
||||
return qdf_status;
|
||||
} /* wlansap_start_bss */
|
||||
|
@@ -964,6 +964,18 @@ QDF_STATUS csr_mlme_vdev_stop_bss(uint8_t vdev_id);
|
||||
*/
|
||||
qdf_freq_t csr_mlme_get_concurrent_operation_freq(void);
|
||||
|
||||
/* csr_convert_mode_to_nw_type() - CSR API to convert dot11 mode
|
||||
* to network type.
|
||||
*
|
||||
* @dot11_mode: dot11 mode
|
||||
* @band: reg band
|
||||
*
|
||||
* Return: network type
|
||||
*/
|
||||
tSirNwType
|
||||
csr_convert_mode_to_nw_type(enum csr_cfgdot11mode dot11_mode,
|
||||
enum reg_wifi_band band);
|
||||
|
||||
#ifdef SAP_CP_CLEANUP
|
||||
/*
|
||||
* csr_roam_get_phy_mode_band_for_bss() - CSR API to get phy mode and
|
||||
|
@@ -585,7 +585,7 @@ QDF_STATUS csr_roam_channel_change_req(struct mac_context *mac,
|
||||
struct csr_roam_profile *profile);
|
||||
#else
|
||||
/**
|
||||
* csr_sap_channel_change_req() - Post channel change request to LIM
|
||||
* csr_send_channel_change_req() - Post channel change request to LIM
|
||||
* @mac : mac context
|
||||
* @req : channel change request
|
||||
*
|
||||
@@ -593,8 +593,8 @@ QDF_STATUS csr_roam_channel_change_req(struct mac_context *mac,
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS csr_sap_channel_change_req(struct mac_context *mac,
|
||||
struct channel_change_req *req);
|
||||
QDF_STATUS csr_send_channel_change_req(struct mac_context *mac,
|
||||
struct channel_change_req *req);
|
||||
#endif
|
||||
|
||||
/* Post Beacon Tx Start Indication */
|
||||
|
@@ -4541,9 +4541,8 @@ QDF_STATUS sme_update_vdev_mac_addr(struct wlan_objmgr_psoc *psoc,
|
||||
*
|
||||
* Return : QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
sme_get_network_params(struct mac_context *mac_ctx,
|
||||
struct bss_dot11_config *dot11_cfg);
|
||||
QDF_STATUS sme_get_network_params(struct mac_context *mac_ctx,
|
||||
struct bss_dot11_config *dot11_cfg);
|
||||
|
||||
/**
|
||||
* sme_start_bss() -A wrapper function to request CSR to
|
||||
@@ -4551,13 +4550,11 @@ sme_get_network_params(struct mac_context *mac_ctx,
|
||||
* @mac_handle: mac hancle
|
||||
* @vdev_id: vdev id
|
||||
* @bss_config: pointer to start bss config
|
||||
* @roam_id: pointer to roam id
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS sme_start_bss(mac_handle_t mac_handle, uint8_t vdev_id,
|
||||
struct start_bss_config *bss_config,
|
||||
uint32_t *roam_id);
|
||||
struct start_bss_config *bss_config);
|
||||
|
||||
/**
|
||||
* sme_sap_ser_callback() - callback from serialization module
|
||||
@@ -4581,20 +4578,19 @@ QDF_STATUS sme_sap_ser_callback(struct wlan_serialization_command *cmd,
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
void
|
||||
sme_fill_channel_change_request(mac_handle_t mac_handle,
|
||||
struct channel_change_req *req,
|
||||
eCsrPhyMode phy_mode);
|
||||
void sme_fill_channel_change_request(mac_handle_t mac_handle,
|
||||
struct channel_change_req *req,
|
||||
eCsrPhyMode phy_mode);
|
||||
|
||||
/**
|
||||
* sme_sap_channel_change_req() - SME API to post channel change
|
||||
* sme_send_channel_change_req() - SME API to post channel change
|
||||
* request to LIM
|
||||
* @mac_handle: mac handle
|
||||
* @req: pointer to change channel request message
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS sme_sap_channel_change_req(mac_handle_t mac_handle,
|
||||
QDF_STATUS sme_send_channel_change_req(mac_handle_t mac_handle,
|
||||
struct channel_change_req *req);
|
||||
#endif
|
||||
#endif /* #if !defined( __SME_API_H ) */
|
||||
|
@@ -80,6 +80,10 @@
|
||||
#include <wlan_mlo_mgr_sta.h>
|
||||
#include <wlan_mlo_mgr_main.h>
|
||||
|
||||
#ifdef SAP_CP_CLEANUP
|
||||
#include "wlan_policy_mgr_ucfg.h"
|
||||
#endif
|
||||
|
||||
static QDF_STATUS init_sme_cmd_list(struct mac_context *mac);
|
||||
|
||||
static void sme_disconnect_connected_sessions(struct mac_context *mac,
|
||||
@@ -3266,14 +3270,105 @@ QDF_STATUS sme_bss_start(mac_handle_t mac_handle, uint8_t vdev_id,
|
||||
QDF_STATUS sme_get_network_params(struct mac_context *mac,
|
||||
struct bss_dot11_config *dot11_cfg)
|
||||
{
|
||||
enum csr_cfgdot11mode dot11_mode;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
bool chan_switch_hostapd_rate_enabled = true;
|
||||
uint8_t mcc_to_scc_switch = 0;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
if (!mac)
|
||||
return status;
|
||||
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return status;
|
||||
|
||||
ucfg_mlme_get_sap_chan_switch_rate_enabled(mac->psoc,
|
||||
&chan_switch_hostapd_rate_enabled);
|
||||
ucfg_policy_mgr_get_mcc_scc_switch(mac->psoc,
|
||||
&mcc_to_scc_switch);
|
||||
|
||||
if (mcc_to_scc_switch != QDF_MCC_TO_SCC_SWITCH_DISABLE)
|
||||
chan_switch_hostapd_rate_enabled = false;
|
||||
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac->pdev,
|
||||
dot11_cfg->vdev_id);
|
||||
dot11_mode =
|
||||
csr_roam_get_phy_mode_band_for_bss(mac, dot11_cfg);
|
||||
|
||||
dot11_cfg->dot11_mode =
|
||||
csr_translate_to_wni_cfg_dot11_mode(mac, dot11_mode);
|
||||
|
||||
dot11_cfg->nw_type =
|
||||
csr_convert_mode_to_nw_type(dot11_cfg->dot11_mode,
|
||||
dot11_cfg->p_band);
|
||||
|
||||
/* If INI is enabled, use the rates from hostapd */
|
||||
if (!cds_is_sub_20_mhz_enabled() && chan_switch_hostapd_rate_enabled &&
|
||||
(dot11_cfg->opr_rates.numRates || dot11_cfg->ext_rates.numRates)) {
|
||||
sme_err("Use the rates from the hostapd");
|
||||
} else { /* Populate new rates */
|
||||
dot11_cfg->ext_rates.numRates = 0;
|
||||
dot11_cfg->opr_rates.numRates = 0;
|
||||
|
||||
switch (dot11_cfg->nw_type) {
|
||||
case eSIR_11A_NW_TYPE:
|
||||
wlan_populate_basic_rates(&dot11_cfg->opr_rates,
|
||||
true, true);
|
||||
break;
|
||||
case eSIR_11B_NW_TYPE:
|
||||
wlan_populate_basic_rates(&dot11_cfg->opr_rates,
|
||||
false, true);
|
||||
break;
|
||||
case eSIR_11G_NW_TYPE:
|
||||
if ((opmode == QDF_P2P_CLIENT_MODE) ||
|
||||
(opmode == QDF_P2P_GO_MODE) ||
|
||||
(dot11_mode == eCSR_CFG_DOT11_MODE_11G_ONLY)) {
|
||||
wlan_populate_basic_rates(&dot11_cfg->opr_rates,
|
||||
true, true);
|
||||
} else {
|
||||
wlan_populate_basic_rates(&dot11_cfg->opr_rates,
|
||||
false, true);
|
||||
wlan_populate_basic_rates(&dot11_cfg->ext_rates,
|
||||
true, false);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
sme_release_global_lock(&mac->sme);
|
||||
sme_err("Unknown network type %d", dot11_cfg->nw_type);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
sme_release_global_lock(&mac->sme);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS sme_start_bss(mac_handle_t mac_handle, uint8_t vdev_id,
|
||||
struct start_bss_config *bss_config,
|
||||
uint32_t *roam_id)
|
||||
struct start_bss_config *bss_config)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
||||
|
||||
if (!mac)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
MTRACE(qdf_trace(QDF_MODULE_ID_SME,
|
||||
TRACE_CODE_SME_RX_HDD_MSG_CONNECT, vdev_id, 0));
|
||||
|
||||
if (!CSR_IS_SESSION_VALID(mac, vdev_id)) {
|
||||
sme_err("Invalid sessionID: %d", vdev_id);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return status;
|
||||
|
||||
status = csr_bss_start(mac, vdev_id, bss_config);
|
||||
sme_release_global_lock(&mac->sme);
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
@@ -16270,7 +16365,41 @@ void sme_roam_events_deregister_callback(mac_handle_t mac_handle)
|
||||
static QDF_STATUS sme_send_start_bss_msg(struct mac_context *mac,
|
||||
struct start_bss_config *cfg)
|
||||
{
|
||||
struct scheduler_msg msg = {0};
|
||||
struct start_bss_config *start_bss_cfg;
|
||||
struct start_bss_rsp rsp;
|
||||
|
||||
if (!cfg)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
csr_roam_state_change(mac, eCSR_ROAMING_STATE_JOINING, cfg->vdev_id);
|
||||
csr_roam_substate_change(mac, eCSR_ROAM_SUBSTATE_START_BSS_REQ,
|
||||
cfg->vdev_id);
|
||||
|
||||
start_bss_cfg = qdf_mem_malloc(sizeof(*start_bss_cfg));
|
||||
if (!start_bss_cfg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
qdf_mem_copy(start_bss_cfg, cfg, sizeof(*start_bss_cfg));
|
||||
msg.type = eWNI_SME_START_BSS_REQ;
|
||||
msg.bodyptr = start_bss_cfg;
|
||||
msg.reserved = 0;
|
||||
|
||||
if (QDF_STATUS_SUCCESS != scheduler_post_message(QDF_MODULE_ID_SME,
|
||||
QDF_MODULE_ID_PE,
|
||||
QDF_MODULE_ID_PE,
|
||||
&msg))
|
||||
goto failure;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
failure:
|
||||
rsp.cmd_id = start_bss_cfg->cmd_id;
|
||||
sme_err("Failed to post start bss request to PE for vdev : %d",
|
||||
start_bss_cfg->vdev_id);
|
||||
csr_process_sap_response(mac, CSR_SAP_START_BSS_FAILURE, &rsp,
|
||||
start_bss_cfg->vdev_id, start_bss_cfg->cmd_id);
|
||||
qdf_mem_free(start_bss_cfg);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
static QDF_STATUS sme_send_stop_bss_msg(struct mac_context *mac,
|
||||
@@ -16281,13 +16410,68 @@ static QDF_STATUS sme_send_stop_bss_msg(struct mac_context *mac,
|
||||
|
||||
static QDF_STATUS sme_sap_activate_cmd(struct wlan_serialization_command *cmd)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
mac_handle_t mac_handle;
|
||||
struct mac_context *mac;
|
||||
|
||||
mac_handle = cds_get_context(QDF_MODULE_ID_SME);
|
||||
mac = MAC_CONTEXT(mac_handle);
|
||||
if (!mac) {
|
||||
QDF_ASSERT(0);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
switch (cmd->cmd_type) {
|
||||
case WLAN_SER_CMD_VDEV_START_BSS:
|
||||
status = sme_send_start_bss_msg(mac, cmd->umac_cmd);
|
||||
break;
|
||||
default:
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS sme_sap_ser_callback(struct wlan_serialization_command *cmd,
|
||||
enum wlan_serialization_cb_reason reason)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
mac_handle_t mac_handle;
|
||||
struct mac_context *mac_ctx;
|
||||
|
||||
if (!cmd) {
|
||||
sme_err("Invalid Serialization command");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
mac_handle = cds_get_context(QDF_MODULE_ID_SME);
|
||||
if (mac_handle)
|
||||
mac_ctx = MAC_CONTEXT(mac_handle);
|
||||
else
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
switch (reason) {
|
||||
case WLAN_SER_CB_ACTIVATE_CMD:
|
||||
status = sme_sap_activate_cmd(cmd);
|
||||
break;
|
||||
case WLAN_SER_CB_CANCEL_CMD:
|
||||
break;
|
||||
case WLAN_SER_CB_RELEASE_MEM_CMD:
|
||||
if (cmd->vdev)
|
||||
wlan_objmgr_vdev_release_ref(cmd->vdev,
|
||||
WLAN_LEGACY_MAC_ID);
|
||||
if (cmd->umac_cmd)
|
||||
qdf_mem_free(cmd->umac_cmd);
|
||||
break;
|
||||
case WLAN_SER_CB_ACTIVE_CMD_TIMEOUT:
|
||||
qdf_trigger_self_recovery(mac_ctx->psoc,
|
||||
QDF_ACTIVE_LIST_TIMEOUT);
|
||||
break;
|
||||
default:
|
||||
sme_debug("unknown reason code");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
void sme_fill_channel_change_request(mac_handle_t mac_handle,
|
||||
|
@@ -83,6 +83,9 @@
|
||||
#include "wlan_cm_roam_public_struct.h"
|
||||
#include "wlan_mlme_twt_api.h"
|
||||
#include <wlan_serialization_api.h>
|
||||
#ifdef SAP_CP_CLEANUP
|
||||
#include <wlan_vdev_mlme_ser_if.h>
|
||||
#endif
|
||||
|
||||
#define RSN_AUTH_KEY_MGMT_SAE WLAN_RSN_SEL(WLAN_AKM_SAE)
|
||||
#define MAX_PWR_FCC_CHAN_12 8
|
||||
@@ -5342,11 +5345,6 @@ csr_roam_get_phy_mode_band_for_bss(struct mac_context *mac_ctx,
|
||||
struct csr_roam_profile *profile,
|
||||
uint32_t bss_op_ch_freq,
|
||||
enum reg_wifi_band *p_band)
|
||||
#else
|
||||
enum csr_cfgdot11mode
|
||||
csr_roam_get_phy_mode_band_for_bss(struct mac_context *mac_ctx,
|
||||
struct bss_dot11_config *dot11_cfg)
|
||||
#endif
|
||||
{
|
||||
enum reg_wifi_band band = REG_BAND_2G;
|
||||
qdf_freq_t opr_freq = 0;
|
||||
@@ -5429,6 +5427,95 @@ csr_roam_get_phy_mode_band_for_bss(struct mac_context *mac_ctx,
|
||||
#endif
|
||||
return cfg_dot11_mode;
|
||||
}
|
||||
#else
|
||||
enum csr_cfgdot11mode
|
||||
csr_roam_get_phy_mode_band_for_bss(struct mac_context *mac_ctx,
|
||||
struct bss_dot11_config *dot11_cfg)
|
||||
{
|
||||
enum reg_wifi_band band = REG_BAND_2G;
|
||||
qdf_freq_t opr_freq = 0;
|
||||
bool is_11n_allowed;
|
||||
enum csr_cfgdot11mode curr_mode =
|
||||
mac_ctx->roam.configParam.uCfgDot11Mode;
|
||||
enum csr_cfgdot11mode cfg_dot11_mode;
|
||||
enum QDF_OPMODE opmode;
|
||||
bool is_ap = false;
|
||||
uint8_t privacy;
|
||||
uint8_t vdev_id = dot11_cfg->vdev_id;
|
||||
|
||||
if (dot11_cfg->bss_op_ch_freq)
|
||||
opr_freq = dot11_cfg->bss_op_ch_freq;
|
||||
|
||||
opmode = wlan_get_opmode_vdev_id(mac_ctx->pdev, vdev_id);
|
||||
is_ap = (opmode == QDF_SAP_MODE || opmode == QDF_P2P_GO_MODE);
|
||||
cfg_dot11_mode =
|
||||
csr_get_cfg_dot11_mode_from_csr_phy_mode(is_ap,
|
||||
dot11_cfg->phy_mode);
|
||||
privacy = dot11_cfg->privacy;
|
||||
|
||||
/*
|
||||
* If the global setting for dot11Mode is set to auto/abg, we overwrite
|
||||
* the setting in the profile.
|
||||
*/
|
||||
if ((!is_ap && ((eCSR_CFG_DOT11_MODE_AUTO == curr_mode) ||
|
||||
(eCSR_CFG_DOT11_MODE_ABG == curr_mode))) ||
|
||||
(eCSR_CFG_DOT11_MODE_AUTO == cfg_dot11_mode) ||
|
||||
(eCSR_CFG_DOT11_MODE_ABG == cfg_dot11_mode)) {
|
||||
csr_compute_mode_and_band(mac_ctx, &cfg_dot11_mode,
|
||||
&band, opr_freq);
|
||||
} /* if( eCSR_CFG_DOT11_MODE_ABG == cfg_dot11_mode ) */
|
||||
else {
|
||||
/* dot11 mode is set, lets pick the band */
|
||||
if (0 == opr_freq) {
|
||||
/* channel is Auto also. */
|
||||
if (mac_ctx->mlme_cfg->gen.band == BAND_ALL) {
|
||||
/* prefer 5GHz */
|
||||
band = REG_BAND_5G;
|
||||
}
|
||||
} else{
|
||||
band = wlan_reg_freq_to_band(opr_freq);
|
||||
}
|
||||
}
|
||||
|
||||
dot11_cfg->p_band = band;
|
||||
if (opr_freq == 2484 && wlan_reg_is_24ghz_ch_freq(opr_freq)) {
|
||||
sme_err("Switching to Dot11B mode");
|
||||
cfg_dot11_mode = eCSR_CFG_DOT11_MODE_11B;
|
||||
}
|
||||
|
||||
if (wlan_reg_is_24ghz_ch_freq(opr_freq) &&
|
||||
!mac_ctx->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band &&
|
||||
(eCSR_CFG_DOT11_MODE_11AC == cfg_dot11_mode ||
|
||||
eCSR_CFG_DOT11_MODE_11AC_ONLY == cfg_dot11_mode))
|
||||
cfg_dot11_mode = eCSR_CFG_DOT11_MODE_11N;
|
||||
/*
|
||||
* Incase of WEP Security encryption type is coming as part of add key.
|
||||
* So while STart BSS dont have information
|
||||
*/
|
||||
is_11n_allowed = wlan_vdev_id_is_11n_allowed(mac_ctx->pdev, vdev_id);
|
||||
if ((!is_11n_allowed || (privacy &&
|
||||
wlan_vdev_id_is_open_cipher(mac_ctx->pdev, vdev_id))) &&
|
||||
((eCSR_CFG_DOT11_MODE_11N == cfg_dot11_mode) ||
|
||||
(eCSR_CFG_DOT11_MODE_11AC == cfg_dot11_mode) ||
|
||||
(eCSR_CFG_DOT11_MODE_11AX == cfg_dot11_mode) ||
|
||||
CSR_IS_CFG_DOT11_PHY_MODE_11BE(cfg_dot11_mode))) {
|
||||
/* We cannot do 11n here */
|
||||
if (wlan_reg_is_24ghz_ch_freq(opr_freq))
|
||||
cfg_dot11_mode = eCSR_CFG_DOT11_MODE_11G;
|
||||
else
|
||||
cfg_dot11_mode = eCSR_CFG_DOT11_MODE_11A;
|
||||
}
|
||||
sme_debug("dot11mode: %d phyMode %d is_11n_allowed %d privacy %d chan freq %d fw sup AX %d",
|
||||
cfg_dot11_mode, dot11_cfg->phy_mode, is_11n_allowed,
|
||||
privacy, opr_freq,
|
||||
IS_FEATURE_SUPPORTED_BY_FW(DOT11AX));
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
sme_debug("BE :%d", IS_FEATURE_SUPPORTED_BY_FW(DOT11BE));
|
||||
#endif
|
||||
return cfg_dot11_mode;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef SAP_CP_CLEANUP
|
||||
QDF_STATUS csr_roam_issue_stop_bss(struct mac_context *mac,
|
||||
@@ -5504,7 +5591,7 @@ csr_populate_basic_rates(tSirMacRateSet *rate_set, bool is_ofdm_rates,
|
||||
*
|
||||
* Return: tSirNwType
|
||||
*/
|
||||
static tSirNwType
|
||||
tSirNwType
|
||||
csr_convert_mode_to_nw_type(enum csr_cfgdot11mode dot11_mode,
|
||||
enum reg_wifi_band band)
|
||||
{
|
||||
@@ -8787,14 +8874,70 @@ QDF_STATUS csr_update_owe_info(struct mac_context *mac,
|
||||
static void csr_set_sap_ser_params(struct wlan_serialization_command *cmd,
|
||||
enum wlan_serialization_cmd_type cmd_type)
|
||||
{
|
||||
cmd->cmd_type = cmd_type;
|
||||
cmd->source = WLAN_UMAC_COMP_MLME;
|
||||
cmd->cmd_cb = sme_sap_ser_callback;
|
||||
cmd->is_high_priority = false;
|
||||
cmd->is_blocking = true;
|
||||
return;
|
||||
}
|
||||
|
||||
QDF_STATUS csr_bss_start(struct mac_context *mac, uint32_t vdev_id,
|
||||
struct start_bss_config *bss_config,
|
||||
uint32_t *roam_id)
|
||||
struct start_bss_config *bss_config)
|
||||
{
|
||||
struct wlan_serialization_command cmd = {0};
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct start_bss_config *start_bss_cfg = NULL;
|
||||
enum QDF_OPMODE persona;
|
||||
enum wlan_serialization_status status;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac->pdev, vdev_id,
|
||||
WLAN_LEGACY_MAC_ID);
|
||||
if (!vdev) {
|
||||
sme_err("VDEV not found for vdev id : %d", vdev_id);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
persona = wlan_vdev_mlme_get_opmode(vdev);
|
||||
if (persona != QDF_SAP_MODE && persona != QDF_NDI_MODE &&
|
||||
persona != QDF_P2P_GO_MODE) {
|
||||
sme_err("Start BSS request for invalid mode %d", persona);
|
||||
goto error;
|
||||
}
|
||||
|
||||
start_bss_cfg = qdf_mem_malloc(sizeof(struct start_bss_config));
|
||||
if (!start_bss_cfg) {
|
||||
sme_err("SAP BSS config allocation failed");
|
||||
goto error;
|
||||
}
|
||||
|
||||
qdf_mem_copy(start_bss_cfg, bss_config,
|
||||
sizeof(struct start_bss_config));
|
||||
start_bss_cfg->cmd_id = csr_get_monotonous_number(mac);
|
||||
|
||||
cmd.cmd_id = start_bss_cfg->cmd_id;
|
||||
csr_set_sap_ser_params(&cmd, WLAN_SER_CMD_VDEV_START_BSS);
|
||||
cmd.umac_cmd = start_bss_cfg;
|
||||
cmd.vdev = vdev;
|
||||
csr_fill_cmd_timeout(&cmd);
|
||||
|
||||
status = wlan_vdev_mlme_ser_start_bss(&cmd);
|
||||
switch (status) {
|
||||
case WLAN_SER_CMD_PENDING:
|
||||
case WLAN_SER_CMD_ACTIVE:
|
||||
break;
|
||||
default:
|
||||
sme_err("ser cmd status %d", status);
|
||||
goto error;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
error:
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
||||
if (start_bss_cfg)
|
||||
qdf_mem_free(start_bss_cfg);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS csr_roam_issue_stop_bss_cmd(struct mac_context *mac,
|
||||
|
@@ -40,6 +40,16 @@ enum csr_roamcomplete_result {
|
||||
eCsrStopBssFailure,
|
||||
};
|
||||
|
||||
|
||||
#ifdef SAP_CP_CLEANUP
|
||||
enum csr_sap_response_type {
|
||||
CSR_SAP_START_BSS_SUCCESS,
|
||||
CSR_SAP_START_BSS_FAILURE,
|
||||
CSR_SAP_STOP_BSS_SUCCESS,
|
||||
CSR_SAP_STOP_BSS_FAILURE,
|
||||
};
|
||||
#endif
|
||||
|
||||
struct tag_csrscan_result {
|
||||
tListElem Link;
|
||||
/* Preferred Encryption type that matched with profile. */
|
||||
@@ -383,13 +393,11 @@ QDF_STATUS csr_bss_start(struct mac_context *mac, uint32_t vdev_id,
|
||||
* @mac: mac context
|
||||
* @vdev_id: vdev id
|
||||
* @bss_config: start bss config
|
||||
* @roam_id : pointer to roam id
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS csr_bss_start(struct mac_context *mac, uint32_t vdev_id,
|
||||
struct start_bss_config *bss_config,
|
||||
uint32_t *roam_id);
|
||||
struct start_bss_config *bss_config);
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
|
@@ -1066,6 +1066,7 @@ bool csr_is_bssid_match(struct qdf_mac_addr *pProfBssid,
|
||||
return fMatch;
|
||||
}
|
||||
|
||||
#ifndef SAP_CP_CLEANUP
|
||||
void csr_release_profile(struct mac_context *mac,
|
||||
struct csr_roam_profile *pProfile)
|
||||
{
|
||||
@@ -1090,6 +1091,7 @@ void csr_release_profile(struct mac_context *mac,
|
||||
qdf_mem_zero(pProfile, sizeof(struct csr_roam_profile));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This function use the parameters to decide the CFG value. */
|
||||
/* CSR never sets MLME_DOT11_MODE_ALL to the CFG */
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2019, 2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -28,6 +29,7 @@
|
||||
#include "csr_internal.h"
|
||||
#include "sme_nan_datapath.h"
|
||||
|
||||
#ifndef SAP_CP_CLEANUP
|
||||
/**
|
||||
* csr_roam_start_ndi() - Start connection for NAN datapath
|
||||
* @mac_ctx: Global MAC context
|
||||
@@ -65,6 +67,7 @@ QDF_STATUS csr_roam_start_ndi(struct mac_context *mac_ctx, uint32_t session,
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* csr_roam_update_ndp_return_params() - updates ndp return parameters
|
||||
|
在新工单中引用
屏蔽一个用户