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:
Liangwei Dong
2022-08-12 14:50:27 +08:00
committed by Madan Koyyalamudi
vanhempi 2e7f1b384a
commit 091666830d
8 muutettua tiedostoa jossa 278 lisäystä ja 0 poistoa

Näytä tiedosto

@@ -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

Näytä tiedosto

@@ -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)

Näytä tiedosto

@@ -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);