292 Commits

Author SHA1 Message Date
Irfan Sheriff
2a62b43e67 Merge "Remove persistent behavior" 2011-08-31 11:35:45 -07:00
Irfan Sheriff
329b79713c Merge "Reload STA firmware on start" 2011-08-31 11:35:26 -07:00
Irfan Sheriff
f9cb1d7082 Remove persistent behavior
Until we figure out a good way to do it from both group owner
and client, remove persistent behavior

Bug: 5241839
Change-Id: I31bda672edaa17e6a500f185b6b879dcfdbd069d
2011-08-31 10:17:24 -07:00
Irfan Sheriff
e36fcea8cd Reload STA firmware on start
Bug: 5242253
Change-Id: If8e07bc96b46a0e5022cc9d12191de2e4dbec212
2011-08-31 10:07:59 -07:00
Irfan Sheriff
f99360bf8f Merge "Initialize p2p settings" 2011-08-29 17:36:50 -07:00
Irfan Sheriff
335e40c0f1 Merge "Use seperate config file for p2p" 2011-08-29 15:22:58 -07:00
Irfan Sheriff
ad4d2c99ed Merge "Remove work around for driver state change" 2011-08-29 14:13:42 -07:00
Irfan Sheriff
3ac127ff47 Remove work around for driver state change
When we first ported wpa_supplicant 0.8, we had a work around
to fix the supplicant state change behavior from the driver.

Remove the work around since the driver behavior is fixed.

Bug: 5195278
Change-Id: I320f21ab01704931a3def6214b0cc40f214a688e
2011-08-29 14:05:14 -07:00
Irfan Sheriff
9322687d98 Initialize p2p settings
And fix associated changes from the settings.

With p2p_reconnect setting turned on, it means the p2p group can be
started without a group negotiation. Hence, handle p2p group started in
the P2pEnabledState

Also, reinvocation results in supplicant not reporting device address correctly.
Handle that until supplicant fix is fixed.

Bug: 5002384

Change-Id: I335f6e854acd6839f54da9b460b17ad7505b1098
2011-08-29 12:55:44 -07:00
Irfan Sheriff
f42c39b3d1 Use seperate config file for p2p
Keep p2p and sta config seperate to avoid conflicts.

Bug: 5002384
Change-Id: I8f8fc5f984f4f91f9ece4012bf536daa5cc00bba
2011-08-26 14:45:23 -07:00
Isaac Levy
8136de08ff Fixed WifiWatchdog notification bugs
- Space was truncated on 'disabled' notification
- Disable reason was getting wiped out on subsequent disabled
- disable reason was not propogating to WifiSettings

Change-Id: I2e57ee33d285aad39aabe1b048e7436d364b02f3
2011-08-26 11:55:33 -07:00
Irfan Sheriff
b6dbd69fa9 Merge "Prevent dup network adding - b/5200491" 2011-08-25 16:34:47 -07:00
Isaac Levy
8fd4a3d0f7 Prevent dup network adding - b/5200491
Change-Id: I8260cf73c4261e8efb696bb8557a39e02754190e
2011-08-25 15:19:07 -07:00
Irfan Sheriff
859e7de235 Fix connection notification for group owner
Bug: 5002384
Change-Id: I099d6907787a0becf9363c3709efd8d4ec2a97af
2011-08-25 13:58:25 -07:00
Irfan Sheriff
ea5b16ac57 Update p2p state machine and API
- Simplify the API with minimal needed functionality
- Fix responses for all async messages from the framework
- Fix state machine handling of connection setup and supplicant communication

Change-Id: I2724c83760b2aaa2068f9cd81ca0754753f83220
2011-08-25 11:02:25 -07:00
Irfan Sheriff
a407aef898 Merge "Added support for multiple DNS servers." 2011-08-24 11:46:12 -07:00
Jeff Sharkey
8e28b7d782 Proactively disable data when over policy limit.
Add policy controls to NetworkStateTracker which are combined with
other user preference and internal flags to decide if data connection
should be established.  Better locking around enabled flags.

When data network would be over limit, proactively disable data on
that network.  Enable when policy is snoozed or when cycle resets.

Track and dismiss notifications from now-stale policies.

Bug: 4587023, 5178147
Change-Id: Ibfcc9f73cda7c369209af701b46eddd3d1943f2d
2011-08-23 18:45:44 -07:00
Isaac Levy
79e43f679d Added support for multiple DNS servers.
Also increased delay on repeat checks for WWSM.

Change-Id: Ic11b1f37a910c483f48e04dadb539b39fe50e622
2011-08-23 14:04:40 -07:00
repo sync
8c57bcdbc6 Fix device address and interface address usage
After a p2p group is formed, STA connect and disconnects come over
interface address. Figure out device address from interface address
and fix the device comparison

Bug: 5002384
Change-Id: I7d3aa4f0616e000550cd2b057adbac71cfd2adb4
2011-08-19 14:41:03 -07:00
repo sync
2b8edd0c48 Use supplicant control channel interface for p2p
Bug: 5002384
Change-Id: Id2131ef43a01288e84178a5b21d289b97db9d736
2011-08-18 12:40:17 -07:00
repo sync
4a56c437b6 Merge "P2p enhancements" 2011-08-16 14:50:56 -07:00
repo sync
aea743aaa4 P2p enhancements
- ConnectivityService interaction and support for running dhcp server
and client

- State machine enhancements for connectivity interaction

Change-Id: Iba3beb8c87554ffd67a7b7e852bbb4dd8666a4f5
2011-08-10 15:53:49 -07:00
Irfan Sheriff
7244c977ec Ensure interface down before wpa_supplicant start
Now that the driver is built into the kernel, a runtime crash
followed by a driver unload and reload does not reset the interface.

Ensure interface is down before bringing up supplicant

Bug: 5032635
Change-Id: Ib8f3d47617e587139a8a91a82146ee3a2f329700
2011-08-10 15:49:25 -07:00
Irfan Sheriff
5f6ddecdee Merge "Add firmware reload support for P2P" 2011-08-10 12:19:58 -07:00
Irfan Sheriff
17262c454f Merge "Do not log failed pre shared key" 2011-08-10 10:19:24 -07:00
Irfan Sheriff
cb30b22ff5 Add firmware reload support for P2P
Refactor firmware reload call to support various modes - AP, STA & P2P

Bug: 5002384
Change-Id: I10d20fe5a7842437cf80861bc8a834990db87db5
2011-08-10 10:18:59 -07:00
Irfan Sheriff
a25b42ba9a Do not log failed pre shared key
Bug: 4320948
Change-Id: I1d10ca0c59e4f7f7157b6539786b32c57a202fc8
2011-08-10 06:58:48 -07:00
Irfan Sheriff
f70430d6dc Merge "DnsPinger -- log setup problems" 2011-08-09 19:28:26 -07:00
Isaac Levy
26a8d71413 DnsPinger -- log setup problems
Changed class to send a pings for 1.5 seconds to see if conn problems are
resolving after time.  Turning RD flag on for now

Change-Id: I05bcf208bda3ea8fb98bd7aec8f0109523d64583
2011-08-09 16:15:55 -07:00
Irfan Sheriff
50a928f414 Merge "Avoid turning off wifi tethering on interface down" 2011-08-09 15:47:20 -07:00
Irfan Sheriff
14f3ae7fe0 Avoid turning off wifi tethering on interface down
The hostapd daemon can bring down an interface, followed by immediately bringing it up
and this results in us turning off tethering completely.

Wait for the right notification to enter tethered state after brining up hostapd.

Bug: 5135245
Change-Id: I95c8c0c4c2c99c03fce2d18c014eaff37ed4e762
2011-08-08 17:06:35 -07:00
Isaac Levy
8dc6a1b282 Watchdog notify on explicit connect
Notifies when user explicitly clicks on wifi dialog.

Change-Id: I5eee37d68b422d748d41e9384d5006482a223dc5
2011-08-05 20:45:08 -07:00
Irfan Sheriff
d6d0628051 Merge "Rewrote DnsPinger - now is async and concurrant" 2011-08-04 15:34:47 -07:00
Isaac Levy
d2fe04b71a Rewrote DnsPinger - now is async and concurrant
Change-Id: I93e1374ae857832935202614e34ce18f040fcfc7
2011-08-04 10:35:29 -07:00
Irfan Sheriff
f6d09845be Fix p2p package paths
Split change Iba3beb8c which will not go in master to fix package paths

Bug: 5002384
Change-Id: I15072b65422fcdfe17c3f130d169258d60748012
2011-08-03 23:21:02 -07:00
Isaac Levy
88bae17cfd Changed walled garden to better url
Now checking for walled gardens using 204 error code on
http://clients3.google.com/generate_204

Change-Id: I0a00dc8b956f35f6695d2085c9f03ce40dc7e231
2011-07-28 16:07:05 -07:00
Isaac Levy
4ad39d6ac1 Will not disable wifi on wifi-only devices.
- Turn off watchdog by default on wifi-only devices, b/5073657
- Do not disable wifi networks if connectivity manager reports
no mobile connection.

Change-Id: I835e753624fc5e447081cde473039011721112c6
2011-07-27 14:39:33 -07:00
Irfan Sheriff
7dd04132d3 Run hostapd on a seperate thread
Hostapd start can block and state machine can be slow to respond.
Refactor wifi state machine to handle this behavior.

Bug: 5079498
Change-Id: Id7707bf2b0e1cb46a1f1374598ec4d7f6403ae1a
2011-07-26 14:07:04 -07:00
Irfan Sheriff
17b8451019 Merge "Fix interface notification race" 2011-07-24 17:14:12 -07:00
Irfan Sheriff
e8daf2a700 Fix interface notification race
In one use case, I see that if we go straight from
wifi client mode to tethering operation, the interface change notifications
are reported in an order that causes to enter tethered state
without actually tethering through connectivity service.

It is because an interface down notification (from wifi going down) comes after
we have started soft ap and we think we have tethered after calling startTethering
and switch to Tethered state

Instead, we should make sure tethering has started before going to Tethered state.

Change-Id: Iba7e8fab0feeb5637d40938862a8638871df8b02
2011-07-24 14:35:03 -07:00
repo sync
55bc5f3e04 Updated: Wi-Fi p2p framework
First stage. Get the bones in right now even though
we are not ready on the native side.

Once, we have things underneath working - we will further update the
framework

Change-Id: I4a7dab5cd4267373dc5f8989ae4122f91c384ed5
2011-07-24 10:08:47 -07:00
Irfan Sheriff
23eb297c77 Handle hostapd and tether interface changes
The set config will only update hostapd config file right now and we need to restart after that happens.

Also, softap interface is changed to be the regular interface

Bug: 5069108
Change-Id: Ibe80129b58e5339f06f186870bcd8f37569c6db3
2011-07-23 21:06:57 -07:00
Isaac Levy
e046975503 Fixing WifiWatchdog log flag
Accidentally merged verbose logging - setting to false.

Change-Id: I6cd9321c7602d86aac4a8340ef0233310a665bd9
2011-07-22 10:26:45 -07:00
Irfan Sheriff
d7a374f6f8 Merge "Fix multicast API" 2011-07-21 13:45:38 -07:00
Irfan Sheriff
b0c1b80f47 Fix multicast API
Fix multicast API and disable mutlicast V6 packets at driver start

Bug: 5016558
Change-Id: I1e04a905a36045e52c785c1dc702cc246a381a57
2011-07-21 13:37:57 -07:00
Isaac Levy
d7b3e6a39b WifiWatchdogSM notification for first wifi disable
Also moved customizable settings into Settings.Secure and
added listeners for setting changes into the state machine.

Change-Id: Ia6859c71f7edae13062685867959adc423af4643
2011-07-21 10:34:56 -07:00
Isaac Levy
3550ac919c Adding WifiInfo object in CONNECTED broadcast
Adding a parsable wifiinfo object in Connected broadcast, public api.
The connected broadcast only occurs on successful setup on the wifi
interface, so in normal use is very infrequent (once if the wifi
sleeps, or once at new hotspots, etc...)

WifiInfo objects are small, <10 ints, <5 short strings, and contain info
that could be useful to listeners, such as SSID.

The alternative is to the poll the Wifi Manager, using getConnectionInfo.
Because the Wifi Manager can update state in its own thread, polling the
Wifi Manager might result in an info object that's out of sync from the
received broadcast.

Change-Id: Iafcec77f45dd094ea84e6022b7a40e8952ae8137
2011-07-19 16:39:34 -07:00
Isaac Levy
654f509075 WifiWatchdog rewrite to formal statemachine
Rewrote wifiwatchdog service to use net.statemachine

Change-Id: Id6fd42b13192ac2e99f842ff50e9edff1696675d
2011-07-15 12:31:58 -07:00
Irfan Sheriff
6d815e9dd0 Merge "Moved WifiWatchdogService and DnsPinger" 2011-07-06 22:08:38 -07:00
Isaac Levy
a7bc1135c2 Moved WifiWatchdogService and DnsPinger
- Moved WWS and DnsPinger in prep for StateMachine rewrite
 intent.

Change-Id: I912ca80d31ee2ded99eb345a2e5a55d01bd9910c
2011-07-06 13:54:48 -07:00