From e6827a81f3c4318ab54f9cf8c1461677028babd5 Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 25 Jun 2019 01:32:43 +0200 Subject: [PATCH] eth tx: set net_ctrl.start_tx on sending --- src/eth/tx.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/eth/tx.rs b/src/eth/tx.rs index e76bbce..99dca4e 100644 --- a/src/eth/tx.rs +++ b/src/eth/tx.rs @@ -97,9 +97,12 @@ pub struct PktRef<'a> { impl<'a> Drop for PktRef<'a> { fn drop(&mut self) { self.entry.word1.modify(|_, w| w.used(false)); - self.regs.net_ctrl.modify(|_, w| - w.tx_en(true) - ); + if ! self.regs.tx_status.read().tx_go() { + println!("tx start_tx"); + self.regs.net_ctrl.modify(|_, w| + w.start_tx(true) + ); + } } }