diff options
| author | Poddar, Siddarth <siddpodd@codeaurora.org> | 2017-12-19 14:27:55 +0530 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-12-20 00:35:02 -0800 |
| commit | 928fa18686c0cd372f18741fd49496de07a6ff4b (patch) | |
| tree | bcd6adcbfacc86d01766e923ec1e713cacf75727 | |
| parent | 4757ad14b8a59f1d289d605bd638e1735b11e5cb (diff) | |
qcacld-3.0: Enable pktlog after SSR/PDR if previously enabled
Implement a flag in hdd context to track the state of
pktlog events. Pktlog will be enabled/disabled after SSR/PDR,
depending upon the state of Pktlog events just before SSR/PDR
is triggered.
Change-Id: I18999d7fcf3677a86c21559d7d443ba1cd086528
CRs-Fixed: 2151296
| -rw-r--r-- | core/hdd/inc/wlan_hdd_main.h | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 7df2e6013e57..6bde7308bb87 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1777,6 +1777,8 @@ struct hdd_context_s { bool hdd_wlan_suspended; bool suspended; + /* flag to start pktlog after SSR/PDR if previously enabled */ + bool is_pktlog_enabled; /* Lock to avoid race condition during start/stop bss */ struct mutex sap_lock; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 3608c9b8a364..7b2f4681a34f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9144,6 +9144,11 @@ int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable, return -EINVAL; } + if (enable == true) + hdd_ctx->is_pktlog_enabled = 1; + else + hdd_ctx->is_pktlog_enabled = 0; + return 0; } #endif /* REMOVE_PKT_LOG */ @@ -9910,7 +9915,15 @@ static int hdd_features_init(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter) goto deregister_frames; } - if (cds_is_packet_log_enabled()) + /** + * In case of SSR/PDR, if pktlog was enabled manually before + * SSR/PDR, Then enabled it again automatically after Wlan + * device up. + */ + if (cds_is_driver_recovering()) { + if (hdd_ctx->is_pktlog_enabled) + hdd_pktlog_enable_disable(hdd_ctx, true, 0, 0); + } else if (cds_is_packet_log_enabled()) hdd_pktlog_enable_disable(hdd_ctx, true, 0, 0); hddtxlimit.txPower2g = hdd_ctx->config->TxPower2g; |
