PCNet driver now keeps track of number of received/sent packets/bytes.

git-svn-id: svn://kolibrios.org@2863 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2012-07-13 10:03:25 +00:00
parent 5dfb64cfd9
commit ce6a93da60

View File

@ -996,6 +996,12 @@ transmit:
and [device.cur_tx], 3 and [device.cur_tx], 3
DEBUGF 2," - Packet Sent! " DEBUGF 2," - Packet Sent! "
; Update stats
inc [device.packets_tx]
mov eax, [esp+8]
add dword [device.bytes_tx], eax
adc dword [device.bytes_tx + 4], 0
.finish: .finish:
DEBUGF 2," - Done!\n" DEBUGF 2," - Done!\n"
stdcall KernelFree, [esp+4] stdcall KernelFree, [esp+4]
@ -1094,6 +1100,11 @@ int_handler:
test eax, eax ; Test if we allocated succesfully test eax, eax ; Test if we allocated succesfully
jz .abort ; jz .abort ;
; Update stats
add dword [device.bytes_rx], ecx
adc dword [device.bytes_rx + 4], 0
inc dword [device.packets_rx]
push ebx push ebx
push .receiver_test_loop ; push .receiver_test_loop ;
push ecx ; for eth_receiver push ecx ; for eth_receiver