942 Commits

Author SHA1 Message Date
Yuhao Zheng
3309bc5f24 Merge "WifiStateMachine: fix for exiting L2ConnectedState" into klp-dev 2013-10-10 16:18:59 +00:00
Robert Greenwalt
6717e1d86f am 7ecedb75: am f008ca33: am f681058f: Merge "Narrow previous fix for this issue." into klp-dev
* commit '7ecedb75c833a746c561dd0029b0accf175033be':
  Narrow previous fix for this issue.
2013-10-09 17:14:37 -07:00
Yuhao Zheng
f3346191f8 am d37638e5: am 11a3bc70: am 709a4278: Merge "Don\'t mark wifi disabled unless it\'s off." into klp-dev
* commit 'd37638e5262fea65bf428cb78e73a9b4e02a93fe':
  Don't mark wifi disabled unless it's off.
2013-10-09 16:36:36 -07:00
Robert Greenwalt
8d9167ded3 Narrow previous fix for this issue.
Networks should be unconditionally disabled when going to
scan only state or we risk connecting when we don't want to.

bug:11062188
Change-Id: If89621ca07d86673a661d2e5fe4ce89286f8835e
2013-10-09 16:31:35 -07:00
Robert Greenwalt
15af21252d Don't mark wifi disabled unless it's off.
The transition from driver-started to scan-only state was incorrectly
always marking wifi disabled, but transitioning back only marked it
enabled if we were exiting due to leaving the scan-only-with-wifi-off
mode.

bug:11062188
Change-Id: I44fe64fd8dac8f36f4e22cb1c16b9d7a06bdbac0
2013-10-09 12:48:07 -07:00
Yuhao Zheng
8b033d37ca Add a missing wifi p2p discovery changed broadcast
When we disable wifi while wifi p2p peer searching is in progress, we don't get
a WIFI_P2P_DISCOVERY_CHANGED_ACTION broadcast saying that discovery is stopped.
Since this broadcast is sticky, applications will still get the previous one
saying discovery is started even if wifi p2p has been disabled. Adding a
sendP2pDiscoveryChangedBroadcast when exiting P2pEnabledState fixes this problem,
and it won't be a duplicate as sendP2pDiscoveryChangedBroadcast checks for that.

Bug: 11151666
Change-Id: I62de8f3d17d80f151403b91cf5c62866d931c01b
2013-10-09 12:28:22 -07:00
Yuhao Zheng
a9e6be83ae WifiStateMachine: fix for exiting L2ConnectedState
After a L2ConnectedState to WpsRunningState transition, network is disconnected.
However, the disconnected message is ignored by WpsRunningState, leaving DHCP
still running. When entering L2ConnectedState again, WifiStateMachine gets stuck
on waiting for DhcpStateMachine, because DHCP is already running and the command
CMD_START_DHCP is ignored. Calling handleNetworkDisconnect() when exiting
L2ConnectedState fixes this problem, plus it handles disconnection correctly.

Bug: 10900241
Change-Id: Id29e4989b29db7e64719940cf93eba1f1a90912a
2013-10-08 18:16:03 -07:00
Robert Greenwalt
3378384123 am 72566b98: am 1c6fdd6c: am cac2fd30: Merge "Revert "Use a build-specific wifi country code"" into klp-dev
* commit '72566b98dba80f21923cb6b299754d510951d611':
  Revert "Use a build-specific wifi country code"
2013-10-04 13:36:49 -07:00
Robert Greenwalt
16f3c140cb am 1db7024c: am 2e23484e: am f3f1a370: Merge "Un-deprecate getDhcpInfo" into klp-dev
* commit '1db7024c50abe49d8881d458b3317ccff3de1832':
  Un-deprecate getDhcpInfo
2013-10-04 13:36:38 -07:00
Robert Greenwalt
cac2fd302e Merge "Revert "Use a build-specific wifi country code"" into klp-dev 2013-10-04 18:33:51 +00:00
Vinit Deshapnde
1e9863f06a am 90a5192c: am e72aa641: am 3eb6e4b4: Merge "Fix EAP-TLS reconnect after reboot issue" into klp-dev
* commit '90a5192cd4af89a1b363ca25be2a63d0e57010d4':
  Fix EAP-TLS reconnect after reboot issue
2013-10-04 11:08:06 -07:00
Robert Greenwalt
cb2fe96f2c Un-deprecate getDhcpInfo
Replacement api isn't available.

bug:10003785
Change-Id: Ibe981ae90e1c6c2f1b65fa225443ae4cc92c2a3a
2013-10-04 09:53:39 -07:00
Vinit Deshapnde
3eb6e4b4e4 Merge "Fix EAP-TLS reconnect after reboot issue" into klp-dev 2013-10-03 21:19:52 +00:00
Robert Greenwalt
3ea0c99b67 Revert "Use a build-specific wifi country code"
This reverts commit c33cd23c17c24df33550a6662cedfe60b323604a.

bug:11064682
Change-Id: I35825a7005e75f3abf02f23f31dee1cb7b101c31
2013-10-03 21:15:54 +00:00
Vinit Deshapnde
a3038b2b31 Fix EAP-TLS reconnect after reboot issue
After a reboot, KeyStore is locked, and certificates encrypted with user
PIN are not accessible. So statemachines are not able to connect to
EAP-TLS networks. This change makes the problem less severe by

1. Not signing certificates with user PIN on devices with hardware backed
KeyStore.
2. Issuing a reconnect upon first USER_PRESENT event.

This means HH (which has a hardware backed keystore) can connect to
EAP-TLS networks without requiring user intervention and other devices
will automatically connect to those networks after user punches PIN.

Bug: 10325089

Change-Id: I023d60e58d8214152f051bd9ec84b85b702d829a
2013-10-02 17:26:05 -07:00
Robert Greenwalt
d29724c640 am 2b6b3d9c: am bad5d694: Merge "Use a build-specific wifi country code" into klp-dev
* commit '2b6b3d9c495d3c8332aad6515a1db06e8fde3848':
  Use a build-specific wifi country code
2013-10-01 18:50:20 -07:00
Robert Greenwalt
c33cd23c17 Use a build-specific wifi country code
This ignores any previous setting and instead uses
a value set at build time.  This does not preclude
us from using some other signal to determine country
for wifi channel limits.

bug:10513734
Change-Id: Ib82c07285af70fbd82eb0466b7391979ebc8be10
2013-09-29 15:45:47 -07:00
Vinit Deshapnde
6add2a8337 am 3d837d23: am e7d6bbd6: Merge "Fix an incorrectly created race accessing Wifi Supplicant" into klp-dev
* commit '3d837d23c5910123330fbe6d18256ecc56ac7fcb':
  Fix an incorrectly created race accessing Wifi Supplicant
2013-09-25 14:16:19 -07:00
Vinit Deshapnde
6029611e3a Fix an incorrectly created race accessing Wifi Supplicant
ScanModeState is trying to undo whatever it did in its enter(), in its
exit() function. But doing that is incorrect because it is possible to
transition to multiple states that require different conditions.

In this bug, the state machine transitioned from ScanModeState to
WaitForP2pDisabled state; in response to Stop Supplicant command. Well,
when we are trying to stop supplicant, there is clearly no need to
enable P2P or load all networks. But since this code exists in exit(),
it is executed nonetheless, causing race conditions accessing the
wpa_supplicant (WifiStateMachine is trying to shut it down, but
P2pStateMachine is trying to bring up the p2p interfaces).

We solve that problem by moving this code to the place where we transition
to DisconnectedState - since that's the state that needs this as a
precondition.

Bug: 10761752
Change-Id: Iaf0ffd8056de8533b5d2bfdf8c440fbb7e406dac
2013-09-24 17:38:09 -07:00
Vinit Deshapnde
ad93dc7f5c am 10914a23: am 662c326e: Merge "Allow yet another combination of key management options" into klp-dev
* commit '10914a23f71b42a2b9d08a0199689d84117d5e0c':
  Allow yet another combination of key management options
2013-09-24 10:22:18 -07:00
Vinit Deshapnde
662c326e5f Merge "Allow yet another combination of key management options" into klp-dev 2013-09-23 17:46:00 +00:00
Robert Greenwalt
7dadd1ed2f am 1e690b69: am 0983eadf: Merge "Fix BatchScan request coalesing" into klp-dev
* commit '1e690b693c2d4ee7ba04d5882f6b5889ada07e0a':
  Fix BatchScan request coalesing
2013-09-22 09:03:20 -07:00
Robert Greenwalt
0983eadff2 Merge "Fix BatchScan request coalesing" into klp-dev 2013-09-22 15:59:01 +00:00
Robert Greenwalt
13820af302 Fix BatchScan request coalesing
bug:10407896
Change-Id: Ic22c7d8b2a80d490d208570782a12e42d4690f5c
2013-09-20 15:30:17 -07:00
Vinit Deshapnde
2871588101 Allow yet another combination of key management options
Framework sets allowedKeyManagement to WPA_EAP + WPA_PSK, if
WifiConfiguration didn't supply any value for it. It should probably
change to NONE; but that is post K thing. I am allowing that
combination for now.

Bug: 10843500
Change-Id: Id0c28f4aaf32c6a7e7dca07114a2452ce194a798
2013-09-20 15:21:33 -07:00
David Christie
2875fb8586 am 0e500803: am f31a7897: Merge "Clear names from externally supplied WorkSources to WifiManager (b/10733757)" into klp-dev
* commit '0e50080395d2ed9e3c703f769ea3fb84706f989a':
  Clear names from externally supplied WorkSources to WifiManager (b/10733757)
2013-09-20 13:13:54 -07:00
David Christie
f31a789774 Merge "Clear names from externally supplied WorkSources to WifiManager (b/10733757)" into klp-dev 2013-09-20 20:04:04 +00:00
Vinit Deshapnde
ce34f22b69 am 27271f67: am a5fb1204: Merge "Fix incorrect exception being thrown from WifiConfiguration" into klp-dev
* commit '27271f673546faa973d7a24c594da626ebdbd337':
  Fix incorrect exception being thrown from WifiConfiguration
2013-09-20 12:34:58 -07:00
Vinit Deshapnde
a5fb120438 Merge "Fix incorrect exception being thrown from WifiConfiguration" into klp-dev 2013-09-20 19:30:26 +00:00
David Christie
a31510e47a Clear names from externally supplied WorkSources to WifiManager (b/10733757)
Change-Id: I36102f13962df2093c1e35fb40081ead647eff32
2013-09-20 11:41:41 -07:00
Robert Greenwalt
12f6510170 am 032de6c6: am c237c204: Merge "Supsend/resume batched scans around dhcp." into klp-dev
* commit '032de6c6294893045c0c17946b45800b5af47d60':
  Supsend/resume batched scans around dhcp.
2013-09-20 11:22:40 -07:00
Robert Greenwalt
692af53a20 am eccc0905: am 540784f9: Merge "Cleanup the shutdown of BatchedScans." into klp-dev
* commit 'eccc0905bd150a334a98efedfb08570bcdd1c31a':
  Cleanup the shutdown of BatchedScans.
2013-09-20 11:22:35 -07:00
Robert Greenwalt
c237c20441 Merge "Supsend/resume batched scans around dhcp." into klp-dev 2013-09-20 17:55:44 +00:00
Robert Greenwalt
540784f903 Merge "Cleanup the shutdown of BatchedScans." into klp-dev 2013-09-20 17:43:30 +00:00
Robert Greenwalt
81fec6be04 Supsend/resume batched scans around dhcp.
Scanning while dhcp is running breaks dhcp, so stop the batched scans
when we need dhcp and start it up again after.

bug:10691401
Change-Id: Ifdeb6f35cfe4509b90fed1e1e694d0c107f24a7e
2013-09-20 10:13:46 -07:00
Vinit Deshapnde
0fd3b1be14 Fix incorrect exception being thrown from WifiConfiguration
Bug: 10817189

Change-Id: Ib2985f50080cb9d983a6de6ce668223e8782c3b6
2013-09-20 10:12:30 -07:00
Yuhao Zheng
5380b780bb am 2e9a4265: am 2ce33623: Merge "Remove STOPSHIP in WifiWatchdogStateMachine" into klp-dev
* commit '2e9a426529c54774b23609bee8d50118118ab895':
  Remove STOPSHIP in WifiWatchdogStateMachine
2013-09-20 09:58:45 -07:00
Robert Greenwalt
82f4218c0d Cleanup the shutdown of BatchedScans.
Fixes binder-death as well as disambiguation when an app has multiple requests in.

bug:10641931
Change-Id: Ib701d531fa51e7e2a027848cfdfcad3b47056923
2013-09-20 16:32:47 +00:00
Yuhao Zheng
fffc5a4ec9 Remove STOPSHIP in WifiWatchdogStateMachine
There used to be some STOPSHIP code in WifiWatchdogStateMachine for debug
purposes. We don't need them for the release.

Bug: 10841961
Change-Id: I501d62e9891ace52317e6c1d399b877175099a3c
2013-09-19 14:02:58 -07:00
Vinit Deshapnde
d1fa1bb690 am 007c6c7d: am c06b1db2: Merge "Consider current EAP TLS configurations as \'valid\'" into klp-dev
* commit '007c6c7d358fc617252da40c9ff214f55312c6f8':
  Consider current EAP TLS configurations as 'valid'
2013-09-16 16:58:46 -07:00
Vinit Deshapnde
3b25f51609 Consider current EAP TLS configurations as 'valid'
Multiple authentication methods are currently considered invalid; but
WPA_EAP and IEEE8021X are set simultaneously. This means we need to
fix code to consider them a valid combination.

Bug: 10325089

Change-Id: I2b4f4d75f21df78bfca66a930e85214c0cd6922e
2013-09-16 15:09:21 -07:00
Robert Greenwalt
cc7360c354 am 3d52eb7f: am 14e55996: Merge "Fix Batched Scan Results to give Timestamp in uS" into klp-dev
* commit '3d52eb7f1dde460d547fc20ec0b93465d69ec496':
  Fix Batched Scan Results to give Timestamp in uS
2013-09-12 21:42:18 -07:00
Stephen Hines
93a7473092 am 7d400ead: am 9d5c33c5: Merge "Fix build break with missing VDBG." into klp-dev
* commit '7d400eadb7340c139f35263f43fe3418d402f409':
  Fix build break with missing VDBG.
2013-09-12 21:42:12 -07:00
Robert Greenwalt
14e5599672 Merge "Fix Batched Scan Results to give Timestamp in uS" into klp-dev 2013-09-13 00:04:30 +00:00
Vinit Deshapnde
bd9daeaac7 am 4d1cef6b: am 96ece970: Merge "Disable additional logging in WifiConfigStore/WifiNative" into klp-dev
* commit '4d1cef6b3fec5ad4da0c99d57b1c4e768a2f1efa':
  Disable additional logging in WifiConfigStore/WifiNative
2013-09-12 16:45:25 -07:00
Vinit Deshapnde
8f8c563e6f am b2c06ba5: am b481dae2: Merge "Fix invalid Wifi Network system crash" into klp-dev
* commit 'b2c06ba5711ffa3781b9bfe1c11051cc274be9e3':
  Fix invalid Wifi Network system crash
2013-09-12 16:44:41 -07:00
Stephen Hines
cbaf152588 Fix build break with missing VDBG.
Change-Id: Iaf64cf49300a6a0a91374efa3030d6894367c9b8
2013-09-12 16:16:00 -07:00
Vinit Deshapnde
3569fdd9af Disable additional logging in WifiConfigStore/WifiNative
It was introduced to debug the disappearing APs; now that we think that
we've got to the bottom of it, it is being disabled by default. Set VDBG
to true to get it back.

Bug: 10568538

Change-Id: I226cacf48cccba9671f09164bbb50380adc6b322
2013-09-12 14:53:46 -07:00
Robert Greenwalt
dee971b98c Fix Batched Scan Results to give Timestamp in uS
ScanResult should have timestamp in uS but we are getting age in ms
from the wifi driver - multiply to have the same units though not
the implied precision.

bug: 10410465
Change-Id: Idf5c5996d69a4793dae3d74edb790d40b9bd3298
2013-09-12 14:23:51 -07:00
Vinit Deshapnde
b481dae2f5 Merge "Fix invalid Wifi Network system crash" into klp-dev 2013-09-12 20:28:57 +00:00