summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-10-27 18:36:52 +0000
committerOlivier Blin <oblin@mandriva.org>2005-10-27 18:36:52 +0000
commitf7ed3a187a799ef51e7c1467c7d681f7864544e0 (patch)
treef5237cbe50bbec7dffa3b71507a3afb0e93ea2b3
parent0de256bb68aa8015e99538d34bd8fd6b7da29b7b (diff)
downloaddrakx-f7ed3a187a799ef51e7c1467c7d681f7864544e0.tar
drakx-f7ed3a187a799ef51e7c1467c7d681f7864544e0.tar.gz
drakx-f7ed3a187a799ef51e7c1467c7d681f7864544e0.tar.bz2
drakx-f7ed3a187a799ef51e7c1467c7d681f7864544e0.tar.xz
drakx-f7ed3a187a799ef51e7c1467c7d681f7864544e0.zip
crappy workaround for rt2400/rt2500 and their missing "device" link in sysfs
-rw-r--r--perl-install/network/ethernet.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index e1f423791..4d9633cd2 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -90,6 +90,12 @@ sub get_eth_cards {
$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;
+ } elsif (!$a && -e "/sys/class/net/$interface/wireless") {
+ # probably a rt2400/rt2500 device (PCI or PCMCIA CardBus)
+ # these broken drivers don't create the "device" link
+ # try to see if rt2400/rt2500 is loaded, and assume current wireless device uses it
+ # FIXME: remove this code as soon as the drivers are fixed
+ $a = find { -e "/sys/bus/pci/drivers/$_" } qw(rt2400 rt2500);
}
}
# 6) try to match a device by driver for device description: