From 74c43b34773ab78c98831d234567ba3a6d31e699 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 4 Nov 2019 02:31:40 +0100 Subject: [PATCH] zynq::eth::tx: clear entry.word1 for each packet --- src/zynq/eth/tx.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/zynq/eth/tx.rs b/src/zynq/eth/tx.rs index 8f506b0..e47ae12 100644 --- a/src/zynq/eth/tx.rs +++ b/src/zynq/eth/tx.rs @@ -93,7 +93,12 @@ impl<'a> DescList<'a> { let entry = &mut self.list[self.next]; if entry.word1.read().used() { 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; if self.next >= list_len {