diff options
author | Mike McCormack <mikem@ring3k.org> | 2011-05-30 19:49:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-03 15:01:06 -0400 |
commit | febc9fe5387ed37cb329563ae29d21b41c71a9dd (patch) | |
tree | d39c1e9b4fb40047e2f90dc2d01942749c25ff55 /drivers | |
parent | 312d5479dcfaca2b8aa451201b5388fdb8c8684a (diff) |
rtlwifi: Assign rx buffer ownership to hardware last
Ownership of an rx buffer should only be given to the hardware
after all other changes are written, otherwise there's
a potential race.
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 6c1b9dffc075..e29feef002bf 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -784,8 +784,6 @@ done: | |||
784 | rtlpriv->cfg->ops->set_desc((u8 *) pdesc, false, | 784 | rtlpriv->cfg->ops->set_desc((u8 *) pdesc, false, |
785 | HW_DESC_RXBUFF_ADDR, | 785 | HW_DESC_RXBUFF_ADDR, |
786 | (u8 *)&bufferaddress); | 786 | (u8 *)&bufferaddress); |
787 | rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, HW_DESC_RXOWN, | ||
788 | (u8 *)&tmp_one); | ||
789 | rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, | 787 | rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, |
790 | HW_DESC_RXPKT_LEN, | 788 | HW_DESC_RXPKT_LEN, |
791 | (u8 *)&rtlpci->rxbuffersize); | 789 | (u8 *)&rtlpci->rxbuffersize); |
@@ -795,6 +793,9 @@ done: | |||
795 | HW_DESC_RXERO, | 793 | HW_DESC_RXERO, |
796 | (u8 *)&tmp_one); | 794 | (u8 *)&tmp_one); |
797 | 795 | ||
796 | rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, HW_DESC_RXOWN, | ||
797 | (u8 *)&tmp_one); | ||
798 | |||
798 | index = (index + 1) % rtlpci->rxringcount; | 799 | index = (index + 1) % rtlpci->rxringcount; |
799 | } | 800 | } |
800 | 801 | ||