summaryrefslogtreecommitdiffstats
path: root/src/connections
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-07-03 12:01:41 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-07-03 12:01:41 +0200
commitb0373830cd79e35ea0d266726109c36a57122857 (patch)
treef603af0c53b492d9c47393d65c2ef66bff703aec /src/connections
parent58ea28491738bdc7f351083ee838955f475e4405 (diff)
downloadnetctl-b0373830cd79e35ea0d266726109c36a57122857.tar.gz
netctl-b0373830cd79e35ea0d266726109c36a57122857.tar.xz
Revert "Don't rely on wpa_cli reconfigure to reload wpa.conf"
This reverts commit 0d4c3ce797e688e146768bac07f6162d02634140. The reverted commit created a situation where wpa_supplicant is unnecessarily started and stopped in many cases, causing noticeable delay. If wpa_supplicant still fails to associate properly, wpa_reconfigure() should be modified in src/8021x.
Diffstat (limited to 'src/connections')
-rw-r--r--src/connections/wireless15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/connections/wireless b/src/connections/wireless
index 44a25b4..efcda80 100644
--- a/src/connections/wireless
+++ b/src/connections/wireless
@@ -54,9 +54,6 @@ wireless_up() {
fi
fi
- report_debug wireless_up stop_wpa "$INTERFACE"
- stop_wpa "$INTERFACE"
-
# Build configuration file
case "$SECURITY" in
wpa-config)
@@ -64,6 +61,12 @@ wireless_up() {
none|wep|wpa|wpa-configsection)
printf "%s\n" "network={" "$(make_wpa_config)" "}" >> "$WPA_CONF"
report_debug wireless_up "Configuration generated at $WPA_CONF"
+ report_debug wireless_up wpa_reconfigure "$INTERFACE"
+ if ! wpa_reconfigure "$INTERFACE"; then
+ report_fail "WPA configuration failed!"
+ stop_wpa "$INTERFACE"
+ return 1
+ fi
;;
*)
report_fail "Invalid SECURITY setting: $SECURITY"
@@ -76,12 +79,6 @@ wireless_up() {
report_debug wireless_up ifup
bring_interface up "$INTERFACE" || return 1
- report_debug wireless_up start_wpa "$INTERFACE" "$WPA_CONF" "$WPA_DRIVER" "$WPA_OPTS"
- if ! start_wpa "$INTERFACE" "$WPA_CONF" "$WPA_DRIVER" "$WPA_OPTS"; then
- report_fail "wpa_supplicant did not start, possible configuration error"
- return 1
- fi
-
report_debug wireless_up wpa_check
if ! wpa_check "$INTERFACE" "$TIMEOUT"; then
report_fail "WPA Authentication/Association Failed"