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

Commit 6c3941b9 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge a8dbcb24 on remote branch

Change-Id: Ie50db9ac76a06672346b80850adc34de5ff6e2fe
parents 26671cb4 a8dbcb24
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -116,6 +116,8 @@ ifeq ($(KERNEL_BUILD), 0)

	ifeq ($(CONFIG_ARCH_SDM660), y)
	CONFIG_QCACLD_FEATURE_METERING := y
	#Flag to enable FIPS
	CONFIG_WLAN_FEATURE_FIPS := y
	endif

	ifeq ($(CONFIG_ARCH_SDM630), y)
@@ -297,6 +299,9 @@ endif
#Enable beacon reporting feature
CONFIG_WLAN_BEACON_REPORTING := y

#Enable/Disable FW thermal mitigation feature
CONFIG_WLAN_FW_THERMAL_MITIGATION := n

# Feature flags which are not (currently) configurable via Kconfig

#Whether to build debug version
@@ -1159,6 +1164,10 @@ ifeq ($(CONFIG_MPC_UT_FRAMEWORK),y)
WMA_OBJS +=	$(WMA_SRC_DIR)/wma_utils_ut.o
endif

ifeq ($(CONFIG_WLAN_FW_THERMAL_MITIGATION), y)
WMA_OBJS += $(WMA_SRC_DIR)/wma_thermal.o
endif

############## PLD ##########
PLD_DIR := core/pld
PLD_INC_DIR := $(PLD_DIR)/inc
@@ -1311,6 +1320,10 @@ CDEFINES := -DANI_LITTLE_BYTE_ENDIAN \
		-DCONFIG_HDD_INIT_WITH_RTNL_LOCK \
		-DMWS_COEX

ifeq ($(CONFIG_WLAN_FEATURE_FIPS), y)
CDEFINES += -DWLAN_FEATURE_FIPS
endif

ifneq ($(CONFIG_HIF_USB), 1)
CDEFINES += -DWLAN_LOGGING_SOCK_SVC_ENABLE
endif
@@ -1469,6 +1482,10 @@ ifeq ($(CONFIG_WLAN_BEACON_REPORTING),y)
CDEFINES += -DNTH_BEACON_OFFLOAD
endif

ifeq ($(CONFIG_WLAN_FW_THERMAL_MITIGATION),y)
CDEFINES += -DFW_THERMAL_THROTTLE_SUPPORT
endif

ifeq ($(BUILD_DIAG_VERSION),1)
CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT
CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_CSR
+40 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@
* CDS_DRIVER_STATE_BAD: Driver in bad state.
* CDS_DRIVER_STATE_FW_READY:
* CDS_DRIVER_STATE_MODULE_STOPPING: Module stop in progress.
* CDS_DRIVER_STATE_THERMAL_STATE: Driver in thermal mitigated state
*/
enum cds_driver_state {
CDS_DRIVER_STATE_UNINITIALIZED	 = 0,
@@ -67,6 +68,7 @@ CDS_DRIVER_STATE_RECOVERING = BIT(3),
CDS_DRIVER_STATE_BAD		 = BIT(4),
CDS_DRIVER_STATE_FW_READY	 = BIT(5),
CDS_DRIVER_STATE_MODULE_STOPPING = BIT(6),
CDS_DRIVER_STATE_THERMAL_STATE	 = BIT(7),
};

#define __CDS_IS_DRIVER_STATE(_state, _mask) (((_state) & (_mask)) == (_mask))
@@ -371,6 +373,44 @@ enum cds_driver_state state = cds_get_driver_state();
return __CDS_IS_DRIVER_STATE(state, CDS_DRIVER_STATE_LOADED);
}

#ifdef FW_THERMAL_THROTTLE_SUPPORT
/**
 * cds_set_driver_thermal_mitigated() - Setting the flag to indicate that driver
 * is in thermal mitigation state.
 *
 * @value: A boolean value to indicate to set or reset
 *
 * Return: None
 */
static inline void cds_set_driver_thermal_mitigated(bool value)
{
	if (value)
		cds_set_driver_state(CDS_DRIVER_STATE_THERMAL_STATE);
	else
		cds_clear_driver_state(CDS_DRIVER_STATE_THERMAL_STATE);
}

/**
 * cds_is_driver_thermal_mitigated() - Check if driver is in power save state
 *
 * Return: True if in power save state, false otherwise
 */
static inline bool cds_is_driver_thermal_mitigated(void)
{
	enum cds_driver_state state = cds_get_driver_state();

	return __CDS_IS_DRIVER_STATE(state, CDS_DRIVER_STATE_THERMAL_STATE);
}
#else
static inline void cds_set_driver_thermal_mitigated(bool value)
{
}

static inline bool cds_is_driver_thermal_mitigated(void)
{
	return false;
}
#endif
v_CONTEXT_t cds_init(void);
void cds_deinit(void);

+7 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2019 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
@@ -156,6 +156,8 @@ enum cds_auto_pwr_detect_failure_mode_t {
 * @etsi_srd_chan_in_master_mode: Use of ETSI SRD chan in SAP/P2P-GO ACS/PCL
 * @dot11p_mode: dot11p user configuration
 * @dfs_master_enable: DFS master capability
 * @thermal_sampling_time: Thermal throttling sampling time in ms
 * @thermal_throt_dc: Thermal throttling duty cycle to be enforced
 * Structure for holding cds ini parameters.
 */

@@ -223,6 +225,10 @@ struct cds_config_info {
	bool etsi_srd_chan_in_master_mode;
	uint8_t dot11p_mode;
	bool dfs_master_enable;
#ifdef FW_THERMAL_THROTTLE_SUPPORT
	uint16_t thermal_sampling_time;
	uint16_t thermal_throt_dc;
#endif
};

#ifdef WLAN_FEATURE_FILS_SK
+4 −7
Original line number Diff line number Diff line
@@ -11372,7 +11372,6 @@ bool cds_is_valid_channel_for_channel_switch(uint8_t channel)
	uint32_t sap_count;
	enum channel_state state;
	hdd_context_t *hdd_ctx;
	bool is_safe;

	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);

@@ -11384,14 +11383,12 @@ bool cds_is_valid_channel_for_channel_switch(uint8_t channel)
	sta_sap_scc_on_dfs_chan = cds_is_sta_sap_scc_allowed_on_dfs_channel();
	sap_count = cds_mode_specific_connection_count(CDS_SAP_MODE, NULL);
	state = cds_get_channel_state(channel);
	is_safe = cds_is_safe_channel(channel);

	cds_debug("is_safe %u, sta_sap_scc_on_dfs_chan %u, sap_count %u, channel %u, state %u",
			is_safe, sta_sap_scc_on_dfs_chan, sap_count, channel,
			state);
	cds_debug("sta_sap_scc_on_dfs_chan %u, sap_count %u, channel %u, state %u",
		  sta_sap_scc_on_dfs_chan, sap_count, channel, state);

	if (is_safe && ((state == CHANNEL_STATE_ENABLE) || (sap_count == 0) ||
		((state == CHANNEL_STATE_DFS) && sta_sap_scc_on_dfs_chan))) {
	if ((state == CHANNEL_STATE_ENABLE) || (sap_count == 0) ||
		((state == CHANNEL_STATE_DFS) && sta_sap_scc_on_dfs_chan)) {
		cds_debug("Valid channel for channel switch");
		return true;
	}
+1 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2019 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
@@ -759,7 +759,6 @@ void ol_txrx_peer_remove_obj_map_entries(ol_txrx_pdev_handle pdev,
				peer_id_ref_cnt);
		num_deleted_maps += peer_id_ref_cnt;
		pdev->peer_id_to_obj_map[peer_id].peer = NULL;
		peer->peer_ids[i] = HTT_INVALID_PEER;

		if (peer_id_ref_cnt)
			pdev->peer_id_to_obj_map[peer_id].peer_ref = peer;
Loading