summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-09-08 13:09:43 +0000
committerOlivier Blin <oblin@mandriva.org>2005-09-08 13:09:43 +0000
commit178bbf81d78e1c9c223a9ade71dd79d21deaabf7 (patch)
tree1086f02c1a36ee4959a267a7706652c04c09431d /perl-install/network
parent991b117fa96757b706c5a4c7fc6db42b8dc55636 (diff)
downloaddrakx-178bbf81d78e1c9c223a9ade71dd79d21deaabf7.tar
drakx-178bbf81d78e1c9c223a9ade71dd79d21deaabf7.tar.gz
drakx-178bbf81d78e1c9c223a9ade71dd79d21deaabf7.tar.bz2
drakx-178bbf81d78e1c9c223a9ade71dd79d21deaabf7.tar.xz
drakx-178bbf81d78e1c9c223a9ade71dd79d21deaabf7.zip
disable roaming for rt2400/rt2500
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/netconnect.pm5
-rw-r--r--perl-install/network/wireless.pm10
2 files changed, 13 insertions, 2 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 172a527bc..12d8f17f3 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -987,7 +987,7 @@ notation (for example, 1.2.3.4).")),
pre => sub {
require network::wireless;
$find_lan_module->();
- $need_rt2x00_iwpriv = member($module, qw(rt2400 rt2500));
+ $need_rt2x00_iwpriv = network::wireless::is_old_rt2x00($module);
$wireless_roaming = delete $ethntf->{WIRELESS_MODE} eq 'Roaming' && !$need_rt2x00_iwpriv;
$ethntf->{WIRELESS_MODE} ||= "Managed";
$ethntf->{WIRELESS_ESSID} ||= "any";
@@ -1014,7 +1014,8 @@ notation (for example, 1.2.3.4).")),
sort => 1,
format => sub { translate($network::wireless::wireless_enc_modes{$_[0]}) } },
{ label => N("Encryption key"), val => \$wireless_enc_key, disabled => sub { $wireless_enc_mode eq 'none' } },
- { text => N("Allow access point roaming"), val => \$wireless_roaming, type => "bool" },
+ { text => N("Allow access point roaming"), val => \$wireless_roaming, type => "bool",
+ disabled => sub { network::wireless::is_wpa_supplicant_blacklisted($module) } },
{ label => N("Network ID"), val => \$ethntf->{WIRELESS_NWID}, advanced => 1 },
{ label => N("Operating frequency"), val => \$ethntf->{WIRELESS_FREQ}, advanced => 1 },
{ label => N("Sensitivity threshold"), val => \$ethntf->{WIRELESS_SENS}, advanced => 1 },
diff --git a/perl-install/network/wireless.pm b/perl-install/network/wireless.pm
index df96db3fc..d86482844 100644
--- a/perl-install/network/wireless.pm
+++ b/perl-install/network/wireless.pm
@@ -12,6 +12,16 @@ our %wireless_enc_modes = (
my $wpa_supplicant_conf = "/etc/wpa_supplicant.conf";
+sub is_old_rt2x00 {
+ my ($module) = @_;
+ member($module, qw(rt2400 rt2500));
+}
+
+sub is_wpa_supplicant_blacklisted {
+ my ($module) = @_;
+ is_old_rt2x00($module);
+}
+
sub convert_wep_key_for_iwconfig {
#- 5 or 13 characters, consider the key as ASCII and prepend "s:"
#- else consider the key as hexadecimal, do not strip dashes