diff options
| author | Sunil Ravi <sunilravi@google.com> | 2020-04-29 15:24:35 -0700 |
|---|---|---|
| committer | Sunil Ravi <sunilravi@google.com> | 2020-04-29 15:24:35 -0700 |
| commit | b651801ef40e7d4377ee820d6be780f0e26eeda5 (patch) | |
| tree | aef494df899719145b2faea78c434cf4074b35c7 /scanning/scanner_impl.cpp | |
| parent | 61084a9ad8e2ffcc0fcab6bf33066b85f5fe563a (diff) | |
| download | platform_system_connectivity_wificond-b651801ef40e7d4377ee820d6be780f0e26eeda5.tar.gz platform_system_connectivity_wificond-b651801ef40e7d4377ee820d6be780f0e26eeda5.tar.bz2 platform_system_connectivity_wificond-b651801ef40e7d4377ee820d6be780f0e26eeda5.zip | |
Change the threshold for scan failure fatal error count from 5 to 10
Some driver/firmware implementations have internal logic to restart the wifi
without informing the framework. This takes few seconds(10-20 seconds).
During this time, driver returns error for all the commands from upper
layer, including scan. So to avoid wifi recovery kicking in on consecutive
scan failure faster, increase the threshold for continuous scan failure
fatal error count(any scan failure return value other than EBUSY) from 5
to 10.
Bug: 154942984
Test: Manual - Forcefully crash the modem and check wificond is not
crashing.
Change-Id: Ic960bd637fdd8b4481ef8699480c96378561a9eb
Diffstat (limited to 'scanning/scanner_impl.cpp')
| -rw-r--r-- | scanning/scanner_impl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scanning/scanner_impl.cpp b/scanning/scanner_impl.cpp index d108369..ae63086 100644 --- a/scanning/scanner_impl.cpp +++ b/scanning/scanner_impl.cpp @@ -183,7 +183,7 @@ Status ScannerImpl::scan(const SingleScanSettings& scan_settings, fatal_error_counter_++; LOG(WARNING) << "Scan failed with fatal error. counter=" << fatal_error_counter_; } - CHECK(fatal_error_counter_ <= 5 && ebusy_error_counter_ <= 10) + CHECK(fatal_error_counter_ <= 10 && ebusy_error_counter_ <= 10) << "Driver is in a bad state, restarting wificond"; *out_success = false; return Status::ok(); @@ -300,7 +300,7 @@ bool ScannerImpl::StartPnoScanDefault(const PnoSettings& pno_settings) { LOG(WARNING) << "Scan failed with fatal error. counter=" << fatal_error_counter_; } LOG(ERROR) << "Failed to start pno scan"; - CHECK(fatal_error_counter_ <= 5 && ebusy_error_counter_ <= 10) + CHECK(fatal_error_counter_ <= 10 && ebusy_error_counter_ <= 10) << "Driver is in a bad state, restarting wificond"; return false; } |
