forked from Minki/linux
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>
This commit is contained in:
parent
312d5479dc
commit
febc9fe538
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user