diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index dc40c4940af1..e3cae446be31 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1884,6 +1884,7 @@ static void mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc, cfg_get(psoc, CFG_POST_INACTIVITY_ROAM_SCAN_PERIOD); lfr->fw_akm_bitmap = 0; lfr->enable_ft_im_roaming = cfg_get(psoc, CFG_FT_IM_ROAMING); + lfr->enable_ft_over_ds = !ENABLE_FT_OVER_DS; mlme_init_roam_offload_cfg(psoc, lfr); mlme_init_ese_cfg(psoc, lfr); diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index 12e7571b21a9..020a96b617cf 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -2707,6 +2707,15 @@ wlan_mlme_get_roaming_offload(struct wlan_objmgr_psoc *psoc, } #endif +/** + * wlan_mlme_set_ft_over_ds() - Update ft_over_ds + * @psoc: pointer to psoc object + * @ft_over_ds_enable: value of ft_over_ds + * + * Return: QDF_STATUS + */ +QDF_STATUS wlan_mlme_set_ft_over_ds(struct wlan_objmgr_psoc *psoc, + uint8_t ft_over_ds_enable); /** * wlan_mlme_get_dfs_chan_ageout_time() - Get the DFS Channel ageout time * @psoc: pointer to psoc object diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 3b5d1a59dbf6..15ca89798211 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1720,6 +1720,7 @@ struct fw_scan_channels { * @saved_freq_list: Valid channel list * @sae_single_pmk_feature_enabled: Contains value of ini * sae_single_pmk_feature_enabled + * @enable_ft_over_ds: Flag to enable/disable FT-over-DS */ struct wlan_mlme_lfr_cfg { bool mawc_roam_enabled; @@ -1837,6 +1838,7 @@ struct wlan_mlme_lfr_cfg { #if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD) bool sae_single_pmk_feature_enabled; #endif + bool enable_ft_over_ds; }; /** diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h index 99f113f2acd3..8a6e74c896cb 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -4203,6 +4204,21 @@ QDF_STATUS ucfg_mlme_set_user_ps(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, return mlme_set_user_ps(psoc, vdev_id, ps_enable); } +/** + * ucfg_mlme_set_ft_over_ds() - update ft_over_ds status with user configured + * value + * @psoc: pointer to psoc object + * @ft_over_ds_enable: value of ft_over_ds + * + * Return: QDF Status + */ +static inline QDF_STATUS +ucfg_mlme_set_ft_over_ds(struct wlan_objmgr_psoc *psoc, + uint8_t ft_over_ds_enable) +{ + return wlan_mlme_set_ft_over_ds(psoc, ft_over_ds_enable); +} + /** * ucfg_mlme_get_user_ps() - Get user PS flag * @psoc: pointer to psoc object diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index d488f37ccd65..ee1347cda4d7 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -4244,6 +4244,20 @@ wlan_mlme_get_idle_roam_band(struct wlan_objmgr_psoc *psoc, uint32_t *val) } #endif +QDF_STATUS +wlan_mlme_set_ft_over_ds(struct wlan_objmgr_psoc *psoc, + uint8_t ft_over_ds_enable) +{ + struct wlan_mlme_psoc_ext_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_ext_obj(psoc); + if (!mlme_obj) + return QDF_STATUS_E_FAILURE; + + mlme_obj->cfg.lfr.enable_ft_over_ds = ft_over_ds_enable; + return QDF_STATUS_SUCCESS; +} + QDF_STATUS wlan_mlme_get_dfs_chan_ageout_time(struct wlan_objmgr_psoc *psoc, uint8_t *dfs_chan_ageout_time) diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h index fbf7357a560f..9c906f14abdb 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h @@ -98,6 +98,8 @@ #define DEFAULT_ROAM_SCAN_SCHEME_BITMAP 0 #define ROAM_MAX_CFG_VALUE 0xffffffff +#define ENABLE_FT_OVER_DS 1 /* enable ft_over_ds */ + /* * Currently roam score delta value is sent for 2 triggers and min rssi * values are sent for 3 triggers @@ -859,6 +861,7 @@ struct wlan_rso_11i_params { * @rokh_id_length: r0kh id length * @rokh_id: r0kh id * @mdid: mobility domain info + * @enable_ft_over_ds: Flag to enable/disable FT-over-DS */ struct wlan_rso_11r_params { bool is_11r_assoc; @@ -869,6 +872,7 @@ struct wlan_rso_11r_params { uint32_t r0kh_id_length; uint8_t r0kh_id[WMI_ROAM_R0KH_ID_MAX_LEN]; struct mobility_domain_info mdid; + bool enable_ft_over_ds; }; /** diff --git a/components/wmi/src/wmi_unified_roam_tlv.c b/components/wmi/src/wmi_unified_roam_tlv.c index 4d09037a3fe9..287fa9c77d8d 100644 --- a/components/wmi/src/wmi_unified_roam_tlv.c +++ b/components/wmi/src/wmi_unified_roam_tlv.c @@ -2146,6 +2146,8 @@ wmi_fill_rso_tlvs(wmi_unified_t wmi_handle, uint8_t *buf, src_11r_info->is_adaptive_11r; roam_offload_11r->ft_im_for_deauth = src_11r_info->enable_ft_im_roaming; + roam_offload_11r->ft_over_ds_enable = + src_11r_info->enable_ft_over_ds; if (akm == WMI_AUTH_OPEN) { /* diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index f1d379f90811..a5d6830b962e 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -7157,7 +7157,7 @@ const struct nla_policy wlan_hdd_wifi_config_policy[ [QCA_WLAN_VENDOR_ATTR_CONFIG_NUM_RX_CHAINS] = {.type = NLA_U8 }, [QCA_WLAN_VENDOR_ATTR_CONFIG_TX_NSS] = {.type = NLA_U8 }, [QCA_WLAN_VENDOR_ATTR_CONFIG_RX_NSS] = {.type = NLA_U8 }, - + [QCA_WLAN_VENDOR_ATTR_CONFIG_FT_OVER_DS] = {.type = NLA_U8 }, }; static const struct nla_policy @@ -7592,6 +7592,35 @@ static int hdd_set_roam_reason_vsie_status(struct hdd_adapter *adapter, } #endif +static int hdd_set_ft_over_ds(struct hdd_adapter *adapter, + const struct nlattr *attr) +{ + uint8_t ft_over_ds_enable; + QDF_STATUS status = QDF_STATUS_SUCCESS; + struct hdd_context *hdd_ctx = NULL; + + hdd_ctx = WLAN_HDD_GET_CTX(adapter); + if (!hdd_ctx) { + hdd_err("hdd_ctx failure"); + return -EINVAL; + } + + ft_over_ds_enable = nla_get_u8(attr); + + if (ft_over_ds_enable != 0 && ft_over_ds_enable != 1) { + hdd_err_rl("Invalid ft_over_ds_enable: %d", ft_over_ds_enable); + return -EINVAL; + } + + status = ucfg_mlme_set_ft_over_ds(hdd_ctx->psoc, ft_over_ds_enable); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("set ft_over_ds failed"); + return -EINVAL; + } + + return status; +} + static int hdd_config_ldpc(struct hdd_adapter *adapter, const struct nlattr *attr) { @@ -9019,6 +9048,8 @@ static const struct independent_setters independent_setters[] = { hdd_config_power}, {QCA_WLAN_VENDOR_ATTR_CONFIG_UDP_QOS_UPGRADE, hdd_config_udp_qos_upgrade_threshold}, + {QCA_WLAN_VENDOR_ATTR_CONFIG_FT_OVER_DS, + hdd_set_ft_over_ds}, }; #ifdef WLAN_FEATURE_ELNA diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 7a13f642836d..0b8ee9124462 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -18658,6 +18658,9 @@ static QDF_STATUS csr_cm_roam_scan_offload_fill_lfr3_config( csr_cm_update_rso_adaptive_11r(&rso_config->rso_11r_info, session); + rso_config->rso_11r_info.enable_ft_over_ds = + mac->mlme_cfg->lfr.enable_ft_over_ds; + csr_cm_update_rso_ese_info(mac, rso_config, roam_info, session); akm = mac->roam.roamSession[vdev_id].connectedProfile.AuthType;