summaryrefslogtreecommitdiffstats
path: root/perl-install/network/ethernet.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-05-02 08:56:10 +0000
committerOlivier Blin <oblin@mandriva.org>2005-05-02 08:56:10 +0000
commitd7b672aeb285a54570198714812b3ecf610b40f4 (patch)
tree89fcf16758a71bf60f1bad0133f6491f46a777d7 /perl-install/network/ethernet.pm
parent8547eaa3c667ab5761786cfe95c66dc4f9bba8a9 (diff)
downloaddrakx-backup-do-not-use-d7b672aeb285a54570198714812b3ecf610b40f4.tar
drakx-backup-do-not-use-d7b672aeb285a54570198714812b3ecf610b40f4.tar.gz
drakx-backup-do-not-use-d7b672aeb285a54570198714812b3ecf610b40f4.tar.bz2
drakx-backup-do-not-use-d7b672aeb285a54570198714812b3ecf610b40f4.tar.xz
drakx-backup-do-not-use-d7b672aeb285a54570198714812b3ecf610b40f4.zip
fix USB devices detection for ndiswrapper
Diffstat (limited to 'perl-install/network/ethernet.pm')
-rw-r--r--perl-install/network/ethernet.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 298ced456..35e22308b 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -100,8 +100,9 @@ sub get_eth_cards {
if ($drv && $drv =~ s!.*/!!) {
$a = $drv unless $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;
+ 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();
$description = $cards[0]{description} if @cards == 1;
}