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

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

Merge 7208b549 on remote branch

Change-Id: Ia67182d5efcbff9c49262b7c73ce99482062db76
parents 3c514b6b 7208b549
Loading
Loading
Loading
Loading
+24 −8
Original line number Diff line number Diff line
@@ -51,17 +51,19 @@ OBJS :=
OBJS_DIRS :=

define add-wlan-objs
$(eval
  ifneq ($$(2),)
    ifeq ($$(KERNEL_SUPPORTS_NESTED_COMPOSITES),y)
      OBJS_DIRS += $$(dir $$(2))
      OBJS += $$(1).o
      $$(1)-y := $$(2)
$(eval $(_add-wlan-objs))
endef

define _add-wlan-objs
  ifneq ($(2),)
    ifeq ($(KERNEL_SUPPORTS_NESTED_COMPOSITES),y)
      OBJS_DIRS += $(dir $(2))
      OBJS += $(1).o
      $(1)-y := $(2)
    else
      OBJS += $$(2)
      OBJS += $(2)
    endif
  endif
)
endef

############ UAPI ############
@@ -2953,6 +2955,8 @@ cppflags-$(CONFIG_HL_DP_SUPPORT) += -DQCA_COMPUTE_TX_DELAY
cppflags-$(CONFIG_HL_DP_SUPPORT) += -DQCA_COMPUTE_TX_DELAY_PER_TID
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

# For PCIe GEN switch
cppflags-$(CONFIG_PCIE_GEN_SWITCH) += -DPCIE_GEN_SWITCH
@@ -3302,6 +3306,7 @@ cppflags-y += -DDP_RX_DESC_COOKIE_INVALIDATE
cppflags-y += -DMON_ENABLE_DROP_FOR_MAC
cppflags-y += -DPCI_LINK_STATUS_SANITY
cppflags-y += -DDP_MON_RSSI_IN_DBM
cppflags-y += -DSYSTEM_PM_CHECK
endif

# Enable Low latency optimisation mode
@@ -3686,6 +3691,7 @@ cppflags-$(CONFIG_BAND_6GHZ) += -DCONFIG_BAND_6GHZ
cppflags-$(CONFIG_6G_SCAN_CHAN_SORT_ALGO) += -DFEATURE_6G_SCAN_CHAN_SORT_ALGO

cppflags-$(CONFIG_RX_FISA) += -DWLAN_SUPPORT_RX_FISA
cppflags-$(CONFIG_RX_FISA_HISTORY) += -DWLAN_SUPPORT_RX_FISA_HIST

cppflags-$(CONFIG_DP_SWLM) += -DWLAN_DP_FEATURE_SW_LATENCY_MGR

@@ -3715,6 +3721,8 @@ cppflags-$(CONFIG_HIF_CPU_PERF_AFFINE_MASK) += -DHIF_CPU_PERF_AFFINE_MASK

cppflags-$(CONFIG_GENERIC_SHADOW_REGISTER_ACCESS_ENABLE) += -DGENERIC_SHADOW_REGISTER_ACCESS_ENABLE

cppflags-$(CONFIG_DUMP_REO_QUEUE_INFO_IN_DDR) += -DDUMP_REO_QUEUE_INFO_IN_DDR

ifdef CONFIG_MAX_CLIENTS_ALLOWED
ccflags-y += -DWLAN_MAX_CLIENTS_ALLOWED=$(CONFIG_MAX_CLIENTS_ALLOWED)
endif
@@ -3733,6 +3741,14 @@ cppflags-$(CONFIG_DP_FT_LOCK_HISTORY) += -DDP_FT_LOCK_HISTORY

ccflags-$(CONFIG_GET_DRIVER_MODE) += -DFEATURE_GET_DRIVER_MODE

ifeq ($(CONFIG_SMP), y)
ifeq ($(CONFIG_HIF_DETECTION_LATENCY_ENABLE), y)
cppflags-y += -DHIF_DETECTION_LATENCY_ENABLE
cppflags-y += -DDETECTION_TIMER_TIMEOUT=2000
cppflags-y += -DDETECTION_LATENCY_THRESHOLD=1900
endif
endif

KBUILD_CPPFLAGS += $(cppflags-y)

# Currently, for versions of gcc which support it, the kernel Makefile
+9 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-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
@@ -281,6 +281,14 @@ blm_get_bssid_reject_list(struct wlan_objmgr_pdev *pdev,
			  uint8_t max_bssid_to_be_filled,
			  enum blm_reject_ap_type reject_ap_type);

/**
 * blm_dump_blacklist_bssid - Dump blacklisted bssids
 * @pdev: pdev object
 *
 * Return: None
 */
void blm_dump_blacklist_bssid(struct wlan_objmgr_pdev *pdev);

/**
 * blm_get_rssi_blacklist_threshold() - Get rssi blacklist threshold value
 * @pdev: pdev object
+3 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 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
@@ -37,6 +37,8 @@
		QDF_TRACE_INFO(QDF_MODULE_ID_BLACKLIST_MGR, params)
#define blm_debug(params...)\
		QDF_TRACE_DEBUG(QDF_MODULE_ID_BLACKLIST_MGR, params)
#define blm_nofl_debug(params...)\
		QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_BLACKLIST_MGR, params)

/**
 * struct blm_pdev_priv_obj - Pdev priv struct to store list of blacklist mgr.
+126 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-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
@@ -733,6 +733,123 @@ blm_fill_rssi_reject_params(struct blm_reject_ap *blm_entry,
		   blm_reject_list->reject_reason);
}

/**
 * blm_find_reject_type_string() - Function to convert int to string
 * @reject_ap_type:   blm_reject_ap_type
 *
 * This function is used to convert int value of enum blm_reject_ap_type
 * to string format.
 *
 * Return: String
 *
 */
static const char *
blm_find_reject_type_string(enum blm_reject_ap_type reject_ap_type)
{
	switch (reject_ap_type) {
	CASE_RETURN_STRING(USERSPACE_AVOID_TYPE);
	CASE_RETURN_STRING(USERSPACE_BLACKLIST_TYPE);
	CASE_RETURN_STRING(DRIVER_AVOID_TYPE);
	CASE_RETURN_STRING(DRIVER_BLACKLIST_TYPE);
	CASE_RETURN_STRING(DRIVER_RSSI_REJECT_TYPE);
	CASE_RETURN_STRING(DRIVER_MONITOR_TYPE);
	default:
		return "REJECT_REASON_UNKNOWN";
	}
}

/**
 * blm_get_reject_ap_type() - Function to find reject ap type
 * @blm_entry:   blm_reject_ap
 *
 * This function is used to get reject ap type.
 *
 * Return: blm_reject_ap_type
 *
 */
static enum blm_reject_ap_type
blm_get_reject_ap_type(struct blm_reject_ap *blm_entry)
{
	if (BLM_IS_AP_AVOIDED_BY_USERSPACE(blm_entry))
		return USERSPACE_AVOID_TYPE;
	if (BLM_IS_AP_BLACKLISTED_BY_USERSPACE(blm_entry))
		return USERSPACE_BLACKLIST_TYPE;
	if (BLM_IS_AP_AVOIDED_BY_DRIVER(blm_entry))
		return DRIVER_AVOID_TYPE;
	if (BLM_IS_AP_BLACKLISTED_BY_DRIVER(blm_entry))
		return DRIVER_BLACKLIST_TYPE;
	if (BLM_IS_AP_IN_RSSI_REJECT_LIST(blm_entry))
		return DRIVER_RSSI_REJECT_TYPE;
	if (BLM_IS_AP_IN_MONITOR_LIST(blm_entry))
		return DRIVER_MONITOR_TYPE;

	return REJECT_REASON_UNKNOWN;
}

/**
 * blm_dump_blacklist_bssid() - Function to dump blacklisted bssid
 * @pdev:  pdev object
 *
 * This function is used to dump blacklisted bssid along with reject
 * ap type, source, delay and required rssi
 *
 * Return: None
 *
 */
void blm_dump_blacklist_bssid(struct wlan_objmgr_pdev *pdev)
{
	struct blm_reject_ap *blm_entry = NULL;
	qdf_list_node_t *cur_node = NULL, *next_node = NULL;
	struct blm_pdev_priv_obj *blm_ctx;
	struct blm_psoc_priv_obj *blm_psoc_obj;
	uint32_t reject_duration;
	enum blm_reject_ap_type reject_ap_type;
	qdf_list_t *reject_db_list;
	QDF_STATUS status;

	blm_ctx = blm_get_pdev_obj(pdev);
	blm_psoc_obj = blm_get_psoc_obj(wlan_pdev_get_psoc(pdev));

	if (!blm_ctx || !blm_psoc_obj) {
		blm_err("blm_ctx or blm_psoc_obj is NULL");
		return;
	}

	status = qdf_mutex_acquire(&blm_ctx->reject_ap_list_lock);
	if (QDF_IS_STATUS_ERROR(status)) {
		blm_err("failed to acquire reject_ap_list_lock");
		return;
	}

	reject_db_list = &blm_ctx->reject_ap_list;
	qdf_list_peek_front(reject_db_list, &cur_node);
	while (cur_node) {
		qdf_list_peek_next(reject_db_list, cur_node, &next_node);

		blm_entry = qdf_container_of(cur_node, struct blm_reject_ap,
					     node);

		reject_ap_type = blm_get_reject_ap_type(blm_entry);

		reject_duration = blm_get_delta_of_bssid(
						reject_ap_type, blm_entry,
						&blm_psoc_obj->blm_cfg);

			blm_nofl_debug("BLACKLIST BSSID "QDF_MAC_ADDR_FMT" type %s retry delay %dms expected RSSI %d reject reason %d rejection source %d",
				QDF_MAC_ADDR_REF(blm_entry->bssid.bytes),
				blm_find_reject_type_string(reject_ap_type),
				reject_duration,
				blm_entry->rssi_reject_params.expected_rssi,
				blm_entry->reject_ap_reason,
				blm_entry->rssi_reject_params.source);

		cur_node = next_node;
		next_node = NULL;
	}

	qdf_mutex_release(&blm_ctx->reject_ap_list_lock);
}

static void blm_fill_reject_list(qdf_list_t *reject_db_list,
				 struct reject_ap_config_params *reject_list,
				 uint8_t *num_of_reject_bssid,
@@ -801,6 +918,7 @@ void blm_update_reject_ap_list_to_fw(struct wlan_objmgr_psoc *psoc)
	struct wlan_objmgr_pdev *pdev;
	struct blm_pdev_priv_obj *blm_ctx;
	struct blm_psoc_priv_obj *blm_psoc_obj;
	QDF_STATUS status;

	blm_psoc_obj = blm_get_psoc_obj(psoc);
	if (!blm_psoc_obj) {
@@ -821,8 +939,15 @@ void blm_update_reject_ap_list_to_fw(struct wlan_objmgr_psoc *psoc)
		goto end;
	}

	status = qdf_mutex_acquire(&blm_ctx->reject_ap_list_lock);
	if (QDF_IS_STATUS_ERROR(status)) {
		blm_err("failed to acquire reject_ap_list_lock");
		goto end;
	}

	cfg = &blm_psoc_obj->blm_cfg;
	blm_send_reject_ap_list_to_fw(pdev, &blm_ctx->reject_ap_list, cfg);
	qdf_mutex_release(&blm_ctx->reject_ap_list_lock);

end:
	wlan_objmgr_pdev_release_ref(pdev, WLAN_MLME_CM_ID);
+13 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 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
@@ -90,6 +90,18 @@ wlan_blm_get_bssid_reject_list(struct wlan_objmgr_pdev *pdev,
					 reject_ap_type);
}

/**
 * wlan_blm_dump_blcklist_bssid() - dump the blacklisted BSSIDs from BLM
 * @pdev: pdev object
 *
 * Return: None
 */
static inline void
wlan_blm_dump_blcklist_bssid(struct wlan_objmgr_pdev *pdev)
{
	return blm_dump_blacklist_bssid(pdev);
}

/**
 * wlan_blm_get_rssi_blacklist_threshold() - Get the RSSI blacklist threshold
 * @pdev: pdev object
Loading