1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

Kernel: Add interface to read link speed and duplex for NetworkAdapter

Read the appropriate registers for RTL8139, RTL8168 and E1000.
For NE2000 just assume 10mbit full duplex as there is no indicator
for it in the pure NE2000 spec. Mock values for loopback.
This commit is contained in:
Thomas Wagenveld 2021-07-25 20:16:42 +02:00 committed by Gunnar Beutner
parent 238ac8ac25
commit 59fdeec7f5
9 changed files with 98 additions and 0 deletions

View file

@ -23,6 +23,8 @@ public:
virtual void send_raw(ReadonlyBytes) override;
virtual StringView class_name() const override { return "LoopbackAdapter"; }
virtual bool link_up() override { return true; }
virtual bool link_full_duplex() override { return true; }
virtual int link_speed() override { return 1000; }
};
}