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

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

Merge 4b9e7b8b on remote branch

Change-Id: I4bbe89cd03a5883bc79b90b5265ba1cc1c9a8346
parents fc98bbe8 4b9e7b8b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -389,6 +389,9 @@ HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_dp_aggregation.o
ifeq ($(CONFIG_DP_SWLM), y)
HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_swlm.o
endif
ifeq ($(CONFIG_WLAN_DUMP_IN_PROGRESS), y)
HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_dump_in_progress.o
endif
endif

ifeq ($(CONFIG_QCACLD_FEATURE_FW_STATE), y)
@@ -2799,6 +2802,7 @@ cppflags-$(CONFIG_WLAN_SYSFS_HE_BSS_COLOR) += -DWLAN_SYSFS_HE_BSS_COLOR
cppflags-$(CONFIG_WLAN_SYSFS_STA_INFO) += -DWLAN_SYSFS_STA_INFO
cppflags-$(CONFIG_WLAN_DL_MODES) += -DCONFIG_WLAN_DL_MODES
cppflags-$(CONFIG_WLAN_THERMAL_MULTI_CLIENT_SUPPORT) += -DFEATURE_WPSS_THERMAL_MITIGATION
cppflags-$(CONFIG_WLAN_DUMP_IN_PROGRESS) += -DCONFIG_WLAN_DUMP_IN_PROGRESS

ifeq ($(CONFIG_LEAK_DETECTION), y)
cppflags-y += \
@@ -2958,6 +2962,7 @@ cppflags-$(CONFIG_LL_DP_SUPPORT) += -DCONFIG_LL_DP_SUPPORT
cppflags-$(CONFIG_LL_DP_SUPPORT) += -DWLAN_FULL_REORDER_OFFLOAD
cppflags-$(CONFIG_WLAN_FEATURE_BIG_DATA_STATS) += -DWLAN_FEATURE_BIG_DATA_STATS
cppflags-$(CONFIG_WLAN_FEATURE_IGMP_OFFLOAD) += -DWLAN_FEATURE_IGMP_OFFLOAD
cppflags-$(CONFIG_WLAN_FEATURE_GET_USABLE_CHAN_LIST) += -DWLAN_FEATURE_GET_USABLE_CHAN_LIST

# For PCIe GEN switch
cppflags-$(CONFIG_PCIE_GEN_SWITCH) += -DPCIE_GEN_SWITCH
@@ -3313,6 +3318,7 @@ cppflags-y += -DPCI_LINK_STATUS_SANITY
cppflags-y += -DDP_MON_RSSI_IN_DBM
cppflags-y += -DSYSTEM_PM_CHECK
cppflags-y += -DDISABLE_EAPOL_INTRABSS_FWD
cppflags-y += -DDISABLE_MON_RING_MSI_CFG
endif

# Enable Low latency optimisation mode
+104 −1
Original line number Diff line number Diff line
@@ -42,6 +42,34 @@
/* invalid channel id. */
#define INVALID_CHANNEL_ID 0

/**
 * policy_mgr_debug_alert() - fatal error alert
 *
 * This function will flush host drv log and
 * disable all level logs.
 * It can be called in fatal error detected in policy
 * manager.
 * This is to avoid host log overwritten in stress
 * test to help issue debug.
 *
 * Return: none
 */
static void
policy_mgr_debug_alert(void)
{
	int module_id;
	int qdf_print_idx;

	policy_mgr_err("fatal error detected to flush and pause host log");
	qdf_logging_flush_logs();
	qdf_print_idx = qdf_get_pidx();
	for (module_id = 0; module_id < QDF_MODULE_ID_MAX; module_id++)
		qdf_print_set_category_verbose(
					qdf_print_idx,
					module_id, QDF_TRACE_LEVEL_NONE,
					0);
}

QDF_STATUS
policy_mgr_get_allow_mcc_go_diff_bi(struct wlan_objmgr_psoc *psoc,
				    uint8_t *allow_mcc_go_diff_bi)
@@ -1827,6 +1855,64 @@ void policy_mgr_clear_concurrency_mode(struct wlan_objmgr_psoc *psoc,
			 pm_ctx->no_of_open_sessions[mode]);
}

/**
 * policy_mgr_validate_conn_info() - validate conn info list
 * @psoc: PSOC object data
 *
 * This function will check connection list to see duplicated
 * vdev entry existing or not.
 *
 * Return: true if conn list is in abnormal state.
 */
static bool
policy_mgr_validate_conn_info(struct wlan_objmgr_psoc *psoc)
{
	uint32_t i, j, conn_num = 0;
	bool panic = false;
	struct policy_mgr_psoc_priv_obj *pm_ctx;

	pm_ctx = policy_mgr_get_context(psoc);
	if (!pm_ctx) {
		policy_mgr_err("Invalid Context");
		return true;
	}

	qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
	for (i = 0; i < MAX_NUMBER_OF_CONC_CONNECTIONS; i++) {
		if (pm_conc_connection_list[i].in_use) {
			for (j = i + 1; j < MAX_NUMBER_OF_CONC_CONNECTIONS;
									j++) {
				if (pm_conc_connection_list[j].in_use &&
				    pm_conc_connection_list[i].vdev_id ==
				    pm_conc_connection_list[j].vdev_id) {
					policy_mgr_debug(
					"dup entry %d",
					pm_conc_connection_list[i].vdev_id);
					panic = true;
				}
			}
			conn_num++;
		}
	}
	if (panic)
		policy_mgr_err("dup entry");

	for (i = 0, j = 0; i < QDF_MAX_NO_OF_MODE; i++)
		j += pm_ctx->no_of_active_sessions[i];

	if (j != conn_num) {
		policy_mgr_err("active session/conn count mismatch %d %d",
			       j, conn_num);
		panic = true;
	}
	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);

	if (panic)
		policy_mgr_debug_alert();

	return panic;
}

void policy_mgr_incr_active_session(struct wlan_objmgr_psoc *psoc,
				enum QDF_OPMODE mode,
				uint8_t session_id)
@@ -2148,6 +2234,7 @@ QDF_STATUS policy_mgr_decr_connection_count(struct wlan_objmgr_psoc *psoc,
	uint32_t conn_index = 0, next_conn_index = 0;
	bool found = false;
	struct policy_mgr_psoc_priv_obj *pm_ctx;
	bool panic = false;

	pm_ctx = policy_mgr_get_context(psoc);
	if (!pm_ctx) {
@@ -2197,8 +2284,21 @@ QDF_STATUS policy_mgr_decr_connection_count(struct wlan_objmgr_psoc *psoc,
	/* clean up the entry */
	qdf_mem_zero(&pm_conc_connection_list[next_conn_index - 1],
		sizeof(*pm_conc_connection_list));
	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);

	conn_index = 0;
	while (PM_CONC_CONNECTION_LIST_VALID_INDEX(conn_index)) {
		if (vdev_id == pm_conc_connection_list[conn_index].vdev_id) {
			panic = true;
			break;
		}
		conn_index++;
	}

	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
	if (panic) {
		policy_mgr_err("dup entry occur");
		policy_mgr_debug_alert();
	}
	if (pm_ctx->conc_cbacks.connection_info_update)
		pm_ctx->conc_cbacks.connection_info_update();

@@ -2547,6 +2647,7 @@ bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
	if (policy_mgr_max_concurrent_connections_reached(psoc)) {
		policy_mgr_rl_debug("Reached max concurrent connections: %d",
				    pm_ctx->cfg.max_conc_cxns);
		policy_mgr_validate_conn_info(psoc);
		goto done;
	}

@@ -3541,6 +3642,8 @@ void policy_mgr_dump_connection_status_info(struct wlan_objmgr_psoc *psoc)
				 pm_conc_connection_list[i].ch_flagext);
	}
	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);

	policy_mgr_validate_conn_info(psoc);
}

bool policy_mgr_is_any_mode_active_on_band_along_with_session(
+4 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ enum wlan_fwol_southbound_event {
};

/**
 * struct wlan_fwol_three_antenna_btc - Three antenna BTC config items
 * struct wlan_fwol_coex_config - BTC config items
 * @btc_mode: Config BTC mode
 * @antenna_isolation: Antenna isolation
 * @max_tx_power_for_btc: Max wlan tx power in co-ex scenario
@@ -77,6 +77,8 @@ enum wlan_fwol_southbound_event {
 *                             BT SCO connection is on
 * @btc_three_way_coex_config_legacy_enable: Enable/Disable tri-radio coex
 *                             config legacy feature
 * @ble_scan_coex_policy: BLE Scan policy, true - better BLE scan result, false
 *                        better wlan throughput
 */
struct wlan_fwol_coex_config {
	uint8_t btc_mode;
@@ -97,6 +99,7 @@ struct wlan_fwol_coex_config {
#ifdef FEATURE_COEX_CONFIG
	bool    btc_three_way_coex_config_legacy_enable;
#endif
	bool ble_scan_coex_policy;
};

#define FWOL_THERMAL_LEVEL_MAX 4
+2 −0
Original line number Diff line number Diff line
@@ -107,6 +107,8 @@ fwol_init_coex_config_in_cfg(struct wlan_objmgr_psoc *psoc,
	coex_config->bt_sco_allow_wlan_2g_scan =
				cfg_get(psoc, CFG_BT_SCO_ALLOW_WLAN_2G_SCAN);
	fwol_three_way_coex_config_legacy_config_get(psoc, coex_config);
	coex_config->ble_scan_coex_policy = cfg_get(psoc,
						    CFG_BLE_SCAN_COEX_POLICY);
}

static void
+26 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012 - 2019 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012 - 2019, 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
@@ -282,6 +282,29 @@
		1, \
		"Bt Sco Allow Wlan 2G Scan")

/*
 * <ini>
 * ble_scan_coex_policy - Ini to configure coex policy
 * @Min: 0
 * @Max: 1
 * @Default: 0
 *
 * 0 - Better BLE Advertiser reception performance
 * 1 - Better WLAN performance
 *
 * This ini is used to control the performance of ble scan case,’0’ to place
 * more emphasis on BLE Scan results , ‘1’ to place more emphasis on WLAN
 * performance
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_BLE_SCAN_COEX_POLICY CFG_INI_BOOL( \
		"ble_scan_coex_policy", \
		0, \
		"BLE scan Coex policy")

#ifdef FEATURE_COEX_CONFIG
/*
 * <ini>
@@ -327,5 +350,6 @@
	CFG(CFG_BT_INTERFERENCE_HIGH_UL) \
	COEX_MPTA_HELPER_CFG \
	CFG(CFG_BT_SCO_ALLOW_WLAN_2G_SCAN) \
	THREE_WAY_COEX_CONFIG_LEGACY_CFG
	THREE_WAY_COEX_CONFIG_LEGACY_CFG \
	CFG(CFG_BLE_SCAN_COEX_POLICY)
#endif
Loading