summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-09-19 08:24:42 +0000
committerOlivier Blin <oblin@mandriva.org>2005-09-19 08:24:42 +0000
commit0eaecbef359b57a8ba4e2b880c705d1beb73355d (patch)
treefad16aaace2382d95a30bfc606d945682798cbaa
parent967aa27b7be11c4da66278f5bdc3806e5100f8d1 (diff)
downloaddrakx-backup-do-not-use-0eaecbef359b57a8ba4e2b880c705d1beb73355d.tar
drakx-backup-do-not-use-0eaecbef359b57a8ba4e2b880c705d1beb73355d.tar.gz
drakx-backup-do-not-use-0eaecbef359b57a8ba4e2b880c705d1beb73355d.tar.bz2
drakx-backup-do-not-use-0eaecbef359b57a8ba4e2b880c705d1beb73355d.tar.xz
drakx-backup-do-not-use-0eaecbef359b57a8ba4e2b880c705d1beb73355d.zip
fix hostap/orinoco driver detection (#18294)
-rw-r--r--perl-install/network/ethernet.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index afdeda326..572a33ae8 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -64,7 +64,10 @@ sub get_eth_cards {
"orinoco" => undef, #- should be orinoco_{cs,nortel,pci,plx,tmd}
"hostap" => undef, #- should be hostap_{cs,pci,plx}
);
- $a = $fixes{$a} if exists $fixes{$a};
+ if (exists $fixes{$a}) {
+ $a = $fixes{$a};
+ $a or undef $detected_through_ethtool;
+ }
# 3) try to match a PCMCIA device for device description:
if (my $b = find { $_->{device} eq $interface } @devs) { # PCMCIA case
@@ -77,7 +80,7 @@ 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) {
+ if (!$description || !$a) {
my $dev_path = "/sys/class/net/$interface/device";
my $drv = readlink("$dev_path/driver");
if ($drv && $drv =~ s!.*/!!) {
@@ -86,7 +89,7 @@ sub get_eth_cards {
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();
- $description = $cards[0]{description} if @cards == 1;
+ $description ||= $cards[0]{description} if @cards == 1;
}
}
# 6) try to match a device by driver for device description: