summaryrefslogtreecommitdiffstats
path: root/lib/network/connection/wireless.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/network/connection/wireless.pm')
-rw-r--r--lib/network/connection/wireless.pm38
1 files changed, 22 insertions, 16 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm
index 6267398..9b58970 100644
--- a/lib/network/connection/wireless.pm
+++ b/lib/network/connection/wireless.pm
@@ -77,9 +77,9 @@ my %eap_vars = (
eapol_flags => 0,
proactive_key_caching => 0,
peerkey => 0,
- ca_path => 0,
- private_key => 0,
- private_key_passwd => 0,
+ ca_path => 2,
+ private_key => 2,
+ private_key_passwd => 2,
dh_file => 0,
altsubject_match => 0,
phase1 => 0,
@@ -137,7 +137,18 @@ my @thirdparty_settings = (
},
sleep => 1,
};
- } ([ 3945, '-2' ], [ 4965, '-2' ], [ 'wifi', '-5', 5000, 'agn' ])),
+ } ([ 3945, '-2' ], [ 4965, '-2' ])),
+
+ {
+ name => "iwlwifi",
+ description => "Intel(R) PRO/Wireless AGN",
+ url => "http://intellinuxwireless.org/",
+ firmware => {
+ package => "iwlwifi-firmware",
+ test_file => "iwlwifi-5000-5.ucode",
+ },
+ sleep => 1,
+ },
{
name => 'p54pci',
@@ -514,6 +525,7 @@ only used for EAP certificate based authentication. It could be
considered as the alternative to username/password combo.
Note: other related settings are shown on the Advanced page.") },
{ label => N("EAP client private key password"), val => \$self->{access}{network}{eap_private_key_passwd},
+ hidden => sub { $self->{hide_passwords} },
disabled => sub { $self->{access}{network}{encryption} ne 'wpa-eap' },
help => N("The complete password for the client private key. This is
only used for EAP certificate based authentication. This password
@@ -687,7 +699,7 @@ sub build_ifcfg_settings {
my $settings = {
WIRELESS_MODE => $self->{access}{network}{mode},
if_($self->need_wpa_supplicant,
- WIRELESS_WPA_DRIVER => wpa_supplicant_get_driver($self->get_driver),
+ WIRELESS_WPA_DRIVER => 'nl80211,wext',
WIRELESS_WPA_REASSOCIATE => bool2yesno($self->need_wpa_supplicant_reassociate),
MII_NOT_SUPPORTED => 'no',
),
@@ -696,6 +708,9 @@ sub build_ifcfg_settings {
WIRELESS_ENC_KEY => convert_wep_key_for_iwconfig($self->{access}{network}{key}, $self->{access}{network}{force_ascii_key})),
if_(member($self->{access}{network}{encryption}, qw(open restricted)),
WIRELESS_ENC_MODE => $self->{access}{network}{encryption}),
+ if_($self->{access}{network}{encryption} eq 'wpa-psk',
+ KEY_MGMT => 'WPA-PSK',
+ WPA_PSK => $self->{access}{network}{key}),
if_($self->need_rt2x00_iwpriv,
#- use iwpriv for WPA with rt2400/rt2500 drivers, they don't plan to support wpa_supplicant
WIRELESS_IWPRIV => qq(set AuthMode=WPAPSK
@@ -905,15 +920,6 @@ sub wlan_ng_configure {
services::restart($module eq 'prism2_cs' ? 'pcmcia' : 'wlan');
}
-sub wpa_supplicant_get_driver {
- my ($module) = @_;
- $module =~ /^hostap_/ ? "hostap" :
- $module eq "prism54" ? "prism54" :
- $module =~ /^ath_/ ? "madwifi" :
- $module =~ /^at76c50|atmel_/ ? "atmel" :
- "wext";
-}
-
sub wpa_supplicant_add_network {
my ($ui_input) = @_;
my $conf = wpa_supplicant_read_conf();
@@ -977,7 +983,7 @@ sub wpa_supplicant_read_conf() {
push @conf, $network;
undef $network;
}
- } elsif (/^\s*network={/) {
+ } elsif (/^\s*network=\{/) {
#- beginning of a new network block
$network = {};
}
@@ -1027,7 +1033,7 @@ sub wpa_supplicant_write_conf {
push @{$network->{entries}}, { comment => $_ };
}
} else {
- if (/^\s*network={/) {
+ if (/^\s*network=\{/) {
#- beginning of a new network block
$network = {};
} else {