瀏覽代碼

qcacmn: Add management frame wake stats

Track and print WLAN wake stats for management frames received.

Change-Id: I2f2d49345d695561ab3f115e1ce30f284a1472bb
CRs-Fixed: 2236014
Dustin Brown 7 年之前
父節點
當前提交
ef742350c2
共有 2 個文件被更改,包括 59 次插入0 次删除
  1. 43 0
      target_if/cp_stats/src/target_if_mc_cp_stats.c
  2. 16 0
      umac/cp_stats/dispatcher/inc/wlan_cp_stats_mc_defs.h

+ 43 - 0
target_if/cp_stats/src/target_if_mc_cp_stats.c

@@ -250,34 +250,77 @@ static void target_if_cp_stats_inc_wake_lock_stats(uint32_t reason,
 	case WOW_REASON_UNSPECIFIED:
 		(*unspecified_wake_count)++;
 		break;
+
+	case WOW_REASON_ASSOC_REQ_RECV:
+		stats->mgmt_assoc++;
+		break;
+
+	case WOW_REASON_DISASSOC_RECVD:
+		stats->mgmt_disassoc++;
+		break;
+
+	case WOW_REASON_ASSOC_RES_RECV:
+		stats->mgmt_assoc_resp++;
+		break;
+
+	case WOW_REASON_REASSOC_REQ_RECV:
+		stats->mgmt_reassoc++;
+		break;
+
+	case WOW_REASON_REASSOC_RES_RECV:
+		stats->mgmt_reassoc_resp++;
+		break;
+
+	case WOW_REASON_AUTH_REQ_RECV:
+		stats->mgmt_auth++;
+		break;
+
+	case WOW_REASON_DEAUTH_RECVD:
+		stats->mgmt_deauth++;
+		break;
+
+	case WOW_REASON_ACTION_FRAME_RECV:
+		stats->mgmt_action++;
+		break;
+
 	case WOW_REASON_RA_MATCH:
 		stats->ipv6_mcast_wake_up_count++;
 		stats->ipv6_mcast_ra_stats++;
 		stats->icmpv6_count++;
 		break;
+
 	case WOW_REASON_NLOD:
 		stats->pno_match_wake_up_count++;
 		break;
+
 	case WOW_REASON_NLO_SCAN_COMPLETE:
 		stats->pno_complete_wake_up_count++;
 		break;
+
 	case WOW_REASON_LOW_RSSI:
 		stats->low_rssi_wake_up_count++;
 		break;
+
 	case WOW_REASON_EXTSCAN:
 		stats->gscan_wake_up_count++;
 		break;
+
 	case WOW_REASON_RSSI_BREACH_EVENT:
 		stats->rssi_breach_wake_up_count++;
 		break;
+
 	case WOW_REASON_OEM_RESPONSE_EVENT:
 		stats->oem_response_wake_up_count++;
+		break;
+
 	case WOW_REASON_11D_SCAN:
 		stats->scan_11d++;
 		break;
+
 	case WOW_REASON_CHIP_POWER_FAILURE_DETECT:
 		stats->pwr_save_fail_detected++;
 		break;
+
 	default:
 		break;
 	}

+ 16 - 0
umac/cp_stats/dispatcher/inc/wlan_cp_stats_mc_defs.h

@@ -73,6 +73,14 @@ enum stats_req_type {
  * @oem_response_wake_up_count: oem response wakeup count
  * @pwr_save_fail_detected:     pwr save fail detected wakeup count
  * @scan_11d                    11d scan wakeup count
+ * @mgmt_assoc: association request management frame
+ * @mgmt_disassoc: disassociation management frame
+ * @mgmt_assoc_resp: association response management frame
+ * @mgmt_reassoc: reassociate request management frame
+ * @mgmt_reassoc_resp: reassociate response management frame
+ * @mgmt_auth: authentication managament frame
+ * @mgmt_deauth: deauthentication management frame
+ * @mgmt_action: action managament frame
  */
 struct wake_lock_stats {
 	uint32_t ucast_wake_up_count;
@@ -92,6 +100,14 @@ struct wake_lock_stats {
 	uint32_t oem_response_wake_up_count;
 	uint32_t pwr_save_fail_detected;
 	uint32_t scan_11d;
+	uint32_t mgmt_assoc;
+	uint32_t mgmt_disassoc;
+	uint32_t mgmt_assoc_resp;
+	uint32_t mgmt_reassoc;
+	uint32_t mgmt_reassoc_resp;
+	uint32_t mgmt_auth;
+	uint32_t mgmt_deauth;
+	uint32_t mgmt_action;
 };
 
 struct stats_event;