summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-08-10 14:02:49 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-08-10 14:02:49 +0200
commitadf9150bbfd299c136feaffce7162246588119e3 (patch)
tree512b0006e628532998fce3a1ec73d28c93142e7c
parentbfe3d78c55c8823550d48a7b9f7c2b50926a3142 (diff)
downloadabaos-adf9150bbfd299c136feaffce7162246588119e3.tar.gz
abaos-adf9150bbfd299c136feaffce7162246588119e3.tar.bz2
forgot to set transmitting after writting (rtl8139)
-rw-r--r--src/drivers/net/rtl8139.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/net/rtl8139.c b/src/drivers/net/rtl8139.c
index c500842..8fc7ff4 100644
--- a/src/drivers/net/rtl8139.c
+++ b/src/drivers/net/rtl8139.c
@@ -370,6 +370,10 @@ void rtl8139_write( void *obj, network_buffer_t buf )
{
rtl8139_t *rtl8139 = (rtl8139_t *)obj;
+ // TODO: actually not an overrun, but correct handling all four
+ // send buffers is quite complicated as we have to check the status
+ // of the transmit buffers all the time, so for now we assume we
+ // send one packet in a row only
if( rtl8139->transmitting ) {
puts( "rtl8139: currently transmitting, buffer overrun" );
return;
@@ -390,4 +394,6 @@ void rtl8139_write( void *obj, network_buffer_t buf )
rtl8139->transmit_buffer_idx += 1;
rtl8139->transmit_buffer_idx %= NOF_TRANSMIT_BUFFERS;
+
+ rtl8139->transmitting = true;
}