qcacld-3.0: Cleanup start bss processing in LIM
Remove unwanted parameters from start_bss_req and use the parameters from vdev instead. Change-Id: Ifea96bf7908b0dae66807b7a346684fe46fdcd4e CRs-Fixed: 3105488
This commit is contained in:
committed by
Madan Koyyalamudi
parent
f06ffec08b
commit
ab7caec132
@@ -5755,8 +5755,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
|
|||||||
} else {
|
} else {
|
||||||
config->wps_state = SAP_WPS_DISABLED;
|
config->wps_state = SAP_WPS_DISABLED;
|
||||||
}
|
}
|
||||||
/* Forward WPS PBC probe request frame up */
|
|
||||||
config->fwdWPSPBCProbeReq = 1;
|
|
||||||
(WLAN_HDD_GET_AP_CTX_PTR(adapter))->encryption_type =
|
(WLAN_HDD_GET_AP_CTX_PTR(adapter))->encryption_type =
|
||||||
eCSR_ENCRYPT_TYPE_NONE;
|
eCSR_ENCRYPT_TYPE_NONE;
|
||||||
|
|
||||||
|
|||||||
@@ -707,48 +707,25 @@ struct start_bss_req {
|
|||||||
uint16_t messageType; /* eWNI_SME_START_BSS_REQ */
|
uint16_t messageType; /* eWNI_SME_START_BSS_REQ */
|
||||||
uint16_t length;
|
uint16_t length;
|
||||||
uint8_t vdev_id;
|
uint8_t vdev_id;
|
||||||
struct qdf_mac_addr bssid;
|
|
||||||
struct qdf_mac_addr self_macaddr;
|
|
||||||
uint16_t beaconInterval;
|
uint16_t beaconInterval;
|
||||||
uint8_t dot11mode;
|
uint8_t dot11mode;
|
||||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
|
||||||
uint8_t cc_switch_mode;
|
|
||||||
#endif
|
|
||||||
enum bss_type bssType;
|
|
||||||
tSirMacSSid ssId;
|
tSirMacSSid ssId;
|
||||||
uint32_t oper_ch_freq;
|
uint32_t oper_ch_freq;
|
||||||
ePhyChanBondState cbMode;
|
|
||||||
uint8_t vht_channel_width;
|
uint8_t vht_channel_width;
|
||||||
uint8_t center_freq_seg0;
|
uint8_t center_freq_seg0;
|
||||||
uint8_t center_freq_seg1;
|
uint8_t center_freq_seg1;
|
||||||
uint8_t sec_ch_offset;
|
uint8_t sec_ch_offset;
|
||||||
|
|
||||||
uint8_t privacy;
|
uint8_t privacy;
|
||||||
uint8_t apUapsdEnable;
|
|
||||||
uint8_t ssidHidden;
|
uint8_t ssidHidden;
|
||||||
bool fwdWPSPBCProbeReq;
|
|
||||||
bool protEnabled;
|
|
||||||
bool obssProtEnabled;
|
|
||||||
uint16_t ht_capab;
|
|
||||||
tAniAuthType authType;
|
tAniAuthType authType;
|
||||||
uint32_t dtimPeriod;
|
uint32_t dtimPeriod;
|
||||||
uint8_t wps_state;
|
uint8_t wps_state;
|
||||||
enum QDF_OPMODE bssPersona;
|
|
||||||
|
|
||||||
uint8_t txLdpcIniFeatureEnabled;
|
|
||||||
|
|
||||||
tSirRSNie rsnIE; /* RSN IE to be sent in */
|
tSirRSNie rsnIE; /* RSN IE to be sent in */
|
||||||
/* Beacon and Probe */
|
|
||||||
/* Response frames */
|
|
||||||
tSirNwType nwType; /* Indicates 11a/b/g */
|
tSirNwType nwType; /* Indicates 11a/b/g */
|
||||||
tSirMacRateSet operationalRateSet; /* Has 11a or 11b rates */
|
tSirMacRateSet operationalRateSet; /* Has 11a or 11b rates */
|
||||||
tSirMacRateSet extendedRateSet; /* Has 11g rates */
|
tSirMacRateSet extendedRateSet; /* Has 11g rates */
|
||||||
struct add_ie_params add_ie_params;
|
struct add_ie_params add_ie_params;
|
||||||
|
|
||||||
bool obssEnabled;
|
|
||||||
uint8_t sap_dot11mc;
|
|
||||||
uint16_t beacon_tx_rate;
|
uint16_t beacon_tx_rate;
|
||||||
bool vendor_vht_sap;
|
|
||||||
uint32_t cac_duration_ms;
|
uint32_t cac_duration_ms;
|
||||||
uint32_t dfs_regdomain;
|
uint32_t dfs_regdomain;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved
|
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -571,7 +571,7 @@ struct pe_session {
|
|||||||
#ifdef FEATURE_WLAN_ESE
|
#ifdef FEATURE_WLAN_ESE
|
||||||
uint8_t is_ese_version_ie_present;
|
uint8_t is_ese_version_ie_present;
|
||||||
#endif
|
#endif
|
||||||
uint8_t sap_dot11mc;
|
bool sap_dot11mc;
|
||||||
bool is_vendor_specific_vhtcaps;
|
bool is_vendor_specific_vhtcaps;
|
||||||
uint8_t vendor_specific_vht_ie_sub_type;
|
uint8_t vendor_specific_vht_ie_sub_type;
|
||||||
bool vendor_vht_sap;
|
bool vendor_vht_sap;
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
#include "wlan_reg_services_api.h"
|
#include "wlan_reg_services_api.h"
|
||||||
#include <lim_mlo.h>
|
#include <lim_mlo.h>
|
||||||
#include <wlan_vdev_mgr_utils_api.h>
|
#include <wlan_vdev_mgr_utils_api.h>
|
||||||
|
#include "cfg_ucfg_api.h"
|
||||||
|
|
||||||
/* SME REQ processing function templates */
|
/* SME REQ processing function templates */
|
||||||
static bool __lim_process_sme_sys_ready_ind(struct mac_context *, uint32_t *);
|
static bool __lim_process_sme_sys_ready_ind(struct mac_context *, uint32_t *);
|
||||||
@@ -449,17 +450,35 @@ lim_configure_ap_start_bss_session(struct mac_context *mac_ctx,
|
|||||||
struct pe_session *session,
|
struct pe_session *session,
|
||||||
struct start_bss_req *sme_start_bss_req)
|
struct start_bss_req *sme_start_bss_req)
|
||||||
{
|
{
|
||||||
|
bool sap_uapsd;
|
||||||
|
uint16_t ht_cap = cfg_default(CFG_AP_PROTECTION_MODE);
|
||||||
|
|
||||||
session->limSystemRole = eLIM_AP_ROLE;
|
session->limSystemRole = eLIM_AP_ROLE;
|
||||||
session->privacy = sme_start_bss_req->privacy;
|
session->privacy = sme_start_bss_req->privacy;
|
||||||
session->fwdWPSPBCProbeReq = sme_start_bss_req->fwdWPSPBCProbeReq;
|
session->fwdWPSPBCProbeReq = 1;
|
||||||
session->authType = sme_start_bss_req->authType;
|
session->authType = sme_start_bss_req->authType;
|
||||||
/* Store the DTIM period */
|
/* Store the DTIM period */
|
||||||
session->dtimPeriod = (uint8_t) sme_start_bss_req->dtimPeriod;
|
session->dtimPeriod = (uint8_t) sme_start_bss_req->dtimPeriod;
|
||||||
|
|
||||||
/* Enable/disable UAPSD */
|
/* Enable/disable UAPSD */
|
||||||
session->apUapsdEnable = sme_start_bss_req->apUapsdEnable;
|
wlan_mlme_is_sap_uapsd_enabled(mac_ctx->psoc, &sap_uapsd);
|
||||||
|
session->apUapsdEnable = sap_uapsd;
|
||||||
|
|
||||||
|
session->gLimProtectionControl =
|
||||||
|
wlan_mlme_is_ap_prot_enabled(mac_ctx->psoc);
|
||||||
|
|
||||||
|
wlan_mlme_get_ap_protection_mode(mac_ctx->psoc, &ht_cap);
|
||||||
|
qdf_mem_copy((void *)&session->cfgProtection,
|
||||||
|
(void *)&ht_cap,
|
||||||
|
sizeof(uint16_t));
|
||||||
|
|
||||||
|
wlan_mlme_get_vendor_vht_for_24ghz(mac_ctx->psoc,
|
||||||
|
&session->vendor_vht_sap);
|
||||||
if (session->opmode == QDF_P2P_GO_MODE) {
|
if (session->opmode == QDF_P2P_GO_MODE) {
|
||||||
|
session->sap_dot11mc = 1;
|
||||||
session->proxyProbeRspEn = 0;
|
session->proxyProbeRspEn = 0;
|
||||||
} else {
|
} else {
|
||||||
|
session->sap_dot11mc = mac_ctx->mlme_cfg->gen.sap_dot11mc;
|
||||||
/*
|
/*
|
||||||
* To detect PBC overlap in SAP WPS mode,
|
* To detect PBC overlap in SAP WPS mode,
|
||||||
* Host handles Probe Requests.
|
* Host handles Probe Requests.
|
||||||
@@ -471,9 +490,7 @@ lim_configure_ap_start_bss_session(struct mac_context *mac_ctx,
|
|||||||
}
|
}
|
||||||
session->ssidHidden = sme_start_bss_req->ssidHidden;
|
session->ssidHidden = sme_start_bss_req->ssidHidden;
|
||||||
session->wps_state = sme_start_bss_req->wps_state;
|
session->wps_state = sme_start_bss_req->wps_state;
|
||||||
session->sap_dot11mc = sme_start_bss_req->sap_dot11mc;
|
|
||||||
session->vendor_vht_sap =
|
|
||||||
sme_start_bss_req->vendor_vht_sap;
|
|
||||||
lim_get_short_slot_from_phy_mode(mac_ctx, session, session->gLimPhyMode,
|
lim_get_short_slot_from_phy_mode(mac_ctx, session, session->gLimPhyMode,
|
||||||
&session->shortSlotTimeSupported);
|
&session->shortSlotTimeSupported);
|
||||||
|
|
||||||
@@ -711,6 +728,20 @@ static void lim_start_bss_update_ht_vht_caps(struct mac_context *mac_ctx,
|
|||||||
session->pLimStartBssReq->vht_channel_width);
|
session->pLimStartBssReq->vht_channel_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||||
|
static inline void lim_fill_cc_mode(struct mac_context *mac_ctx,
|
||||||
|
struct pe_session *session)
|
||||||
|
{
|
||||||
|
session->cc_switch_mode = mac_ctx->roam.configParam.cc_switch_mode;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void lim_fill_cc_mode(struct mac_context *mac_ctx,
|
||||||
|
struct pe_session *session)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __lim_handle_sme_start_bss_request() - process SME_START_BSS_REQ message
|
* __lim_handle_sme_start_bss_request() - process SME_START_BSS_REQ message
|
||||||
*@mac_ctx: Pointer to Global MAC structure
|
*@mac_ctx: Pointer to Global MAC structure
|
||||||
@@ -740,6 +771,11 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
int32_t auth_mode;
|
int32_t auth_mode;
|
||||||
int32_t akm;
|
int32_t akm;
|
||||||
int32_t rsn_caps;
|
int32_t rsn_caps;
|
||||||
|
bool cfg_value = false;
|
||||||
|
enum QDF_OPMODE opmode;
|
||||||
|
ePhyChanBondState cb_mode;
|
||||||
|
enum bss_type bss_type;
|
||||||
|
struct qdf_mac_addr bssid;
|
||||||
|
|
||||||
/* FEATURE_WLAN_DIAG_SUPPORT */
|
/* FEATURE_WLAN_DIAG_SUPPORT */
|
||||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM
|
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM
|
||||||
@@ -760,10 +796,18 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
qdf_mem_copy(sme_start_bss_req, msg_buf, size);
|
qdf_mem_copy(sme_start_bss_req, msg_buf, size);
|
||||||
vdev_id = sme_start_bss_req->vdev_id;
|
vdev_id = sme_start_bss_req->vdev_id;
|
||||||
|
|
||||||
|
opmode = wlan_get_opmode_vdev_id(mac_ctx->pdev, vdev_id);
|
||||||
|
if (opmode == QDF_NDI_MODE)
|
||||||
|
bss_type = eSIR_NDI_MODE;
|
||||||
|
else
|
||||||
|
bss_type = eSIR_INFRA_AP_MODE;
|
||||||
|
|
||||||
|
wlan_mlme_get_mac_vdev_id(mac_ctx->pdev, vdev_id, &bssid);
|
||||||
|
|
||||||
if ((mac_ctx->lim.gLimSmeState == eLIM_SME_OFFLINE_STATE) ||
|
if ((mac_ctx->lim.gLimSmeState == eLIM_SME_OFFLINE_STATE) ||
|
||||||
(mac_ctx->lim.gLimSmeState == eLIM_SME_IDLE_STATE)) {
|
(mac_ctx->lim.gLimSmeState == eLIM_SME_IDLE_STATE)) {
|
||||||
if (!lim_is_sme_start_bss_req_valid(mac_ctx,
|
if (!lim_is_sme_start_bss_req_valid(mac_ctx,
|
||||||
sme_start_bss_req)) {
|
sme_start_bss_req, bss_type)) {
|
||||||
pe_warn("Received invalid eWNI_SME_START_BSS_REQ");
|
pe_warn("Received invalid eWNI_SME_START_BSS_REQ");
|
||||||
ret_code = eSIR_SME_INVALID_PARAMETERS;
|
ret_code = eSIR_SME_INVALID_PARAMETERS;
|
||||||
goto free;
|
goto free;
|
||||||
@@ -774,19 +818,18 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
* This is the place where PE is going to create a session.
|
* This is the place where PE is going to create a session.
|
||||||
* If session is not existed, then create a new session
|
* If session is not existed, then create a new session
|
||||||
*/
|
*/
|
||||||
session = pe_find_session_by_bssid(mac_ctx,
|
session = pe_find_session_by_bssid(mac_ctx, bssid.bytes,
|
||||||
sme_start_bss_req->bssid.bytes, &session_id);
|
&session_id);
|
||||||
if (session) {
|
if (session) {
|
||||||
pe_warn("Session Already exists for given BSSID");
|
pe_warn("Session Already exists for given BSSID");
|
||||||
ret_code = eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED;
|
ret_code = eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED;
|
||||||
session = NULL;
|
session = NULL;
|
||||||
goto free;
|
goto free;
|
||||||
} else {
|
} else {
|
||||||
session = pe_create_session(mac_ctx,
|
session = pe_create_session(mac_ctx, bssid.bytes,
|
||||||
sme_start_bss_req->bssid.bytes,
|
|
||||||
&session_id,
|
&session_id,
|
||||||
mac_ctx->lim.max_sta_of_pe_session,
|
mac_ctx->lim.max_sta_of_pe_session,
|
||||||
sme_start_bss_req->bssType,
|
bss_type,
|
||||||
sme_start_bss_req->vdev_id);
|
sme_start_bss_req->vdev_id);
|
||||||
if (!session) {
|
if (!session) {
|
||||||
pe_warn("Session Can not be created");
|
pe_warn("Session Can not be created");
|
||||||
@@ -799,7 +842,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
channel_number);
|
channel_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QDF_NDI_MODE != sme_start_bss_req->bssPersona) {
|
if (QDF_NDI_MODE != opmode) {
|
||||||
/* Probe resp add ie */
|
/* Probe resp add ie */
|
||||||
lim_start_bss_update_add_ie_buffer(mac_ctx,
|
lim_start_bss_update_add_ie_buffer(mac_ctx,
|
||||||
&session->add_ie_params.probeRespData_buff,
|
&session->add_ie_params.probeRespData_buff,
|
||||||
@@ -832,9 +875,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
session->pLimStartBssReq = sme_start_bss_req;
|
session->pLimStartBssReq = sme_start_bss_req;
|
||||||
lim_start_bss_update_ht_vht_caps(mac_ctx, session);
|
lim_start_bss_update_ht_vht_caps(mac_ctx, session);
|
||||||
|
|
||||||
sir_copy_mac_addr(session->self_mac_addr,
|
sir_copy_mac_addr(session->self_mac_addr, bssid.bytes);
|
||||||
sme_start_bss_req->self_macaddr.bytes);
|
|
||||||
|
|
||||||
/* Copy SSID to session table */
|
/* Copy SSID to session table */
|
||||||
qdf_mem_copy((uint8_t *) &session->ssId,
|
qdf_mem_copy((uint8_t *) &session->ssId,
|
||||||
(uint8_t *) &sme_start_bss_req->ssId,
|
(uint8_t *) &sme_start_bss_req->ssId,
|
||||||
@@ -852,6 +893,15 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
mac_ctx->pdev, session->curr_op_freq);
|
mac_ctx->pdev, session->curr_op_freq);
|
||||||
/* Store the dot 11 mode in to the session Table */
|
/* Store the dot 11 mode in to the session Table */
|
||||||
session->dot11mode = sme_start_bss_req->dot11mode;
|
session->dot11mode = sme_start_bss_req->dot11mode;
|
||||||
|
|
||||||
|
if (session->dot11mode == MLME_DOT11_MODE_11B)
|
||||||
|
mac_ctx->mlme_cfg->
|
||||||
|
feature_flags.enable_short_slot_time_11g = 0;
|
||||||
|
else
|
||||||
|
mac_ctx->mlme_cfg->feature_flags.
|
||||||
|
enable_short_slot_time_11g =
|
||||||
|
mac_ctx->mlme_cfg->ht_caps.
|
||||||
|
short_slot_time_enabled;
|
||||||
ucast_cipher = wlan_crypto_get_param(session->vdev,
|
ucast_cipher = wlan_crypto_get_param(session->vdev,
|
||||||
WLAN_CRYPTO_PARAM_UCAST_CIPHER);
|
WLAN_CRYPTO_PARAM_UCAST_CIPHER);
|
||||||
auth_mode = wlan_crypto_get_param(session->vdev,
|
auth_mode = wlan_crypto_get_param(session->vdev,
|
||||||
@@ -862,8 +912,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
lim_set_privacy(mac_ctx, ucast_cipher, auth_mode, akm,
|
lim_set_privacy(mac_ctx, ucast_cipher, auth_mode, akm,
|
||||||
sme_start_bss_req->privacy);
|
sme_start_bss_req->privacy);
|
||||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||||
session->cc_switch_mode =
|
lim_fill_cc_mode(mac_ctx, session);
|
||||||
sme_start_bss_req->cc_switch_mode;
|
|
||||||
#endif
|
#endif
|
||||||
session->htCapability =
|
session->htCapability =
|
||||||
IS_DOT11_MODE_HT(session->dot11mode);
|
IS_DOT11_MODE_HT(session->dot11mode);
|
||||||
@@ -890,7 +939,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
}
|
}
|
||||||
|
|
||||||
session->txLdpcIniFeatureEnabled =
|
session->txLdpcIniFeatureEnabled =
|
||||||
sme_start_bss_req->txLdpcIniFeatureEnabled;
|
mac_ctx->mlme_cfg->ht_caps.tx_ldpc_enable;
|
||||||
rsn_caps = wlan_crypto_get_param(session->vdev,
|
rsn_caps = wlan_crypto_get_param(session->vdev,
|
||||||
WLAN_CRYPTO_PARAM_RSN_CAP);
|
WLAN_CRYPTO_PARAM_RSN_CAP);
|
||||||
session->limRmfEnabled =
|
session->limRmfEnabled =
|
||||||
@@ -905,12 +954,17 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
(void *)&sme_start_bss_req->extendedRateSet,
|
(void *)&sme_start_bss_req->extendedRateSet,
|
||||||
sizeof(tSirMacRateSet));
|
sizeof(tSirMacRateSet));
|
||||||
|
|
||||||
if (!wlan_reg_is_24ghz_ch_freq(session->curr_op_freq))
|
if (!wlan_reg_is_24ghz_ch_freq(session->curr_op_freq)) {
|
||||||
vdev_type_nss = &mac_ctx->vdev_type_nss_5g;
|
vdev_type_nss = &mac_ctx->vdev_type_nss_5g;
|
||||||
else
|
cb_mode = mac_ctx->roam.configParam.
|
||||||
|
channelBondingMode5GHz;
|
||||||
|
} else {
|
||||||
vdev_type_nss = &mac_ctx->vdev_type_nss_2g;
|
vdev_type_nss = &mac_ctx->vdev_type_nss_2g;
|
||||||
|
cb_mode = mac_ctx->roam.configParam.
|
||||||
|
channelBondingMode24GHz;
|
||||||
|
}
|
||||||
|
|
||||||
switch (sme_start_bss_req->bssType) {
|
switch (bss_type) {
|
||||||
case eSIR_INFRA_AP_MODE:
|
case eSIR_INFRA_AP_MODE:
|
||||||
lim_configure_ap_start_bss_session(mac_ctx, session,
|
lim_configure_ap_start_bss_session(mac_ctx, session,
|
||||||
sme_start_bss_req);
|
sme_start_bss_req);
|
||||||
@@ -944,7 +998,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
* Allocate memory for the array of
|
* Allocate memory for the array of
|
||||||
* parsed (Re)Assoc request structure
|
* parsed (Re)Assoc request structure
|
||||||
*/
|
*/
|
||||||
if (sme_start_bss_req->bssType == eSIR_INFRA_AP_MODE) {
|
if (bss_type == eSIR_INFRA_AP_MODE) {
|
||||||
session->parsedAssocReq =
|
session->parsedAssocReq =
|
||||||
qdf_mem_malloc(session->dph.dphHashTable.
|
qdf_mem_malloc(session->dph.dphHashTable.
|
||||||
size * sizeof(tpSirAssocReq));
|
size * sizeof(tpSirAssocReq));
|
||||||
@@ -955,13 +1009,13 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!sme_start_bss_req->oper_ch_freq &&
|
if (!sme_start_bss_req->oper_ch_freq &&
|
||||||
sme_start_bss_req->bssType != eSIR_NDI_MODE) {
|
bss_type != eSIR_NDI_MODE) {
|
||||||
pe_err("Received invalid eWNI_SME_START_BSS_REQ");
|
pe_err("Received invalid eWNI_SME_START_BSS_REQ");
|
||||||
ret_code = eSIR_SME_INVALID_PARAMETERS;
|
ret_code = eSIR_SME_INVALID_PARAMETERS;
|
||||||
goto free;
|
goto free;
|
||||||
}
|
}
|
||||||
#ifdef QCA_HT_2040_COEX
|
#ifdef QCA_HT_2040_COEX
|
||||||
if (sme_start_bss_req->obssEnabled)
|
if (mac_ctx->roam.configParam.obssEnabled)
|
||||||
session->htSupportedChannelWidthSet =
|
session->htSupportedChannelWidthSet =
|
||||||
session->htCapability;
|
session->htCapability;
|
||||||
else
|
else
|
||||||
@@ -996,16 +1050,6 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
&sme_start_bss_req->rsnIE, session);
|
&sme_start_bss_req->rsnIE, session);
|
||||||
|
|
||||||
if (LIM_IS_AP_ROLE(session) || LIM_IS_NDI_ROLE(session)) {
|
if (LIM_IS_AP_ROLE(session) || LIM_IS_NDI_ROLE(session)) {
|
||||||
session->gLimProtectionControl =
|
|
||||||
sme_start_bss_req->protEnabled;
|
|
||||||
/*
|
|
||||||
* each byte will have the following info
|
|
||||||
* bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
|
|
||||||
* reserved reserved RIFS Lsig n-GF ht20 11g 11b
|
|
||||||
*/
|
|
||||||
qdf_mem_copy((void *)&session->cfgProtection,
|
|
||||||
(void *)&sme_start_bss_req->ht_capab,
|
|
||||||
sizeof(uint16_t));
|
|
||||||
/* Initialize WPS PBC session link list */
|
/* Initialize WPS PBC session link list */
|
||||||
session->pAPWPSPBCSession = NULL;
|
session->pAPWPSPBCSession = NULL;
|
||||||
}
|
}
|
||||||
@@ -1021,8 +1065,6 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
(uint8_t *) &sme_start_bss_req->ssId,
|
(uint8_t *) &sme_start_bss_req->ssId,
|
||||||
sme_start_bss_req->ssId.length + 1);
|
sme_start_bss_req->ssId.length + 1);
|
||||||
mlm_start_req->ssidHidden = sme_start_bss_req->ssidHidden;
|
mlm_start_req->ssidHidden = sme_start_bss_req->ssidHidden;
|
||||||
mlm_start_req->obssProtEnabled =
|
|
||||||
sme_start_bss_req->obssProtEnabled;
|
|
||||||
|
|
||||||
mlm_start_req->bssType = session->bssType;
|
mlm_start_req->bssType = session->bssType;
|
||||||
|
|
||||||
@@ -1032,7 +1074,6 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
sir_copy_mac_addr(mlm_start_req->bssId, session->bssId);
|
sir_copy_mac_addr(mlm_start_req->bssId, session->bssId);
|
||||||
/* store the channel num in mlmstart req structure */
|
/* store the channel num in mlmstart req structure */
|
||||||
mlm_start_req->oper_ch_freq = 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 =
|
mlm_start_req->beaconPeriod =
|
||||||
session->beaconParams.beaconInterval;
|
session->beaconParams.beaconInterval;
|
||||||
mlm_start_req->cac_duration_ms =
|
mlm_start_req->cac_duration_ms =
|
||||||
@@ -1045,6 +1086,13 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||||||
session->cac_duration_ms =
|
session->cac_duration_ms =
|
||||||
mlm_start_req->cac_duration_ms;
|
mlm_start_req->cac_duration_ms;
|
||||||
session->dfs_regdomain = mlm_start_req->dfs_regdomain;
|
session->dfs_regdomain = mlm_start_req->dfs_regdomain;
|
||||||
|
mlm_start_req->cbMode = cb_mode;
|
||||||
|
qdf_status =
|
||||||
|
wlan_mlme_is_ap_obss_prot_enabled(mac_ctx->psoc,
|
||||||
|
&cfg_value);
|
||||||
|
if (QDF_IS_STATUS_ERROR(qdf_status))
|
||||||
|
pe_err("Unable to get obssProtEnabled");
|
||||||
|
mlm_start_req->obssProtEnabled = cfg_value;
|
||||||
} else {
|
} else {
|
||||||
val = mac_ctx->mlme_cfg->sap_cfg.dtim_interval;
|
val = mac_ctx->mlme_cfg->sap_cfg.dtim_interval;
|
||||||
mlm_start_req->dtimPeriod = (uint8_t) val;
|
mlm_start_req->dtimPeriod = (uint8_t) val;
|
||||||
@@ -2572,19 +2620,6 @@ static int8_t lim_get_cfg_max_tx_power(struct mac_context *mac,
|
|||||||
return wlan_get_cfg_max_tx_power(mac->psoc, mac->pdev, ch_freq);
|
return wlan_get_cfg_max_tx_power(mac->psoc, mac->pdev, ch_freq);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
|
||||||
static inline void lim_fill_cc_mode(struct mac_context *mac_ctx,
|
|
||||||
struct pe_session *session)
|
|
||||||
{
|
|
||||||
session->cc_switch_mode = mac_ctx->roam.configParam.cc_switch_mode;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
static inline void lim_fill_cc_mode(struct mac_context *mac_ctx,
|
|
||||||
struct pe_session *session)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM
|
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM
|
||||||
static inline void lim_fill_rssi(struct pe_session *session,
|
static inline void lim_fill_rssi(struct pe_session *session,
|
||||||
struct bss_description *bss_desc)
|
struct bss_description *bss_desc)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -275,19 +276,20 @@ lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *mac_ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
|
bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
|
||||||
struct start_bss_req *start_bss_req)
|
struct start_bss_req *start_bss_req,
|
||||||
|
enum bss_type bss_type)
|
||||||
{
|
{
|
||||||
uint8_t i = 0;
|
uint8_t i = 0;
|
||||||
tSirMacRateSet *opr_rates = &start_bss_req->operationalRateSet;
|
tSirMacRateSet *opr_rates = &start_bss_req->operationalRateSet;
|
||||||
|
|
||||||
switch (start_bss_req->bssType) {
|
switch (bss_type) {
|
||||||
case eSIR_INFRASTRUCTURE_MODE:
|
case eSIR_INFRASTRUCTURE_MODE:
|
||||||
/**
|
/**
|
||||||
* Should not have received start BSS req with bssType
|
* Should not have received start BSS req with bssType
|
||||||
* Infrastructure on STA.
|
* Infrastructure on STA.
|
||||||
*/
|
*/
|
||||||
pe_warn("Invalid bssType: %d in eWNI_SME_START_BSS_REQ",
|
pe_warn("Invalid bss type: %d in eWNI_SME_START_BSS_REQ",
|
||||||
start_bss_req->bssType);
|
bss_type);
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case eSIR_INFRA_AP_MODE:
|
case eSIR_INFRA_AP_MODE:
|
||||||
@@ -299,8 +301,8 @@ bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
|
|||||||
* Should not have received start BSS req with bssType
|
* Should not have received start BSS req with bssType
|
||||||
* other than Infrastructure/IBSS.
|
* other than Infrastructure/IBSS.
|
||||||
*/
|
*/
|
||||||
pe_warn("Invalid bssType: %d in eWNI_SME_START_BSS_REQ",
|
pe_warn("Invalid bss type: %d in eWNI_SME_START_BSS_REQ",
|
||||||
start_bss_req->bssType);
|
bss_type);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011-2012,2014-2015,2018-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2011-2012,2014-2015,2018-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
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -46,7 +47,8 @@
|
|||||||
* otherwise
|
* otherwise
|
||||||
*/
|
*/
|
||||||
bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
|
bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
|
||||||
struct start_bss_req *start_bss_req);
|
struct start_bss_req *start_bss_req,
|
||||||
|
enum bss_type bss_type);
|
||||||
|
|
||||||
uint8_t lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *,
|
uint8_t lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *,
|
||||||
tpSirRSNie, struct pe_session *);
|
tpSirRSNie, struct pe_session *);
|
||||||
|
|||||||
@@ -492,7 +492,6 @@ struct sap_config {
|
|||||||
eSapAuthType authType;
|
eSapAuthType authType;
|
||||||
tCsrAuthList akm_list;
|
tCsrAuthList akm_list;
|
||||||
bool privacy;
|
bool privacy;
|
||||||
bool fwdWPSPBCProbeReq;
|
|
||||||
/* 0 - disabled, 1 - not configured , 2 - configured */
|
/* 0 - disabled, 1 - not configured , 2 - configured */
|
||||||
uint8_t wps_state;
|
uint8_t wps_state;
|
||||||
uint16_t RSNWPAReqIELength; /* The byte count in the pWPAReqIE */
|
uint16_t RSNWPAReqIELength; /* The byte count in the pWPAReqIE */
|
||||||
|
|||||||
@@ -3577,9 +3577,7 @@ sapconvert_to_csr_profile(struct sap_config *config, eCsrRoamBssType bssType,
|
|||||||
struct csr_roam_profile *profile)
|
struct csr_roam_profile *profile)
|
||||||
{
|
{
|
||||||
int qdf_status = QDF_STATUS_SUCCESS;
|
int qdf_status = QDF_STATUS_SUCCESS;
|
||||||
bool sap_uapsd = true, chan_switch_hostapd_rate_enabled = true;
|
bool chan_switch_hostapd_rate_enabled = true;
|
||||||
bool ap_obss_prot = false;
|
|
||||||
uint16_t ap_prot = cfg_default(CFG_AP_PROTECTION_MODE);
|
|
||||||
struct mac_context *mac_ctx;
|
struct mac_context *mac_ctx;
|
||||||
uint8_t mcc_to_scc_switch = 0;
|
uint8_t mcc_to_scc_switch = 0;
|
||||||
|
|
||||||
@@ -3608,7 +3606,6 @@ sapconvert_to_csr_profile(struct sap_config *config, eCsrRoamBssType bssType,
|
|||||||
sizeof(config->SSIDinfo.ssid.ssId));
|
sizeof(config->SSIDinfo.ssid.ssId));
|
||||||
|
|
||||||
profile->privacy = config->privacy;
|
profile->privacy = config->privacy;
|
||||||
profile->fwdWPSPBCProbeReq = config->fwdWPSPBCProbeReq;
|
|
||||||
|
|
||||||
if (config->authType == eSAP_SHARED_KEY) {
|
if (config->authType == eSAP_SHARED_KEY) {
|
||||||
profile->csr80211AuthType = eSIR_SHARED_KEY;
|
profile->csr80211AuthType = eSIR_SHARED_KEY;
|
||||||
@@ -3648,26 +3645,6 @@ sapconvert_to_csr_profile(struct sap_config *config, eCsrRoamBssType bssType,
|
|||||||
/* set DTIM period */
|
/* set DTIM period */
|
||||||
profile->dtimPeriod = config->dtim_period;
|
profile->dtimPeriod = config->dtim_period;
|
||||||
|
|
||||||
/* set Uapsd enable bit */
|
|
||||||
qdf_status = ucfg_mlme_is_sap_uapsd_enabled(mac_ctx->psoc, &sap_uapsd);
|
|
||||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
|
||||||
sap_err("Get ap UAPSD enabled/disabled failed");
|
|
||||||
|
|
||||||
profile->ApUapsdEnable = sap_uapsd;
|
|
||||||
/* Enable protection parameters */
|
|
||||||
profile->protEnabled = ucfg_mlme_is_ap_prot_enabled(mac_ctx->psoc);
|
|
||||||
|
|
||||||
/* Enable OBSS protection */
|
|
||||||
qdf_status = ucfg_mlme_is_ap_obss_prot_enabled(mac_ctx->psoc,
|
|
||||||
&ap_obss_prot);
|
|
||||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
|
||||||
sap_err("Get ap obss protection failed");
|
|
||||||
profile->obssProtEnabled = ap_obss_prot;
|
|
||||||
|
|
||||||
qdf_status = ucfg_mlme_get_ap_protection_mode(mac_ctx->psoc, &ap_prot);
|
|
||||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
|
||||||
sap_err("Get ap protection mode failed using default value");
|
|
||||||
profile->cfg_protection = ap_prot;
|
|
||||||
/* wps config info */
|
/* wps config info */
|
||||||
profile->wps_state = config->wps_state;
|
profile->wps_state = config->wps_state;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -445,12 +445,8 @@ struct csr_roam_profile {
|
|||||||
uint32_t nRSNReqIELength; /* The byte count in the pRSNReqIE */
|
uint32_t nRSNReqIELength; /* The byte count in the pRSNReqIE */
|
||||||
uint8_t *pRSNReqIE; /* If not null,it's IE byte stream for RSN */
|
uint8_t *pRSNReqIE; /* If not null,it's IE byte stream for RSN */
|
||||||
uint8_t privacy;
|
uint8_t privacy;
|
||||||
bool fwdWPSPBCProbeReq;
|
|
||||||
tAniAuthType csr80211AuthType;
|
tAniAuthType csr80211AuthType;
|
||||||
uint32_t dtimPeriod;
|
uint32_t dtimPeriod;
|
||||||
bool ApUapsdEnable;
|
|
||||||
bool protEnabled;
|
|
||||||
bool obssProtEnabled;
|
|
||||||
bool chan_switch_hostapd_rate_enabled;
|
bool chan_switch_hostapd_rate_enabled;
|
||||||
uint16_t cfg_protection;
|
uint16_t cfg_protection;
|
||||||
uint8_t wps_state;
|
uint8_t wps_state;
|
||||||
|
|||||||
@@ -126,17 +126,11 @@ struct bss_config_param {
|
|||||||
tSirMacSSid SSID;
|
tSirMacSSid SSID;
|
||||||
enum csr_cfgdot11mode uCfgDot11Mode;
|
enum csr_cfgdot11mode uCfgDot11Mode;
|
||||||
tSirMacCapabilityInfo BssCap;
|
tSirMacCapabilityInfo BssCap;
|
||||||
ePhyChanBondState cbMode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct csr_roamstart_bssparams {
|
struct csr_roamstart_bssparams {
|
||||||
tSirMacSSid ssId;
|
tSirMacSSid ssId;
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the BSSID for the party we want to
|
|
||||||
* join (only use for WDS).
|
|
||||||
*/
|
|
||||||
struct qdf_mac_addr bssid;
|
|
||||||
tSirNwType sirNwType;
|
tSirNwType sirNwType;
|
||||||
ePhyChanBondState cbMode;
|
ePhyChanBondState cbMode;
|
||||||
tSirMacRateSet operationalRateSet;
|
tSirMacRateSet operationalRateSet;
|
||||||
@@ -145,23 +139,16 @@ struct csr_roamstart_bssparams {
|
|||||||
struct ch_params ch_params;
|
struct ch_params ch_params;
|
||||||
enum csr_cfgdot11mode uCfgDot11Mode;
|
enum csr_cfgdot11mode uCfgDot11Mode;
|
||||||
uint8_t privacy;
|
uint8_t privacy;
|
||||||
bool fwdWPSPBCProbeReq;
|
|
||||||
bool protEnabled;
|
|
||||||
bool obssProtEnabled;
|
|
||||||
tAniAuthType authType;
|
tAniAuthType authType;
|
||||||
uint16_t beaconInterval; /* If this is 0, SME'll fill in for caller */
|
uint16_t beaconInterval; /* If this is 0, SME'll fill in for caller */
|
||||||
uint16_t ht_protection;
|
|
||||||
uint32_t dtimPeriod;
|
uint32_t dtimPeriod;
|
||||||
uint8_t ApUapsdEnable;
|
|
||||||
uint8_t ssidHidden;
|
uint8_t ssidHidden;
|
||||||
uint8_t wps_state;
|
uint8_t wps_state;
|
||||||
enum QDF_OPMODE bssPersona;
|
|
||||||
uint16_t nRSNIELength; /* If 0, pRSNIE is ignored. */
|
uint16_t nRSNIELength; /* If 0, pRSNIE is ignored. */
|
||||||
uint8_t *pRSNIE; /* If not null, it has IE byte stream for RSN */
|
uint8_t *pRSNIE; /* If not null, it has IE byte stream for RSN */
|
||||||
/* Flag used to indicate update beaconInterval */
|
/* Flag used to indicate update beaconInterval */
|
||||||
bool updatebeaconInterval;
|
bool updatebeaconInterval;
|
||||||
struct add_ie_params add_ie_params;
|
struct add_ie_params add_ie_params;
|
||||||
uint8_t sap_dot11mc;
|
|
||||||
uint16_t beacon_tx_rate;
|
uint16_t beacon_tx_rate;
|
||||||
uint32_t cac_duration_ms;
|
uint32_t cac_duration_ms;
|
||||||
uint32_t dfs_regdomain;
|
uint32_t dfs_regdomain;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2011-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
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -58,7 +59,6 @@ uint32_t csr_get_rts_thresh(struct mac_context *mac_ctx);
|
|||||||
|
|
||||||
bool csr_is_bssid_match(struct qdf_mac_addr *pProfBssid,
|
bool csr_is_bssid_match(struct qdf_mac_addr *pProfBssid,
|
||||||
struct qdf_mac_addr *BssBssid);
|
struct qdf_mac_addr *BssBssid);
|
||||||
enum bss_type csr_translate_bsstype_to_mac_type(eCsrRoamBssType csrtype);
|
|
||||||
/*
|
/*
|
||||||
* This function will allocate memory for the parsed IEs to the caller.
|
* This function will allocate memory for the parsed IEs to the caller.
|
||||||
* Caller must free the memory. after it is done with the data only if
|
* Caller must free the memory. after it is done with the data only if
|
||||||
|
|||||||
@@ -2569,14 +2569,6 @@ QDF_STATUS csr_roam_prepare_bss_config_from_profile(struct mac_context *mac,
|
|||||||
bss_op_ch_freq,
|
bss_op_ch_freq,
|
||||||
&band);
|
&band);
|
||||||
|
|
||||||
/* short slot time */
|
|
||||||
if (WNI_CFG_PHY_MODE_11B != pBssConfig->uCfgDot11Mode) {
|
|
||||||
mac->mlme_cfg->feature_flags.enable_short_slot_time_11g =
|
|
||||||
mac->mlme_cfg->ht_caps.short_slot_time_enabled;
|
|
||||||
} else {
|
|
||||||
mac->mlme_cfg->feature_flags.enable_short_slot_time_11g = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2703,25 +2695,13 @@ QDF_STATUS csr_roam_set_bss_config_cfg(struct mac_context *mac, uint32_t session
|
|||||||
struct csr_roam_profile *pProfile,
|
struct csr_roam_profile *pProfile,
|
||||||
struct bss_config_param *pBssConfig)
|
struct bss_config_param *pBssConfig)
|
||||||
{
|
{
|
||||||
uint32_t cfgCb = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
|
|
||||||
struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
|
struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
|
||||||
uint32_t chan_freq = 0;
|
|
||||||
|
|
||||||
if (!pSession) {
|
if (!pSession) {
|
||||||
sme_err("session %d not found", sessionId);
|
sme_err("session %d not found", sessionId);
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CB */
|
|
||||||
if (CSR_IS_INFRA_AP(pProfile))
|
|
||||||
chan_freq = pProfile->op_freq;
|
|
||||||
if (chan_freq) {
|
|
||||||
/* for now if we are on 2.4 Ghz, CB will be always disabled */
|
|
||||||
if (WLAN_REG_IS_24GHZ_CH_FREQ(chan_freq))
|
|
||||||
cfgCb = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
|
|
||||||
else
|
|
||||||
cfgCb = pBssConfig->cbMode;
|
|
||||||
}
|
|
||||||
/* Rate */
|
/* Rate */
|
||||||
/* Fixed Rate */
|
/* Fixed Rate */
|
||||||
csr_set_cfg_rate_set_from_profile(mac, pProfile, sessionId,
|
csr_set_cfg_rate_set_from_profile(mac, pProfile, sessionId,
|
||||||
@@ -3349,15 +3329,10 @@ QDF_STATUS csr_roam_copy_profile(struct mac_context *mac,
|
|||||||
pDstProfile->uapsd_mask = pSrcProfile->uapsd_mask;
|
pDstProfile->uapsd_mask = pSrcProfile->uapsd_mask;
|
||||||
pDstProfile->beaconInterval = pSrcProfile->beaconInterval;
|
pDstProfile->beaconInterval = pSrcProfile->beaconInterval;
|
||||||
pDstProfile->privacy = pSrcProfile->privacy;
|
pDstProfile->privacy = pSrcProfile->privacy;
|
||||||
pDstProfile->fwdWPSPBCProbeReq = pSrcProfile->fwdWPSPBCProbeReq;
|
|
||||||
pDstProfile->csr80211AuthType = pSrcProfile->csr80211AuthType;
|
pDstProfile->csr80211AuthType = pSrcProfile->csr80211AuthType;
|
||||||
pDstProfile->dtimPeriod = pSrcProfile->dtimPeriod;
|
pDstProfile->dtimPeriod = pSrcProfile->dtimPeriod;
|
||||||
pDstProfile->ApUapsdEnable = pSrcProfile->ApUapsdEnable;
|
|
||||||
pDstProfile->SSIDs.SSIDList[0].ssidHidden =
|
pDstProfile->SSIDs.SSIDList[0].ssidHidden =
|
||||||
pSrcProfile->SSIDs.SSIDList[0].ssidHidden;
|
pSrcProfile->SSIDs.SSIDList[0].ssidHidden;
|
||||||
pDstProfile->protEnabled = pSrcProfile->protEnabled;
|
|
||||||
pDstProfile->obssProtEnabled = pSrcProfile->obssProtEnabled;
|
|
||||||
pDstProfile->cfg_protection = pSrcProfile->cfg_protection;
|
|
||||||
pDstProfile->wps_state = pSrcProfile->wps_state;
|
pDstProfile->wps_state = pSrcProfile->wps_state;
|
||||||
pDstProfile->add_ie_params = pSrcProfile->add_ie_params;
|
pDstProfile->add_ie_params = pSrcProfile->add_ie_params;
|
||||||
|
|
||||||
@@ -5704,25 +5679,6 @@ csr_roam_get_bss_start_parms(struct mac_context *mac,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void csr_roam_determine_max_rate_for_ad_hoc(struct mac_context *mac,
|
|
||||||
tSirMacRateSet *pSirRateSet)
|
|
||||||
{
|
|
||||||
uint8_t MaxRate = 0;
|
|
||||||
uint32_t i;
|
|
||||||
uint8_t *pRate;
|
|
||||||
|
|
||||||
pRate = pSirRateSet->rate;
|
|
||||||
for (i = 0; i < pSirRateSet->numRates; i++) {
|
|
||||||
MaxRate = QDF_MAX(MaxRate, (pRate[i] &
|
|
||||||
(~CSR_DOT11_BASIC_RATE_MASK)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Save the max rate in the connected state information.
|
|
||||||
* modify LastRates variable as well
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId,
|
QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId,
|
||||||
struct csr_roamstart_bssparams *pParam,
|
struct csr_roamstart_bssparams *pParam,
|
||||||
struct csr_roam_profile *pProfile,
|
struct csr_roam_profile *pProfile,
|
||||||
@@ -5737,11 +5693,9 @@ QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId,
|
|||||||
pParam->pRSNIE = pProfile->pRSNReqIE;
|
pParam->pRSNIE = pProfile->pRSNReqIE;
|
||||||
|
|
||||||
pParam->privacy = pProfile->privacy;
|
pParam->privacy = pProfile->privacy;
|
||||||
pParam->fwdWPSPBCProbeReq = pProfile->fwdWPSPBCProbeReq;
|
|
||||||
pParam->authType = pProfile->csr80211AuthType;
|
pParam->authType = pProfile->csr80211AuthType;
|
||||||
pParam->beaconInterval = pProfile->beaconInterval;
|
pParam->beaconInterval = pProfile->beaconInterval;
|
||||||
pParam->dtimPeriod = pProfile->dtimPeriod;
|
pParam->dtimPeriod = pProfile->dtimPeriod;
|
||||||
pParam->ApUapsdEnable = pProfile->ApUapsdEnable;
|
|
||||||
pParam->ssidHidden = pProfile->SSIDs.SSIDList[0].ssidHidden;
|
pParam->ssidHidden = pProfile->SSIDs.SSIDList[0].ssidHidden;
|
||||||
if (CSR_IS_INFRA_AP(pProfile) && (pParam->operation_chan_freq != 0)) {
|
if (CSR_IS_INFRA_AP(pProfile) && (pParam->operation_chan_freq != 0)) {
|
||||||
if (!wlan_reg_is_freq_present_in_cur_chan_list(mac->pdev,
|
if (!wlan_reg_is_freq_present_in_cur_chan_list(mac->pdev,
|
||||||
@@ -5750,11 +5704,7 @@ QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId,
|
|||||||
pParam->ch_params.ch_width = CH_WIDTH_20MHZ;
|
pParam->ch_params.ch_width = CH_WIDTH_20MHZ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pParam->protEnabled = pProfile->protEnabled;
|
|
||||||
pParam->obssProtEnabled = pProfile->obssProtEnabled;
|
|
||||||
pParam->ht_protection = pProfile->cfg_protection;
|
|
||||||
pParam->wps_state = pProfile->wps_state;
|
pParam->wps_state = pProfile->wps_state;
|
||||||
pParam->bssPersona = pProfile->csrPersona;
|
|
||||||
|
|
||||||
pParam->add_ie_params.probeRespDataLen =
|
pParam->add_ie_params.probeRespDataLen =
|
||||||
pProfile->add_ie_params.probeRespDataLen;
|
pProfile->add_ie_params.probeRespDataLen;
|
||||||
@@ -5771,13 +5721,7 @@ QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId,
|
|||||||
pParam->add_ie_params.probeRespBCNData_buff =
|
pParam->add_ie_params.probeRespBCNData_buff =
|
||||||
pProfile->add_ie_params.probeRespBCNData_buff;
|
pProfile->add_ie_params.probeRespBCNData_buff;
|
||||||
|
|
||||||
if (pProfile->csrPersona == QDF_SAP_MODE)
|
sme_debug("uCfgDot11Mode %d", pParam->uCfgDot11Mode);
|
||||||
pParam->sap_dot11mc = mac->mlme_cfg->gen.sap_dot11mc;
|
|
||||||
else
|
|
||||||
pParam->sap_dot11mc = 1;
|
|
||||||
|
|
||||||
sme_debug("11MC Support Enabled : %d uCfgDot11Mode %d",
|
|
||||||
pParam->sap_dot11mc, pParam->uCfgDot11Mode);
|
|
||||||
|
|
||||||
pParam->cac_duration_ms = pProfile->cac_duration_ms;
|
pParam->cac_duration_ms = pProfile->cac_duration_ms;
|
||||||
pParam->dfs_regdomain = pProfile->dfs_regdomain;
|
pParam->dfs_regdomain = pProfile->dfs_regdomain;
|
||||||
@@ -5809,14 +5753,6 @@ void csr_roam_prepare_bss_params(struct mac_context *mac, uint32_t sessionId,
|
|||||||
qdf_mem_copy(&pSession->bssParams.ssId,
|
qdf_mem_copy(&pSession->bssParams.ssId,
|
||||||
pProfile->SSIDs.SSIDList,
|
pProfile->SSIDs.SSIDList,
|
||||||
sizeof(tSirMacSSid));
|
sizeof(tSirMacSSid));
|
||||||
if (pProfile->BSSIDs.numOfBSSIDs)
|
|
||||||
/* Use the first BSSID */
|
|
||||||
qdf_mem_copy(&pSession->bssParams.bssid,
|
|
||||||
pProfile->BSSIDs.bssid,
|
|
||||||
sizeof(struct qdf_mac_addr));
|
|
||||||
else
|
|
||||||
qdf_mem_zero(&pSession->bssParams.bssid,
|
|
||||||
sizeof(struct qdf_mac_addr));
|
|
||||||
|
|
||||||
/* Set operating frequency in pProfile which will be used */
|
/* Set operating frequency in pProfile which will be used */
|
||||||
/* in csr_roam_set_bss_config_cfg() to determine channel bonding */
|
/* in csr_roam_set_bss_config_cfg() to determine channel bonding */
|
||||||
@@ -5826,18 +5762,16 @@ void csr_roam_prepare_bss_params(struct mac_context *mac, uint32_t sessionId,
|
|||||||
if (pProfile->op_freq == 0)
|
if (pProfile->op_freq == 0)
|
||||||
sme_err("CSR cannot find a channel to start");
|
sme_err("CSR cannot find a channel to start");
|
||||||
else {
|
else {
|
||||||
csr_roam_determine_max_rate_for_ad_hoc(mac,
|
|
||||||
&pSession->bssParams.operationalRateSet);
|
|
||||||
if (CSR_IS_INFRA_AP(pProfile)) {
|
if (CSR_IS_INFRA_AP(pProfile)) {
|
||||||
if (WLAN_REG_IS_24GHZ_CH_FREQ(pProfile->op_freq))
|
if (WLAN_REG_IS_24GHZ_CH_FREQ(pProfile->op_freq))
|
||||||
cbMode = mac->roam.configParam.channelBondingMode24GHz;
|
cbMode = mac->roam.configParam.channelBondingMode24GHz;
|
||||||
else
|
else
|
||||||
cbMode = mac->roam.configParam.channelBondingMode5GHz;
|
cbMode = mac->roam.configParam.channelBondingMode5GHz;
|
||||||
sme_debug("## cbMode %d", cbMode);
|
sme_debug("## cbMode %d", cbMode);
|
||||||
pBssConfig->cbMode = cbMode;
|
|
||||||
pSession->bssParams.cbMode = cbMode;
|
pSession->bssParams.cbMode = cbMode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||||
@@ -6028,9 +5962,6 @@ static QDF_STATUS csr_roam_start_wds(struct mac_context *mac, uint32_t sessionId
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
qdf_mem_zero(&bssConfig, sizeof(struct bss_config_param));
|
qdf_mem_zero(&bssConfig, sizeof(struct bss_config_param));
|
||||||
/* Assume HDD provide bssid in profile */
|
|
||||||
qdf_copy_macaddr(&pSession->bssParams.bssid,
|
|
||||||
pProfile->BSSIDs.bssid);
|
|
||||||
/* there is no Bss description before we start an WDS so we
|
/* there is no Bss description before we start an WDS so we
|
||||||
* need to adopt all Bss configuration parameters from the
|
* need to adopt all Bss configuration parameters from the
|
||||||
* Profile.
|
* Profile.
|
||||||
@@ -7105,9 +7036,6 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t
|
|||||||
pMsg->messageType = eWNI_SME_START_BSS_REQ;
|
pMsg->messageType = eWNI_SME_START_BSS_REQ;
|
||||||
pMsg->vdev_id = sessionId;
|
pMsg->vdev_id = sessionId;
|
||||||
pMsg->length = sizeof(*pMsg);
|
pMsg->length = sizeof(*pMsg);
|
||||||
qdf_copy_macaddr(&pMsg->bssid, &pParam->bssid);
|
|
||||||
/* self_mac_addr */
|
|
||||||
wlan_mlme_get_mac_vdev_id(mac->pdev, sessionId, &pMsg->self_macaddr);
|
|
||||||
if (pParam->beaconInterval)
|
if (pParam->beaconInterval)
|
||||||
candidate_info.beacon_interval = pParam->beaconInterval;
|
candidate_info.beacon_interval = pParam->beaconInterval;
|
||||||
else
|
else
|
||||||
@@ -7123,31 +7051,18 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t
|
|||||||
pMsg->dot11mode =
|
pMsg->dot11mode =
|
||||||
csr_translate_to_wni_cfg_dot11_mode(mac,
|
csr_translate_to_wni_cfg_dot11_mode(mac,
|
||||||
pParam->uCfgDot11Mode);
|
pParam->uCfgDot11Mode);
|
||||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
|
||||||
pMsg->cc_switch_mode = mac->roam.configParam.cc_switch_mode;
|
|
||||||
#endif
|
|
||||||
pMsg->bssType = csr_translate_bsstype_to_mac_type(bssType);
|
|
||||||
qdf_mem_copy(&pMsg->ssId, &pParam->ssId, sizeof(pParam->ssId));
|
qdf_mem_copy(&pMsg->ssId, &pParam->ssId, sizeof(pParam->ssId));
|
||||||
pMsg->oper_ch_freq = pParam->operation_chan_freq;
|
pMsg->oper_ch_freq = pParam->operation_chan_freq;
|
||||||
/* What should we really do for the cbmode. */
|
/* What should we really do for the cbmode. */
|
||||||
pMsg->cbMode = (ePhyChanBondState) pParam->cbMode;
|
|
||||||
pMsg->vht_channel_width = pParam->ch_params.ch_width;
|
pMsg->vht_channel_width = pParam->ch_params.ch_width;
|
||||||
pMsg->center_freq_seg0 = pParam->ch_params.center_freq_seg0;
|
pMsg->center_freq_seg0 = pParam->ch_params.center_freq_seg0;
|
||||||
pMsg->center_freq_seg1 = pParam->ch_params.center_freq_seg1;
|
pMsg->center_freq_seg1 = pParam->ch_params.center_freq_seg1;
|
||||||
pMsg->sec_ch_offset = pParam->ch_params.sec_ch_offset;
|
pMsg->sec_ch_offset = pParam->ch_params.sec_ch_offset;
|
||||||
pMsg->privacy = pParam->privacy;
|
pMsg->privacy = pParam->privacy;
|
||||||
pMsg->apUapsdEnable = pParam->ApUapsdEnable;
|
|
||||||
pMsg->ssidHidden = pParam->ssidHidden;
|
pMsg->ssidHidden = pParam->ssidHidden;
|
||||||
pMsg->fwdWPSPBCProbeReq = (uint8_t) pParam->fwdWPSPBCProbeReq;
|
|
||||||
pMsg->protEnabled = (uint8_t) pParam->protEnabled;
|
|
||||||
pMsg->obssProtEnabled = (uint8_t) pParam->obssProtEnabled;
|
|
||||||
/* set cfg related to protection */
|
|
||||||
pMsg->ht_capab = pParam->ht_protection;
|
|
||||||
pMsg->authType = pParam->authType;
|
pMsg->authType = pParam->authType;
|
||||||
pMsg->dtimPeriod = pParam->dtimPeriod;
|
pMsg->dtimPeriod = pParam->dtimPeriod;
|
||||||
pMsg->wps_state = pParam->wps_state;
|
pMsg->wps_state = pParam->wps_state;
|
||||||
pMsg->bssPersona = pParam->bssPersona;
|
|
||||||
pMsg->txLdpcIniFeatureEnabled = mac->mlme_cfg->ht_caps.tx_ldpc_enable;
|
|
||||||
|
|
||||||
if (pParam->nRSNIELength > sizeof(pMsg->rsnIE.rsnIEdata)) {
|
if (pParam->nRSNIELength > sizeof(pMsg->rsnIE.rsnIEdata)) {
|
||||||
qdf_mem_free(pMsg);
|
qdf_mem_free(pMsg);
|
||||||
@@ -7166,10 +7081,6 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t
|
|||||||
sizeof(tSirMacRateSet));
|
sizeof(tSirMacRateSet));
|
||||||
|
|
||||||
pMsg->add_ie_params = pParam->add_ie_params;
|
pMsg->add_ie_params = pParam->add_ie_params;
|
||||||
pMsg->obssEnabled = mac->roam.configParam.obssEnabled;
|
|
||||||
pMsg->sap_dot11mc = pParam->sap_dot11mc;
|
|
||||||
pMsg->vendor_vht_sap =
|
|
||||||
mac->mlme_cfg->vht_caps.vht_cap_info.vendor_24ghz_band;
|
|
||||||
pMsg->cac_duration_ms = pParam->cac_duration_ms;
|
pMsg->cac_duration_ms = pParam->cac_duration_ms;
|
||||||
pMsg->dfs_regdomain = pParam->dfs_regdomain;
|
pMsg->dfs_regdomain = pParam->dfs_regdomain;
|
||||||
pMsg->beacon_tx_rate = pParam->beacon_tx_rate;
|
pMsg->beacon_tx_rate = pParam->beacon_tx_rate;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -1091,29 +1091,6 @@ void csr_release_profile(struct mac_context *mac,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum bss_type csr_translate_bsstype_to_mac_type(eCsrRoamBssType csrtype)
|
|
||||||
{
|
|
||||||
enum bss_type ret;
|
|
||||||
|
|
||||||
switch (csrtype) {
|
|
||||||
case eCSR_BSS_TYPE_INFRASTRUCTURE:
|
|
||||||
ret = eSIR_INFRASTRUCTURE_MODE;
|
|
||||||
break;
|
|
||||||
case eCSR_BSS_TYPE_INFRA_AP:
|
|
||||||
ret = eSIR_INFRA_AP_MODE;
|
|
||||||
break;
|
|
||||||
case eCSR_BSS_TYPE_NDI:
|
|
||||||
ret = eSIR_NDI_MODE;
|
|
||||||
break;
|
|
||||||
case eCSR_BSS_TYPE_ANY:
|
|
||||||
default:
|
|
||||||
ret = eSIR_AUTO_MODE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function use the parameters to decide the CFG value. */
|
/* This function use the parameters to decide the CFG value. */
|
||||||
/* CSR never sets MLME_DOT11_MODE_ALL to the CFG */
|
/* CSR never sets MLME_DOT11_MODE_ALL to the CFG */
|
||||||
/* So PE should not see MLME_DOT11_MODE_ALL when it gets the CFG value */
|
/* So PE should not see MLME_DOT11_MODE_ALL when it gets the CFG value */
|
||||||
|
|||||||
Reference in New Issue
Block a user