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

Commit ca996ec5 authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo
Browse files

ath10k: implement wmi-tlv backend



Latest main firmware branch introduced a new WMI
ABI called wmi-tlv. It is not a tlv strictly
speaking but something that resembles it because
it is ordered and may have duplicate id entries.

This prepares ath10k to support new hw.

Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 0226d602
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ ath10k_core-y += mac.o \
		 htt_tx.o \
		 txrx.o \
		 wmi.o \
		 wmi-tlv.o \
		 bmi.o

ath10k_core-$(CONFIG_ATH10K_DEBUGFS) += spectral.o
+2 −0
Original line number Diff line number Diff line
@@ -1093,6 +1093,8 @@ int ath10k_ce_alloc_pipe(struct ath10k *ar, int ce_id,
		     (CE_HTT_H2T_MSG_SRC_NENTRIES - 1));
	BUILD_BUG_ON(2*TARGET_10X_NUM_MSDU_DESC >
		     (CE_HTT_H2T_MSG_SRC_NENTRIES - 1));
	BUILD_BUG_ON(2*TARGET_TLV_NUM_MSDU_DESC >
		     (CE_HTT_H2T_MSG_SRC_NENTRIES - 1));

	ce_state->ar = ar;
	ce_state->id = ce_id;
+5 −0
Original line number Diff line number Diff line
@@ -915,6 +915,11 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
		ar->max_num_stations = TARGET_10X_NUM_STATIONS;
		ar->htt.max_num_pending_tx = TARGET_10X_NUM_MSDU_DESC;
		break;
	case ATH10K_FW_WMI_OP_VERSION_TLV:
		ar->max_num_peers = TARGET_TLV_NUM_PEERS;
		ar->max_num_stations = TARGET_TLV_NUM_STATIONS;
		ar->htt.max_num_pending_tx = TARGET_TLV_NUM_MSDU_DESC;
		break;
	case ATH10K_FW_WMI_OP_VERSION_UNSET:
	case ATH10K_FW_WMI_OP_VERSION_MAX:
		WARN_ON(1);
+10 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ enum ath10k_fw_wmi_op_version {
	ATH10K_FW_WMI_OP_VERSION_MAIN = 1,
	ATH10K_FW_WMI_OP_VERSION_10_1 = 2,
	ATH10K_FW_WMI_OP_VERSION_10_2 = 3,
	ATH10K_FW_WMI_OP_VERSION_TLV = 4,

	/* keep last */
	ATH10K_FW_WMI_OP_VERSION_MAX,
@@ -178,6 +179,15 @@ struct ath10k_pktlog_hdr {
#define TARGET_10X_NUM_MSDU_DESC		(1024 + 400)
#define TARGET_10X_MAX_FRAG_ENTRIES		0

/* Target specific defines for WMI-TLV firmware */
#define TARGET_TLV_NUM_VDEVS			3
#define TARGET_TLV_NUM_STATIONS			32
#define TARGET_TLV_NUM_PEERS			((TARGET_TLV_NUM_STATIONS) + \
						 (TARGET_TLV_NUM_VDEVS) + \
						 2)
#define TARGET_TLV_NUM_TIDS			((TARGET_TLV_NUM_PEERS) * 2)
#define TARGET_TLV_NUM_MSDU_DESC		(1024 + 32)

/* Number of Copy Engines supported */
#define CE_COUNT 8

+2218 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading