Commit 71352b23 authored by Mike McCormack's avatar Mike McCormack Committed by John W. Linville

rtlwifi: Use write barrier when assigning ownership

Make sure all updates to a descriptor are flushed to memory
before assigning ownship to hardware.
Signed-off-by: default avatarMike McCormack <mikem@ring3k.org>
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent febc9fe5
...@@ -930,6 +930,7 @@ void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) ...@@ -930,6 +930,7 @@ void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val)
if (istx == true) { if (istx == true) {
switch (desc_name) { switch (desc_name) {
case HW_DESC_OWN: case HW_DESC_OWN:
wmb();
SET_TX_DESC_OWN(pdesc, 1); SET_TX_DESC_OWN(pdesc, 1);
break; break;
case HW_DESC_TX_NEXTDESC_ADDR: case HW_DESC_TX_NEXTDESC_ADDR:
...@@ -943,6 +944,7 @@ void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) ...@@ -943,6 +944,7 @@ void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val)
} else { } else {
switch (desc_name) { switch (desc_name) {
case HW_DESC_RXOWN: case HW_DESC_RXOWN:
wmb();
SET_RX_DESC_OWN(pdesc, 1); SET_RX_DESC_OWN(pdesc, 1);
break; break;
case HW_DESC_RXBUFF_ADDR: case HW_DESC_RXBUFF_ADDR:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment