139 Commits

Author SHA1 Message Date
Jaikumar Ganesh
7440fc2e0e Wifi: Update code for new BT Apis.
Change-Id: I1deb0a9a1533958cdb79179bebd2d3b435b0b07c
2010-09-28 20:02:33 -07:00
Irfan Sheriff
5ee89800be Add Wifi Protected Setup support
Add WPS PBC and WPS pin method support with pin obtained
from AP

Bug: 2277571

Change-Id: I6ff8e447ab8c5e59456a55152588fd4d6386c610
2010-09-23 09:13:34 -07:00
Dianne Hackborn
03f3cb083d resolved conflicts for merge of 1f377298 to master
Change-Id: I0d92abae3a86792b47777f795143acc0489adfe4
2010-09-17 23:12:26 -07:00
Dianne Hackborn
1f377298e2 am 58e0eefe: Improve power tracking of WIFI use.
Merge commit '58e0eefeb5e2e270e2b04369bbf29fc22abda8d5' into gingerbread-plus-aosp

* commit '58e0eefeb5e2e270e2b04369bbf29fc22abda8d5':
  Improve power tracking of WIFI use.
2010-09-17 15:20:10 -07:00
Dianne Hackborn
58e0eefeb5 Improve power tracking of WIFI use.
We now distribute "wifi started" time across all apps that are
holding WIFI locks that cause it to be started.  But only when
WIFI would not normally be running.  Also have a mechanism to
distribute other WIFI work that has happened across those processes
based on their use.

Also fixed a bug where we were not retaining the CPU speed step
stats across boots...!

Change-Id: I00e3153b98429166273750512cc37e7975211ab9
2010-09-17 15:14:57 -07:00
Wink Saville
f61101f626 Add LinkCapabilities
Change-Id: Ia1599ade936b79f12526252c0a2e6b453abb136e
2010-09-16 21:26:59 -07:00
Irfan Sheriff
31b62322bf Add per network static IP settings
Remove the existing global static IP settings and add support
for per network configuration

Change-Id: I5a6d8b877471b8c8ad07951c96d273893754607f
2010-09-14 16:15:22 -07:00
Dianne Hackborn
e746f03c6c resolved conflicts for merge of 53686433 to master
Change-Id: I27004dc464f5771d3205ae5757c6eccc5b16854d
2010-09-13 16:56:10 -07:00
Dianne Hackborn
53686433a9 am 7e9f4eb2: Track client requests through location manager.
Merge commit '7e9f4eb2608148436cef36c9969bf8a599b39e72' into gingerbread-plus-aosp

* commit '7e9f4eb2608148436cef36c9969bf8a599b39e72':
  Track client requests through location manager.
2010-09-13 14:34:22 -07:00
Dianne Hackborn
7e9f4eb260 Track client requests through location manager.
This fixes a problem where applications could ask the location
manager to do very heavy-weight things (like...  say... update
location every minute), which would get accounted against the
system instead of the application because ultimately it is the
system making the heavy calls (wake locks, etc).

To solve this, we introduce a new class WorkSource representing
the source of some work.  Wake locks and Wifi locks allow you
to set the source to use (but only if you are system code and thus
can get the permission to do so), which is what will be reported
to the battery stats until the actual caller.

For the initial implementation, the location manager keeps track
of all clients requesting periodic updates, and tells its providers
about them as a WorkSource param when setting their min update time.
The network location provider uses this to set the source on the
wake and wifi locks it acquires, when doing work because of the
update period.

This should also be used elsewhere, such as in the GPS provider,
but this is a good start.

Change-Id: I2b6ffafad9e90ecf15d7c502e2db675fd52ae3cf
2010-09-13 14:20:48 -07:00
Irfan Sheriff
ee923072eb Merge "Add set/get band in WifiNative" 2010-09-02 15:39:16 -07:00
Irfan Sheriff
25c9bf2396 Add set/get band in WifiNative
Add support for set and get band and set the default
to 2GHz for now till we get a fix on issues
with 11A

Change-Id: Icb9bddc353e4bf013bdb8a08d9b4ee3451c282f4
2010-09-02 12:48:20 -07:00
Wink Saville
5de38d11f6 Remove unused Intent filter values.
Change-Id: I902cdbbff9238b2ac975441ef6ecb3c6d5c7a56f
2010-09-01 15:16:56 -07:00
Irfan Sheriff
04db1d5d3a Add WifiConfigStore to manage networks
Split configuration management into a seperate class,
next to come is per configuration ip management as part
of WifiConfigStore.

Bug: 2876746
Change-Id: I44b85fb0e23a83d97a5052ba6beafe06f2027f5a
2010-08-31 15:41:21 -07:00
Robert Greenwalt
37e65ebb7e Rename NetworkProperties to LinkProperties
Also add copy constructors and use them when giving out data.

Change-Id: Id320eb8fb91d0bd250305ce7bb4f628570215615
2010-08-30 15:54:37 -07:00
Robert Greenwalt
585ac0fc8d resolved conflicts for merge of 4ea54f44 to master
Change-Id: Ia77bb59a6e1950648c8ebf7db307e204f93a9f56
2010-08-27 11:05:11 -07:00
Ben Dodson
e3f55d45cf Merge "Updated documentation for upcoming fix for @code tags" 2010-08-26 15:27:15 -07:00
Ben Dodson
4e8620f868 Updated documentation for upcoming fix for @code tags
Change-Id: Id7b163179132b9cf180afecb4e9e10ee39bcd415
2010-08-26 14:02:20 -07:00
Irfan Sheriff
bbc85ab322 Add WifiStateMachine details for dump
Change-Id: I3015411dd11f3df57422b41125d4db44be1e0854
2010-08-26 13:58:35 -07:00
Irfan Sheriff
a2d5fbf569 fix connectNetwork corner cases
1. if we try to use the api for an already connected network
we could end up in disabling other networks since we dont
get events back in that scenario. fix to ignore connect.

2. force transition to mDisconnectingState since we expect
a disconnection when we connect to a network. If we
are in the other child states in ConnectModeState and dont
transition, we could ignore the connection/disconnection
which would cause other networks to get disabled.

Change-Id: I603d504af21c5ba09411d5e2515b8031b9f8a97a
2010-08-25 12:58:11 -07:00
Irfan Sheriff
50454c2718 sendBroadcast needs protection
we need to check if system is ready for broadcasts

Change-Id: I342c51ae85c9ca1aa0cb289c673a20f582eb0423
2010-08-24 16:40:12 -07:00
Irfan Sheriff
9e6222f4c1 cache configured networks
Remove the sync-wait call into state machine for
fetching configured networks

Bug: b/2876746
Change-Id: I4434627abb78f7112fd613008c4c77374ac1b966
2010-08-23 16:32:24 -07:00
Irfan Sheriff
d8134ff9d8 Clean up synchronous calls
We dont plan to have asynchronous versions of the existing
synchronous calls since we have added more powerful
asynchronous calls. Remove functionality to check for
synchronous calls.

Also, remove unused sync call for fetching status

Change-Id: I2982cb7b2aabc88a63289d49686a6e3645085263
2010-08-23 15:50:39 -07:00
Irfan Sheriff
b65444df01 am 80db4381: Merge "DO NOT MERGE Enable all networks on screen on" into gingerbread
Merge commit '80db4381c010c4dec74c2bf1e02380759e4ff97b' into gingerbread-plus-aosp

* commit '80db4381c010c4dec74c2bf1e02380759e4ff97b':
  DO NOT MERGE Enable all networks on screen on
2010-08-21 11:53:08 -07:00
Irfan Sheriff
fae66c3ab5 DO NOT MERGE Enable all networks on screen on
Connectivity to a disabled network never happens.
An old dhcp issue for example prevents
connectivity again in future. Allow connectivity
on all networks on screen on.

Bug: 2129037
Change-Id: I42afc17ddb5cd238e46d7e50f1b6e708e107b35d
2010-08-20 14:51:00 -07:00
Jean-Baptiste Queru
2338f48ddb resolved conflicts for merge of 34df5ccc to master
Change-Id: I55558b2ab9452b2a819a1fce5b3ee5af29688e98
2010-08-20 06:18:50 -07:00
Irfan Sheriff
cdea9193f2 update ssid in WifiInfo
Bug: 2876746
Change-Id: I58295e01f07f168e234ab344065fe50047902c76
2010-08-19 21:35:25 -07:00
Irfan Sheriff
f99819e47c clean up scanresults on exit from driver start state
Bug: 2934389
Change-Id: I918bb9e198aba0bdbb2be356a680789c9678e47c
2010-08-19 16:30:12 -07:00
Irfan Sheriff
e498475b18 asynchronous driver commands
Make some of the common driver commands scan/disconnect/reconnect/reassociate
asynchronous. We already have broadcasts to indicate results.

Change-Id: I343c6be077fb11a3d488e586ab10ab2373b269d8
2010-08-19 12:23:13 -07:00
Daniel Sandler
4c0d81b8ad Fix divide-by-zero when calculating signal level over a large output range.
Change-Id: I17eff6fb458532465a836414e1973a8d5b7c715b
2010-08-19 01:25:32 -04:00
Jean-Baptiste Queru
34df5ccca4 Merge "fix build" into gingerbread-plus-aosp 2010-08-18 13:48:38 -07:00
Jean-Baptiste Queru
a00f8db5ef fix build
Change-Id: I13a6a34e8eae73b046769df365be8a46489bd111
2010-08-18 13:47:45 -07:00
Irfan Sheriff
aea40e3c57 am a1af0d7c: Merge "Fix SDK build" into gingerbread
Merge commit 'a1af0d7c80a0119630926810644e6cdee481ba80' into gingerbread-plus-aosp

* commit 'a1af0d7c80a0119630926810644e6cdee481ba80':
  Fix SDK build
2010-08-18 13:36:01 -07:00
Jean-Baptiste Queru
3719f8568e DO NOT MERGE resolved conflicts for merge of 8c11e952 to gingerbread-plus-aosp
Change-Id: I29703133654f0f80a4425914d290e9dc50cbc3cc
2010-08-18 13:20:28 -07:00
Jean-Baptiste Queru
f939518510 Revert "- updates NetUtils to use new libnetutils headers"
This reverts commit 9bf3bb21c097cc96f30d9bf3ec7dea62a74a738b.
2010-08-18 11:16:42 -07:00
Irfan Sheriff
4d32d81bd7 Fix SDK build
Add the tag and documentation when we open up the high perf mode

Change-Id: I921e46a7519561e59fb917d08a36dd1d3d2fc7f3
2010-08-17 16:45:53 -07:00
Irfan Sheriff
8c11e95230 DO NOT MERGE WifiLock extensions for high performance mode
Add extension to WifiLock to allow apps to operate
in high performance mode (high power & disable suspend
optimizations for battery consumption).

Bug: 2834260
Change-Id: I8b33d307f3d569bc92ba2139b9ed224ffc147547
2010-08-17 15:27:54 -07:00
Wink Saville
c7a98341b0 Add documentation to NetworkStateTracker and a small change to the API.
Also, removed some unused NetworkStateTracker event codes.

The API change was to add context and target to startMonitor, this makes
it easier to document what the actual interface contract is.

Change-Id: If9b52486c3c281fe4794bc78417c8b03888414b1
2010-08-13 16:11:42 -07:00
Robert Greenwalt
993f85f319 am e300b8c1: Merge "DO NOT MERGE Always set/remove default routes." into gingerbread
Merge commit 'e300b8c10c306b575bbbec29d5572ba92a97785e' into gingerbread-plus-aosp

* commit 'e300b8c10c306b575bbbec29d5572ba92a97785e':
  DO NOT MERGE Always set/remove default routes.
2010-08-13 16:03:29 -07:00
Robert Greenwalt
b738fb9938 DO NOT MERGE Always set/remove default routes.
Must clean up default route if a default 3g connection is replaced
by a non-default (ie, mms) connection on teh same interface.

Also stop mucking with all connections dns and routes - do it only
for the connection that has changed.

bug:2865974
Change-Id: Ifdf49080fa0413a4d826813706c809975a562dfa
2010-08-13 15:53:13 -07:00
Mikael Kanstrup
876247784e DO NOT MERGE WLAN: Reset power save mode to startup value after DHCP response.
When the driver was configured to run with power save mode disabled the
power save mode incorrectly got reverted back to AUTO mode right after
DHCP response. The power save mode value is now saved so that the device
properly reverts back to a previous mode after DHCP response.

Change-Id: Ie68cd107872d233bf422e24130a1eb9f6432db91
Bug: 2834260
2010-08-13 10:24:04 -07:00
Irfan Sheriff
e04653cbd0 Asynchronous API
Add asynchronous API for simplified connect, save
and remove.

Add a SUPPLICANT_CONFIG_CHANGED_ACTION broadcast to
notifiy a supplicant configuration change.

Change-Id: I69ae116246094de4a469cb2af5baf37e5ad4d6dd
2010-08-12 07:57:36 -07:00
Irfan Sheriff
994c57828f Fix build
A local change had remained.

Change-Id: Iad01d6da7f6cc75b470296383e1121d21008883a
2010-08-11 08:20:41 -07:00
Irfan Sheriff
0d25534fed Split WifiStateMachine from WifiStateTracker
Notifications handled in WifiService. WifiStateTracker tracks
state for connectivity service

Change-Id: Idb0cf494898d28712af0f95f9e60c5417cd4a053
2010-08-10 15:18:25 -07:00
Irfan Sheriff
34fe791453 Handle loss of supplicant events at start
If the supplicant events are lost even before connection,
we stay stuck without doing IP address.
The earlier implementation used polling at connection to handle
this case.
A disconnect after connection handles this cleanly.

Bug: 2876987
Change-Id: I7509c5f332f87b91e1ff8438cf859a0e49df2e6d
2010-07-28 17:40:20 -07:00
Irfan Sheriff
22c2b25ad7 sticky broadcasts dont need system ready check
Fix an issue where checking for system ready status
for sticky broadcasts can lead to boot up with wifi
turned on and settings showing incorrect status.

Bug: 2876746
Change-Id: Iae39855c255513e28a13bd819b3d14d81fbaba43
2010-07-28 11:19:54 -07:00
Irfan Sheriff
a2a1b911a3 Refactor WifiStateTracker
Implement WifiStateTracker as a HSM.

Change-Id: Ic12fd78f1f183b5c4dea8ad2301002267ceff0cb
2010-07-27 11:59:29 -07:00
Robert Greenwalt
47f69fe299 Pass network properties to ConnectivityService.
Used as a bag to hold ipaddr, gateway, dns, proxy info.
addr's are InetAddresses for v4/v6 use.  Cleaning up some old v4-only code

bug:2655015
Change-Id: I7ac886fe5c519e8bab42f49cd82a5189d9c9ab59
2010-07-13 18:07:41 -07:00
Irfan Sheriff
30683b2ad0 am 53dca61f: am 9005e7f4: Merge "Add setWifiApConfiguration interface" into gingerbread
Merge commit '53dca61f26f4ff348418add60599213297acc899'

* commit '53dca61f26f4ff348418add60599213297acc899':
  Add setWifiApConfiguration interface
2010-06-25 19:53:34 -07:00
Irfan Sheriff
53dca61f26 am 9005e7f4: Merge "Add setWifiApConfiguration interface" into gingerbread
Merge commit '9005e7f4297a3f04263e81cb61ba2703d5667b0a' into gingerbread-plus-aosp

* commit '9005e7f4297a3f04263e81cb61ba2703d5667b0a':
  Add setWifiApConfiguration interface
2010-06-25 19:51:50 -07:00