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

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

Merge 98288183 on remote branch

Change-Id: I66305610836554b094485f28a434380209628ff9
parents 375e1427 98288183
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1414,6 +1414,7 @@ PKT_CAPTURE_OBJS := $(PKT_CAPTURE_DIR)/core/src/wlan_pkt_capture_main.o \
		$(PKT_CAPTURE_DIR)/core/src/wlan_pkt_capture_data_txrx.o \
		$(PKT_CAPTURE_DIR)/dispatcher/src/wlan_pkt_capture_ucfg_api.o \
		$(PKT_CAPTURE_DIR)/dispatcher/src/wlan_pkt_capture_tgt_api.o \
		$(PKT_CAPTURE_DIR)/dispatcher/src/wlan_pkt_capture_api.o \
		$(PKT_CAPTURE_TARGET_IF_DIR)/src/target_if_pkt_capture.o \
		$(PKT_CAPTURE_OS_IF_DIR)/src/os_if_pkt_capture.o
endif
@@ -3338,6 +3339,7 @@ cppflags-$(CONFIG_RXDMA_ERR_PKT_DROP) += -DRXDMA_ERR_PKT_DROP
cppflags-$(CONFIG_MAX_ALLOC_PAGE_SIZE) += -DMAX_ALLOC_PAGE_SIZE
cppflags-$(CONFIG_DELIVERY_TO_STACK_STATUS_CHECK) += -DDELIVERY_TO_STACK_STATUS_CHECK
cppflags-$(CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS) += -DWLAN_TRACE_HIDE_MAC_ADDRESS
cppflags-$(CONFIG_WLAN_FEATURE_CAL_FAILURE_TRIGGER) += -DWLAN_FEATURE_CAL_FAILURE_TRIGGER

cppflags-$(CONFIG_LITHIUM) += -DFIX_TXDMA_LIMITATION
cppflags-$(CONFIG_LITHIUM) += -DFEATURE_AST
+166 −0
Original line number Diff line number Diff line
@@ -374,6 +374,49 @@ mlme_init_lpass_support_cfg(struct wlan_objmgr_psoc *psoc,
}
#endif

/**
 * mlme_init_mgmt_hw_tx_retry_count_cfg() - initialize mgmt hw tx retry count
 * @psoc: Pointer to PSOC
 * @gen: pointer to generic CFG items
 *
 * Return: None
 */
static void mlme_init_mgmt_hw_tx_retry_count_cfg(
			struct wlan_objmgr_psoc *psoc,
			struct wlan_mlme_generic *gen)
{
	uint32_t i;
	qdf_size_t out_size = 0;
	uint8_t count_array[MGMT_FRM_HW_TX_RETRY_COUNT_STR_LEN];

	qdf_uint8_array_parse(cfg_get(psoc, CFG_MGMT_FRAME_HW_TX_RETRY_COUNT),
			      count_array,
			      MGMT_FRM_HW_TX_RETRY_COUNT_STR_LEN,
			      &out_size);

	for (i = 0; i + 1 < out_size; i += 2) {
		if (count_array[i] >= CFG_FRAME_TYPE_MAX) {
			mlme_legacy_debug("invalid frm type %d",
					  count_array[i]);
			continue;
		}
		if (count_array[i + 1] >= MAX_MGMT_HW_TX_RETRY_COUNT) {
			mlme_legacy_debug("mgmt hw tx retry count %d for frm %d, limit to %d",
					  count_array[i + 1],
					  count_array[i],
					  MAX_MGMT_HW_TX_RETRY_COUNT);
			gen->mgmt_hw_tx_retry_count[count_array[i]] =
						MAX_MGMT_HW_TX_RETRY_COUNT;
		} else {
			mlme_legacy_debug("mgmt hw tx retry count %d for frm %d",
					  count_array[i + 1],
					  count_array[i]);
			gen->mgmt_hw_tx_retry_count[count_array[i]] =
							count_array[i + 1];
		}
	}
}

static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
				  struct wlan_mlme_generic *gen)
{
@@ -438,6 +481,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
	gen->monitor_mode_concurrency =
		cfg_get(psoc, CFG_MONITOR_MODE_CONCURRENCY);
	gen->tx_retry_multiplier = cfg_get(psoc, CFG_TX_RETRY_MULTIPLIER);
	mlme_init_mgmt_hw_tx_retry_count_cfg(psoc, gen);
}

static void mlme_init_edca_ani_cfg(struct wlan_objmgr_psoc *psoc,
@@ -2349,6 +2393,127 @@ mlme_init_dot11_mode_cfg(struct wlan_objmgr_psoc *psoc,
	dot11_mode->vdev_type_dot11_mode = cfg_get(psoc, CFG_VDEV_DOT11_MODE);
}

/**
 * mlme_iot_parse_aggr_info - parse aggr related items in ini
 *
 * @psoc: PSOC pointer
 * @iot: IOT related CFG items
 *
 * Return: None
 */
static void
mlme_iot_parse_aggr_info(struct wlan_objmgr_psoc *psoc,
			 struct wlan_mlme_iot *iot)
{
	char *aggr_info, *oui, *msdu, *mpdu, *aggr_info_temp;
	uint32_t ampdu_sz, amsdu_sz, index = 0, oui_len, cfg_str_len;
	struct wlan_iot_aggr *aggr_info_list;
	const char *cfg_str;
	int ret;

	cfg_str = cfg_get(psoc, CFG_TX_IOT_AGGR);
	if (!cfg_str)
		return;

	cfg_str_len = qdf_str_len(cfg_str);
	if (!cfg_str_len)
		return;

	aggr_info = qdf_mem_malloc(cfg_str_len + 1);
	if (!aggr_info)
		return;

	aggr_info_list = iot->aggr;
	qdf_mem_copy(aggr_info, cfg_str, cfg_str_len);
	mlme_legacy_debug("aggr_info=[%s]", aggr_info);

	aggr_info_temp = aggr_info;
	while (aggr_info_temp) {
		/* skip possible spaces before oui string */
		while (*aggr_info_temp == ' ')
			aggr_info_temp++;

		oui = strsep(&aggr_info_temp, ",");
		if (!oui) {
			mlme_legacy_err("oui error");
			goto end;
		}

		oui_len = qdf_str_len(oui) / 2;
		if (oui_len > sizeof(aggr_info_list[index].oui)) {
			mlme_legacy_err("size error");
			goto end;
		}

		amsdu_sz = 0;
		msdu = strsep(&aggr_info_temp, ",");
		if (!msdu) {
			mlme_legacy_err("msdu error");
			goto end;
		}

		ret = kstrtou32(msdu, 10, &amsdu_sz);
		if (ret || amsdu_sz > IOT_AGGR_MSDU_MAX_NUM) {
			mlme_legacy_err("invalid msdu no. %s [%u]",
					msdu, amsdu_sz);
			goto end;
		}

		ampdu_sz = 0;
		mpdu = strsep(&aggr_info_temp, ",");
		if (!mpdu) {
			mlme_legacy_err("mpdu error");
			goto end;
		}

		ret = kstrtou32(mpdu, 10, &ampdu_sz);
		if (ret || ampdu_sz > IOT_AGGR_MPDU_MAX_NUM) {
			mlme_legacy_err("invalid mpdu no. %s [%u]",
					mpdu, ampdu_sz);
			goto end;
		}

		mlme_legacy_debug("id %u oui[%s] len %u msdu %u mpdu %u",
				  index, oui, oui_len, amsdu_sz, ampdu_sz);

		ret = qdf_hex_str_to_binary(aggr_info_list[index].oui,
					    oui, oui_len);
		if (ret) {
			mlme_legacy_err("oui error: %d", ret);
			goto end;
		}

		aggr_info_list[index].amsdu_sz = amsdu_sz;
		aggr_info_list[index].ampdu_sz = ampdu_sz;
		aggr_info_list[index].oui_len = oui_len;
		index++;
		if (index >= IOT_AGGR_INFO_MAX_NUM) {
			mlme_legacy_err("exceed max num, index = %d", index);
			break;
		}
	}
	iot->aggr_num = index;

end:
	mlme_legacy_debug("configured aggr num %d", iot->aggr_num);
	qdf_mem_free(aggr_info);
}

/**
 * mlme_iot_parse_aggr_info - parse IOT related items in ini
 *
 * @psoc: PSOC pointer
 * @iot: IOT related CFG items
 *
 * Return: None
 */
static void
mlme_init_iot_cfg(struct wlan_objmgr_psoc *psoc,
		  struct wlan_mlme_iot *iot)
{
	mlme_iot_parse_aggr_info(psoc, iot);
}

QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
	struct wlan_mlme_psoc_ext_obj *mlme_obj;
@@ -2401,6 +2566,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
	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);
	mlme_init_iot_cfg(psoc, &mlme_cfg->iot);

	return status;
}
+36 −1
Original line number Diff line number Diff line
@@ -879,6 +879,40 @@ enum monitor_mode_concurrency {
	CFG_VALUE_OR_DEFAULT, \
	"percentage of max retry limit")

/*
 * <ini>
 * mgmt_frame_hw_tx_retry_count - Set hw tx retry count for mgmt action
 * frame
 * @Min: N/A
 * @Max: N/A
 * @Default: N/A
 *
 * Set mgmt action frame hw tx retry count, string format looks like below:
 * frame_hw_tx_retry_count="<frame type>,<retry count>,..."
 * frame type is enum value of mlme_cfg_frame_type.
 * Retry count max value is 127.
 * For example:
 * frame_hw_tx_retry_count="0,64,2,32"
 * The above input string means:
 * For p2p go negotiation request fame, hw retry count 64
 * For p2p provision discovery request, hw retry count 32
 *
 * Related: None.
 *
 * Supported Feature: STA/P2P
 *
 * Usage: External
 *
 * </ini>
 */
#define MGMT_FRM_HW_TX_RETRY_COUNT_STR_LEN  (64)
#define CFG_MGMT_FRAME_HW_TX_RETRY_COUNT CFG_INI_STRING( \
		"mgmt_frame_hw_tx_retry_count", \
		0, \
		MGMT_FRM_HW_TX_RETRY_COUNT_STR_LEN, \
		"", \
		"Set mgmt action frame hw tx retry count")

#define CFG_GENERIC_ALL \
	CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
	CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
@@ -914,5 +948,6 @@ enum monitor_mode_concurrency {
	CFG(CFG_SAE_CONNECION_RETRIES) \
	CFG(CFG_WLS_6GHZ_CAPABLE) \
	CFG(CFG_MONITOR_MODE_CONCURRENCY)\
	CFG(CFG_TX_RETRY_MULTIPLIER)
	CFG(CFG_TX_RETRY_MULTIPLIER) \
	CFG(CFG_MGMT_FRAME_HW_TX_RETRY_COUNT)
#endif /* __CFG_MLME_GENERIC_H */
+49 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 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
@@ -498,6 +499,51 @@
			1, \
			"Enable UAPSD for SAP")

#define IOT_AGGR_INFO_MAX_LEN 500
#define IOT_AGGR_INFO_MAX_NUM 32
#define IOT_AGGR_MSDU_MAX_NUM 6
#define IOT_AGGR_MPDU_MAX_NUM 512
/*
 * <ini>
 * cfg_tx_iot_aggr - OUI based tx aggr size for msdu/mpdu
 *
 * This ini gives an option to configure Tx aggregation size
 * in no. of MPDUs/MSDUs for specified OUI.
 * This can be useful for IOT issues.
 *
 * Format of the configuration:
 * cfg_tx_iot_aggr=<OUI-1>,<MSDU-1>,<MPDU-1>,<OUI-2>,<MSDU-2>,<MPDU-2>...
 * MSDU: 0..IOT_AGGR_MSDU_MAX_NUM, the max tx aggregation size in no. of MSDUs,
 *       0 means not specified.
 * MPDU: 0..IOT_AGGR_MPDU_MAX_NUM, the max tx aggregation size in no. of MPDUs,
 *       0 means not specified.
 * Note: MSDU-x/MPDU-x are the max values, FW will take decision for actual
 *   AMSDU/AMPDU size on different platforms.
 *
 * For example:
 *   cfg_tx_iot_aggr=112233,2,0,445566,3,32,778899,0,64
 *   If vendor OUI-1("\x11\x22\x33") is found in assoc resp,
 *   set tx amsdu size to 2;
 *   If vendor OUI-2("\x44\x55\x66") is found in assoc resp,
 *   set tx amsdu size to 3, set tx ampdu size to 32;
 *   If vendor OUI-3("\x77\x88\x99") is found in assoc resp,
 *   set tx ampdu size to 64.
 *
 * Related: IOT
 *
 * Supported Feature: IOT
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_TX_IOT_AGGR CFG_INI_STRING( \
		"cfg_tx_iot_aggr", \
		0, \
		IOT_AGGR_INFO_MAX_LEN, \
		"", \
		"Used to configure OUI based tx aggr size for msdu/mpdu")

#define CFG_QOS_ALL \
	CFG(CFG_SAP_MAX_INACTIVITY_OVERRIDE) \
	CFG(CFG_TX_AGGREGATION_SIZE) \
@@ -516,6 +562,7 @@
	CFG(CFG_TX_NON_AGGR_SW_RETRY_VI) \
	CFG(CFG_TX_NON_AGGR_SW_RETRY_VO) \
	CFG(CFG_TX_NON_AGGR_SW_RETRY) \
	CFG(CFG_SAP_QOS_UAPSD)
	CFG(CFG_SAP_QOS_UAPSD) \
	CFG(CFG_TX_IOT_AGGR)

#endif /* __CFG_MLME_QOS_H */
+12 −0
Original line number Diff line number Diff line
@@ -3196,6 +3196,18 @@ QDF_STATUS mlme_set_user_ps(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 */
bool mlme_get_user_ps(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);

/**
 * wlan_mlme_get_mgmt_hw_tx_retry_count() - Get mgmt frame hw tx retry count
 *
 * @psoc: pointer to psoc object
 * @frm_type: frame type of the query
 *
 * Return: hw tx retry count
 */
uint8_t
wlan_mlme_get_mgmt_hw_tx_retry_count(struct wlan_objmgr_psoc *psoc,
				     enum mlme_cfg_frame_type frm_type);

/**
 * wlan_mlme_get_tx_retry_multiplier() - Get the tx retry multiplier percentage
 *
Loading