forked from M-Labs/zynq-rs
1
0
Fork 0

zynq::eth::tx: clear entry.word1 for each packet

This commit is contained in:
Astro 2019-11-04 02:31:40 +01:00
parent 99a00e019b
commit 74c43b3477
1 changed files with 6 additions and 1 deletions

View File

@ -93,7 +93,12 @@ impl<'a> DescList<'a> {
let entry = &mut self.list[self.next]; let entry = &mut self.list[self.next];
if entry.word1.read().used() { if entry.word1.read().used() {
let buffer = &mut self.buffers[self.next][0..length]; let buffer = &mut self.buffers[self.next][0..length];
entry.word1.modify(|_, w| w.length(length as u16)); entry.word1.write(DescWord1::zeroed()
.length(length as u16)
.last_buffer(true)
.wrap(self.next >= list_len - 1)
.used(true)
);
self.next += 1; self.next += 1;
if self.next >= list_len { if self.next >= list_len {