summaryrefslogtreecommitdiff
path: root/kernel/drivers/rtl8139.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-11-22 00:47:55 +0100
committerAnton Kling <anton@kling.gg>2023-11-22 00:47:55 +0100
commitf3c7d7fbdea1f2bac81909116ddb747a1f8abdf5 (patch)
tree62a1d998ce11bf4db4343f69dea4e8d231191e48 /kernel/drivers/rtl8139.c
parent24f81104f5ff9cb4ab7db766c53f77fe0e5b86cc (diff)
Meta: Cleanup of header files such that they are partially shared
The /include directory contains definitons that both the kernel and libc need to be in sync.
Diffstat (limited to 'kernel/drivers/rtl8139.c')
-rw-r--r--kernel/drivers/rtl8139.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/kernel/drivers/rtl8139.c b/kernel/drivers/rtl8139.c
index cfe5cf2..0ed562e 100644
--- a/kernel/drivers/rtl8139.c
+++ b/kernel/drivers/rtl8139.c
@@ -48,9 +48,7 @@ void handle_packet(void) {
struct PACKET_HEADER packet_header;
packet_header.raw = *buf;
assert(packet_header.data.ROK);
- kprintf("packet_header.raw: %x\n", packet_header.raw);
u16 packet_length = *(buf + 1);
- kprintf("packet_length: %x\n", packet_length);
u8 packet_buffer[8192 + 16];
if (current_packet_read + packet_length >= 8192 + 16) {
@@ -77,14 +75,11 @@ void handle_packet(void) {
__attribute__((interrupt)) void rtl8139_handler(void *regs) {
(void)regs;
u16 status = inw(rtl8139.gen.base_mem_io + 0x3e);
- kprintf("status: %x\n", status);
outw(rtl8139.gen.base_mem_io + 0x3E, 0x5);
if (status & (1 << 2)) {
- kprintf("Packet sent\n");
}
if (status & (1 << 0)) {
- kprintf("Received packet\n");
handle_packet();
}
@@ -118,7 +113,6 @@ void get_mac_address(u8 mac[6]) {
u16 high_mac = inw(base_address + 0x4);
mac_address = ((u64)high_mac << 32) | low_mac;
}
- kprintf("mac_address: %x\n", mac_address);
memcpy(mac, &mac_address, sizeof(u8[6]));
}