Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67d79f25 authored by Utkarsh Bhatnagar's avatar Utkarsh Bhatnagar
Browse files

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
parent e75b07b1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
/*
 * 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
 * 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
 * @tdls_osif_init_cb: Callback to initialize 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 wlan_objmgr_psoc *soc;
@@ -239,6 +240,9 @@ struct tdls_soc_priv_obj {
#endif
	tdls_vdev_init_cb tdls_osif_init_cb;
	tdls_vdev_deinit_cb tdls_osif_deinit_cb;
#ifdef WLAN_FEATURE_11AX
	bool fw_tdls_11ax_capability;
#endif
};

/**
+5 −0
Original line number Diff line number Diff line
@@ -88,6 +88,11 @@

#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
 * @TDLS_OPER_NONE: none
+48 −1
Original line number Diff line number Diff line
/*
 * 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
 * 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,
				   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
 * @psoc: psoc object
@@ -382,5 +417,17 @@ struct wlan_objmgr_vdev *ucfg_get_tdls_vdev(struct wlan_objmgr_psoc *psoc,
	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
+33 −1
Original line number Diff line number Diff line
/*
 * 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
 * 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;
}

#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,
				   struct tdls_start_params *req)
{
+22 −0
Original line number Diff line number Diff line
@@ -1676,6 +1676,27 @@ hdd_intersect_igmp_offload_setting(struct wlan_objmgr_psoc *psoc,
{}
#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,
				    struct wma_tgt_services *cfg)
{
@@ -1758,6 +1779,7 @@ static void hdd_update_tgt_services(struct hdd_context *hdd_ctx,
					cfg->ll_stats_per_chan_rx_tx_time;

	hdd_update_feature_cfg_club_get_sta_in_ll_stats_req(hdd_ctx, cfg);
	hdd_update_fw_tdls_11ax_capability(hdd_ctx, cfg);
}

/**
Loading