From decaf8ae76a79d1828a36d08c1bf44d915969e63 Mon Sep 17 00:00:00 2001 From: Rémy Oudompheng Date: Sun, 19 Jun 2011 19:18:25 +0200 Subject: Remove last usage of wireless_tools. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Interface is brought up after starting wpa_supplicant for this to work. Signed-off-by: Rémy Oudompheng --- src/connections/wireless | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src') 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" -- cgit v1.2.3-24-g4f1b