aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaya Erez <[email protected]>2016-05-16 22:23:31 +0300
committerKalle Valo <[email protected]>2016-05-28 11:19:13 +0300
commitab6d7cc3eab4093caf91ba8b27590c4080d7d01c (patch)
treed5e936d8fe4d24ebb9b56893e1f8584b49ad2f20
parenteb26cff148f5449972121e46e403f549d71f6f49 (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. Signed-off-by: Maya Erez <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
-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;