summaryrefslogtreecommitdiff
path: root/package/madwifi/extra/wprobe.spatch
blob: 78718aa54ccfb09a706fd1a0b9f1c75d77de3dcb (plain)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@@
@@
 #include "if_athioctl.h"
+#include "wprobe.h"

@@
@@
 struct ath_vap {
 	...
+	struct wprobe_iface av_wpif;
 };

@@
@@
 struct ath_node {
 	...
+	struct wprobe_link an_wplink;
+	uint8_t an_wplink_active;
+	struct work_struct an_destroy;
 	u_int16_t an_decomp_index;
 	...
 };

@@
@@
 ath_vap_create(...) {
 	<...
+	ath_init_wprobe_dev(avp);
 	return vap;
 	...>
 }

@ rule5 @
expression vap;
@@
 ath_vap_delete(...) {
 	<...
 	ieee80211_vap_detach(vap);
+	ath_remove_wprobe_dev(ATH_VAP(vap));
 	...>
 }

@ rule6 @
@@
 static int xchanmode = -1;
+
+#include "ath_wprobe.c"


@ rule7 @
expression sc, ni;
@@
 <...
 	sc->sc_rc->ops->newassoc(sc, ATH_NODE(ni), isnew);
+	ath_wprobe_node_join(ni->ni_vap, ni);
 ...>

@ rule8 @
expression ni;
expression sc;
@@
 <...
 	sc->sc_rc->ops->node_cleanup(sc, ATH_NODE(ni));
+	ath_wprobe_node_leave(ni->ni_vap, ni);
 ...>

@ rule9 @
expression ni;
expression rs;
@@
 <...
 	ATH_RSSI_LPF(ATH_NODE(ni)->an_avgrssi, rs->rs_rssi);
+	ath_node_sample_rx(ni, rs);
 ...>

@ rule10 @
expression an;
expression ts;
@@
 <...
 	ATH_RSSI_LPF(an->an_halstats.ns_avgtxrssi, ts->ts_rssi);
+	ath_node_sample_tx(&an->an_node, ts, bf->bf_skb->len);
 ...>