summaryrefslogtreecommitdiff
path: root/src/device.c
AgeCommit message (Collapse)AuthorFilesLines
2014-10-29Imported Upstream version 1.26upstream/1.26Zhang zhengguang1-0/+6
2014-07-17Imported Upstream version 1.24upstream/1.24Zhang zhengguang1-165/+148
2013-04-26device: Add support functions needed by ethernet tetheringJukka Rissanen1-0/+43
2013-03-07device: Check positive device filter correctlyJukka Rissanen1-4/+10
The -i or --device command line option contains the device names that we should use. Unfortunately the check fails if there are multiple interfaces in that list and we ignore the interfaces instead. Fixes BMC#25979
2013-01-04core: Remove WiMAX definitions from codePatrik Flykt1-9/+0
2012-12-20core: Use glib memory functionsDaniel Wagner1-3/+3
Use for all memory allocation/dealocation operation the glib functions. This allows us to use g_mem_profile().
2012-11-23device: Include stdlib.hDaniel Wagner1-0/+1
gcc complains about missing definition for malloc.
2012-11-23device: Move device creation func into device.cJukka Rissanen1-0/+178
The device creation function should be part of device.c and not inet.c. After this change the inet.c can be used by separate vpn daemon.
2012-10-22device: Do not mark connecting networks unavailableTomasz Bursztyka1-1/+2
When autoscan fallback code is started, it sets scanning to true which in turn marks all networks unavailable except for the ones that are already connected. When connecting during an ongoing autoscan, the connection attempt stops autoscan and all unavailable networks are removed, also the one to be connected. The fix is to ignore both connected and connecting networks when marking networks unavailable.
2012-10-16device: Add a getter for powered propertyTomasz Bursztyka1-0/+5
2012-09-04Use g_slist_prepend() where appropriatePatrik Flykt1-1/+1
Convert usage of g_slist_append() to g_slist_prepend() where appropriate. gdbus, dnsproxy, resolver, rtnl, session and session unit test have ordering requirements and thus not touched.
2012-08-23device: Refactor device scan functionJukka Rissanen1-7/+5
In wifi plugin this means that we combine three wifi scan functions (normal, fast, hidden) into one scan function.
2012-08-14service: Allow plugins to lookup services by networksDaniel Wagner1-1/+1
2012-08-03device: Remove unused phyindexDaniel Wagner1-14/+0
2012-07-17device: Do not set regdom when device is not poweredTomasz Bursztyka1-0/+3
Fixes crash bug: connmand[6761]: plugins/ofono.c:get_properties_reply() /huawei_0 path /huawei_0 org.ofono.NetworkRegistration connmand[6761]: plugins/ofono.c:netreg_properties_reply() /huawei_0 connmand[6761]: plugins/ofono.c:netreg_update_regdom() /huawei_0 MobileContryCode 460 connmand[6761]: src/device.c:connman_device_ref_debug() 0x8686ac0 ref 3 by plugins/wifi.c:991:wifi_set_regdom() connmand[6761]: Aborting (signal 11) [src/connmand] connmand[6761]: ++++++++ backtrace ++++++++ connmand[6761]: #0 0xb7749400 in connmand[6761]: #1 0x806aa0b in g_supplicant_interface_set_country() at nat.c:0 connmand[6761]: #2 0x8062297 in wifi_set_regdom() at wifi.c:0 connmand[6761]: #3 0x80a607d in connman_technology_set_regdom() at ??:0 connmand[6761]: #4 0x806fefb in netreg_update_regdom() at ofono.c:0 connmand[6761]: #5 0x8071f3b in netreg_properties_reply() at ofono.c:0 connmand[6761]: #6 0x806f747 in get_properties_reply() at ofono.c:0 connmand[6761]: #7 0x4a374b62 in /usr/lib/libdbus-1.so.3 connmand[6761]: #8 0x4a3602b7 in /usr/lib/libdbus-1.so.3 connmand[6761]: #9 0x4a3639f5 in /usr/lib/libdbus-1.so.3 connmand[6761]: #10 0x8054250 in message_dispatch() at mainloop.c:0 connmand[6761]: #11 0x49f3e9d7 in /lib/libglib-2.0.so.0 connmand[6761]: #12 0x49f3de38 in /lib/libglib-2.0.so.0 connmand[6761]: #13 0x49f3e13e in /lib/libglib-2.0.so.0 connmand[6761]: #14 0x49f3e5a6 in /lib/libglib-2.0.so.0 connmand[6761]: #15 0x8053ab6 in main() at nat.c:0 connmand[6761]: #16 0x49cfc4c4 in /lib/libc.so.6 connmand[6761]: +++++++++++++++++++++++++++
2012-07-09device: Turn off all running interfaces at startupJukka Rissanen1-0/+50
Turning off running interfaces that have IP address, causes all routes related to those interfaces to be removed by kernel. This way connman will get a fresh start without any extra and obsolete routes around.
2012-07-05device: Add capability to notify on regulatory domain settingTomasz Bursztyka1-0/+13
2012-07-05device: Add driver capability to set regulatory domain on device basisTomasz Bursztyka1-0/+16
2012-06-25main: Use 'NetworkInterfaceBlacklist' string everywherePatrik Flykt1-1/+1
2012-06-25device: Consider blacklisted interfaces from main.conf when filteringManfred Kober1-1/+15
Interfaces blacklisted in main.conf are now also taken into account by connman_device_isfiltered. This is done in addition to what gets passed with -i or -I on the command line.
2012-06-18device: Don't unnecessarily set device->scanning to falsePatrik Flykt1-2/+0
The WiFi plugin will call connman_device_set_scanning() immediately after connman_device_reset_scanning().
2012-06-18device: Combine multiple if statements into one block of codePatrik Flykt1-5/+4
2012-06-18device: Combine two if statements with identical outcomePatrik Flykt1-6/+1
2012-06-18service: Connecting hidden network waits until connectedJukka Rissanen1-2/+3
If the user is connecting to hidden network, then we delay the return of the reply to caller until the real service has connected. This way the user connect to hidden and non-hidden networks works the same way from caller point of view.
2012-05-25device: Make scanning getter method public.Tomasz Bursztyka1-1/+1
2012-04-29core: Update copyright informationMarcel Holtmann1-1/+1
2012-04-23device: Removing emulated background scanningTomasz Bursztyka1-103/+0
Such "background" scanning was in use only for wifi devices. Such feature is now fully moved and better supported in connman's wifi plugin.
2012-04-23device: Remove the scheduled scan methodTomasz Bursztyka1-5/+0
wifi was the only one using it, and this is replaced by the combination of bgscan and autoscan.
2012-04-17device: use g_hash_table_replace instead of insert functionTomasz Bursztyka1-1/+1
2012-02-04device: Notify technology when a scan has started or stoppedPatrik Flykt1-0/+4
2012-02-04device: Return success if scan succeeded for at least one devicePatrik Flykt1-5/+11
Return success on requesting device scan if at least one of the devices reported success. If scanning was unsuccessful for all devices, return the error from the last one.
2012-02-04device: Return -EOPNOTSUPP if the device does not support scanningPatrik Flykt1-1/+1
2012-01-24device: Add caller information to ref/unref debug prints.Jukka Rissanen1-3/+9
2012-01-05device: Disconnect service when disabling deviceJukka Rissanen1-2/+9
We should disconnect service instead of disconnecting network when device is disabled. Otherwise service might still have a pointer to network that is no longer valid. Fixes BMC#24592
2011-12-12device: Add function for requesting a hidden scanPatrik Flykt1-0/+17
Add function for requesting a hidden (WLAN) network scan. Call the hidden scan function is implemented by the device in question.
2011-11-10core: Use gcc atomics instead glib's onesDaniel Wagner1-3/+3
g_atomic_int_exchange_and_add() has been removed from glib 2.30 and g_atomic_int_add() should be used. Though there are still quite a few distros out which do not ship a glib version with g_atomic_int_add(). Instead of maintaing a compatiblilty glib layer we just use the built-in functions for atomic memory access.
2011-10-31device: Cancel pending trigger when device is removedDaniel Wagner1-5/+10
connmand[28326]: src/device.c:device_destruct() device 0x6b97c0 name candlejack.bmw-carit.intra-1 connmand[28326]: plugins/bluetooth.c:powered_reply() connmand[28326]: Name "org.bluez" does not exist connmand[28326]: src/device.c:device_pending_reset() device 0x6b97c0
2011-10-06device: Disconnect a connected network before disabling the deviceAlok Barsode1-0/+3
When disabling a device, disconnect the device's connected network, if there are any. Fixes BCM#23165.
2011-10-06device: Remove connections counterDanny Jeongseok Seo1-23/+4
The device connection counter is only used by the post scan auto connection logic, and the connection status is handled by the autoconnection service routine itself (__connman_service_auto_connect()).
2011-10-06device: Remove redundant connection numbers checkDanny Jeongseok Seo1-3/+0
__connman_service_auto_connect() already checks for service state, so there is no need to look at the device being connected or not.
2011-09-13wifi: Add support to multi scan typeMohamed Abbas1-1/+3
Allow multi scan type for fast connect. Scanning request removed from interface_added() because it is already called in connman_device_set_powered() so no need to call it again immediately (fix by Jukka Rissanen <jukka.rissanen@linux.intel.com>)
2011-09-12device: Remove device_probe and device_removeSamuel Ortiz1-23/+13
They're tiny and useless wrappers.
2011-09-12device: Set PENDING_DISABLE on device disablePatrik Flykt1-0/+1
Set powered pending state to PENDING_DISABLE when the device is being disabled.
2011-09-12device: Simplify device_pending_reset()Patrik Flykt1-5/+2
The g_source for device_pending_reset() is going to be removed when the callback function returns FALSE. Thus simplify the code with a few lines.
2011-08-25device: Remove power pending timeout iff there is a pending requestSamuel Ortiz1-3/+6
In the ethernet case, there won't be any.
2011-08-25device: Remove device persistent codeAlok Barsode1-98/+1
Connman now stores technology states persistently. Hence there is no reason to store device states persistently.
2011-08-25device: Remove caching of offlinemode in device structureAlok Barsode1-6/+0
2011-08-25technology: Remove blocked variables and associated functionsAlok Barsode1-63/+3
2011-08-25technology: Redo offlinemode logicAlok Barsode1-43/+0
Traverse the list of technologies and enable/disable each instead of traversing the device list.
2011-08-25device: Redo pending power request logicAlok Barsode1-57/+92
Use 3 values(None/Enable/Disable) for the power_pending. It helps keep track of the ongoing pending request. Add a pending timeout. If the daemon handling the device fails to send a response then we need to reset the power_pending flag.