diff options
author | Ahmad Rahmati <rahmati@google.com> | 2021-07-20 16:38:33 -0700 |
---|---|---|
committer | Ahmad Rahmati <rahmati@google.com> | 2021-07-20 16:38:33 -0700 |
commit | 1d37494cb2b921db70963b253298f25f0c6e5a8c (patch) | |
tree | 2cceb439c06e8e7c8d76a234871de4e63c3512d0 | |
parent | 4aa78e1b462265d5762b361dfca3876e37634611 (diff) | |
download | chre-1d37494cb2b921db70963b253298f25f0c6e5a8c.tar.gz |
Demote CHPP WiFi Scan Monitoring State Recovery Failure Assert
Demote the failure assert for the WiFi scan monitoring state recovery
from prod to debug.
Bug: 194213198
Test: atest --host chre_chpp_linux_tests -c, load on device, CHQTS
Change-Id: I4c6f35538c9f5135fd941e72c7ade07995c33166
-rw-r--r-- | chpp/clients/wifi.c | 4 | ||||
-rw-r--r-- | chpp/include/chpp/macros.h | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/chpp/clients/wifi.c b/chpp/clients/wifi.c index c7d5ed2c..5ea79406 100644 --- a/chpp/clients/wifi.c +++ b/chpp/clients/wifi.c @@ -365,8 +365,8 @@ static void chppWiFiRecoverScanMonitor( if (!chppWifiClientConfigureScanMonitor(true)) { clientContext->scanMonitorSilenceCallback = false; - CHPP_ASSERT_LOG(false, - "Unable to re-enable WiFi scan monitoring after reset"); + CHPP_DEBUG_ASSERT_LOG( + false, "Unable to re-enable WiFi scan monitoring after reset"); } } } diff --git a/chpp/include/chpp/macros.h b/chpp/include/chpp/macros.h index c5bd2d01..b2948130 100644 --- a/chpp/include/chpp/macros.h +++ b/chpp/include/chpp/macros.h @@ -76,6 +76,16 @@ extern "C" { #endif // CHPP_DEBUG_ASSERT_ENABLED #endif // CHPP_DEBUG_ASSERT +#ifndef CHPP_DEBUG_ASSERT_LOG +#define CHPP_DEBUG_ASSERT_LOG(var, fmt, ...) \ + do { \ + if (!(var)) { \ + CHPP_LOGE(fmt, ##__VA_ARGS__); \ + CHPP_DEBUG_ASSERT(false); \ + } \ + } while (0) +#endif + #ifndef PRIu64 // Pre-C99 lacks PRIu64 support. Note that the correct // definition on pre-C99 systems would be compiler-dependent. #define PRIu64 "llu" |