176 Commits

Author SHA1 Message Date
Irfan Sheriff
0631c608b0 merge from open-source master
Change-Id: I8a950276787e9439420db396d0e32f88bd6e04cc
2010-06-11 15:14:29 -07:00
Irfan Sheriff
9e30a6e374 am 749defb0: am f4f614f5: am 9f2a0115: Merge "Remove indefinite DHCP retries" into froyo 2010-06-10 19:04:25 -07:00
Irfan Sheriff
f4f614f5ed am 9f2a0115: Merge "Remove indefinite DHCP retries" into froyo
Merge commit '9f2a0115220c8e288c32d8cf90e235a2f2be115b' into kraken

* commit '9f2a0115220c8e288c32d8cf90e235a2f2be115b':
  Remove indefinite DHCP retries
2010-06-10 18:59:42 -07:00
Irfan Sheriff
60d0d22c75 Remove indefinite DHCP retries
Replace indefinite DHCP retries
with a sufficiently large retry count

Bug: 2761057
Change-Id: I4570b74476aa78c71c73e06c2aafac33d924e867
2010-06-10 16:34:16 -07:00
Irfan Sheriff
d649c12815 Make NetworkStateTracker an interface
As part of the WifiStateTracker cleanup, need
to have NetworkStateTracker as an interface.

Change-Id: I2ac48d7e4c7274ac4df40bc3b8591b182956a936
2010-06-10 10:55:23 -07:00
Mikael Kanstrup
ea8bd1d167 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: I5035aad10146812ecef1be8ea4b22a03e230ccc9
2010-06-10 14:51:43 +02:00
Robert Greenwalt
02648a4b84 Clean up APN notifications.
Add APNType info to notifications so you can tell what's happening.  Now, even if a new APN
shares a connection with an already-connected-to- apn type, the new type will get all
the connecting and connected messages on connect and disconnecting/disconnected on disconnect
even though the shared connection remains connected.

Cleaning out the hacks MobileDataStateTracker needed to deal with the old situation.
bug:2226092

Change-Id: Iddd7421d6b91cda7c8405f9c3d5404ac04ef8e42
2010-06-09 16:52:01 -07:00
Jaikumar Ganesh
740e39be6a Pass BluetoothDevice to the Bluetooth Headset calls.
This is to support multiple headsets at the same time, atleast
at the framework level.

Change-Id: I91d05c6c2828c9a09d00806d5e79f1e9c9c7cf84
2010-06-02 16:03:51 -07:00
Irfan Sheriff
2d1a6e9429 Reset notification state on wifi enable
Bug: 2600111
Change-Id: Ifaa63cd7c05dfa27fbd851de6f7e92f7fc38907b
2010-04-18 23:07:01 -07:00
Irfan Sheriff
3bf504df9f Fix WakeLock issue for driver stop
Due to message removal, wakelock could be held forever.

Do a timer only based wakelock release until we do this
more cleanly in ConnectivityService for later release.

Also, add an optimization to prevent use of wakelocks when driver is
already stopped.

Bug: 2529883
Change-Id: Ia1c2ddd44213ef3aa609855613bf155945bef8e4
2010-03-24 17:59:42 -07:00
Irfan Sheriff
49de491379 Use a single mWifiState instance
mWifiState was split up to speed up access
of wifi state when things are synchronized.
Use a single atomic state variable throughout.

Change-Id: I345981e3ffa3d2b0b7e70a5c6efc43185cba9062
2010-03-22 16:13:07 -07:00
Brad Fitzpatrick
90dd21eff5 Make getting wifi state lockless.
Previous it was synchronized on the same lock that was held while
transitioning wifi states, effectively making it impossible to ever
find out about such states, and worse: making calls during transitions
block.

This manifested itself in a really laggy power control widget, which
I'm working on fixing in general in a separate change.

Change-Id: Ia34af98c73d7f5662e41360a213df87f6adaf130
2010-03-22 12:08:26 -07:00
Irfan Sheriff
4f31a00376 Fix null pointer exception
Bug: 2525763
Change-Id: If2f334187af26e0352d754d7e00a9ca3efc5dffa
2010-03-18 16:08:55 -07:00
Irfan Sheriff
9ab518ad79 softAp framework changes
Remove AP persist settings
Add new netd interface
Handle errors
Handle AP config change
Bug: 2413908
Change-Id: I31a1221ef5479da8d4a2620f0f0ee0b62539bc69
2010-03-16 19:54:17 -07:00
Irfan Sheriff
0f34406009 Clean up native access from framework
Driver commands should be issued when driver has started.
Supplicant commands should be issued when Wi-Fi is enabled
Bug: 2339709
Bug: 2371609
Change-Id: I9ba6ddfa0cf4c4b8ca049b0eb7eaaa8edb42bad1
2010-03-10 16:42:23 -08:00
Irfan Sheriff
a8fbe1fb74 Re-organize access to native interface through WifiStateTracker
Bug: 2339709
Change-Id: Ibb2eeb09b83dc24897116ea15a9016f81a08d442
2010-03-10 08:28:08 -08:00
Irfan Sheriff
5321aef4a2 Wifi AP framework changes first pass
Bug: 2421638
Change-Id: Ic5ea8f7560a7fe5e1b0769daa5d92cc33eefc692
2010-03-04 16:07:14 -08:00
Irfan Sheriff
c1ba7431a4 Remove redundant interface disable
Bug: 2274930
Change-Id: Ia1eafe422f6e18b826e53e72a306dd2961b948a6
2010-02-23 16:09:15 -08:00
Irfan Sheriff
102d05fa91 get DHCP IP on each connection
The IP state was not being refreshed when the supplicant transitions
from COMPLETED to ASSOCIATED to COMPLETED. This can lead to
a connected state with no real connection due to old IP settings.
The fix refreshes IP on each connection.

Bug: 2329261
Change-Id: I38cd56369ee2d8ab3e0f06f5c9f5712b9b2f35a0
2010-02-10 15:22:58 -08:00
Irfan Sheriff
05d72117f9 Handle error strings from monitor connection
Bug: 2399119
Change-Id: I481cfbfb11fb453659134004aafa3df236ba050b
2010-01-28 20:54:12 -08:00
Irfan Sheriff
0049a1bf3f Blacklist APs instead of disable
We currently disable networks upon too many reconnects. This leads to asking
the user input for reconnects. Blacklist it instead.

Bug: 2129037
Change-Id: I23d69daf3964c066ed7f70d32fefb81016f19aa2
2010-01-28 11:27:14 -08:00
Irfan Sheriff
7aac5547da Synchronize all WifiNative calls
Some of the native calls were left unsynchronized in the framework. Pre-empted IOCTL call
interrupted by another call from the framework cannot be handled in the driver.

Bug: 2310455
2010-01-08 12:04:30 -08:00
Dianne Hackborn
1c633fc89b Implement API to have new broadcasts replace existing broadcasts.
Use this in various places where it should serve no purpose to deliver
both broadcasts.  This is intended to reduce somewhat the flurry of
broadcasts that we churn through during boot.
2009-12-14 15:03:35 -08:00
Robert Greenwalt
7614d3d819 am 68b15b68: Porting change I064698b3 from mr2 to eclair.
Merge commit '68b15b68497e373fe63a13f11e18349a738a7989' into eclair-mr2

* commit '68b15b68497e373fe63a13f11e18349a738a7989':
  Porting change I064698b3 from mr2 to eclair.
2009-12-08 16:33:59 -08:00
Robert Greenwalt
68b15b6849 Porting change I064698b3 from mr2 to eclair.
Add support for "HANGED" driver state - we'll reboot the driver when requested (by the driver).

bug: 2310372
2009-12-08 15:37:47 -08:00
Robert Greenwalt
f75aa36fc8 Add wifi "HANGED" driver state triggering reload.
The driver can now report to us that they are hosed and we'll shut
down wifi and restart it - only to be used as a last resort.

Also fixing synch problem with updateWifiState.

bug: 2173119
2009-10-23 11:12:47 -07:00
Robert Greenwalt
e2d155a51e Add a new API for initing Wifi multicast filtering
Gets rid of the old method which generated Log noise.

bug: 1973855
2009-10-21 15:03:44 -07:00
Robert Greenwalt
1538dba4b0 Make FWK start a wifi scan if supplicant forgets. (do not merge)
Waits 15sec after getting a DISCONNECTED or INACTIVE state.  Also tracks
the number of supplicant state transitions.  After the period is up
if we haven't received any more supplicant state transitions, it requests a scan.

bug: 2168081
2009-10-21 14:05:09 -07:00
Robert Greenwalt
b106118c2c Make FWK start a wifi scan if supplicant forgets.
Waits 15sec after getting a DISCONNECTED or INACTIVE state.  Also tracks
the number of supplicant state transitions.  After the period is up
if we haven't received any more supplicant state transitions, it requests a scan.

bug: 2168081
2009-10-08 13:12:05 -07:00
Robert Greenwalt
bb5626c569 Stop bringing the wifi interface up on reset.
The driver will bring up the interface when needed and bring it up
at reset time has caused some problems.

bug: 2144870
2009-09-30 20:01:12 -07:00
Chung-yih Wang
5f55d8c9d4 Fix the incorrect field name in EAP wifi network.
The field identity should not be "anonymous_identity".
2009-09-22 14:54:19 +08:00
Chung-yih Wang
7121ac5644 Fix the issue of 'Wifi framework is not aware of state change'
Problem:
Connect to AP with WEP security.
Change AP's WEP password.
Phone will quickly reassociated (less than in 5 sec) and will not restart full "reconnect".
Indication will show "connected" but it will be no network access.

Fix: (for non-static IP only)

With WEP mode, the association could be successful if we change the AP's WEP password. However,
the phone wont be able to send/recv any traffic with the old password. What we could quickly
fix here is to send the DHCP request if the network is not configured to use static IP. We
can do nothing but ping access point to see if it we are able to communicate with it.
2009-09-22 12:01:15 +08:00
Robert Greenwalt
4282a5bad4 Reintroduce wifi RssiApprox, reducing driver calls
Only do the full signal strength calc when we need to, otherwise use
an approximate value.

This change was introduced a while back but was lost in some merge.

bug: 2125543
2009-09-16 17:17:16 -07:00
Chung-yih Wang
8e9ef0e789 Add the hide for the inner class definition. 2009-09-16 15:18:11 +08:00
Chung-yih Wang
4337476a66 Fix the missing part for reading enterprise fields in wifi configuration
+ refactor the enterprise fields.
2009-09-16 14:28:42 +08:00
Robert Greenwalt
7c9bf7caa2 Don't init wifiChannels until after supplicant up
The supplicant can take up to 15 seconds to start - setting the number of wifi channels
immediately after requested wifi start often will fail.

Changed to set the number of channels when the supplicant is reported as alive.

bug:2083601
2009-09-11 17:23:35 -07:00
Dianne Hackborn
4a51c20ce6 I am getting tired of the java doc warnings, so fix them.
Change-Id: I2205eebae419eaf4a0992c9f5b7cd807eb843fe1
2009-08-24 17:37:32 -07:00
Nick Pelly
bd022f423a Bluetooth: API change.
Split BluetoothDevice into BluetoothDevice and BluetoothAdapter.

BluetoothAdapter: Represents the local BT adapter. Operations on the local
                  adapter (start a scan, etc).
BluetoothDevice: Represents a remote BT device. Operations on remote devices
                 (pair, connect, etc).

IBluetoothDevice.aidl -> Bluetooth.aidl
BluetoothDeviceService.java -> BluetoothDeviceService.java

TODO:
Javadoc
2009-08-18 08:24:22 -07:00
Robert Greenwalt
0cbdb39991 am 41c10433: Fix MulticastLock API to match WifiLock API.
Merge commit '41c104339951e0e5e78240e1f48455c21b3ba5fd'

* commit '41c104339951e0e5e78240e1f48455c21b3ba5fd':
  Fix MulticastLock API to match WifiLock API.
2009-07-30 09:56:45 -07:00
Robert Greenwalt
41c1043399 Fix MulticastLock API to match WifiLock API.
Adds option to make lock refcounted or not.  Fixes 2017680.
2009-07-29 16:30:23 -07:00
Mike Lockwood
6ee4b5b504 Wifi: Make sure the interface is up before telling supplicant to start the driver.
This fixes a problem that resulted in the interface not being up when resuming
an authenticated connection.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-28 14:05:55 -07:00
Android (Google) Code Review
d72aa3b92c am 356d4a14: Merge change 8172 into donut
Merge commit '356d4a14aa96cf52c16f7a4d381044ce28b01af3'

* commit '356d4a14aa96cf52c16f7a4d381044ce28b01af3':
  Add the phase2 field for EAP WiFi configuration.
2009-07-22 11:51:06 -07:00
Chung-yih Wang
b96ea206d9 Add the phase2 field for EAP WiFi configuration. 2009-07-22 15:58:30 +08:00
Mike Lockwood
e2a5385c70 resolved conflicts for merge of f7703519 to master 2009-07-14 21:44:30 -04:00
Mike Lockwood
f32be166d5 wifi: Disable RSSI polling when the screen is off.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-14 18:28:35 -04:00
Mike Lockwood
0900f36576 wifi: Keep the WLAN network interface up whenever wifi is enabled.
We now only bring it down briefly and bring it back up again when
we want to reset the interface.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-10 17:24:07 -04:00
Mike Lockwood
622f82a0c7 WifiService: Remove hidden AP counting logic for active/passive scanning mode.
Apparently this code was not 100% correct, and now the Wifi driver is responsible
for setting the scan mode to active for hidden networks, so this is no longer needed.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-09 23:39:01 -04:00
Android (Google) Code Review
6811355d96 am 463aacfb: Merge change 6661 into donut
Merge commit '463aacfbd220c9ef2f6ed915d54092289fdac05b'

* commit '463aacfbd220c9ef2f6ed915d54092289fdac05b':
  wifi: WifiManager.startScan() will now do passive scans by default.
2009-07-09 14:27:38 -07:00
Mike Lockwood
a5ec95cdb1 wifi: WifiManager.startScan() will now do passive scans by default.
Active scans will only happen if a hidden AP is in use, or if the new method
WifiManager.startScanActive() is called.
This fixes some audio playback problems with bluetooth A2DP.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-09 16:54:39 -04:00
Chung-yih Wang
58c714c41a am 699ca3f2: Add password field for WiFi configuration.
Merge commit '699ca3f2518360ea3250ff5a0e5d39e122c64a91'

* commit '699ca3f2518360ea3250ff5a0e5d39e122c64a91':
  Add password field for WiFi configuration.
2009-07-06 11:22:18 -07:00