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

Commit 56bd165a authored by Jingxiang Ge's avatar Jingxiang Ge
Browse files

qcacld-3.0: Limit TPC power level for non-11be

when 11be is disabled, num_pwr_levels should not
exceed 8.
Limit num_pwr_levels before sending
WMI_VDEV_SET_TPC_POWER_CMDID.

Change-Id: I1e48d455f24b74479212441c7b42f7c11de7531b
CRs-Fixed: 3225090
parent c4a25367
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2081,6 +2081,12 @@ void lim_calculate_tpc(struct mac_context *mac,
							session->ch_width);
	}

	if (num_pwr_levels > MAX_NUM_PWR_LEVELS) {
		pe_debug("reset num_pwr_levels %d to MAX_NUM_PWR_LEVELS %d",
			 num_pwr_levels, MAX_NUM_PWR_LEVELS);
		num_pwr_levels = MAX_NUM_PWR_LEVELS;
	}

	ch_params.ch_width = CH_WIDTH_20MHZ;

	for (i = 0; i < num_pwr_levels; i++) {
+6 −0
Original line number Diff line number Diff line
@@ -105,6 +105,12 @@ typedef enum {
#define MAX_WAIT_FOR_BCN_TX_COMPLETE 4000
#define MAX_WAKELOCK_FOR_CSA         5000

#ifdef WLAN_FEATURE_11BE
#define MAX_NUM_PWR_LEVELS 16
#else
#define MAX_NUM_PWR_LEVELS 8
#endif

#ifdef WLAN_FEATURE_11W
typedef union uPmfSaQueryTimerId {
	struct {