summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath10k/htc.h
diff options
context:
space:
mode:
authorErik Stromdahl <erik.stromdahl@gmail.com>2017-04-26 12:17:52 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2017-05-04 15:55:16 +0300
commit680ebb4e797751e8ffb000d63feb96e7bc9e4dc3 (patch)
tree4c6907bd8db87a758ee266dab34e04ac0b4eb03f /drivers/net/wireless/ath/ath10k/htc.h
parent3e0dd820f07f264d904690295e72e63c90b7be85 (diff)
ath10k: htc: rx trailer lookahead support
The RX trailer parsing is now capable of parsing lookahead reports. A lookahead contains the first 4 bytes of the next HTC message (that will be read in the next SDIO read operation). Lookaheads are used by the SDIO/mbox HIF layer to determine if the next message is part of a bundle, which endpoint it belongs to and how long it is. Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/htc.h')
-rw-r--r--drivers/net/wireless/ath/ath10k/htc.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h
index f728ce7124cf..ae6003495649 100644
--- a/drivers/net/wireless/ath/ath10k/htc.h
+++ b/drivers/net/wireless/ath/ath10k/htc.h
@@ -50,6 +50,8 @@ struct ath10k;
* 4-byte aligned.
*/
+#define HTC_HOST_MAX_MSG_PER_BUNDLE 8
+
enum ath10k_htc_tx_flags {
ATH10K_HTC_FLAG_NEED_CREDIT_UPDATE = 0x01,
ATH10K_HTC_FLAG_SEND_BUNDLE = 0x02
@@ -174,8 +176,10 @@ struct ath10k_htc_msg {
} __packed __aligned(4);
enum ath10k_ath10k_htc_record_id {
- ATH10K_HTC_RECORD_NULL = 0,
- ATH10K_HTC_RECORD_CREDITS = 1
+ ATH10K_HTC_RECORD_NULL = 0,
+ ATH10K_HTC_RECORD_CREDITS = 1,
+ ATH10K_HTC_RECORD_LOOKAHEAD = 2,
+ ATH10K_HTC_RECORD_LOOKAHEAD_BUNDLE = 3,
};
struct ath10k_ath10k_htc_record_hdr {
@@ -192,10 +196,28 @@ struct ath10k_htc_credit_report {
u8 pad1;
} __packed;
+struct ath10k_htc_lookahead_report {
+ u8 pre_valid;
+ u8 pad0;
+ u8 pad1;
+ u8 pad2;
+ u8 lookahead[4];
+ u8 post_valid;
+ u8 pad3;
+ u8 pad4;
+ u8 pad5;
+} __packed;
+
+struct ath10k_htc_lookahead_bundle {
+ u8 lookahead[4];
+} __packed;
+
struct ath10k_htc_record {
struct ath10k_ath10k_htc_record_hdr hdr;
union {
struct ath10k_htc_credit_report credit_report[0];
+ struct ath10k_htc_lookahead_report lookahead_report[0];
+ struct ath10k_htc_lookahead_bundle lookahead_bundle[0];
u8 pauload[0];
};
} __packed __aligned(4);
@@ -356,6 +378,8 @@ void ath10k_htc_notify_tx_completion(struct ath10k_htc_ep *ep,
int ath10k_htc_process_trailer(struct ath10k_htc *htc,
u8 *buffer,
int length,
- enum ath10k_htc_ep_id src_eid);
+ enum ath10k_htc_ep_id src_eid,
+ void *next_lookaheads,
+ int *next_lookaheads_len);
#endif