summaryrefslogtreecommitdiff
path: root/plugins/wifi.c
AgeCommit message (Collapse)AuthorFilesLines
2015-07-08Fix for wifi_scan-->"no Wifi-ap found"submit/tizen/20150708.074848pradeep kumar B1-0/+301
Change-Id: Ia624ab6e2ddc967c1581ed48a7eababa0cdb909f Signed-off-by: pradeep kumar B <b.pradeep@samsung.com
2015-07-08Fix for WPS Push Button & WPS router Pinpradeep kumar B1-0/+60
Change-Id: Ie8374a6c8d401a2178ad701e94978a6cdc1517e7 Signed-off-by: pradeep kumar B <b.pradeep@samsung.com>
2014-10-31Tethering: Add hidden access point support in technologyChengyi Zhao1-3/+10
Change-Id: I73fccf5f322ee2597f8f58d5e3d7f60ddeb0a641
2014-10-31Tethering: Add station information management featureChengyi Zhao1-0/+13
Change-Id: I2f699e42ec5ce7f148b8c1d685b52ee32e2e236b
2014-10-31Tizen: Export more wifi info in ConnMan network APIArron Wang1-1/+24
Network client requires additional wifi specific info Export the BSSID property Export the MaxRate property Export the detailed info for encryption mode(mixed,aes,tkip,wep,none) Export the connman_network get/set method for bssid, maxrate, encryption_mode property Change-Id: Ic5744978282e49cb2f70165aaadc7822dc718dfb
2014-10-29Imported Upstream version 1.26upstream/1.26Zhang zhengguang1-21/+763
2014-07-17Imported Upstream version 1.24upstream/1.24Zhang zhengguang1-278/+524
2013-05-17wifi: Scan all stored hidden networksTomasz Bursztyka1-44/+120
Previously the number of scanned hidden WiFi networks was restricted by the fast scan limit of the WiFi driver. This patch takes into account the driver fast scan limit and will scan for all configured hidden WiFi networks. Thanks to Jukka for testing this.
2013-04-15wifi: improve fix to avoid device double release on disableGrant Erickson1-35/+11
Per MEEGO-25999 <https://bugs.meego.com/show_bug.cgi?id=25999>, there exists a race between scan_callback and wifi_disable such that a care- fully-timed deassertion of the technology Powered property between throw_wifi_scan and scan_callback will lead to a device reference count underflow. A second Powered property false -> true -> false transition will then deallocate the device and Wi-Fi will no longer function until connman or the system is restarted. This patch improves upon and revises the prior patch to address this issue by recognizing that hidden networks involve a slightly different code path and timing and that both this and the prior case can be addressed by tracking the device scanning state and only releasing the device when the state is asserted.
2013-04-12wifi: avoid device double release on disableGrant Erickson1-2/+38
Per MEEGO-25999 <https://bugs.meego.com/show_bug.cgi?id=25999>, there exists a race between scan_callback and wifi_disable such that a care- fully-timed deassertion of the technology Powered property between throw_wifi_scan and scan_callback will lead to a device reference count underflow. A second Powered property false -> true -> false transition will then deallocate the device and Wi-Fi will no longer function until connman or the system is restarted. This patch addresses that race by tracking and observing the disabling state such that scan_callback ad wifi_disable can effectively negotiate which has performed the device release, thereby avoiding the double release and resulting underflow.
2013-03-27wifi: terminate autoscan stop if autoscan is not activeGrant Erickson1-0/+5
This terminates the body of stop_autoscan if autoscan is not active. Per MEEGO-25987 <http://bugs.meego.com/show_bug.cgi?id=25987>, running stop_autoscan when changing connected services can prematurely and incorrectly terminate a new, in-flight service connection and result in a failure of that connection with "net.connman.Error.OperationAborted: Operation aborted". When a scan is started, all networks are marked unavailable. Should the check added in this patch not be present, device scanning is set to false and all not yet found networks are removed. Thus the service will not be able to connect if its network wasn't already found.
2013-03-05wifi: Preliminary fix for autoscanning known hidden SSIDsTomasz Bursztyka1-16/+15
Currently, it relies on max_ssids to know how many SSIDs it can provide as paremeters. However, patch 6af0579c434058536fb40480f40f5e9895cfe863, which fixes an issue about fast scanning, affects such feature. Therefore, as a default, it will fallback to 1 if given max_ssids is 0. There is still the issue that it will autoscan only max_ssid (1 or more) known hidden SSIDs. This need to be fixed. Reported by Sameer Naik
2013-02-19config: Read only wifi configJukka Rissanen1-1/+1
2012-11-13wifi: Handle D-Bus method call failurePatrik Flykt1-0/+8
If -ECONNABORTED is received from the gsupplicant network disconnect callback, it's an indication that the interface has already been removed from wpa_supplicant side. This can happen due to a race condition between rtnl and wpa_supplicant interface removal when a USB WiFi dongle is pulled out. The pointers given to the callback can no longer be trusted, don't touch them in the callback. The have been removed by other code at this point.
2012-11-07wifi: Skip service if there is error while loading its settingsJukka Rissanen1-0/+4
If service settings cannot be loaded, then skip that service. Thanks for Felipe Tonello for reporting the issue.
2012-10-16wifi: Do not start autoscan if interface was not readyTomasz Bursztyka1-1/+4
2012-10-16gsupplicant: Add a new state according to 'interface_disabled'Tomasz Bursztyka1-0/+3
When soft rfkill is on, wpa_supplicant sets the interface disabled and sends a state named 'interface_disabled'. Taking this information into account fixes the following issue: - disable wifi (user setting) and hard rfkill it - then un-hard rfkill it, whereafter rfkill states (soft/hard) will go like this: * from 1/1 to 0/0 * from 0/0 to 1/0 when 0/0 occurs, connman will request to enable wifi The problem with this is that enabling wifi takes quite some time and in between ConnMan will soft block wifi to disable it (according to previous user setting). Thus it will request to disable wifi but since enabling is still going on, this request won't do anything. Meanwhile wpa_supplicant will also catch the soft rfkill event and wpa_supplicant will set the state to 'interface_disabled', but since it's not handled properly by ConnMan, the wifi_enable() callback will be called and the function will assume wifi got enabled.
2012-09-24wifi: Fix tethering with kernel 3.5Artem Bityutskiy1-3/+0
Wifi tethering works with kernel 3.4, but not with 3.5. Bisecting showed that the following kernel patch causes the breakage: "3edaf3e mac80211: manage AP netdev carrier state". Running connman with debugging enabled showed that in case of 3.4 we have the following sequence of RTM_NEWLINK events from the kernel: 1. IFF_UP not set, ifi_change=1 2. IFF_UP,IFF_LOWER_UP, ifi_change=1 which makes connman do the following: connmand[210]: plugins/wifi.c:wifi_newlink() index 4 flags 4098 change 1 connmand[210]: plugins/wifi.c:wifi_newlink() interface down connmand[210]: plugins/wifi.c:wifi_newlink() index 4 flags 69635 change 1 connmand[210]: plugins/wifi.c:wifi_newlink() interface up connmand[210]: plugins/wifi.c:wifi_newlink() carrier on connmand[210]: plugins/wifi.c:handle_tethering() index 4 bridge tether However, in 3.5 we have the following sequents of events from the kernel: 1. IFF_UP, ifi_change=1 2. IFF_UP,IFF_LOWER_UP, ifi_change=0 which makes connman do the following: connmand[493]: plugins/wifi.c:wifi_newlink() index 4 flags 4099 change 1 connmand[493]: plugins/wifi.c:wifi_newlink() interface up connmand[493]: plugins/wifi.c:wifi_newlink() index 4 flags 69635 change 0 The root-cause for it is that connman handles the "ifi_change" flag incorrectly. Connman interprets it as "if non-zero, there was some change", which is wrong. According to RFC 3549, it is "reserved for future use. Must be set to 0xFFFFFFFF". Thus, just remove that check, which makes tethering work.
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-83/+61
In wifi plugin this means that we combine three wifi scan functions (normal, fast, hidden) into one scan function.
2012-08-22wifi: Ignore duplicate hidden APsJukka Rissanen1-23/+46
We must not add duplicate entries to list of hidden AP. There can be more that one service file for each AP if we have multiple wifi cards in the system. Fixes BMC#24779
2012-08-22wifi: Always Scan hidden APsJukka Rissanen1-7/+0
We should scan hidden AP even if the AP is not marked as autoconnectable so that the user is able to connect to it manually.
2012-08-15wifi: Try only twice when connecting to a non-favorite serviceJulien Massot1-2/+13
2012-07-24wifi: Return -EBUSY when tetheringTomasz Bursztyka1-1/+1
Fixes BMC#25561
2012-07-13wifi: Debug print fixedJukka Rissanen1-1/+1
Convert a warn message to debug one because it is printed too often to be usefull as a warning message.
2012-07-13wifi: Scan all hidden and provisioned APJukka Rissanen1-13/+59
2012-07-05wifi: Add support for autoscan requestTomasz Bursztyka1-1/+17
2012-07-05wifi: Add capability to set regulatory domain through device's interfaceTomasz Bursztyka1-0/+31
Fixes BMC#25244
2012-07-05gsupplicant: Adapt set country callback to return a resultTomasz Bursztyka1-4/+5
This is necessary for the next coming patches, to fix country setting by interface
2012-06-28wifi: Add wifi pointer NULL checksPatrik Flykt1-3/+24
Always check what connman_device_get_data() returns and act accordingly.
2012-06-25wifi: Check we have valid wifi pointer in autoscanJukka Rissanen1-0/+3
The wifi pointer in device might be NULL if wpa_supplicant dies between autoscans.
2012-06-18wifi: Use common scan callback handlingPatrik Flykt1-2/+1
2012-06-18wifi: Do a hidden WiFi network scan also for user scansPatrik Flykt1-3/+3
Rename the callback function since it's not used only for autoscan.
2012-06-18wifi: Use scan_callback() instead of hidden_scan_callback()Patrik Flykt1-36/+26
The functionality of the callbacks are the same, thus start using scan_callback() only. As a result move code around.
2012-06-18wifi: Reset autoscan timer on a new scanPatrik Flykt1-8/+14
Setting device scanning to false will clean up all networks not seen so far. If a user scan happens to be requested while the emulated background scan is running, the background scan will be cancelled and the non-discovered networks cleared. This causes unnecessary clearing and re-discovery of WiFi networks when the user scan is completed. Create a reset autoscan function that will only reset the autoscan parameters and not set device scanning to false. Call this function when starting a scan.
2012-06-18wifi: Don't print an error when the wifi interface has been removedPatrik Flykt1-1/+1
If the wifi data structure is NULL, it was already removed due to a call to wifi_remove() and is thus not an error condition.
2012-06-18wifi: Stop scanning when disabling wifiPatrik Flykt1-6/+8
Move wifi scan stopping from wifi remove to wifi disable since only wifi disable is called when the wifi technology is disabled. Removing a wifi device will first disable it and then continue with the removal procedure.
2012-06-18service: Connecting hidden network waits until connectedJukka Rissanen1-2/+8
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-25wifi: Stop autoscan in the relevant place.Tomasz Bursztyka1-4/+4
If not stopped before checking the scanning status of the device, we might not raise a user initiated scan just because an autoscan is going one which is bogus.
2012-05-25wifi: Check device is not already scanning before a new scan.Tomasz Bursztyka1-0/+9
gsupplicant's interface scanning value is slow to be updated since it's wpa_s event which updates it, thus leading to a time gap where it is possible to request another scan. It will therefore reference once again device, which will lead to too many references hold by wifi plugin
2012-05-25wifi: If scanning, unref the device when removing wifi driver.Tomasz Bursztyka1-0/+4
2012-05-25wifi: Scanning is set to false in case of effective autoscan stop.Tomasz Bursztyka1-0/+2
2012-05-09wifi: Fix NULL ssid being passed to memcmpHenrique Dante de Almeida1-1/+1
2012-05-08wifi: Set disconnecting flag to a relevant value when disconnectedTomasz Bursztyka1-0/+1
2012-05-04wifi: Automatically scan hidden wifi servicesJukka Rissanen1-1/+114
This enables service to autoconnect to hidden wifi service. Fixes BMC#11860
2012-05-04wifi: Refactor codeJukka Rissanen1-69/+69
Move add_scan_param() to start of the file for the next patch.
2012-05-04wifi: Allow max number of scan entriesJukka Rissanen1-10/+49
Do no limit the scan entries to 4 (G_SUPPLICANT_MAX_FAST_SCAN) but use the limit given by the driver. The limit is given by wpa_s. If the supplicant does not return the limit, then use 4 as a max value.
2012-05-02wifi: Plugin internal variable was not staticJukka Rissanen1-1/+1
2012-04-29plugins: Update copyright informationMarcel Holtmann1-1/+1
2012-04-26wifi: Set connected to false before associating when disconnectedTomasz Bursztyka1-1/+1
This way it will trigger the error which will be reported to service.