diff options
author | Mike McCormack <mikem@ring3k.org> | 2011-05-31 08:49:51 +0900 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-03 15:01:06 -0400 |
commit | febc9fe5387ed37cb329563ae29d21b41c71a9dd (patch) | |
tree | d39c1e9b4fb40047e2f90dc2d01942749c25ff55 /drivers/net/wireless/rtlwifi | |
parent | 312d5479dcfaca2b8aa451201b5388fdb8c8684a (diff) | |
download | op-kernel-dev-febc9fe5387ed37cb329563ae29d21b41c71a9dd.zip op-kernel-dev-febc9fe5387ed37cb329563ae29d21b41c71a9dd.tar.gz |
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/net/wireless/rtlwifi')
-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 6c1b9df..e29feef 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c @@ -784,8 +784,6 @@ done: rtlpriv->cfg->ops->set_desc((u8 *) pdesc, false, HW_DESC_RXBUFF_ADDR, (u8 *)&bufferaddress); - rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, HW_DESC_RXOWN, - (u8 *)&tmp_one); rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, HW_DESC_RXPKT_LEN, (u8 *)&rtlpci->rxbuffersize); @@ -795,6 +793,9 @@ done: HW_DESC_RXERO, (u8 *)&tmp_one); + rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, HW_DESC_RXOWN, + (u8 *)&tmp_one); + index = (index + 1) % rtlpci->rxringcount; } |