|
@@ -199,13 +199,13 @@ UNMAP_AFTER_INIT ErrorOr<NonnullRefPtr<NetworkAdapter>> E1000ENetworkAdapter::cr
|
|
|
auto rx_descriptors_region = TRY(MM.allocate_contiguous_kernel_region(TRY(Memory::page_round_up(sizeof(e1000_rx_desc) * number_of_rx_descriptors)), "E1000 RX Descriptors"sv, Memory::Region::Access::ReadWrite));
|
|
|
auto tx_descriptors_region = TRY(MM.allocate_contiguous_kernel_region(TRY(Memory::page_round_up(sizeof(e1000_tx_desc) * number_of_tx_descriptors)), "E1000 TX Descriptors"sv, Memory::Region::Access::ReadWrite));
|
|
|
|
|
|
- return TRY(adopt_nonnull_ref_or_enomem(new (nothrow) E1000ENetworkAdapter(pci_device_identifier,
|
|
|
+ return TRY(adopt_nonnull_ref_or_enomem(new (nothrow) E1000ENetworkAdapter(interface_name.representable_view(),
|
|
|
+ pci_device_identifier,
|
|
|
irq, move(registers_io_window),
|
|
|
move(rx_buffer_region),
|
|
|
move(tx_buffer_region),
|
|
|
move(rx_descriptors_region),
|
|
|
- move(tx_descriptors_region),
|
|
|
- move(interface_name))));
|
|
|
+ move(tx_descriptors_region))));
|
|
|
}
|
|
|
|
|
|
UNMAP_AFTER_INIT ErrorOr<void> E1000ENetworkAdapter::initialize(Badge<NetworkingManagement>)
|
|
@@ -229,16 +229,16 @@ UNMAP_AFTER_INIT ErrorOr<void> E1000ENetworkAdapter::initialize(Badge<Networking
|
|
|
return {};
|
|
|
}
|
|
|
|
|
|
-UNMAP_AFTER_INIT E1000ENetworkAdapter::E1000ENetworkAdapter(PCI::DeviceIdentifier const& device_identifier, u8 irq,
|
|
|
+UNMAP_AFTER_INIT E1000ENetworkAdapter::E1000ENetworkAdapter(StringView interface_name,
|
|
|
+ PCI::DeviceIdentifier const& device_identifier, u8 irq,
|
|
|
NonnullOwnPtr<IOWindow> registers_io_window, NonnullOwnPtr<Memory::Region> rx_buffer_region,
|
|
|
NonnullOwnPtr<Memory::Region> tx_buffer_region, NonnullOwnPtr<Memory::Region> rx_descriptors_region,
|
|
|
- NonnullOwnPtr<Memory::Region> tx_descriptors_region, NonnullOwnPtr<KString> interface_name)
|
|
|
- : E1000NetworkAdapter(device_identifier, irq, move(registers_io_window),
|
|
|
+ NonnullOwnPtr<Memory::Region> tx_descriptors_region)
|
|
|
+ : E1000NetworkAdapter(interface_name, device_identifier, irq, move(registers_io_window),
|
|
|
move(rx_buffer_region),
|
|
|
move(tx_buffer_region),
|
|
|
move(rx_descriptors_region),
|
|
|
- move(tx_descriptors_region),
|
|
|
- move(interface_name))
|
|
|
+ move(tx_descriptors_region))
|
|
|
{
|
|
|
}
|
|
|
|