summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaya Erez <qca_merez@qca.qualcomm.com>2016-05-29 08:44:09 +0300
committerKyle Yan <kyan@codeaurora.org>2016-06-08 15:17:29 -0700
commitc89efd08b61b9aa245d843112fa908c8b9f5f8cb (patch)
treefc9712d20032fa168474545b0757dfdd9855eaa0
parent848faf10c4ada78120ee70a0f7654638095cefa6 (diff)
wil6210: guarantee safe access to rx descriptors shared memory
add memory barrier after allocating new rx descriptors, before updating the hwtail. This will guarantee that all writes to descriptors (shared memory) are done before committing them to HW. Change-Id: If7c91c31b490b0762d23df21db7c30652b0817d4 Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: ab6d7cc3eab4093caf91ba8b27590c4080d7d01c Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git CRs-Fixed: 1015627 Signed-off-by: Maya Erez <merez@codeaurora.org>
-rw-r--r--drivers/net/wireless/ath/wil6210/txrx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c
index fa6ea24a1309..3909af171bad 100644
--- a/drivers/net/wireless/ath/wil6210/txrx.c
+++ b/drivers/net/wireless/ath/wil6210/txrx.c
@@ -544,6 +544,12 @@ static int wil_rx_refill(struct wil6210_priv *wil, int count)
break;
}
}
+
+ /* make sure all writes to descriptors (shared memory) are done before
+ * committing them to HW
+ */
+ wmb();
+
wil_w(wil, v->hwtail, v->swtail);
return rc;