瀏覽代碼

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.
Thomas Wagenveld 4 年之前
父節點
當前提交
e788bbdb55
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      Kernel/Net/NE2000NetworkAdapter.h

+ 6 - 2
Kernel/Net/NE2000NetworkAdapter.h

@@ -23,7 +23,12 @@ public:
     virtual ~NE2000NetworkAdapter() override;
     virtual ~NE2000NetworkAdapter() override;
 
 
     virtual void send_raw(ReadonlyBytes) 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(); }
     virtual StringView purpose() const override { return class_name(); }
 
 
@@ -48,7 +53,6 @@ private:
     IOAddress m_io_base;
     IOAddress m_io_base;
     int m_ring_read_ptr;
     int m_ring_read_ptr;
     u8 m_interrupt_line { 0 };
     u8 m_interrupt_line { 0 };
-    bool m_link_up { false };
 
 
     MACAddress m_mac_address;
     MACAddress m_mac_address;
     EntropySource m_entropy_source;
     EntropySource m_entropy_source;