diff options
author | Thomas Wagenveld <thomas@thomasw.dev> | 2021-07-25 20:16:42 +0200 |
---|---|---|
committer | Gunnar Beutner <gunnar@beutner.name> | 2021-08-03 10:20:51 +0200 |
commit | 59fdeec7f5fc671286cc93b134f99dd4a6088aa4 (patch) | |
tree | 34d8b24acf319cf8c445b28a1898777f90451e20 /Kernel/Net/LoopbackAdapter.h | |
parent | 238ac8ac25f3345af94d8bdacd42b7e7f2935d93 (diff) | |
download | serenity-59fdeec7f5fc671286cc93b134f99dd4a6088aa4.zip |
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.
Diffstat (limited to 'Kernel/Net/LoopbackAdapter.h')
-rw-r--r-- | Kernel/Net/LoopbackAdapter.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Net/LoopbackAdapter.h b/Kernel/Net/LoopbackAdapter.h index a30538c73e..fb75abb3c0 100644 --- a/Kernel/Net/LoopbackAdapter.h +++ b/Kernel/Net/LoopbackAdapter.h @@ -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; } }; } |