Revert "Revert the rx_buf_release() change in 8491394a."

This reverts commit 724221c643.
This commit is contained in:
Sebastien Bourdeauducq 2018-03-19 15:39:41 +08:00
parent 13aa02a318
commit cbdd2c409c
1 changed files with 2 additions and 2 deletions

View File

@ -309,13 +309,13 @@ impl DeviceInner {
}
fn rx_buf_release(&mut self) {
self.rx_desc_buf[self.rx_cur_desc + 0] = EMAC_RDES0_OWN;
self.rx_cur_desc += ETH_DESC_U32_SIZE;
if self.rx_cur_desc == self.rx_desc_buf.len() {
self.rx_cur_desc = 0;
}
self.rx_counter += 1;
self.rx_desc_buf[self.rx_cur_desc + 0] = EMAC_RDES0_OWN;
}
// TX buffer functions