summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/ethernet.pm4
-rw-r--r--perl-install/network/ndiswrapper.pm2
2 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 341e17a36..e20aa0ba4 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -77,11 +77,11 @@ sub get_eth_cards {
# 5) try to match a device through sysfs for driver & device description:
# (eg: ipw2100 driver for intel centrino do not support ETHTOOL)
if (!$description) {
- my $drv = readlink("/sys/class/net/$interface/driver");
+ my $dev_path = "/sys/class/net/$interface/device";
+ my $drv = readlink("$dev_path/driver");
if ($drv && $drv =~ s!.*/!!) {
$a = $drv unless $detected_through_ethtool;
my %l;
- my $dev_path = "/sys/class/net/$interface/device";
my $sysfs_fields = detect_devices::get_sysfs_device_id_map($dev_path);
$l{$_} = hex(chomp_(cat_("$dev_path/" . $sysfs_fields->{$_}))) foreach keys %$sysfs_fields;
my @cards = grep { my $dev = $_; every { $dev->{$_} eq $l{$_} } keys %l } detect_devices::probeall();
diff --git a/perl-install/network/ndiswrapper.pm b/perl-install/network/ndiswrapper.pm
index d135e98c4..c7a592c75 100644
--- a/perl-install/network/ndiswrapper.pm
+++ b/perl-install/network/ndiswrapper.pm
@@ -58,7 +58,7 @@ sub find_matching_devices {
-l $dev_path or next;
my $map = detect_devices::get_sysfs_device_id_map($dev_path);
if (every { hex(chomp_(cat_("$dev_path/" . $map->{$_}))) eq $device->{$_} } keys %$map) {
- my $driver = readlink("$net_path/$interface/driver");
+ my $driver = readlink("$net_path/$interface/device/driver");
$driver =~ s!.*/!!;
push @devices, [ $interface, $driver ] if $driver;
}