502 Commits

Author SHA1 Message Date
Irfan Sheriff
d4fecc2567 Merge "Pre-association service discovery support" 2012-04-12 18:33:05 -07:00
Irfan Sheriff
21ba815332 Pre-association service discovery support
Add UPnp, Bonjour and vendor specific support for discovering services on
Wi-Fi direct before establishing a connection.

Change-Id: I1c1f3427180abdc80a4e682e713adc7f0326c5ef
Signed-off-by: Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
2012-04-12 17:50:29 -07:00
Irfan Sheriff
7405b90df4 Merge "P2p fixes" 2012-04-09 14:29:01 -07:00
Irfan Sheriff
55bfa42b05 P2p fixes
Add powersave on client after connect
Set concurrency priority to STA
Fix connection cancellation

Change-Id: I76fd9d1085c611a8c4068047b64289ef539ab389
2012-04-06 15:40:17 -07:00
Irfan Sheriff
227dde2be4 Merge "Fix key handling" 2012-04-04 12:29:26 -07:00
Yoshihiko Ikenaga
b5e00bda40 Fix key handling
putListener() returns 0 when the argument is null. And The key value of listener
registered first is always 0. For this reason, if the p2p functions are called continuously
and first call is without listener and the second call is with listener, then the message
against first call wrongly pick up the second call's listener because the key value is
the same. In order to avoid this issue, we don't use 0 as the valid listener key.

Change-Id: I0cc960b2ad37f17cf7f528d839b39aa272b83670
Signed-off-by: Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
2012-04-04 11:55:06 -07:00
Kenny Root
4e62fd3f95 Wifi: change empty "engine" config to integer
"engine" is specified as an integer in wpa_supplicant, so we have to
make sure we send an integer instead of a NULL when we want to disable
it.

Bug: 6250670
Change-Id: I693ccb49badbd400a5882e9df1bbd4febc847a6e
2012-03-29 17:25:24 -07:00
Irfan Sheriff
8901de0af6 Merge "Add discovery broadcasts for p2p" 2012-03-29 08:41:15 -07:00
Irfan Sheriff
c111d1caa8 Add discovery broadcasts for p2p
This will allow apps to figure out if discovery is active or not
and based on that initiate a new discovery for fresh connections

Change-Id: I4778f135fdd88773e4f0d50c384f9b6ebf561e6d
2012-03-28 17:37:04 -07:00
Irfan Sheriff
5fa47298af Merge "p2p fixes" 2012-03-28 16:57:46 -07:00
Irfan Sheriff
8a34718d84 Merge "Control suspend optimizations from framework" 2012-03-28 14:12:11 -07:00
Kenny Root
4898087be9 Merge changes Ibdf23227,I3681f98c
* changes:
  Update Wifi to use new keystore function
  Add signing to keystore
2012-03-27 20:42:15 -07:00
Yoshihiko Ikenaga
61472a8314 p2p fixes
Fix space handling in device name and ssid (This builds from contribution of
Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>)

Also clean up STA event handling and remove the unused interface address

Change-Id: Ic16a4aadf905c1da5c060faa8a3caa83adc0549f
2012-03-27 16:45:02 -07:00
Irfan Sheriff
262f766ac8 Control suspend optimizations from framework
The suspend optimizations handling in the driver is being removed.
The framework will hence forth control when these optimizations occur -
we do this at screen off and hold a short wakelock to ensure this.

We also remove the use of the now defunct setsuspendopt command and
handle the high perf locking with the new suspend mode command.

Change-Id: Ia12e38befb2c4f85cad6612bc8f807805bd0dae1
2012-03-26 23:48:53 -07:00
Mike Lockwood
1b6989cdc2 Merge commit '74803dc'
Change-Id: I35a76a27390c75a47e6387fb0ee853a5a689a56f
2012-03-22 15:09:52 -07:00
Mike Lockwood
09a12bcfab WifiStateMachine: Move wifi teardown delay to a framework resource
Bug: 5931171

Change-Id: I96a4e3bf1d044ea4a4d2955775703b6f0ce862ed
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-03-22 15:09:05 -07:00
Kenny Root
565f9f216a Update Wifi to use new keystore function
The old wpa_supplicant.conf format used a special URI prefix
"keystore://" for the private_key value to indicate when to load things
from keystore.

The new format uses an OpenSSL ENGINE to perform operations with the
private key, so we don't need the special URI prefix. This changes
enables that usage and also supports migrating the old style
configuration to the new style.

Change-Id: Ibdf2322743eaa129bd2aa5e874f197b573714b57
2012-03-21 14:34:36 -07:00
Irfan Sheriff
90d57dfac3 Improve network avoidance
Adds a back-off based technique where the amount of time we wait before
avoiding wi-fi is increased.

This will reduce power consumption on devices that are experiencing high
variance on wi-fi

Change-Id: I40da03edfb5373ddb51056818ca0744dc26a5600
2012-03-12 16:12:55 -07:00
Irfan Sheriff
4c8982ad82 Enhancements for avoiding poor connection on wifi
- Avoid flapping
- Increase thresholds and monitor rssi more closely to detect consistently weak signal

Change-Id: I6139a20b7306839b345146a72ce690020a2e00b8
2012-03-08 16:28:35 -08:00
Irfan Sheriff
db9e6937f1 Merge "Enhance WPS" 2012-03-02 16:33:01 -08:00
Irfan Sheriff
86a5f5b9af Enhance WPS
- Add a cancel API
- Add more error reporting on WPS
- Fix network status reporting that showed up with new implementation

Change-Id: I499796c80d16d18df95fb702d029aa7e7283b603
2012-03-02 14:09:53 -08:00
Irfan Sheriff
ab26407124 Fix connect on a network id with zero
Pass invalid network id on arg1 when using a config object

Change-Id: I8ef047c951911324d9bf79b744c3e7122bb73bae
2012-03-02 12:24:44 -08:00
Irfan Sheriff
d3975a9177 Fix WifiManager async API
Fix the current asynchronous API to use callback like the way
was done with p2p API.

In the process, fix the use of WPS

Change-Id: Ib6f8714cf51b3525b655948268804e7eaaf17587
2012-03-01 13:57:23 -08:00
Irfan Sheriff
07573b3249 Improve Wi-Fi hand-off
When Wi-fi connects at L2 layer, the beacons reach and the device
can maintain a connection to the access point, but the application
connectivity can be flaky (due to bigger packet size exchange).

We now use Watchdog to monitor the quality of the last hop on
Wi-Fi using signal strength and ARP connectivity as indicators
to decide if the link is good enough to switch to Wi-Fi as the uplink.

ARP pings are useful for link validation but can still get through
when the application traffic fails to go through and thus not best indicator
real packet loss since they are tiny packets (28 bytes) and have
much low chance of packet corruption than the regular data
packets.

Signal strength and ARP used together ends up working well in tests.
The goal is to switch to Wi-Fi after validating ARP transfer
and RSSI and then switching out of Wi-Fi when we hit a low
signal strength threshold and waiting until the signal strength
improves and validating ARP transfer.

Change-Id: Ica593291ec7772da892f03cf45b649635b730c47
2012-02-29 17:33:36 -08:00
Mike Lockwood
79f5a0416f WifiStateTracker: add support for overriding DCHP max retry count in an overlay
Bug: 5551068

Signed-off-by: Mike Lockwood <lockwood@google.com>

Conflicts:

	packages/SettingsProvider/res/values/defaults.xml

Change-Id: I6a6519316a87bd1af39ea9dc51e0d312011135ef
2012-02-16 10:01:44 -08:00
Irfan Sheriff
870084d26d Merge "Initial support for concurrency" 2012-02-14 15:37:07 -08:00
Irfan Sheriff
4aa9bcd231 Fix shutdown delay
We were timing out on commands after shutting down supplicant

Bug: 5973030
Change-Id: I442ae6a9ad206406dc5f1c8c27be2456a339bba2
2012-02-13 16:12:48 -08:00
Jean-Baptiste Queru
0e1ad89ca5 am 27d2ab8b: am dc8668c8: am 97818704: Merge "Wi-Fi: Handle disconnect in middle of DHCP operation"
* commit '27d2ab8b27e7e1927e18869e898fa556e5da3d43':
  Wi-Fi: Handle disconnect in middle of DHCP operation
2012-01-27 21:09:20 -08:00
Vishal Mahaveer
21bd79f51c Wi-Fi: Handle disconnect in middle of DHCP operation
Restore power mode and BT co-ex settings when disconnect
happens in middle of DHCP operation.

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
2012-01-27 14:51:23 -06:00
Irfan Sheriff
7d6d9c005e Initial support for concurrency
Use of multiple socket connections over wlan0 and p2p and
p2p state machine is now controlled entirely from wifi state machine

Add discovery stop to allow STA scans to proceed after p2p is used

Change-Id: I790c9112d3f475f638f06fc3ae9e191f6d90ef35
2012-01-25 05:23:24 -08:00
Irfan Sheriff
fc7f95abcd cleanup for concurrency
Allow multiple instances of WifiMonitor and WifiNative to be
created in preparation for multiple socket connections

Change-Id: I06a227f87f1406dc62f884d56ad639ac623414b6
2012-01-13 16:38:43 -08:00
Irfan Sheriff
576db76106 Sync up state with supplicant at start
Bug: 5534039
Change-Id: I70b3e03b3039877b3c64167d0d246346f9131fc6
2012-01-11 17:04:30 -08:00
Irfan Sheriff
44b330dfb0 Add multi-interface support to native calls
Add the initial support for supporting seperate socket
connections on the p2p interface.

This is the initial change making primary interface connections
work alongside native support for p2p socket connection

Change-Id: I7619715ca75b10afd29af852279fe713331f75e0
2011-12-28 13:25:14 -08:00
Irfan Sheriff
1f09586953 clean up jni code
- Move all supplicant commands out of jni code in preparation for multi-socket
changes

- Also, clean up some function names to remove the explicit command

Change-Id: Id609ac7df0792fb85b52554d159f22064227c584
2011-12-28 13:18:07 -08:00
Irfan Sheriff
cbc46d145a Merge "p2p fixes" 2011-12-21 09:26:36 -08:00
Irfan Sheriff
bfed2d6c61 p2p fixes
- Change default GO intent to 7
- Handle P2P invitation scenario
- Fix p2p STA connect notification handling to figure device address. Proper fix
for handling both STA connection and disconnection is after we update supplicant

Change-Id: I9ff82f84ad3913905952d1119b7224dff41c24d9
2011-12-19 16:25:53 -08:00
Irfan Sheriff
cdc077c9dd Fix configured network status
For a connected network, keep status as CURRENT. For a network,
that is disconnected it should be ENABLED. A disabled network
will have the status as DISABLED

Also, add a unit test to ensure there is only one CURRENT network
that is connected

Change-Id: Iaa4a7124a0c372a8f6df3d846ae8c15d9b29cf13
2011-12-12 16:47:02 -08:00
Irfan Sheriff
e744cfff7c Clean up synchronization
- Add delayed disk write in WifiConfigStore
- Remove synchronization and keep all access to config store
throught the state machine thread

Change-Id: I53768a17895e48da7b99542ac95c6c2fddbcb021
2011-12-12 15:00:02 -08:00
Irfan Sheriff
ecd7798ce4 am a3c7c358: am 583fdf00: Merge "Handle emergency call back mode correctly" into ics-mr1
* commit 'a3c7c35873235486787d58fa8310eebd87508bc9':
  Handle emergency call back mode correctly
2011-12-09 18:09:07 -08:00
Irfan Sheriff
c4ea8dfd46 Remove explicit network disabling code
We are going to always disable the notification

Bug: 5556629
Change-Id: I981eb55a1bb6f44defd674e3a86d9c6f3805f4fc
2011-12-09 15:06:20 -08:00
Irfan Sheriff
1108e8ddad Merge "Change RSSI notification levels to 5 in framework" 2011-12-09 12:43:28 -08:00
Irfan Sheriff
ea933cb3fd Change RSSI notification levels to 5 in framework
At some point the system UI switched to using 5 rssi levels
while the framework only broadcasts a change for 4 levels.

Hence RSSI change can be slow to be displayed on the UI, fix this

Bug: 5732700
Change-Id: I21700f96ba7a8dd678fb2ccfff8ef59f9b696666
2011-12-09 12:40:35 -08:00
Irfan Sheriff
4494c90616 Handle emergency call back mode correctly
Bug: 5726996
Change-Id: I5815dd402bd73c530b9ba6d545d8956064949aa2
2011-12-08 11:31:52 -08:00
Irfan Sheriff
a6071c338b am 8c2122cb: am a85cc282: Merge "Fix CS wakelock handling" into ics-mr1
* commit '8c2122cb3e347c607126c49d76fb165125a02295':
  Fix CS wakelock handling
2011-12-07 12:10:58 -08:00
Irfan Sheriff
87f0a7b1aa Fix CS wakelock handling
Change-Id: Ibe1c1ab3e26ff0ae7cab7bfb0bd868bfab246037
2011-12-07 11:28:21 -08:00
Irfan Sheriff
bb60ee9766 am 7c92e2dc: am 8a4cd3b1: Merge "Disable poor network connection alone" into ics-mr1
* commit '7c92e2dccb4e5cb5314455692ac32d2ccff24292':
  Disable poor network connection alone
2011-12-06 21:09:44 -08:00
Irfan Sheriff
19380daaf4 Disable poor network connection alone
- Keep the walled garden detection in place

Bug: 5719771
Change-Id: I9e5d69b6d56096be904106b1db48c02db4c0fb50
2011-12-06 16:21:03 -08:00
Irfan Sheriff
591f6fa7c7 am 5e2e7d5f: am 40cb30c2: am 7b62313e: Disable wifiwatchdog for now
* commit '5e2e7d5fb81266640f8284abb25fe8be06693f5b':
  Disable wifiwatchdog for now
2011-12-06 16:04:30 -08:00
Irfan Sheriff
40cb30c2df am 7b62313e: Disable wifiwatchdog for now
* commit '7b62313eab4af8835a64fb3fe1e15e5e534a9479':
  Disable wifiwatchdog for now
2011-12-06 11:34:58 -08:00
Irfan Sheriff
7b62313eab Disable wifiwatchdog for now
Change-Id: I2ac4fa706f3d0a415cb8e86002173b776aba4e02
2011-12-06 11:21:22 -08:00