History log of /frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c343b5ceff3a1153db772a4c0ffb24c6870c3db0 06-May-2017 mukesh agrawal <quiche@google.com> WifiDiagnostics: disable ring-buffers on |user| builds

We've seen ring-buffer events cause a number of problems
due to overload or deadlock. While the ring-buffers events
aren't necessarily the root cause of these problems, the
ring-buffer events _are_ a significant factor.

Mitigate risk for end-users, by disabling ring-buffers
on |user| builds.

Bug: 37756562
Test: tests/wifitests/runtests.sh
Test: manual test (see below)

Manual test: (on bullhead)
1. install |user| build
2. connect to GoogleGuest
3. adb shell pgrep system_server
4. adb shell dumpsys wifi | grep "ring-buffer ="
-> expect no matching lines
5. adb shell pgrep system_server
6. PIDs from steps 3 and 5 should match
7. install |userdebug| build
8. connect to GoogleGuest
9. adb shell pgrep system_server
10. adb shell dumpsys wifi | grep "ring-buffer ="
-> expect at least one match
11. adb shell pgrep system_server
12. PIDs from steps 9 and 11 should match

Change-Id: Ib7cf1f9e9442ed3c3191d2b20b0812afbbf62930
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
b8b3fb8228a1f90106bad8c59ce006b81ef7921c 09-Mar-2017 Roshan Pius <rpius@google.com> Remove all legacy HAL usage from framework

WifiNative now just becomes a module to route calls into the appropriate
native module: WifiVendorHal, WificondControl, SupplicantStaIfaceHal,
SupplicantP2pIfaceHal.

Changes in the CL:
1. Cleanup WifiNative to remove the legacy HAL usage.
2. Remove the |HIDL*| flags in WifiNative.
3. Remove static instance of WifiNative/WifiMonitor.
4. Remove WifiMonitor code parsing the string events from
wpa_supplicant.
5. Remove all unused jni code used for legacy HAL interactions.
6. Remove dependency of libwifi-hal & libwifi-system from framework.

Notes:
a) We can now potentially split up WifiNative into separate chunks:
WifiStaNative, WifiP2pNative, WifiRttNative, etc instead of having a
monolithic WifiNative instance.
b) We may have to add back the local log in WifiNative (b/36059665).

Bug: 35702893
Bug: 34457880
Bug: 34884202
Bug: 35421721
Test: Compiles, existing unit tests pass.
Test: Device boots up and connects to wifi networks.
Test: Verified with wifi regression (b/36068282)

Change-Id: I3e13522c912242af8023471e029edb1ce47fd3e9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
3bbf564af91515b33fcba33e7039ffe09c8c025c 17-Feb-2017 mukesh agrawal <quiche@google.com> WifiDiagnosticsTest: stub out call to logcat

WifiDiagnostics.captureBugReport() forks an external
process (logcat), to read data from logd. At present,
that external process is _not_ stubbed out for testing.

As a consequence, the time to run WifiDiagnosticsTest
depends on how busy logd happens to be. This causes
problems when, e.g., running a ToT build where other
subsystems are crashy.

Resolve this problem, by stubbing out the external
process for unit tests.

Along the way: update WifiInjector, so that it hosts
an instance of java.lang.Runtime.

Bug: 34971969
Test: runtests.sh
Test: manual

Manual test:
- install a build that's suffering from b/35400537
- run wifi unit tests 5 times
- verify that no run takes longer than 35 seconds

Change-Id: Icf2c36acc04713c5ead44b47a42fa9e80cf0a1fd
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
3f2187fdcc3ed55c909cb4cdee589744655d3243 01-Feb-2017 mukesh agrawal <quiche@google.com> last mile: add timeout support (1/2)

As preparation for adding timeout support, update
the reportConnectionEvent() methods to take a
|connectionId| parameter.

This new parameter will be used to ensure that
LastMileLogger ignores spurious timeouts.

The actual timeout logic, as well as real values
for the new parameter, will be added in the next
CL.

Bug: 34691329
Test: wifitests/runtests.sh
Change-Id: I849169e36ca1798ebd1c5fe57d14515f374a0d71
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
d3ab97d3cf26342610204b6492f082d62d3e51e3 07-Jan-2017 mukesh agrawal <quiche@google.com> WifiDiagnostics: propagate events to LastMileLogger

In order for LastMileLogger to actually be useful,
LML needs to receive notifications about connection
events.

Update WifiDiagnostics, to propagate events from
WifiStateMachine, to LastMileLogger.

While there: make the |mLog| field final. (I
probably should have made that field final in the
first place.)

Bug: 34362951
Test: tests/wifitests/runtests.sh and manual
Manual testing:
- boot with new code
- connect to GoogleGuest
$ adb shell dumpsys > >(egrep 'rdev_connect') 2>/dev/null
<...>-5220 [004] ...1 83.714720: rdev_connect: phy0, netdev:wlan0(5), bssid: 6c:f3:7f:ae:8b:f1, ssid: GoogleGuest, auth type: 0, privacy: false, wpa versions: 0, flags: 0

Change-Id: If1c6b50f866d892c4a95ac94398bfe0680e5a51a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
cf99aa8a53e95f220fa0b627e712b4a4d87b6017 07-Jan-2017 mukesh agrawal <quiche@google.com> BaseWifiDiagnostics: generalize reportConnectionFailure()

Rename reportConnectionFailure() to reportConnectionEvent(),
and add an argument to the renamed method. Follow-on CLs will
use the new argument to report additional events.

Bug: 34179456
Test: tests/wifitests/runtests.sh (on angler)
Change-Id: Ifc62dcaa576f4d9355509922dfdc2c3aa0f330fd
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
f5d90be206db98bbd5894afc8d757dd32360b2d9 05-Aug-2016 mukesh agrawal <quiche@google.com> logging: add convenience APIs for literal messages

Literal messages are reasonably common, so we should make
them easy to log. Add APIs for that purpose, and migrate
WifiDiagnostics to use them.

Note that, functionally speaking, the LogcatLog implementations
of these APIs behave the same their corresponding legacy APIs.

However, we add these APIs for two reasons:
- To track which log messages have been audited, to determine
whether or not they contain parameters.
- So that the WifiLog implementation for the new backend can
inform the backend that these messages are clean (free of
any sensitive data).

Finally, we note that these convenience APIs may also provide
a performance benefit. (Because the message is parameter-less,
there's no need to create a LogMessage.)

While there: change the level of some WifiDiagnostics log
messages, to fit our new logging guidelines.

BUG=30737889
TEST=wifitests/runtests.sh

Change-Id: I3d39c1932800af6a818c59b6497c868f8399f8fa
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
f46c533931224296b11d98798344c049f88db9a1 06-Aug-2016 mukesh agrawal <quiche@google.com> WifiDiagnostics: migrate to chained logging API

Migrate parameterized log messages in WifiDiagnostics
to the new chained logging API.

Along the way: add DummyLogMessage and FakeLog, to
facilitate testing. (Alternatively, we could bake their
behavior into WifiDiagnosticsTest. But it seems likely
that other tests will want the same behavior.)

While there:
- fix ordering of imports (WifiDiagnostics, WifiDiagnosticsTest)
- remove unused imports (WifiDiagnostics)
- change the level of some WifiDiagnostics log message, to
fit our new guidelines

BUG=30736898
TEST=wifitests/runtests.sh

Change-Id: If60282adf40d58e80cdaa0d7e1e7008c490d545b
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
11064a5b4949a8e5bc275d1cd27c1971fadf1278 03-Aug-2016 mukesh agrawal <quiche@google.com> WifiDiagnostics: remove getAllRingBufferData()

This method is unused. Remove it.

BUG=27173141
TEST=wifitests/runtest.sh

Change-Id: I09a7f6f5eb9fcd60c9bd1841f7e7f2a1a2a0d5fa
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
5b06b91ac414e5c756e0974063f87e23cce8d68c 03-Aug-2016 mukesh agrawal <quiche@google.com> WifiDiagnostics: fix overly long line

Forgot to check the line length after the
search-and-replace. Fix that. :-)

BUG=30630020
TEST=wifitests/runtests.sh

Change-Id: Icbf8d8324e260727d0968b9be08df87acf1b7adc
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
63fad8b4722c94ce9107690b647cdbe7e8a1c4f9 29-Jul-2016 mukesh agrawal <quiche@google.com> WifiDiagnostics: test a log call

Use WifiDiagnosticss to add an example of how to
test logging calls.

And to facilitate this: add a makeLog() method
to WifiInjector.

BUG=30566702
TEST=wifitests/runtests.sh

Change-Id: I46ebd8e79c90bce4bb75c077a6e6cc2b0aa9d3ee
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
235d4d28542d8007c9609a84af0ac7b4c4bba02a 29-Jul-2016 mukesh agrawal <quiche@google.com> WifiDiagnostics: move to WifiLog API

As part of the log improvement effort, make
WifiDiagnostics the first user of the new WifiLog
API.

In this first step, the new API provides one
small benefit: eliminating the need to pass a
tag in to every log call.

More significant benefits will follow.

BUG=30564894
TEST=wifitests/runtests.sh

Change-Id: I9e32eff07c57bcdd30da2aa7295a59ddd96b6e2d
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java
019fda2109ea79daee3fb4442080b1b83be2e7b3 28-Jul-2016 mukesh agrawal <quiche@google.com> WifiLogger: rename to WifiDiagnostics

WifiLogger is a bit of a misnomer, as the module is
really about gathering diagnostics generally, and
not just logs in the strict sense.

Moreover, using "log" in the name might lead to
confusion with the logging code we're going to
add to the wifi service.

Rename WifiLogger, to minimize confusion.

BUG=30566052
TEST=wifitests/runtest.sh

Change-Id: I2c2e0a1c250e48f4ffcbf14b59b30ae0e3c6a68e
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDiagnostics.java