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

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

Merge a9e21e15 on remote branch

Change-Id: I360b167f2b02ce8ec86c067e5e197c8a788242c1
parents f15e30e2 a9e21e15
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3316,6 +3316,7 @@ cppflags-$(CONFIG_HIF_CPU_PERF_AFFINE_MASK) += -DHIF_CPU_PERF_AFFINE_MASK
cppflags-$(CONFIG_SMMU_S1_UNMAP) += -DCONFIG_SMMU_S1_UNMAP
cppflags-$(CONFIG_GENERIC_SHADOW_REGISTER_ACCESS_ENABLE) += -DGENERIC_SHADOW_REGISTER_ACCESS_ENABLE
cppflags-$(CONFIG_IPA_SET_RESET_TX_DB_PA) += -DIPA_SET_RESET_TX_DB_PA
cppflags-$(CONFIG_DUMP_REO_QUEUE_INFO_IN_DDR) += -DDUMP_REO_QUEUE_INFO_IN_DDR

KBUILD_CPPFLAGS += $(cppflags-y)

+48 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 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
@@ -288,6 +289,8 @@ blm_filter_bssid(struct wlan_objmgr_pdev *pdev, qdf_list_t *scan_list)
	uint32_t scan_list_size;
	enum blm_bssid_action action;
	qdf_list_node_t *cur_node = NULL, *next_node = NULL;
	struct scan_cache_node *force_connect_candidate = NULL;
	bool are_all_candidate_blacklisted = true;

	if (!scan_list || !qdf_list_size(scan_list)) {
		blm_debug("Scan list is NULL or No BSSIDs present");
@@ -303,6 +306,43 @@ blm_filter_bssid(struct wlan_objmgr_pdev *pdev, qdf_list_t *scan_list)
		scan_node = qdf_container_of(cur_node, struct scan_cache_node,
					    node);
		action = blm_action_on_bssid(pdev, scan_node->entry);

		if (are_all_candidate_blacklisted &&
		    (action == BLM_ACTION_NOP ||
		     action == BLM_MOVE_AT_LAST))
			are_all_candidate_blacklisted = false;

		/*
		 * The below logic is added to select the best candidate
		 * amongst the blacklisted candidates. This is done to
		 * handle a case where all the BSSIDs become blacklisted
		 * and hence there are continuous connection failures.
		 * With the below logic if the action on BSSID is to remove
		 * then we keep a backup node and restore the candidate
		 * list.
		 */
		if (action == BLM_REMOVE_FROM_LIST &&
		    are_all_candidate_blacklisted) {
			if (!force_connect_candidate) {
				force_connect_candidate =
					qdf_mem_malloc(
					   sizeof(*force_connect_candidate));
				if (!force_connect_candidate)
					return QDF_STATUS_E_NOMEM;
				force_connect_candidate->entry =
				   util_scan_copy_cache_entry(scan_node->entry);
				if (!force_connect_candidate->entry)
					return QDF_STATUS_E_NOMEM;
			} else if (scan_node->entry->bss_score >
				   force_connect_candidate->entry->bss_score) {
				util_scan_free_cache_entry(
					force_connect_candidate->entry);
				force_connect_candidate->entry =
				  util_scan_copy_cache_entry(scan_node->entry);
				if (!force_connect_candidate->entry)
					return QDF_STATUS_E_NOMEM;
			}
		}
		if (action != BLM_ACTION_NOP)
			blm_modify_scan_list(scan_list, scan_node, action);
		cur_node = next_node;
@@ -310,6 +350,14 @@ blm_filter_bssid(struct wlan_objmgr_pdev *pdev, qdf_list_t *scan_list)
		scan_list_size--;
	}

	if (are_all_candidate_blacklisted && force_connect_candidate) {
		qdf_list_insert_front(scan_list,
				      &force_connect_candidate->node);
	} else if (force_connect_candidate) {
		util_scan_free_cache_entry(force_connect_candidate->entry);
		qdf_mem_free(force_connect_candidate);
	}

	return QDF_STATUS_SUCCESS;
}

+9 −0
Original line number Diff line number Diff line
@@ -608,4 +608,13 @@ QDF_STATUS mlme_get_cfg_wlm_reset(struct wlan_objmgr_psoc *psoc,
 */
void mlme_reinit_control_config_lfr_params(struct wlan_objmgr_psoc *psoc,
					   struct wlan_mlme_lfr_cfg *lfr);

/**
 * wlan_is_vdev_id_up() - check if vdev id is in UP state
 * @pdev: Pointer to pdev
 * @vdev_id: vdev id
 *
 * Return: if vdev is up
 */
bool wlan_is_vdev_id_up(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id);
#endif
+62 −5
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.
 * Copyright (c) 2021-2022 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
@@ -234,6 +234,42 @@ static void mlme_init_chainmask_cfg(struct wlan_objmgr_psoc *psoc,
		cfg_get(psoc, CFG_ENABLE_BT_CHAIN_SEPARATION);
}

static void mlme_init_ratemask_cfg(struct wlan_objmgr_psoc *psoc,
				   struct wlan_mlme_ratemask *ratemask_cfg)
{
	uint32_t masks[CFG_MLME_RATE_MASK_LEN] = { 0 };
	qdf_size_t len = 0;
	QDF_STATUS status;

	ratemask_cfg->type = cfg_get(psoc, CFG_RATEMASK_TYPE);
	if ((ratemask_cfg->type <= WLAN_MLME_RATEMASK_TYPE_NO_MASK) ||
	    (ratemask_cfg->type >= WLAN_MLME_RATEMASK_TYPE_MAX)) {
		mlme_legacy_debug("Ratemask disabled");
		return;
	}

	status = qdf_uint32_array_parse(cfg_get(psoc, CFG_RATEMASK_SET),
					masks,
					CFG_MLME_RATE_MASK_LEN,
					&len);

	if (status != QDF_STATUS_SUCCESS || len != CFG_MLME_RATE_MASK_LEN) {
		/* Do not enable ratemaks if config is invalid */
		ratemask_cfg->type = WLAN_MLME_RATEMASK_TYPE_NO_MASK;
		mlme_legacy_err("Failed to parse ratemask");
		return;
	}

	ratemask_cfg->lower32 = masks[0];
	ratemask_cfg->higher32 = masks[1];
	ratemask_cfg->lower32_2 = masks[2];
	ratemask_cfg->higher32_2 = masks[3];
	mlme_legacy_debug("Ratemask type: %d, masks:0x%x, 0x%x, 0x%x, 0x%x",
			  ratemask_cfg->type, ratemask_cfg->lower32,
			  ratemask_cfg->higher32, ratemask_cfg->lower32_2,
			  ratemask_cfg->higher32_2);
}

#ifdef WLAN_FEATURE_11W
static void mlme_init_pmf_cfg(struct wlan_objmgr_psoc *psoc,
			      struct wlan_mlme_generic *gen)
@@ -1059,13 +1095,13 @@ static void mlme_init_he_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
	he_caps->dot11_he_cap.rx_full_bw_su_he_mu_non_cmpr_sigb =
			cfg_default(CFG_HE_RX_FULL_BW_MU_NON_CMPR_SIGB);
	he_caps->dot11_he_cap.rx_he_mcs_map_lt_80 =
			cfg_default(CFG_HE_RX_MCS_MAP_LT_80);
			cfg_get(psoc, CFG_HE_RX_MCS_MAP_LT_80);
	he_caps->dot11_he_cap.tx_he_mcs_map_lt_80 =
			cfg_default(CFG_HE_TX_MCS_MAP_LT_80);
	value = cfg_default(CFG_HE_RX_MCS_MAP_160);
			cfg_get(psoc, CFG_HE_TX_MCS_MAP_LT_80);
	value = cfg_get(psoc, CFG_HE_RX_MCS_MAP_160);
	qdf_mem_copy(he_caps->dot11_he_cap.rx_he_mcs_map_160, &value,
		     sizeof(uint16_t));
	value = cfg_default(CFG_HE_TX_MCS_MAP_160);
	value = cfg_get(psoc, CFG_HE_TX_MCS_MAP_160);
	qdf_mem_copy(he_caps->dot11_he_cap.tx_he_mcs_map_160, &value,
		     sizeof(uint16_t));
	value = cfg_default(CFG_HE_RX_MCS_MAP_80_80);
@@ -1202,6 +1238,8 @@ static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc,
		(bool)cfg_default(CFG_OBSS_DETECTION_OFFLOAD);
	obss_ht40->obss_color_collision_offload_enabled =
		(bool)cfg_default(CFG_OBSS_COLOR_COLLISION_OFFLOAD);
	obss_ht40->bss_color_collision_det_sta =
		cfg_get(psoc, CFG_BSS_CLR_COLLISION_DETCN_STA);
}

static void mlme_init_threshold_cfg(struct wlan_objmgr_psoc *psoc,
@@ -2447,6 +2485,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
	mlme_init_reg_cfg(psoc, &mlme_cfg->reg);
	mlme_init_btm_cfg(psoc, &mlme_cfg->btm);
	mlme_init_roam_score_config(psoc, mlme_cfg);
	mlme_init_ratemask_cfg(psoc, &mlme_cfg->ratemask_cfg);

	return status;
}
@@ -3076,4 +3115,22 @@ void mlme_set_roam_state(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
	mlme_priv->mlme_roam.roam_sm.state = new_state;
	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);
}

bool wlan_is_vdev_id_up(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
{
	struct wlan_objmgr_vdev *vdev;
	bool is_up = false;

	if (!pdev)
		return is_up;

	vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
						    WLAN_LEGACY_MAC_ID);
	if (vdev) {
		is_up = QDF_IS_STATUS_SUCCESS(wlan_vdev_is_up(vdev));
		wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
	}

	return is_up;
}
#endif
+132 −9
Original line number Diff line number Diff line
@@ -507,35 +507,158 @@
				0, \
				"He Rx Full Bw Mu Non Cmpr Sigb")

#define CFG_HE_RX_MCS_MAP_LT_80 CFG_UINT( \
/* 11AX related INI configuration */
/*
 * <ini>
 * he_rx_mcs_map_lt_80 - configure Rx HE-MCS Map for ≤ 80 MHz
 * @Min: 0
 * @Max: 0xFFFF
 * @Default: 0xFFFA
 *
 * This ini is used to configure Rx HE-MCS Map for ≤ 80 MHz
 * 0:1 Max HE-MCS For 1 SS
 * 2:3 Max HE-MCS For 2 SS
 * 4:5 Max HE-MCS For 3 SS
 * 6:7 Max HE-MCS For 4 SS
 * 8:9 Max HE-MCS For 5 SS
 * 10:11 Max HE-MCS For 6 SS
 * 12:13 Max HE-MCS For 7 SS
 * 14:15 Max HE-MCS For 8 SS
 *
 * 0 indicates support for HE-MCS 0-7 for n spatial streams
 * 1 indicates support for HE-MCS 0-9 for n spatial streams
 * 2 indicates support for HE-MCS 0-11 for n spatial streams
 * 3 indicates that n spatial streams is not supported for HE PPDUs
 *
 * Related: NA
 *
 * Supported Feature: 11AX
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_HE_RX_MCS_MAP_LT_80 CFG_INI_UINT( \
				"he_rx_mcs_map_lt_80", \
				0, \
				0xFFFF, \
				0xFFF0, \
				0xFFFA, \
				CFG_VALUE_OR_DEFAULT, \
				"He Rx Mcs Map Lt 80")

#define CFG_HE_TX_MCS_MAP_LT_80 CFG_UINT( \
/* 11AX related INI configuration */
/*
 * <ini>
 * he_tx_mcs_map_lt_80 - configure Tx HE-MCS Map for ≤ 80 MHz
 * @Min: 0
 * @Max: 0xFFFF
 * @Default: 0xFFFA
 *
 * This ini is used to configure Tx HE-MCS Map for ≤ 80 MHz
 * 0:1 Max HE-MCS For 1 SS
 * 2:3 Max HE-MCS For 2 SS
 * 4:5 Max HE-MCS For 3 SS
 * 6:7 Max HE-MCS For 4 SS
 * 8:9 Max HE-MCS For 5 SS
 * 10:11 Max HE-MCS For 6 SS
 * 12:13 Max HE-MCS For 7 SS
 * 14:15 Max HE-MCS For 8 SS
 *
 * 0 indicates support for HE-MCS 0-7 for n spatial streams
 * 1 indicates support for HE-MCS 0-9 for n spatial streams
 * 2 indicates support for HE-MCS 0-11 for n spatial streams
 * 3 indicates that n spatial streams is not supported for HE PPDUs
 *
 * Related: NA
 *
 * Supported Feature: 11AX
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_HE_TX_MCS_MAP_LT_80 CFG_INI_UINT( \
				"he_tx_mcs_map_lt_80", \
				0, \
				0xFFFF, \
				0xFFF0, \
				0xFFFA, \
				CFG_VALUE_OR_DEFAULT, \
				"He Tx Mcs Map Lt 80")

#define CFG_HE_RX_MCS_MAP_160 CFG_UINT( \
/* 11AX related INI configuration */
/*
 * <ini>
 * he_rx_mcs_map_160 - configure Rx HE-MCS Map for 160 MHz
 * @Min: 0
 * @Max: 0xFFFF
 * @Default: 0xFFFA
 *
 * This ini is used to configure Rx HE-MCS Map for 160 MHz
 * 0:1 Max HE-MCS For 1 SS
 * 2:3 Max HE-MCS For 2 SS
 * 4:5 Max HE-MCS For 3 SS
 * 6:7 Max HE-MCS For 4 SS
 * 8:9 Max HE-MCS For 5 SS
 * 10:11 Max HE-MCS For 6 SS
 * 12:13 Max HE-MCS For 7 SS
 * 14:15 Max HE-MCS For 8 SS
 *
 * 0 indicates support for HE-MCS 0-7 for n spatial streams
 * 1 indicates support for HE-MCS 0-9 for n spatial streams
 * 2 indicates support for HE-MCS 0-11 for n spatial streams
 * 3 indicates that n spatial streams is not supported for HE PPDUs
 *
 * Related: NA
 *
 * Supported Feature: 11AX
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_HE_RX_MCS_MAP_160 CFG_INI_UINT( \
				"he_rx_mcs_map_160", \
				0, \
				0xFFFF, \
				0xFFF0, \
				0xFFFA, \
				CFG_VALUE_OR_DEFAULT, \
				"He Rx Mcs Map 160")

#define CFG_HE_TX_MCS_MAP_160 CFG_UINT( \
/* 11AX related INI configuration */
/*
 * <ini>
 * he_tx_mcs_map_160 - configure Tx HE-MCS Map for 160 MHz
 * @Min: 0
 * @Max: 0xFFFF
 * @Default: 0xFFFA
 *
 * This ini is used to configure Tx HE-MCS Map for 160 MHz
 * 0:1 Max HE-MCS For 1 SS
 * 2:3 Max HE-MCS For 2 SS
 * 4:5 Max HE-MCS For 3 SS
 * 6:7 Max HE-MCS For 4 SS
 * 8:9 Max HE-MCS For 5 SS
 * 10:11 Max HE-MCS For 6 SS
 * 12:13 Max HE-MCS For 7 SS
 * 14:15 Max HE-MCS For 8 SS
 *
 * 0 indicates support for HE-MCS 0-7 for n spatial streams
 * 1 indicates support for HE-MCS 0-9 for n spatial streams
 * 2 indicates support for HE-MCS 0-11 for n spatial streams
 * 3 indicates that n spatial streams is not supported for HE PPDUs
 *
 * Related: NA
 *
 * Supported Feature: 11AX
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_HE_TX_MCS_MAP_160 CFG_INI_UINT( \
				"he_tx_mcs_map_160", \
				0, \
				0xFFFF, \
				0xFFF0, \
				0xFFFA, \
				CFG_VALUE_OR_DEFAULT, \
				"He Tx Mcs Map 160")

Loading