dinetwork: don't transmit fcs

This commit is contained in:
Patrick Mackinlay 2021-05-10 21:11:32 +07:00
parent 9ef03aa399
commit bf96ef8c48
6 changed files with 10 additions and 8 deletions

View File

@ -482,7 +482,7 @@ void am7990_device_base::transmit()
} }
} }
send(buf, length); send(buf, length, 4);
} }
void am7990_device_base::send_complete_cb(int result) void am7990_device_base::send_complete_cb(int result)

View File

@ -393,7 +393,7 @@ void dp83932c_device::transmit()
// transmit data // transmit data
dump_bytes(buf, length); dump_bytes(buf, length);
send(buf, length); send(buf, length, 4);
} }
void dp83932c_device::send_complete_cb(int result) void dp83932c_device::send_complete_cb(int result)

View File

@ -288,7 +288,7 @@ void seeq8003_device::transmit(void *ptr, int param)
dump_bytes(buf, length); dump_bytes(buf, length);
// transmit the frame // transmit the frame
send(buf, length); send(buf, length, 4);
// TODO: transmit errors/TxRET // TODO: transmit errors/TxRET

View File

@ -1030,7 +1030,7 @@ bool i82586_device::cu_transmit(u32 command)
LOG("cu_transmit sending frame length %d\n", length); LOG("cu_transmit sending frame length %d\n", length);
dump_bytes(buf, length); dump_bytes(buf, length);
return send(buf, length) == length; return send(buf, length, 4) == length;
} }
} }

View File

@ -28,7 +28,7 @@ void device_network_interface::interface_post_start()
device().save_item(NAME(m_loopback_control)); device().save_item(NAME(m_loopback_control));
} }
int device_network_interface::send(u8 *buf, int len) int device_network_interface::send(u8 *buf, int len, int fcs)
{ {
// TODO: enable this check when other devices implement delayed transmit // TODO: enable this check when other devices implement delayed transmit
//if (m_send_timer->enabled()) //if (m_send_timer->enabled())
@ -49,8 +49,10 @@ int device_network_interface::send(u8 *buf, int len)
} }
else if (m_dev) else if (m_dev)
{ {
// send the data // send the data (excluding fcs)
result = m_dev->send(buf, len); result = m_dev->send(buf, len - fcs);
if (result)
result += fcs;
} }
// schedule transmit complete callback // schedule transmit complete callback

View File

@ -23,7 +23,7 @@ public:
bool get_promisc() const { return m_promisc; } bool get_promisc() const { return m_promisc; }
int get_interface() const { return m_intf; } int get_interface() const { return m_intf; }
int send(u8 *buf, int len); int send(u8 *buf, int len, int fcs = 0);
// TODO: de-virtualise this when existing devices implement delayed receive // TODO: de-virtualise this when existing devices implement delayed receive
virtual void recv_cb(u8 *buf, int len); virtual void recv_cb(u8 *buf, int len);