aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/pci.h
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-07-14 16:25:25 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2014-07-15 11:18:58 +0300
commit2374b18684dfed2a0588efe4df716d16554da467 (patch)
tree47be53e5596ff37aafa1a0648778bf3083f63091 /drivers/net/wireless/ath/ath10k/pci.h
parentath10k: fix unregister deadlock when fw probe fails (diff)
downloadlinux-dev-2374b18684dfed2a0588efe4df716d16554da467.tar.xz
linux-dev-2374b18684dfed2a0588efe4df716d16554da467.zip
ath10k: fix bmi exchange tx/rx race
It was possible for tx completion not to be processed. In that case an old stack pointer was left on copy engine tx ring. Next bmi exchange would immediately pop it and use complete() on the completion struct there causing corruption. Make sure to wait for both tx and rx completions properly. 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/pci.h')
-rw-r--r--drivers/net/wireless/ath/ath10k/pci.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index dfdebb4157aa..940129209990 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -38,7 +38,8 @@
#define DIAG_TRANSFER_LIMIT 2048
struct bmi_xfer {
- struct completion done;
+ bool tx_done;
+ bool rx_done;
bool wait_for_resp;
u32 resp_len;
};