Skip to content

Commit 1836f9f

Browse files
author
Ian Seyler
committed
Fix i8254x call address store
1 parent 17ccd6a commit 1836f9f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/drivers/net/i8254x.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ net_i8254x_init:
7777
call net_i8254x_reset
7878

7979
; Store call addresses
80-
add rdi, 18
80+
sub rdi, 0x20
8181
mov rax, net_i8254x_transmit
8282
stosq
8383
mov rax, net_i8254x_poll

src/syscalls/net.asm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ b_net_tx_maxcheck:
7171
xchg rax, rsi
7272

7373
; Call the driver transmit function
74-
call [rdx+0x20] ; Call driver transmit function passing RDX as interface
74+
call [rdx+nt_transmit] ; Call driver transmit function passing RDX as interface
7575

7676
; Increment interface counters
77-
inc qword [rdx+0x40] ; Increment TXPackets
78-
add qword [rdx+0x48], rcx ; Increment TXBytes
77+
inc qword [rdx+nt_tx_packets] ; Increment TXPackets
78+
add qword [rdx+nt_tx_bytes], rcx ; Increment TXBytes
7979

8080
; TODO - This should be per interface
8181
mov rax, os_NetLock
@@ -110,14 +110,14 @@ b_net_rx:
110110
add edx, net_table ; Add offset to net_table
111111

112112
; Call the driver poll function
113-
call [rdx+0x28] ; Call driver poll function passing RDX as interface
113+
call [rdx+nt_poll] ; Call driver poll function passing RDX as interface
114114

115115
cmp cx, 0
116116
je b_net_rx_nodata
117117

118118
; Increment interface counters
119-
inc qword [rdx+0x50] ; Increment RXPackets
120-
add qword [rdx+0x58], rcx ; Increment RXBytes
119+
inc qword [rdx+nt_rx_packets] ; Increment RXPackets
120+
add qword [rdx+nt_rx_bytes], rcx ; Increment RXBytes
121121

122122
mov rsi, os_PacketBuffers ; Packet exists here
123123
push rcx

0 commit comments

Comments
 (0)