1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

RTL8139: Fix bogus (but harmless) TX buffer index in send_raw()

This was getting fixed up by the loop that chooses the next TX buffer
anyway, but let's do this correctly.

Fixes #522.
This commit is contained in:
Andreas Kling 2019-09-09 08:39:38 +02:00
parent b65bedd610
commit 54caeb1f1a

View file

@ -296,7 +296,7 @@ void RTL8139NetworkAdapter::send_raw(const u8* data, int length)
#ifdef RTL8139_DEBUG
kprintf("RTL8139NetworkAdapter: chose buffer %d @ %p\n", hw_buffer, m_tx_buffer_addr[hw_buffer]);
#endif
m_tx_next_buffer = hw_buffer + 1 % 4;
m_tx_next_buffer = (hw_buffer + 1) % 4;
}
memcpy((void*)(m_tx_buffer_addr[hw_buffer]), data, length);