1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:37:43 +00:00

Kernel: Instantiate network adapters in their own detect() methods

This commit is one step forward for pluggable driver modules.
Instead of creating instances of network adapter classes, we let
their detect() methods to figure out if there are existing devices
to initialize.
This commit is contained in:
Liav A 2020-04-10 20:33:30 +03:00 committed by Andreas Kling
parent 65f939b55c
commit ea58563970
6 changed files with 27 additions and 22 deletions

View file

@ -58,8 +58,10 @@
#include <Kernel/Interrupts/PIC.h>
#include <Kernel/KSyms.h>
#include <Kernel/Multiboot.h>
#include <Kernel/Net/E1000NetworkAdapter.h>
#include <Kernel/Net/LoopbackAdapter.h>
#include <Kernel/Net/NetworkTask.h>
#include <Kernel/Net/RTL8139NetworkAdapter.h>
#include <Kernel/PCI/Access.h>
#include <Kernel/PCI/Initializer.h>
#include <Kernel/Process.h>
@ -190,6 +192,9 @@ void init_stage2()
}
}
E1000NetworkAdapter::detect();
RTL8139NetworkAdapter::detect();
LoopbackAdapter::the();
Syscall::initialize();