qcacld-3.0: Wmi changes for mlo roaming

-Extract new wmi struct added as part of MLO roaming
 changes.
- Send EHT and MLO weightage percentage to FW via
 WMI_ROAM_AP_PROFILE.

Change-Id: I6b3f1f62ef6ea323cd1b75f63a5c63c38b000f1f
CRs-Fixed: 3010039
This commit is contained in:
Amruta Kulkarni
2021-07-27 17:09:09 -07:00
committed by Madan Koyyalamudi
parent 1872c770b7
commit 07e3dc73ab
3 changed files with 138 additions and 2 deletions

View File

@@ -910,6 +910,24 @@ cm_roam_fill_11w_params(struct wlan_objmgr_vdev *vdev,
} }
} }
#ifdef WLAN_FEATURE_11BE_MLO
static void
cm_update_mlo_score_params(struct scoring_param *req_score_params,
struct weight_cfg *weight_config)
{
req_score_params->eht_caps_weightage =
weight_config->eht_caps_weightage;
req_score_params->mlo_weightage =
weight_config->mlo_weightage;
}
#else
static void
cm_update_mlo_score_params(struct scoring_param *req_score_params,
struct weight_cfg *weight_config)
{
}
#endif
static void cm_update_score_params(struct wlan_objmgr_psoc *psoc, static void cm_update_score_params(struct wlan_objmgr_psoc *psoc,
struct wlan_mlme_psoc_ext_obj *mlme_obj, struct wlan_mlme_psoc_ext_obj *mlme_obj,
struct scoring_param *req_score_params, struct scoring_param *req_score_params,
@@ -962,6 +980,8 @@ static void cm_update_score_params(struct wlan_objmgr_psoc *psoc,
req_score_params->sae_pk_ap_weightage = req_score_params->sae_pk_ap_weightage =
weight_config->sae_pk_ap_weightage; weight_config->sae_pk_ap_weightage;
cm_update_mlo_score_params(req_score_params, weight_config);
/* TODO: update scoring params corresponding to ML scoring */ /* TODO: update scoring params corresponding to ML scoring */
req_score_params->bw_index_score = req_score_params->bw_index_score =
score_config->bandwidth_weight_per_index[0]; score_config->bandwidth_weight_per_index[0];

View File

@@ -649,6 +649,8 @@ struct ap_profile {
* @rssi_scoring: RSSI scoring information. * @rssi_scoring: RSSI scoring information.
* @esp_qbss_scoring: ESP/QBSS scoring percentage information * @esp_qbss_scoring: ESP/QBSS scoring percentage information
* @oce_wan_scoring: OCE WAN metrics percentage information * @oce_wan_scoring: OCE WAN metrics percentage information
* @eht_caps_weightage: EHT caps weightage out of total score in %
* @mlo_weightage: MLO weightage out of total score in %
*/ */
struct scoring_param { struct scoring_param {
uint32_t disable_bitmap; uint32_t disable_bitmap;
@@ -676,6 +678,10 @@ struct scoring_param {
struct rssi_config_score rssi_scoring; struct rssi_config_score rssi_scoring;
struct per_slot_score esp_qbss_scoring; struct per_slot_score esp_qbss_scoring;
struct per_slot_score oce_wan_scoring; struct per_slot_score oce_wan_scoring;
#ifdef WLAN_FEATURE_11BE_MLO
uint8_t eht_caps_weightage;
uint8_t mlo_weightage;
#endif
}; };
/** /**
@@ -1991,6 +1997,8 @@ struct cm_roam_values_copy {
/* This should not be greater than MAX_NUMBER_OF_CONC_CONNECTIONS */ /* This should not be greater than MAX_NUMBER_OF_CONC_CONNECTIONS */
#define MAX_VDEV_SUPPORTED 4 #define MAX_VDEV_SUPPORTED 4
#define MAX_PN_LEN 8
#define MAX_KEY_LEN 32
/** /**
* struct cm_ho_fail_ind - ho fail indication to CM * struct cm_ho_fail_ind - ho fail indication to CM
@@ -2038,6 +2046,37 @@ struct roam_pmkid_req_event {
struct qdf_mac_addr ap_bssid[]; struct qdf_mac_addr ap_bssid[];
}; };
/*
* struct ml_setup_link_param - MLO setup link param
* @vdev_id: vdev id of the link
* @link_id: link id of the link
* @channel: wmi channel
* @flags: link flags
*/
struct ml_setup_link_param {
uint32_t vdev_id;
uint32_t link_id;
wmi_channel channel;
uint32_t flags;
};
/*
* struct ml_key_material_param - MLO key material param
* @link_id: key is for which link, when link_id is 0xf,
* means the key is used for all links, like PTK
* @key_idx: key idx
* @key_cipher: key cipher
* @pn: pn
* @key_buff: key buffer
*/
struct ml_key_material_param {
uint32_t link_id;
uint32_t key_idx;
uint32_t key_cipher;
uint8_t pn[MAX_PN_LEN];
uint8_t key_buff[MAX_KEY_LEN];
};
struct roam_offload_synch_ind { struct roam_offload_synch_ind {
uint16_t beaconProbeRespOffset; uint16_t beaconProbeRespOffset;
uint16_t beaconProbeRespLength; uint16_t beaconProbeRespLength;
@@ -2082,6 +2121,12 @@ struct roam_offload_synch_ind {
bool is_ft_im_roam; bool is_ft_im_roam;
enum wlan_phymode phy_mode; /*phy mode sent by fw */ enum wlan_phymode phy_mode; /*phy mode sent by fw */
wmi_channel chan; wmi_channel chan;
#ifdef WLAN_FEATURE_11BE_MLO
uint8_t num_setup_links;
struct ml_setup_link_param ml_link[WLAN_UMAC_MLO_MAX_VDEVS];
uint8_t num_ml_key_material;
struct ml_key_material_param ml_key[WLAN_UMAC_MLO_MAX_VDEVS];
#endif
}; };
/** /**

View File

@@ -1845,6 +1845,50 @@ wmi_fill_data_synch_event(struct roam_offload_synch_ind *roam_sync_ind,
roam_sync_ind->reassoc_req_length); roam_sync_ind->reassoc_req_length);
} }
#ifdef WLAN_FEATURE_11BE_MLO
static void
wmi_fill_roam_mlo_info(WMI_ROAM_SYNCH_EVENTID_param_tlvs *param_buf,
struct roam_offload_synch_ind *roam_sync_ind)
{
uint8_t i;
wmi_roam_ml_setup_links_param *setup_links;
wmi_roam_ml_key_material_param *ml_key_param;
if (param_buf->num_setup_links_param) {
roam_sync_ind->num_setup_links = param_buf->num_setup_links_param;
setup_links = param_buf->setup_links_param;
for (i = 0; i < roam_sync_ind->num_setup_links; i++) {
roam_sync_ind->ml_link[i].link_id = setup_links->link_id;
roam_sync_ind->ml_link[i].vdev_id = setup_links->vdev_id;
roam_sync_ind->ml_link[i].channel = setup_links->channel;
roam_sync_ind->ml_link[i].flags = setup_links->flags;
setup_links += sizeof(wmi_roam_ml_setup_links_param);
}
}
if (param_buf->num_ml_key_material) {
roam_sync_ind->num_ml_key_material = param_buf->num_ml_key_material;
ml_key_param = param_buf->ml_key_material;
for (i = 0; i < roam_sync_ind->num_ml_key_material; i++) {
roam_sync_ind->ml_key[i].link_id = ml_key_param->link_id;
roam_sync_ind->ml_key[i].key_idx = ml_key_param->key_ix;
roam_sync_ind->ml_key[i].key_cipher = ml_key_param->key_cipher;
qdf_mem_copy(roam_sync_ind->ml_key[i].pn,
ml_key_param->pn, WMI_MAX_PN_LEN);
qdf_mem_copy(roam_sync_ind->ml_key[i].key_buff,
ml_key_param->key_buff, WMI_MAX_KEY_LEN);
ml_key_param += sizeof(wmi_roam_ml_key_material_param);
}
}
}
#else
static void wmi_fill_roam_mlo_info(WMI_ROAM_SYNCH_EVENTID_param_tlvs *param_buf,
struct roam_offload_synch_ind *roam_sync_ind)
{
}
#endif
static QDF_STATUS static QDF_STATUS
wmi_fill_roam_sync_buffer(struct wlan_objmgr_vdev *vdev, wmi_fill_roam_sync_buffer(struct wlan_objmgr_vdev *vdev,
struct rso_config *rso_cfg, struct rso_config *rso_cfg,
@@ -1860,7 +1904,11 @@ wmi_fill_roam_sync_buffer(struct wlan_objmgr_vdev *vdev,
QDF_STATUS status = QDF_STATUS_E_FAILURE; QDF_STATUS status = QDF_STATUS_E_FAILURE;
uint8_t kck_len; uint8_t kck_len;
uint8_t kek_len; uint8_t kek_len;
#ifdef WLAN_FEATURE_11BE_MLO
uint8_t i;
wmi_roam_ml_setup_links_param *setup_links;
wmi_roam_ml_key_material_param *ml_key_param;
#endif
synch_event = param_buf->fixed_param; synch_event = param_buf->fixed_param;
roam_sync_ind->roamed_vdev_id = synch_event->vdev_id; roam_sync_ind->roamed_vdev_id = synch_event->vdev_id;
roam_sync_ind->auth_status = synch_event->auth_status; roam_sync_ind->auth_status = synch_event->auth_status;
@@ -2008,6 +2056,8 @@ wmi_fill_roam_sync_buffer(struct wlan_objmgr_vdev *vdev,
qdf_mem_copy(roam_sync_ind->pmkid, qdf_mem_copy(roam_sync_ind->pmkid,
pmk_cache_info->pmkid, PMKID_LEN); pmk_cache_info->pmkid, PMKID_LEN);
} }
wmi_fill_roam_mlo_info(param_buf, roam_sync_ind);
wlan_cm_free_roam_synch_frame_ind(rso_cfg); wlan_cm_free_roam_synch_frame_ind(rso_cfg);
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
@@ -3772,6 +3822,27 @@ send_roam_scan_mode_cmd:
return status; return status;
} }
#ifdef WLAN_FEATURE_11BE_MLO
static void
send_update_mlo_roam_params(wmi_roam_cnd_scoring_param *score_param,
struct ap_profile_params *ap_profile)
{
score_param->eht_weightage_pcnt =
ap_profile->param.eht_caps_weightage;
score_param->mlo_weightage_pcnt =
ap_profile->param.mlo_weightage;
wmi_debug("11be score params weightage: EHT %d MLO %d",
score_param->eht_weightage_pcnt,
score_param->mlo_weightage_pcnt);
}
#else
static void
send_update_mlo_roam_params(wmi_roam_cnd_scoring_param *score_param,
struct ap_profile_params *ap_profile)
{
}
#endif
/** /**
* send_roam_scan_offload_ap_profile_cmd_tlv() - set roam ap profile in fw * send_roam_scan_offload_ap_profile_cmd_tlv() - set roam ap profile in fw
* @wmi_handle: wmi handle * @wmi_handle: wmi handle
@@ -3877,7 +3948,7 @@ send_roam_scan_offload_ap_profile_cmd_tlv(wmi_unified_t wmi_handle,
ap_profile->param.vendor_roam_score_algorithm; ap_profile->param.vendor_roam_score_algorithm;
score_param->sae_pk_ap_weightage_pcnt = score_param->sae_pk_ap_weightage_pcnt =
ap_profile->param.sae_pk_ap_weightage; ap_profile->param.sae_pk_ap_weightage;
send_update_mlo_roam_params(score_param, ap_profile);
wmi_debug("Score params weightage: disable_bitmap %x rssi %d ht %d vht %d he %d BW %d band %d NSS %d ESP %d BF %d PCL %d OCE WAN %d APTX %d roam score algo %d subnet id %d sae-pk %d", wmi_debug("Score params weightage: disable_bitmap %x rssi %d ht %d vht %d he %d BW %d band %d NSS %d ESP %d BF %d PCL %d OCE WAN %d APTX %d roam score algo %d subnet id %d sae-pk %d",
score_param->disable_bitmap, score_param->rssi_weightage_pcnt, score_param->disable_bitmap, score_param->rssi_weightage_pcnt,
score_param->ht_weightage_pcnt, score_param->ht_weightage_pcnt,