summaryrefslogtreecommitdiffstats
path: root/src/connections/wireless
AgeCommit message (Collapse)AuthorFilesLines
2011-06-19Remove last usage of wireless_tools.Rémy Oudompheng1-10/+8
Interface is brought up after starting wpa_supplicant for this to work. Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
2011-06-19Replace iwgetid usage by wpa_cli.Rémy Oudompheng1-1/+1
2011-06-19Rename wireless module to 'rfkill', remove wep_checkRémy Oudompheng1-2/+1
2011-06-19Switch to wpa_supplicant for scanningRémy Oudompheng1-26/+37
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
2011-06-19Store wpa_supplicant configuration in /run/network instead of /tmpRémy Oudompheng1-1/+1
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
2011-06-19wireless: remove deprecated options none-old/wep-oldRémy Oudompheng1-52/+9
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>
2011-01-20Change default wpa driver to nl80211,wext - requires wpa_supplicant 0.7Thomas Bächler1-1/+1
2010-02-21Fix FS#18391, FS#18385, broken rfkill, handle hard more appropriatelyJames Rayner1-20/+2
2009-12-03connections/wireless: is_interface needed quotes, and wasn't exiting on failureJim Pryor1-1/+1
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-12-03connections/wireless: add some quotesJim Pryor1-5/+5
Sometimes just for coding style (inside [[ ]]), othertimes a necessary precaution. Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-09-27Remove wpa generation duplication, fix wep/none-oldJames Rayner1-36/+19
2009-09-27Only flush when disabling wireless interface, tidy up down/forcedownJames Rayner1-5/+3
2009-09-25Large rework of wireless to use wpa_supplicantJames Rayner1-93/+78
* Connect SECURITY=wep|none with wpa_supplicant * Separate out iwconfig based configuration as -old as a fallback for older hardware * Drop some old quirks, as they're mostly needed for iwconfig based or are needed by deprecated drivers * Drop wpa_passphrase and just generate a config.
2009-09-23Add WPA_DRIVER, WPA_COUNTRY and handle WEP string keysJames Rayner1-6/+10
WPA_DRVER: Configure the -D argument to wpa_supplicant, for example -Dnl80211 WPA_COUNTRY: Set the 'country=' variable in the wpa_supplicant configuration. WEP string keys: modified such that they may work. Not tested yet.
2009-09-22Fix silly codeJames Rayner1-18/+13
2009-09-22Rework wireless to use wpa_supplicant more, add CONFIGSECTION supportJames Rayner1-57/+47
CONFIGSECTION will be useful later on for integration with autowifi. It'll allow WPA configurations to be stored _in_ the profile, rather than separately. Experimentally, WEP/none support has been migrated to wpa_supplicant. Support for string keys has not yet been merged.
2009-09-22Merge connections ethernet/ethernet-iprouteJames Rayner1-10/+6
2009-09-14Rename set_interface to bring_interfaceJim Pryor1-4/+4
3. Change the name of "set_interface up/down..." to "bring_interface up/down" to differentiate it from the similarly-named, merely record-keeping functions. Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-09-14revert regexp ESSID patchesJim Pryor1-3/+1
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-09-14Returns and exitsJim Pryor1-2/+4
* add some abortive returns * some exit tweaks Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-09-14tabs->spaces, vim modelinesJim Pryor1-1/+1
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-09-14Tweaks while mergingJim Pryor1-10/+10
* added various quotes * made some vars local * tweaked some [[ ]]s, including one broken one in netcfg-menu * s/ra0/$INTERFACE/ in ethernet-iproute and wireless Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-09-07Rework rfkill into re-usable functionsJames Rayner1-65/+8
2009-09-07Added initial rfkill supportJames Rayner1-30/+74
Added some extra debug points Directed debug out to stderr, as debug messages were being used as output from find_essid.
2009-09-07Comments, more harmless bitsJim Pryor1-3/+14
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-09-07Lots of little tweaks that should never hurt. Some of them may help inJames Rayner1-8/+10
corner cases; others probably make no difference. Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-09-07respect TMPDIRJim Pryor1-1/+1
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-08-15quotes!Jim Pryor1-23/+23
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-08-15Isolate ip to ethernet-iproute, ifconfig to ethernet + wirelessJim Pryor1-5/+4
* 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>
2009-08-15start consolidation of ifconfig/ip/set_interfaceJim Pryor1-4/+13
* try to factor all the ifconfig/ip set dev code to single location (currently networks/set_interface, though I recommend a different name for this function because it's too close in name and different in functionality from set_iface, set_profile). * added "forcedown" option to set_interface, meaning "just go down don't worry about 'nodown' quirks" * even with "forcedown", this factoring would introduce "ip addr flush dev $INTERFACE" calls to existing code. I assume that's harmless? or even beneficial? * one code block (in ethernet_iproute) had stdout,stderr of the down calls redirected to /dev/null. I've moved that to set_interface, so now everyone's getting that behavior. I assume that's appropriate... * now no more calls to "ip" or "ifconfig" outside of set_interface, except the checks for NO-CARRIER after ethernet*/set_interface up. They might also be moved to network/set_interface? * as of this commit, all the set_interface calls are now using ip instead of ifconfig. A subsequent commit will isolate the ip-use to ethernet-iproute and the ifconfig-use to ethernet. * ALERT: attend to wireless_down, it seems to be calling set_interface down twice (once in ethernet_down, once in itself). And neither this commit nor the code it's patching respects quirk nodown in the ethernet_down block. Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-08-15Add AP argument to profile, also let ESSID arguments be regexpsJim Pryor1-9/+39
* AP= arguments in profiles take precedence over ESSID= arguments * ESSID= arguments regexps instead of literals. To avoid screwing up any currently working profiles, I restricted the interpretation as a regexp to just the new wireless-dbus connection types. * But a global change involved in implementing this is that the connection up/down calls will be passed a literal ESSID (which of the local networks matches the regexp) as an additional argument. Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-08-15grep tweaksJim Pryor1-2/+2
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-08-15More secure temp WPA_CONFIG fileJim Pryor1-15/+13
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-08-15Don't overwrite existing $WEP_OPTSJim Pryor1-5/+7
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-08-15Sanitize quotes for wpa_startJim Pryor1-0/+5
Arguments to wpa_start shouldn't be expanded until wpa_start receives them: so should be quoted by all calling functions. I added quotes throughout. In general, it seems wise to quote except when it's absolutely certain not to be needed---or you specifically _do_ want to expand arguments. In this case, it's extra important. Because this might be missed in later code, I also wrangled wpa_start so that it doesn't rely on WPA_OPTS being all in $3. One of these fixes would have sufficed, but what the hell I did both. Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-08-15wpa_cli, start/stop_wpa, wpa_check tweaksJim Pryor1-9/+9
* Supply -i switch to wpa_cli * Have wpa_check call stop_wpa on failure, instead of duplicating (only some of) the termination code. * Need brief sleep in termination code. * Note that functions which call wpa_check don't need to call stop_wpa themselves, when wpa_check fails. * Functions which call wpa_check and start_wpa are however responsible for all error reporting on failure. * Add some debugging calls to announce calls to wpa_start/wpa_check Signed-off-by: Jim Pryor <profjim@jimpryor.net>
2009-08-10Add interface setting, a debug mode and interface setting hooksJames Rayner1-1/+1
2009-08-10merge improved find_ap/find_essidJames Rayner1-3/+3
2009-08-10merge logging code from Jim PryorJames Rayner1-16/+41
2009-08-10Add wireless+iproute support, extend wait for some slower cardsJames Rayner1-4/+8
2009-08-10Added basic rfkill support; prototype connection query supportJames Rayner1-1/+44
2009-06-27Workaround for FS#15072James Rayner1-1/+1
2009-05-18fixed typo by Robson Roberto Souza PeixotoAndrea Scarpino1-1/+1
2009-05-18wireless: check if iface is real, stop wpa_supplicant on failuresJames Rayner1-8/+20
2009-05-07remove infinite loop causing wireless to failJames Rayner1-5/+0
2009-04-29set SECURITY to none if not setAndrea Scarpino1-0/+3
2009-04-28Add WEP support to wireless-dbus, remove broken interface type check in wirelessJames Rayner1-5/+0
2009-02-26Update and re-arrange examples, update wireless quirk options, stopJames Rayner1-41/+34
using deprecated sys interface
2009-02-17fix netcfg-auto-wireless and a temporary workaround for FS#13299James Rayner1-4/+4
2009-02-16FS#11748 -netcfg takes interface down too earlyJames Rayner1-0/+1