From e788bbdb556f717091c2fba9cf3890a8f48bf26b Mon Sep 17 00:00:00 2001 From: Thomas Wagenveld Date: Sat, 24 Jul 2021 19:35:32 +0200 Subject: [PATCH] Kernel/NE2000: Assume link status is up Right now, NE2000 NICs don't work because the link is down by default and this will never change. Of all the NE2000 documentation I looked at I could not find a link status indicator, so just assume the link is up. --- Kernel/Net/NE2000NetworkAdapter.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Kernel/Net/NE2000NetworkAdapter.h b/Kernel/Net/NE2000NetworkAdapter.h index 3d4d74960e..2fda43ccfc 100644 --- a/Kernel/Net/NE2000NetworkAdapter.h +++ b/Kernel/Net/NE2000NetworkAdapter.h @@ -23,7 +23,12 @@ public: virtual ~NE2000NetworkAdapter() override; virtual void send_raw(ReadonlyBytes) override; - virtual bool link_up() override { return m_link_up; } + virtual bool link_up() override + { + // Pure NE2000 doesn't seem to have a link status indicator, so + // just assume that it's up. + return true; + } virtual StringView purpose() const override { return class_name(); } @@ -48,7 +53,6 @@ private: IOAddress m_io_base; int m_ring_read_ptr; u8 m_interrupt_line { 0 }; - bool m_link_up { false }; MACAddress m_mac_address; EntropySource m_entropy_source;