File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed
Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ net_i8259x_init_rx_enable_wait:
268268 jnc net_i8259x_init_rx_enable_wait
269269 xor eax , eax
270270 mov [ rsi + i8259x_RDH ], eax
271- mov eax , i8259x_MAX_DESC - 1
271+ mov eax , i8259x_MAX_DESC / 2
272272 mov [ rsi + i8259x_RDT ], eax
273273
274274; ; Set SECRXCTRL_RX_DIS
@@ -445,6 +445,10 @@ net_i8259x_transmit:
445445
446446 ; TDESC.STA.DD (bit 32) should be 1 once the hardware has sent the packet
447447
448+ ; Increment interface counters
449+ inc qword [ rdx + nt_tx_packets ]
450+ add qword [ rdx + nt_tx_bytes ], rcx
451+
448452 pop rax
449453 pop rdi
450454 ret
@@ -495,6 +499,10 @@ net_i8259x_poll:
495499 and eax , i8259x_MAX_DESC - 1
496500 mov [ rsi + i8259x_RDT ], eax ; Write the updated Receive Descriptor Tail
497501
502+ ; Increment interface counters
503+ inc qword [ rdx + nt_rx_packets ]
504+ add qword [ rdx + nt_rx_bytes ], rcx
505+
498506net_i8259x_poll_end:
499507 pop rax
500508 pop rbx
Original file line number Diff line number Diff line change @@ -98,10 +98,6 @@ b_net_tx_maxcheck:
9898 ; Call the driver transmit function
9999 call [ rdx + nt_transmit ] ; Call driver transmit function passing RDX as interface
100100
101- ; Increment interface counters
102- inc qword [ rdx + nt_tx_packets ]
103- add qword [ rdx + nt_tx_bytes ], rcx
104-
105101 ; Unlock the network interface
106102 mov rax , rdx
107103 add rax , nt_lock
@@ -138,13 +134,6 @@ b_net_rx:
138134 ; Call the driver poll function
139135 call [ rdx + nt_poll ] ; Call driver poll function passing RDX as interface
140136
141- cmp cx , 0
142- je b_net_rx_end
143-
144- ; Increment interface counters
145- inc qword [ rdx + nt_rx_packets ]
146- add qword [ rdx + nt_rx_bytes ], rcx
147-
148137b_net_rx_end:
149138 pop rdx
150139 ret
You can’t perform that action at this time.
0 commit comments