summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/inc/wlan_hdd_main.h2
-rw-r--r--core/hdd/src/wlan_hdd_main.c15
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;