mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
qcacld-3.0: Add ini to apply RSSI delta for 6 GHz roam
Introduce a new ini parameter, to apply an RSSI penalty to non-6 GHz candidate APs during roaming from 6 GHz AP. This ensures roaming to non-6 GHz AP occurs only if it offers significantly better signal quality. Change-Id: I02482c37c56c44d3d1804282abd09deaefb8eed3 CRs-Fixed: 4141300
This commit is contained in:
parent
2db179ead0
commit
1879db349b
8 changed files with 125 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -1846,6 +1847,8 @@ static void mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc,
|
|||
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->roam_rssi_delta_6ghz_to_non_6ghz =
|
||||
cfg_get(psoc, CFG_LFR_ROAM_RSSI_DELTA_6GHZ_TO_NON_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);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -1280,6 +1281,38 @@
|
|||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Enable 6 GHz roam based on rssi")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* roam_rssi_delta_from_6ghz_to_non_6ghz - Enable roam to Non 6 GHz AP based
|
||||
* on rssi
|
||||
* @Min: 0
|
||||
* @Max: 100
|
||||
* @Default: 0
|
||||
*
|
||||
* This INI is used to decide whether to roam to Non 6 GHz AP or not based on
|
||||
* RSSI. AP1 is the currently associated AP(6 GHz) and AP2(2.4 GHz / 5 GHz) is
|
||||
* chosen for roaming. The Roaming will happen only if AP2 has better Signal
|
||||
* Quality and it has a RSSI better than AP1.
|
||||
* roam_rssi_delta_from_6ghz_to_non_6ghz is the number of dB units AP2 is
|
||||
* better than AP1.
|
||||
*
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: Roaming
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_LFR_ROAM_RSSI_DELTA_6GHZ_TO_NON_6GHZ CFG_INI_UINT( \
|
||||
"roam_rssi_delta_from_6ghz_to_non_6ghz", \
|
||||
0, \
|
||||
100, \
|
||||
0, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Enable 6 GHz to non 6 GHz roam based on rssi")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* bg_rssi_threshold - To set RSSI Threshold for BG scan roaming
|
||||
|
|
@ -2930,6 +2963,7 @@
|
|||
CFG(CFG_LFR_FAST_TRANSITION_ENABLED) \
|
||||
CFG(CFG_LFR_ROAM_RSSI_DIFF) \
|
||||
CFG(CFG_LFR_ROAM_RSSI_DIFF_6GHZ) \
|
||||
CFG(CFG_LFR_ROAM_RSSI_DELTA_6GHZ_TO_NON_6GHZ) \
|
||||
CFG(CFG_LFR_ROAM_BG_RSSI_TH) \
|
||||
CFG(CFG_LFR_ENABLE_WES_MODE) \
|
||||
CFG(CFG_LFR_ROAM_SCAN_OFFLOAD_ENABLED) \
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -1680,8 +1681,10 @@ struct fw_scan_channels {
|
|||
* @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
|
||||
* @roam_rssi_delta_6ghz_to_non_6ghz: RSSI diff value to be used for
|
||||
* roaming from 6 GHz to Non 6GHz 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
|
||||
* @neighbor_lookup_rssi_threshold: Neighbor lookup rssi threshold
|
||||
* @opportunistic_scan_threshold_diff: Set oppurtunistic threshold diff
|
||||
|
|
@ -1804,6 +1807,7 @@ struct wlan_mlme_lfr_cfg {
|
|||
uint32_t roam_preauth_no_ack_timeout;
|
||||
uint8_t roam_rssi_diff;
|
||||
uint8_t roam_rssi_diff_6ghz;
|
||||
uint8_t roam_rssi_delta_6ghz_to_non_6ghz;
|
||||
uint8_t bg_rssi_threshold;
|
||||
bool roam_scan_offload_enabled;
|
||||
uint32_t neighbor_scan_timer_period;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
@ -264,6 +265,41 @@ target_if_cm_roam_rssi_diff_6ghz(struct wlan_objmgr_vdev *vdev,
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* target_if_cm_roam_rssi_delta_6ghz_to_non_6ghz() - Sends the roam RSSI
|
||||
* diff value to the FW. This value is used to determine how much better
|
||||
* the RSSI of the new/roamable non-6 GHz AP must be for roaming.
|
||||
*
|
||||
* @vdev: vdev object
|
||||
* @roam_rssi_delta_6ghz_to_non_6ghz: RSSI diff value to be used for roaming to
|
||||
* Non 6 GHz AP
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS
|
||||
target_if_cm_roam_rssi_delta_6ghz_to_non_6ghz(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t roam_rssi_delta_6ghz_to_non_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_PENALTY_FOR_NON_6GHZ_CAND_AP,
|
||||
roam_rssi_delta_6ghz_to_non_6ghz);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
target_if_err("Failed to set WMI_ROAM_PARAM_ROAM_RSSI_PENALTY_FOR_NON_6GHZ_CAND_AP");
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static QDF_STATUS
|
||||
target_if_cm_roam_scan_offload_rssi_thresh(
|
||||
wmi_unified_t wmi_handle,
|
||||
|
|
@ -367,6 +403,13 @@ target_if_cm_roam_rssi_diff_6ghz(struct wlan_objmgr_vdev *vdev,
|
|||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static QDF_STATUS
|
||||
target_if_cm_roam_rssi_delta_6ghz_to_non_6ghz(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t roam_rssi_diff_6ghz)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline void
|
||||
target_if_check_hi_rssi_5ghz_support(
|
||||
wmi_unified_t wmi_handle,
|
||||
|
|
@ -1276,6 +1319,9 @@ target_if_cm_roam_send_start(struct wlan_objmgr_vdev *vdev,
|
|||
if (req->wlan_roam_rssi_diff_6ghz)
|
||||
target_if_cm_roam_rssi_diff_6ghz(vdev,
|
||||
req->wlan_roam_rssi_diff_6ghz);
|
||||
if (req->wlan_roam_rssi_delta_6ghz_to_non_6ghz)
|
||||
target_if_cm_roam_rssi_delta_6ghz_to_non_6ghz(
|
||||
vdev, req->wlan_roam_rssi_delta_6ghz_to_non_6ghz);
|
||||
|
||||
/* add other wmi commands */
|
||||
end:
|
||||
|
|
@ -1516,6 +1562,10 @@ target_if_cm_roam_send_update_config(struct wlan_objmgr_vdev *vdev,
|
|||
if (req->wlan_roam_rssi_diff_6ghz)
|
||||
target_if_cm_roam_rssi_diff_6ghz(
|
||||
vdev, req->wlan_roam_rssi_diff_6ghz);
|
||||
|
||||
if (req->wlan_roam_rssi_delta_6ghz_to_non_6ghz)
|
||||
target_if_cm_roam_rssi_delta_6ghz_to_non_6ghz(
|
||||
vdev, req->wlan_roam_rssi_delta_6ghz_to_non_6ghz);
|
||||
}
|
||||
end:
|
||||
return status;
|
||||
|
|
|
|||
|
|
@ -629,6 +629,10 @@ cm_roam_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|||
wlan_cm_roam_cfg_get_value(psoc, vdev_id, ROAM_RSSI_DIFF_6GHZ, &temp);
|
||||
start_req->wlan_roam_rssi_diff_6ghz = temp.uint_value;
|
||||
|
||||
wlan_cm_roam_cfg_get_value(psoc, vdev_id,
|
||||
ROAM_RSSI_DELTA_6GHZ_TO_NON_6GHZ, &temp);
|
||||
start_req->wlan_roam_rssi_delta_6ghz_to_non_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");
|
||||
|
|
@ -691,6 +695,10 @@ cm_roam_update_config_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|||
wlan_cm_roam_cfg_get_value(psoc, vdev_id, ROAM_RSSI_DIFF_6GHZ, &temp);
|
||||
update_req->wlan_roam_rssi_diff_6ghz = temp.uint_value;
|
||||
|
||||
wlan_cm_roam_cfg_get_value(psoc, vdev_id,
|
||||
ROAM_RSSI_DELTA_6GHZ_TO_NON_6GHZ, &temp);
|
||||
update_req->wlan_roam_rssi_delta_6ghz_to_non_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");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
@ -120,12 +121,14 @@
|
|||
* @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
|
||||
* @ROAM_RSSI_DELTA_6GHZ_TO_NON_6GHZ: roam rssi diff for Non 6 GHz AP
|
||||
*/
|
||||
enum roam_cfg_param {
|
||||
RSSI_CHANGE_THRESHOLD,
|
||||
BEACON_RSSI_WEIGHT,
|
||||
HI_RSSI_DELAY_BTW_SCANS,
|
||||
ROAM_RSSI_DIFF_6GHZ,
|
||||
ROAM_RSSI_DELTA_6GHZ_TO_NON_6GHZ,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1206,6 +1209,8 @@ enum roam_rt_stats_params {
|
|||
* 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.
|
||||
* @wlan_roam_rssi_delta_6ghz_to_non_6ghz: This value is used as to how better
|
||||
* the RSSI of the new/roamable non 6GHz AP should be for roaming.
|
||||
*/
|
||||
struct wlan_roam_start_config {
|
||||
struct wlan_roam_offload_scan_rssi_params rssi_params;
|
||||
|
|
@ -1229,6 +1234,7 @@ struct wlan_roam_start_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;
|
||||
uint8_t wlan_roam_rssi_delta_6ghz_to_non_6ghz;
|
||||
/* other wmi cmd structures */
|
||||
};
|
||||
|
||||
|
|
@ -1281,6 +1287,8 @@ struct wlan_roam_stop_config {
|
|||
* 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.
|
||||
* @wlan_roam_rssi_delta_6ghz_to_non_6ghz: This value is used as to how better
|
||||
* the RSSI of the new/roamable non 6GHz AP should be for roaming.
|
||||
*/
|
||||
struct wlan_roam_update_config {
|
||||
struct wlan_roam_beacon_miss_cnt beacon_miss_cnt;
|
||||
|
|
@ -1299,6 +1307,7 @@ struct wlan_roam_update_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;
|
||||
uint8_t wlan_roam_rssi_delta_6ghz_to_non_6ghz;
|
||||
};
|
||||
|
||||
#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
|
||||
|
|
@ -1522,6 +1531,8 @@ enum roam_fail_params {
|
|||
* @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
|
||||
* @roam_rssi_delta_6ghz_to_non_6ghz: RSSI Delta value to be used for roaming
|
||||
* from 6 GHz to Non 6GHz AP.
|
||||
*/
|
||||
struct wlan_cm_rso_configs {
|
||||
uint8_t rescan_rssi_delta;
|
||||
|
|
@ -1532,6 +1543,7 @@ struct wlan_cm_rso_configs {
|
|||
uint32_t roam_trigger_reason;
|
||||
uint32_t roam_invoke_fail_reason;
|
||||
uint8_t roam_rssi_diff_6ghz;
|
||||
uint8_t roam_rssi_delta_6ghz_to_non_6ghz;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
@ -519,6 +520,10 @@ QDF_STATUS wlan_cm_roam_cfg_get_value(struct wlan_objmgr_psoc *psoc,
|
|||
case ROAM_RSSI_DIFF_6GHZ:
|
||||
dst_config->uint_value = src_config->roam_rssi_diff_6ghz;
|
||||
break;
|
||||
case ROAM_RSSI_DELTA_6GHZ_TO_NON_6GHZ:
|
||||
dst_config->uint_value =
|
||||
src_config->roam_rssi_delta_6ghz_to_non_6ghz;
|
||||
break;
|
||||
default:
|
||||
mlme_err("Invalid roam config requested:%d", roam_cfg_type);
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
|
|
@ -568,6 +573,10 @@ wlan_cm_roam_cfg_set_value(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
|||
case ROAM_RSSI_DIFF_6GHZ:
|
||||
dst_config->roam_rssi_diff_6ghz = src_config->uint_value;
|
||||
break;
|
||||
case ROAM_RSSI_DELTA_6GHZ_TO_NON_6GHZ:
|
||||
dst_config->roam_rssi_delta_6ghz_to_non_6ghz =
|
||||
src_config->uint_value;
|
||||
break;
|
||||
default:
|
||||
mlme_err("Invalid roam config requested:%d", roam_cfg_type);
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
|
|
|
|||
|
|
@ -848,6 +848,9 @@ static void csr_neighbor_roam_info_ctx_init(struct mac_context *mac,
|
|||
wlan_cm_roam_cfg_set_value(mac->psoc, session_id,
|
||||
ROAM_RSSI_DIFF_6GHZ, &src_cfg);
|
||||
|
||||
src_cfg.uint_value = mac->mlme_cfg->lfr.roam_rssi_delta_6ghz_to_non_6ghz;
|
||||
wlan_cm_roam_cfg_set_value(mac->psoc, session_id,
|
||||
ROAM_RSSI_DELTA_6GHZ_TO_NON_6GHZ, &src_cfg);
|
||||
/*
|
||||
* Now we can clear the preauthDone that
|
||||
* was saved as we are connected afresh
|
||||
|
|
|
|||
Loading…
Reference in a new issue