summaryrefslogtreecommitdiffstats
path: root/src/connections/wireless
diff options
context:
space:
mode:
authorRémy Oudompheng <remy@archlinux.org>2011-06-19 16:01:20 +0200
committerRémy Oudompheng <remy@archlinux.org>2011-06-19 18:49:26 +0200
commit399e423725903921ce348fd067d8d57e63198766 (patch)
tree977956d1534ecc18e729674b6979c5496022d122 /src/connections/wireless
parent6f93010b64bc225f063e8a6ccede482870e4b001 (diff)
downloadnetctl-399e423725903921ce348fd067d8d57e63198766.tar.gz
netctl-399e423725903921ce348fd067d8d57e63198766.tar.xz
wireless: remove deprecated options none-old/wep-old
They will be automatically replaced by 'none' and 'wep' and emit a warning message. The associated function iwconfig_up is removed. Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Diffstat (limited to 'src/connections/wireless')
-rw-r--r--src/connections/wireless61
1 files changed, 9 insertions, 52 deletions
diff --git a/src/connections/wireless b/src/connections/wireless
index d93a672..82b9913 100644
--- a/src/connections/wireless
+++ b/src/connections/wireless
@@ -4,45 +4,6 @@
. $SUBR_DIR/wireless
-iwconfig_up() {
-
- quirk prescan && iwlist "$INTERFACE" scan &> /dev/null # bcm43xx
-
- # 'none' uses iwconfig like wep. Use sane default if WEP_OPTS=""
- if [[ -z "$WEP_OPTS" ]]; then
- if [[ "$SECURITY" = "wep-old" ]]; then
- if [[ -n "$AP" ]]; then
- WEP_OPTS="ap \"$AP\" key $KEY"
- else
- WEP_OPTS="essid \"$ESSID\" key $KEY"
- fi
- elif [[ "$SECURITY" = "none-old" ]]; then
- if [[ -n "$AP" ]]; then
- WEP_OPTS="ap \"$AP\""
- else
- WEP_OPTS="essid \"$ESSID\""
- fi
- fi
- fi
-
- quirk "predown" && bring_interface down "$INTERFACE" # madwifi FS#10585
-
- report_debug wireless_up iwconfig "$INTERFACE" $WEP_OPTS
-
- if ! iwconfig "$INTERFACE" $WEP_OPTS; then
- report_fail "Could not set wireless configuration."
- return 1
- fi
-
- quirk "predown" && bring_interface up "$INTERFACE" # madwifi FS#10585
-
- report_debug ethernet_up wep_check
- if ! wep_check "$INTERFACE" "$TIMEOUT"; then
- report_fail "WEP Association Failed"
- return 1
- fi
-}
-
wireless_up() {
PROFILE="$1"
@@ -90,11 +51,12 @@ wireless_up() {
# Set to 'none' if not set
[[ -z "$SECURITY" ]] && SECURITY="none"
+ if [[ "$SECURITY" != "${SECURITY%-old}" ]]; then
+ report_warn "SECURITY=none-old, wep-old are deprecated, please use none, wep instead!"
+ SECURITY=${SECURITY%-old}
+ fi
+
case "$SECURITY" in
- *-old)
- report_debug "Using older iwconfig based path"
- iwconfig_up || return 1
- ;;
wpa-config)
[[ -z "$WPA_CONF" ]] && WPA_CONF="/etc/wpa_supplicant.conf" # defaults
;;
@@ -135,14 +97,9 @@ wireless_down() {
"$CONN_DIR/ethernet" down "$PROFILE"
- if [[ ${SECURITY:(-4)} == "-old" ]]; then
- report_debug wireless_down iwconfig "$INTERFACE" essid off key off
- iwconfig "$INTERFACE" essid off key off &> /dev/null
- else
- report_debug wireless_down stop_wpa "$INTERFACE"
- stop_wpa "$INTERFACE"
- rm -rf "${TMPDIR:-/tmp}/wpa.$INTERFACE"
- fi
+ report_debug wireless_down stop_wpa "$INTERFACE"
+ stop_wpa "$INTERFACE"
+ rm -rf "${TMPDIR:-/tmp}/wpa.$INTERFACE"
bring_interface down "$INTERFACE"
@@ -168,5 +125,5 @@ wireless_status() {
wireless_$1 "$2" "$3"
exit $?
-# vim: ft=sh ts=4 et sw=4:
+# vim: ft=sh ts=4 et sw=4 tw=0: