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

Commit 44d63309 authored by sheenam monga's avatar sheenam monga Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Add ini support for tx_retry_multiplier

Add ini support for tx_retry_multiplier and send
tx_retry_multiplier to fw as PDEV_STATS_TX_XRETRY_EXT
pdev param, so that fw can multiply the counter by the
percentage provided by user.

Change-Id: Ie2f06dc3aaa4a161a451b68abd085cc1537eb468
CRs-Fixed: 3066799
parent 166131e5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
@@ -436,6 +437,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
		cfg_get(psoc, CFG_SAE_CONNECION_RETRIES);
	gen->monitor_mode_concurrency =
		cfg_get(psoc, CFG_MONITOR_MODE_CONCURRENCY);
	gen->tx_retry_multiplier = cfg_get(psoc, CFG_TX_RETRY_MULTIPLIER);
}

static void mlme_init_edca_ani_cfg(struct wlan_objmgr_psoc *psoc,
+28 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
@@ -853,6 +854,31 @@ enum monitor_mode_concurrency {
	CFG_VALUE_OR_DEFAULT, \
	"Monitor mode concurrency supported")

/*
 * <ini>
 * tx_retry_multiplier - TX retry multiplier
 * @Min: 0
 * @Max: 500
 * @Default: 0
 *
 * This ini is used to indicate percentage to max retry limit to fw
 * which can further be used by fw to multiply counter by
 * tx_retry_multiplier percent.
 *
 * Supported Feature: STA/SAP
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_TX_RETRY_MULTIPLIER CFG_INI_UINT( \
	"tx_retry_multiplier", \
	0, \
	500, \
	0, \
	CFG_VALUE_OR_DEFAULT, \
	"percentage of max retry limit")

#define CFG_GENERIC_ALL \
	CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
	CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
@@ -887,5 +913,6 @@ enum monitor_mode_concurrency {
	CFG(CFG_DFS_CHAN_AGEOUT_TIME) \
	CFG(CFG_SAE_CONNECION_RETRIES) \
	CFG(CFG_WLS_6GHZ_CAPABLE) \
	CFG(CFG_MONITOR_MODE_CONCURRENCY)
	CFG(CFG_MONITOR_MODE_CONCURRENCY)\
	CFG(CFG_TX_RETRY_MULTIPLIER)
#endif /* __CFG_MLME_GENERIC_H */
+15 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
@@ -3194,4 +3195,18 @@ QDF_STATUS mlme_set_user_ps(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 * Return: True if user_ps flag is set
 */
bool mlme_get_user_ps(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);

/**
 * wlan_mlme_get_tx_retry_multiplier() - Get the tx retry multiplier percentage
 *
 * @psoc: pointer to psoc object
 * @tx_retry_multiplier: pointer to hold user config value of
 * tx_retry_multiplier
 *
 * Return: QDF Status
 */
QDF_STATUS
wlan_mlme_get_tx_retry_multiplier(struct wlan_objmgr_psoc *psoc,
				  uint32_t *tx_retry_multiplier);

#endif /* _WLAN_MLME_API_H_ */
+3 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
@@ -1232,6 +1233,7 @@ struct wlan_mlme_ratemask {
 * @enabled_rf_test_mode: Enable/disable the RF test mode config
 * @monitor_mode_concurrency: Monitor mode concurrency supported
 * @ocv_support: FW supports OCV or not
 * @tx_retry_multiplier: TX xretry extension parameter
 */
struct wlan_mlme_generic {
	uint32_t band_capability;
@@ -1276,6 +1278,7 @@ struct wlan_mlme_generic {
	bool enabled_rf_test_mode;
	enum monitor_mode_concurrency monitor_mode_concurrency;
	bool ocv_support;
	uint32_t tx_retry_multiplier;
};

/*
+19 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
@@ -4954,3 +4955,21 @@ bool mlme_get_user_ps(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)

	return usr_ps_enable;
}

QDF_STATUS
wlan_mlme_get_tx_retry_multiplier(struct wlan_objmgr_psoc *psoc,
				  uint32_t *tx_retry_multiplier)
{
	struct wlan_mlme_psoc_ext_obj *mlme_obj;

	mlme_obj = mlme_get_psoc_ext_obj(psoc);

	if (!mlme_obj) {
		*tx_retry_multiplier =
				cfg_default(CFG_TX_RETRY_MULTIPLIER);
		return QDF_STATUS_E_FAILURE;
	}

	*tx_retry_multiplier = mlme_obj->cfg.gen.tx_retry_multiplier;
	return QDF_STATUS_SUCCESS;
}
Loading