Merge tag 'LA.UM.9.14.r1-24200-LAHAINA.QSSI13.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0 into android13-5.4-lahaina

"LA.UM.9.14.r1-24200-LAHAINA.QSSI13.0"

* tag 'LA.UM.9.14.r1-24200-LAHAINA.QSSI13.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0:
  Release 2.0.8.34M
  qcacld-3.0: Add a sanity check to prevent integer overflow
  Release 2.0.8.34L
  qcacld-3.0: Fix possible spinlock acquire after destroy
  Release 2.0.8.34K
  qcacld-3.0: Find 6 GHz power type for connection channel
  qcacld-3.0: Find best 6 GHz power type for connection
  Release 2.0.8.34J
  qcacld-3.0: Add vendor attribute for high RSSI roam trigger threshold

Change-Id: I740cd45f715d6609b53b19a9d42b0bf9df8983bc
This commit is contained in:
Michael Bestas 2024-03-23 17:40:16 +02:00
commit 1971b36bd2
No known key found for this signature in database
GPG Key ID: CC95044519BE6669
24 changed files with 440 additions and 85 deletions

View File

@ -1631,6 +1631,8 @@ struct fw_scan_channels {
* vsie in Re(assoc) frame
* @roam_trigger_bitmap: Bitmap of roaming triggers.
* @sta_roam_disable STA roaming disabled by interfaces
* @roam_high_rssi_delta: Delta change in high RSSI at which roam scan is
* triggered in 2.4/5 GHz.
* @early_stop_scan_enable: Set early stop scan
* @enable_5g_band_pref: Enable preference for 5G from INI
* @ese_enabled: Enable ESE feature
@ -1752,6 +1754,7 @@ struct wlan_mlme_lfr_cfg {
bool enable_roam_reason_vsie;
uint32_t roam_trigger_bitmap;
uint32_t sta_roam_disable;
uint8_t roam_high_rssi_delta;
#endif
bool early_stop_scan_enable;
bool enable_5g_band_pref;

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 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 above
@ -264,6 +264,56 @@ target_if_cm_roam_rssi_diff_6ghz(struct wlan_objmgr_vdev *vdev,
return status;
}
static QDF_STATUS
target_if_cm_roam_scan_offload_rssi_thresh(
wmi_unified_t wmi_handle,
struct wlan_roam_offload_scan_rssi_params *req);
/**
* target_if_cm_roam_scan_offload_rssi_params() - Set the RSSI parameters
* for roam offload scan
* @vdev: vdev object
* @roam_rssi_params: structure containing parameters for roam offload scan
* based on RSSI
*
* Return: QDF_STATUS
*/
static QDF_STATUS
target_if_cm_roam_scan_offload_rssi_params(
struct wlan_objmgr_vdev *vdev,
struct wlan_roam_offload_scan_rssi_params *roam_rssi_params)
{
QDF_STATUS status = QDF_STATUS_E_FAILURE;
wmi_unified_t wmi_handle;
wmi_handle = target_if_cm_roam_get_wmi_handle_from_vdev(vdev);
if (!wmi_handle)
return status;
status = target_if_cm_roam_scan_offload_rssi_thresh(wmi_handle,
roam_rssi_params);
return status;
}
static void
target_if_check_hi_rssi_5ghz_support(
wmi_unified_t wmi_handle,
struct wlan_roam_offload_scan_rssi_params *roam_rssi_params)
{
if ((roam_rssi_params->flags &
ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G) &&
wmi_service_enabled(wmi_handle,
wmi_service_5ghz_hi_rssi_roam_support)) {
target_if_debug("FW supports Hi RSSI roam in 5 GHz");
roam_rssi_params->flags |=
WMI_ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G;
} else {
roam_rssi_params->flags &=
~ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G;
}
}
static void
target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
{
@ -274,6 +324,8 @@ target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
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;
tx_ops->send_roam_scan_offload_rssi_params =
target_if_cm_roam_scan_offload_rssi_params;
}
#else
static inline void
@ -314,6 +366,12 @@ target_if_cm_roam_rssi_diff_6ghz(struct wlan_objmgr_vdev *vdev,
{
return QDF_STATUS_E_NOSUPPORT;
}
static inline void
target_if_check_hi_rssi_5ghz_support(
wmi_unified_t wmi_handle,
struct wlan_roam_offload_scan_rssi_params *roam_rssi_params)
{}
#endif
/**
@ -678,6 +736,9 @@ target_if_cm_roam_scan_offload_rssi_thresh(
}
}
if (req->hi_rssi_scan_rssi_delta)
target_if_check_hi_rssi_5ghz_support(wmi_handle, req);
target_if_debug("RSO_CFG: vdev %d: db2dbm enabled:%d, good_rssi_threshold:%d, early_stop_thresholds en:%d, min:%d, max:%d, roam_scan_rssi_thresh:%d, roam_rssi_thresh_diff:%d",
req->vdev_id, db2dbm_enabled, req->good_rssi_threshold,
req->early_stop_scan_enable,

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 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
@ -317,6 +317,51 @@ QDF_STATUS cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc,
return status;
}
QDF_STATUS cm_set_roam_scan_high_rssi_offset(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id,
uint8_t param_value)
{
struct wlan_objmgr_vdev *vdev;
struct wlan_roam_offload_scan_rssi_params *roam_rssi_params;
QDF_STATUS status = QDF_STATUS_E_INVAL;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
WLAN_MLME_CM_ID);
if (!vdev) {
mlme_err("vdev object is NULL for vdev %d", vdev_id);
return QDF_STATUS_E_FAILURE;
}
roam_rssi_params = qdf_mem_malloc(sizeof(*roam_rssi_params));
if (!roam_rssi_params)
goto rel_vdev_ref;
wlan_cm_set_roam_scan_high_rssi_offset(psoc, param_value);
qdf_mem_zero(roam_rssi_params, sizeof(*roam_rssi_params));
status = wlan_cm_roam_scan_offload_rssi_thresh(psoc, vdev_id,
roam_rssi_params);
if (!QDF_IS_STATUS_SUCCESS(status)) {
mlme_err("fail to set roam scan offload RSSI threshold params");
goto mem_free;
}
mlme_debug("vdev:%d Configured high RSSI delta=%d, 5 GHZ roam flag=%d",
vdev_id, roam_rssi_params->hi_rssi_scan_rssi_delta,
(roam_rssi_params->flags &
ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G));
status = wlan_cm_tgt_send_roam_scan_offload_rssi_params(
vdev, roam_rssi_params);
if (!QDF_IS_STATUS_SUCCESS(status))
mlme_err("fail to set roam scan high RSSI offset");
mem_free:
qdf_mem_free(roam_rssi_params);
rel_vdev_ref:
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
return status;
}
#else
static inline void
cm_roam_reason_vsie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 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
@ -156,6 +156,21 @@ cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
*/
QDF_STATUS cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint8_t param_value);
/**
* cm_set_roam_scan_high_rssi_offset() - Set the delta change in high RSSI at
* which roam scan is triggered in 2.4/5 GHz.
* @psoc: PSOC pointer
* @vdev_id: vdev id
* @param_value: Set the High RSSI delta for roam scan trigger
* * 1-16 - Set an offset value in this range
* * 0 - Disable
*
* Return: QDF_STATUS
*/
QDF_STATUS
cm_set_roam_scan_high_rssi_offset(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,

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 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 above
@ -692,6 +692,44 @@ wlan_cm_roam_set_ho_delay_config(struct wlan_objmgr_psoc *psoc,
*/
uint16_t
wlan_cm_roam_get_ho_delay_config(struct wlan_objmgr_psoc *psoc);
/**
* wlan_cm_set_roam_scan_high_rssi_offset() - Set the delta change in high RSSI
* at which roam scan is triggered in 2.4/5 GHz.
* @psoc: PSOC pointer
* @roam_high_rssi_delta: Set the High RSSI delta for roam scan trigger
* * 1-16 - Set an offset value in this range
* * 0 - Disable
*
* Return: none
*/
void
wlan_cm_set_roam_scan_high_rssi_offset(struct wlan_objmgr_psoc *psoc,
uint8_t roam_high_rssi_delta);
/**
* wlan_cm_get_roam_scan_high_rssi_offset() - Get the delta change in high RSSI
* at which roam scan is triggered in 2.4/5 GHz.
* @psoc: PSOC pointer
*
* Return: High RSSI delta for roam scan trigger
*/
uint8_t wlan_cm_get_roam_scan_high_rssi_offset(struct wlan_objmgr_psoc *psoc);
/**
* wlan_cm_roam_scan_offload_rssi_thresh() - set roam offload scan rssi
* parameters
* @psoc: PSOC pointer
* @vdev_id: VDEV id
* @roam_rssi_params: roam offload scan rssi related parameters
*
* This function is used to set roam offload scan rssi related parameters
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_cm_roam_scan_offload_rssi_thresh(
struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
struct wlan_roam_offload_scan_rssi_params *roam_rssi_params);
#else
static inline
void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc,
@ -826,5 +864,11 @@ wlan_cm_roam_get_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc)
{
return 0;
}
static inline uint8_t
wlan_cm_get_roam_scan_high_rssi_offset(struct wlan_objmgr_psoc *psoc)
{
return 0;
}
#endif /* FEATURE_ROAM_OFFLOAD */
#endif /* WLAN_CM_ROAM_API_H__ */

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 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 above
@ -980,6 +980,19 @@ struct wlan_roam_scan_offload_params {
#endif
};
/**
* enum wlan_roam_offload_scan_rssi_flags - Flags for roam scan RSSI threshold
* params, this enums will be used in flags param of the structure
* wlan_roam_offload_scan_rssi_params
* @ROAM_SCAN_RSSI_THRESHOLD_INVALID_FLAG: invalid flag
* @ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G: enable high RSSI roam
* trigger support to roam from 5 GHz to 6 GHz band
*/
enum wlan_roam_offload_scan_rssi_flags {
ROAM_SCAN_RSSI_THRESHOLD_INVALID_FLAG,
ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G = BIT(0),
};
/**
* struct wlan_roam_offload_scan_rssi_params - structure containing
* parameters for roam offload scan based on RSSI
@ -1015,6 +1028,7 @@ struct wlan_roam_scan_offload_params {
* roam
* @roam_data_rssi_threshold: Bad data RSSI threshold to roam
* @rx_data_inactivity_time: Rx duration to check data RSSI
* @flags: Flags for roam scan RSSI threshold params
*/
struct wlan_roam_offload_scan_rssi_params {
int8_t rssi_thresh;
@ -1046,6 +1060,7 @@ struct wlan_roam_offload_scan_rssi_params {
uint32_t roam_data_rssi_threshold_triggers;
int32_t roam_data_rssi_threshold;
uint32_t rx_data_inactivity_time;
uint32_t flags;
};
/**
@ -1400,6 +1415,8 @@ struct set_pcl_req {
* 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.
* @send_roam_scan_offload_rssi_params: Set the RSSI parameters for roam
* offload scan
*/
struct wlan_cm_roam_tx_ops {
QDF_STATUS (*send_vdev_set_pcl_cmd)(struct wlan_objmgr_vdev *vdev,
@ -1436,6 +1453,9 @@ struct wlan_cm_roam_tx_ops {
QDF_STATUS (*send_roam_full_scan_6ghz_on_disc)(
struct wlan_objmgr_vdev *vdev,
uint8_t value);
QDF_STATUS (*send_roam_scan_offload_rssi_params)(
struct wlan_objmgr_vdev *vdev,
struct wlan_roam_offload_scan_rssi_params *roam_rssi_params);
#endif
};

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 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 above
@ -227,6 +227,24 @@ ucfg_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_pdev *pdev,
QDF_STATUS ucfg_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id,
uint8_t param_value);
/**
* ucfg_cm_set_roam_scan_high_rssi_offset() - Set the delta change in high RSSI
* at which roam scan is triggered in 2.4/5 GHz.
* @psoc: Pointer to psoc object
* @vdev_id: vdev id
* @param_value: Set the High RSSI delta for roam scan trigger
* 0 - Disable
* 1-16 - Set an offset value in this range
*
* Return: QDF_STATUS
*/
static inline QDF_STATUS
ucfg_cm_set_roam_scan_high_rssi_offset(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint8_t param_value)
{
return cm_set_roam_scan_high_rssi_offset(psoc, vdev_id, param_value);
}
#else
static inline QDF_STATUS
ucfg_cm_update_roam_scan_scheme_bitmap(struct wlan_objmgr_psoc *psoc,
@ -277,4 +295,11 @@ ucfg_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_pdev *pdev,
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
ucfg_cm_set_roam_scan_high_rssi_offset(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint8_t param_value)
{
return QDF_STATUS_SUCCESS;
}
#endif

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 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 above
@ -93,6 +93,20 @@ 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);
/**
* wlan_cm_tgt_send_roam_scan_offload_rssi_params() - Set the RSSI parameters
* for roam offload scan
* @vdev: Pointer to vdev object
* @roam_rssi_params: structure containing parameters for roam offload scan
* based on RSSI
*
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_cm_tgt_send_roam_scan_offload_rssi_params(
struct wlan_objmgr_vdev *vdev,
struct wlan_roam_offload_scan_rssi_params *roam_rssi_params);
#else
static inline QDF_STATUS
wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc,

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 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 above
@ -922,7 +922,9 @@ wlan_cm_roam_get_ho_delay_config(struct wlan_objmgr_psoc *psoc)
return mlme_obj->cfg.lfr.roam_ho_delay_config;
}
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
void
wlan_cm_set_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
uint8_t exclude_rm_partial_scan_freq)
@ -977,4 +979,29 @@ uint8_t wlan_cm_roam_get_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc)
return mlme_obj->cfg.lfr.roam_full_scan_6ghz_on_disc;
}
void
wlan_cm_set_roam_scan_high_rssi_offset(struct wlan_objmgr_psoc *psoc,
uint8_t roam_high_rssi_delta)
{
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_high_rssi_delta = roam_high_rssi_delta;
}
uint8_t
wlan_cm_get_roam_scan_high_rssi_offset(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return 0;
return mlme_obj->cfg.lfr.roam_high_rssi_delta;
}
#endif

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved
* Copyright (c) 2022-2023 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 above
@ -299,6 +299,34 @@ QDF_STATUS wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc(
return status;
}
QDF_STATUS
wlan_cm_tgt_send_roam_scan_offload_rssi_params(
struct wlan_objmgr_vdev *vdev,
struct wlan_roam_offload_scan_rssi_params *roam_rssi_params)
{
QDF_STATUS status;
uint8_t vdev_id;
struct wlan_cm_roam_tx_ops *roam_tx_ops;
vdev_id = wlan_vdev_get_id(vdev);
roam_tx_ops = wlan_cm_roam_get_tx_ops_from_vdev(vdev);
if (!roam_tx_ops || !roam_tx_ops->send_roam_scan_offload_rssi_params) {
mlme_err("vdev %d send_roam_scan_offload_rssi_params 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_scan_offload_rssi_params(
vdev, roam_rssi_params);
if (QDF_IS_STATUS_ERROR(status))
mlme_debug("vdev %d fail to send roam scan offload RSSI params",
vdev_id);
return status;
}
#endif
#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 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 above
@ -215,6 +215,7 @@ static QDF_STATUS send_roam_scan_offload_rssi_thresh_cmd_tlv(
rssi_threshold_fp->hirssi_upper_bound = roam_req->hi_rssi_scan_rssi_ub;
rssi_threshold_fp->rssi_thresh_offset_5g =
roam_req->rssi_thresh_offset_5g;
rssi_threshold_fp->flags = roam_req->flags;
buf_ptr += sizeof(wmi_roam_scan_rssi_threshold_fixed_param);
WMITLV_SET_HDR(buf_ptr,

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2024 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
@ -4603,12 +4603,13 @@ hdd_send_roam_scan_channel_freq_list_to_sme(struct hdd_context *hdd_ctx,
return QDF_STATUS_E_INVAL;
}
nla_for_each_nested(curr_attr, tb2[PARAM_SCAN_FREQ_LIST], rem)
nla_for_each_nested(curr_attr, tb2[PARAM_SCAN_FREQ_LIST], rem) {
if (num_chan >= SIR_MAX_SUPPORTED_CHANNEL_LIST) {
hdd_err("number of channels (%d) supported exceeded max (%d)",
num_chan, SIR_MAX_SUPPORTED_CHANNEL_LIST);
return QDF_STATUS_E_INVAL;
}
num_chan++;
if (num_chan > SIR_MAX_SUPPORTED_CHANNEL_LIST) {
hdd_err("number of channels (%d) supported exceeded max (%d)",
num_chan, SIR_MAX_SUPPORTED_CHANNEL_LIST);
return QDF_STATUS_E_INVAL;
}
num_chan = 0;
@ -4655,6 +4656,7 @@ roam_control_policy[QCA_ATTR_ROAM_CONTROL_MAX + 1] = {
.type = NLA_U8},
[QCA_ATTR_ROAM_CONTROL_FULL_SCAN_6GHZ_ONLY_ON_PRIOR_DISCOVERY] = {
.type = NLA_U8},
[QCA_ATTR_ROAM_CONTROL_CONNECTED_HIGH_RSSI_OFFSET] = {.type = NLA_U8},
};
/**
@ -5306,6 +5308,31 @@ hdd_set_roam_with_control_config(struct hdd_context *hdd_ctx,
hdd_err("Fail to decide inclusion of 6 GHz channels");
}
attr = tb2[QCA_ATTR_ROAM_CONTROL_CONNECTED_HIGH_RSSI_OFFSET];
if (attr) {
value = nla_get_u8(attr);
if (!cfg_in_range(CFG_LFR_ROAM_SCAN_HI_RSSI_DELTA, value)) {
hdd_err("High RSSI offset value %d is out of range",
value);
return -EINVAL;
}
hdd_debug("%s roam scan high RSSI with offset: %d for vdev %d",
value ? "Enable" : "Disable", value, vdev_id);
if (!value &&
!wlan_cm_get_roam_scan_high_rssi_offset(hdd_ctx->psoc)) {
hdd_debug("Roam scan high RSSI is already disabled");
return -EINVAL;
}
status = ucfg_cm_set_roam_scan_high_rssi_offset(hdd_ctx->psoc,
vdev_id, value);
if (QDF_IS_STATUS_ERROR(status))
hdd_err("Fail to set roam scan high RSSI offset for vdev %d",
vdev_id);
}
return qdf_status_to_os_return(status);
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2015-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved
* Copyright (c) 2022-2024 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
@ -959,7 +959,6 @@ static void hdd_soc_recovery_cleanup(void)
/* cancel/flush any pending/active idle shutdown work */
hdd_psoc_idle_timer_stop(hdd_ctx);
hdd_bus_bw_compute_timer_stop(hdd_ctx);
/* nothing to do if the soc is already unloaded */
if (hdd_ctx->driver_status == DRIVER_MODULES_CLOSED) {
@ -972,6 +971,7 @@ static void hdd_soc_recovery_cleanup(void)
return;
}
hdd_bus_bw_compute_timer_stop(hdd_ctx);
hdd_psoc_shutdown_notify(hdd_ctx);
}

View File

@ -32,9 +32,9 @@
#define QWLAN_VERSION_MAJOR 2
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 8
#define QWLAN_VERSION_EXTRA "I"
#define QWLAN_VERSION_EXTRA "M"
#define QWLAN_VERSION_BUILD 34
#define QWLAN_VERSIONSTR "2.0.8.34I"
#define QWLAN_VERSIONSTR "2.0.8.34M"
#endif /* QWLAN_VERSION_H */

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022,2024 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
@ -1048,9 +1048,8 @@ struct join_req {
struct supported_channels supportedChannels;
bool enable_bcast_probe_rsp;
bool sae_pmk_cached;
bool same_ctry_code; /* If AP Country IE has same country code as */
/* STA programmed country */
uint8_t ap_power_type_6g; /* AP power type for 6G (LPI, SP, or VLP) */
uint8_t best_6g_power_type; /* AP power type for 6G (LPI, SP, or VLP) */
/* Pls make this as last variable in struct */
bool force_24ghz_in_ht20;
bool force_rsne_override;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2024 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
@ -577,8 +578,8 @@ struct pe_session {
uint16_t prot_status_code;
tSirResultCodes result_code;
uint32_t dfs_regdomain;
/* AP power type */
uint8_t ap_power_type;
uint8_t ap_defined_power_type_6g;
uint8_t best_6g_power_type;
};
/*-------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 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
@ -2325,7 +2325,7 @@ void lim_handle_add_bss_rsp(struct mac_context *mac_ctx,
}
tx_ops = wlan_reg_get_tx_ops(mac_ctx->psoc);
lim_calculate_tpc(mac_ctx, session_entry, 0, false);
lim_calculate_tpc(mac_ctx, session_entry);
if (tx_ops->set_tpc_power)
tx_ops->set_tpc_power(mac_ctx->psoc,
@ -2810,7 +2810,7 @@ static void lim_process_switch_channel_join_req(
goto error;
}
lim_calculate_tpc(mac_ctx, session_entry, 0, false);
lim_calculate_tpc(mac_ctx, session_entry);
if (tx_ops->set_tpc_power)
tx_ops->set_tpc_power(mac_ctx->psoc,

View File

@ -1617,6 +1617,8 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
mlme_obj->reg_tpc_obj.is_power_constraint_abs =
!is_pwr_constraint;
session->best_6g_power_type = sme_join_req->best_6g_power_type;
if (wlan_reg_is_ext_tpc_supported(mac_ctx->psoc)) {
mlme_obj->reg_tpc_obj.ap_constraint_power =
local_power_constraint;
@ -2019,9 +2021,7 @@ uint8_t lim_get_max_tx_power(struct mac_context *mac,
}
void lim_calculate_tpc(struct mac_context *mac,
struct pe_session *session,
uint8_t ap_pwr_type,
bool ctry_code_match)
struct pe_session *session)
{
bool is_psd_power = false;
bool is_tpe_present = false, is_6ghz_freq = false;
@ -2061,18 +2061,8 @@ void lim_calculate_tpc(struct mac_context *mac,
} else {
is_6ghz_freq = true;
is_psd_power = wlan_reg_is_6g_psd_power(mac->pdev);
/* Power mode calculation for 6G*/
ap_power_type_6g = session->ap_power_type;
if (LIM_IS_STA_ROLE(session)) {
if (!session->lim_join_req) {
if (!ctry_code_match)
ap_power_type_6g = ap_pwr_type;
} else {
if (!session->lim_join_req->same_ctry_code)
ap_power_type_6g =
session->lim_join_req->ap_power_type_6g;
}
}
if (LIM_IS_STA_ROLE(session))
ap_power_type_6g = session->best_6g_power_type;
}
if (mlme_obj->reg_tpc_obj.num_pwr_levels) {

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022,2024 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
@ -121,6 +121,7 @@ static void lim_extract_he_op(struct pe_session *session,
return;
if (!session->he_op.oper_info_6g_present) {
pe_debug("6GHz op not present in 6G beacon");
session->ap_defined_power_type_6g = REG_VERY_LOW_POWER_AP;
return;
}
session->ch_width = session->he_op.oper_info_6g.info.ch_width;
@ -128,11 +129,17 @@ static void lim_extract_he_op(struct pe_session *session,
session->he_op.oper_info_6g.info.center_freq_seg0;
session->ch_center_freq_seg1 =
session->he_op.oper_info_6g.info.center_freq_seg1;
session->ap_power_type =
session->ap_defined_power_type_6g =
session->he_op.oper_info_6g.info.reg_info;
if (session->ap_defined_power_type_6g < REG_INDOOR_AP ||
session->ap_defined_power_type_6g > REG_MAX_SUPP_AP_TYPE) {
session->ap_defined_power_type_6g = REG_VERY_LOW_POWER_AP;
pe_debug("AP power type invalid, defaulting to VLP");
}
pe_debug("6G op info: ch_wd %d cntr_freq_seg0 %d cntr_freq_seg1 %d ap pwr type %d",
session->ch_width, session->ch_center_freq_seg0,
session->ch_center_freq_seg1, session->ap_power_type);
session->ch_center_freq_seg1, session->ap_defined_power_type_6g);
if (!session->ch_center_freq_seg1)
return;
@ -706,9 +713,6 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
}
}
mac_ctx->roam.roamSession[session_id].ap_power_type =
session->ap_power_type;
get_ese_version_ie_probe_response(mac_ctx, beacon_struct, session);
session->country_info_present = false;

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 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
@ -188,8 +188,6 @@ uint8_t lim_get_max_tx_power(struct mac_context *mac,
* lim_calculate_tpc() - Utility to get maximum tx power
* @mac: mac handle
* @session: PE Session Entry
* @ap_pwr_type: Ap power type for 6G
* @ctry_code_match: check for country IE and sta programmed ctry match
*
* This function is used to get the maximum possible tx power from the list
* of tx powers mentioned in @attr.
@ -197,9 +195,7 @@ uint8_t lim_get_max_tx_power(struct mac_context *mac,
* Return: None
*/
void lim_calculate_tpc(struct mac_context *mac,
struct pe_session *session,
uint8_t ap_pwr_type,
bool ctry_code_match);
struct pe_session *session);
/* AID pool management functions */
void lim_init_peer_idxpool(struct mac_context *, struct pe_session *);

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2023-2024 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
@ -273,7 +273,7 @@ rrm_process_link_measurement_request(struct mac_context *mac,
pLinkReq->MaxTxPower.maxTxPower;
/* Set is_power_constraint_abs to true to calculate tpc power */
mlme_obj->reg_tpc_obj.is_power_constraint_abs = true;
lim_calculate_tpc(mac, pe_session, 0, false);
lim_calculate_tpc(mac, pe_session);
LinkReport.txPower =
mlme_obj->reg_tpc_obj.chan_power_info[0].tx_power;

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2024 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
@ -609,9 +609,7 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx,
int8_t regMax = 0, maxTxPower = 0;
QDF_STATUS status;
bool skip_tpe = false;
uint8_t programmed_country[REG_ALPHA2_LEN + 1];
enum reg_6g_ap_type pwr_type_6g = REG_INDOOR_AP;
bool ctry_code_match = false;
enum reg_6g_ap_type pwr_type_6g;
bool is_power_constraint_abs = false;
qdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams));
@ -651,15 +649,29 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx,
pe_err("Channel is 6G but country IE not present");
return;
}
wlan_reg_read_current_country(mac_ctx->psoc,
programmed_country);
status = wlan_reg_get_6g_power_type_for_ctry(mac_ctx->psoc,
mac_ctx->pdev,
bcn->countryInfoParam.countryString,
programmed_country, &pwr_type_6g,
&ctry_code_match, REG_MAX_AP_TYPE);
if (bcn->he_op.oper_info_6g_present) {
session->ap_defined_power_type_6g =
bcn->he_op.oper_info_6g.info.reg_info;
if (session->ap_defined_power_type_6g < REG_INDOOR_AP ||
session->ap_defined_power_type_6g >
REG_MAX_SUPP_AP_TYPE) {
session->ap_defined_power_type_6g =
REG_VERY_LOW_POWER_AP;
pe_debug("AP power type is invalid, defaulting to VLP");
}
} else {
pe_debug("AP power type is null, defaulting to VLP");
session->ap_defined_power_type_6g =
REG_VERY_LOW_POWER_AP;
}
status = wlan_reg_get_best_6g_power_type(
mac_ctx->psoc, mac_ctx->pdev, &pwr_type_6g,
session->ap_defined_power_type_6g,
bcn->chan_freq);
if (QDF_IS_STATUS_ERROR(status))
return;
session->best_6g_power_type = pwr_type_6g;
}
if (wlan_reg_is_ext_tpc_supported(mac_ctx->psoc)) {
@ -693,8 +705,7 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx,
if ((ap_constraint_change && local_constraint) ||
(tpe_change && !skip_tpe)) {
lim_calculate_tpc(mac_ctx, session, pwr_type_6g,
ctry_code_match);
lim_calculate_tpc(mac_ctx, session);
if (tx_ops->set_tpc_power)
tx_ops->set_tpc_power(mac_ctx->psoc,

View File

@ -619,8 +619,6 @@ struct csr_roam_session {
qdf_mc_timer_t roam_invoke_timer;
struct csr_timer_info roam_invoke_timer_info;
#endif
/* AP power type */
uint8_t ap_power_type;
};
struct csr_roamstruct {

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 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
@ -15028,9 +15028,7 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
struct wlan_objmgr_vdev *vdev;
bool follow_ap_edca;
bool reconn_after_assoc_timeout = false;
uint8_t programmed_country[REG_ALPHA2_LEN + 1];
enum reg_6g_ap_type power_type_6g;
bool ctry_code_match;
uint8_t reg_cc[REG_ALPHA2_LEN + 1];
if (!pSession) {
@ -15839,18 +15837,12 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
if (wlan_reg_is_6ghz_chan_freq(pBssDescription->chan_freq)) {
if (!pIes->Country.present)
sme_debug("Channel is 6G but country IE not present");
wlan_reg_read_current_country(mac->psoc,
programmed_country);
status = wlan_reg_get_6g_power_type_for_ctry(mac->psoc,
mac->pdev,
pIes->Country.country,
programmed_country, &power_type_6g,
&ctry_code_match,
ap_6g_power_type);
status = wlan_reg_get_best_6g_power_type(mac->psoc,
mac->pdev, &power_type_6g,
ap_6g_power_type, pBssDescription->chan_freq);
if (QDF_IS_STATUS_ERROR(status))
break;
csr_join_req->ap_power_type_6g = power_type_6g;
csr_join_req->same_ctry_code = ctry_code_match;
csr_join_req->best_6g_power_type = power_type_6g;
status = csr_iterate_triplets(pIes->Country);
}
@ -17882,6 +17874,29 @@ csr_cm_roam_scan_offload_rssi_thresh(struct mac_context *mac_ctx,
else
params->hi_rssi_scan_rssi_delta =
roam_info->cfgParams.hi_rssi_scan_rssi_delta;
/*
* When the STA operating band is 2.4/5 GHz and if the high RSSI delta
* is configured through vendor command then the priority should be
* given to it and the high RSSI delta value will be overridden with it.
*/
if (!WLAN_REG_IS_6GHZ_CHAN_FREQ(session->connectedProfile.op_freq)) {
uint8_t roam_high_rssi_delta;
roam_high_rssi_delta =
wlan_cm_get_roam_scan_high_rssi_offset(mac_ctx->psoc);
if (roam_high_rssi_delta)
params->hi_rssi_scan_rssi_delta =
roam_high_rssi_delta;
/*
* Firmware will use this flag to enable 5 to 6 GHz
* high RSSI roam
*/
if (roam_high_rssi_delta &&
WLAN_REG_IS_5GHZ_CH_FREQ(session->connectedProfile.op_freq))
params->flags |=
ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G;
}
params->hi_rssi_scan_rssi_ub =
roam_info->cfgParams.hi_rssi_scan_rssi_ub;
params->raise_rssi_thresh_5g =
@ -18474,6 +18489,37 @@ csr_cm_fill_rso_sae_single_pmk_info(struct mac_context *mac_ctx,
return false;
}
#endif
QDF_STATUS wlan_cm_roam_scan_offload_rssi_thresh(
struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
struct wlan_roam_offload_scan_rssi_params *roam_rssi_params)
{
struct csr_roam_session *session;
struct mac_context *mac_ctx;
mac_ctx = sme_get_mac_context();
if (!mac_ctx) {
sme_err("mac_ctx is NULL");
return QDF_STATUS_E_FAILURE;
}
session = CSR_GET_SESSION(mac_ctx, vdev_id);
if (!session) {
sme_err("session is null %d", vdev_id);
return QDF_STATUS_E_FAILURE;
}
if (WLAN_REG_IS_6GHZ_CHAN_FREQ(session->connectedProfile.op_freq)) {
sme_err("vdev:%d High RSSI offset can't be set in 6 GHz band",
vdev_id);
return QDF_STATUS_E_FAILURE;
}
csr_cm_roam_scan_offload_rssi_thresh(mac_ctx, session,
roam_rssi_params);
return QDF_STATUS_SUCCESS;
}
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD