From f7ed3a187a799ef51e7c1467c7d681f7864544e0 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 27 Oct 2005 18:36:52 +0000 Subject: crappy workaround for rt2400/rt2500 and their missing "device" link in sysfs --- perl-install/network/ethernet.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'perl-install/network') 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: -- cgit v1.2.1