summaryrefslogtreecommitdiffstats
path: root/src/connections/wireless
diff options
context:
space:
mode:
authorRémy Oudompheng <remy@archlinux.org>2011-06-19 19:18:25 +0200
committerRémy Oudompheng <remy@archlinux.org>2011-06-19 19:18:51 +0200
commitdecaf8ae76a79d1828a36d08c1bf44d915969e63 (patch)
tree45ba3227bdd9b50a9ba93866009ea09f4959f171 /src/connections/wireless
parenta2e81ec74e0247a307cbdc36b6b2697650ca10c7 (diff)
downloadnetctl-decaf8ae76a79d1828a36d08c1bf44d915969e63.tar.gz
netctl-decaf8ae76a79d1828a36d08c1bf44d915969e63.tar.xz
Remove last usage of wireless_tools.
Interface is brought up after starting wpa_supplicant for this to work. Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Diffstat (limited to 'src/connections/wireless')
-rw-r--r--src/connections/wireless18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/connections/wireless b/src/connections/wireless
index ccc877c..7bb35ea 100644
--- a/src/connections/wireless
+++ b/src/connections/wireless
@@ -25,15 +25,6 @@ wireless_up() {
report_debug wireless_up stop_wpa "$INTERFACE"
stop_wpa "$INTERFACE"
- # Most drivers (mac80211) need mode set before device is brought up
- if [[ $(iwgetid -sm "$INTERFACE") -ne Managed ]]; then
- report_debug wireless_up iwconfig "$INTERFACE" mode managed
- iwconfig "$INTERFACE" mode managed
- fi
-
- report_debug wireless_up ifup
- bring_interface up "$INTERFACE" || return 1
-
# Start wpa_supplicant
if [ "$SECURITY" = "wpa-config" ]; then
WPA_CONF="${WPA_CONF:-/etc/wpa_supplicant.conf}"
@@ -63,8 +54,9 @@ wireless_up() {
fi
fi
- # Manually set iwconfig options
+ # Manually set iwconfig options (DEPRECATED)
if [[ -n "$IWCONFIG" ]]; then
+ report_warn "The use of IWCONFIG option is deprecated."
report_debug wireless_up iwconfig "$INTERFACE" $IWCONFIG
iwconfig "$INTERFACE" $IWCONFIG
fi
@@ -88,6 +80,12 @@ wireless_up() {
;;
esac
+ # Bring interface up after starting wpa_supplicant
+ # This is important since cards such as iwl3945 do not support
+ # mode switching when they are already up.
+ report_debug wireless_up ifup
+ bring_interface up "$INTERFACE" || return 1
+
report_debug wireless_up wpa_check
if ! wpa_check "$INTERFACE" "$TIMEOUT"; then
report_fail "WPA Authentication/Association Failed"