diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-09 08:39:38 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-09 08:51:08 +0200 |
commit | 54caeb1f1af20b0afc923b06bf2ae0b7a7251aeb (patch) | |
tree | 12ae584618c97fa088d8202260eb4a0a8b33fb03 /Kernel/Net/RTL8139NetworkAdapter.cpp | |
parent | b65bedd610d39f7d4d2062b29d783e66f612b775 (diff) | |
download | serenity-54caeb1f1af20b0afc923b06bf2ae0b7a7251aeb.zip |
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.
Diffstat (limited to 'Kernel/Net/RTL8139NetworkAdapter.cpp')
-rw-r--r-- | Kernel/Net/RTL8139NetworkAdapter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Net/RTL8139NetworkAdapter.cpp b/Kernel/Net/RTL8139NetworkAdapter.cpp index 84a1a286b8..5ab7282430 100644 --- a/Kernel/Net/RTL8139NetworkAdapter.cpp +++ b/Kernel/Net/RTL8139NetworkAdapter.cpp @@ -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); |