summaryrefslogtreecommitdiffstats
path: root/src/connections/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'src/connections/wireless')
-rw-r--r--src/connections/wireless22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/connections/wireless b/src/connections/wireless
index 5c9091a..a95496a 100644
--- a/src/connections/wireless
+++ b/src/connections/wireless
@@ -4,24 +4,6 @@
. $SUBR_DIR/wireless
-
-enable_rf() {
- # Enable rfkill if necessary, or fail if it is hardware
- if [[ -n "$RFKILL" ]]; then
- local state=$(get_rf_state "$INTERFACE") || return 1
- if [[ "$state" != "up" ]]; then
- if [[ "$RFKILL" == "soft" ]]; then
- set_rf_state "$INTERFACE" up
- sleep 1
- else
- report_fail "radio is disabled on $INTERFACE"
- return 1
- fi
- fi
- fi
-}
-
-
iwconfig_up() {
quirk prescan && iwlist "$INTERFACE" scan &> /dev/null # bcm43xx
@@ -66,7 +48,7 @@ wireless_up() {
PROFILE="$1"
load_profile "$PROFILE"
- enable_rf || return 1
+ enable_rf $INTERFACE $RFKILL $RFKILL_NAME || return 1
# Check if interface exists
is_interface "$INTERFACE" || { report_fail "interface $INTERFACE does not exist"; return 1; }
@@ -168,7 +150,7 @@ wireless_down() {
# Any reason why a hardware switch should be considered on interface down?
if [[ "$RFKILL" == "soft" ]]; then
. "$SUBR_DIR/wireless"
- set_rf_state "$INTERFACE" down || return 1
+ set_rf_state "$INTERFACE" disabled $RFKILL_NAME || return 1
fi
}