summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/network/ndiswrapper.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/network/ndiswrapper.pm b/lib/network/ndiswrapper.pm
index 27df51c..4a9e326 100644
--- a/lib/network/ndiswrapper.pm
+++ b/lib/network/ndiswrapper.pm
@@ -78,15 +78,6 @@ sub find_interface {
sub setup_device {
my ($in, $device) = @_;
- #- unload ndiswrapper first so that the newly installed .inf files will be read
- eval { modules::unload("ndiswrapper") };
- eval { modules::load("ndiswrapper") };
-
- if ($@) {
- $in->ask_warn(N("Error"), N("Unable to load the ndiswrapper module!"));
- return;
- }
-
my @conflicts = find_conflicting_devices($device);
if (@conflicts) {
$in->ask_yesorno(N("Warning"), N("The selected device has already been configured with the %s driver.
@@ -97,6 +88,15 @@ Do you really want to use a ndiswrapper driver?", $conflicts[0][1])) or return;
eval { modules::load("ndiswrapper") };
}
+ #- unload ndiswrapper first so that the newly installed .inf files will be read
+ eval { modules::unload("ndiswrapper") };
+ eval { modules::load("ndiswrapper") };
+
+ if ($@) {
+ $in->ask_warn(N("Error"), N("Unable to load the ndiswrapper module!"));
+ return;
+ }
+
my $interface = find_interface($device);
unless ($interface) {
$in->ask_warn(N("Error"), N("Unable to find the ndiswrapper interface!"));