qcacld-3.0: Send ROAM MLO config to target
Send MLO Roam config to target, including: support_link_num: Configure max number of link mlo connection supports. support_link_band: Configure the band bitmap of mlo connection supports Bit 0: 2.4 GHz band support if 1 Bit 1: 5 GHz band support if 1 Bit 2: 6 GHz band support if 1 Change-Id: Id59fc93cc271266ff794702d997ffc5113de5bc1 CRs-Fixed: 3273012
This commit is contained in:

committed by
Madan Koyyalamudi

parent
2e7f1b384a
commit
091666830d
@@ -1104,6 +1104,55 @@ target_if_cm_roam_send_time_sync_cmd(wmi_unified_t wmi_handle)
|
||||
return wmi_send_time_stamp_sync_cmd_tlv(wmi_handle);
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE_MLO
|
||||
/**
|
||||
* target_if_cm_roam_send_start() - Send roam mlo related commands
|
||||
* to wmi
|
||||
* @vdev: vdev object
|
||||
* @req: roam mlo config parameters
|
||||
*
|
||||
* This function is used to send roam mlo related commands to wmi
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS
|
||||
target_if_cm_roam_send_mlo_config(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_roam_mlo_config *req)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
wmi_unified_t wmi_handle;
|
||||
|
||||
wmi_handle = target_if_cm_roam_get_wmi_handle_from_vdev(vdev);
|
||||
if (!wmi_handle)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
status = wmi_unified_roam_mlo_config_cmd(wmi_handle, req);
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
target_if_err("failed to send WMI_ROAM_MLO_CONFIG_CMDID command");
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static void
|
||||
target_if_cm_roam_register_mlo_req_ops(struct wlan_cm_roam_tx_ops *tx_ops)
|
||||
{
|
||||
tx_ops->send_roam_mlo_config = target_if_cm_roam_send_mlo_config;
|
||||
}
|
||||
#else
|
||||
static QDF_STATUS
|
||||
target_if_cm_roam_send_mlo_config(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_roam_mlo_config *req)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
target_if_cm_roam_register_mlo_req_ops(struct wlan_cm_roam_tx_ops *tx_ops)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* target_if_cm_roam_send_start() - Send roam start related commands
|
||||
* to wmi
|
||||
@@ -1251,6 +1300,8 @@ target_if_cm_roam_send_start(struct wlan_objmgr_vdev *vdev,
|
||||
target_if_cm_roam_idle_params(wmi_handle, ROAM_SCAN_OFFLOAD_START,
|
||||
&req->idle_params);
|
||||
|
||||
target_if_cm_roam_send_mlo_config(vdev, &req->roam_mlo_params);
|
||||
|
||||
vdev_id = wlan_vdev_get_id(vdev);
|
||||
if (req->wlan_roam_rt_stats_config)
|
||||
target_if_cm_roam_rt_stats_config(vdev, vdev_id,
|
||||
@@ -1749,6 +1800,7 @@ target_if_cm_roam_register_rso_req_ops(struct wlan_cm_roam_tx_ops *tx_ops)
|
||||
tx_ops->send_roam_triggers = target_if_cm_roam_triggers;
|
||||
tx_ops->send_roam_disable_config =
|
||||
target_if_cm_roam_send_disable_config;
|
||||
target_if_cm_roam_register_mlo_req_ops(tx_ops);
|
||||
}
|
||||
|
||||
QDF_STATUS target_if_cm_roam_register_tx_ops(struct wlan_cm_roam_tx_ops *tx_ops)
|
||||
|
@@ -2841,6 +2841,41 @@ cm_roam_scan_btm_offload(struct wlan_objmgr_psoc *psoc,
|
||||
params->btm_candidate_min_score = btm_cfg->btm_trig_min_candidate_score;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE_MLO
|
||||
/**
|
||||
* cm_roam_mlo_config() - set roam mlo offload parameters
|
||||
* @psoc: psoc ctx
|
||||
* @vdev: vdev
|
||||
* @params: roam mlo offload parameters
|
||||
* @rso_cfg: rso config
|
||||
*
|
||||
* This function is used to set roam mlo offload related parameters
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void
|
||||
cm_roam_mlo_config(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_roam_start_config *start_req)
|
||||
{
|
||||
struct wlan_roam_mlo_config *roam_mlo_params;
|
||||
|
||||
roam_mlo_params = &start_req->roam_mlo_params;
|
||||
roam_mlo_params->vdev_id = wlan_vdev_get_id(vdev);
|
||||
roam_mlo_params->support_link_num =
|
||||
wlan_mlme_get_sta_mlo_conn_max_num(psoc);
|
||||
roam_mlo_params->support_link_band =
|
||||
wlan_mlme_get_sta_mlo_conn_band_bmp(psoc);
|
||||
}
|
||||
#else
|
||||
static void
|
||||
cm_roam_mlo_config(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_roam_start_config *start_req)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* cm_roam_offload_11k_params() - set roam 11k offload parameters
|
||||
* @psoc: psoc ctx
|
||||
@@ -3015,6 +3050,7 @@ cm_roam_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||
true);
|
||||
start_req->wlan_roam_rt_stats_config =
|
||||
wlan_cm_get_roam_rt_stats(psoc, ROAM_RT_STATS_ENABLE);
|
||||
cm_roam_mlo_config(psoc, vdev, start_req);
|
||||
|
||||
status = wlan_cm_tgt_send_roam_start_req(psoc, vdev_id, start_req);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
|
@@ -1735,6 +1735,25 @@ enum roam_rt_stats_params {
|
||||
ROAM_RT_STATS_SUSPEND_MODE_ENABLE,
|
||||
};
|
||||
|
||||
/*
|
||||
* struct wlan_roam_mlo_config - Roam MLO config parameters
|
||||
* @vdev_id: VDEV id
|
||||
* @partner_link_addr: Assigned link address which can be used as self
|
||||
* link addr when vdev is not created
|
||||
* @support_link_num: Configure max number of link mlo connection supports.
|
||||
* Invalid value or 0 will use max supported value by fw.
|
||||
* @support_link_band: Configure the band bitmap of mlo connection supports
|
||||
* Bit 0: 2G band support if 1
|
||||
* Bit 1: 5G band support if 1
|
||||
* Bit 2: 6G band support if 1
|
||||
*/
|
||||
struct wlan_roam_mlo_config {
|
||||
uint8_t vdev_id;
|
||||
struct qdf_mac_addr partner_link_addr;
|
||||
uint32_t support_link_num;
|
||||
uint32_t support_link_band;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_roam_start_config - structure containing parameters for
|
||||
* roam start config
|
||||
@@ -1755,6 +1774,7 @@ enum roam_rt_stats_params {
|
||||
* @disconnect_params: disconnect params
|
||||
* @idle_params: idle params
|
||||
* @wlan_roam_rt_stats_config: roam events stats config
|
||||
* @roam_mlo_params: roam mlo config params
|
||||
*/
|
||||
struct wlan_roam_start_config {
|
||||
struct wlan_roam_offload_scan_rssi_params rssi_params;
|
||||
@@ -1775,6 +1795,7 @@ struct wlan_roam_start_config {
|
||||
struct wlan_roam_disconnect_params disconnect_params;
|
||||
struct wlan_roam_idle_params idle_params;
|
||||
uint8_t wlan_roam_rt_stats_config;
|
||||
struct wlan_roam_mlo_config roam_mlo_params;
|
||||
/* other wmi cmd structures */
|
||||
};
|
||||
|
||||
@@ -2350,6 +2371,10 @@ struct wlan_cm_roam_tx_ops {
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t vdev_id, uint32_t param_id);
|
||||
#endif
|
||||
#ifdef WLAN_FEATURE_11BE_MLO
|
||||
QDF_STATUS (*send_roam_mlo_config)(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_roam_mlo_config *req);
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -27,6 +27,28 @@
|
||||
#include "wlan_cm_roam_public_struct.h"
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
#ifdef WLAN_FEATURE_11BE_MLO
|
||||
/**
|
||||
* wlan_cm_tgt_send_roam_mlo_config() - Send roam mlo config to firmware
|
||||
* @psoc: psoc pointer
|
||||
* @vdev_id: vdev id
|
||||
* @req: roam mlo config parameter
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cm_tgt_send_roam_mlo_config(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
struct wlan_roam_mlo_config *req);
|
||||
#else
|
||||
static inline
|
||||
QDF_STATUS wlan_cm_tgt_send_roam_mlo_config(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
struct wlan_roam_mlo_config *req)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_send_set_vdev_pcl() - Send vdev set pcl command to firmware
|
||||
* @psoc: PSOC pointer
|
||||
@@ -76,6 +98,13 @@ wlan_cm_tgt_send_roam_rt_stats_config(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
static inline
|
||||
QDF_STATUS wlan_cm_tgt_send_roam_mlo_config(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
struct wlan_roam_mlo_config *req)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
|
||||
#ifdef WLAN_VENDOR_HANDOFF_CONTROL
|
||||
|
@@ -517,6 +517,39 @@ QDF_STATUS wlan_cm_tgt_send_roam_triggers(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE_MLO
|
||||
QDF_STATUS wlan_cm_tgt_send_roam_mlo_config(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
struct wlan_roam_mlo_config *req)
|
||||
{
|
||||
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_mlo_config) {
|
||||
mlme_err("CM_RSO: vdev %d send_roam_mlo_config 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_mlo_config(vdev, req);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
mlme_err("CM_RSO: vdev %d fail to send roam mlo config",
|
||||
vdev_id);
|
||||
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS wlan_cm_tgt_send_roam_disable_config(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
struct roam_disable_cfg *req)
|
||||
|
@@ -477,6 +477,19 @@ wmi_extract_roam_candidate_frame_event(wmi_unified_t wmi_handle, uint8_t *event,
|
||||
struct roam_scan_candidate_frame *data);
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE_MLO
|
||||
QDF_STATUS
|
||||
wmi_unified_roam_mlo_config_cmd(wmi_unified_t wmi_handle,
|
||||
struct wlan_roam_mlo_config *req);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
wmi_unified_roam_mlo_config_cmd(wmi_unified_t wmi_handle,
|
||||
struct wlan_roam_mlo_config *req)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
|
||||
* @wmi_handle: wmi handle
|
||||
|
@@ -208,6 +208,18 @@ QDF_STATUS wmi_unified_vdev_set_pcl_cmd(wmi_unified_t wmi_handle,
|
||||
}
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE_MLO
|
||||
QDF_STATUS
|
||||
wmi_unified_roam_mlo_config_cmd(wmi_unified_t wmi_handle,
|
||||
struct wlan_roam_mlo_config *req)
|
||||
{
|
||||
if (wmi_handle->ops->send_roam_mlo_config)
|
||||
return wmi_handle->ops->send_roam_mlo_config(wmi_handle,
|
||||
req);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct wlan_roam_scan_offload_params *rso_cfg)
|
||||
|
@@ -4385,12 +4385,89 @@ send_update_mlo_roam_params(wmi_roam_cnd_scoring_param *score_param,
|
||||
score_param->eht_weightage_pcnt,
|
||||
score_param->mlo_weightage_pcnt);
|
||||
}
|
||||
|
||||
static uint32_t convert_support_link_band_to_wmi(uint32_t bands)
|
||||
{
|
||||
uint32_t target_bands = 0;
|
||||
|
||||
if (bands & BIT(REG_BAND_2G))
|
||||
target_bands |= BIT(0);
|
||||
if (bands & BIT(REG_BAND_5G))
|
||||
target_bands |= BIT(1);
|
||||
if (bands & BIT(REG_BAND_6G))
|
||||
target_bands |= BIT(2);
|
||||
|
||||
return target_bands;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_roam_mlo_config_tlv() - send roam mlo config parameters
|
||||
* @wmi_handle: wmi handle
|
||||
* @req: pointer to wlan roam mlo config parameters
|
||||
*
|
||||
* This function sends the roam mlo config parameters to fw.
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
static QDF_STATUS
|
||||
send_roam_mlo_config_tlv(wmi_unified_t wmi_handle,
|
||||
struct wlan_roam_mlo_config *req)
|
||||
{
|
||||
wmi_roam_mlo_config_cmd_fixed_param *cmd;
|
||||
wmi_buf_t buf;
|
||||
uint32_t len;
|
||||
|
||||
len = sizeof(*cmd);
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
cmd = (wmi_roam_mlo_config_cmd_fixed_param *)wmi_buf_data(buf);
|
||||
WMITLV_SET_HDR(
|
||||
&cmd->tlv_header,
|
||||
WMITLV_TAG_STRUC_wmi_roam_mlo_config_cmd_fixed_param,
|
||||
WMITLV_GET_STRUCT_TLVLEN(wmi_roam_mlo_config_cmd_fixed_param));
|
||||
|
||||
cmd->vdev_id = req->vdev_id;
|
||||
cmd->support_link_num = req->support_link_num;
|
||||
cmd->support_link_band = convert_support_link_band_to_wmi(
|
||||
req->support_link_band);
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(req->partner_link_addr.bytes,
|
||||
&cmd->partner_link_addr);
|
||||
|
||||
wmi_debug("RSO_CFG MLO: vdev_id:%d support_link_num:%d support_link_band:0x%0x link addr:"QDF_MAC_ADDR_FMT,
|
||||
cmd->vdev_id, cmd->support_link_num,
|
||||
cmd->support_link_band,
|
||||
QDF_MAC_ADDR_REF(req->partner_link_addr.bytes));
|
||||
|
||||
wmi_mtrace(WMI_ROAM_MLO_CONFIG_CMDID, cmd->vdev_id, 0);
|
||||
if (wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||
WMI_ROAM_MLO_CONFIG_CMDID)) {
|
||||
wmi_err("Failed to send WMI_ROAM_MLO_CONFIG_CMDID");
|
||||
wmi_buf_free(buf);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void wmi_roam_mlo_attach_tlv(struct wmi_unified *wmi_handle)
|
||||
{
|
||||
struct wmi_ops *ops = wmi_handle->ops;
|
||||
|
||||
ops->send_roam_mlo_config = send_roam_mlo_config_tlv;
|
||||
}
|
||||
|
||||
#else
|
||||
static void
|
||||
send_update_mlo_roam_params(wmi_roam_cnd_scoring_param *score_param,
|
||||
struct ap_profile_params *ap_profile)
|
||||
{
|
||||
}
|
||||
|
||||
static void wmi_roam_mlo_attach_tlv(struct wmi_unified *wmi_handle)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -5596,6 +5673,7 @@ void wmi_roam_attach_tlv(wmi_unified_t wmi_handle)
|
||||
ops->send_roam_preauth_status = send_roam_preauth_status_tlv;
|
||||
ops->extract_roam_event = extract_roam_event_tlv;
|
||||
|
||||
wmi_roam_mlo_attach_tlv(wmi_handle);
|
||||
wmi_lfr_subnet_detection_attach_tlv(wmi_handle);
|
||||
wmi_rssi_monitor_attach_tlv(wmi_handle);
|
||||
wmi_ese_attach_tlv(wmi_handle);
|
||||
|
Reference in New Issue
Block a user