Merge "qcacld-3.0: Send 6G HE caps to userspace" into wlan-cld3.driver.lnx.2.0.8.r3-rel

This commit is contained in:
Linux Build Service Account 2023-10-10 08:43:35 -07:00 • committed by Gerrit - the friendly Code Review server
commit 8d6feacdba
4 changed files with 110 additions and 0 deletions

View file

@ -1468,6 +1468,16 @@ QDF_STATUS
wlan_mlme_cfg_set_vht_max_mpdu_len(struct wlan_objmgr_psoc *psoc,
uint8_t value);
/**
* wlan_mlme_cfg_get_ht_smps() - gets HT SM Power Save mode from cfg item
* @psoc: psoc context
* @value: data to be set
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_mlme_cfg_get_ht_smps(struct wlan_objmgr_psoc *psoc,
uint8_t *value);
/**
* wlan_mlme_cfg_get_vht_chan_width() - gets vht supported channel width from
* cfg item

View file

@ -4262,4 +4262,24 @@ ucfg_mlme_is_sta_mon_conc_supported(struct wlan_objmgr_psoc *psoc)
return wlan_mlme_is_sta_mon_conc_supported(psoc);
}
static inline QDF_STATUS
ucfg_mlme_cfg_get_vht_ampdu_len_exp(struct wlan_objmgr_psoc *psoc,
uint8_t *value)
{
return wlan_mlme_cfg_get_vht_ampdu_len_exp(psoc, value);
}
static inline QDF_STATUS
ucfg_mlme_cfg_get_vht_max_mpdu_len(struct wlan_objmgr_psoc *psoc,
uint8_t *value)
{
return wlan_mlme_cfg_get_vht_max_mpdu_len(psoc, value);
}
static inline QDF_STATUS
ucfg_mlme_cfg_get_ht_smps(struct wlan_objmgr_psoc *psoc,
uint8_t *value)
{
return wlan_mlme_cfg_get_ht_smps(psoc, value);
}
#endif /* _WLAN_MLME_UCFG_API_H_ */

View file

@ -1314,6 +1314,48 @@ QDF_STATUS wlan_mlme_get_wmm_uapsd_vo_sus_intv(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_cfg_get_vht_ampdu_len_exp(struct wlan_objmgr_psoc *psoc,
uint8_t *value)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return QDF_STATUS_E_FAILURE;
*value = mlme_obj->cfg.vht_caps.vht_cap_info.ampdu_len_exponent;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_cfg_get_vht_max_mpdu_len(struct wlan_objmgr_psoc *psoc,
uint8_t *value)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return QDF_STATUS_E_FAILURE;
*value = mlme_obj->cfg.vht_caps.vht_cap_info.ampdu_len;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_cfg_get_ht_smps(struct wlan_objmgr_psoc *psoc,
uint8_t *value)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return QDF_STATUS_E_FAILURE;
*value = mlme_obj->cfg.ht_caps.smps;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_mlme_get_wmm_dir_ac_vi(struct wlan_objmgr_psoc *psoc, uint8_t *value)
{

View file

@ -2255,6 +2255,42 @@ static void hdd_extract_fw_version_info(struct hdd_context *hdd_ctx)
#if defined(WLAN_FEATURE_11AX) && \
(defined(CFG80211_SBAND_IFTYPE_DATA_BACKPORT) || \
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)))
#if defined(CONFIG_BAND_6GHZ) && (KERNEL_VERSION(5, 8, 0) <= LINUX_VERSION_CODE)
static void hdd_update_wiphy_he_6ghz_capa(struct hdd_context *hdd_ctx)
{
uint16_t he_6ghz_capa = 0;
uint8_t min_mpdu_start_spacing;
uint8_t max_ampdu_len_exp;
uint8_t max_mpdu_len;
uint8_t sm_pow_save;
ucfg_mlme_get_ht_mpdu_density(hdd_ctx->psoc, &min_mpdu_start_spacing);
he_6ghz_capa |= FIELD_PREP(IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START,
min_mpdu_start_spacing);
ucfg_mlme_cfg_get_vht_ampdu_len_exp(hdd_ctx->psoc, &max_ampdu_len_exp);
he_6ghz_capa |= FIELD_PREP(IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP,
max_ampdu_len_exp);
ucfg_mlme_cfg_get_vht_max_mpdu_len(hdd_ctx->psoc, &max_mpdu_len);
he_6ghz_capa |= FIELD_PREP(IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN,
max_mpdu_len);
ucfg_mlme_cfg_get_ht_smps(hdd_ctx->psoc, &sm_pow_save);
he_6ghz_capa |= FIELD_PREP(IEEE80211_HE_6GHZ_CAP_SM_PS, sm_pow_save);
he_6ghz_capa |= IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS;
he_6ghz_capa |= IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS;
hdd_ctx->iftype_data_6g->he_6ghz_capa.capa = he_6ghz_capa;
}
#else
static inline void hdd_update_wiphy_he_6ghz_capa(struct hdd_context *hdd_ctx)
{
}
#endif
#if defined(CONFIG_BAND_6GHZ) && (defined(CFG80211_6GHZ_BAND_SUPPORTED) || \
(KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE))
static void
@ -2295,6 +2331,8 @@ hdd_update_wiphy_he_caps_6ghz(struct hdd_context *hdd_ctx,
if (he_cap_cfg->twt_responder)
mac_info_6g[0] |= IEEE80211_HE_MAC_CAP0_TWT_RES;
hdd_update_wiphy_he_6ghz_capa(hdd_ctx);
band_6g->iftype_data = hdd_ctx->iftype_data_6g;
}
#else