Fix RxRing::buf_release.

The original code was correct after all.
pull/1/head
whitequark 2018-03-27 09:13:11 +00:00
parent 308ad97586
commit b13ef96bbe
1 changed files with 2 additions and 2 deletions

View File

@ -166,13 +166,13 @@ impl RxRing {
}
fn buf_release(&mut self) {
self.desc_buf[self.cur_desc + 0] = EMAC_RDES0_OWN;
self.cur_desc += ETH_DESC_U32_SIZE;
if self.cur_desc == self.desc_buf.len() {
self.cur_desc = 0;
}
self.counter += 1;
self.desc_buf[self.cur_desc + 0] = EMAC_RDES0_OWN;
}
}