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

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

ath10k: add support for qca6174 Rx descriptors



The QCA6174 chip has an extra 4 bytes in
rx_ppdu_end structure which is used in htt_rx_desc
and HTT Rx ring offset setup. This is necessary
for correct Rx for QCA6174 (otherwise Rx
descriptors are overwritten and corrupted).

This means QCA988X will have an extra 4 byte
padding in Rx descriptor layout which is harmless.

Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 1a7fecb7
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -813,7 +813,7 @@ static void ath10k_htt_rx_h_mactime(struct ath10k *ar,
	 *
	 *
	 * FIXME: Can we get/compute 64bit TSF?
	 * FIXME: Can we get/compute 64bit TSF?
	 */
	 */
	status->mactime = __le32_to_cpu(rxd->ppdu_end.tsf_timestamp);
	status->mactime = __le32_to_cpu(rxd->ppdu_end.common.tsf_timestamp);
	status->flag |= RX_FLAG_MACTIME_END;
	status->flag |= RX_FLAG_MACTIME_END;
}
}


+24 −1
Original line number Original line Diff line number Diff line
@@ -850,7 +850,7 @@ struct rx_ppdu_start {


#define RX_PPDU_END_INFO1_PPDU_DONE (1 << 15)
#define RX_PPDU_END_INFO1_PPDU_DONE (1 << 15)


struct rx_ppdu_end {
struct rx_ppdu_end_common {
	__le32 evm_p0;
	__le32 evm_p0;
	__le32 evm_p1;
	__le32 evm_p1;
	__le32 evm_p2;
	__le32 evm_p2;
@@ -873,10 +873,33 @@ struct rx_ppdu_end {
	u8 phy_err_code;
	u8 phy_err_code;
	__le16 flags; /* %RX_PPDU_END_FLAGS_ */
	__le16 flags; /* %RX_PPDU_END_FLAGS_ */
	__le32 info0; /* %RX_PPDU_END_INFO0_ */
	__le32 info0; /* %RX_PPDU_END_INFO0_ */
} __packed;

struct rx_ppdu_end_qca988x {
	__le16 bb_length;
	__le16 bb_length;
	__le16 info1; /* %RX_PPDU_END_INFO1_ */
	__le16 info1; /* %RX_PPDU_END_INFO1_ */
} __packed;
} __packed;


#define RX_PPDU_END_RTT_CORRELATION_VALUE_MASK 0x00ffffff
#define RX_PPDU_END_RTT_CORRELATION_VALUE_LSB  0
#define RX_PPDU_END_RTT_UNUSED_MASK            0x7f000000
#define RX_PPDU_END_RTT_UNUSED_LSB             24
#define RX_PPDU_END_RTT_NORMAL_MODE            BIT(31)

struct rx_ppdu_end_qca6174 {
	__le32 rtt; /* %RX_PPDU_END_RTT_ */
	__le16 bb_length;
	__le16 info1; /* %RX_PPDU_END_INFO1_ */
} __packed;

struct rx_ppdu_end {
	struct rx_ppdu_end_common common;
	union {
		struct rx_ppdu_end_qca988x qca988x;
		struct rx_ppdu_end_qca6174 qca6174;
	} __packed;
} __packed;

/*
/*
 * evm_p0
 * evm_p0
 *		EVM for pilot 0.  Contain EVM for streams: 0, 1, 2 and 3.
 *		EVM for pilot 0.  Contain EVM for streams: 0, 1, 2 and 3.