OSDN Git Service

Restart wificond on ENODEV scan failure
authorNingyuan Wang <nywang@google.com>
Thu, 15 Jun 2017 18:25:47 +0000 (11:25 -0700)
committerNingyuan Wang <nywang@google.com>
Thu, 22 Jun 2017 23:43:15 +0000 (16:43 -0700)
commit793978cb7f2f227f1ab28135caeb75dd4ed48e6c
treee141927fc6aacac9310c880fa07a2f3458ee4ac4
parentb8ad0fd50846e1cb8e0cc7419b64a7ffd00e27b7
Restart wificond on ENODEV scan failure

ENODEV scan failure implies that driver entered a bad state.
In order to recover wificond, we should treat it as an fatal
error. The crashing of wificond will trigger the restarting
of framework, bringing everything back to work.

Bug: 36894921
Test: compile, unit tests
Test: manual test:
Use "iw wlan0 del" to remove kernel interface.
Observe that wificond restarts and wifi continues to work.

Change-Id: I89f4403bcb570d7f413fa4cc9ca50378de428d3d
scanning/scan_utils.cpp
scanning/scan_utils.h
scanning/scanner_impl.cpp
tests/mock_scan_utils.h
tests/scan_utils_unittest.cpp