Search Linux Wireless

Re: [PATCH 6/8] rtlwifi: Assign rx buffer ownership to hardware last

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/23/2011 08:54 AM, Mike McCormack wrote:
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@xxxxxxxxxx>
---
  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 fd74396..4fe405a 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -782,8 +782,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);
@@ -793,6 +791,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;
  	}


Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
---

Larry

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux