summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/network/ethernet.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index bb08738ae..460457df7 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -52,7 +52,13 @@ sub get_eth_cards {
my $interface = $_;
my $description;
# 0) get interface's driver through ETHTOOL ioctl or module aliases:
- my $a = c::getNetDriver($interface) || $modules_conf->get_alias($interface);
+ my ($a, $detected_through_ethtool);
+ $a = c::getNetDriver($interface);
+ if ($a) {
+ $detected_through_ethtool = 1;
+ } else {
+ $a = $modules_conf->get_alias($interface);
+ }
# workaround buggy drivers that returns a bogus driver name for the GDRVINFO command of the ETHTOOL ioctl:
my %fixes = (
@@ -79,7 +85,7 @@ sub get_eth_cards {
if (!$description) {
my $drv = readlink("/sys/class/net/$interface/driver");
if ($drv && $drv =~ s!.*/!!) {
- $a = $drv;
+ $a = $drv if $detected_through_ethtool;
my %l;
my %sysfs_fields = (id => "device", subid => "subsystem_device", vendor => "vendor", subvendor => "subsystem_vendor");
$l{$_} = hex(chomp_(cat_("/sys/class/net/$interface/device/" . $sysfs_fields{$_}))) foreach keys %sysfs_fields;