diff options
-rw-r--r-- | perl-install/network/netconnect.pm | 5 | ||||
-rw-r--r-- | perl-install/network/wireless.pm | 10 |
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 |