summaryrefslogtreecommitdiffstats
path: root/src/connections/wireless
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-08-11 14:05:14 +0200
committerJames Rayner <james@archlinux.org>2009-08-15 04:28:30 +0200
commit6c5e4f9ab4f75adfdd1949f929bf6a2308ecd03b (patch)
treeed0f89b7de81f8f05e306123a35f9f255a12ab31 /src/connections/wireless
parente27d094577f874613c49cc3d93796162230ca2c8 (diff)
downloadnetctl-6c5e4f9ab4f75adfdd1949f929bf6a2308ecd03b.tar.gz
netctl-6c5e4f9ab4f75adfdd1949f929bf6a2308ecd03b.tar.xz
Isolate ip to ethernet-iproute, ifconfig to ethernet + wireless
* The point of having both ethernet and ethernet-iproute was presumably to transition slowly from ifconfig/net-tools to iproute2. But the current codebase mixes the two in handling ethernet and wireless connections. This commit separates all the ip calls to the newer connections, and the ifconfig calls to the older connections. The latter now call set_interface with up-old, down-old, forcedown-old. * I'm not urging that ifconfig code sticks around. Just trying to make the code consistent with what seems to me to be its implicit design principles. * the check for NO-CARRIER in ethernet is now also done without calling iproute2 tools. I saw this technique recommended somewhere but have no citation. I don't know how many kernel revisions one can rely on any given part of /sys to remain stable for. It may be possible to achieve the same goal here in other ways. If in fact it's worth the effort to keep the ifconfig code around. * Began also to integrate the IPROUTE variable introduced in ethernet, but stopped. If that's integrated everywhere, shouldn't it make connection=ethernet equivalent to connection=ethernet-iproute? Is there justification for using it at some places but not everywhere? I just let it alone for now. Signed-off-by: Jim Pryor <profjim@jimpryor.net>
Diffstat (limited to 'src/connections/wireless')
-rw-r--r--src/connections/wireless9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/connections/wireless b/src/connections/wireless
index fffd048..c50acfa 100644
--- a/src/connections/wireless
+++ b/src/connections/wireless
@@ -52,8 +52,7 @@ wireless_up() {
fi
report_debug wireless_up ifup
- set_interface up "$INTERFACE" || return 1
- ## wireless_control "$INTERFACE" up || return 1
+ set_interface up-old "$INTERFACE" || return 1
quirk prescan && iwlist "$INTERFACE" scan &> /dev/null # bcm43xx
if quirk preessid; then # ipw3945
@@ -110,7 +109,7 @@ wireless_up() {
if quirk "predown"; then # madwifi FS#10585
# ignore quirk nodown---is that appropriate?
# this adds a flush call as well---is that appropriate?
- set_interface forcedown "$INTERFACE"
+ set_interface forcedown-old "$INTERFACE"
fi
report_debug wireless_up iwconfig "$INTERFACE" $WEP_OPTS
@@ -120,7 +119,7 @@ wireless_up() {
fi
if quirk "predown"; then # madwifi FS#10585
- set_interface up "$INTERFACE"
+ set_interface up-old "$INTERFACE"
fi
report_debug ethernet_up wep_check
@@ -211,7 +210,7 @@ wireless_down() {
# respects quirk nodown---is that appropriate?
# wasn't this already called in ethernet_down? but does the call there respect quirk nodown?
# this adds a flush call as well---is that appropriate?
- set_interface down "$INTERFACE"
+ set_interface down-old "$INTERFACE"
# If rfkill is specified, disable device.
if [[ -n "$RFKILL_NAME" ]]; then