qcacld-3.0: Enable TDLS 11AX only if supported by FW
Don't fill the 11ax capabilities if FW doesn't support TDLS 11AX capability. Change-Id: I267ccaa439bb3cf17d27493172b4f324d112724b CRs-Fixed: 2925250
This commit is contained in:

committed by
Madan Koyyalamudi

parent
5f7a749e92
commit
c7e32c7021
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -191,6 +191,7 @@ struct tdls_set_state_info {
|
|||||||
* @runtime_lock: runtime lock
|
* @runtime_lock: runtime lock
|
||||||
* @tdls_osif_init_cb: Callback to initialize the tdls private
|
* @tdls_osif_init_cb: Callback to initialize the tdls private
|
||||||
* @tdls_osif_deinit_cb: Callback to deinitialize the tdls private
|
* @tdls_osif_deinit_cb: Callback to deinitialize the tdls private
|
||||||
|
* @fw_tdls_11ax_capablity: bool for tdls 11ax fw capability
|
||||||
*/
|
*/
|
||||||
struct tdls_soc_priv_obj {
|
struct tdls_soc_priv_obj {
|
||||||
struct wlan_objmgr_psoc *soc;
|
struct wlan_objmgr_psoc *soc;
|
||||||
@@ -239,6 +240,9 @@ struct tdls_soc_priv_obj {
|
|||||||
#endif
|
#endif
|
||||||
tdls_vdev_init_cb tdls_osif_init_cb;
|
tdls_vdev_init_cb tdls_osif_init_cb;
|
||||||
tdls_vdev_deinit_cb tdls_osif_deinit_cb;
|
tdls_vdev_deinit_cb tdls_osif_deinit_cb;
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
bool fw_tdls_11ax_capability;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -88,6 +88,11 @@
|
|||||||
|
|
||||||
#define INVALID_TDLS_PEER_INDEX 0xFF
|
#define INVALID_TDLS_PEER_INDEX 0xFF
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
#define MIN_TDLS_HE_CAP_LEN 17
|
||||||
|
#define MAX_TDLS_HE_CAP_LEN 29
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum tdls_add_oper - add peer type
|
* enum tdls_add_oper - add peer type
|
||||||
* @TDLS_OPER_NONE: none
|
* @TDLS_OPER_NONE: none
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -74,6 +74,41 @@ QDF_STATUS ucfg_tdls_psoc_close(struct wlan_objmgr_psoc *psoc);
|
|||||||
QDF_STATUS ucfg_tdls_update_config(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS ucfg_tdls_update_config(struct wlan_objmgr_psoc *psoc,
|
||||||
struct tdls_start_params *req);
|
struct tdls_start_params *req);
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
/**
|
||||||
|
* ucfg_tdls_update_fw_11ax_support() - Update FW TDLS 11ax capability in TLDS
|
||||||
|
* Component
|
||||||
|
* @psoc: psoc object
|
||||||
|
* @is_fw_tdls_11ax_capable: bool if fw is tdls 11ax capable then it is true
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
void ucfg_tdls_update_fw_11ax_capability(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool is_fw_tdls_11ax_capable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_tdls_is_fw_11ax_supported() - Get FW TDLS 11ax capability from TLDS
|
||||||
|
* component.
|
||||||
|
* @psoc: psoc object
|
||||||
|
*
|
||||||
|
* Return: true if fw supports tdls 11ax
|
||||||
|
*/
|
||||||
|
bool ucfg_tdls_is_fw_11ax_capable(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
void ucfg_tdls_update_fw_11ax_capability(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool is_fw_tdls_11ax_capable)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
bool ucfg_tdls_is_fw_11ax_capable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ucfg_tdls_psoc_enable() - TDLS module enable API
|
* ucfg_tdls_psoc_enable() - TDLS module enable API
|
||||||
* @psoc: psoc object
|
* @psoc: psoc object
|
||||||
@@ -409,5 +444,16 @@ struct wlan_objmgr_vdev *ucfg_get_tdls_vdev(struct wlan_objmgr_psoc *psoc,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
void ucfg_tdls_update_fw_11ax_capability(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool is_fw_tdls_11ax_capable)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
bool ucfg_tdls_is_fw_11ax_capable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#endif /* FEATURE_WLAN_TDLS */
|
#endif /* FEATURE_WLAN_TDLS */
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -317,6 +317,38 @@ QDF_STATUS ucfg_tdls_psoc_open(struct wlan_objmgr_psoc *psoc)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
void ucfg_tdls_update_fw_11ax_capability(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool is_fw_tdls_11ax_capable)
|
||||||
|
{
|
||||||
|
struct tdls_soc_priv_obj *soc_obj;
|
||||||
|
|
||||||
|
soc_obj = wlan_objmgr_psoc_get_comp_private_obj(psoc,
|
||||||
|
WLAN_UMAC_COMP_TDLS);
|
||||||
|
if (!soc_obj) {
|
||||||
|
tdls_err("Failed to get tdls psoc component");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
soc_obj->fw_tdls_11ax_capability = is_fw_tdls_11ax_capable;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ucfg_tdls_is_fw_11ax_capable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct tdls_soc_priv_obj *soc_obj;
|
||||||
|
|
||||||
|
soc_obj = wlan_objmgr_psoc_get_comp_private_obj(psoc,
|
||||||
|
WLAN_UMAC_COMP_TDLS);
|
||||||
|
if (!soc_obj) {
|
||||||
|
tdls_err("Failed to get tdls psoc component");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
tdls_debug("FW 11AX capability %d", soc_obj->fw_tdls_11ax_capability);
|
||||||
|
|
||||||
|
return soc_obj->fw_tdls_11ax_capability;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS ucfg_tdls_update_config(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS ucfg_tdls_update_config(struct wlan_objmgr_psoc *psoc,
|
||||||
struct tdls_start_params *req)
|
struct tdls_start_params *req)
|
||||||
{
|
{
|
||||||
|
@@ -1683,6 +1683,27 @@ hdd_intersect_igmp_offload_setting(struct wlan_objmgr_psoc *psoc,
|
|||||||
{}
|
{}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef FEATURE_WLAN_TDLS
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
static void hdd_update_fw_tdls_11ax_capability(struct hdd_context *hdd_ctx,
|
||||||
|
struct wma_tgt_services *cfg)
|
||||||
|
{
|
||||||
|
ucfg_tdls_update_fw_11ax_capability(hdd_ctx->psoc,
|
||||||
|
cfg->en_tdls_11ax_support);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
void hdd_update_fw_tdls_11ax_capability(struct hdd_context *hdd_ctx,
|
||||||
|
struct wma_tgt_services *cfg)
|
||||||
|
{}
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
void hdd_update_fw_tdls_11ax_capability(struct hdd_context *hdd_ctx,
|
||||||
|
struct wma_tgt_services *cfg)
|
||||||
|
{}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void hdd_update_tgt_services(struct hdd_context *hdd_ctx,
|
static void hdd_update_tgt_services(struct hdd_context *hdd_ctx,
|
||||||
struct wma_tgt_services *cfg)
|
struct wma_tgt_services *cfg)
|
||||||
{
|
{
|
||||||
@@ -1769,6 +1790,7 @@ static void hdd_update_tgt_services(struct hdd_context *hdd_ctx,
|
|||||||
cfg->is_fw_therm_throt_supp &&
|
cfg->is_fw_therm_throt_supp &&
|
||||||
cfg_get(hdd_ctx->psoc,
|
cfg_get(hdd_ctx->psoc,
|
||||||
CFG_THERMAL_MITIGATION_ENABLE);
|
CFG_THERMAL_MITIGATION_ENABLE);
|
||||||
|
hdd_update_fw_tdls_11ax_capability(hdd_ctx, cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -784,8 +784,6 @@ static void populate_dot11f_tdls_ht_vht_cap(struct mac_context *mac,
|
|||||||
|
|
||||||
#ifdef WLAN_FEATURE_11AX
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
|
||||||
#define LIM_TDLS_MIN_LEN 21
|
|
||||||
|
|
||||||
static void lim_tdls_set_he_chan_width(tDot11fIEhe_cap *heCap,
|
static void lim_tdls_set_he_chan_width(tDot11fIEhe_cap *heCap,
|
||||||
struct pe_session *session)
|
struct pe_session *session)
|
||||||
{
|
{
|
||||||
@@ -888,7 +886,7 @@ lim_tdls_populate_dot11f_he_caps(struct mac_context *mac,
|
|||||||
struct he_capability_info he_cap;
|
struct he_capability_info he_cap;
|
||||||
} uHECapInfo;
|
} uHECapInfo;
|
||||||
|
|
||||||
if (add_sta_req->he_cap_len < LIM_TDLS_MIN_LEN) {
|
if (add_sta_req->he_cap_len < MIN_TDLS_HE_CAP_LEN) {
|
||||||
pe_debug("He_capability invalid");
|
pe_debug("He_capability invalid");
|
||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
* @en_tdls_offchan: enable tdls offchan
|
* @en_tdls_offchan: enable tdls offchan
|
||||||
* @en_tdls_uapsd_buf_sta: enable sta tdls uapsd buf
|
* @en_tdls_uapsd_buf_sta: enable sta tdls uapsd buf
|
||||||
* @en_tdls_uapsd_sleep_sta: enable sta tdls uapsd sleep
|
* @en_tdls_uapsd_sleep_sta: enable sta tdls uapsd sleep
|
||||||
|
* @en_tdls_11ax_support: Get TDLS ax support
|
||||||
* @en_roam_offload: enable roam offload
|
* @en_roam_offload: enable roam offload
|
||||||
* @en_11ax: enable 11ax
|
* @en_11ax: enable 11ax
|
||||||
* @is_fw_mawc_capable: Motion Aided Wireless Connectivity feature
|
* @is_fw_mawc_capable: Motion Aided Wireless Connectivity feature
|
||||||
@@ -69,6 +70,9 @@ struct wma_tgt_services {
|
|||||||
bool en_tdls_offchan;
|
bool en_tdls_offchan;
|
||||||
bool en_tdls_uapsd_buf_sta;
|
bool en_tdls_uapsd_buf_sta;
|
||||||
bool en_tdls_uapsd_sleep_sta;
|
bool en_tdls_uapsd_sleep_sta;
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
bool en_tdls_11ax_support;
|
||||||
|
#endif
|
||||||
#endif /* FEATURE_WLAN_TDLS */
|
#endif /* FEATURE_WLAN_TDLS */
|
||||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||||
bool en_roam_offload;
|
bool en_roam_offload;
|
||||||
|
@@ -4554,6 +4554,36 @@ wma_get_igmp_offload_enable(struct wmi_unified *wmi_handle,
|
|||||||
{}
|
{}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
#ifdef FEATURE_WLAN_TDLS
|
||||||
|
/**
|
||||||
|
* wma_get_tdls_ax_support() - update tgt service with service tdls ax support
|
||||||
|
* @wmi_handle: Unified wmi handle
|
||||||
|
* @cfg: target services
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
wma_get_tdls_ax_support(struct wmi_unified *wmi_handle,
|
||||||
|
struct wma_tgt_services *cfg)
|
||||||
|
{
|
||||||
|
cfg->en_tdls_11ax_support = wmi_service_enabled(
|
||||||
|
wmi_handle,
|
||||||
|
wmi_service_tdls_ax_support);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void
|
||||||
|
wma_get_tdls_ax_support(struct wmi_unified *wmi_handle,
|
||||||
|
struct wma_tgt_services *cfg)
|
||||||
|
{}
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
static inline void
|
||||||
|
wma_get_tdls_ax_support(struct wmi_unified *wmi_handle,
|
||||||
|
struct wma_tgt_services *cfg)
|
||||||
|
{}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wma_update_target_services() - update target services from wma handle
|
* wma_update_target_services() - update target services from wma handle
|
||||||
* @wmi_handle: Unified wmi handle
|
* @wmi_handle: Unified wmi handle
|
||||||
@@ -4696,6 +4726,7 @@ static inline void wma_update_target_services(struct wmi_unified *wmi_handle,
|
|||||||
wma_get_service_cap_club_get_sta_in_ll_stats_req(wmi_handle, cfg);
|
wma_get_service_cap_club_get_sta_in_ll_stats_req(wmi_handle, cfg);
|
||||||
|
|
||||||
wma_get_igmp_offload_enable(wmi_handle, cfg);
|
wma_get_igmp_offload_enable(wmi_handle, cfg);
|
||||||
|
wma_get_tdls_ax_support(wmi_handle, cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
#include <wlan_reg_services_api.h>
|
#include <wlan_reg_services_api.h>
|
||||||
#include "wlan_cfg80211_mc_cp_stats.h"
|
#include "wlan_cfg80211_mc_cp_stats.h"
|
||||||
#include "sir_api.h"
|
#include "sir_api.h"
|
||||||
|
#include "wlan_tdls_ucfg_api.h"
|
||||||
|
|
||||||
#define TDLS_MAX_NO_OF_2_4_CHANNELS 14
|
#define TDLS_MAX_NO_OF_2_4_CHANNELS 14
|
||||||
|
|
||||||
@@ -238,8 +238,6 @@ tdls_calc_channels_from_staparams(struct tdls_update_peer_params *req_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_11AX
|
#ifdef WLAN_FEATURE_11AX
|
||||||
#define MIN_TDLS_HE_CAP_LEN 17
|
|
||||||
#define MAX_TDLS_HE_CAP_LEN 29
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info,
|
wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info,
|
||||||
@@ -276,7 +274,8 @@ wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
wlan_cfg80211_tdls_extract_params(struct tdls_update_peer_params *req_info,
|
wlan_cfg80211_tdls_extract_params(struct tdls_update_peer_params *req_info,
|
||||||
struct station_parameters *params)
|
struct station_parameters *params,
|
||||||
|
bool tdls_11ax_support)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -356,8 +355,10 @@ wlan_cfg80211_tdls_extract_params(struct tdls_update_peer_params *req_info,
|
|||||||
osif_debug("TDLS peer pmf capable");
|
osif_debug("TDLS peer pmf capable");
|
||||||
req_info->is_pmf = 1;
|
req_info->is_pmf = 1;
|
||||||
}
|
}
|
||||||
|
if (tdls_11ax_support)
|
||||||
wlan_cfg80211_tdls_extract_he_params(req_info, params);
|
wlan_cfg80211_tdls_extract_he_params(req_info, params);
|
||||||
|
else
|
||||||
|
osif_debug("tdls ax disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
int wlan_cfg80211_tdls_update_peer(struct wlan_objmgr_vdev *vdev,
|
int wlan_cfg80211_tdls_update_peer(struct wlan_objmgr_vdev *vdev,
|
||||||
@@ -369,6 +370,8 @@ int wlan_cfg80211_tdls_update_peer(struct wlan_objmgr_vdev *vdev,
|
|||||||
struct vdev_osif_priv *osif_priv;
|
struct vdev_osif_priv *osif_priv;
|
||||||
struct osif_tdls_vdev *tdls_priv;
|
struct osif_tdls_vdev *tdls_priv;
|
||||||
unsigned long rc;
|
unsigned long rc;
|
||||||
|
struct wlan_objmgr_psoc *psoc;
|
||||||
|
bool tdls_11ax_support = false;
|
||||||
|
|
||||||
status = wlan_cfg80211_tdls_validate_mac_addr(mac);
|
status = wlan_cfg80211_tdls_validate_mac_addr(mac);
|
||||||
|
|
||||||
@@ -382,7 +385,14 @@ int wlan_cfg80211_tdls_update_peer(struct wlan_objmgr_vdev *vdev,
|
|||||||
if (!req_info)
|
if (!req_info)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
wlan_cfg80211_tdls_extract_params(req_info, params);
|
psoc = wlan_vdev_get_psoc(vdev);
|
||||||
|
if (!psoc) {
|
||||||
|
osif_err_rl("Invalid psoc");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
tdls_11ax_support = ucfg_tdls_is_fw_11ax_capable(psoc);
|
||||||
|
wlan_cfg80211_tdls_extract_params(req_info, params, tdls_11ax_support);
|
||||||
|
|
||||||
osif_priv = wlan_vdev_get_ospriv(vdev);
|
osif_priv = wlan_vdev_get_ospriv(vdev);
|
||||||
if (!osif_priv || !osif_priv->osif_tdls) {
|
if (!osif_priv || !osif_priv->osif_tdls) {
|
||||||
|
Reference in New Issue
Block a user