qcacld-3.0: Add new WMI wakeup reason

Add the new WMI wakeup reason “WOW_REASON_FATAL_EVENT_WAKE".

Change-Id: I93b530f78f568fa88cb310c5d78cd950451fc441
CRs-Fixed: 2868523
This commit is contained in:
Abdul Muqtadeer Ahmed 2021-02-02 12:04:51 +05:30 • committed by snandini
commit e4219805a9
6 changed files with 21 additions and 4 deletions

View file

@ -134,6 +134,7 @@ enum txrate_gi {
* @pno_match_wake_up_count: pno match wakeup count
* @oem_response_wake_up_count: oem response wakeup count
* @uc_drop_wake_up_count: local data uc drop wakeup count
* @fatal_event_wake_up_count: fatal event wakeup count
* @pwr_save_fail_detected: pwr save fail detected wakeup count
* @scan_11d 11d scan wakeup count
* @mgmt_assoc: association request management frame
@ -162,6 +163,7 @@ struct wake_lock_stats {
uint32_t pno_match_wake_up_count;
uint32_t oem_response_wake_up_count;
uint32_t uc_drop_wake_up_count;
uint32_t fatal_event_wake_up_count;
uint32_t pwr_save_fail_detected;
uint32_t scan_11d;
uint32_t mgmt_assoc;

View file

@ -552,6 +552,8 @@ static void vdev_iterator(struct wlan_objmgr_psoc *psoc, void *vdev, void *arg)
stats->oem_response_wake_up_count +=
vdev_stats->oem_response_wake_up_count;
stats->uc_drop_wake_up_count += vdev_stats->uc_drop_wake_up_count;
stats->fatal_event_wake_up_count +=
vdev_stats->fatal_event_wake_up_count;
stats->pwr_save_fail_detected += vdev_stats->pwr_save_fail_detected;
stats->scan_11d += vdev_stats->scan_11d;
}
@ -663,6 +665,7 @@ QDF_STATUS ucfg_mc_cp_stats_write_wow_stats(
"\tPNO Complete: %u\n"
"\tPNO Match: %u\n"
"\tUC Drop wake_count: %u\n"
"\twake count due to fatal event: %u\n"
"\tOEM rsp wake_count: %u\n"
"\twake count due to pwr_save_fail_detected: %u\n"
"\twake count due to 11d scan: %u\n",
@ -682,6 +685,7 @@ QDF_STATUS ucfg_mc_cp_stats_write_wow_stats(
wow_stats.pno_complete_wake_up_count,
wow_stats.pno_match_wake_up_count,
wow_stats.uc_drop_wake_up_count,
wow_stats.fatal_event_wake_up_count,
wow_stats.oem_response_wake_up_count,
wow_stats.pwr_save_fail_detected,
wow_stats.scan_11d);

View file

@ -1073,6 +1073,10 @@ static void target_if_cp_stats_inc_wake_lock_stats(uint32_t reason,
stats->uc_drop_wake_up_count++;
break;
case WOW_REASON_FATAL_EVENT_WAKE:
stats->fatal_event_wake_up_count++;
break;
default:
break;
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -442,7 +442,7 @@ enum wmamsgtype {
WMA_TWT_NUDGE_DIALOG_REQUEST = SIR_HAL_TWT_NUDGE_DIALOG_REQUEST,
};
#define WMA_DATA_STALL_TRIGGER 6
#define WMA_DATA_STALL_TRIGGER 0x1006
/* Bit 6 will be used to control BD rate for Management frames */
#define HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME 0x40

View file

@ -1486,6 +1486,8 @@ static const uint8_t *wma_wow_wake_reason_str(A_INT32 wake_reason)
return "VDEV_DISCONNECT";
case WOW_REASON_LOCAL_DATA_UC_DROP:
return "LOCAL_DATA_UC_DROP";
case WOW_REASON_FATAL_EVENT_WAKE:
return "FATAL_EVENT_WAKE";
case WOW_REASON_GENERIC_WAKE:
return "GENERIC_WAKE";
case WOW_REASON_TWT:
@ -1519,6 +1521,7 @@ static bool wma_wow_reason_has_stats(enum wake_reason_e reason)
case WOW_REASON_CHIP_POWER_FAILURE_DETECT:
case WOW_REASON_11D_SCAN:
case WOW_REASON_LOCAL_DATA_UC_DROP:
case WOW_REASON_FATAL_EVENT_WAKE:
return true;
#ifdef WLAN_FEATURE_MOTION_DETECTION
case WOW_REASON_WLAN_MD:
@ -1569,7 +1572,8 @@ static void wma_wow_stats_display(struct wake_lock_stats *stats)
wma_conditional_log(is_wakeup_event_console_logs_enabled,
"pno_match:%d pno_complete:%d gscan:%d low_rssi:%d"
" rssi_breach:%d oem:%d ucdrop:%d scan_11d:%d",
" rssi_breach:%d oem:%d ucdrop:%d scan_11d:%d"
" fatal_event:%d",
stats->pno_match_wake_up_count,
stats->pno_complete_wake_up_count,
stats->gscan_wake_up_count,
@ -1577,7 +1581,8 @@ static void wma_wow_stats_display(struct wake_lock_stats *stats)
stats->rssi_breach_wake_up_count,
stats->oem_response_wake_up_count,
stats->uc_drop_wake_up_count,
stats->scan_11d);
stats->scan_11d,
stats->fatal_event_wake_up_count);
}
static void wma_print_wow_stats(t_wma_handle *wma,

View file

@ -1829,6 +1829,7 @@ static void wma_state_info_dump(char **buf_ptr, uint16_t *size)
"\tipv6_mcast_na %u\n"
"\toem_response %u\n"
"\tuc_drop %u\n"
"\tfatal_event %u\n"
"dtimPeriod %d\n"
"chan_width %d\n"
"vdev_active %d\n"
@ -1855,6 +1856,7 @@ static void wma_state_info_dump(char **buf_ptr, uint16_t *size)
stats.ipv6_mcast_na_stats,
stats.oem_response_wake_up_count,
stats.uc_drop_wake_up_count,
stats.fatal_event_wake_up_count,
iface->dtimPeriod,
iface->chan_width,
iface->vdev_active,