qcacld-3.0: Move code from CSR to new RSO structs part 3

Move code from CSR to roam scan offload to use new converged
structures.

Change-Id: I418be56d452389a9f7b8d48e28f793567e81767a
CRs-Fixed: 2857606
This commit is contained in:
gaurank kathpalia
2021-01-19 11:58:25 +05:30
committed by snandini
parent 7fe17b0deb
commit 64449a8609
29 changed files with 695 additions and 564 deletions

View File

@@ -243,6 +243,13 @@ struct mscs_req_info {
}; };
#endif #endif
struct ft_context {
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
uint32_t r0kh_id_len;
uint8_t r0kh_id[ROAM_R0KH_ID_MAX_LEN];
#endif
};
/** /**
* struct mlme_connect_info - mlme connect information * struct mlme_connect_info - mlme connect information
* @timing_meas_cap: Timing meas cap * @timing_meas_cap: Timing meas cap
@@ -263,6 +270,7 @@ struct mlme_connect_info {
#endif #endif
uint8_t uapsd_per_ac_bitmask; uint8_t uapsd_per_ac_bitmask;
bool qos_enabled; bool qos_enabled;
struct ft_context ft_info;
}; };
/** /**

View File

@@ -2983,11 +2983,11 @@ int8_t wlan_get_cfg_max_tx_power(struct wlan_objmgr_psoc *psoc,
/* Identify the channel and maxtxpower */ /* Identify the channel and maxtxpower */
rem_length = cfg_length; rem_length = cfg_length;
while (rem_length >= (sizeof(tSirMacChanInfo))) { while (rem_length >= (sizeof(struct pwr_channel_info))) {
maxChannels = country_info[count].num_chan; maxChannels = country_info[count].num_chan;
max_tx_pwr = country_info[count].max_tx_pwr; max_tx_pwr = country_info[count].max_tx_pwr;
count++; count++;
rem_length -= (sizeof(tSirMacChanInfo)); rem_length -= (sizeof(struct pwr_channel_info));
if (ch_freq >= country_info[count].first_freq && if (ch_freq >= country_info[count].first_freq &&
ch_freq < (country_info[count].first_freq + maxChannels)) { ch_freq < (country_info[count].first_freq + maxChannels)) {

View File

@@ -150,7 +150,7 @@ static uint32_t ucfg_mlme_convert_power_cfg_chan_to_freq(
uint8_t *power_freq_data) uint8_t *power_freq_data)
{ {
uint32_t count = 0, rem_length = length, copied_length = 0, i = 0; uint32_t count = 0, rem_length = length, copied_length = 0, i = 0;
tSirMacChanInfo *pwr_cfg_data; struct pwr_channel_info *pwr_cfg_data;
pwr_cfg_data = qdf_mem_malloc(max_length); pwr_cfg_data = qdf_mem_malloc(max_length);
if (!pwr_cfg_data) if (!pwr_cfg_data)
@@ -158,18 +158,18 @@ static uint32_t ucfg_mlme_convert_power_cfg_chan_to_freq(
mlme_legacy_debug("max_length %d length %zu", max_length, length); mlme_legacy_debug("max_length %d length %zu", max_length, length);
while ((rem_length >= 3) && while ((rem_length >= 3) &&
(copied_length <= (max_length - (sizeof(tSirMacChanInfo))))) { (copied_length <= (max_length - (sizeof(struct pwr_channel_info))))) {
pwr_cfg_data[i].first_freq = wlan_reg_chan_to_freq( pwr_cfg_data[i].first_freq = wlan_reg_chan_to_freq(
pdev, pdev,
power_chan_data[count++]); power_chan_data[count++]);
pwr_cfg_data[i].numChannels = power_chan_data[count++]; pwr_cfg_data[i].num_chan = power_chan_data[count++];
pwr_cfg_data[i].maxTxPower = power_chan_data[count++]; pwr_cfg_data[i].max_tx_pwr = power_chan_data[count++];
copied_length += sizeof(tSirMacChanInfo); copied_length += sizeof(struct pwr_channel_info);
rem_length -= 3; rem_length -= 3;
mlme_legacy_debug("First freq %d num channels %d max tx power %d", mlme_legacy_debug("First freq %d num channels %d max tx power %d",
pwr_cfg_data[i].first_freq, pwr_cfg_data[i].first_freq,
pwr_cfg_data[i].numChannels, pwr_cfg_data[i].num_chan,
pwr_cfg_data[i].maxTxPower); pwr_cfg_data[i].max_tx_pwr);
i++; i++;
} }

View File

@@ -189,6 +189,269 @@ cm_roam_idle_params(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
wlan_mlme_get_idle_roam_min_rssi(psoc, &params->conn_ap_min_rssi); wlan_mlme_get_idle_roam_min_rssi(psoc, &params->conn_ap_min_rssi);
wlan_mlme_get_idle_roam_band(psoc, &params->band); wlan_mlme_get_idle_roam_band(psoc, &params->band);
} }
#define RSN_CAPS_SHIFT 16
#ifdef WLAN_ADAPTIVE_11R
static inline void
cm_update_rso_adaptive_11r(struct wlan_rso_11r_params *dst,
struct rso_config *rso_cfg)
{
dst->is_adaptive_11r = rso_cfg->is_adaptive_11r_connection;
}
#else
static inline void
cm_update_rso_adaptive_11r(struct wlan_rso_11r_params *dst,
struct rso_config *rso_cfg)
{}
#endif
#ifdef FEATURE_WLAN_ESE
static void
cm_update_rso_ese_info(struct rso_config *rso_cfg,
struct wlan_roam_scan_offload_params *rso_config)
{
rso_config->rso_ese_info.is_ese_assoc = rso_cfg->is_ese_assoc;
rso_config->rso_11r_info.is_11r_assoc = rso_cfg->is_11r_assoc;
}
#else
static inline void
cm_update_rso_ese_info(struct rso_config *rso_cfg,
struct wlan_roam_scan_offload_params *rso_config)
{}
#endif
#ifdef WLAN_SAE_SINGLE_PMK
static bool
csr_cm_fill_rso_sae_single_pmk_info(struct wlan_objmgr_vdev *vdev,
struct wlan_mlme_psoc_ext_obj *mlme_obj,
struct wlan_rso_11i_params *rso_11i_info)
{
struct wlan_mlme_sae_single_pmk single_pmk;
wlan_mlme_get_sae_single_pmk_info(vdev, &single_pmk);
if (single_pmk.pmk_info.pmk_len && single_pmk.sae_single_pmk_ap &&
mlme_obj->cfg.lfr.sae_single_pmk_feature_enabled) {
mlme_debug("Update pmk with len %d same_pmk_info %d",
single_pmk.pmk_info.pmk_len,
single_pmk.sae_single_pmk_ap);
rso_11i_info->pmk_len = single_pmk.pmk_info.pmk_len;
/* Update sae same pmk info in rso */
qdf_mem_copy(rso_11i_info->psk_pmk, single_pmk.pmk_info.pmk,
rso_11i_info->pmk_len);
rso_11i_info->is_sae_same_pmk = single_pmk.sae_single_pmk_ap;
return true;
}
return false;
}
#else
static inline bool
csr_cm_fill_rso_sae_single_pmk_info(struct wlan_objmgr_vdev *vdev,
struct wlan_mlme_psoc_ext_obj *mlme_obj,
struct wlan_rso_11i_params *rso_11i_info)
{
return false;
}
#endif
static QDF_STATUS
cm_roam_scan_offload_fill_lfr3_config(struct wlan_objmgr_vdev *vdev,
struct rso_config *rso_cfg,
struct wlan_roam_scan_offload_params *rso_config,
struct wlan_mlme_psoc_ext_obj *mlme_obj,
uint8_t command, uint32_t *mode)
{
tSirMacCapabilityInfo self_caps;
tSirMacQosInfoStation sta_qos_info;
uint16_t *final_caps_val;
uint8_t *qos_cfg_val, temp_val;
uint32_t pmkid_modes = mlme_obj->cfg.sta.pmkid_modes;
uint32_t val = 0;
uint8_t vdev_id = wlan_vdev_get_id(vdev);
qdf_size_t val_len;
QDF_STATUS status;
uint16_t rsn_caps = 0;
int32_t uccipher, authmode, akm;
struct wlan_objmgr_pdev *pdev;
struct wlan_objmgr_psoc *psoc;
struct cm_roam_values_copy roam_config;
struct mlme_legacy_priv *mlme_priv;
uint8_t uapsd_mask;
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
if (!mlme_priv)
return QDF_STATUS_E_FAILURE;
pdev = wlan_vdev_get_pdev(vdev);
if (!pdev)
return QDF_STATUS_E_INVAL;
psoc = wlan_pdev_get_psoc(pdev);
if (!psoc)
return QDF_STATUS_E_INVAL;
rso_config->roam_offload_enabled =
mlme_obj->cfg.lfr.lfr3_roaming_offload;
if (!rso_config->roam_offload_enabled)
return QDF_STATUS_SUCCESS;
/* FILL LFR3 specific roam scan mode TLV parameters */
rso_config->rso_lfr3_params.roam_rssi_cat_gap =
mlme_obj->cfg.lfr.rso_user_config.cat_rssi_offset;
rso_config->rso_lfr3_params.prefer_5ghz =
mlme_obj->cfg.lfr.roam_prefer_5ghz;
rso_config->rso_lfr3_params.select_5ghz_margin =
mlme_obj->cfg.gen.select_5ghz_margin;
rso_config->rso_lfr3_params.reassoc_failure_timeout =
mlme_obj->cfg.timeouts.reassoc_failure_timeout;
rso_config->rso_lfr3_params.ho_delay_for_rx =
mlme_obj->cfg.lfr.ho_delay_for_rx;
rso_config->rso_lfr3_params.roam_retry_count =
mlme_obj->cfg.lfr.roam_preauth_retry_count;
rso_config->rso_lfr3_params.roam_preauth_no_ack_timeout =
mlme_obj->cfg.lfr.roam_preauth_no_ack_timeout;
rso_config->rso_lfr3_params.rct_validity_timer =
mlme_obj->cfg.btm.rct_validity_timer;
rso_config->rso_lfr3_params.disable_self_roam =
!mlme_obj->cfg.lfr.enable_self_bss_roam;
if (!rso_cfg->roam_control_enable &&
mlme_obj->cfg.lfr.roam_force_rssi_trigger)
*mode |= WMI_ROAM_SCAN_MODE_RSSI_CHANGE;
/*
* Self rsn caps aren't sent to firmware, so in case of PMF required,
* the firmware connects to a non PMF AP advertising PMF not required
* in the re-assoc request which violates protocol.
* So send self RSN caps to firmware in roam SCAN offload command to
* let it configure the params in the re-assoc request too.
* Instead of making another infra, send the RSN-CAPS in MSB of
* beacon Caps.
*/
rsn_caps = rso_cfg->rsn_cap;
/* Fill LFR3 specific self capabilities for roam scan mode TLV */
self_caps.ess = 1;
self_caps.ibss = 0;
val = mlme_obj->cfg.wep_params.is_privacy_enabled;
if (val)
self_caps.privacy = 1;
if (mlme_obj->cfg.ht_caps.short_preamble)
self_caps.shortPreamble = 1;
self_caps.pbcc = 0;
self_caps.channelAgility = 0;
if (mlme_obj->cfg.feature_flags.enable_short_slot_time_11g)
self_caps.shortSlotTime = 1;
if (mlme_obj->cfg.gen.enabled_11h)
self_caps.spectrumMgt = 1;
if (mlme_obj->cfg.wmm_params.qos_enabled)
self_caps.qos = 1;
if (mlme_obj->cfg.roam_scoring.apsd_enabled)
self_caps.apsd = 1;
self_caps.rrm = mlme_obj->cfg.rrm_config.rrm_enabled;
val = mlme_obj->cfg.feature_flags.enable_block_ack;
self_caps.delayedBA =
(uint16_t)((val >> WNI_CFG_BLOCK_ACK_ENABLED_DELAYED) & 1);
self_caps.immediateBA =
(uint16_t)((val >> WNI_CFG_BLOCK_ACK_ENABLED_IMMEDIATE) & 1);
final_caps_val = (uint16_t *)&self_caps;
rso_config->rso_lfr3_caps.capability =
(rsn_caps << RSN_CAPS_SHIFT) | ((*final_caps_val) & 0xFFFF);
rso_config->rso_lfr3_caps.ht_caps_info =
*(uint16_t *)&mlme_obj->cfg.ht_caps.ht_cap_info;
rso_config->rso_lfr3_caps.ampdu_param =
*(uint8_t *)&mlme_obj->cfg.ht_caps.ampdu_params;
rso_config->rso_lfr3_caps.ht_ext_cap =
*(uint16_t *)&mlme_obj->cfg.ht_caps.ext_cap_info;
temp_val = (uint8_t)mlme_obj->cfg.vht_caps.vht_cap_info.tx_bf_cap;
rso_config->rso_lfr3_caps.ht_txbf = temp_val & 0xFF;
temp_val = (uint8_t)mlme_obj->cfg.vht_caps.vht_cap_info.as_cap;
rso_config->rso_lfr3_caps.asel_cap = temp_val & 0xFF;
qdf_mem_zero(&sta_qos_info, sizeof(tSirMacQosInfoStation));
sta_qos_info.maxSpLen =
(uint8_t)mlme_obj->cfg.wmm_params.max_sp_length;
sta_qos_info.moreDataAck = 0;
sta_qos_info.qack = 0;
wlan_cm_roam_cfg_get_value(psoc, vdev_id, UAPSD_MASK, &roam_config);
uapsd_mask = roam_config.uint_value;
sta_qos_info.acbe_uapsd = SIR_UAPSD_GET(ACBE, uapsd_mask);
sta_qos_info.acbk_uapsd = SIR_UAPSD_GET(ACBK, uapsd_mask);
sta_qos_info.acvi_uapsd = SIR_UAPSD_GET(ACVI, uapsd_mask);
sta_qos_info.acvo_uapsd = SIR_UAPSD_GET(ACVO, uapsd_mask);
qos_cfg_val = (uint8_t *)&sta_qos_info;
rso_config->rso_lfr3_caps.qos_caps = (*qos_cfg_val) & 0xFF;
if (rso_config->rso_lfr3_caps.qos_caps)
rso_config->rso_lfr3_caps.qos_enabled = true;
rso_config->rso_lfr3_caps.wmm_caps = 0x4;
val_len = ROAM_OFFLOAD_NUM_MCS_SET;
status =
wlan_mlme_get_cfg_str((uint8_t *)rso_config->rso_lfr3_caps.mcsset,
&mlme_obj->cfg.rates.supported_mcs_set,
&val_len);
if (QDF_IS_STATUS_ERROR(status)) {
mlme_err("Failed to get CFG_SUPPORTED_MCS_SET");
return QDF_STATUS_E_FAILURE;
}
/* Update 11i TLV related Fields */
rso_config->rso_11i_info.roam_key_mgmt_offload_enabled =
mlme_obj->cfg.lfr.lfr3_roaming_offload;
rso_config->rso_11i_info.fw_okc =
(pmkid_modes & CFG_PMKID_MODES_OKC) ? 1 : 0;
rso_config->rso_11i_info.fw_pmksa_cache =
(pmkid_modes & CFG_PMKID_MODES_PMKSA_CACHING) ? 1 : 0;
/* Check whether to send psk_pmk or sae_single pmk info */
if (!csr_cm_fill_rso_sae_single_pmk_info(vdev, mlme_obj,
&rso_config->rso_11i_info)) {
rso_config->rso_11i_info.is_sae_same_pmk = false;
wlan_cm_get_psk_pmk(pdev, vdev_id,
rso_config->rso_11i_info.psk_pmk,
&rso_config->rso_11i_info.pmk_len);
}
rso_config->rso_11r_info.enable_ft_im_roaming =
mlme_obj->cfg.lfr.enable_ft_im_roaming;
rso_config->rso_11r_info.mdid.mdie_present =
rso_cfg->mdid.mdie_present;
rso_config->rso_11r_info.mdid.mobility_domain =
rso_cfg->mdid.mobility_domain;
rso_config->rso_11r_info.r0kh_id_length =
mlme_priv->connect_info.ft_info.r0kh_id_len;
qdf_mem_copy(rso_config->rso_11r_info.r0kh_id,
mlme_priv->connect_info.ft_info.r0kh_id,
mlme_priv->connect_info.ft_info.r0kh_id_len);
wlan_cm_get_psk_pmk(pdev, vdev_id,
rso_config->rso_11i_info.psk_pmk,
&rso_config->rso_11i_info.pmk_len);
cm_update_rso_adaptive_11r(&rso_config->rso_11r_info, rso_cfg);
cm_update_rso_ese_info(rso_cfg, rso_config);
uccipher = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_UCAST_CIPHER);
authmode = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_AUTH_MODE);
akm = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_KEY_MGMT);
rso_config->akm =
cm_crpto_authmode_to_wmi_authmode(authmode, akm, uccipher);
return QDF_STATUS_SUCCESS;
}
#else #else
static inline void static inline void
cm_roam_reason_vsie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, cm_roam_reason_vsie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
@@ -220,7 +483,7 @@ cm_roam_idle_params(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
{ {
} }
static inline QDF_STATUS static inline QDF_STATUS
wlan_cm_roam_scan_offload_fill_lfr3_config(struct wlan_objmgr_vdev *vdev, cm_roam_scan_offload_fill_lfr3_config(struct wlan_objmgr_vdev *vdev,
struct rso_config *rso_cfg, struct rso_config *rso_cfg,
struct wlan_roam_scan_offload_params *rso_config, struct wlan_roam_scan_offload_params *rso_config,
struct wlan_mlme_psoc_ext_obj *mlme_obj, struct wlan_mlme_psoc_ext_obj *mlme_obj,
@@ -1773,7 +2036,7 @@ cm_roam_scan_offload_fill_rso_configs(struct wlan_objmgr_psoc *psoc,
if (command == ROAM_SCAN_OFFLOAD_STOP) if (command == ROAM_SCAN_OFFLOAD_STOP)
return; return;
wlan_cm_roam_scan_offload_fill_lfr3_config(vdev, rso_cfg, rso_mode_cfg, cm_roam_scan_offload_fill_lfr3_config(vdev, rso_cfg, rso_mode_cfg,
mlme_obj, command, &mode); mlme_obj, command, &mode);
rso_mode_cfg->rso_mode_info.roam_scan_mode = mode; rso_mode_cfg->rso_mode_info.roam_scan_mode = mode;
cm_roam_scan_offload_fill_scan_params(psoc, rso_cfg, mlme_obj, cm_roam_scan_offload_fill_scan_params(psoc, rso_cfg, mlme_obj,

View File

@@ -456,6 +456,27 @@ void wlan_add_supported_5Ghz_channels(struct wlan_objmgr_psoc *psoc,
uint8_t *chan_list, uint8_t *chan_list,
uint8_t *num_chnl, uint8_t *num_chnl,
bool supp_chan_ie); bool supp_chan_ie);
#ifdef WLAN_ADAPTIVE_11R
/**
* wlan_get_adaptive_11r_enabled() - Function to check if adaptive 11r
* ini is enabled or disabled
* @mac: pointer to mac context
*
* Return: true if adaptive 11r is enabled
*/
static inline bool
wlan_get_adaptive_11r_enabled(struct wlan_mlme_lfr_cfg *lfr_cfg)
{
return lfr_cfg->enable_adaptive_11r;
}
#else
static inline bool
wlan_get_adaptive_11r_enabled(struct wlan_mlme_lfr_cfg *lfr_cfg)
{
return false;
}
#endif
#ifdef WLAN_FEATURE_FILS_SK #ifdef WLAN_FEATURE_FILS_SK
/** /**
* wlan_cm_get_fils_connection_info - Copy fils connection information from * wlan_cm_get_fils_connection_info - Copy fils connection information from
@@ -507,12 +528,6 @@ struct wlan_fils_connection_info *wlan_cm_get_fils_connection_info(
#endif #endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
QDF_STATUS
wlan_cm_roam_scan_offload_fill_lfr3_config(struct wlan_objmgr_vdev *vdev,
struct rso_config *rso_cfg,
struct wlan_roam_scan_offload_params *rso_config,
struct wlan_mlme_psoc_ext_obj *mlme_obj,
uint8_t command, uint32_t *mode);
/** /**
* wlan_cm_roam_extract_btm_response() - Extract BTM rsp stats * wlan_cm_roam_extract_btm_response() - Extract BTM rsp stats
* @wmi: wmi handle * @wmi: wmi handle
@@ -676,6 +691,13 @@ wlan_cm_update_roam_scan_scheme_bitmap(struct wlan_objmgr_psoc *psoc,
*/ */
uint32_t wlan_cm_get_roam_scan_scheme_bitmap(struct wlan_objmgr_psoc *psoc, uint32_t wlan_cm_get_roam_scan_scheme_bitmap(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id); uint8_t vdev_id);
void wlan_cm_set_psk_pmk(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id, uint8_t *psk_pmk,
uint8_t pmk_len);
void wlan_cm_get_psk_pmk(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id, uint8_t *psk_pmk,
uint8_t *pmk_len);
#else #else
static inline static inline
void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc, void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc,
@@ -755,5 +777,9 @@ uint32_t wlan_cm_get_roam_scan_scheme_bitmap(struct wlan_objmgr_psoc *psoc,
{ {
return 0; return 0;
} }
static inline void wlan_cm_set_psk_pmk(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id, uint8_t *psk_pmk,
uint8_t pmk_len)
{}
#endif /* FEATURE_ROAM_OFFLOAD */ #endif /* FEATURE_ROAM_OFFLOAD */
#endif /* WLAN_CM_ROAM_API_H__ */ #endif /* WLAN_CM_ROAM_API_H__ */

View File

@@ -102,6 +102,11 @@
#define MAX_BSSID_AVOID_LIST 16 #define MAX_BSSID_AVOID_LIST 16
#define MAX_BSSID_FAVORED 16 #define MAX_BSSID_FAVORED 16
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
#define ROAM_SCAN_PSK_SIZE 48
#define ROAM_R0KH_ID_MAX_LEN 48
#endif
/** /**
* struct rso_chan_info - chan info * struct rso_chan_info - chan info
* @num_chan: number of channels * @num_chan: number of channels
@@ -182,6 +187,12 @@ struct wlan_chan_list {
* @occupied_chan_lst: occupied channel list * @occupied_chan_lst: occupied channel list
* @roam_candidate_count: candidate count * @roam_candidate_count: candidate count
* @is_ese_assoc: is ese assoc * @is_ese_assoc: is ese assoc
* @psk_pmk: pmk
* @pmk_len: length of pmk
* @mdid: mdid info
* @is_11r_assoc: is 11r assoc
* @is_adaptive_11r_connection: is adaptive 11r connection
* @roam_scan_freq_lst: roam freq list
*/ */
struct rso_config { struct rso_config {
uint8_t rsn_cap; uint8_t rsn_cap;
@@ -195,9 +206,17 @@ struct rso_config {
struct element_info assoc_ie; struct element_info assoc_ie;
struct wlan_chan_list occupied_chan_lst; struct wlan_chan_list occupied_chan_lst;
int8_t roam_candidate_count; int8_t roam_candidate_count;
uint8_t uapsd_mask;
#ifdef FEATURE_WLAN_ESE #ifdef FEATURE_WLAN_ESE
bool is_ese_assoc; bool is_ese_assoc;
#endif #endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
uint8_t psk_pmk[ROAM_SCAN_PSK_SIZE];
uint8_t pmk_len;
#endif
struct mobility_domain_info mdid;
bool is_11r_assoc;
bool is_adaptive_11r_connection;
struct rso_chan_info roam_scan_freq_lst; struct rso_chan_info roam_scan_freq_lst;
}; };
@@ -290,6 +309,10 @@ struct rso_config_params {
* @SCAN_HOME_AWAY: scan and away * @SCAN_HOME_AWAY: scan and away
* @NEIGHBOUR_SCAN_REFRESH_PERIOD: scan refresh * @NEIGHBOUR_SCAN_REFRESH_PERIOD: scan refresh
* @ROAM_CONTROL_ENABLE: roam control enable * @ROAM_CONTROL_ENABLE: roam control enable
* @UAPSD_MASK: uapsd mask
* @MOBILITY_DOMAIN: mobility domain
* @IS_11R_CONNECTION: is 11r connection
* @ADAPTIVE_11R_CONNECTION: adaptive 11r
*/ */
enum roam_cfg_param { enum roam_cfg_param {
RSSI_CHANGE_THRESHOLD, RSSI_CHANGE_THRESHOLD,
@@ -310,6 +333,10 @@ enum roam_cfg_param {
SCAN_HOME_AWAY, SCAN_HOME_AWAY,
NEIGHBOUR_SCAN_REFRESH_PERIOD, NEIGHBOUR_SCAN_REFRESH_PERIOD,
ROAM_CONTROL_ENABLE, ROAM_CONTROL_ENABLE,
UAPSD_MASK,
MOBILITY_DOMAIN,
IS_11R_CONNECTION,
ADAPTIVE_11R_CONNECTION,
}; };
/** /**
@@ -1027,7 +1054,7 @@ struct wlan_rso_11i_params {
bool fw_pmksa_cache; bool fw_pmksa_cache;
bool is_sae_same_pmk; bool is_sae_same_pmk;
uint8_t psk_pmk[WMI_ROAM_SCAN_PSK_SIZE]; uint8_t psk_pmk[WMI_ROAM_SCAN_PSK_SIZE];
uint32_t pmk_len; uint8_t pmk_len;
}; };
/** /**

View File

@@ -504,6 +504,57 @@ wlan_cm_roam_get_vendor_btm_params(struct wlan_objmgr_psoc *psoc,
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID); wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
} }
void wlan_cm_set_psk_pmk(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id, uint8_t *psk_pmk,
uint8_t pmk_len)
{
static struct rso_config *rso_cfg;
struct wlan_objmgr_vdev *vdev;
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
WLAN_MLME_CM_ID);
if (!vdev) {
mlme_err("vdev object is NULL");
return;
}
rso_cfg = wlan_cm_get_rso_config(vdev);
if (!rso_cfg) {
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
return;
}
qdf_mem_zero(rso_cfg->psk_pmk, sizeof(rso_cfg->psk_pmk));
if (psk_pmk)
qdf_mem_copy(rso_cfg->psk_pmk, psk_pmk, pmk_len);
rso_cfg->pmk_len = pmk_len;
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
}
void wlan_cm_get_psk_pmk(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id, uint8_t *psk_pmk,
uint8_t *pmk_len)
{
static struct rso_config *rso_cfg;
struct wlan_objmgr_vdev *vdev;
if (!psk_pmk || !pmk_len)
return;
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
WLAN_MLME_CM_ID);
if (!vdev) {
mlme_err("vdev object is NULL");
return;
}
rso_cfg = wlan_cm_get_rso_config(vdev);
if (!rso_cfg) {
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
return;
}
qdf_mem_copy(psk_pmk, rso_cfg->psk_pmk, rso_cfg->pmk_len);
*pmk_len = rso_cfg->pmk_len;
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
}
#endif #endif
QDF_STATUS wlan_cm_roam_cfg_get_value(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_cm_roam_cfg_get_value(struct wlan_objmgr_psoc *psoc,
@@ -578,6 +629,19 @@ QDF_STATUS wlan_cm_roam_cfg_get_value(struct wlan_objmgr_psoc *psoc,
case ROAM_CONTROL_ENABLE: case ROAM_CONTROL_ENABLE:
dst_config->bool_value = rso_cfg->roam_control_enable; dst_config->bool_value = rso_cfg->roam_control_enable;
break; break;
case UAPSD_MASK:
dst_config->uint_value = rso_cfg->uapsd_mask;
break;
case MOBILITY_DOMAIN:
dst_config->bool_value = rso_cfg->mdid.mdie_present;
dst_config->uint_value = rso_cfg->mdid.mobility_domain;
break;
case IS_11R_CONNECTION:
dst_config->bool_value = rso_cfg->is_11r_assoc;
break;
case ADAPTIVE_11R_CONNECTION:
dst_config->bool_value = rso_cfg->is_adaptive_11r_connection;
break;
default: default:
mlme_err("Invalid roam config requested:%d", roam_cfg_type); mlme_err("Invalid roam config requested:%d", roam_cfg_type);
status = QDF_STATUS_E_FAILURE; status = QDF_STATUS_E_FAILURE;
@@ -926,6 +990,19 @@ wlan_cm_roam_cfg_set_value(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
cm_roam_update_cfg(psoc, vdev_id, cm_roam_update_cfg(psoc, vdev_id,
REASON_NEIGHBOR_SCAN_REFRESH_PERIOD_CHANGED); REASON_NEIGHBOR_SCAN_REFRESH_PERIOD_CHANGED);
break; break;
case UAPSD_MASK:
rso_cfg->uapsd_mask = src_config->uint_value;
break;
case MOBILITY_DOMAIN:
rso_cfg->mdid.mdie_present = src_config->bool_value;
rso_cfg->mdid.mobility_domain = src_config->uint_value;
break;
case IS_11R_CONNECTION:
rso_cfg->is_11r_assoc = src_config->bool_value;
break;
case ADAPTIVE_11R_CONNECTION:
rso_cfg->is_adaptive_11r_connection = src_config->bool_value;
break;
default: default:
mlme_err("Invalid roam config requested:%d", roam_cfg_type); mlme_err("Invalid roam config requested:%d", roam_cfg_type);
status = QDF_STATUS_E_FAILURE; status = QDF_STATUS_E_FAILURE;

View File

@@ -279,6 +279,7 @@ QDF_STATUS hdd_sme_roam_callback(void *context,
eRoamCmdStatus roam_status, eRoamCmdStatus roam_status,
eCsrRoamResult roam_result); eCsrRoamResult roam_result);
#ifndef FEATURE_CM_ENABLE
/** /**
* hdd_set_genie_to_csr() - set genie to csr * hdd_set_genie_to_csr() - set genie to csr
* @adapter: pointer to adapter * @adapter: pointer to adapter
@@ -289,6 +290,7 @@ QDF_STATUS hdd_sme_roam_callback(void *context,
int hdd_set_genie_to_csr(struct hdd_adapter *adapter, int hdd_set_genie_to_csr(struct hdd_adapter *adapter,
enum csr_akm_type *rsn_auth_type); enum csr_akm_type *rsn_auth_type);
/** /**
* hdd_set_csr_auth_type() - set csr auth type * hdd_set_csr_auth_type() - set csr auth type
* @adapter: pointer to adapter * @adapter: pointer to adapter
@@ -298,7 +300,7 @@ int hdd_set_genie_to_csr(struct hdd_adapter *adapter,
*/ */
int hdd_set_csr_auth_type(struct hdd_adapter *adapter, int hdd_set_csr_auth_type(struct hdd_adapter *adapter,
enum csr_akm_type rsn_auth_type); enum csr_akm_type rsn_auth_type);
#endif
#ifdef FEATURE_WLAN_TDLS #ifdef FEATURE_WLAN_TDLS
/** /**
* hdd_roam_register_tdlssta() - register new TDLS station * hdd_roam_register_tdlssta() - register new TDLS station

View File

@@ -4226,6 +4226,7 @@ int hdd_get_rssi_snr_by_bssid(struct hdd_adapter *adapter, const uint8_t *bssid,
*/ */
int hdd_reset_limit_off_chan(struct hdd_adapter *adapter); int hdd_reset_limit_off_chan(struct hdd_adapter *adapter);
#ifndef FEATURE_CM_ENABLE
#if defined(WLAN_FEATURE_FILS_SK) && \ #if defined(WLAN_FEATURE_FILS_SK) && \
(defined(CFG80211_FILS_SK_OFFLOAD_SUPPORT) || \ (defined(CFG80211_FILS_SK_OFFLOAD_SUPPORT) || \
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))) (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)))
@@ -4238,7 +4239,6 @@ int hdd_reset_limit_off_chan(struct hdd_adapter *adapter);
*/ */
void hdd_clear_fils_connection_info(struct hdd_adapter *adapter); void hdd_clear_fils_connection_info(struct hdd_adapter *adapter);
#ifndef FEATURE_CM_ENABLE
/** /**
* hdd_update_hlp_info() - Update HLP packet received in FILS (re)assoc rsp * hdd_update_hlp_info() - Update HLP packet received in FILS (re)assoc rsp
* @dev: net device * @dev: net device
@@ -4251,11 +4251,9 @@ void hdd_clear_fils_connection_info(struct hdd_adapter *adapter);
*/ */
void hdd_update_hlp_info(struct net_device *dev, void hdd_update_hlp_info(struct net_device *dev,
struct csr_roam_info *roam_info); struct csr_roam_info *roam_info);
#endif
#else #else
static inline void hdd_clear_fils_connection_info(struct hdd_adapter *adapter) static inline void hdd_clear_fils_connection_info(struct hdd_adapter *adapter)
{ } { }
#ifndef FEATURE_CM_ENABLE
static inline void hdd_update_hlp_info(struct net_device *dev, static inline void hdd_update_hlp_info(struct net_device *dev,
struct csr_roam_info *roam_info) struct csr_roam_info *roam_info)
{} {}

View File

@@ -1740,7 +1740,9 @@ void hdd_clear_roam_profile_ie(struct hdd_adapter *adapter)
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx->auth_key_mgmt = 0; sta_ctx->auth_key_mgmt = 0;
qdf_zero_macaddr(&sta_ctx->requested_bssid); qdf_zero_macaddr(&sta_ctx->requested_bssid);
#ifndef FEATURE_CM_ENABLE
hdd_clear_fils_connection_info(adapter); hdd_clear_fils_connection_info(adapter);
#endif
hdd_exit(); hdd_exit();
} }
@@ -2621,6 +2623,7 @@ hdd_roam_set_key_complete_handler(struct hdd_adapter *adapter,
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
#ifndef FEATURE_CM_ENABLE
#if defined(WLAN_FEATURE_FILS_SK) && \ #if defined(WLAN_FEATURE_FILS_SK) && \
(defined(CFG80211_FILS_SK_OFFLOAD_SUPPORT) || \ (defined(CFG80211_FILS_SK_OFFLOAD_SUPPORT) || \
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))) (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)))
@@ -2646,8 +2649,6 @@ void hdd_clear_fils_connection_info(struct hdd_adapter *adapter)
} }
#endif #endif
#ifndef FEATURE_CM_ENABLE
/** /**
* hdd_association_completion_handler() - association completion handler * hdd_association_completion_handler() - association completion handler
* @adapter: pointer to adapter * @adapter: pointer to adapter
@@ -4747,6 +4748,7 @@ bool hdd_is_fils_connection(struct hdd_adapter *adapter)
return false; return false;
} }
#endif #endif
#ifndef FEATURE_CM_ENABLE
/** /**
* hdd_process_genie() - process gen ie * hdd_process_genie() - process gen ie
@@ -5320,7 +5322,9 @@ int hdd_set_csr_auth_type(struct hdd_adapter *adapter,
return 0; return 0;
} }
#endif
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_FILS_SK #ifdef WLAN_FEATURE_FILS_SK
static void hdd_initialize_fils_info(struct hdd_adapter *adapter) static void hdd_initialize_fils_info(struct hdd_adapter *adapter)
{ {
@@ -5335,6 +5339,7 @@ static void hdd_initialize_fils_info(struct hdd_adapter *adapter)
static void hdd_initialize_fils_info(struct hdd_adapter *adapter) static void hdd_initialize_fils_info(struct hdd_adapter *adapter)
{ } { }
#endif #endif
#endif
void hdd_roam_profile_init(struct hdd_adapter *adapter) void hdd_roam_profile_init(struct hdd_adapter *adapter)
{ {
@@ -5376,9 +5381,9 @@ void hdd_roam_profile_init(struct hdd_adapter *adapter)
adapter->scan_info.scan_mode = eSIR_ACTIVE_SCAN; adapter->scan_info.scan_mode = eSIR_ACTIVE_SCAN;
hdd_clear_roam_profile_ie(adapter); hdd_clear_roam_profile_ie(adapter);
#ifndef FEATURE_CM_ENABLE
hdd_initialize_fils_info(adapter); hdd_initialize_fils_info(adapter);
#endif
hdd_exit(); hdd_exit();
} }

View File

@@ -6191,7 +6191,7 @@ static int __wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy,
struct wireless_dev *wdev, struct wireless_dev *wdev,
const void *data, int data_len) const void *data, int data_len)
{ {
uint8_t local_pmk[SIR_ROAM_SCAN_PSK_SIZE]; uint8_t local_pmk[ROAM_SCAN_PSK_SIZE];
struct net_device *dev = wdev->netdev; struct net_device *dev = wdev->netdev;
struct hdd_adapter *hdd_adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct hdd_adapter *hdd_adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_context *hdd_ctx; struct hdd_context *hdd_ctx;
@@ -6206,7 +6206,7 @@ static int __wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy,
} }
if ((!data) || (data_len <= 0) || if ((!data) || (data_len <= 0) ||
(data_len > SIR_ROAM_SCAN_PSK_SIZE)) { (data_len > ROAM_SCAN_PSK_SIZE)) {
hdd_err("Invalid data"); hdd_err("Invalid data");
return -EINVAL; return -EINVAL;
} }
@@ -6222,11 +6222,11 @@ static int __wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy,
return status; return status;
mac_handle = hdd_ctx->mac_handle; mac_handle = hdd_ctx->mac_handle;
qdf_mem_zero(&local_pmk, SIR_ROAM_SCAN_PSK_SIZE); qdf_mem_zero(&local_pmk, ROAM_SCAN_PSK_SIZE);
qdf_mem_copy(local_pmk, data, data_len); qdf_mem_copy(local_pmk, data, data_len);
sme_roam_set_psk_pmk(mac_handle, hdd_adapter->vdev_id, sme_roam_set_psk_pmk(mac_handle, hdd_adapter->vdev_id,
local_pmk, data_len, true); local_pmk, data_len, true);
qdf_mem_zero(&local_pmk, SIR_ROAM_SCAN_PSK_SIZE); qdf_mem_zero(&local_pmk, ROAM_SCAN_PSK_SIZE);
return 0; return 0;
} }

View File

@@ -7182,8 +7182,9 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
wlan_hdd_scan_abort(adapter); wlan_hdd_scan_abort(adapter);
wlan_hdd_cleanup_actionframe(adapter); wlan_hdd_cleanup_actionframe(adapter);
wlan_hdd_cleanup_remain_on_channel_ctx(adapter); wlan_hdd_cleanup_remain_on_channel_ctx(adapter);
#ifndef FEATURE_CM_ENABLE
hdd_clear_fils_connection_info(adapter); hdd_clear_fils_connection_info(adapter);
#endif
status = wlan_hdd_flush_pmksa_cache(adapter); status = wlan_hdd_flush_pmksa_cache(adapter);
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))
hdd_debug("Cannot flush PMKIDCache"); hdd_debug("Cannot flush PMKIDCache");

View File

@@ -1800,10 +1800,6 @@ typedef struct sSirSmeProbeReqInd {
/* Occupied channel list can be dynamic */ /* Occupied channel list can be dynamic */
#define CHANNEL_LIST_DYNAMIC 2 #define CHANNEL_LIST_DYNAMIC 2
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
#define SIR_ROAM_SCAN_PSK_SIZE 48
#define SIR_ROAM_R0KH_ID_MAX_LEN 48
#endif
/* SME -> HAL - This is the host offload request. */ /* SME -> HAL - This is the host offload request. */
#define SIR_IPV6_NS_OFFLOAD 2 #define SIR_IPV6_NS_OFFLOAD 2
#define SIR_OFFLOAD_DISABLE 0 #define SIR_OFFLOAD_DISABLE 0

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2011-2021 The Linux Foundation. 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
@@ -854,12 +854,6 @@ typedef struct sSirMacCfParamSetIE {
tSirMacCfParamSet cfParams; tSirMacCfParamSet cfParams;
} qdf_packed tSirMacCfParamSetIE; } qdf_packed tSirMacCfParamSetIE;
typedef struct sSirMacChanInfo {
uint32_t first_freq;
uint8_t numChannels;
int8_t maxTxPower;
} qdf_packed tSirMacChanInfo;
typedef struct sSirMacNonErpPresentIE { typedef struct sSirMacNonErpPresentIE {
uint8_t type; uint8_t type;
uint8_t length; uint8_t length;

View File

@@ -611,6 +611,36 @@ static void clean_up_ft_sha384(tpSirAssocRsp assoc_rsp, bool sha384_akm)
} }
} }
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
static void lim_set_r0kh(tpSirAssocRsp assoc_rsp, struct pe_session *session)
{
struct mlme_legacy_priv *mlme_priv;
mlme_priv = wlan_vdev_mlme_get_ext_hdl(session->vdev);
if (!mlme_priv)
return;
if (assoc_rsp->sha384_ft_subelem.r0kh_id.present) {
mlme_priv->connect_info.ft_info.r0kh_id_len =
assoc_rsp->sha384_ft_subelem.r0kh_id.num_PMK_R0_ID;
qdf_mem_copy(mlme_priv->connect_info.ft_info.r0kh_id,
assoc_rsp->sha384_ft_subelem.r0kh_id.PMK_R0_ID,
mlme_priv->connect_info.ft_info.r0kh_id_len);
} else if (assoc_rsp->FTInfo.R0KH_ID.present) {
mlme_priv->connect_info.ft_info.r0kh_id_len =
assoc_rsp->FTInfo.R0KH_ID.num_PMK_R0_ID;
qdf_mem_copy(mlme_priv->connect_info.ft_info.r0kh_id,
assoc_rsp->FTInfo.R0KH_ID.PMK_R0_ID,
mlme_priv->connect_info.ft_info.r0kh_id_len);
} else {
mlme_priv->connect_info.ft_info.r0kh_id_len = 0;
qdf_mem_zero(mlme_priv->connect_info.ft_info.r0kh_id,
ROAM_R0KH_ID_MAX_LEN);
}
}
#else
static inline
void lim_set_r0kh(tpSirAssocRsp assoc_rsp, struct pe_session *session) {}
#endif
/** /**
* lim_process_assoc_rsp_frame() - Processes assoc response * lim_process_assoc_rsp_frame() - Processes assoc response
* @mac_ctx: Pointer to Global MAC structure * @mac_ctx: Pointer to Global MAC structure
@@ -641,9 +671,6 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
tLimMlmAssocCnf assoc_cnf; tLimMlmAssocCnf assoc_cnf;
tSchBeaconStruct *beacon; tSchBeaconStruct *beacon;
uint8_t vdev_id = session_entry->vdev_id; uint8_t vdev_id = session_entry->vdev_id;
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
struct csr_roam_session *roam_session;
#endif
uint8_t ap_nss; uint8_t ap_nss;
int8_t rssi; int8_t rssi;
QDF_STATUS status; QDF_STATUS status;
@@ -793,27 +820,7 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
lim_update_ric_data(mac_ctx, session_entry, assoc_rsp); lim_update_ric_data(mac_ctx, session_entry, assoc_rsp);
#ifdef WLAN_FEATURE_ROAM_OFFLOAD lim_set_r0kh(assoc_rsp, session_entry);
roam_session =
&mac_ctx->roam.roamSession[vdev_id];
if (assoc_rsp->sha384_ft_subelem.r0kh_id.present) {
roam_session->ftSmeContext.r0kh_id_len =
assoc_rsp->sha384_ft_subelem.r0kh_id.num_PMK_R0_ID;
qdf_mem_copy(roam_session->ftSmeContext.r0kh_id,
assoc_rsp->sha384_ft_subelem.r0kh_id.PMK_R0_ID,
roam_session->ftSmeContext.r0kh_id_len);
} else if (assoc_rsp->FTInfo.R0KH_ID.present) {
roam_session->ftSmeContext.r0kh_id_len =
assoc_rsp->FTInfo.R0KH_ID.num_PMK_R0_ID;
qdf_mem_copy(roam_session->ftSmeContext.r0kh_id,
assoc_rsp->FTInfo.R0KH_ID.PMK_R0_ID,
roam_session->ftSmeContext.r0kh_id_len);
} else {
roam_session->ftSmeContext.r0kh_id_len = 0;
qdf_mem_zero(roam_session->ftSmeContext.r0kh_id,
SIR_ROAM_R0KH_ID_MAX_LEN);
}
#endif
#ifdef FEATURE_WLAN_ESE #ifdef FEATURE_WLAN_ESE
lim_update_ese_tspec(mac_ctx, session_entry, assoc_rsp); lim_update_ese_tspec(mac_ctx, session_entry, assoc_rsp);

View File

@@ -746,7 +746,6 @@ typedef struct tagCsrRoamConnectedProfile {
tCsrRoamModifyProfileFields modifyProfileFields; tCsrRoamModifyProfileFields modifyProfileFields;
bool qosConnection; /* A connection is QoS enabled */ bool qosConnection; /* A connection is QoS enabled */
bool qap; /* AP supports QoS */ bool qap; /* AP supports QoS */
struct mobility_domain_info mdid;
uint32_t dot11Mode; uint32_t dot11Mode;
#ifndef FEATURE_CM_ENABLE #ifndef FEATURE_CM_ENABLE
uint8_t proxy_arp_service; uint8_t proxy_arp_service;

View File

@@ -569,17 +569,13 @@ struct csr_roam_session {
#endif #endif
uint8_t bRefAssocStartCnt; /* Tracking assoc start indication */ uint8_t bRefAssocStartCnt; /* Tracking assoc start indication */
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
uint8_t psk_pmk[SIR_ROAM_SCAN_PSK_SIZE];
size_t pmk_len;
struct roam_offload_synch_ind *roam_synch_data; struct roam_offload_synch_ind *roam_synch_data;
#endif #endif
tftSMEContext ftSmeContext; tftSMEContext ftSmeContext;
bool ch_switch_in_progress; bool ch_switch_in_progress;
uint8_t nss; uint8_t nss;
bool dhcp_done; bool dhcp_done;
uint8_t uapsd_mask;
qdf_mc_timer_t roaming_offload_timer; qdf_mc_timer_t roaming_offload_timer;
bool is_adaptive_11r_connection;
struct csr_disconnect_stats disconnect_stats; struct csr_disconnect_stats disconnect_stats;
qdf_mc_timer_t wait_for_key_timer; qdf_mc_timer_t wait_for_key_timer;
struct csr_timer_info wait_for_key_timer_info; struct csr_timer_info wait_for_key_timer_info;

View File

@@ -79,7 +79,6 @@ typedef struct sCsrNeighborRoamControlInfo {
uint32_t curr_ap_op_chan_freq; /* current assoc AP */ uint32_t curr_ap_op_chan_freq; /* current assoc AP */
tDblLinkList roamableAPList; /* List of current FT candidates */ tDblLinkList roamableAPList; /* List of current FT candidates */
struct csr_roam_profile csrNeighborRoamProfile; struct csr_roam_profile csrNeighborRoamProfile;
bool is11rAssoc;
tCsr11rAssocNeighborInfo FTRoamInfo; tCsr11rAssocNeighborInfo FTRoamInfo;
#ifdef FEATURE_WLAN_ESE #ifdef FEATURE_WLAN_ESE
bool isVOAdmitted; bool isVOAdmitted;
@@ -238,6 +237,7 @@ csr_roam_update_cfg(struct mac_context *mac, uint8_t vdev_id, uint8_t reason)
uint8_t csr_get_roam_enabled_sta_sessionid(struct mac_context *mac_ctx, uint8_t csr_get_roam_enabled_sta_sessionid(struct mac_context *mac_ctx,
uint8_t vdev_id); uint8_t vdev_id);
#ifndef FEATURE_CM_ENABLE
#if defined(WLAN_FEATURE_FILS_SK) #if defined(WLAN_FEATURE_FILS_SK)
/** /**
* csr_update_fils_config - Update FILS config to CSR roam session * csr_update_fils_config - Update FILS config to CSR roam session
@@ -252,6 +252,7 @@ uint8_t csr_get_roam_enabled_sta_sessionid(struct mac_context *mac_ctx,
QDF_STATUS csr_update_fils_config(struct mac_context *mac, uint8_t session_id, QDF_STATUS csr_update_fils_config(struct mac_context *mac, uint8_t session_id,
struct csr_roam_profile *src_profile); struct csr_roam_profile *src_profile);
#endif #endif
#endif
QDF_STATUS csr_neighbor_roam_handoff_req_hdlr(struct mac_context *mac, void *pMsg); QDF_STATUS csr_neighbor_roam_handoff_req_hdlr(struct mac_context *mac, void *pMsg);
QDF_STATUS csr_neighbor_roam_proceed_with_handoff_req(struct mac_context *mac, QDF_STATUS csr_neighbor_roam_proceed_with_handoff_req(struct mac_context *mac,

View File

@@ -2866,6 +2866,7 @@ QDF_STATUS sme_send_rso_connect_params(mac_handle_t mac_handle,
struct csr_roam_profile *src_profile); struct csr_roam_profile *src_profile);
#if defined(WLAN_FEATURE_FILS_SK) #if defined(WLAN_FEATURE_FILS_SK)
#ifndef FEATURE_CM_ENABLE
/** /**
* sme_update_fils_config - Update FILS config to CSR roam session * sme_update_fils_config - Update FILS config to CSR roam session
* @mac_handle: Opaque handle to the global MAC context * @mac_handle: Opaque handle to the global MAC context
@@ -2878,7 +2879,7 @@ QDF_STATUS sme_send_rso_connect_params(mac_handle_t mac_handle,
*/ */
QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id, QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id,
struct csr_roam_profile *src_profile); struct csr_roam_profile *src_profile);
#endif
/** /**
* sme_free_join_rsp_fils_params - free fils params * sme_free_join_rsp_fils_params - free fils params
* @roam_info: roam info * @roam_info: roam info
@@ -2887,13 +2888,14 @@ QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id,
*/ */
void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info); void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info);
#else #else
#ifndef FEATURE_CM_ENABLE
static inline static inline
QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id, QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id,
struct csr_roam_profile *src_profile) struct csr_roam_profile *src_profile)
{ {
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
#endif
static inline static inline
void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info) void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info)
{} {}

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013-2016, 2018, 2019-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2013-2016, 2018, 2019-2021 The Linux Foundation. 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
@@ -61,10 +61,6 @@ typedef struct sFTSMEContext {
/* Time to trigger reassoc once pre-auth is successful */ /* Time to trigger reassoc once pre-auth is successful */
qdf_mc_timer_t preAuthReassocIntvlTimer; qdf_mc_timer_t preAuthReassocIntvlTimer;
bool addMDIE; bool addMDIE;
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
uint32_t r0kh_id_len;
uint8_t r0kh_id[SIR_ROAM_R0KH_ID_MAX_LEN];
#endif
/* User context for the timer callback */ /* User context for the timer callback */
tpFTRoamCallbackUsrCtx pUsrCtx; tpFTRoamCallbackUsrCtx pUsrCtx;
} tftSMEContext, *tpftSMEContext; } tftSMEContext, *tpftSMEContext;

View File

@@ -6106,6 +6106,7 @@ QDF_STATUS sme_send_rso_connect_params(mac_handle_t mac_handle,
} }
#ifdef WLAN_FEATURE_FILS_SK #ifdef WLAN_FEATURE_FILS_SK
#ifndef FEATURE_CM_ENABLE
QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id, QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id,
struct csr_roam_profile *src_profile) struct csr_roam_profile *src_profile)
{ {
@@ -6116,7 +6117,7 @@ QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id,
return status; return status;
} }
#endif
void sme_send_hlp_ie_info(mac_handle_t mac_handle, uint8_t vdev_id, void sme_send_hlp_ie_info(mac_handle_t mac_handle, uint8_t vdev_id,
struct csr_roam_profile *profile, uint32_t if_addr) struct csr_roam_profile *profile, uint32_t if_addr)
{ {

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2012-2021 The Linux Foundation. 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
@@ -417,11 +417,10 @@ void sme_reset_key(mac_handle_t mac_handle, uint32_t vdev_id)
return; return;
} }
wlan_cm_set_psk_pmk(mac->pdev, vdev_id, NULL, 0);
session = CSR_GET_SESSION(mac, vdev_id); session = CSR_GET_SESSION(mac, vdev_id);
if (!session) if (!session)
return; return;
qdf_mem_zero(&session->psk_pmk, sizeof(session->psk_pmk));
session->pmk_len = 0;
sme_reset_esecckm_info(session); sme_reset_esecckm_info(session);
} }
#endif #endif

View File

@@ -2553,8 +2553,8 @@ static QDF_STATUS csr_init11d_info(struct mac_context *mac, tCsr11dinfo *ps11din
QDF_STATUS status = QDF_STATUS_E_FAILURE; QDF_STATUS status = QDF_STATUS_E_FAILURE;
uint8_t index; uint8_t index;
uint32_t count = 0; uint32_t count = 0;
tSirMacChanInfo *pChanInfo; struct pwr_channel_info *pChanInfo;
tSirMacChanInfo *pChanInfoStart; struct pwr_channel_info *pChanInfoStart;
bool applyConfig = true; bool applyConfig = true;
if (!ps11dinfo) if (!ps11dinfo)
@@ -2587,16 +2587,16 @@ static QDF_STATUS csr_init11d_info(struct mac_context *mac, tCsr11dinfo *ps11din
} }
/* need to add the max power channel list */ /* need to add the max power channel list */
pChanInfo = pChanInfo =
qdf_mem_malloc(sizeof(tSirMacChanInfo) * qdf_mem_malloc(sizeof(struct pwr_channel_info) *
CFG_VALID_CHANNEL_LIST_LEN); CFG_VALID_CHANNEL_LIST_LEN);
if (pChanInfo) { if (pChanInfo) {
pChanInfoStart = pChanInfo; pChanInfoStart = pChanInfo;
for (index = 0; index < ps11dinfo->Channels.numChannels; for (index = 0; index < ps11dinfo->Channels.numChannels;
index++) { index++) {
pChanInfo->first_freq = ps11dinfo->ChnPower[index].first_chan_freq; pChanInfo->first_freq = ps11dinfo->ChnPower[index].first_chan_freq;
pChanInfo->numChannels = pChanInfo->num_chan =
ps11dinfo->ChnPower[index].numChannels; ps11dinfo->ChnPower[index].numChannels;
pChanInfo->maxTxPower = pChanInfo->max_tx_pwr =
ps11dinfo->ChnPower[index].maxtxPower; ps11dinfo->ChnPower[index].maxtxPower;
pChanInfo++; pChanInfo++;
count++; count++;
@@ -2604,7 +2604,7 @@ static QDF_STATUS csr_init11d_info(struct mac_context *mac, tCsr11dinfo *ps11din
if (count) { if (count) {
status = csr_save_to_channel_power2_g_5_g(mac, status = csr_save_to_channel_power2_g_5_g(mac,
count * count *
sizeof(tSirMacChanInfo), sizeof(struct pwr_channel_info),
pChanInfoStart); pChanInfoStart);
} }
qdf_mem_free(pChanInfoStart); qdf_mem_free(pChanInfoStart);
@@ -2640,14 +2640,14 @@ QDF_STATUS csr_init_channel_power_list(struct mac_context *mac,
{ {
uint8_t index; uint8_t index;
uint32_t count = 0; uint32_t count = 0;
tSirMacChanInfo *pChanInfo; struct pwr_channel_info *pChanInfo;
tSirMacChanInfo *pChanInfoStart; struct pwr_channel_info *pChanInfoStart;
if (!ps11dinfo || !mac) if (!ps11dinfo || !mac)
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
pChanInfo = pChanInfo =
qdf_mem_malloc(sizeof(tSirMacChanInfo) * qdf_mem_malloc(sizeof(struct pwr_channel_info) *
CFG_VALID_CHANNEL_LIST_LEN); CFG_VALID_CHANNEL_LIST_LEN);
if (pChanInfo) { if (pChanInfo) {
pChanInfoStart = pChanInfo; pChanInfoStart = pChanInfo;
@@ -2655,9 +2655,9 @@ QDF_STATUS csr_init_channel_power_list(struct mac_context *mac,
for (index = 0; index < ps11dinfo->Channels.numChannels; for (index = 0; index < ps11dinfo->Channels.numChannels;
index++) { index++) {
pChanInfo->first_freq = ps11dinfo->ChnPower[index].first_chan_freq; pChanInfo->first_freq = ps11dinfo->ChnPower[index].first_chan_freq;
pChanInfo->numChannels = pChanInfo->num_chan =
ps11dinfo->ChnPower[index].numChannels; ps11dinfo->ChnPower[index].numChannels;
pChanInfo->maxTxPower = pChanInfo->max_tx_pwr =
ps11dinfo->ChnPower[index].maxtxPower; ps11dinfo->ChnPower[index].maxtxPower;
pChanInfo++; pChanInfo++;
count++; count++;
@@ -2665,7 +2665,7 @@ QDF_STATUS csr_init_channel_power_list(struct mac_context *mac,
if (count) { if (count) {
csr_save_to_channel_power2_g_5_g(mac, csr_save_to_channel_power2_g_5_g(mac,
count * count *
sizeof(tSirMacChanInfo), sizeof(struct pwr_channel_info),
pChanInfoStart); pChanInfoStart);
} }
qdf_mem_free(pChanInfoStart); qdf_mem_free(pChanInfoStart);
@@ -4907,7 +4907,8 @@ static enum csr_join_state csr_roam_join(struct mac_context *mac,
* new Auth type) followed by a new Association. * new Auth type) followed by a new Association.
*/ */
if (csr_is_same_profile(mac, if (csr_is_same_profile(mac,
&pSession->connectedProfile, pProfile)) { &pSession->connectedProfile, pProfile,
sessionId)) {
sme_warn("detect same profile"); sme_warn("detect same profile");
eRoamState = eRoamState =
csr_roam_state_for_same_profile(mac, csr_roam_state_for_same_profile(mac,
@@ -6612,6 +6613,7 @@ static void csr_roam_process_join_res(struct mac_context *mac_ctx,
uint32_t len; uint32_t len;
enum csr_akm_type akm_type; enum csr_akm_type akm_type;
uint8_t mdie_present; uint8_t mdie_present;
struct cm_roam_values_copy cfg;
if (!join_rsp) { if (!join_rsp) {
sme_err("join_rsp is NULL"); sme_err("join_rsp is NULL");
@@ -6786,8 +6788,9 @@ static void csr_roam_process_join_res(struct mac_context *mac_ctx,
&session->connectedInfo); &session->connectedInfo);
akm_type = session->connectedProfile.AuthType; akm_type = session->connectedProfile.AuthType;
mdie_present = wlan_cm_roam_cfg_get_value(mac_ctx->psoc, session_id,
session->connectedProfile.mdid.mdie_present; MOBILITY_DOMAIN, &cfg);
mdie_present = cfg.bool_value;
if (akm_type == eCSR_AUTH_TYPE_FT_SAE && mdie_present) { if (akm_type == eCSR_AUTH_TYPE_FT_SAE && mdie_present) {
sme_debug("Update the MDID in PMK cache for FT-SAE case"); sme_debug("Update the MDID in PMK cache for FT-SAE case");
csr_update_pmk_cache_ft(mac_ctx, csr_update_pmk_cache_ft(mac_ctx,
@@ -7095,6 +7098,7 @@ static bool csr_roam_process_results(struct mac_context *mac_ctx, tSmeCmd *cmd,
return release_cmd; return release_cmd;
} }
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_FILS_SK #ifdef WLAN_FEATURE_FILS_SK
/* /*
* update_profile_fils_info: API to update FILS info from * update_profile_fils_info: API to update FILS info from
@@ -7157,6 +7161,7 @@ void update_profile_fils_info(struct mac_context *mac,
uint8_t vdev_id) uint8_t vdev_id)
{} {}
#endif #endif
#endif
QDF_STATUS csr_roam_copy_profile(struct mac_context *mac, QDF_STATUS csr_roam_copy_profile(struct mac_context *mac,
struct csr_roam_profile *pDstProfile, struct csr_roam_profile *pDstProfile,
@@ -7328,8 +7333,9 @@ QDF_STATUS csr_roam_copy_profile(struct mac_context *mac,
pDstProfile->mdid = pSrcProfile->mdid; pDstProfile->mdid = pSrcProfile->mdid;
pDstProfile->add_ie_params = pSrcProfile->add_ie_params; pDstProfile->add_ie_params = pSrcProfile->add_ie_params;
#ifndef FEATURE_CM_ENABLE
update_profile_fils_info(mac, pDstProfile, pSrcProfile, vdev_id); update_profile_fils_info(mac, pDstProfile, pSrcProfile, vdev_id);
#endif
pDstProfile->beacon_tx_rate = pSrcProfile->beacon_tx_rate; pDstProfile->beacon_tx_rate = pSrcProfile->beacon_tx_rate;
if (pSrcProfile->supported_rates.numRates) { if (pSrcProfile->supported_rates.numRates) {
@@ -7367,6 +7373,7 @@ QDF_STATUS csr_roam_copy_connected_profile(struct mac_context *mac,
QDF_STATUS status = QDF_STATUS_SUCCESS; QDF_STATUS status = QDF_STATUS_SUCCESS;
tCsrRoamConnectedProfile *pSrcProfile = tCsrRoamConnectedProfile *pSrcProfile =
&mac->roam.roamSession[sessionId].connectedProfile; &mac->roam.roamSession[sessionId].connectedProfile;
struct cm_roam_values_copy cfg;
qdf_mem_zero(pDstProfile, sizeof(struct csr_roam_profile)); qdf_mem_zero(pDstProfile, sizeof(struct csr_roam_profile));
@@ -7413,7 +7420,10 @@ QDF_STATUS csr_roam_copy_connected_profile(struct mac_context *mac,
pDstProfile->BSSType = pSrcProfile->BSSType; pDstProfile->BSSType = pSrcProfile->BSSType;
qdf_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys, qdf_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys,
sizeof(pDstProfile->Keys)); sizeof(pDstProfile->Keys));
pDstProfile->mdid = pSrcProfile->mdid; wlan_cm_roam_cfg_get_value(mac->psoc, sessionId,
MOBILITY_DOMAIN, &cfg);
pDstProfile->mdid.mobility_domain = cfg.uint_value;
pDstProfile->mdid.mdie_present = cfg.bool_value;
end: end:
if (!QDF_IS_STATUS_SUCCESS(status)) { if (!QDF_IS_STATUS_SUCCESS(status)) {
csr_release_profile(mac, pDstProfile); csr_release_profile(mac, pDstProfile);
@@ -7583,27 +7593,6 @@ QDF_STATUS csr_dequeue_roam_command(struct mac_context *mac,
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
#ifdef WLAN_FEATURE_FILS_SK
/**
* csr_is_fils_connection() - API to check if FILS connection
* @profile: CSR Roam Profile
*
* Return: true, if fils connection, false otherwise
*/
static bool csr_is_fils_connection(struct csr_roam_profile *profile)
{
if (!profile->fils_con_info)
return false;
return profile->fils_con_info->is_fils_connection;
}
#else
static bool csr_is_fils_connection(struct csr_roam_profile *pProfile)
{
return false;
}
#endif
#ifdef FEATURE_CM_ENABLE #ifdef FEATURE_CM_ENABLE
QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t vdev_id, QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t vdev_id,
struct csr_roam_profile *profile, struct csr_roam_profile *profile,
@@ -7647,6 +7636,27 @@ QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t vdev_id,
} }
#else #else
#ifdef WLAN_FEATURE_FILS_SK
/**
* csr_is_fils_connection() - API to check if FILS connection
* @profile: CSR Roam Profile
*
* Return: true, if fils connection, false otherwise
*/
static bool csr_is_fils_connection(struct csr_roam_profile *profile)
{
if (!profile->fils_con_info)
return false;
return profile->fils_con_info->is_fils_connection;
}
#else
static bool csr_is_fils_connection(struct csr_roam_profile *pProfile)
{
return false;
}
#endif
/** /**
* csr_roam_print_candidate_aps() - print all candidate AP in sorted * csr_roam_print_candidate_aps() - print all candidate AP in sorted
* score. * score.
@@ -8240,6 +8250,7 @@ csr_roam_save_connected_information(struct mac_context *mac,
tDot11fBeaconIEs *pIesTemp = pIes; tDot11fBeaconIEs *pIesTemp = pIes;
struct csr_roam_session *pSession = NULL; struct csr_roam_session *pSession = NULL;
tCsrRoamConnectedProfile *pConnectProfile = NULL; tCsrRoamConnectedProfile *pConnectProfile = NULL;
struct cm_roam_values_copy src_cfg;
pSession = CSR_GET_SESSION(mac, sessionId); pSession = CSR_GET_SESSION(mac, sessionId);
if (!pSession) { if (!pSession) {
@@ -8275,10 +8286,15 @@ csr_roam_save_connected_information(struct mac_context *mac,
sme_err("ERROR: Beacon interval is ZERO"); sme_err("ERROR: Beacon interval is ZERO");
csr_get_bss_id_bss_desc(pSirBssDesc, &pConnectProfile->bssid); csr_get_bss_id_bss_desc(pSirBssDesc, &pConnectProfile->bssid);
if (pSirBssDesc->mdiePresent) { if (pSirBssDesc->mdiePresent) {
pConnectProfile->mdid.mdie_present = 1; src_cfg.bool_value = true;
pConnectProfile->mdid.mobility_domain = src_cfg.uint_value = (pSirBssDesc->mdie[1] << 8) |
(pSirBssDesc->mdie[1] << 8) | (pSirBssDesc->mdie[0]); (pSirBssDesc->mdie[0]);
} else {
src_cfg.bool_value = false;
src_cfg.uint_value = 0;
} }
wlan_cm_roam_cfg_set_value(mac->psoc, sessionId,
MOBILITY_DOMAIN, &src_cfg);
if (!pIesTemp) if (!pIesTemp)
status = csr_get_parsed_bss_description_ies(mac, pSirBssDesc, status = csr_get_parsed_bss_description_ies(mac, pSirBssDesc,
&pIesTemp); &pIesTemp);
@@ -10095,6 +10111,7 @@ static QDF_STATUS csr_roam_issue_set_context_req(struct mac_context *mac_ctx,
WLAN_CRYPTO_KEY_TYPE_GROUP)); WLAN_CRYPTO_KEY_TYPE_GROUP));
} }
#ifndef FEATURE_CM_ENABLE
static enum wlan_crypto_cipher_type static enum wlan_crypto_cipher_type
csr_encr_to_cipher_type(eCsrEncryptionType encr_type) csr_encr_to_cipher_type(eCsrEncryptionType encr_type)
{ {
@@ -10178,6 +10195,7 @@ QDF_STATUS csr_roam_store_fils_key(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_E_NOSUPPORT; return QDF_STATUS_E_NOSUPPORT;
} }
#endif #endif
#endif
QDF_STATUS QDF_STATUS
csr_issue_set_context_req_helper(struct mac_context *mac_ctx, csr_issue_set_context_req_helper(struct mac_context *mac_ctx,
@@ -10187,11 +10205,10 @@ csr_issue_set_context_req_helper(struct mac_context *mac_ctx,
tAniKeyDirection key_direction, uint8_t key_id, tAniKeyDirection key_direction, uint8_t key_id,
uint16_t key_length, uint8_t *key) uint16_t key_length, uint8_t *key)
{ {
#ifndef FEATURE_CM_ENABLE
enum wlan_crypto_cipher_type cipher; enum wlan_crypto_cipher_type cipher;
struct wlan_objmgr_vdev *vdev; struct wlan_objmgr_vdev *vdev;
#ifndef FEATURE_CM_ENABLE
struct set_context_rsp install_key_rsp; struct set_context_rsp install_key_rsp;
#endif
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, session_id, vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, session_id,
WLAN_LEGACY_MAC_ID); WLAN_LEGACY_MAC_ID);
@@ -10208,9 +10225,6 @@ csr_issue_set_context_req_helper(struct mac_context *mac_ctx,
profile->negotiatedMCEncryptionType); profile->negotiatedMCEncryptionType);
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID); wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
/* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE
/* /*
* For open mode authentication, send dummy install key response to * For open mode authentication, send dummy install key response to
* send OBSS scan and QOS event. * send OBSS scan and QOS event.
@@ -12762,6 +12776,7 @@ static ePhyChanBondState csr_get_cb_mode_from_ies(struct mac_context *mac,
return eRet; return eRet;
} }
#ifndef FEATURE_CM_ENABLE
static bool csr_is_encryption_in_list(struct mac_context *mac, static bool csr_is_encryption_in_list(struct mac_context *mac,
tCsrEncryptionList *pCipherList, tCsrEncryptionList *pCipherList,
eCsrEncryptionType encryptionType) eCsrEncryptionType encryptionType)
@@ -12795,10 +12810,12 @@ static bool csr_is_auth_in_list(struct mac_context *mac, tCsrAuthList *pAuthList
bool csr_is_same_profile(struct mac_context *mac, bool csr_is_same_profile(struct mac_context *mac,
tCsrRoamConnectedProfile *pProfile1, tCsrRoamConnectedProfile *pProfile1,
struct csr_roam_profile *pProfile2) struct csr_roam_profile *pProfile2,
uint8_t vdev_id)
{ {
uint32_t i; uint32_t i;
bool fCheck = false; bool fCheck = false;
struct cm_roam_values_copy cfg;
if (!(pProfile1 && pProfile2)) if (!(pProfile1 && pProfile2))
return fCheck; return fCheck;
@@ -12824,8 +12841,10 @@ bool csr_is_same_profile(struct mac_context *mac,
fCheck = false; fCheck = false;
goto exit; goto exit;
} }
if (pProfile1->mdid.mdie_present || pProfile2->mdid.mdie_present) { wlan_cm_roam_cfg_get_value(mac->psoc, vdev_id,
if (pProfile1->mdid.mobility_domain != MOBILITY_DOMAIN, &cfg);
if (cfg.bool_value || pProfile2->mdid.mdie_present) {
if (cfg.uint_value !=
pProfile2->mdid.mobility_domain) { pProfile2->mdid.mobility_domain) {
fCheck = false; fCheck = false;
goto exit; goto exit;
@@ -12837,7 +12856,6 @@ exit:
return fCheck; return fCheck;
} }
#ifndef FEATURE_CM_ENABLE
static bool csr_roam_is_same_profile_keys(struct mac_context *mac, static bool csr_roam_is_same_profile_keys(struct mac_context *mac,
tCsrRoamConnectedProfile *pConnProfile, tCsrRoamConnectedProfile *pConnProfile,
struct csr_roam_profile *pProfile2) struct csr_roam_profile *pProfile2)
@@ -13374,20 +13392,12 @@ void csr_roam_prepare_bss_params(struct mac_context *mac, uint32_t sessionId,
void csr_get_pmk_info(struct mac_context *mac_ctx, uint8_t session_id, void csr_get_pmk_info(struct mac_context *mac_ctx, uint8_t session_id,
tPmkidCacheInfo *pmk_cache) tPmkidCacheInfo *pmk_cache)
{ {
struct csr_roam_session *session = NULL;
if (!mac_ctx) { if (!mac_ctx) {
sme_err("Mac_ctx is NULL"); sme_err("Mac_ctx is NULL");
return; return;
} }
session = CSR_GET_SESSION(mac_ctx, session_id); wlan_cm_get_psk_pmk(mac_ctx->pdev, session_id, pmk_cache->pmk,
if (!session) { &pmk_cache->pmk_len);
sme_err("session %d not found", session_id);
return;
}
qdf_mem_copy(pmk_cache->pmk, session->psk_pmk,
sizeof(session->psk_pmk));
pmk_cache->pmk_len = session->pmk_len;
} }
QDF_STATUS csr_roam_set_psk_pmk(struct mac_context *mac, uint8_t vdev_id, QDF_STATUS csr_roam_set_psk_pmk(struct mac_context *mac, uint8_t vdev_id,
@@ -13409,8 +13419,7 @@ QDF_STATUS csr_roam_set_psk_pmk(struct mac_context *mac, uint8_t vdev_id,
sme_err("vdev is NULL"); sme_err("vdev is NULL");
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
qdf_mem_copy(session->psk_pmk, psk_pmk, sizeof(session->psk_pmk)); wlan_cm_set_psk_pmk(mac->pdev, vdev_id, psk_pmk, pmk_len);
session->pmk_len = pmk_len;
akm = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_KEY_MGMT); akm = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_KEY_MGMT);
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID); wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
@@ -13505,8 +13514,8 @@ csr_store_sae_single_pmk_to_global_cache(struct mac_context *mac,
return; return;
} }
qdf_mem_copy(pmk_info->pmk, session->psk_pmk, session->pmk_len); wlan_cm_get_psk_pmk(mac->pdev, vdev_id, pmk_info->pmk,
pmk_info->pmk_len = session->pmk_len; &pmk_info->pmk_len);
wlan_mlme_update_sae_single_pmk(vdev, pmk_info); wlan_mlme_update_sae_single_pmk(vdev, pmk_info);
@@ -13523,6 +13532,7 @@ void csr_update_pmk_cache_ft(struct mac_context *mac, uint32_t vdev_id,
struct wlan_objmgr_vdev *vdev; struct wlan_objmgr_vdev *vdev;
struct wlan_crypto_pmksa pmksa; struct wlan_crypto_pmksa pmksa;
enum QDF_OPMODE vdev_mode; enum QDF_OPMODE vdev_mode;
struct cm_roam_values_copy src_cfg;
if (!session) { if (!session) {
sme_err("session not found"); sme_err("session not found");
@@ -13553,12 +13563,13 @@ void csr_update_pmk_cache_ft(struct mac_context *mac, uint32_t vdev_id,
*/ */
wlan_vdev_get_bss_peer_mac(vdev, &pmksa.bssid); wlan_vdev_get_bss_peer_mac(vdev, &pmksa.bssid);
wlan_vdev_mlme_get_ssid(vdev, pmksa.ssid, &pmksa.ssid_len); wlan_vdev_mlme_get_ssid(vdev, pmksa.ssid, &pmksa.ssid_len);
wlan_cm_roam_cfg_get_value(mac->psoc, vdev_id,
MOBILITY_DOMAIN, &src_cfg);
sme_debug("copied the BSSID/SSID from session to PMKSA mdie %d", sme_debug("copied the BSSID/SSID from session to PMKSA mdie %d",
session->connectedProfile.mdid.mdie_present); src_cfg.bool_value);
if (session->connectedProfile.mdid.mdie_present) { if (src_cfg.bool_value) {
pmksa.mdid.mdie_present = 1; pmksa.mdid.mdie_present = 1;
pmksa.mdid.mobility_domain = pmksa.mdid.mobility_domain = src_cfg.uint_value;
session->connectedProfile.mdid.mobility_domain;
sme_debug("copied the MDID from session to PMKSA"); sme_debug("copied the MDID from session to PMKSA");
status = wlan_crypto_update_pmk_cache_ft(vdev, &pmksa); status = wlan_crypto_update_pmk_cache_ft(vdev, &pmksa);
@@ -13914,6 +13925,7 @@ static void csr_fill_connected_profile(struct mac_context *mac_ctx,
struct bss_description *bss_desc; struct bss_description *bss_desc;
tDot11fBeaconIEs *bcn_ies; tDot11fBeaconIEs *bcn_ies;
sme_QosAssocInfo assoc_info; sme_QosAssocInfo assoc_info;
struct cm_roam_values_copy src_cfg;
filter = qdf_mem_malloc(sizeof(*filter)); filter = qdf_mem_malloc(sizeof(*filter));
if (!filter) if (!filter)
@@ -13973,10 +13985,15 @@ static void csr_fill_connected_profile(struct mac_context *mac_ctx,
qdf_copy_macaddr(&conn_profile->bssid, &rsp->connect_rsp.bssid); qdf_copy_macaddr(&conn_profile->bssid, &rsp->connect_rsp.bssid);
if (bss_desc->mdiePresent) { if (bss_desc->mdiePresent) {
conn_profile->mdid.mdie_present = 1; src_cfg.bool_value = true;
conn_profile->mdid.mobility_domain = src_cfg.uint_value =
(bss_desc->mdie[1] << 8) | (bss_desc->mdie[0]); (bss_desc->mdie[1] << 8) | (bss_desc->mdie[0]);
} else {
src_cfg.bool_value = false;
src_cfg.uint_value = 0;
} }
wlan_cm_roam_cfg_set_value(mac_ctx->psoc, vdev_id,
MOBILITY_DOMAIN, &src_cfg);
qdf_mem_zero(conn_profile->country_code, WNI_CFG_COUNTRY_CODE_LEN); qdf_mem_zero(conn_profile->country_code, WNI_CFG_COUNTRY_CODE_LEN);
if (bcn_ies->Country.present) { if (bcn_ies->Country.present) {
@@ -14019,6 +14036,7 @@ QDF_STATUS cm_csr_connect_rsp(struct wlan_objmgr_vdev *vdev,
struct mac_context *mac_ctx; struct mac_context *mac_ctx;
uint8_t vdev_id = wlan_vdev_get_id(vdev); uint8_t vdev_id = wlan_vdev_get_id(vdev);
struct csr_roam_session *session; struct csr_roam_session *session;
struct cm_roam_values_copy src_config;
/* /*
* This API is to update legacy struct and should be removed once * This API is to update legacy struct and should be removed once
@@ -14042,6 +14060,9 @@ QDF_STATUS cm_csr_connect_rsp(struct wlan_objmgr_vdev *vdev,
session->nss = rsp->nss; session->nss = rsp->nss;
if (rsp->uapsd_mask) if (rsp->uapsd_mask)
sme_ps_start_uapsd(MAC_HANDLE(mac_ctx), vdev_id); sme_ps_start_uapsd(MAC_HANDLE(mac_ctx), vdev_id);
src_config.uint_value = rsp->uapsd_mask;
wlan_cm_roam_cfg_set_value(mac_ctx->psoc, vdev_id, UAPSD_MASK,
&src_config);
csr_fill_connected_info(mac_ctx, session, rsp); csr_fill_connected_info(mac_ctx, session, rsp);
csr_fill_connected_profile(mac_ctx, session, vdev, rsp); csr_fill_connected_profile(mac_ctx, session, vdev, rsp);
@@ -14391,27 +14412,6 @@ static bool csr_enable_twt(struct mac_context *mac_ctx, tDot11fBeaconIEs *ie)
} }
#endif #endif
#ifdef WLAN_ADAPTIVE_11R
/**
* csr_get_adaptive_11r_enabled() - Function to check if adaptive 11r
* ini is enabled or disabled
* @mac: pointer to mac context
*
* Return: true if adaptive 11r is enabled
*/
static bool
csr_get_adaptive_11r_enabled(struct mac_context *mac)
{
return mac->mlme_cfg->lfr.enable_adaptive_11r;
}
#else
static inline bool
csr_get_adaptive_11r_enabled(struct mac_context *mac)
{
return false;
}
#endif
static QDF_STATUS csr_check_and_validate_6g_ap(struct mac_context *mac_ctx, static QDF_STATUS csr_check_and_validate_6g_ap(struct mac_context *mac_ctx,
struct bss_description *bss, struct bss_description *bss,
struct join_req *csr_join_req, struct join_req *csr_join_req,
@@ -14557,6 +14557,7 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
#ifdef FEATURE_WLAN_ESE #ifdef FEATURE_WLAN_ESE
bool ese_config = false; bool ese_config = false;
#endif #endif
struct cm_roam_values_copy src_config;
if (!pSession) { if (!pSession) {
sme_err("session %d not found", sessionId); sme_err("session %d not found", sessionId);
@@ -14670,7 +14671,9 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
csr_join_req->wps_registration = pProfile->bWPSAssociation; csr_join_req->wps_registration = pProfile->bWPSAssociation;
csr_join_req->force_24ghz_in_ht20 = csr_join_req->force_24ghz_in_ht20 =
pProfile->force_24ghz_in_ht20; pProfile->force_24ghz_in_ht20;
pSession->uapsd_mask = pProfile->uapsd_mask; src_config.uint_value = pProfile->uapsd_mask;
wlan_cm_roam_cfg_set_value(mac->psoc, sessionId, UAPSD_MASK,
&src_config);
status = status =
csr_get_rate_set(mac, pIes, &OpRateSet, csr_get_rate_set(mac, pIes, &OpRateSet,
&ExRateSet); &ExRateSet);
@@ -14713,14 +14716,16 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
} }
if (pBssDescription->adaptive_11r_ap) if (pBssDescription->adaptive_11r_ap)
pSession->is_adaptive_11r_connection = src_config.bool_value =
csr_get_adaptive_11r_enabled(mac); wlan_get_adaptive_11r_enabled(&mac->mlme_cfg->lfr);
else else
pSession->is_adaptive_11r_connection = false; src_config.bool_value = false;
csr_join_req->is_adaptive_11r_connection = csr_join_req->is_adaptive_11r_connection =
pSession->is_adaptive_11r_connection; src_config.bool_value;
wlan_cm_roam_cfg_set_value(mac->psoc, sessionId,
ADAPTIVE_11R_CONNECTION,
&src_config);
/* rsnIE */ /* rsnIE */
if (csr_is_profile_wpa(pProfile)) { if (csr_is_profile_wpa(pProfile)) {
/* Insert the Wpa IE into the join request */ /* Insert the Wpa IE into the join request */
@@ -16380,6 +16385,7 @@ uint8_t *wlan_cm_get_rrm_cap_ie_data(void)
return (uint8_t *)&mac_ctx->rrm.rrmPEContext.rrmEnabledCaps; return (uint8_t *)&mac_ctx->rrm.rrmPEContext.rrmEnabledCaps;
} }
#ifndef FEATURE_CM_ENABLE
#if defined(WLAN_FEATURE_FILS_SK) #if defined(WLAN_FEATURE_FILS_SK)
QDF_STATUS csr_update_fils_config(struct mac_context *mac, uint8_t session_id, QDF_STATUS csr_update_fils_config(struct mac_context *mac, uint8_t session_id,
struct csr_roam_profile *src_profile) struct csr_roam_profile *src_profile)
@@ -16403,6 +16409,7 @@ QDF_STATUS csr_update_fils_config(struct mac_context *mac, uint8_t session_id,
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
#endif #endif
#endif
uint8_t uint8_t
csr_get_roam_enabled_sta_sessionid(struct mac_context *mac_ctx, uint8_t vdev_id) csr_get_roam_enabled_sta_sessionid(struct mac_context *mac_ctx, uint8_t vdev_id)
@@ -16430,18 +16437,28 @@ csr_get_roam_enabled_sta_sessionid(struct mac_context *mac_ctx, uint8_t vdev_id)
#ifdef WLAN_ADAPTIVE_11R #ifdef WLAN_ADAPTIVE_11R
static bool static bool
csr_is_adaptive_11r_roam_supported(struct mac_context *mac_ctx, csr_is_adaptive_11r_roam_supported(struct wlan_objmgr_psoc *psoc,
struct csr_roam_session *session) uint8_t vdev_id)
{ {
if (session->is_adaptive_11r_connection) struct cm_roam_values_copy config;
return mac_ctx->mlme_cfg->lfr.tgt_adaptive_11r_cap; struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return false;
wlan_cm_roam_cfg_get_value(psoc, vdev_id,
ADAPTIVE_11R_CONNECTION,
&config);
if (config.bool_value)
return mlme_obj->cfg.lfr.tgt_adaptive_11r_cap;
return true; return true;
} }
#else #else
static bool static bool
csr_is_adaptive_11r_roam_supported(struct mac_context *mac_ctx, csr_is_adaptive_11r_roam_supported(struct wlan_objmgr_psoc *psoc,
struct csr_roam_session *session) uint8_t vdev_id)
{ {
return true; return true;
@@ -16514,7 +16531,7 @@ wlan_cm_roam_cmd_allowed(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
return QDF_STATUS_E_NOSUPPORT; return QDF_STATUS_E_NOSUPPORT;
} }
if (!csr_is_adaptive_11r_roam_supported(mac_ctx, session)) { if (!csr_is_adaptive_11r_roam_supported(mac_ctx->psoc, vdev_id)) {
sme_info("Adaptive 11r Roaming not suppprted by fw"); sme_info("Adaptive 11r Roaming not suppprted by fw");
return QDF_STATUS_E_NOSUPPORT; return QDF_STATUS_E_NOSUPPORT;
} }
@@ -16609,289 +16626,6 @@ wlan_cm_roam_cmd_allowed(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
#ifdef WLAN_SAE_SINGLE_PMK
static bool
csr_cm_fill_rso_sae_single_pmk_info(struct wlan_objmgr_vdev *vdev,
struct wlan_mlme_psoc_ext_obj *mlme_obj,
struct wlan_rso_11i_params *rso_11i_info)
{
struct wlan_mlme_sae_single_pmk single_pmk;
wlan_mlme_get_sae_single_pmk_info(vdev, &single_pmk);
if (single_pmk.pmk_info.pmk_len && single_pmk.sae_single_pmk_ap &&
mlme_obj->cfg.lfr.sae_single_pmk_feature_enabled) {
mlme_debug("Update pmk with len %d same_pmk_info %d",
single_pmk.pmk_info.pmk_len,
single_pmk.sae_single_pmk_ap);
rso_11i_info->pmk_len = single_pmk.pmk_info.pmk_len;
/* Update sae same pmk info in rso */
qdf_mem_copy(rso_11i_info->psk_pmk, single_pmk.pmk_info.pmk,
rso_11i_info->pmk_len);
rso_11i_info->is_sae_same_pmk = single_pmk.sae_single_pmk_ap;
return true;
}
return false;
}
#else
static inline bool
csr_cm_fill_rso_sae_single_pmk_info(struct wlan_objmgr_vdev *vdev,
struct wlan_mlme_psoc_ext_obj *mlme_obj,
struct wlan_rso_11i_params *rso_11i_info)
{
return false;
}
#endif
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
#define RSN_CAPS_SHIFT 16
#ifdef WLAN_ADAPTIVE_11R
static void
csr_cm_update_rso_adaptive_11r(struct wlan_rso_11r_params *dst,
struct csr_roam_session *session)
{
dst->is_adaptive_11r = session->is_adaptive_11r_connection;
}
#else
static inline void
csr_cm_update_rso_adaptive_11r(struct wlan_rso_11r_params *dst,
struct csr_roam_session *session)
{}
#endif
#ifdef FEATURE_WLAN_ESE
static void
csr_cm_update_rso_ese_info(struct wlan_objmgr_pdev *pdev,
struct wlan_roam_scan_offload_params *rso_config,
uint8_t vdev_id)
{
struct mac_context *mac;
tpCsrNeighborRoamControlInfo roam_info;
mac = sme_get_mac_context();
if (!mac) {
mlme_err("mac_ctx is NULL");
return;
}
roam_info = &mac->roam.neighborRoamInfo[vdev_id];
rso_config->rso_ese_info.is_ese_assoc =
wlan_cm_get_ese_assoc(pdev, vdev_id);
rso_config->rso_11r_info.is_11r_assoc = roam_info->is11rAssoc;
}
#else
static inline void
csr_cm_update_rso_ese_info(struct wlan_objmgr_pdev *pdev,
struct wlan_roam_scan_offload_params *rso_config,
uint8_t vdev_id)
{}
#endif
QDF_STATUS
wlan_cm_roam_scan_offload_fill_lfr3_config(struct wlan_objmgr_vdev *vdev,
struct rso_config *rso_cfg,
struct wlan_roam_scan_offload_params *rso_config,
struct wlan_mlme_psoc_ext_obj *mlme_obj,
uint8_t command, uint32_t *mode)
{
tSirMacCapabilityInfo self_caps;
tSirMacQosInfoStation sta_qos_info;
uint16_t *final_caps_val;
uint8_t *qos_cfg_val, temp_val;
uint32_t pmkid_modes = mlme_obj->cfg.sta.pmkid_modes;
uint32_t val = 0;
uint8_t vdev_id = wlan_vdev_get_id(vdev);
qdf_size_t val_len;
QDF_STATUS status;
uint16_t rsn_caps = 0;
int32_t uccipher, authmode, akm;
struct wlan_objmgr_pdev *pdev;
struct csr_roam_session *session;
struct mac_context *mac;
mac = sme_get_mac_context();
if (!mac) {
sme_err("mac_ctx is NULL");
return QDF_STATUS_E_FAILURE;
}
pdev = wlan_vdev_get_pdev(vdev);
if (!pdev)
return QDF_STATUS_E_INVAL;
session = CSR_GET_SESSION(mac, vdev_id);
if (!session) {
mlme_err("session is null for vdev %d", vdev_id);
return QDF_STATUS_E_FAILURE;
}
rso_config->roam_offload_enabled =
mlme_obj->cfg.lfr.lfr3_roaming_offload;
if (!rso_config->roam_offload_enabled)
return QDF_STATUS_SUCCESS;
/* FILL LFR3 specific roam scan mode TLV parameters */
rso_config->rso_lfr3_params.roam_rssi_cat_gap =
mlme_obj->cfg.lfr.rso_user_config.cat_rssi_offset;
rso_config->rso_lfr3_params.prefer_5ghz =
mlme_obj->cfg.lfr.roam_prefer_5ghz;
rso_config->rso_lfr3_params.select_5ghz_margin =
mlme_obj->cfg.gen.select_5ghz_margin;
rso_config->rso_lfr3_params.reassoc_failure_timeout =
mlme_obj->cfg.timeouts.reassoc_failure_timeout;
rso_config->rso_lfr3_params.ho_delay_for_rx =
mlme_obj->cfg.lfr.ho_delay_for_rx;
rso_config->rso_lfr3_params.roam_retry_count =
mlme_obj->cfg.lfr.roam_preauth_retry_count;
rso_config->rso_lfr3_params.roam_preauth_no_ack_timeout =
mlme_obj->cfg.lfr.roam_preauth_no_ack_timeout;
rso_config->rso_lfr3_params.rct_validity_timer =
mlme_obj->cfg.btm.rct_validity_timer;
rso_config->rso_lfr3_params.disable_self_roam =
!mlme_obj->cfg.lfr.enable_self_bss_roam;
if (!rso_cfg->roam_control_enable &&
mlme_obj->cfg.lfr.roam_force_rssi_trigger)
*mode |= WMI_ROAM_SCAN_MODE_RSSI_CHANGE;
/*
* Self rsn caps aren't sent to firmware, so in case of PMF required,
* the firmware connects to a non PMF AP advertising PMF not required
* in the re-assoc request which violates protocol.
* So send self RSN caps to firmware in roam SCAN offload command to
* let it configure the params in the re-assoc request too.
* Instead of making another infra, send the RSN-CAPS in MSB of
* beacon Caps.
*/
rsn_caps = rso_cfg->rsn_cap;
/* Fill LFR3 specific self capabilities for roam scan mode TLV */
self_caps.ess = 1;
self_caps.ibss = 0;
val = mlme_obj->cfg.wep_params.is_privacy_enabled;
if (val)
self_caps.privacy = 1;
if (mlme_obj->cfg.ht_caps.short_preamble)
self_caps.shortPreamble = 1;
self_caps.pbcc = 0;
self_caps.channelAgility = 0;
if (mlme_obj->cfg.feature_flags.enable_short_slot_time_11g)
self_caps.shortSlotTime = 1;
if (mlme_obj->cfg.gen.enabled_11h)
self_caps.spectrumMgt = 1;
if (mlme_obj->cfg.wmm_params.qos_enabled)
self_caps.qos = 1;
if (mlme_obj->cfg.roam_scoring.apsd_enabled)
self_caps.apsd = 1;
self_caps.rrm = mlme_obj->cfg.rrm_config.rrm_enabled;
val = mlme_obj->cfg.feature_flags.enable_block_ack;
self_caps.delayedBA =
(uint16_t)((val >> WNI_CFG_BLOCK_ACK_ENABLED_DELAYED) & 1);
self_caps.immediateBA =
(uint16_t)((val >> WNI_CFG_BLOCK_ACK_ENABLED_IMMEDIATE) & 1);
final_caps_val = (uint16_t *)&self_caps;
rso_config->rso_lfr3_caps.capability =
(rsn_caps << RSN_CAPS_SHIFT) | ((*final_caps_val) & 0xFFFF);
rso_config->rso_lfr3_caps.ht_caps_info =
*(uint16_t *)&mlme_obj->cfg.ht_caps.ht_cap_info;
rso_config->rso_lfr3_caps.ampdu_param =
*(uint8_t *)&mlme_obj->cfg.ht_caps.ampdu_params;
rso_config->rso_lfr3_caps.ht_ext_cap =
*(uint16_t *)&mlme_obj->cfg.ht_caps.ext_cap_info;
temp_val = (uint8_t)mlme_obj->cfg.vht_caps.vht_cap_info.tx_bf_cap;
rso_config->rso_lfr3_caps.ht_txbf = temp_val & 0xFF;
temp_val = (uint8_t)mlme_obj->cfg.vht_caps.vht_cap_info.as_cap;
rso_config->rso_lfr3_caps.asel_cap = temp_val & 0xFF;
qdf_mem_zero(&sta_qos_info, sizeof(tSirMacQosInfoStation));
sta_qos_info.maxSpLen =
(uint8_t)mlme_obj->cfg.wmm_params.max_sp_length;
sta_qos_info.moreDataAck = 0;
sta_qos_info.qack = 0;
sta_qos_info.acbe_uapsd = SIR_UAPSD_GET(ACBE, session->uapsd_mask);
sta_qos_info.acbk_uapsd = SIR_UAPSD_GET(ACBK, session->uapsd_mask);
sta_qos_info.acvi_uapsd = SIR_UAPSD_GET(ACVI, session->uapsd_mask);
sta_qos_info.acvo_uapsd = SIR_UAPSD_GET(ACVO, session->uapsd_mask);
qos_cfg_val = (uint8_t *)&sta_qos_info;
rso_config->rso_lfr3_caps.qos_caps = (*qos_cfg_val) & 0xFF;
if (rso_config->rso_lfr3_caps.qos_caps)
rso_config->rso_lfr3_caps.qos_enabled = true;
rso_config->rso_lfr3_caps.wmm_caps = 0x4;
val_len = ROAM_OFFLOAD_NUM_MCS_SET;
status =
wlan_mlme_get_cfg_str((uint8_t *)rso_config->rso_lfr3_caps.mcsset,
&mlme_obj->cfg.rates.supported_mcs_set,
&val_len);
if (QDF_IS_STATUS_ERROR(status)) {
mlme_err("Failed to get CFG_SUPPORTED_MCS_SET");
return QDF_STATUS_E_FAILURE;
}
/* Update 11i TLV related Fields */
rso_config->rso_11i_info.roam_key_mgmt_offload_enabled =
mlme_obj->cfg.lfr.lfr3_roaming_offload;
rso_config->rso_11i_info.fw_okc =
(pmkid_modes & CFG_PMKID_MODES_OKC) ? 1 : 0;
rso_config->rso_11i_info.fw_pmksa_cache =
(pmkid_modes & CFG_PMKID_MODES_PMKSA_CACHING) ? 1 : 0;
/* Check whether to send psk_pmk or sae_single pmk info */
if (!csr_cm_fill_rso_sae_single_pmk_info(vdev, mlme_obj,
&rso_config->rso_11i_info)) {
rso_config->rso_11i_info.is_sae_same_pmk = false;
qdf_mem_copy(rso_config->rso_11i_info.psk_pmk, session->psk_pmk,
sizeof(rso_config->rso_11i_info.psk_pmk));
rso_config->rso_11i_info.pmk_len = session->pmk_len;
}
rso_config->rso_11r_info.enable_ft_im_roaming =
mlme_obj->cfg.lfr.enable_ft_im_roaming;
rso_config->rso_11r_info.mdid.mdie_present =
session->connectedProfile.mdid.mdie_present;
rso_config->rso_11r_info.mdid.mobility_domain =
session->connectedProfile.mdid.mobility_domain;
rso_config->rso_11r_info.r0kh_id_length =
session->ftSmeContext.r0kh_id_len;
qdf_mem_copy(rso_config->rso_11r_info.r0kh_id,
session->ftSmeContext.r0kh_id,
session->ftSmeContext.r0kh_id_len);
qdf_mem_copy(rso_config->rso_11r_info.psk_pmk, session->psk_pmk,
session->pmk_len);
rso_config->rso_11r_info.pmk_len = session->pmk_len;
csr_cm_update_rso_adaptive_11r(&rso_config->rso_11r_info,
session);
csr_cm_update_rso_ese_info(pdev, rso_config, vdev_id);
uccipher = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_UCAST_CIPHER);
authmode = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_AUTH_MODE);
akm = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_KEY_MGMT);
rso_config->akm =
cm_crpto_authmode_to_wmi_authmode(authmode, akm, uccipher);
return QDF_STATUS_SUCCESS;
}
#endif
/** /**
* csr_cm_roam_scan_btm_offload() - set roam scan btm offload parameters * csr_cm_roam_scan_btm_offload() - set roam scan btm offload parameters
* @mac_ctx: global mac ctx * @mac_ctx: global mac ctx
@@ -18468,6 +18202,7 @@ void csr_roam_fill_tdls_info(struct mac_context *mac_ctx,
} }
#endif #endif
#ifndef FEATURE_CM_ENABLE
#if defined(WLAN_FEATURE_FILS_SK) && defined(WLAN_FEATURE_ROAM_OFFLOAD) #if defined(WLAN_FEATURE_FILS_SK) && defined(WLAN_FEATURE_ROAM_OFFLOAD)
static void csr_copy_fils_join_rsp_roam_info(struct csr_roam_info *roam_info, static void csr_copy_fils_join_rsp_roam_info(struct csr_roam_info *roam_info,
struct roam_offload_synch_ind *roam_synch_data) struct roam_offload_synch_ind *roam_synch_data)
@@ -18516,6 +18251,7 @@ void csr_update_fils_erp_seq_num(struct csr_roam_profile *roam_profile,
uint16_t erp_next_seq_num) uint16_t erp_next_seq_num)
{} {}
#endif #endif
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
#ifndef FEATURE_CM_ENABLE #ifndef FEATURE_CM_ENABLE
@@ -18756,7 +18492,7 @@ csr_check_and_set_sae_single_pmk_cap(struct mac_context *mac_ctx,
} }
qdf_mem_copy(pmk_info->pmk, pmkid_cache->pmk, qdf_mem_copy(pmk_info->pmk, pmkid_cache->pmk,
session->pmk_len); pmkid_cache->pmk_len);
pmk_info->pmk_len = pmkid_cache->pmk_len; pmk_info->pmk_len = pmkid_cache->pmk_len;
wlan_mlme_update_sae_single_pmk(vdev, pmk_info); wlan_mlme_update_sae_single_pmk(vdev, pmk_info);
@@ -18844,6 +18580,7 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
uint8_t ssid_offset; uint8_t ssid_offset;
enum csr_akm_type akm_type; enum csr_akm_type akm_type;
uint8_t mdie_present; uint8_t mdie_present;
struct cm_roam_values_copy config;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, session_id, vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, session_id,
WLAN_LEGACY_SME_ID); WLAN_LEGACY_SME_ID);
@@ -19197,18 +18934,18 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
QDF_MAC_ADDR_REF(pmkid_cache->BSSID.bytes), QDF_MAC_ADDR_REF(pmkid_cache->BSSID.bytes),
session->pCurRoamProfile->negotiatedAuthType); session->pCurRoamProfile->negotiatedAuthType);
akm_type = session->connectedProfile.AuthType; akm_type = session->connectedProfile.AuthType;
mdie_present = session->connectedProfile.mdid.mdie_present; wlan_cm_roam_cfg_get_value(mac_ctx->psoc, session_id,
MOBILITY_DOMAIN, &config);
mdie_present = config.bool_value;
if (csr_lookup_pmkid_using_bssid(mac_ctx, session, if (csr_lookup_pmkid_using_bssid(mac_ctx, session,
pmkid_cache)) { pmkid_cache)) {
session->pmk_len = pmkid_cache->pmk_len; wlan_cm_set_psk_pmk(mac_ctx->pdev, session_id,
qdf_mem_zero(session->psk_pmk, pmkid_cache->pmk,
sizeof(session->psk_pmk)); pmkid_cache->pmk_len);
qdf_mem_copy(session->psk_pmk, pmkid_cache->pmk,
session->pmk_len);
sme_debug("pmkid found for " QDF_MAC_ADDR_FMT " len %d", sme_debug("pmkid found for " QDF_MAC_ADDR_FMT " len %d",
QDF_MAC_ADDR_REF(pmkid_cache->BSSID.bytes), QDF_MAC_ADDR_REF(pmkid_cache->BSSID.bytes),
(uint32_t)session->pmk_len); pmkid_cache->pmk_len);
} else { } else {
sme_debug("PMKID Not found in cache for " QDF_MAC_ADDR_FMT, sme_debug("PMKID Not found in cache for " QDF_MAC_ADDR_FMT,
QDF_MAC_ADDR_REF(pmkid_cache->BSSID.bytes)); QDF_MAC_ADDR_REF(pmkid_cache->BSSID.bytes));
@@ -19228,17 +18965,11 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
status = QDF_STATUS_E_NOMEM; status = QDF_STATUS_E_NOMEM;
goto end; goto end;
} }
wlan_cm_set_psk_pmk(mac_ctx->pdev, session_id,
session->pmk_len = roam_synch_data->pmk_len;
qdf_mem_zero(session->psk_pmk,
sizeof(session->psk_pmk));
qdf_mem_copy(session->psk_pmk,
roam_synch_data->pmk, roam_synch_data->pmk,
session->pmk_len); roam_synch_data->pmk_len);
qdf_copy_macaddr(&pmksa->bssid, qdf_copy_macaddr(&pmksa->bssid,
&session-> &session->connectedProfile.bssid);
connectedProfile.bssid);
qdf_mem_copy(pmksa->pmkid, qdf_mem_copy(pmksa->pmkid,
roam_synch_data->pmkid, PMKID_LEN); roam_synch_data->pmkid, PMKID_LEN);
qdf_mem_copy(pmksa->pmk, roam_synch_data->pmk, qdf_mem_copy(pmksa->pmk, roam_synch_data->pmk,
@@ -19335,7 +19066,9 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
assoc_info.bss_desc = bss_desc; assoc_info.bss_desc = bss_desc;
roam_info->status_code = eSIR_SME_SUCCESS; roam_info->status_code = eSIR_SME_SUCCESS;
roam_info->reasonCode = eSIR_SME_SUCCESS; roam_info->reasonCode = eSIR_SME_SUCCESS;
assoc_info.uapsd_mask = session->uapsd_mask; wlan_cm_roam_cfg_get_value(mac_ctx->psoc, session_id, UAPSD_MASK,
&config);
assoc_info.uapsd_mask = config.uint_value;
/* This is temp ifdef will be removed in near future */ /* This is temp ifdef will be removed in near future */
#ifndef FEATURE_CM_ENABLE #ifndef FEATURE_CM_ENABLE
mac_ctx->roam.roamSession[session_id].connectState = mac_ctx->roam.roamSession[session_id].connectState =
@@ -19390,8 +19123,10 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
roam_info->update_erp_next_seq_num = roam_info->update_erp_next_seq_num =
roam_synch_data->update_erp_next_seq_num; roam_synch_data->update_erp_next_seq_num;
roam_info->next_erp_seq_num = roam_synch_data->next_erp_seq_num; roam_info->next_erp_seq_num = roam_synch_data->next_erp_seq_num;
#ifndef FEATURE_CM_ENABLE
csr_update_fils_erp_seq_num(session->pCurRoamProfile, csr_update_fils_erp_seq_num(session->pCurRoamProfile,
roam_info->next_erp_seq_num); roam_info->next_erp_seq_num);
#endif
sme_debug("Update ERP Seq Num : %d, Next ERP Seq Num : %d", sme_debug("Update ERP Seq Num : %d, Next ERP Seq Num : %d",
roam_info->update_erp_next_seq_num, roam_info->update_erp_next_seq_num,
roam_info->next_erp_seq_num); roam_info->next_erp_seq_num);
@@ -19408,8 +19143,9 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
roam_info->roam_reason = roam_synch_data->roamReason & roam_info->roam_reason = roam_synch_data->roamReason &
ROAM_REASON_MASK; ROAM_REASON_MASK;
sme_debug("Update roam reason : %d", roam_info->roam_reason); sme_debug("Update roam reason : %d", roam_info->roam_reason);
#ifndef FEATURE_CM_ENABLE
csr_copy_fils_join_rsp_roam_info(roam_info, roam_synch_data); csr_copy_fils_join_rsp_roam_info(roam_info, roam_synch_data);
#endif
csr_roam_call_callback(mac_ctx, session_id, roam_info, 0, csr_roam_call_callback(mac_ctx, session_id, roam_info, 0,
eCSR_ROAM_ASSOCIATION_COMPLETION, eCSR_ROAM_RESULT_ASSOCIATED); eCSR_ROAM_ASSOCIATION_COMPLETION, eCSR_ROAM_RESULT_ASSOCIATED);

View File

@@ -441,10 +441,10 @@ static void csr_purge_channel_power(struct mac_context *mac,
*/ */
QDF_STATUS csr_save_to_channel_power2_g_5_g(struct mac_context *mac, QDF_STATUS csr_save_to_channel_power2_g_5_g(struct mac_context *mac,
uint32_t tableSize, uint32_t tableSize,
tSirMacChanInfo *channelTable) struct pwr_channel_info *channelTable)
{ {
uint32_t i = tableSize / sizeof(tSirMacChanInfo); uint32_t i = tableSize / sizeof(struct pwr_channel_info);
tSirMacChanInfo *pChannelInfo; struct pwr_channel_info *pChannelInfo;
struct csr_channel_powerinfo *pChannelSet; struct csr_channel_powerinfo *pChannelSet;
bool f2GHzInfoFound = false; bool f2GHzInfoFound = false;
bool f2GListPurged = false, f5GListPurged = false; bool f2GListPurged = false, f5GListPurged = false;
@@ -458,7 +458,7 @@ QDF_STATUS csr_save_to_channel_power2_g_5_g(struct mac_context *mac,
continue; continue;
} }
pChannelSet->first_chan_freq = pChannelInfo->first_freq; pChannelSet->first_chan_freq = pChannelInfo->first_freq;
pChannelSet->numChannels = pChannelInfo->numChannels; pChannelSet->numChannels = pChannelInfo->num_chan;
/* /*
* Now set the inter-channel offset based on the frequency band * Now set the inter-channel offset based on the frequency band
* the channel set lies in * the channel set lies in
@@ -479,7 +479,7 @@ QDF_STATUS csr_save_to_channel_power2_g_5_g(struct mac_context *mac,
qdf_mem_free(pChannelSet); qdf_mem_free(pChannelSet);
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
pChannelSet->txPower = pChannelInfo->maxTxPower; pChannelSet->txPower = pChannelInfo->max_tx_pwr;
if (f2GHzInfoFound) { if (f2GHzInfoFound) {
if (!f2GListPurged) { if (!f2GListPurged) {
/* purge previous results if found new */ /* purge previous results if found new */
@@ -743,8 +743,8 @@ void csr_apply_country_information(struct mac_context *mac)
void csr_save_channel_power_for_band(struct mac_context *mac, bool fill_5f) void csr_save_channel_power_for_band(struct mac_context *mac, bool fill_5f)
{ {
uint32_t idx, count = 0; uint32_t idx, count = 0;
tSirMacChanInfo *chan_info; struct pwr_channel_info *chan_info;
tSirMacChanInfo *ch_info_start; struct pwr_channel_info *ch_info_start;
int32_t max_ch_idx; int32_t max_ch_idx;
bool tmp_bool; bool tmp_bool;
uint32_t ch_freq = 0; uint32_t ch_freq = 0;
@@ -755,7 +755,7 @@ void csr_save_channel_power_for_band(struct mac_context *mac, bool fill_5f)
mac->scan.base_channels.numChannels : mac->scan.base_channels.numChannels :
CFG_VALID_CHANNEL_LIST_LEN; CFG_VALID_CHANNEL_LIST_LEN;
chan_info = qdf_mem_malloc(sizeof(tSirMacChanInfo) * chan_info = qdf_mem_malloc(sizeof(struct pwr_channel_info) *
CFG_VALID_CHANNEL_LIST_LEN); CFG_VALID_CHANNEL_LIST_LEN);
if (!chan_info) if (!chan_info)
return; return;
@@ -775,15 +775,16 @@ void csr_save_channel_power_for_band(struct mac_context *mac, bool fill_5f)
chan_info->first_freq = chan_info->first_freq =
mac->scan.defaultPowerTable[idx].center_freq; mac->scan.defaultPowerTable[idx].center_freq;
chan_info->numChannels = 1; chan_info->num_chan = 1;
chan_info->maxTxPower = chan_info->max_tx_pwr =
mac->scan.defaultPowerTable[idx].tx_power; mac->scan.defaultPowerTable[idx].tx_power;
chan_info++; chan_info++;
count++; count++;
} }
if (count) { if (count) {
csr_save_to_channel_power2_g_5_g(mac, csr_save_to_channel_power2_g_5_g(mac,
count * sizeof(tSirMacChanInfo), ch_info_start); count * sizeof(struct pwr_channel_info),
ch_info_start);
} }
qdf_mem_free(ch_info_start); qdf_mem_free(ch_info_start);
} }
@@ -1446,16 +1447,16 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
uint32_t cbLen = 0, dataLen, tmp_len; uint32_t cbLen = 0, dataLen, tmp_len;
struct csr_channel_powerinfo *ch_set; struct csr_channel_powerinfo *ch_set;
uint32_t idx, count = 0; uint32_t idx, count = 0;
tSirMacChanInfo *ch_pwr_set; struct pwr_channel_info *ch_pwr_set;
uint8_t *p_buf = NULL; uint8_t *p_buf = NULL;
/* allocate maximum space for all channels */ /* allocate maximum space for all channels */
dataLen = CFG_VALID_CHANNEL_LIST_LEN * sizeof(tSirMacChanInfo); dataLen = CFG_VALID_CHANNEL_LIST_LEN * sizeof(struct pwr_channel_info);
p_buf = qdf_mem_malloc(dataLen); p_buf = qdf_mem_malloc(dataLen);
if (!p_buf) if (!p_buf)
return; return;
ch_pwr_set = (tSirMacChanInfo *)(p_buf); ch_pwr_set = (struct pwr_channel_info *)(p_buf);
csr_ll_lock(pList); csr_ll_lock(pList);
pEntry = csr_ll_peek_head(pList, LL_ACCESS_NOLOCK); pEntry = csr_ll_peek_head(pList, LL_ACCESS_NOLOCK);
/* /*
@@ -1473,7 +1474,7 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
* for the triplets that 11d advertises. * for the triplets that 11d advertises.
*/ */
tmp_len = cbLen + (ch_set->numChannels * tmp_len = cbLen + (ch_set->numChannels *
sizeof(tSirMacChanInfo)); sizeof(struct pwr_channel_info));
if (tmp_len >= dataLen) { if (tmp_len >= dataLen) {
/* /*
* expanding this entry will overflow our * expanding this entry will overflow our
@@ -1490,14 +1491,14 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
for (idx = 0; idx < ch_set->numChannels; idx++) { for (idx = 0; idx < ch_set->numChannels; idx++) {
ch_pwr_set->first_freq = ch_pwr_set->first_freq =
ch_set->first_chan_freq; ch_set->first_chan_freq;
ch_pwr_set->numChannels = 1; ch_pwr_set->num_chan = 1;
ch_pwr_set->maxTxPower = ch_set->txPower; ch_pwr_set->max_tx_pwr = ch_set->txPower;
cbLen += sizeof(tSirMacChanInfo); cbLen += sizeof(struct pwr_channel_info);
ch_pwr_set++; ch_pwr_set++;
count++; count++;
} }
} else { } else {
if (cbLen + sizeof(tSirMacChanInfo) >= dataLen) { if (cbLen + sizeof(struct pwr_channel_info) >= dataLen) {
/* this entry will overflow our allocation */ /* this entry will overflow our allocation */
sme_err( sme_err(
"Buffer overflow, start freq %d, num %d, offset %d", "Buffer overflow, start freq %d, num %d, offset %d",
@@ -1507,9 +1508,9 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
break; break;
} }
ch_pwr_set->first_freq = ch_set->first_chan_freq; ch_pwr_set->first_freq = ch_set->first_chan_freq;
ch_pwr_set->numChannels = ch_set->numChannels; ch_pwr_set->num_chan = ch_set->numChannels;
ch_pwr_set->maxTxPower = ch_set->txPower; ch_pwr_set->max_tx_pwr = ch_set->txPower;
cbLen += sizeof(tSirMacChanInfo); cbLen += sizeof(struct pwr_channel_info);
ch_pwr_set++; ch_pwr_set++;
count++; count++;
} }
@@ -1518,7 +1519,7 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
csr_ll_unlock(pList); csr_ll_unlock(pList);
if (band == BAND_2G) { if (band == BAND_2G) {
mac->mlme_cfg->power.max_tx_power_24.len = mac->mlme_cfg->power.max_tx_power_24.len =
sizeof(tSirMacChanInfo) * count; sizeof(struct pwr_channel_info) * count;
if (mac->mlme_cfg->power.max_tx_power_24.len > if (mac->mlme_cfg->power.max_tx_power_24.len >
CFG_MAX_TX_POWER_2_4_LEN) CFG_MAX_TX_POWER_2_4_LEN)
mac->mlme_cfg->power.max_tx_power_24.len = mac->mlme_cfg->power.max_tx_power_24.len =
@@ -1529,7 +1530,7 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
} }
if (band == BAND_5G) { if (band == BAND_5G) {
mac->mlme_cfg->power.max_tx_power_5.len = mac->mlme_cfg->power.max_tx_power_5.len =
sizeof(tSirMacChanInfo) * count; sizeof(struct pwr_channel_info) * count;
if (mac->mlme_cfg->power.max_tx_power_5.len > if (mac->mlme_cfg->power.max_tx_power_5.len >
CFG_MAX_TX_POWER_5_LEN) CFG_MAX_TX_POWER_5_LEN)
mac->mlme_cfg->power.max_tx_power_5.len = mac->mlme_cfg->power.max_tx_power_5.len =

View File

@@ -141,6 +141,7 @@ void csr_neighbor_roam_process_scan_results(struct mac_context *mac_ctx,
uint32_t bss_chan_freq; uint32_t bss_chan_freq;
uint8_t num_candidates = 0; uint8_t num_candidates = 0;
uint8_t num_dropped = 0; uint8_t num_dropped = 0;
struct cm_roam_values_copy config;
/* /*
* first iteration of scan list should consider * first iteration of scan list should consider
* age constraint for candidates * age constraint for candidates
@@ -227,8 +228,10 @@ void csr_neighbor_roam_process_scan_results(struct mac_context *mac_ctx,
"SKIP-not a candidate AP for OS requested roam"); "SKIP-not a candidate AP for OS requested roam");
continue; continue;
} }
wlan_cm_roam_cfg_get_value(mac_ctx->psoc, sessionid,
if ((n_roam_info->is11rAssoc) && IS_11R_CONNECTION,
&config);
if ((config.bool_value) &&
(!csr_neighbor_roam_is_preauth_candidate(mac_ctx, (!csr_neighbor_roam_is_preauth_candidate(mac_ctx,
sessionid, descr->bssId))) { sessionid, descr->bssId))) {
sme_err("BSSID in preauth fail list. Ignore"); sme_err("BSSID in preauth fail list. Ignore");
@@ -606,12 +609,15 @@ csr_neighbor_roam_get_handoff_ap_info(struct mac_context *mac,
tpCsrNeighborRoamControlInfo ngbr_roam_info = tpCsrNeighborRoamControlInfo ngbr_roam_info =
&mac->roam.neighborRoamInfo[session_id]; &mac->roam.neighborRoamInfo[session_id];
tpCsrNeighborRoamBSSInfo bss_node = NULL; tpCsrNeighborRoamBSSInfo bss_node = NULL;
struct cm_roam_values_copy config;
if (!hand_off_node) { if (!hand_off_node) {
QDF_ASSERT(hand_off_node); QDF_ASSERT(hand_off_node);
return false; return false;
} }
if (ngbr_roam_info->is11rAssoc) { wlan_cm_roam_cfg_get_value(mac->psoc, session_id, IS_11R_CONNECTION,
&config);
if (config.bool_value) {
/* Always the BSS info in the head is the handoff candidate */ /* Always the BSS info in the head is the handoff candidate */
bss_node = csr_neighbor_roam_next_roamable_ap( bss_node = csr_neighbor_roam_next_roamable_ap(
mac, mac,

View File

@@ -253,8 +253,6 @@ QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId,
uint32_t roamId); uint32_t roamId);
QDF_STATUS csr_roam_issue_stop_bss(struct mac_context *mac, uint32_t sessionId, QDF_STATUS csr_roam_issue_stop_bss(struct mac_context *mac, uint32_t sessionId,
enum csr_roam_substate NewSubstate); enum csr_roam_substate NewSubstate);
bool csr_is_same_profile(struct mac_context *mac, tCsrRoamConnectedProfile
*pProfile1, struct csr_roam_profile *pProfile2);
bool csr_is_roam_command_waiting_for_session(struct mac_context *mac, bool csr_is_roam_command_waiting_for_session(struct mac_context *mac,
uint32_t sessionId); uint32_t sessionId);
eRoamCmdStatus csr_get_roam_complete_status(struct mac_context *mac, eRoamCmdStatus csr_get_roam_complete_status(struct mac_context *mac,
@@ -270,6 +268,9 @@ void csr_roam_remove_duplicate_command(struct mac_context *mac, uint32_t session
enum csr_roam_reason eRoamReason); enum csr_roam_reason eRoamReason);
#ifndef FEATURE_CM_ENABLE #ifndef FEATURE_CM_ENABLE
bool csr_is_same_profile(struct mac_context *mac, tCsrRoamConnectedProfile
*pProfile1, struct csr_roam_profile *pProfile2,
uint8_t vdev_id);
QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId, QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
struct bss_description *pBssDescription, struct bss_description *pBssDescription,
struct csr_roam_profile *pProfile, struct csr_roam_profile *pProfile,
@@ -365,8 +366,8 @@ void csr_roam_completion(struct mac_context *mac, uint32_t sessionId,
void csr_roam_cancel_roaming(struct mac_context *mac, uint32_t sessionId); void csr_roam_cancel_roaming(struct mac_context *mac, uint32_t sessionId);
void csr_apply_channel_power_info_wrapper(struct mac_context *mac); void csr_apply_channel_power_info_wrapper(struct mac_context *mac);
QDF_STATUS csr_save_to_channel_power2_g_5_g(struct mac_context *mac, QDF_STATUS csr_save_to_channel_power2_g_5_g(struct mac_context *mac,
uint32_t tableSize, tSirMacChanInfo uint32_t tableSize,
*channelTable); struct pwr_channel_info *channelTable);
/* /*
* csr_prepare_vdev_delete() - CSR api to delete vdev * csr_prepare_vdev_delete() - CSR api to delete vdev

View File

@@ -416,15 +416,14 @@ csr_neighbor_roam_get_scan_filter_from_profile(struct mac_context *mac,
filter->num_of_channels * filter->num_of_channels *
sizeof(filter->chan_freq_list[0])); sizeof(filter->chan_freq_list[0]));
} }
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
if (nbr_roam_info->is11rAssoc) if (rso_cfg->is_11r_assoc)
/* /*
* MDIE should be added as a part of profile. This should be * MDIE should be added as a part of profile. This should be
* added as a part of filter as well * added as a part of filter as well
*/ */
filter->mobility_domain = profile->mdid.mobility_domain; filter->mobility_domain = rso_cfg->mdid.mobility_domain;
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
filter->enable_adaptive_11r = filter->enable_adaptive_11r =
wlan_mlme_adaptive_11r_enabled(mac->psoc); wlan_mlme_adaptive_11r_enabled(mac->psoc);
csr_update_scan_filter_dot11mode(mac, filter); csr_update_scan_filter_dot11mode(mac, filter);
@@ -745,6 +744,7 @@ static void csr_neighbor_roam_info_ctx_init(struct mac_context *mac,
struct cm_roam_values_copy src_cfg; struct cm_roam_values_copy src_cfg;
struct csr_roam_session *session = &mac->roam.roamSession[session_id]; struct csr_roam_session *session = &mac->roam.roamSession[session_id];
int init_ft_flag = false; int init_ft_flag = false;
bool mdie_present;
wlan_cm_init_occupied_ch_freq_list(mac->pdev, mac->psoc, session_id); wlan_cm_init_occupied_ch_freq_list(mac->pdev, mac->psoc, session_id);
csr_neighbor_roam_state_transition(mac, csr_neighbor_roam_state_transition(mac,
@@ -774,17 +774,19 @@ static void csr_neighbor_roam_info_ctx_init(struct mac_context *mac,
*/ */
csr_neighbor_roam_free_roamable_bss_list(mac, csr_neighbor_roam_free_roamable_bss_list(mac,
&ngbr_roam_info->FTRoamInfo.preAuthDoneList); &ngbr_roam_info->FTRoamInfo.preAuthDoneList);
wlan_cm_roam_cfg_get_value(mac->psoc, session_id,
MOBILITY_DOMAIN, &src_cfg);
mdie_present = src_cfg.bool_value;
/* Based on the auth scheme tell if we are 11r */ /* Based on the auth scheme tell if we are 11r */
if (csr_is_auth_type11r if (csr_is_auth_type11r
(mac, session->connectedProfile.AuthType, (mac, session->connectedProfile.AuthType, mdie_present)) {
session->connectedProfile.mdid.mdie_present)) {
if (mac->mlme_cfg->lfr.fast_transition_enabled) if (mac->mlme_cfg->lfr.fast_transition_enabled)
init_ft_flag = true; init_ft_flag = true;
ngbr_roam_info->is11rAssoc = true; src_cfg.bool_value = true;
} else } else
ngbr_roam_info->is11rAssoc = false; src_cfg.bool_value = false;
wlan_cm_roam_cfg_set_value(mac->psoc, session_id,
IS_11R_CONNECTION, &src_cfg);
#ifdef FEATURE_WLAN_ESE #ifdef FEATURE_WLAN_ESE
/* Based on the auth scheme tell if we are 11r */ /* Based on the auth scheme tell if we are 11r */
if (wlan_cm_get_ese_assoc(mac->pdev, session_id)) { if (wlan_cm_get_ese_assoc(mac->pdev, session_id)) {
@@ -948,8 +950,6 @@ static QDF_STATUS csr_neighbor_roam_init11r_assoc_info(struct mac_context *mac)
pNeighborRoamInfo = &mac->roam.neighborRoamInfo[i]; pNeighborRoamInfo = &mac->roam.neighborRoamInfo[i];
pFTRoamInfo = &pNeighborRoamInfo->FTRoamInfo; pFTRoamInfo = &pNeighborRoamInfo->FTRoamInfo;
pNeighborRoamInfo->is11rAssoc = false;
pFTRoamInfo->neighborReportTimeout = pFTRoamInfo->neighborReportTimeout =
CSR_NEIGHBOR_ROAM_REPORT_QUERY_TIMEOUT; CSR_NEIGHBOR_ROAM_REPORT_QUERY_TIMEOUT;
pFTRoamInfo->neighborRptPending = false; pFTRoamInfo->neighborRptPending = false;
@@ -1056,7 +1056,11 @@ void csr_neighbor_roam_close(struct mac_context *mac, uint8_t sessionId)
*/ */
bool csr_neighbor_roam_is11r_assoc(struct mac_context *mac_ctx, uint8_t session_id) bool csr_neighbor_roam_is11r_assoc(struct mac_context *mac_ctx, uint8_t session_id)
{ {
return mac_ctx->roam.neighborRoamInfo[session_id].is11rAssoc; struct cm_roam_values_copy config;
wlan_cm_roam_cfg_get_value(mac_ctx->psoc, session_id, IS_11R_CONNECTION,
&config);
return config.bool_value;
} }
/* /*

View File

@@ -166,10 +166,13 @@ void csr_neighbor_roam_purge_preauth_failed_list(struct mac_context *mac_ctx)
void csr_neighbor_roam_reset_preauth_control_info(struct mac_context *mac_ctx, void csr_neighbor_roam_reset_preauth_control_info(struct mac_context *mac_ctx,
uint8_t session_id) uint8_t session_id)
{ {
struct cm_roam_values_copy src_cfg;
tpCsrNeighborRoamControlInfo neigh_roam_info = tpCsrNeighborRoamControlInfo neigh_roam_info =
&mac_ctx->roam.neighborRoamInfo[session_id]; &mac_ctx->roam.neighborRoamInfo[session_id];
neigh_roam_info->is11rAssoc = false; src_cfg.bool_value = false;
wlan_cm_roam_cfg_set_value(mac_ctx->psoc, session_id,
IS_11R_CONNECTION, &src_cfg);
csr_neighbor_roam_purge_preauth_failed_list(mac_ctx); csr_neighbor_roam_purge_preauth_failed_list(mac_ctx);
neigh_roam_info->FTRoamInfo.preauthRspPending = false; neigh_roam_info->FTRoamInfo.preauthRspPending = false;

View File

@@ -2681,28 +2681,6 @@ bool csr_lookup_fils_pmkid(struct mac_context *mac,
return true; return true;
} }
/**
* csr_update_session_pmk() - Update the pmk len and pmk in the roam session
* @session: pointer to the CSR Roam session
* @pmkid_cache: pointer to the pmkid cache
*
* Return: None
*/
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
static void csr_update_session_pmk(struct csr_roam_session *session,
struct wlan_crypto_pmksa *pmksa)
{
session->pmk_len = pmksa->pmk_len;
qdf_mem_zero(session->psk_pmk, sizeof(session->psk_pmk));
qdf_mem_copy(session->psk_pmk, pmksa->pmk, session->pmk_len);
}
#else
static inline void csr_update_session_pmk(struct csr_roam_session *session,
struct wlan_crypto_pmksa *pmksa)
{
}
#endif
#ifdef WLAN_FEATURE_FILS_SK #ifdef WLAN_FEATURE_FILS_SK
/** /**
* csr_update_pmksa_to_profile() - update pmk and pmkid to profile which will be * csr_update_pmksa_to_profile() - update pmk and pmkid to profile which will be
@@ -2744,7 +2722,6 @@ uint8_t csr_construct_rsn_ie(struct mac_context *mac, uint32_t sessionId,
uint16_t rsn_cap = 0, self_rsn_cap; uint16_t rsn_cap = 0, self_rsn_cap;
int32_t rsn_val; int32_t rsn_val;
struct wlan_crypto_pmksa pmksa, *pmksa_peer; struct wlan_crypto_pmksa pmksa, *pmksa_peer;
struct csr_roam_session *session = &mac->roam.roamSession[sessionId];
struct rso_config *rso_cfg; struct rso_config *rso_cfg;
if (!local_ap_ie && if (!local_ap_ie &&
@@ -2821,7 +2798,8 @@ uint8_t csr_construct_rsn_ie(struct mac_context *mac, uint32_t sessionId,
* will be sent to the FW during RSO. * will be sent to the FW during RSO.
*/ */
if (pmksa_peer) { if (pmksa_peer) {
csr_update_session_pmk(session, pmksa_peer); wlan_cm_set_psk_pmk(mac->pdev, sessionId,
pmksa_peer->pmk, pmksa_peer->pmk_len);
csr_update_pmksa_to_profile(pProfile, pmksa_peer); csr_update_pmksa_to_profile(pProfile, pmksa_peer);
} }
rso_cfg = wlan_cm_get_rso_config(vdev); rso_cfg = wlan_cm_get_rso_config(vdev);
@@ -3467,6 +3445,7 @@ bool csr_rates_is_dot11_rate_supported(struct mac_context *mac_ctx, uint8_t rate
return csr_is_aggregate_rate_supported(mac_ctx, n); return csr_is_aggregate_rate_supported(mac_ctx, n);
} }
#ifndef FEATURE_CM_ENABLE
#ifdef WLAN_FEATURE_FILS_SK #ifdef WLAN_FEATURE_FILS_SK
static inline static inline
void csr_free_fils_profile_info(struct mac_context *mac, void csr_free_fils_profile_info(struct mac_context *mac,
@@ -3488,6 +3467,7 @@ static inline void csr_free_fils_profile_info(struct mac_context *mac,
struct csr_roam_profile *profile) struct csr_roam_profile *profile)
{ } { }
#endif #endif
#endif
void csr_release_profile(struct mac_context *mac, void csr_release_profile(struct mac_context *mac,
struct csr_roam_profile *pProfile) struct csr_roam_profile *pProfile)
@@ -3529,7 +3509,9 @@ void csr_release_profile(struct mac_context *mac,
qdf_mem_free(pProfile->ChannelInfo.freq_list); qdf_mem_free(pProfile->ChannelInfo.freq_list);
pProfile->ChannelInfo.freq_list = NULL; pProfile->ChannelInfo.freq_list = NULL;
} }
#ifndef FEATURE_CM_ENABLE
csr_free_fils_profile_info(mac, pProfile); csr_free_fils_profile_info(mac, pProfile);
#endif
qdf_mem_zero(pProfile, sizeof(struct csr_roam_profile)); qdf_mem_zero(pProfile, sizeof(struct csr_roam_profile));
} }
} }