summaryrefslogtreecommitdiffstats
path: root/wifi
Commit message (Collapse)AuthorAgeFilesLines
* WiFiStateMachine: Preferred Network Offload leaks known SSIDsPaul Kocialkowski2014-07-171-3/+0
| | | | Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* wifi: Fix StringIndexOutOfBoundsException for incorrectly encoded SSIDsThomas Wendt2013-04-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | If the last character of a SSID is a unescaped backslash then WifiSsid convertToBytes() will throw a StringIndexOutOfBoundsException and takes the whole ROM down. The issue was reported by andreip in the HTC One X XDA thread. His SSID was set to "/ Andrew \". 04-10 21:33:54.265 E/AndroidRuntime(10479): *** FATAL EXCEPTION IN SYSTEM PROCESS: WifiStateMachine 04-10 21:33:54.265 E/AndroidRuntime(10479): java.lang.StringIndexOutOfBoundsException: length=10; index=10 04-10 21:33:54.265 E/AndroidRuntime(10479): at android.net.wifi.WifiSsid.convertToBytes(WifiSsid.java:89) 04-10 21:33:54.265 E/AndroidRuntime(10479): at android.net.wifi.WifiSsid.createFromAsciiEncoded(WifiSsid.java:54) 04-10 21:33:54.265 E/AndroidRuntime(10479): at android.net.wifi.WifiStateMachine.setScanResults(WifiStateMachine.java:1522) 04-10 21:33:54.265 E/AndroidRuntime(10479): at android.net.wifi.WifiStateMachine.access$7100(WifiStateMachine.java:103) 04-10 21:33:54.265 E/AndroidRuntime(10479): at android.net.wifi.WifiStateMachine$SupplicantStartedState.processMessage(WifiStateMachine.java:2511) 04-10 21:33:54.265 E/AndroidRuntime(10479): at com.android.internal.util.StateMachine$SmHandler.processMsg(StateMachine.java:905) 04-10 21:33:54.265 E/AndroidRuntime(10479): at com.android.internal.util.StateMachine$SmHandler.handleMessage(StateMachine.java:760) 04-10 21:33:54.265 E/AndroidRuntime(10479): at android.os.Handler.dispatchMessage(Handler.java:99) 04-10 21:33:54.265 E/AndroidRuntime(10479): at android.os.Looper.loop(Looper.java:137) 04-10 21:33:54.265 E/AndroidRuntime(10479): at android.os.HandlerThread.run(HandlerThread.java:60) Change-Id: I8273decacfffea4e4cae3bb957c925833dab09e2
* Wifi: Get the list of supported channelsBruno Randolf2013-04-136-0/+171
| | | | | | | | | | | | | Get the list of supported channels/frequencies from wpa_supplicant and provide them thru WifiManager.getSupportedChannels(); One channel is represented thru the class WifiChannel which includes channel number, frequency in MHz and a flag if IBSS mode is allowed on this channel. Like isIbssSupported() we can only expect a result after WIFI_STATE_ENABLED has been reached. Change-Id: I9fc34642b9a0047f6871b180a3a7a69d47b7e2ff
* Wifi: Add IBSS supported methodBruno Randolf2013-03-244-0/+48
| | | | | | | | | | | Add method isIbssSupported() to WifiManager and related classes to query wether the driver supports IBSS mode. The query is answered by wpa_supplicants new command "get_capability modes". It will only return a correct result after WIFI_STATE_ENABLED has been reached. Change-Id: I93aa2fdff94cd897c91ec3beb7e58940d1de7b72
* Wifi: Enable Ad-Hoc (IBSS) network configurationBruno Randolf2013-03-242-0/+59
| | | | | | | | | | This adds two public but hidden variables to WifiConfiguration: isIBSS and frequency. These are used for configuring IBSS mode. WifiConfigStore is exended to get and set these variables to wpa_supplicant (via WifiNative). Change-Id: Iab02c3d738c05c2de036350ea77b78789213e357
* Merge commit 'android-4.2.2_r1' into mr1.1-stagingRicardo Cerqueira2013-02-153-10/+29
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: core/java/android/os/Trace.java core/java/android/widget/Toast.java core/res/res/values-cs/strings.xml core/res/res/values-el/strings.xml core/res/res/values-iw/strings.xml core/res/res/values/config.xml core/res/res/values/symbols.xml media/java/android/media/AudioService.java packages/SystemUI/res/values-sv/strings.xml packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java policy/src/com/android/internal/policy/impl/keyguard/KeyguardMessageArea.java policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java services/java/com/android/server/NotificationManagerService.java services/java/com/android/server/power/ElectronBeam.java Change-Id: I60b8ddf20a1d7bcf9dc7b1a4ed841aaa4d953294
| * Re-use existing threadIrfan Sheriff2012-11-071-5/+16
| | | | | | | | | | Bug: 7377541 Change-Id: I097f2288ebfc2b4a9782cbced19d9c36d0703acb
| * Stop supplicant and dhcp before startIrfan Sheriff2012-11-062-5/+13
| | | | | | | | | | Bug: 7227463 Change-Id: Iaa0df7522edc38d25fae2bbda8d24490e997e733
* | Wi-Fi: Pass default country code to driverJorge Ruesga2013-01-232-12/+6
| | | | | | | | | | | | | | | | This patch reverts partially the change http://review.cyanogenmod.org/#/c/28918/8, and passing the default country code ("GB") to the driver instead of null. Change-Id: I7d7115155a0a52261931ffaddaf35f316d095800 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* | Wi-Fi: Ping the driver for wifi-only devicesJorge Ruesga2013-01-142-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Wifi-only devices are not capable to find APs with hidden SSID unless a DRIVER COUNTRY command will send to wifi driver. This change has: - Send DRIVER COUNTRY command to ping the driver (to correct the seek of hiddens SSIDs) - Save mCountryCode as uppercase because the wifi_countrycode_values array is in uppercase. Otherwise the preference will not be found. Patchset 7: Rebase Do not set mCountryCode if country is null Change-Id: Ie0f838aef07eaf683b713f7f0e46ff3c751523ab
* | Revert "Patch Set 1/2: Add an "Automatically Connect" option for WiFi networks"David van Tonder2013-01-144-80/+2
| | | | | | | | | | | | | | | | This commit breaks 3rd party apps like Tasker. It is being reverted until a better solution can be found. This reverts commit 19c7d4995a554bc26a17b55f481193c435d30560 Change-Id: Ie279aab8f52bd30dc21dbc70040fb3bd23721e33
* | Patch Set 1/2: Add an "Automatically Connect" option for WiFi networksian2013-01-084-2/+80
| | | | | | | | | | | | | | | | | | Allows the ability for a user to determine whether to connect to an SSID automatically. e.g. At work, there are several SSIDs with long, complex keys. I don't want to connect to them all of the time, but would like them to be remebered. The default behaviour is to allow automatic connection, as it is today. Change-Id: If6fb33d5aff91688aec73317a9e43c9e210f90fc
* | wifi: Set the mode at native layerSteve Kondik2012-12-202-0/+4
| | | | | | | | | | | | | | * Set normal/AP mode so that the HAL can specify correct module arguments when loading the driver. Change-Id: I6eee2cc53b5f1e70306e252e52c909833f220515
* | wifi: Allow Settings to retrieve country codeAndrew Dodd2012-12-173-1/+27
| | | | | | | | | | | | | | | | | | This makes getCountryCode behave like getFrequencyBand This allows Settings to get/set country code like it can for frequency band. Change-Id: Id9f00d3a678642c6c142fd1511af820d729507a7
* | Prevent scanning during DHCP processVitaly Wool2012-12-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | Wi-Fi should be in active state during the entire DHCP process, and shouldn't go to IEEE 802.11 power save mode. If the framework requests scan during the DHCP process, the Wi-Fi chip has to start scanning on channels different from the current one, and going to power save mode is a prerequisite for scan. The result directly impacts user experience: DHCP process takes longer, and even can fail. Change-Id: I8171388bb70072e4c42cb3c074dd955da84e494b
* | Wifi: Allow configuration of the P2P ifnameRicardo Cerqueira2012-11-191-1/+1
|/ | | | | | | ICS used the same wifi.interface as the regular wifi service. Let's use wifi.p2pinterface here, since they _can_ be different Change-Id: Iab68b245b33377271354c849bbe33725a26193f1
* Fix handling escaped chars in ssidIrfan Sheriff2012-10-291-0/+6
| | | | | Bug: 7427185 Change-Id: Ie669dff01af0865ea50305f3b48cf3f7af92cf6f
* Handle group tear down only at group removed eventIrfan Sheriff2012-10-241-3/+11
| | | | | | | | Handling group removal at disconnect causes issues where supplicant keeps the group and then the next invocation fails Bug: 7403755 Change-Id: Iea7e5ec98486607f8e2c4a55be3743e0545a9da7
* Merge "Fix driver stop handling" into jb-mr1-devIrfan Sheriff2012-10-231-0/+1
|\
| * Fix driver stop handlingIrfan Sheriff2012-10-231-0/+1
| | | | | | | | | | | | | | Defer supplicant state change event so we do not miss it Bug: 7394390 Change-Id: Ibae6cef6be42a6cb45dc20ba4fa5060d8e459217
* | Fix issues shown on CTS testsIrfan Sheriff2012-10-231-2/+20
|/ | | | | | | | | Reset timeout for single interface architecture Fix persistence reinvocation handling on the receive side Bug: 7379336 Change-Id: Iacca0bd6dcbeb42af63bf2078e8cf3126e4e74a7
* Fix group join CTS testIrfan Sheriff2012-10-191-1/+11
| | | | | Bug: 7379336 Change-Id: I20ead7e8c0d855be523bdfd8d9cb9eaa4b8fcac1
* Do a clean shutdown of p2pIrfan Sheriff2012-10-182-14/+117
| | | | | | | | We were doing a lazy shutdown and stopping supplicant behind p2p's back. Make sure we stop p2p, before we go ahead with shutting down. Bug: 7368832 Change-Id: I941e9cd69d6f27532207d3dc00b03c55c0e6335c
* Merge "Handle null BSSID" into jb-mr1-devIrfan Sheriff2012-10-171-6/+10
|\
| * Handle null BSSIDIrfan Sheriff2012-10-161-6/+10
| | | | | | | | | | | | | | | | | | | | The root cause of why bssid needs investigation, but for now, we can avoid crashing wifiwatchdog. When bssid is null, just treat it as a good link. Bug: 7357232 Change-Id: I080dfc990f3412646976cdc6ef75112ab093d326
* | Merge "Frequency conflict handling" into jb-mr1-devIrfan Sheriff2012-10-173-31/+194
|\ \
| * | Frequency conflict handlingIrfan Sheriff2012-10-173-31/+194
| |/ | | | | | | | | | | | | | | | | | | | | We now show a dialog to user and let him handle whether to choose wifi or p2p when there is a frequency conflict. If user chooses to disable wifi tempoarily, we disconnect wifi until p2p connection is established and removed. Bug: 6590401 Change-Id: I73871ddcb3732ae61997d8771b6aa90ad56270af
* | Fix NPEIrfan Sheriff2012-10-161-1/+3
|/ | | | | Bug: 7357742 Change-Id: I4d12d137b9d5ebf5c6739cbd4405de3f90a3d846
* Merge "Fix handling of lost device" into jb-mr1-devIrfan Sheriff2012-10-152-4/+32
|\
| * Fix handling of lost deviceIrfan Sheriff2012-10-142-4/+32
| | | | | | | | | | | | | | | | | | We did not update a lost device notice to apps properly. This causes incorrect connection initiation without a discovery which leads to failed invitation requests to supplicant. Bug: 7328758 Change-Id: If4b594c737d639d0f553188309319fba4e3ee7b7
* | Cleanup on async disconnect and finalizeIrfan Sheriff2012-10-111-0/+9
|/ | | | | Bug: 7326726 Change-Id: I6cca47a70cc0f29c68f922618cdcc181fb919a05
* Fix buildIrfan Sheriff2012-10-091-1/+4
| | | | | | had local changes from b/7318044 Change-Id: Idc6907d648a07d36f93dee859e361e9655cdd8e6
* Disable poor network avoidance by defaultIrfan Sheriff2012-10-091-9/+8
| | | | | Bug: 7318044 Change-Id: Icf27e823453eeaba901aad6f3f8eedea242794f9
* Fix handling of hidden access pointsIrfan Sheriff2012-10-091-2/+13
| | | | | | | | | | | | We now get raw hex data from the supplicant and we convert it into printable format. For hidden access point, we always used to return a single empty string. We need to make sure we maintain that behavior for apps to not start displaying empty strings. Bug: 7310749 Change-Id: I2599b9b5e15be91fc34e9af629ad893b1a0357fc
* Clear interface address and reset connectionsIrfan Sheriff2012-10-031-1/+7
| | | | | | | | | | | | With the broadcom architecture, the p2p interface on a group was dynamic that would just go away. Clearing addresses was thus not important before. It is good to clear up the addresses and reset connections when the group is removed. Bug: 7282358 Change-Id: Ia1a94fce90f86b54abcc2d1f78a33524ef8045fa
* Make rssi state change stickyIrfan Sheriff2012-09-301-1/+1
| | | | | | | | | | | | | NetworkController misses the rssi state at boot. It gets the wifi connection status because it is sticky. The rssi state will remain out of sync until the wifi state machine sends another update which may not happen if rssi does not change significantly. Make rssi sticky as well to make sure NetworkController has the last known signal strength on wifi. Bug: 6916156 Change-Id: Id7dd621c6dbc35d7354757c61aa18a3b1ba90593
* Revert setting GO idle time outIrfan Sheriff2012-09-281-1/+8
| | | | | | | | | | GO idle time out causes issues with multi-channel capable client which can take longer to connect. Use the supplicant default detection when acting as a GO. Bug: 7254008 Change-Id: I6c40081cfa83ca0ddbb764640a48c92d69e609fd
* Fail fast on persistent failureIrfan Sheriff2012-09-271-11/+19
| | | | | | | | | | Other fixes - 20s idle time out was added a work around for an earlier cavium issue. Reduce to 10s - Reload network fix when supplicant issues an error for a persistent network Bug: 7248890 Change-Id: I6cea7c88c75aaca40ddcb973404e93ec0f66cbc4
* First step towards cleaning up Global settings.Jeff Sharkey2012-09-263-41/+27
| | | | | | | Remove all @Deprecated @hide settings, and clean up any stragglers. Bug: 7232125 Change-Id: Ibf67093c728d4a28565129b923edb1701d3b2789
* Merge "Remove WifiStateTracker code tracking wifi p2p" into jb-mr1-devDave Burke2012-09-251-16/+1
|\
| * Remove WifiStateTracker code tracking wifi p2pIrfan Sheriff2012-09-251-16/+1
| | | | | | | | | | | | | | | | | | | | | | This code was never supposed to have been there. It just remained from an old implementation and actually results in CS getting the wrong network info when both wifi and p2p are connected Exposing p2p network type to CS needs to be done differently. Bug: 7233984 Change-Id: I84a6091b8236cf5bdfcef3e7f626163d629e372d
* | Merge changes I332f020f,I632648ac into jb-mr1-devJeff Brown2012-09-251-6/+6
|\ \ | | | | | | | | | | | | | | | * changes: Update references to migrated global settings. Handle user switched for settings changes.
| * | Update references to migrated global settings.Jeff Brown2012-09-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed one setting that was migrated but not marked deprecated. Removed a hidden setting that is no longer used by the new power manager service. Bug: 7231172 Change-Id: I332f020f876a18d519a1a20598a172f1c98036f7
* | | Merge "P2p fixes" into jb-mr1-devIrfan Sheriff2012-09-253-8/+61
|\ \ \ | | |/ | |/|
| * | P2p fixesIrfan Sheriff2012-09-253-8/+61
| |/ | | | | | | | | | | | | | | | | | | | | | | - Add wfdInfo details in group to allow display stack to filter - Handle provision discovery failure and reset - Do a discovery after group removal - Handle failure to reinvoke and fall back to negotiation - Avoid multiple REMOVE_GROUP calls that lead to removal of persisted network Bug: 7210856 Change-Id: Ia2e613e9b1191b919a185f0411439341e2e151bc
* | Update doc on getConfiguredNetworksIrfan Sheriff2012-09-241-1/+2
|/ | | | | BUg: 7223590 Change-Id: Id92699ae48ea75f94638fcc3bd776b863911985b
* P2p fixesIrfan Sheriff2012-09-232-23/+43
| | | | | | | | | | | - NPE fixes - Remove group on CTRL-EVENT-DISCONNECTED since the supplicant sometimes misses the group removed event - Fix the pattern match since we sometimes end up creating group without passphrase Bug: 7119140 Bug: 7210558 Change-Id: I2cf0be073aaaaa9b931ea9a79b0bf4bd6a2b32ff
* Use min group owner intent for concurrencyIrfan Sheriff2012-09-201-0/+2
| | | | | | Our device only supports STA & GC concurrency Change-Id: I4f16c959a6f4e7ad5610dcae67be830d741f162c
* Merge "send connection broadcast on client disconnect" into jb-mr1-devIrfan Sheriff2012-09-181-0/+5
|\
| * send connection broadcast on client disconnectIrfan Sheriff2012-09-181-0/+5
| | | | | | | | | | Bug: 7188646 Change-Id: I69f2c2581004b08730407930fb056cc1fe54feec