379 Commits

Author SHA1 Message Date
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
Irfan Sheriff
6b66e9e4c9 Switch to notifications for walled garden
Also, switches the URL for browser to the actual URL used for checking
walled garden

Bug: 5398921
Change-Id: Ie4d4b1d47f4151d0f85975b10190bdcf5f2e7a57
2011-12-05 14:12:06 -08:00
Irfan Sheriff
d834aeb0f2 Merge "p2p enhancements" 2011-12-05 14:07:06 -08:00
Irfan Sheriff
530040e0b9 p2p enhancements
- Add device name on SSID for legacy devices to discover a given
group and join

- Do not remove a group for a device lost event which only indicates
discovery is stopped

Change-Id: Id431c29da371986e694ab230d72d32061b209ebe
2011-11-30 17:22:30 -08:00
Jeff Sharkey
ddba10622d Clean up InterfaceConfiguration flags.
Offer modifier methods for interface flags instead of mutating
directly, and remove square brackets.

Change-Id: I4cce719dccedfb3f0e8448c111e65b93c0008cbb
2011-11-29 18:37:04 -08:00
Irfan Sheriff
a5d24d42ff Merge "Redesign p2p around provision discovery" 2011-11-29 14:52:18 -08:00
Irfan Sheriff
618455f7e7 Redesign p2p around provision discovery
= Provision Discovery:Is an optional discovery technique for figuring out
if a peer supports the specific WPS option. For compatibility reasons,
we will now always use it during connection but at the same time support
devices that request to support connection without it

= State machine and UI redesign around the new interaction

= Specify config methods explicitly for compatibility

Bug: 5599949
Change-Id: Ib79435dda472c43cc0746f56bf79ea896b2e33a4
2011-11-28 11:50:11 -08:00
Irfan Sheriff
4b173c0d8c am 694b266e: am 7b6d238b: Merge "Fix tethering interaction from wifi" into ics-mr1
* commit '694b266e0366e5400d577659d1bb8152f0a106e7':
  Fix tethering interaction from wifi
2011-11-23 19:22:50 -08:00
Irfan Sheriff
c74694d5e1 Fix tethering interaction from wifi
- Use the right interface for untether

- Wait till tethering service confirms that untether() is successful before
shutting down soft Ap. This helps to make sure interface does not go away
before clean up is done.

Bug: 5659166
Change-Id: Iff9d4a67ff40664c2114e766590d6a83b7739738
2011-11-23 10:05:05 -08:00
Irfan Sheriff
af139db574 am 1c9126c6: am 59c73b92: Merge "Convert soft ap config store to state machine" into ics-mr1
* commit '1c9126c64b56b6465fd551680461caed2e1ea20d':
  Convert soft ap config store to state machine
2011-11-09 21:51:12 +00:00
Irfan Sheriff
9575a1bea1 Convert soft ap config store to state machine
- Create thread when needed
- asynchronous interaction with wifi state machine

Bug: 5587391
Change-Id: Ie6d01b5a6b398a3fa12c384920a473e242443131
2011-11-08 15:45:42 -08:00
Irfan Sheriff
a4e1014d36 am 45a04db3: Merge "Avoid quick shutdown after a driver start" into ics-mr1
* commit '45a04db3f95755829b24043d30d7da7182b4f33b':
  Avoid quick shutdown after a  driver start
2011-11-05 19:33:16 +00:00
Irfan Sheriff
45a04db3f9 Merge "Avoid quick shutdown after a driver start" into ics-mr1 2011-11-04 11:47:27 -07:00
Irfan Sheriff
a25b1a272c am a3d9eba1: Merge "Reset IP failure counter on a success" into ics-mr1
* commit 'a3d9eba10461158a52acfc2a0324696b25db761f':
  Reset IP failure counter on a success
2011-11-03 23:10:04 +00:00
Irfan Sheriff
a3d9eba104 Merge "Reset IP failure counter on a success" into ics-mr1 2011-11-03 16:06:07 -07:00
Irfan Sheriff
e6daca5f53 Avoid quick shutdown after a driver start
Causes problems on our wext driver and potentially on cfg
based driver as well.

NLP can trigger very quick acquire and release within seconds
leading to driver switching between start and stop state.

We now keep driver up for atleast couple of minutes after a start

Bug: 5478196
Change-Id: I1b261578252c5fb9a65446241b51e5686d4d9cc3
2011-11-03 15:48:43 -07:00
Irfan Sheriff
05c6756b5e am b419abca: am 7f00c22b: Merge "Avoid duplicate dialogs leading to NPE" into ics-mr0
* commit 'b419abcadad79cd908acfe51dc6e8902c16ff728':
  Avoid duplicate dialogs leading to NPE
2011-11-02 21:42:49 +00:00
Irfan Sheriff
7f00c22b7f Merge "Avoid duplicate dialogs leading to NPE" into ics-mr0 2011-11-02 14:37:19 -07:00
Irfan Sheriff
1667a485d7 Reset IP failure counter on a success
Bug: 5552673
Change-Id: I56c032577be217895b75bf72ecb2c986d2064ab4
2011-11-01 16:28:17 -07:00
Irfan Sheriff
bbe77ca6be Avoid duplicate dialogs leading to NPE
Bug: 5548268
Change-Id: I383d5dba5ed2d77c1623d03990f1139872a65e2a
2011-11-01 12:04:57 -07:00
Scott Main
b68d7ab80a am 12f9900b: am 737c3dd9: Merge "docs: add package description for wifi.p2p and update the one for wifi" into ics-mr0
* commit '12f9900bfb004a09ea6a8ce0df27c661124f46ac':
  docs: add package description for wifi.p2p and update the one for wifi
2011-10-27 15:55:22 +00:00
Scott Main
737c3dd9f1 Merge "docs: add package description for wifi.p2p and update the one for wifi" into ics-mr0 2011-10-27 08:49:48 -07:00
Irfan Sheriff
03bcbe75ba Switch to notifications for walled garden
Also, switches the URL for browser to the actual URL used for checking
walled garden

Bug: 5398921
Change-Id: I7eb6f463c9b2f7e11c1d423711fa8a3d2bd2ff13
2011-10-25 15:37:18 -07:00
Irfan Sheriff
2d57d860c2 Fix handling in DisconnectingState
Now that we also handle supplicant state change to identify that
a network is disconnected (in case CTRL-EVENT-DISCONNECTED goes missing),
it is dangerous to defer all supplicant state change messages
while in DisconnectingState.

It may happen that the CTRL-EVENT-DISCONNECTED goes missing while in
DisconnectingState resulting in a supplicant state change of 0 (disconnect)
getting deferred.

Eventually after a connection completes, the supplicant state change events
get handled and the state machine goes into DisconnectedState.

Fix by having state machine switch out of DisconnectingState once we
do not immediately see a CTRL-EVENT-DISCONNECTED state.

Bug: 5490789
Change-Id: Ia2263795e53c51da0a2bfeefecfeb6256d6c5267
2011-10-20 14:38:54 -07:00