Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4219805 authored by Abdul Muqtadeer Ahmed's avatar Abdul Muqtadeer Ahmed Committed by snandini
Browse files

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
parent 5279c143
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
+4 −0
Original line number Diff line number Diff line
@@ -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);
+4 −0
Original line number Diff line number Diff line
@@ -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;
	}
+2 −2
Original line number Diff line number Diff line
/*
 * 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
+7 −2
Original line number Diff line number Diff line
@@ -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,
Loading