forked from KolibriOS/kolibrios
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:
parent
042f832f0c
commit
7aeabda91e
@ -792,6 +792,12 @@ transmit:
|
|||||||
and [device.cur_tx], TX_RING_SIZE - 1
|
and [device.cur_tx], TX_RING_SIZE - 1
|
||||||
xor eax, eax
|
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
|
ret 8
|
||||||
|
|
||||||
.wait_to_send:
|
.wait_to_send:
|
||||||
@ -897,6 +903,11 @@ int_handler:
|
|||||||
and ecx, 0xFFF
|
and ecx, 0xFFF
|
||||||
sub ecx, 4 ; Do not count the CRC
|
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 packet size and pointer, kernel will need it..
|
||||||
|
|
||||||
push ebx
|
push ebx
|
||||||
|
Loading…
Reference in New Issue
Block a user