diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index 929a936c5d14..a283dfd3c622 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -1822,6 +1822,7 @@ static void mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc,
lfr->roam_preauth_retry_count =
cfg_get(psoc, CFG_LFR3_ROAM_PREAUTH_RETRY_COUNT);
lfr->roam_rssi_diff = cfg_get(psoc, CFG_LFR_ROAM_RSSI_DIFF);
+ lfr->roam_rssi_diff_6ghz = cfg_get(psoc, CFG_LFR_ROAM_RSSI_DIFF_6GHZ);
lfr->bg_rssi_threshold = cfg_get(psoc, CFG_LFR_ROAM_BG_RSSI_TH);
lfr->roam_scan_offload_enabled =
cfg_get(psoc, CFG_LFR_ROAM_SCAN_OFFLOAD_ENABLED);
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_lfr.h b/components/mlme/dispatcher/inc/cfg_mlme_lfr.h
index 87eed6987544..6ad5d7011e58 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme_lfr.h
+++ b/components/mlme/dispatcher/inc/cfg_mlme_lfr.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -1250,6 +1251,35 @@
CFG_VALUE_OR_DEFAULT, \
"Enable roam based on rssi")
+/*
+ *
+ * RoamRssiDiff6GHz - Enable roam to 6 GHz AP based on rssi
+ * @Min: 0
+ * @Max: 100
+ * @Default: 5
+ *
+ * This INI is used to decide whether to roam to 6 GHz AP or not based on RSSI.
+ * AP1 is the currently associated AP(2.4 GHz / 5 GHz) and AP2(6 GHz) is chosen
+ * for roaming. The Roaming will happen only if AP2 has better Signal Quality
+ * and it has a RSSI better than AP1. RoamRssiDiff6GHz is the number of units
+ * (typically measured in dB) AP2 is better than AP1.
+ *
+ * Related: None
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: External
+ *
+ *
+ */
+#define CFG_LFR_ROAM_RSSI_DIFF_6GHZ CFG_INI_UINT( \
+ "RoamRssiDiff6GHz", \
+ 0, \
+ 100, \
+ 5, \
+ CFG_VALUE_OR_DEFAULT, \
+ "Enable 6 GHz roam based on rssi")
+
/*
*
* bg_rssi_threshold - To set RSSI Threshold for BG scan roaming
@@ -2899,6 +2929,7 @@
CFG(CFG_LFR_MAWC_FEATURE_ENABLED) \
CFG(CFG_LFR_FAST_TRANSITION_ENABLED) \
CFG(CFG_LFR_ROAM_RSSI_DIFF) \
+ CFG(CFG_LFR_ROAM_RSSI_DIFF_6GHZ) \
CFG(CFG_LFR_ROAM_BG_RSSI_TH) \
CFG(CFG_LFR_ENABLE_WES_MODE) \
CFG(CFG_LFR_ROAM_SCAN_OFFLOAD_ENABLED) \
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index c508b5cbe513..19ce7447dad7 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
@@ -1673,6 +1673,7 @@ struct fw_scan_channels {
* @roam_preauth_retry_count: Configure the max number of preauth retry
* @roam_preauth_no_ack_timeout: Configure the no ack timeout period
* @roam_rssi_diff: Enable roam based on rssi
+ * @roam_rssi_diff_6ghz: RSSI diff value to be used for roaming to 6 GHz AP.
* @roam_scan_offload_enabled: Enable Roam Scan Offload
* @neighbor_scan_timer_period: Neighbor scan timer period
* @neighbor_scan_min_timer_period: Min neighbor scan timer period
@@ -1725,6 +1726,8 @@ struct fw_scan_channels {
* @roam_ho_delay_config: Roam HO delay value
* @exclude_rm_partial_scan_freq: Exclude the channels in roam full scan that
* are already scanned as part of partial scan.
+ * @roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full scan
+ * only on prior discovery of any 6 GHz support in the environment.
*/
struct wlan_mlme_lfr_cfg {
bool mawc_roam_enabled;
@@ -1793,6 +1796,7 @@ struct wlan_mlme_lfr_cfg {
uint32_t roam_preauth_retry_count;
uint32_t roam_preauth_no_ack_timeout;
uint8_t roam_rssi_diff;
+ uint8_t roam_rssi_diff_6ghz;
uint8_t bg_rssi_threshold;
bool roam_scan_offload_enabled;
uint32_t neighbor_scan_timer_period;
@@ -1845,6 +1849,7 @@ struct wlan_mlme_lfr_cfg {
bool enable_ft_over_ds;
uint16_t roam_ho_delay_config;
uint8_t exclude_rm_partial_scan_freq;
+ uint8_t roam_full_scan_6ghz_on_disc;
};
/**
diff --git a/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c b/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c
index a88bb4fbe845..7ad9b0a04ffc 100644
--- a/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c
+++ b/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c
@@ -197,6 +197,73 @@ target_if_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_vdev *vdev,
return status;
}
+/**
+ * target_if_cm_roam_full_scan_6ghz_on_disc() - Indicate to FW whether to
+ * include the 6 GHz channels in roam full scan only on prior discovery of any
+ * 6 GHz support in the environment or by default.
+ * @vdev: vdev object
+ * @roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full scan:
+ * 1 - Include only on prior discovery of any 6 GHz support in the environment
+ * 0 - Include all the supported 6 GHz channels by default
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS
+target_if_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_vdev *vdev,
+ uint8_t roam_full_scan_6ghz_on_disc)
+{
+ QDF_STATUS status = QDF_STATUS_E_FAILURE;
+ uint8_t vdev_id;
+ wmi_unified_t wmi_handle;
+
+ wmi_handle = target_if_cm_roam_get_wmi_handle_from_vdev(vdev);
+ if (!wmi_handle)
+ return status;
+
+ vdev_id = wlan_vdev_get_id(vdev);
+ status = target_if_roam_set_param(wmi_handle, vdev_id,
+ WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_6GHZ_PSC_ONLY_WITH_RNR,
+ roam_full_scan_6ghz_on_disc);
+
+ if (QDF_IS_STATUS_ERROR(status))
+ target_if_err("Failed to set WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_6GHZ_PSC_ONLY_WITH_RNR");
+
+ return status;
+}
+
+/**
+ * target_if_cm_roam_rssi_diff_6ghz() - Send the roam RSSI diff value to FW
+ * which is used to decide how better the RSSI of the new/roamable 6GHz AP
+ * should be for roaming.
+ * @vdev: vdev object
+ * @roam_rssi_diff_6ghz: RSSI diff value to be used for roaming to 6 GHz AP
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS
+target_if_cm_roam_rssi_diff_6ghz(struct wlan_objmgr_vdev *vdev,
+ uint8_t roam_rssi_diff_6ghz)
+{
+ QDF_STATUS status = QDF_STATUS_E_FAILURE;
+ uint8_t vdev_id;
+ wmi_unified_t wmi_handle;
+
+ wmi_handle = target_if_cm_roam_get_wmi_handle_from_vdev(vdev);
+ if (!wmi_handle)
+ return status;
+
+ vdev_id = wlan_vdev_get_id(vdev);
+ status = target_if_roam_set_param(
+ wmi_handle, vdev_id,
+ WMI_ROAM_PARAM_ROAM_RSSI_BOOST_FOR_6GHZ_CAND_AP,
+ roam_rssi_diff_6ghz);
+
+ if (QDF_IS_STATUS_ERROR(status))
+ target_if_err("Failed to set WMI_ROAM_PARAM_ROAM_RSSI_BOOST_FOR_6GHZ_CAND_AP");
+
+ return status;
+}
+
static void
target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
{
@@ -205,6 +272,8 @@ target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
tx_ops->send_roam_ho_delay_config = target_if_cm_roam_ho_delay_config;
tx_ops->send_exclude_rm_partial_scan_freq =
target_if_cm_exclude_rm_partial_scan_freq;
+ tx_ops->send_roam_full_scan_6ghz_on_disc =
+ target_if_cm_roam_full_scan_6ghz_on_disc;
}
#else
static inline void
@@ -231,6 +300,20 @@ target_if_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_vdev *vdev,
{
return QDF_STATUS_E_NOSUPPORT;
}
+
+static QDF_STATUS
+target_if_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_vdev *vdev,
+ uint8_t roam_full_scan_6ghz_on_disc)
+{
+ return QDF_STATUS_E_NOSUPPORT;
+}
+
+static QDF_STATUS
+target_if_cm_roam_rssi_diff_6ghz(struct wlan_objmgr_vdev *vdev,
+ uint8_t roam_rssi_diff_6ghz)
+{
+ return QDF_STATUS_E_NOSUPPORT;
+}
#endif
/**
@@ -1124,6 +1207,15 @@ target_if_cm_roam_send_start(struct wlan_objmgr_vdev *vdev,
if (req->wlan_exclude_rm_partial_scan_freq)
target_if_cm_exclude_rm_partial_scan_freq(
vdev, req->wlan_exclude_rm_partial_scan_freq);
+
+ if (req->wlan_roam_full_scan_6ghz_on_disc)
+ target_if_cm_roam_full_scan_6ghz_on_disc(
+ vdev, req->wlan_roam_full_scan_6ghz_on_disc);
+
+ if (req->wlan_roam_rssi_diff_6ghz)
+ target_if_cm_roam_rssi_diff_6ghz(vdev,
+ req->wlan_roam_rssi_diff_6ghz);
+
/* add other wmi commands */
end:
return status;
@@ -1355,6 +1447,14 @@ target_if_cm_roam_send_update_config(struct wlan_objmgr_vdev *vdev,
if (req->wlan_exclude_rm_partial_scan_freq)
target_if_cm_exclude_rm_partial_scan_freq(
vdev, req->wlan_exclude_rm_partial_scan_freq);
+
+ if (req->wlan_roam_full_scan_6ghz_on_disc)
+ target_if_cm_roam_full_scan_6ghz_on_disc(
+ vdev, req->wlan_roam_full_scan_6ghz_on_disc);
+
+ if (req->wlan_roam_rssi_diff_6ghz)
+ target_if_cm_roam_rssi_diff_6ghz(
+ vdev, req->wlan_roam_rssi_diff_6ghz);
}
end:
return status;
diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c
index 72909b9aaa07..9883bfc6a980 100644
--- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c
+++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c
@@ -302,6 +302,21 @@ cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
return status;
}
+
+QDF_STATUS cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc,
+ uint8_t vdev_id,
+ uint8_t param_value)
+{
+ QDF_STATUS status;
+
+ wlan_cm_roam_set_full_scan_6ghz_on_disc(psoc, param_value);
+ status = wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc(psoc, vdev_id,
+ param_value);
+ if (QDF_IS_STATUS_ERROR(status))
+ mlme_debug("fail to send 6 GHz channels inclusion in full scan");
+
+ return status;
+}
#else
static inline void
cm_roam_reason_vsie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
@@ -533,6 +548,7 @@ cm_roam_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
{
struct wlan_roam_start_config *start_req;
QDF_STATUS status;
+ struct cm_roam_values_copy temp;
start_req = qdf_mem_malloc(sizeof(*start_req));
if (!start_req)
@@ -562,6 +578,12 @@ cm_roam_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
start_req->wlan_exclude_rm_partial_scan_freq =
wlan_cm_get_exclude_rm_partial_scan_freq(psoc);
+ start_req->wlan_roam_full_scan_6ghz_on_disc =
+ wlan_cm_roam_get_full_scan_6ghz_on_disc(psoc);
+
+ wlan_cm_roam_cfg_get_value(psoc, vdev_id, ROAM_RSSI_DIFF_6GHZ, &temp);
+ start_req->wlan_roam_rssi_diff_6ghz = temp.uint_value;
+
status = wlan_cm_tgt_send_roam_start_req(psoc, vdev_id, start_req);
if (QDF_IS_STATUS_ERROR(status))
mlme_debug("fail to send roam start");
@@ -585,6 +607,7 @@ cm_roam_update_config_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
{
struct wlan_roam_update_config *update_req;
QDF_STATUS status;
+ struct cm_roam_values_copy temp;
cm_roam_set_roam_reason_better_ap(psoc, vdev_id, false);
@@ -617,6 +640,12 @@ cm_roam_update_config_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
update_req->wlan_exclude_rm_partial_scan_freq =
wlan_cm_get_exclude_rm_partial_scan_freq(psoc);
+ update_req->wlan_roam_full_scan_6ghz_on_disc =
+ wlan_cm_roam_get_full_scan_6ghz_on_disc(psoc);
+
+ wlan_cm_roam_cfg_get_value(psoc, vdev_id, ROAM_RSSI_DIFF_6GHZ, &temp);
+ update_req->wlan_roam_rssi_diff_6ghz = temp.uint_value;
+
status = wlan_cm_tgt_send_roam_update_req(psoc, vdev_id, update_req);
if (QDF_IS_STATUS_ERROR(status))
mlme_debug("fail to send update config");
diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h
index e081514670e2..5ae40f27e891 100644
--- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h
+++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h
@@ -142,6 +142,20 @@ cm_roam_send_ho_delay_config(struct wlan_objmgr_psoc *psoc,
QDF_STATUS
cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint8_t param_value);
+
+/**
+ * cm_roam_full_scan_6ghz_on_disc() - Include the 6 GHz channels in roam full
+ * scan only on prior discovery of any 6 GHz support in the environment
+ * @psoc: PSOC pointer
+ * @vdev_id: vdev id
+ * @param_value: Include the 6 GHz channels in roam full scan:
+ * 1 - Include only on prior discovery of any 6 GHz support in the environment
+ * 0 - Include all the supported 6 GHz channels by default
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc,
+ uint8_t vdev_id, uint8_t param_value);
#else
static inline QDF_STATUS
cm_roam_send_rt_stats_config(struct wlan_objmgr_psoc *psoc,
@@ -163,6 +177,13 @@ cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
{
return QDF_STATUS_E_NOSUPPORT;
}
+
+static inline
+QDF_STATUS cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc,
+ uint8_t vdev_id, uint8_t param_value)
+{
+ return QDF_STATUS_E_NOSUPPORT;
+}
#endif
/**
diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h
index 517f4dcf2cae..6cdd5965714b 100644
--- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h
+++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h
@@ -183,6 +183,33 @@ wlan_cm_set_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
uint8_t
wlan_cm_get_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc);
+/**
+ * wlan_cm_roam_set_full_scan_6ghz_on_disc() - set value to include the 6 GHz
+ * channels in roam full scan only on prior discovery of any 6 GHz support in
+ * the environment.
+ * @psoc: PSOC pointer
+ * @roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full scan:
+ * 1 - Include only on prior discovery of any 6 GHz support in the environment
+ * 0 - Include all the supported 6 GHz channels by default
+ *
+ * Return: none
+ */
+void
+wlan_cm_roam_set_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc,
+ uint8_t roam_full_scan_6ghz_on_disc);
+
+/**
+ * wlan_cm_roam_get_full_scan_6ghz_on_disc() - Get value to include the 6 GHz
+ * channels in roam full scan only on prior discovery of any 6 GHz support in
+ * the environment.
+ * @psoc: PSOC pointer
+ *
+ * Return:
+ * 1 - Include only on prior discovery of any 6 GHz support in the environment
+ * 0 - Include all the supported 6 GHz channels by default
+ */
+uint8_t wlan_cm_roam_get_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc);
+
#else
static inline QDF_STATUS
wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
@@ -793,5 +820,11 @@ wlan_cm_get_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc)
{
return 0;
}
+
+static inline uint8_t
+wlan_cm_roam_get_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc)
+{
+ return 0;
+}
#endif /* FEATURE_ROAM_OFFLOAD */
#endif /* WLAN_CM_ROAM_API_H__ */
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 ec2f04962c95..6118e79b7484 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
@@ -119,11 +119,13 @@
* @RSSI_CHANGE_THRESHOLD: Rssi change threshold
* @BEACON_RSSI_WEIGHT: Beacon Rssi weight parameter
* @HI_RSSI_DELAY_BTW_SCANS: High Rssi delay between scans
+ * @ROAM_RSSI_DIFF_6GHZ: roam rssi diff for 6 GHz AP
*/
enum roam_cfg_param {
RSSI_CHANGE_THRESHOLD,
BEACON_RSSI_WEIGHT,
HI_RSSI_DELAY_BTW_SCANS,
+ ROAM_RSSI_DIFF_6GHZ,
};
/**
@@ -1171,6 +1173,10 @@ enum roam_rt_stats_params {
* @wlan_roam_ho_delay_config: roam HO delay value
* @wlan_exclude_rm_partial_scan_freq: Include/exclude the channels in roam full
* scan that are already scanned as part of partial scan.
+ * @wlan_roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full
+ * scan only on prior discovery of any 6 GHz support in the environment.
+ * @wlan_roam_rssi_diff_6ghz: This value is used as to how better the RSSI of
+ * the new/roamable 6GHz AP should be for roaming.
*/
struct wlan_roam_start_config {
struct wlan_roam_offload_scan_rssi_params rssi_params;
@@ -1192,6 +1198,8 @@ struct wlan_roam_start_config {
uint8_t wlan_roam_rt_stats_config;
uint16_t wlan_roam_ho_delay_config;
uint8_t wlan_exclude_rm_partial_scan_freq;
+ uint8_t wlan_roam_full_scan_6ghz_on_disc;
+ uint8_t wlan_roam_rssi_diff_6ghz;
/* other wmi cmd structures */
};
@@ -1240,6 +1248,10 @@ struct wlan_roam_stop_config {
* @wlan_roam_ho_delay_config: roam HO delay value
* @wlan_exclude_rm_partial_scan_freq: Include/exclude the channels in roam full
* scan that are already scanned as part of partial scan.
+ * @wlan_roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full
+ * scan only on prior discovery of any 6 GHz support in the environment.
+ * @wlan_roam_rssi_diff_6ghz: This value is used as to how better the RSSI of
+ * the new/roamable 6GHz AP should be for roaming.
*/
struct wlan_roam_update_config {
struct wlan_roam_beacon_miss_cnt beacon_miss_cnt;
@@ -1256,6 +1268,8 @@ struct wlan_roam_update_config {
uint8_t wlan_roam_rt_stats_config;
uint16_t wlan_roam_ho_delay_config;
uint8_t wlan_exclude_rm_partial_scan_freq;
+ uint8_t wlan_roam_full_scan_6ghz_on_disc;
+ uint8_t wlan_roam_rssi_diff_6ghz;
};
#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
@@ -1384,6 +1398,8 @@ struct set_pcl_req {
* @send_roam_ho_delay_config: Send roam Hand-off delay value to FW
* @send_exclude_rm_partial_scan_freq: Include/exclude the channels in roam full
* scan that are already scanned as part of partial scan.
+ * @send_roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full
+ * scan only on prior discovery of any 6 GHz support in the environment.
*/
struct wlan_cm_roam_tx_ops {
QDF_STATUS (*send_vdev_set_pcl_cmd)(struct wlan_objmgr_vdev *vdev,
@@ -1417,6 +1433,9 @@ struct wlan_cm_roam_tx_ops {
QDF_STATUS (*send_exclude_rm_partial_scan_freq)(
struct wlan_objmgr_vdev *vdev,
uint8_t value);
+ QDF_STATUS (*send_roam_full_scan_6ghz_on_disc)(
+ struct wlan_objmgr_vdev *vdev,
+ uint8_t value);
#endif
};
@@ -1468,6 +1487,7 @@ enum roam_fail_params {
* @roam_trigger_reason: Roam trigger reason(enum WMI_ROAM_TRIGGER_REASON_ID)
* @roam_invoke_fail_reason: One of reason id from enum
* wmi_roam_invoke_status_error in case of forced roam
+ * @roam_rssi_diff_6ghz: roam rssi diff for 6 GHz AP
*/
struct wlan_cm_rso_configs {
uint8_t rescan_rssi_delta;
@@ -1477,6 +1497,7 @@ struct wlan_cm_rso_configs {
uint32_t roam_fail_reason;
uint32_t roam_trigger_reason;
uint32_t roam_invoke_fail_reason;
+ uint8_t roam_rssi_diff_6ghz;
};
/**
diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h
index 73f4f8667110..b4ec5f2543dd 100644
--- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h
+++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h
@@ -212,6 +212,21 @@ ucfg_cm_roam_send_ho_delay_config(struct wlan_objmgr_pdev *pdev,
QDF_STATUS
ucfg_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id, uint8_t param_value);
+
+/**
+ * ucfg_cm_roam_full_scan_6ghz_on_disc() - Include the 6 GHz channels in roam
+ * full scan only on prior discovery of any 6 GHz support in the environment.
+ * @pdev: Pointer to pdev
+ * @vdev_id: vdev id
+ * @param_value: Include the 6 GHz channels in roam full scan:
+ * 1 - Include only on prior discovery of any 6 GHz support in the environment
+ * 0 - Include all the supported 6 GHz channels by default
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS ucfg_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_pdev *pdev,
+ uint8_t vdev_id,
+ uint8_t param_value);
#else
static inline QDF_STATUS
ucfg_cm_update_roam_scan_scheme_bitmap(struct wlan_objmgr_psoc *psoc,
@@ -255,4 +270,11 @@ ucfg_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_pdev *pdev,
{
return QDF_STATUS_SUCCESS;
}
+
+static inline QDF_STATUS
+ucfg_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_pdev *pdev,
+ uint8_t vdev_id, uint8_t param_value)
+{
+ return QDF_STATUS_SUCCESS;
+}
#endif
diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_tgt_if_tx_api.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_tgt_if_tx_api.h
index be9a1b4454ff..05486e85645a 100644
--- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_tgt_if_tx_api.h
+++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_tgt_if_tx_api.h
@@ -76,6 +76,23 @@ QDF_STATUS
wlan_cm_tgt_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id,
uint8_t exclude_rm_partial_scan_freq);
+
+/**
+ * wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc() - Include the 6 GHz channels
+ * in roam full scan only on prior discovery of any 6 GHz support in the
+ * environment.
+ * @psoc: PSOC pointer
+ * @roam_inc_6ghz_if_disc: Include the 6 GHz channels in roam full scan:
+ * 1 - Include only on prior discovery of any 6 GHz support in the environment
+ * 0 - Include all the supported 6 GHz channels by default
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc(
+ struct wlan_objmgr_psoc *psoc,
+ uint8_t vdev_id,
+ uint8_t roam_full_scan_6ghz_on_disc);
#else
static inline QDF_STATUS
wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc,
@@ -105,6 +122,15 @@ wlan_cm_tgt_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
{
return QDF_STATUS_E_FAILURE;
}
+
+static inline QDF_STATUS
+wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc(
+ struct wlan_objmgr_psoc *psoc,
+ uint8_t vdev_id,
+ uint8_t roam_full_scan_6ghz_on_disc)
+{
+ return QDF_STATUS_E_FAILURE;
+}
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
diff --git a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c
index cc66dc58c572..578cb0e3ddaf 100644
--- a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c
+++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c
@@ -516,6 +516,9 @@ QDF_STATUS wlan_cm_roam_cfg_get_value(struct wlan_objmgr_psoc *psoc,
case HI_RSSI_DELAY_BTW_SCANS:
dst_config->uint_value = src_config->hi_rssi_scan_delay;
break;
+ case ROAM_RSSI_DIFF_6GHZ:
+ dst_config->uint_value = src_config->roam_rssi_diff_6ghz;
+ break;
default:
mlme_err("Invalid roam config requested:%d", roam_cfg_type);
status = QDF_STATUS_E_FAILURE;
@@ -562,6 +565,9 @@ wlan_cm_roam_cfg_set_value(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
case HI_RSSI_DELAY_BTW_SCANS:
dst_config->hi_rssi_scan_delay = src_config->uint_value;
break;
+ case ROAM_RSSI_DIFF_6GHZ:
+ dst_config->roam_rssi_diff_6ghz = src_config->uint_value;
+ break;
default:
mlme_err("Invalid roam config requested:%d", roam_cfg_type);
status = QDF_STATUS_E_FAILURE;
@@ -944,4 +950,31 @@ wlan_cm_get_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc)
return mlme_obj->cfg.lfr.exclude_rm_partial_scan_freq;
}
+
+void
+wlan_cm_roam_set_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc,
+ uint8_t roam_full_scan_6ghz_on_disc)
+{
+ struct wlan_mlme_psoc_ext_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_ext_obj(psoc);
+ if (!mlme_obj)
+ return;
+
+ mlme_obj->cfg.lfr.roam_full_scan_6ghz_on_disc =
+ roam_full_scan_6ghz_on_disc;
+}
+
+uint8_t wlan_cm_roam_get_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc)
+{
+ struct wlan_mlme_psoc_ext_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_ext_obj(psoc);
+ if (!mlme_obj) {
+ mlme_legacy_err("Failed to get MLME Obj");
+ return 0;
+ }
+
+ return mlme_obj->cfg.lfr.roam_full_scan_6ghz_on_disc;
+}
#endif
diff --git a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c
index 3183e8a437d4..bfbd2e756301 100644
--- a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c
+++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c
@@ -156,4 +156,13 @@ ucfg_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_pdev *pdev,
return cm_exclude_rm_partial_scan_freq(psoc, vdev_id, param_value);
}
+
+QDF_STATUS ucfg_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_pdev *pdev,
+ uint8_t vdev_id,
+ uint8_t param_value)
+{
+ struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
+
+ return cm_roam_full_scan_6ghz_on_disc(psoc, vdev_id, param_value);
+}
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
diff --git a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c
index 924de0d686f1..f69e416f59a0 100644
--- a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c
+++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c
@@ -266,6 +266,39 @@ wlan_cm_tgt_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
return status;
}
+
+QDF_STATUS wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc(
+ struct wlan_objmgr_psoc *psoc,
+ uint8_t vdev_id,
+ uint8_t roam_full_scan_6ghz_on_disc)
+{
+ QDF_STATUS status;
+ struct wlan_cm_roam_tx_ops *roam_tx_ops;
+ struct wlan_objmgr_vdev *vdev;
+
+ vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
+ WLAN_MLME_NB_ID);
+ if (!vdev)
+ return QDF_STATUS_E_INVAL;
+
+ roam_tx_ops = wlan_cm_roam_get_tx_ops_from_vdev(vdev);
+ if (!roam_tx_ops || !roam_tx_ops->send_roam_full_scan_6ghz_on_disc) {
+ mlme_err("vdev %d send_roam_full_scan_6ghz_on_disc is NULL",
+ vdev_id);
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
+ return QDF_STATUS_E_INVAL;
+ }
+
+ status = roam_tx_ops->send_roam_full_scan_6ghz_on_disc(
+ vdev, roam_full_scan_6ghz_on_disc);
+ if (QDF_IS_STATUS_ERROR(status))
+ mlme_debug("vdev %d fail to send inclusion of 6 GHz channels",
+ vdev_id);
+
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
+
+ return status;
+}
#endif
#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 511d6e6a1c26..bc93b02a6359 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -4648,6 +4648,8 @@ roam_control_policy[QCA_ATTR_ROAM_CONTROL_MAX + 1] = {
[QCA_ATTR_ROAM_CONTROL_HO_DELAY_FOR_RX] = {.type = NLA_U16},
[QCA_ATTR_ROAM_CONTROL_FULL_SCAN_NO_REUSE_PARTIAL_SCAN_FREQ] = {
.type = NLA_U8},
+ [QCA_ATTR_ROAM_CONTROL_FULL_SCAN_6GHZ_ONLY_ON_PRIOR_DISCOVERY] = {
+ .type = NLA_U8},
};
/**
@@ -5047,6 +5049,11 @@ hdd_send_roam_scan_period_to_sme(struct hdd_context *hdd_ctx,
#define INCLUDE_ROAM_PARTIAL_SCAN_FREQ 0
#define EXCLUDE_ROAM_PARTIAL_SCAN_FREQ 1
+/* Include the supported 6 GHz PSC channels in full scan by default */
+#define INCLUDE_6GHZ_IN_FULL_SCAN_BY_DEF 0
+/* Include the 6 GHz channels in roam full scan only on prior discovery */
+#define INCLUDE_6GHZ_IN_FULL_SCAN_IF_DISC 1
+
/**
* hdd_set_roam_with_control_config() - Set roam control configuration
* @hdd_ctx: HDD context
@@ -5275,6 +5282,25 @@ hdd_set_roam_with_control_config(struct hdd_context *hdd_ctx,
hdd_err("Fail to exclude roam partial scan channels");
}
+ attr = tb2[QCA_ATTR_ROAM_CONTROL_FULL_SCAN_6GHZ_ONLY_ON_PRIOR_DISCOVERY];
+ if (attr) {
+ value = nla_get_u8(attr);
+ if (value < INCLUDE_6GHZ_IN_FULL_SCAN_BY_DEF ||
+ value > INCLUDE_6GHZ_IN_FULL_SCAN_IF_DISC) {
+ hdd_err("Invalid value %d to decide inclusion of 6 GHz channels",
+ value);
+ return -EINVAL;
+ }
+
+ hdd_debug("Include 6 GHz channels in roam full scan by %s",
+ value ? "prior discovery" : "default");
+
+ status = ucfg_cm_roam_full_scan_6ghz_on_disc(hdd_ctx->pdev,
+ vdev_id, value);
+ if (QDF_IS_STATUS_ERROR(status))
+ hdd_err("Fail to decide inclusion of 6 GHz channels");
+ }
+
return qdf_status_to_os_return(status);
}
diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h
index 876c2d7a0a5e..4b6d5d20b5a5 100644
--- a/core/mac/inc/qwlan_version.h
+++ b/core/mac/inc/qwlan_version.h
@@ -32,9 +32,9 @@
#define QWLAN_VERSION_MAJOR 2
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 8
-#define QWLAN_VERSION_EXTRA "T"
+#define QWLAN_VERSION_EXTRA "V"
#define QWLAN_VERSION_BUILD 31
-#define QWLAN_VERSIONSTR "2.0.8.31T"
+#define QWLAN_VERSIONSTR "2.0.8.31V"
#endif /* QWLAN_VERSION_H */
diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c
index 1a3e40532eb0..df8c0cfabee5 100644
--- a/core/sme/src/csr/csr_neighbor_roam.c
+++ b/core/sme/src/csr/csr_neighbor_roam.c
@@ -844,6 +844,10 @@ static void csr_neighbor_roam_info_ctx_init(struct mac_context *mac,
wlan_cm_update_roam_scan_scheme_bitmap(mac->psoc, session_id,
DEFAULT_ROAM_SCAN_SCHEME_BITMAP);
+ src_cfg.uint_value = mac->mlme_cfg->lfr.roam_rssi_diff_6ghz;
+ wlan_cm_roam_cfg_set_value(mac->psoc, session_id,
+ ROAM_RSSI_DIFF_6GHZ, &src_cfg);
+
/*
* Now we can clear the preauthDone that
* was saved as we are connected afresh