Browse Source

qcacmn: Remove unused connectivity log for datapath events

Diag logging is used for logging datapath event such
as EAPOL and DHCP events

Remove legacy logging mechanism for datapath events

Change-Id: I8a987c1a4ab9954c7662e2f76e7904b02619f661
CRs-Fixed: 3470476
Vijay Raj 2 years ago
parent
commit
1214390842
1 changed files with 1 additions and 142 deletions
  1. 1 142
      qdf/linux/src/qdf_trace.c

+ 1 - 142
qdf/linux/src/qdf_trace.c

@@ -49,8 +49,7 @@ qdf_declare_param(qdf_log_flush_timer_period, uint);
 #include "qdf_mc_timer.h"
 #include "qdf_mc_timer.h"
 #include <host_diag_core_log.h>
 #include <host_diag_core_log.h>
 
 
-#if defined(WLAN_FEATURE_CONNECTIVITY_LOGGING) || \
-	defined(CONNECTIVITY_DIAG_EVENT)
+#ifdef CONNECTIVITY_DIAG_EVENT
 #include <wlan_connectivity_logging.h>
 #include <wlan_connectivity_logging.h>
 #include "i_host_diag_core_event.h"
 #include "i_host_diag_core_event.h"
 #endif
 #endif
@@ -1807,146 +1806,6 @@ void qdf_fill_wlan_connectivity_log(enum qdf_proto_type type,
 	WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_CONN_DP);
 	WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_CONN_DP);
 }
 }
 
 
-#elif defined(WLAN_FEATURE_CONNECTIVITY_LOGGING)
-/**
- * qdf_subtype_to_wlan_main_tag() - Convert qdf subtype to wlan main tag
- * @subtype: EAPoL key subtype
- *
- * Return: Wlan main tag subtype
- */
-static int qdf_subtype_to_wlan_main_tag(enum qdf_proto_subtype subtype)
-{
-	switch (subtype) {
-	case QDF_PROTO_DHCP_DISCOVER:
-		return WLAN_DHCP_DISCOVER;
-	case QDF_PROTO_DHCP_REQUEST:
-		return WLAN_DHCP_REQUEST;
-	case QDF_PROTO_DHCP_OFFER:
-		return WLAN_DHCP_OFFER;
-	case QDF_PROTO_DHCP_ACK:
-		return WLAN_DHCP_ACK;
-	case QDF_PROTO_DHCP_NACK:
-		return WLAN_DHCP_NACK;
-	case QDF_PROTO_EAPOL_M1:
-		return WLAN_EAPOL_M1;
-	case QDF_PROTO_EAPOL_M2:
-		return WLAN_EAPOL_M2;
-	case QDF_PROTO_EAPOL_M3:
-		return WLAN_EAPOL_M3;
-	case QDF_PROTO_EAPOL_M4:
-		return WLAN_EAPOL_M4;
-	default:
-		return WLAN_TAG_MAX;
-	}
-}
-
-/**
- * qdf_get_wlan_eap_code() - Get EAP code
- * @data: skb data pointer
- *
- * Return: EAP code value
- */
-static int qdf_get_wlan_eap_code(uint8_t *data)
-{
-	uint8_t code = *(data + EAP_CODE_OFFSET);
-
-	switch (code) {
-	case QDF_EAP_REQUEST:
-		return WLAN_EAP_REQUEST;
-	case QDF_EAP_RESPONSE:
-		return WLAN_EAP_RESPONSE;
-	case QDF_EAP_SUCCESS:
-		return WLAN_EAP_SUCCESS;
-	case QDF_EAP_FAILURE:
-		return WLAN_EAP_FAILURE;
-	default:
-		return WLAN_TAG_MAX;
-	}
-}
-
-/**
- * qdf_eapol_get_key_type() - Get EAPOL key type
- * @data: skb data pointer
- * @subtype: EAPoL key subtype
- *
- * Return: EAPOL key type
- */
-static
-uint8_t qdf_eapol_get_key_type(uint8_t *data, enum qdf_proto_subtype subtype)
-{
-	uint16_t key_info = *(uint16_t *)(data + EAPOL_KEY_INFO_OFFSET);
-
-	/* If key type is PTK, key type will be set in EAPOL Key info */
-	if (key_info & EAPOL_KEY_TYPE_MASK)
-		return qdf_subtype_to_wlan_main_tag(subtype);
-	else if (key_info & EAPOL_KEY_ENCRYPTED_MASK)
-		return WLAN_GTK_M1;
-	else
-		return WLAN_GTK_M2;
-}
-
-/**
- * qdf_skip_wlan_connectivity_log() - Check if connectivity log need to skip
- * @type: Protocol type
- * @subtype: Protocol subtype
- * @dir: Rx or Tx
- *
- * Return: true or false
- */
-static inline
-bool qdf_skip_wlan_connectivity_log(enum qdf_proto_type type,
-				    enum qdf_proto_subtype subtype,
-				    enum qdf_proto_dir dir)
-{
-	if ((dir == QDF_RX) && (type == QDF_PROTO_TYPE_DHCP) &&
-	    ((subtype == QDF_PROTO_DHCP_DISCOVER) ||
-	     (subtype == QDF_PROTO_DHCP_REQUEST)))
-		return true;
-	return false;
-}
-
-static
-void qdf_fill_wlan_connectivity_log(enum qdf_proto_type type,
-				    enum qdf_proto_subtype subtype,
-				    enum qdf_proto_dir dir,
-				    enum qdf_dp_tx_rx_status qdf_tx_status,
-				    uint8_t vdev_id, uint8_t *data)
-{
-	struct wlan_log_record log_buf = {0};
-	uint8_t pkt_type;
-
-	if (qdf_skip_wlan_connectivity_log(type, subtype, dir))
-		return;
-
-	log_buf.timestamp_us = qdf_get_time_of_the_day_ms() * 1000;
-	log_buf.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
-	log_buf.vdev_id = vdev_id;
-	if (type == QDF_PROTO_TYPE_DHCP) {
-		log_buf.log_subtype = qdf_subtype_to_wlan_main_tag(subtype);
-	} else if (type == QDF_PROTO_TYPE_EAPOL) {
-		pkt_type = *(data + EAPOL_PACKET_TYPE_OFFSET);
-		if (pkt_type == EAPOL_PACKET_TYPE_EAP) {
-			log_buf.log_subtype = qdf_get_wlan_eap_code(data);
-			log_buf.pkt_info.eap_type = *(data + EAP_TYPE_OFFSET);
-			log_buf.pkt_info.eap_len =
-			   qdf_ntohs(*(uint16_t *)(data + EAP_LENGTH_OFFSET));
-		} else if (pkt_type == EAPOL_PACKET_TYPE_KEY) {
-			log_buf.log_subtype = qdf_eapol_get_key_type(data,
-								     subtype);
-		} else {
-			return;
-		}
-	} else {
-		return;
-	}
-
-	/*Tx completion status needs to be logged*/
-	if (dir == QDF_TX)
-		log_buf.pkt_info.tx_status = qdf_tx_status;
-
-	wlan_connectivity_log_enqueue(&log_buf);
-}
-
 #else
 #else
 static inline
 static inline
 void qdf_fill_wlan_connectivity_log(enum qdf_proto_type type,
 void qdf_fill_wlan_connectivity_log(enum qdf_proto_type type,