Commit Graph

626 Commits

Author SHA1 Message Date
Lorenzo Colitti
272be52cb7 Clear all Ethernet state when our interface goes away.
Previously we did not stop DHCP or try to force a disconnect.
This made it impossible to reconnect by unplugging and
replugging an USB Ethernet adapter.

Bug: 17736828
Change-Id: Idd8576a96b063b5ca726ee9149800bdcb0f62bd1
2014-10-01 13:52:40 +09:00
Robert Greenwalt
f989264b68 am cf0f619a: Don\'t accept score below 0.
* commit 'cf0f619a5080670415693ca772e079a494aaf7f7':
  Don't accept score below 0.
2014-09-11 14:16:56 +00:00
Robert Greenwalt
cf0f619a50 Don't accept score below 0.
Network Factories are allowed to go below, but networks need to be
constrained.  Allowing the network to go below 0 meant that -1 could
sometimes leak through and foul the logic.

bug:17361330
Change-Id: Ife34ca0f9c233dd3c3df80f6fea580af43afcdeb
2014-09-10 10:06:32 -07:00
Robert Greenwalt
778f4ba51d am eee07beb: Use config resource for tcp buffer size
* commit 'eee07beb9239175a5a428701013b87ffb88b7d96':
  Use config resource for tcp buffer size
2014-08-22 22:45:54 +00:00
Robert Greenwalt
eee07beb92 Use config resource for tcp buffer size
bug:16549611
Change-Id: I48426f6b746e4bd9729bdd529d81b163ff5112a9
2014-08-21 16:28:18 -07:00
Lorenzo Colitti
7cc6ee1d27 am 1affc58c: Actually provide useful output in Ethernet service dump.
* commit '1affc58cb6aeda4c566a530b17d47eca1bf68ff7':
  Actually provide useful output in Ethernet service dump.
2014-08-20 16:31:18 +00:00
Lorenzo Colitti
1affc58cb6 Actually provide useful output in Ethernet service dump.
Bug: 17133859
Change-Id: Ic8424004e48712e4dd906d5bb6a48ce7d38ff9d8
2014-08-19 20:03:35 -07:00
Lorenzo Colitti
171f267a04 am c0cfe2ee: Stop using LinkProperties for static configuration.
* commit 'c0cfe2ee04622e16e4623ffe1612e5afbbaf41ae':
  Stop using LinkProperties for static configuration.
2014-08-19 19:44:57 +00:00
Lorenzo Colitti
c0cfe2ee04 Stop using LinkProperties for static configuration.
Also make static IP configuration more robust (e.g., tear down
our NetworkAgent when we switch between static and DHCP).

Bug: 16114392
Bug: 16893413
Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
2014-08-19 11:57:35 -07:00
Robert Greenwalt
4bf8d13fe5 am 84502f53: Add tcp buffer size data for ethernet
* commit '84502f530060beb56334a9455f95d1b6172b1f5f':
  Add tcp buffer size data for ethernet
2014-08-17 23:22:22 +00:00
Robert Greenwalt
84502f5300 Add tcp buffer size data for ethernet
bug: 16549611
Change-Id: I61d29bb88b9e58c50e03c39570f3ebb7712e4f37
2014-08-15 15:10:05 -07:00
Robert Greenwalt
8590410713 am 62e8e4d3: (-s ours) DO NOT MERGE Don\'t tear down based on NetworkFactory input.
* commit '62e8e4d3d5c345ec0a239eb8985e042176c35743':
  DO NOT MERGE Don't tear down based on NetworkFactory input.
2014-07-22 17:53:19 +00:00
Robert Greenwalt
62e8e4d3d5 DO NOT MERGE Don't tear down based on NetworkFactory input.
NetworkFactory only indicates if we're interested in new connections.  It
shouldn't be used to tear down existing connections (they have unwanted callbacks
for that).

Supports linger properly as well as dealing with tie scores.

bug:15612739
Change-Id: Ib3dfe673d3645b9dc4756c176958409a64ec32e4
(cherry picked from commit 8b07ee36a2)
2014-07-22 17:38:42 +00:00
Robert Greenwalt
8b07ee36a2 Don't tear down based on NetworkFactory input.
NetworkFactory only indicates if we're interested in new connections.  It
shouldn't be used to tear down existing connections (they have unwanted callbacks
for that).

Supports linger properly as well as dealing with tie scores.

bug:15612739
Change-Id: Ib3dfe673d3645b9dc4756c176958409a64ec32e4
2014-06-23 16:04:06 -07:00
Robert Greenwalt
579d5d8aeb am 694a835e: Make NetworkCapabilities publicly immutable.
* commit '694a835e89081d7a1c55e635d6a60d51abab63f9':
  Make NetworkCapabilities publicly immutable.
2014-06-12 18:49:10 +00:00
Robert Greenwalt
694a835e89 Make NetworkCapabilities publicly immutable.
Applying API council comments.

bug: 15142362
Change-Id: Ie0bde68b72656a676d90c0343b9756fe9268d8d6
2014-06-11 18:36:52 +00:00
Robert Greenwalt
949df04435 am 521b2bd4: Fix ethernet.
* commit '521b2bd4839f7dba43b8f705da5863d64b534311':
  Fix ethernet.
2014-06-06 16:28:10 +00:00
Robert Greenwalt
2b22d60614 am 301c18a0: Apply refactored NetworkFactory.
* commit '301c18a01dc3bc9f0d1e8c3e716ddf1921a0d343':
  Apply refactored NetworkFactory.
2014-06-04 21:32:35 +00:00
Robert Greenwalt
521b2bd483 Fix ethernet.
It was attempting to update the NetworkAgent before the NetworkAgent
was created, causing NullPointerExceptions.

bug:15407938
Change-Id: Ie36b906df4b12f095a16d1b30c847a55b074d60c
2014-06-04 11:52:08 -07:00
Robert Greenwalt
301c18a01d Apply refactored NetworkFactory.
Make NetworkFactory a concrete class and divide responsibilites between it and NetworkAgent.
Factory will track requests and by default give a single connect/disconnect api for ease
of use.  Then NetworkAgent is created and destroyed as needed with very simple logic.

Change-Id: I401c14a6e5466f2fc63b04219b97ff85bb9af291
(cherry picked from commit 8af038d056)
2014-06-03 01:22:54 +00:00
Robert Greenwalt
8af038d056 Apply refactored NetworkFactory.
Make NetworkFactory a concrete class and divide responsibilites between it and NetworkAgent.
Factory will track requests and by default give a single connect/disconnect api for ease
of use.  Then NetworkAgent is created and destroyed as needed with very simple logic.

Change-Id: I401c14a6e5466f2fc63b04219b97ff85bb9af291
2014-06-02 16:05:45 -07:00
Lorenzo Colitti
f71e925b07 am 0ffeaf5c: (-s ours) DO NOT MERGE - Make Ethernet more reliable.
* commit '0ffeaf5c76b7ca4163cf3a7a33e3a36ef77e445e':
  DO NOT MERGE - Make Ethernet more reliable.
2014-05-28 21:44:57 +00:00
Lorenzo Colitti
0ffeaf5c76 DO NOT MERGE - Make Ethernet more reliable.
1. If DHCP fails, set the score to 0. Coupled with changes in
   NetworkAgent, that will cause us to retry DHCP the next time
   the link is plugged in.
2. Send LinkProperties before sending NetworkInfo, because of
   a race in NetworkAgent.
3. Make Ethernet work properly after a runtime restart.
4. Improve locking.
5. Clarify how things work in comments.

Bug: 15295359
Change-Id: I06cd683a1633838bca1ec177e61f1829889d3934
(cherry picked from commit 21be8b6dc7)
2014-05-28 09:29:21 +00:00
Lorenzo Colitti
21be8b6dc7 Make Ethernet more reliable.
1. If DHCP fails, set the score to 0. Coupled with changes in
   NetworkAgent, that will cause us to retry DHCP the next time
   the link is plugged in.
2. Send LinkProperties before sending NetworkInfo, because of
   a race in NetworkAgent.
3. Make Ethernet work properly after a runtime restart.
4. Improve locking.
5. Clarify how things work in comments.

Bug: 15295359
Change-Id: I06cd683a1633838bca1ec177e61f1829889d3934
2014-05-28 07:34:31 +00:00
Lorenzo Colitti
eb730a7ffc Initial EthernetService implementation.
Bug: 14981801
Bug: 14993642
Change-Id: If392ef7063e096854ef830f4fe3b038439a1d307
2014-05-21 19:53:04 -07:00
Alex Cheung
e7a7ef99f9 Initial empty repository 2014-05-20 10:32:34 -07:00