From fc4beabab2563aad26071d4c249b88d36a04bde4 Mon Sep 17 00:00:00 2001 From: Arisotura Date: Sat, 3 Sep 2022 19:07:54 +0200 Subject: [PATCH] don't transmit shit if RXCNT.bit15 isn't set --- src/Wifi.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Wifi.cpp b/src/Wifi.cpp index 3174fdd6..6ecb0458 100644 --- a/src/Wifi.cpp +++ b/src/Wifi.cpp @@ -540,6 +540,9 @@ void StartTX_Beacon() // TODO eventually: there is a small delay to firing TX void FireTX() { + if (!(IOPORT(W_RXCnt) & 0x8000)) + return; + u16 txbusy = IOPORT(W_TXBusy); u16 txreq = IOPORT(W_TXReqRead); @@ -2034,6 +2037,10 @@ void Write(u32 addr, u16 val) IOPORT(W_TXSlotReply2) = IOPORT(W_TXSlotReply1); IOPORT(W_TXSlotReply1) = 0; } + if (val & 0x8000) + { + FireTX(); + } val &= 0xFF0E; if (val & 0x7FFF) printf("wifi: unknown RXCNT bits set %04X\n", val); break;