qcacld-3.0: Extract aux device capability

Extract aux device capability and store it in wma/hdd/mlme.

current only 1 aux supported so only save info
for aux0.

Change-Id: Ib19bad6cf3c0bda5a31ea4993a2f7e587b2043e2
CRs-Fixed: 3549751
Esse commit está contido em:
jingxiang ge
2023-07-03 16:17:33 +08:00
commit de Rahul Choudhary
commit 1c1828f5d8
5 arquivos alterados com 245 adições e 0 exclusões

Ver arquivo

@@ -87,6 +87,19 @@ void
wlan_mlme_update_cfg_with_tgt_caps(struct wlan_objmgr_psoc *psoc,
struct mlme_tgt_caps *tgt_caps);
/**
* wlan_mlme_update_aux_dev_caps() - Update mlme aux capability
* @psoc: pointer to psoc object
* @wlan_mlme_aux_dev_caps: array for aux dev capability
*
* Return: None
*/
void
wlan_mlme_update_aux_dev_caps(struct wlan_objmgr_psoc *psoc,
struct wlan_mlme_aux_dev_caps
wlan_mlme_aux_dev_caps[]);
/*
* mlme_get_wep_key() - get the wep key to process during auth frame
* @vdev: VDEV object for which the wep key is being requested
@@ -1002,6 +1015,23 @@ QDF_STATUS wlan_mlme_get_oce_sap_enabled_info(struct wlan_objmgr_psoc *psoc,
*/
void wlan_mlme_update_oce_flags(struct wlan_objmgr_pdev *pdev);
/**
* wlan_mlme_cfg_get_aux_supported_modes() - get supported mode of aux.
* definition of bitmap refer WMI_AUX_DEV_CAPS_SUPPORTED_MODE.
*
* @psoc: pointer to psoc object
* @aux_index: aux index, current only support aux0.
* @hw_mode_id: hw mode id
* @supported_modes_bitmap: output for value
*
* Return: true for getting value. false for failure check.
*/
bool wlan_mlme_cfg_get_aux_supported_modes(
struct wlan_objmgr_psoc *psoc,
uint32_t aux_index,
enum wlan_mlme_hw_mode_config_type hw_mode_id,
uint32_t *supported_modes_bitmap);
#ifdef WLAN_FEATURE_11AX
/**
* wlan_mlme_cfg_get_he_ul_mumimo() - Get the HE Ul Mumio

Ver arquivo

@@ -1337,6 +1337,71 @@ struct wlan_user_mcc_quota {
uint8_t vdev_id;
};
/**
* enum wlan_mlme_hw_mode_config_type - HW mode config type replicated from
* wmi_hw_mode_config_type in FW header.
* similar as wmi_host_hw_mode_config_type.
* @WLAN_MLME_HW_MODE_SINGLE: Only one PHY is active.
* @WLAN_MLME_HW_MODE_DBS: Both PHYs are active in different bands,
* one in 2G and another in 5G.
* @WLAN_MLME_HW_MODE_SBS_PASSIVE: Both PHYs are in passive mode (only rx) in
* same band; no tx allowed.
* @WLAN_MLME_HW_MODE_SBS: Both PHYs are active in the same band.
* Support for both PHYs within one band is planned
* for 5G only(as indicated in WMI_MAC_PHY_CAPABILITIES),
* but could be extended to other bands in the future.
* The separation of the band between the two PHYs needs
* to be communicated separately.
* @WLAN_MLME_HW_MODE_DBS_SBS: 3 PHYs, with 2 on the same band doing SBS
* as in WMI_HW_MODE_SBS, and 3rd on the other band
* @WLAN_MLME_HW_MODE_DBS_OR_SBS: Two PHY with one PHY capabale of both 2G and
* 5G. It can support SBS (5G + 5G) OR DBS (5G + 2G).
* @WLAN_MLME_HW_MODE_DBS_2G_5G: Both PHYs are active in different bands.
* PhyA 2G and PhyB 5G
* @WLAN_MLME_HW_MODE_2G_PHYB: Only one phy is active. 2G mode on PhyB.
* @WLAN_MLME_HW_MODE_EMLSR: Both PHYs are active in listen mode in 1x1
* and Tx/Rx trigger on any PHY will switch
* from 1x1 to 2x2 on that Phy
* @WLAN_MLME_HW_MODE_AUX_EMLSR_SINGLE: PHYA0 and AUX are active in listen mode
* in 1x1 and Tx/Rx trigger on any.
* PHY will switch from 1x1 to 2x2
* on that Phy.
* @WLAN_MLME_HW_MODE_AUX_EMLSR_SPLIT: PHYA1 and AUX are active in listen mode
* in 1x1 and Tx/Rx trigger on any.
* PHY will switch from 1x1 to 2x2
* on that Phy.
* @WLAN_MLME_HW_MODE_MAX: Max hw_mode_id.
*/
enum wlan_mlme_hw_mode_config_type {
WLAN_MLME_HW_MODE_SINGLE = 0,
WLAN_MLME_HW_MODE_DBS = 1,
WLAN_MLME_HW_MODE_SBS_PASSIVE = 2,
WLAN_MLME_HW_MODE_SBS = 3,
WLAN_MLME_HW_MODE_DBS_SBS = 4,
WLAN_MLME_HW_MODE_DBS_OR_SBS = 5,
WLAN_MLME_HW_MODE_DBS_2G_5G = 6,
WLAN_MLME_HW_MODE_2G_PHYB = 7,
WLAN_MLME_HW_MODE_EMLSR = 8,
WLAN_MLME_HW_MODE_AUX_EMLSR_SINGLE = 9,
WLAN_MLME_HW_MODE_AUX_EMLSR_SPLIT = 10,
WLAN_MLME_HW_MODE_MAX,
};
/* struct wlan_mlme_aux_dev_caps - wlan mlme aux dev capability
*
* @supported_modes_bitmap: indicate which mode this AUX supports for the
* HW mode defined in hw_mode_id
* @listen_pdev_id_map: indicate which AUX MAC can listen/scan for the HW mode
* described in hw_mode_id
* @emlsr_pdev_id_map: indicate which AUX MAC can perform eMLSR for the HW mode
* described in hw_mode_id.
*/
struct wlan_mlme_aux_dev_caps {
uint32_t supported_modes_bitmap;
uint32_t listen_pdev_id_map;
uint32_t emlsr_pdev_id_map;
};
/* struct wlan_mlme_generic - Generic CFG config items
*
* @band_capability: HW Band Capability - Both or 2.4G only or 5G only
@@ -1396,6 +1461,7 @@ struct wlan_user_mcc_quota {
* @safe_mode_enable: safe mode to bypass some strict 6 GHz checks for
* connection, bypass strict power levels
* @sr_enable_modes: modes for which SR(Spatial Reuse) is enabled
* @wlan_mlme_aux0_dev_caps: capability for aux0
*/
struct wlan_mlme_generic {
uint32_t band_capability;
@@ -1460,6 +1526,8 @@ struct wlan_mlme_generic {
#if defined(WLAN_FEATURE_SR)
uint32_t sr_enable_modes;
#endif
struct wlan_mlme_aux_dev_caps
wlan_mlme_aux0_dev_caps[WLAN_MLME_HW_MODE_MAX];
};
/**

Ver arquivo

@@ -662,6 +662,52 @@ wlan_mlme_update_cfg_with_tgt_caps(struct wlan_objmgr_psoc *psoc,
mlme_obj->cfg.gen.ocv_support = tgt_caps->ocv_support;
}
void
wlan_mlme_update_aux_dev_caps(
struct wlan_objmgr_psoc *psoc,
struct wlan_mlme_aux_dev_caps wlan_mlme_aux_dev_caps[])
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return;
qdf_mem_copy(&mlme_obj->cfg.gen.wlan_mlme_aux0_dev_caps[0],
&wlan_mlme_aux_dev_caps[0],
sizeof(mlme_obj->cfg.gen.wlan_mlme_aux0_dev_caps));
}
bool wlan_mlme_cfg_get_aux_supported_modes(
struct wlan_objmgr_psoc *psoc,
uint32_t aux_index,
enum wlan_mlme_hw_mode_config_type hw_mode_id,
uint32_t *supported_modes_bitmap)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
struct wlan_mlme_aux_dev_caps *wlan_mlme_aux0_dev_caps;
if (aux_index != 0) {
mlme_err("current only support aux0");
return false;
}
if (hw_mode_id >= WLAN_MLME_HW_MODE_MAX) {
mlme_err("invalid hw mode id %d.", hw_mode_id);
return false;
}
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj) {
mlme_err("MLME obj is NULL");
return false;
}
wlan_mlme_aux0_dev_caps = mlme_obj->cfg.gen.wlan_mlme_aux0_dev_caps;
*supported_modes_bitmap =
wlan_mlme_aux0_dev_caps[hw_mode_id].supported_modes_bitmap;
return true;
}
#ifdef WLAN_FEATURE_11AX
QDF_STATUS wlan_mlme_cfg_get_he_ul_mumimo(struct wlan_objmgr_psoc *psoc,
uint32_t *value)

Ver arquivo

@@ -172,6 +172,18 @@ struct wma_tgt_vht_cap {
uint32_t vht_mcs_10_11_supp;
};
/**
* struct wma_tgt_aux_dev_caps - aux capability in wma layer
* @supported_modes_bitmap: each bit define in WMI_AUX_DEV_CAPS_SUPPORTED_MODE
* @listen_pdev_id_map: define which AUX MAC can listen/scan for the HW mode
* @emlsr_pdev_id_map: define which AUX MAC can perform eMLSR for the HW mode
*/
struct wma_tgt_aux_dev_caps {
uint32_t supported_modes_bitmap;
uint32_t listen_pdev_id_map;
uint32_t emlsr_pdev_id_map;
};
/**
* struct board_info - Structure for board related information
* @bdf_version: board file version
@@ -278,5 +290,6 @@ struct wma_tgt_cfg {
tDot11fIEeht_cap eht_cap_2g;
tDot11fIEeht_cap eht_cap_5g;
#endif
struct wma_tgt_aux_dev_caps wma_aux0_dev_caps[WMI_HOST_HW_MODE_MAX];
};
#endif /* WMA_TGT_CFG_H */

Ver arquivo

@@ -5960,6 +5960,45 @@ static void wma_update_restricted_80p80_bw_support(tp_wma_handle wh,
tgt_cfg->restricted_80p80_bw_supp = false;
}
/**
* wma_update_aux_dev_caps() - update aux device capability
* @tgt_hdl: target psoc information
* @tgt_cfg: target configuration to be updated
*
* Update aux device capability to wma_tgt_cfg.
*
* Return: None
*/
static void wma_update_aux_dev_caps(struct target_psoc_info *tgt_hdl,
struct wma_tgt_cfg *tgt_cfg)
{
uint8_t cap_idx;
uint32_t num_aux_dev_caps;
struct wlan_psoc_host_aux_dev_caps *aux_dev_caps;
enum wmi_host_hw_mode_config_type hw_mode_id;
num_aux_dev_caps = tgt_hdl->info.service_ext2_param.num_aux_dev_caps;
aux_dev_caps = tgt_hdl->info.aux_dev_caps;
for (cap_idx = 0; cap_idx < num_aux_dev_caps; cap_idx++) {
/*current only support AUX0*/
if (aux_dev_caps[cap_idx].aux_index != 0)
continue;
hw_mode_id = aux_dev_caps[cap_idx].hw_mode_id;
if (hw_mode_id >= WMI_HOST_HW_MODE_MAX) {
wma_err("invalid hw mode id %d.", hw_mode_id);
continue;
}
tgt_cfg->wma_aux0_dev_caps[hw_mode_id].supported_modes_bitmap =
aux_dev_caps[cap_idx].supported_modes_bitmap;
tgt_cfg->wma_aux0_dev_caps[hw_mode_id].listen_pdev_id_map =
aux_dev_caps[cap_idx].listen_pdev_id_map;
tgt_cfg->wma_aux0_dev_caps[hw_mode_id].emlsr_pdev_id_map =
aux_dev_caps[cap_idx].emlsr_pdev_id_map;
}
}
#ifdef WLAN_SUPPORT_GREEN_AP
static void wma_green_ap_register_handlers(tp_wma_handle wma_handle)
{
@@ -6119,6 +6158,53 @@ static void wma_update_mlme_related_tgt_caps(struct wlan_objmgr_psoc *psoc,
wlan_mlme_update_cfg_with_tgt_caps(psoc, &mlme_tgt_cfg);
}
/**
* wma_update_mlme_aux_dev_caps() - update aux device capability to mlme
* @psoc: psoc handle
* @tgt_hdl: target psoc information
*
* Update aux device capability to mlme.
*
* Return: None
*/
static void wma_update_mlme_aux_dev_caps(struct wlan_objmgr_psoc *psoc,
struct target_psoc_info *tgt_hdl)
{
uint8_t cap_idx;
uint32_t num_aux_dev_caps;
struct wlan_psoc_host_aux_dev_caps *aux_dev_caps;
enum wmi_host_hw_mode_config_type hw_mode_id;
struct wlan_mlme_aux_dev_caps
wlan_mlme_aux0_dev_caps[WLAN_MLME_HW_MODE_MAX];
if (WMI_HOST_HW_MODE_MAX != WLAN_MLME_HW_MODE_MAX)
wma_err("struct define mismatch, pls fix it.");
num_aux_dev_caps =
tgt_hdl->info.service_ext2_param.num_aux_dev_caps;
aux_dev_caps = tgt_hdl->info.aux_dev_caps;
for (cap_idx = 0; cap_idx < num_aux_dev_caps; cap_idx++) {
/*current only support AUX0*/
if (aux_dev_caps[cap_idx].aux_index != 0)
continue;
hw_mode_id = aux_dev_caps[cap_idx].hw_mode_id;
if (hw_mode_id >= WMI_HOST_HW_MODE_MAX) {
wma_err("invalid hw mode id %d.", hw_mode_id);
continue;
}
wlan_mlme_aux0_dev_caps[hw_mode_id].supported_modes_bitmap =
aux_dev_caps[cap_idx].supported_modes_bitmap;
wlan_mlme_aux0_dev_caps[hw_mode_id].listen_pdev_id_map =
aux_dev_caps[cap_idx].listen_pdev_id_map;
wlan_mlme_aux0_dev_caps[hw_mode_id].emlsr_pdev_id_map =
aux_dev_caps[cap_idx].emlsr_pdev_id_map;
}
wlan_mlme_update_aux_dev_caps(psoc, wlan_mlme_aux0_dev_caps);
}
static bool
wma_is_dbs_mandatory(struct wlan_objmgr_psoc *psoc,
struct target_psoc_info *tgt_hdl)
@@ -6198,6 +6284,7 @@ static int wma_update_hdd_cfg(tp_wma_handle wma_handle)
return -EINVAL;
wma_update_mlme_related_tgt_caps(wma_handle->psoc, wmi_handle);
wma_update_mlme_aux_dev_caps(wma_handle->psoc, tgt_hdl);
if (wmi_service_enabled(wmi_handle, wmi_service_peer_create_conf))
wlan_psoc_nif_fw_ext_cap_set(wma_handle->psoc,
@@ -6266,6 +6353,7 @@ static int wma_update_hdd_cfg(tp_wma_handle wma_handle)
wma_update_bcast_twt_support(wma_handle, &tgt_cfg);
wma_update_twt_tgt_cap(wma_handle, &tgt_cfg);
wma_update_restricted_80p80_bw_support(wma_handle, &tgt_cfg);
wma_update_aux_dev_caps(tgt_hdl, &tgt_cfg);
/* Take the max of chains supported by FW, which will limit nss */
for (i = 0; i < tgt_hdl->info.total_mac_phy_cnt; i++)
wma_fill_chain_cfg(tgt_hdl, i);