From ceb9778bfc18bdb93300f0595cd11f51656c5668 Mon Sep 17 00:00:00 2001 From: Mohit Khanna Date: Wed, 5 Apr 2017 16:27:08 -0700 Subject: [PATCH] qcacld-3.0: Dump DPTRACE on cfg8011 disconnect Dump the last few (100) DPTRACE records when a cfg80211 disconnect is received from the userspace with reason code WLAN_REASON_DEAUTH_LEAVING. Change-Id: Ib370f8d8b71f20364e0da73a1aee5673c0fc4ca4 CRs-Fixed: 2029713 --- core/hdd/src/wlan_hdd_cfg80211.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 529680504c65..fb036f6088fb 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -203,6 +203,12 @@ #define MAX_TXPOWER_SCALE 4 #define CDS_MAX_FEATURE_SET 8 +/* + * Number of DPTRACE records to dump when a cfg80211 disconnect with reason + * WLAN_REASON_DEAUTH_LEAVING DEAUTH is received from user-space. + */ +#define WLAN_DEAUTH_DPTRACE_DUMP_COUNT 100 + static const u32 hdd_cipher_suites[] = { WLAN_CIPHER_SUITE_WEP40, WLAN_CIPHER_SUITE_WEP104, @@ -15762,6 +15768,9 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy, gEnableDeauthToDisassocMap ? eCSR_DISCONNECT_REASON_STA_HAS_LEFT : eCSR_DISCONNECT_REASON_DEAUTH; + qdf_dp_trace_dump_all( + WLAN_DEAUTH_DPTRACE_DUMP_COUNT, + QDF_TRACE_DEFAULT_PDEV_ID); break; case WLAN_REASON_DISASSOC_STA_HAS_LEFT: reasonCode = eCSR_DISCONNECT_REASON_STA_HAS_LEFT;