20#include "pedigree/kernel/machine/Device.h"
21#include "pedigree/kernel/processor/types.h"
22#include "pedigree/kernel/utilities/List.h"
23#include "pedigree/kernel/utilities/new"
24#include "pedigree/kernel/utilities/utility.h"
27#include "modules/Module.h"
28#include "modules/system/network-stack/NetworkStack.h"
33 uint16_t vendor, device;
38static struct nic potential_nics[] = {
40 {0x10b7, 0x9000,
"3c905-tpo",
"3Com900-TPO"},
41 {0x10b7, 0x9001,
"3c905-t4",
"3Com900-Combo"},
42 {0x10b7, 0x9050,
"3c905-tpo100",
"3Com905-TX"},
43 {0x10b7, 0x9051,
"3c905-combo",
"3Com905-T4"},
45 {0x10b7, 0x9004,
"3c905b-tpo",
"3Com900B-TPO"},
46 {0x10b7, 0x9005,
"3c905b-combo",
"3Com900B-Combo"},
47 {0x10b7, 0x9006,
"3c905b-tpb2",
"3Com900B-2/T"},
48 {0x10b7, 0x900a,
"3c905b-fl",
"3Com900B-FL"},
49 {0x10b7, 0x9055,
"3c905b-tpo100",
"3Com905B-TX"},
50 {0x10b7, 0x9056,
"3c905b-t4",
"3Com905B-T4"},
51 {0x10b7, 0x9058,
"3c905b-9058",
"3Com905B-9058"},
52 {0x10b7, 0x905a,
"3c905b-fx",
"3Com905B-FL"},
54 {0x10b7, 0x9200,
"3c905c-tpo",
"3Com905C-TXM"},
55 {0x10b7, 0x9800,
"3c980",
"3Com980-Cyclone"},
56 {0x10b7, 0x9805,
"3c9805",
"3Com9805"},
57 {0x10b7, 0x7646,
"3csoho100-tx",
"3CSOHO100-TX"},
58 {0x10b7, 0x4500,
"3c450",
"3Com450 HomePNA Tornado"},
61#define NUM_POTENTIAL_NICS (sizeof(potential_nics) / sizeof(potential_nics[0]))
63static bool bFound =
false;
66static void probeDevice(
Device* pDev) {
71 if (!pCard->isInitialised()) {
79 g_Cards.pushBack(pCard);
83 for (
unsigned int i = 0; i < NUM_POTENTIAL_NICS; i++)
84 Device::searchByVendorIdAndDeviceId(potential_nics[i].vendor, potential_nics[i].device,
92 return device == target ? nullptr : device;
94 auto callback = pedigree_std::make_callable(removeCard);
95 while (g_Cards.count()) {
103MODULE_INFO(
"3c90x", &entry, &exit,
"network-stack");
static void foreach(Callback callback, Device *root=0)
Device * getParent() const
void setParent(Device *p)
void replaceChild(Device *src, Device *dest)
void deRegisterDevice(Network *pDevice)
static NetworkStack & instance()