hc
2024-08-16 62c46c9150c4afde7e5b25436263fddf79d66f0b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef __TRACER_H__
#define __TRACER_H__
 
#include "cfg80211.h"
 
#define MAX_DEAUTH_REASON 256
 
#define LOCAL_EVENT  0
#define REMOTE_EVENT 1
 
struct deauth_info {
   unsigned long local_deauth[MAX_DEAUTH_REASON];
   unsigned long remote_deauth[MAX_DEAUTH_REASON];
};
 
struct deauth_trace {
   spinlock_t lock; /* spinlock for deauth statistics */
   struct  deauth_info deauth_mode[SPRDWL_MODE_MAX];
};
 
struct rx_pkt_type_wakeup_details {
   u32 icmp_pkt_cnt;
   u32 icmp6_pkt_cnt;
   u32 icmp6_ra_cnt;
   u32 icmp6_na_cnt;
   u32 icmp6_ns_cnt;
};
 
struct rx_mc_wakeup_details {
   u32 ipv4_mc_cnt;
   u32 ipv6_mc_cnt;
   u32 other_mc_cnt;
};
 
struct rx_data_wakeup_details {
   u32 rx_unicast_cnt;
   u32 rx_brdcst_cnt;
   struct rx_mc_wakeup_details rx_mc_dtl;
};
 
struct wakeup_trace {
   u32 resume_flag;
   u32 total_cmd_event_wake;
   u32 total_rx_data_wake;
   u32 total_local_wake;
   struct rx_data_wakeup_details rx_data_dtl;
   struct rx_pkt_type_wakeup_details pkt_type_dtl;
};
 
void trace_info_init(void);
void trace_info_deinit(void);
void trace_deauth_reason(int mode, u16 reason_code, int dirction);
void trace_rx_wakeup(struct wakeup_trace *tracer, void *data, void *rdata);
#endif