summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-02-22 11:52:11 +0000
committerOlivier Blin <oblin@mandriva.com>2008-02-22 11:52:11 +0000
commit839f8d4645badb3e01234505cb9965c7652ca611 (patch)
treeeea70d76aa4fb2e9a9e3db42642b4dd0098d7ebd
parente3a64aac70be596ba94de43ec53613824cd22e59 (diff)
downloaddrakx-net-839f8d4645badb3e01234505cb9965c7652ca611.tar
drakx-net-839f8d4645badb3e01234505cb9965c7652ca611.tar.gz
drakx-net-839f8d4645badb3e01234505cb9965c7652ca611.tar.bz2
drakx-net-839f8d4645badb3e01234505cb9965c7652ca611.tar.xz
drakx-net-839f8d4645badb3e01234505cb9965c7652ca611.zip
find conflicting drivers with no net interface as well (for example ssb), by looking at the registered driver in sysfs
-rw-r--r--lib/network/ndiswrapper.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/network/ndiswrapper.pm b/lib/network/ndiswrapper.pm
index c2fa73f..6950c2b 100644
--- a/lib/network/ndiswrapper.pm
+++ b/lib/network/ndiswrapper.pm
@@ -63,6 +63,14 @@ sub find_matching_devices {
}
}
+ #- find drivers with no net interface
+ my $sysfs_driver = $device->{sysfs_device} && basename(readlink($device->{sysfs_device} . "/driver/module"));
+ if ($sysfs_driver) {
+ my @sysfs_drivers = $sysfs_driver;
+ @sysfs_drivers = grep { !$is_driver_listed->($_) } @sysfs_drivers;
+ push @devices, { interface => undef, drivers => \@sysfs_drivers } if @sysfs_drivers;
+ }
+
#- add original driver
push @devices, { interface => undef, drivers => [ $device->{driver} ] }
if !$is_driver_listed->($device->{driver}) && any { $_ eq $device->{driver} } modules::loaded_modules();