Ver Fonte

qcacmn: Add diag events for debugging

Currently there are no diag events to inform user space about
algo num, Tx Seq num and status code of auth req.

Add such diag events which can be useful in automation.

Change-Id: I0fb698b62a114c867113a89aa67f9778b80de118
CRs-Fixed: 2331702
Abhinav Kumar há 6 anos atrás
pai
commit
a151be66dd

+ 21 - 1
utils/host_diag_log/inc/host_diag_core_event.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 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
@@ -582,6 +582,26 @@ struct event_wlan_csr_rsn_info {
 	uint8_t   group_mgmt[RSN_OUI_SIZE];
 };
 
+/*-------------------------------------------------------------------------
+  Event ID: EVENT_WLAN_AUTH_INFO
+  -------------------------------------------------------------------------
+ */
+/**
+ * struct event_wlan_lim_auth_info - Structure holding the
+ * algo num, seq num and status code for auth request
+ * @auth_algo_num: Gives information about algo num used in auth request
+ * @auth_transaction_seq_num: seq num of auth request
+ * @auth_status_code: status code of auth request
+ *
+ * This structure will hold the algo num, seq num and status code
+ * for auth request
+ */
+struct event_wlan_lim_auth_info {
+	uint16_t   auth_algo_num;
+	uint16_t   auth_transaction_seq_num;
+	uint16_t   auth_status_code;
+};
+
 /*-------------------------------------------------------------------------
   Event ID: EVENT_WLAN_WAKE_LOCK
   ------------------------------------------------------------------------*/

+ 17 - 1
utils/host_diag_log/inc/host_diag_event_defs.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 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
@@ -913,6 +913,22 @@ typedef enum {
 
 	EVENT_WLAN_RSN_INFO = 0xC5B,
 
+	/*
+	 * <diag_event>
+	 * EVENT_WLAN_AUTH_INFO
+	 * @auth_algo_num: Gives information about algo num used in auth request
+	 * @auth_transaction_seq_num: seq num of auth request
+	 * @auth_status_code: status code of auth request
+	 *
+	 * This event is used to send algo num, seq num and status code
+	 * for auth request
+	 *
+	 * Supported Feature: STA
+	 *
+	 * </diag_event>
+	 */
+
+	EVENT_WLAN_AUTH_INFO = 0xC92,
 
 	EVENT_MAX_ID = 0x0FFF
 } event_id_enum_type;

+ 16 - 1
utils/host_diag_log/src/host_diag_log.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 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
@@ -294,6 +294,21 @@ void host_log_rsn_info(uint8_t *ucast_cipher, uint8_t *mcast_cipher,
 				    EVENT_WLAN_RSN_INFO);
 }
 
+void
+host_log_wlan_auth_info(uint16_t auth_algo_num, uint16_t auth_tx_seq_num,
+			uint16_t auth_status_code)
+{
+	WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event,
+				 struct event_wlan_lim_auth_info);
+
+	wlan_diag_event.auth_algo_num = auth_algo_num;
+	wlan_diag_event.auth_transaction_seq_num = auth_tx_seq_num;
+	wlan_diag_event.auth_status_code = auth_status_code;
+
+	WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event,
+				    EVENT_WLAN_AUTH_INFO);
+}
+
 #ifdef FEATURE_WLAN_DIAG_SUPPORT
 /**
  * qdf_wow_wakeup_host_event()- send wow wakeup event

+ 28 - 1
utils/host_diag_log/src/i_host_diag_core_event.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 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
@@ -131,8 +131,35 @@ static inline void host_log_rsn_info(uint8_t *ucast_cipher,
 {
 
 }
+
 #endif /* FEATURE_WLAN_DIAG_SUPPORT */
 
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+/**
+ * host_log_wlan_auth_info() - This function is used to send
+ * algo num, seq num and status code for auth request
+ * @auth_algo_num: Gives information about algo num used in auth request
+ * @auth_tx_seq_num: seq num of auth request
+ * @auth_status_code: status code of auth request
+ *
+ * This function is used to send send algo num, seq num and status code
+ * for auth request
+ *
+ * Return: None
+ *
+ */
+void
+host_log_wlan_auth_info(uint16_t auth_algo_num, uint16_t auth_tx_seq_num,
+			uint16_t auth_status_code);
+
+#else
+static inline void
+host_log_wlan_auth_info(uint16_t auth_algo_num, uint16_t auth_tx_seq_num,
+			uint16_t auth_status_code)
+{
+}
+
+#endif /* FEATURE_WLAN_DIAG_SUPPORT */
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT
 void qdf_wow_wakeup_host_event(uint8_t wow_wakeup_cause);