|
@@ -1114,43 +1114,6 @@ void qdf_dp_add_record(enum QDF_DP_TRACE_ID code,
|
|
|
}
|
|
|
EXPORT_SYMBOL(qdf_dp_add_record);
|
|
|
|
|
|
-/**
|
|
|
- * qdf_event_eapol_log() - send event to wlan diag
|
|
|
- * @skb: skb ptr
|
|
|
- * @dir: direction
|
|
|
- * @eapol_key_info: eapol key info
|
|
|
- *
|
|
|
- * Return: None
|
|
|
- */
|
|
|
-#ifdef FEATURE_WLAN_DIAG_SUPPORT
|
|
|
-static void qdf_event_eapol_log(struct sk_buff *skb, enum qdf_proto_dir dir,
|
|
|
- int16_t eapol_key_info)
|
|
|
-{
|
|
|
- WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event, struct host_event_wlan_eapol);
|
|
|
-
|
|
|
- wlan_diag_event.event_sub_type =
|
|
|
- (dir == QDF_TX ?
|
|
|
- WIFI_EVENT_DRIVER_EAPOL_FRAME_TRANSMIT_REQUESTED :
|
|
|
- WIFI_EVENT_DRIVER_EAPOL_FRAME_RECEIVED);
|
|
|
- wlan_diag_event.eapol_packet_type = (uint8_t)(*(uint8_t *)
|
|
|
- (skb->data + EAPOL_PACKET_TYPE_OFFSET));
|
|
|
- wlan_diag_event.eapol_key_info = eapol_key_info;
|
|
|
- wlan_diag_event.eapol_rate = 0;
|
|
|
- qdf_mem_copy(wlan_diag_event.dest_addr,
|
|
|
- (skb->data + QDF_NBUF_DEST_MAC_OFFSET),
|
|
|
- sizeof(wlan_diag_event.dest_addr));
|
|
|
- qdf_mem_copy(wlan_diag_event.src_addr,
|
|
|
- (skb->data + QDF_NBUF_SRC_MAC_OFFSET),
|
|
|
- sizeof(wlan_diag_event.src_addr));
|
|
|
-
|
|
|
- WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_EAPOL);
|
|
|
-}
|
|
|
-#else
|
|
|
-static void qdf_event_eapol_log(struct sk_buff *skb, enum qdf_proto_dir dir,
|
|
|
- int16_t eapol_key_info)
|
|
|
-{
|
|
|
-}
|
|
|
-#endif
|
|
|
|
|
|
/**
|
|
|
* qdf_log_eapol_pkt() - log EAPOL packet
|
|
@@ -1168,7 +1131,9 @@ bool qdf_log_eapol_pkt(uint8_t session_id, struct sk_buff *skb,
|
|
|
enum qdf_proto_subtype subtype;
|
|
|
|
|
|
if ((qdf_dp_get_proto_bitmap() & QDF_NBUF_PKT_TRAC_TYPE_EAPOL) &&
|
|
|
- qdf_nbuf_is_ipv4_eapol_pkt(skb) == true) {
|
|
|
+ ((dir == QDF_TX && QDF_NBUF_CB_PACKET_TYPE_EAPOL ==
|
|
|
+ QDF_NBUF_CB_GET_PACKET_TYPE(skb)) ||
|
|
|
+ (dir == QDF_RX && qdf_nbuf_is_ipv4_eapol_pkt(skb) == true))) {
|
|
|
|
|
|
eapol_key_info = (uint16_t)(*(uint16_t *)
|
|
|
(skb->data + EAPOL_KEY_INFO_OFFSET));
|
|
@@ -1194,7 +1159,6 @@ bool qdf_log_eapol_pkt(uint8_t session_id, struct sk_buff *skb,
|
|
|
session_id, (skb->data + QDF_NBUF_SRC_MAC_OFFSET),
|
|
|
(skb->data + QDF_NBUF_DEST_MAC_OFFSET),
|
|
|
QDF_PROTO_TYPE_EAPOL, subtype, dir));
|
|
|
- qdf_event_eapol_log(skb, dir, eapol_key_info);
|
|
|
if (QDF_TX == dir)
|
|
|
QDF_NBUF_CB_TX_DP_TRACE(skb) = 1;
|
|
|
else if (QDF_RX == dir)
|
|
@@ -1219,7 +1183,9 @@ bool qdf_log_dhcp_pkt(uint8_t session_id, struct sk_buff *skb,
|
|
|
enum qdf_proto_subtype subtype = QDF_PROTO_INVALID;
|
|
|
|
|
|
if ((qdf_dp_get_proto_bitmap() & QDF_NBUF_PKT_TRAC_TYPE_DHCP) &&
|
|
|
- qdf_nbuf_is_ipv4_dhcp_pkt(skb) == true) {
|
|
|
+ ((dir == QDF_TX && QDF_NBUF_CB_PACKET_TYPE_DHCP ==
|
|
|
+ QDF_NBUF_CB_GET_PACKET_TYPE(skb)) ||
|
|
|
+ (dir == QDF_RX && qdf_nbuf_is_ipv4_dhcp_pkt(skb) == true))) {
|
|
|
|
|
|
if ((skb->data[QDF_DHCP_OPTION53_OFFSET] == QDF_DHCP_OPTION53) &&
|
|
|
(skb->data[QDF_DHCP_OPTION53_LENGTH_OFFSET] ==
|
|
@@ -1283,7 +1249,9 @@ bool qdf_log_arp_pkt(uint8_t session_id, struct sk_buff *skb,
|
|
|
enum qdf_proto_subtype proto_subtype;
|
|
|
|
|
|
if ((qdf_dp_get_proto_bitmap() & QDF_NBUF_PKT_TRAC_TYPE_ARP) &&
|
|
|
- qdf_nbuf_is_ipv4_arp_pkt(skb) == true) {
|
|
|
+ ((dir == QDF_TX && QDF_NBUF_CB_PACKET_TYPE_ARP ==
|
|
|
+ QDF_NBUF_CB_GET_PACKET_TYPE(skb)) ||
|
|
|
+ (dir == QDF_RX && qdf_nbuf_is_ipv4_arp_pkt(skb) == true))) {
|
|
|
|
|
|
subtype = (uint16_t)(*(uint16_t *)
|
|
|
(skb->data + ARP_SUB_TYPE_OFFSET));
|