184 Commits

Author SHA1 Message Date
Robert Greenwalt
992564e481 Update LinkProperties treatment of gateways
A link can have multiple gateways (think ipv4/ipv6 for a trivial example).
.

bug:3438810
Change-Id: I28c90a6947cd50b82e5ca9a0113148f98b3f4dd8
2011-02-11 11:06:23 -08:00
Robert Greenwalt
ed12640932 Bind addr and prefixLength together in LinkAddress
bug:2542681
Change-Id: I90200446216d78c676498144946832afe75efdb8
2011-01-28 15:34:55 -08:00
Robert Greenwalt
0216e61819 Make the interface with DHCP IPv6 capable.
It doesn't work (yet) for IPv6, but we can remove v4-centric notions from the framework.

bug:2542681
Change-Id: I21c058f5c88d07706c9265bf0ea902fc90357e56
2011-01-26 09:10:01 -08:00
Robert Greenwalt
a9a4f5cc88 Merge "Switch from NetworkUtils to netd for iface config." 2011-01-21 12:06:16 -08:00
Robert Greenwalt
27d3c5907c Switch from NetworkUtils to netd for iface config.
Moving more stuff to netd and getting rid of unused NetworkUtils.

Change-Id: Ibb5a11dca58d07291fe33e6d33027553f6158ea7
2011-01-21 10:44:12 -08:00
Irfan Sheriff
43e747ef59 Add untether call during softap shutdown
Bug: 3355187
Change-Id: Ie4381648883186a216807bcd0d586ecfd00ca15c
2011-01-20 07:47:21 -08:00
Irfan Sheriff
d033e9caa1 Merge "Handle EAP authentication failure" into honeycomb 2011-01-19 17:58:19 -08:00
Irfan Sheriff
b98d878f43 Handle EAP authentication failure
Avoid the scenario of an EAP network indefinitely trying to connect
due to an EAP authentication failure by disabling the network

Bug: 2149114
Change-Id: Iec8da7551c2dff9b153f41a2139529133130399d
2011-01-19 16:30:28 -08:00
Irfan Sheriff
0c7e16450c Fix soft Ap handling on system restart
When system server restarts, a soft AP
start can fail. Fix it by doing a stop
and start through netd.

Bug: 3236625
Change-Id: I95f31eb34a03b64cb7e2b6b8bdd56fc2119b605b
2011-01-18 19:31:09 -08:00
Irfan Sheriff
fcb659b667 Report WPS overlap error
Add certification requirement to report an overlapping
WPS session failure to user

Bug: 3354319
Change-Id: I8c51bc20c2ec8e8d92a86ed2dfe2a3ede9c56885
2011-01-16 13:13:15 -08:00
Irfan Sheriff
e4c56c9655 Fix WPS to provides immediate feedback
If WPS is already active, we drop user's request
and convey an in progress message

If WPS fails to start, a failure indication is conveyed
to the user

Bug: 3316078
Change-Id: I238c55973cb29cf5c1be66197ffcb4978316cb89
2011-01-14 09:58:07 -08:00
Irfan Sheriff
6bb7652b47 Fix network availability reporting
Report wifi is available as long as it is kept on

Change-Id: I5be9461106ef4968cbc423f90e0ff168e089791f
2011-01-11 12:11:36 -08:00
Irfan Sheriff
65eaec88f3 Use BluetoothAdapter broadcast for coex settings
Use the bluetooth adapter broadcast so that we capture
various bluetooth profiles for both scan coex settings
and coex settings during DHCP

Change-Id: Idec41940514efe7ea9927f67b6199b4893794e2a
2011-01-07 09:26:59 -08:00
Irfan Sheriff
8e86b89860 Enable networks on screen on
We now all configured networks on screen on.
Also, removed event logging for scanning and rssi polling

Bug: 2129037
Change-Id: I995893d77f8575a8d987d9d8604c8272f636d12d
2010-12-24 10:25:04 -08:00
Irfan Sheriff
b45e726bf5 Fix wifi broadcasts
Add the missing wifi disable broadcast and also send out
supplicant disconnect on shutdown.

Added unit test cases.

Bug: 3294055

Change-Id: Ia56a8ec9d17784c5aac5b8b369c04837f9057c54
2010-12-22 14:43:13 -08:00
Irfan Sheriff
d3040307ab Merge "Fix ssid storage regression" 2010-12-16 14:46:32 -08:00
Irfan Sheriff
58938159ec Fix ssid storage regression
I introduced a bug with change Ic12fd78f. Quite
possibly a copy-paste issue.

Bug: 3281928
Change-Id: I040fa8580c3d6d5c585d0e5cc4306daab2f44c3d
2010-12-16 07:45:58 -08:00
Irfan Sheriff
5d001ea027 Use clear names for native API
Change-Id: I96c3089e10c75f433410f66c01204b7e5de2dc55
2010-12-15 11:08:29 -08:00
Irfan Sheriff
3a65de795d Initialize network state on start
Bug: 2542613
Change-Id: I5b16b2dc866c7f25bc61f1a04cf5fa9938ec2c3e
2010-12-15 10:15:02 -08:00
Irfan Sheriff
96071a7031 Handle supplicant stop correctly
- Use a clean terminate for a regular stop and on failure kill supplicant. This prevents
WifiMonitor from getting hung permanently on a socket in case of a kill

- When WifiMonitor exits, kill supplicant and cleanup sockets

Change-Id: I87c32e03d945433f33eed8c326d7f0368925bf55
2010-12-15 08:37:05 -08:00
Irfan Sheriff
02fb46a297 WPS fixes and refactor
- Allow IP and proxy set up for WPS
- Use string for WPS pin to avoid losing leading zeros
- Add a seperate WPS state machine and WpsConfiguration class

Change-Id: I87f43fff8bba0ae8ff02e5fc495a8bc628a8c8cf
2010-12-13 14:50:51 -08:00
Wink Saville
e798268f16 Have MobileDataStateTracker & DataConnectionTracker communicate directly.
Added CMD_SET_DATA_ENABLE which is sent when data is enabled/disabled
via the ConnectivityService. It is anticipated that the communication
channel will be used for additional commands and to receive unsoliciated
commands from DataConnectionTracker back to MobileDataStateTracker.

Change-Id: I3863e7385155d503f069b1dcb7e4f766ec78b5f8
2010-12-07 10:31:02 -08:00
Irfan Sheriff
cf34f47edd Update scan results when frequency band is set
Change-Id: I4864b66f96744682a0de274fd49cca035ffc5d3c
2010-12-06 12:07:36 -08:00
Irfan Sheriff
9beea36441 Hold network hand-off wakelock only when connected
Change-Id: I31132cb2966cfc1eb205e070116b4c784d292f46
2010-12-03 17:00:13 -08:00
Irfan Sheriff
be9ee6a498 Fix configuration change handling
When IP or proxy config changes, we now reconfigure
the network and inform connectivityservice.

Also, fixed the naming for changes on configured
networks.

Bug: 3237735
Change-Id: I2a94b3158b6b0e0d27442d7fd525a8a23f0497f8
2010-12-03 14:15:39 -08:00
Robert Greenwalt
3c661bde45 Fix Wifi's setting of isAvailable.
Manifested itself in ConnectivityService reporting no connectivity.

bug:3220092
Change-Id: I4c0149125b8e2b9c2493f87d208aecbf21590fff
2010-11-23 12:41:46 -08:00
Robert Greenwalt
44138f15ce Merge "Notify all VMs when proxy changes." 2010-11-19 10:34:17 -08:00
Robert Greenwalt
434203a277 Notify all VMs when proxy changes.
bug:2700664
Change-Id: I74cc6e0bd6e66847bf18f524ce851e3e9d2c4e87
2010-11-19 10:24:30 -08:00
Irfan Sheriff
19d245b792 Split SupplicantStateTracker and refactor
- Move SupplicantStateTracker into a seperate file. In the
process clean up code that needs to be present only in SupplicantStateTracker

- Retry twice for password failures

- Clean up supplicant state handling. Dont treat supplicant states
as HSM what values. Instead, just retain SUPPLICANT_STATE_CHANGE

- Add event logging in SupplicantStateTracker

- Move scan handling out SupplicantStateTracker

Change-Id: I083e1c40ef5a858164493b1440b82c5751b3bfb5
2010-11-18 16:58:08 -08:00
Irfan Sheriff
36f7413dab add frequency band control API
Change-Id: I6cc6cdef27d493d4ef76cec17fdca7e49d9dc8d7
2010-11-08 10:09:17 -08:00
Irfan Sheriff
090813ac95 Initiate wake up scan only in a disconnected state
When wifi is connected to an access point, we should
not wake up the device to initiate scans.

Change-Id: I1a48387a0cac7b23a8d947d8409cafc63da18d38
2010-11-04 15:20:01 -07:00
Irfan Sheriff
ed4f28b492 Set country code in the driver and remove channel set
With dual band support, using country code
settings is the way to go

Bug: 2936741
Change-Id: I760dce4c43b1af19ee205c28f0d287420c8d9e85
2010-11-02 16:35:56 -07:00
Irfan Sheriff
1406bcb751 Use AsynChannel for synchronous API
also cleaned up some unnecessary synchronous commands from state machine,
and fixed an issue with a synchronous WPS command

Change-Id: I55bf4379d9810e11f2ba2e03e2e703b132d1488f
2010-11-02 16:08:35 -07:00
Irfan Sheriff
5876a4273e 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: Id394d265b9876bf0230efb3d222056e9b80b44fd
2010-10-26 13:25:03 -07:00
Irfan Sheriff
f235c5ab91 add wps pin from device capability
Bug: 3119043
Bug: 3112178
Change-Id: Iaae6bcf53e11f7fac82b3c604ddc27ff05e00542
2010-10-26 10:48:11 -07:00
Jaikumar Ganesh
5a1e4cf83f Update BT APIs return type from Set to List.
Change-Id: Ia27220dd26cde13007f6938c830517ee7f6968ce
2010-10-22 11:36:28 -07:00
Wink Saville
4b7ba09c8b Change removeNetowrk to a synchronous channel call.
Change-ID: Iad0380d56972826615e044fa2aaee418b617d732
2010-10-20 15:52:42 -07:00
Irfan Sheriff
4f5f7c9683 Fix wake and scan behavior
- Add wakelock for driver start/stop to ensure a wifilock
  acquisition kick starts driver. Also cleaned up state machine
  driver start/stop behavior.
- Add periodic scans when driver is started to ensure wifi
  reconnections when wifilock exists or when user chooses
  never to sleep
- some minor clean up

Change-Id: I844eb70491d5aa2f8c8933b3d8dd01ba237ee534
2010-10-20 12:04:21 -07:00
Dmitry Shmidt
138f10e3f1 wifi: Allow dual-band support
Change-Id: I90e421efca783080261789378ef6054ac394c1e2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-10-20 11:03:06 -07:00
Irfan Sheriff
cdf8edeec2 Remove synchronous bluetooth callbacks
Also, fixed an issue with disabling bluetooth coexistence

Change-Id: Ia7f68dfe6e8d587101ba8513783a0123ff0561a1
2010-10-14 17:06:18 -07:00
Irfan Sheriff
68825ac32d state machine fixes
- When supplicant dies, restart it
- When wifimonitor fails to connect in time, restart
  supplicant
- fix dhcp counter reset
- defer all load/unload actions when waiting for supplicant
  control connection
- we dont need to disconnect & reconnect at start with the
  faster monitor connection and handling of failures

Bug: 2973023
Bug: 3090725
Change-Id: I5c834ddd08e6300e2b29da0941a24633825b4d3b
2010-10-12 16:47:51 -07:00
Irfan Sheriff
c949b9c3ff Retry quicker for control channel setup
Bug: 2976277
Change-Id: Ifedb0c1aebefc251028e8d2f578f530a3840c702
2010-10-11 15:07:20 -07:00
Irfan Sheriff
96ca91761e Use LinkProperties for IP and proxy configuration
Change-Id: I4ae817fb00141e9a742216b7fd02dca1ed228270
2010-10-08 12:41:11 -07:00
Irfan Sheriff
ed5d7d17c9 Add LinkAddress
LinkAddress stores IP address + prefix for a network link

Change-Id: Id3e74e9d0a62121d097ebdc9be064eeea257ba1f
2010-10-06 11:04:05 -07:00
Irfan Sheriff
128cecab96 Add proxy settings per wifi network
Provide per network proxy settings configuration
for wifi. This is stored along with the ip configuration
in ipconfig.txt

bug: 3039302
Change-Id: Ic8bc14493583be19fde3d7c463d1e5a77e6df25f
2010-10-06 10:36:36 -07:00
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