summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath10k/ce.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2013-10-16 16:46:24 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2013-10-21 16:41:19 +0300
commit60f85bea25d5e9915da8b0c87275143b317cec3b (patch)
treebc908a992480ac345d9c56e06de0700bfe8f5c61 /drivers/net/wireless/ath/ath10k/ce.c
parent233eb97fc9d0f44f2ea99fe48118aa3d2dc25d64 (diff)
ath10k: fix FW crashes on heavy TX on 10.1.389 AP FW
10.1.389 firmware has some differences in calculation of number of outstanding HTT TX completions. This led to FW crashes of 10.1.389 while main firmware branch was unnaffected. The patch makes sure ath10k doesn't queue up more MSDUs than it should. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/ce.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/ce.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index e46951b8fb92..d243f287fae7 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -1050,6 +1050,17 @@ struct ath10k_ce_pipe *ath10k_ce_init(struct ath10k *ar,
u32 ctrl_addr = ath10k_ce_base_address(ce_id);
int ret;
+ /*
+ * Make sure there's enough CE ringbuffer entries for HTT TX to avoid
+ * additional TX locking checks.
+ *
+ * For the lack of a better place do the check here.
+ */
+ BUILD_BUG_ON(TARGET_NUM_MSDU_DESC >
+ (CE_HTT_H2T_MSG_SRC_NENTRIES - 1));
+ BUILD_BUG_ON(TARGET_10X_NUM_MSDU_DESC >
+ (CE_HTT_H2T_MSG_SRC_NENTRIES - 1));
+
ret = ath10k_pci_wake(ar);
if (ret)
return NULL;