diff options
author | Larry Finger | 2011-05-24 03:37:31 +0200 |
---|---|---|
committer | John W. Linville | 2011-06-01 21:19:02 +0200 |
commit | 5111dd3e422d08435164fc6d405d849ff6421eec (patch) | |
tree | 9c74e99dca223f3b4343b6735111a30f54535c3d /drivers/net | |
parent | mwifiex: remove support for old chipsets W0/W1 (diff) | |
download | kernel-qcow2-linux-5111dd3e422d08435164fc6d405d849ff6421eec.tar.gz kernel-qcow2-linux-5111dd3e422d08435164fc6d405d849ff6421eec.tar.xz kernel-qcow2-linux-5111dd3e422d08435164fc6d405d849ff6421eec.zip |
rtlwifi: rtl8192se: Use write barrier when assigning ownership
As noted by Mike McCormack <mikem@ring3k.org> for rtl8192ce, make sure
all updates to a descriptor are flushed to memory before assigning ownship
to hardware.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192se/trx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c index 14a8b7866c0d..d509cf6a1e4d 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c @@ -873,6 +873,7 @@ void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, SET_TX_DESC_TX_BUFFER_SIZE(pdesc, (u16)(skb->len)); SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, cpu_to_le32(mapping)); + wmb(); SET_TX_DESC_OWN(pdesc, 1); } else { /* H2C Command Desc format (Host TXCMD) */ /* 92SE must set as 1 for firmware download HW DMA error */ @@ -891,6 +892,7 @@ void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, SET_TX_DESC_TX_BUFFER_SIZE(pdesc, (u16)(skb->len)); SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, cpu_to_le32(mapping)); + wmb(); SET_TX_DESC_OWN(pdesc, 1); } @@ -901,6 +903,7 @@ void rtl92se_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) if (istx == true) { switch (desc_name) { case HW_DESC_OWN: + wmb(); SET_TX_DESC_OWN(pdesc, 1); break; case HW_DESC_TX_NEXTDESC_ADDR: @@ -914,6 +917,7 @@ void rtl92se_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) } else { switch (desc_name) { case HW_DESC_RXOWN: + wmb(); SET_RX_STATUS_DESC_OWN(pdesc, 1); break; case HW_DESC_RXBUFF_ADDR: |