summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/hif.h
diff options
context:
space:
mode:
authorWen Gong <wgong@codeaurora.org>2019-01-29 20:03:12 +0800
committerKalle Valo <kvalo@codeaurora.org>2019-02-07 16:51:58 +0200
commit40194e3b36bfd9e3972001f17c0171348d372c3d (patch)
treec9e4677727fe602aa25765c94e3e82d039bc8370 /drivers/net/wireless/ath/ath10k/hif.h
parentcdb78e5af49105917ba5694bc616d12b0a4f85f3 (diff)
downloadlinux-40194e3b36bfd9e3972001f17c0171348d372c3d.tar.bz2
ath10k: change swap mail box check after htc ready
The swap box flag of firmware is not set before htc ready, then it will not set swap box flag in ath10k driver, and it will let swap box setting not same between firmware and ath10k driver, then it will trigger firmware assert failure. Check the flag and set swap box after htc ready will fix the firmware assert failure. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00005-QCARMSWP-1. Signed-off-by: Wen Gong <wgong@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/hif.h')
-rw-r--r--drivers/net/wireless/ath/ath10k/hif.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/hif.h b/drivers/net/wireless/ath/ath10k/hif.h
index 1a59ea0068c2..5f7f1e08866f 100644
--- a/drivers/net/wireless/ath/ath10k/hif.h
+++ b/drivers/net/wireless/ath/ath10k/hif.h
@@ -59,6 +59,8 @@ struct ath10k_hif_ops {
*/
void (*stop)(struct ath10k *ar);
+ int (*swap_mailbox)(struct ath10k *ar);
+
int (*map_service_to_pipe)(struct ath10k *ar, u16 service_id,
u8 *ul_pipe, u8 *dl_pipe);
@@ -139,6 +141,13 @@ static inline void ath10k_hif_stop(struct ath10k *ar)
return ar->hif.ops->stop(ar);
}
+static inline int ath10k_hif_swap_mailbox(struct ath10k *ar)
+{
+ if (ar->hif.ops->swap_mailbox)
+ return ar->hif.ops->swap_mailbox(ar);
+ return 0;
+}
+
static inline int ath10k_hif_map_service_to_pipe(struct ath10k *ar,
u16 service_id,
u8 *ul_pipe, u8 *dl_pipe)