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

git-svn-id: svn://kolibrios.org@2865 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2012-07-13 12:39:22 +00:00
parent 042f832f0c
commit 7aeabda91e

View File

@ -792,6 +792,12 @@ transmit:
and [device.cur_tx], TX_RING_SIZE - 1
xor eax, eax
; Update stats
inc [device.packets_tx]
mov eax, [esp+8]
add dword [device.bytes_tx], eax
adc dword [device.bytes_tx + 4], 0
ret 8
.wait_to_send:
@ -897,6 +903,11 @@ int_handler:
and ecx, 0xFFF
sub ecx, 4 ; Do not count the CRC
; Update stats
add dword [device.bytes_rx], ecx
adc dword [device.bytes_rx + 4], 0
inc dword [device.packets_rx]
; Push packet size and pointer, kernel will need it..
push ebx