diff options
author | Beni Lev <beni.lev@intel.com> | 2012-08-27 05:49:39 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-10-18 04:53:38 -0400 |
commit | 4ee3e063f10acf6fd17c0ee6f1d0a95726e74cb2 (patch) | |
tree | 66b8846df1311155856710cabe811739451566ed /net | |
parent | 14e8a3c47e808772a5ba8118ef1f9a8d604dbbe5 (diff) |
cfg80211: add cfg80211 exported function tracing
Also add tracing to the API functions that drivers
(and mac80211) can call in cfg80211.
Signed-off-by: Beni Lev <beni.lev@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/chan.c | 13 | ||||
-rw-r--r-- | net/wireless/ibss.c | 2 | ||||
-rw-r--r-- | net/wireless/mesh.c | 1 | ||||
-rw-r--r-- | net/wireless/mlme.c | 55 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 5 | ||||
-rw-r--r-- | net/wireless/scan.c | 13 | ||||
-rw-r--r-- | net/wireless/trace.h | 536 |
7 files changed, 615 insertions, 10 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 71c362587965..48febd2160ba 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c | |||
@@ -53,6 +53,8 @@ bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy, | |||
53 | struct ieee80211_channel *sec_chan; | 53 | struct ieee80211_channel *sec_chan; |
54 | int diff; | 54 | int diff; |
55 | 55 | ||
56 | trace_cfg80211_can_beacon_sec_chan(wiphy, chan, channel_type); | ||
57 | |||
56 | switch (channel_type) { | 58 | switch (channel_type) { |
57 | case NL80211_CHAN_HT40PLUS: | 59 | case NL80211_CHAN_HT40PLUS: |
58 | diff = 20; | 60 | diff = 20; |
@@ -61,20 +63,25 @@ bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy, | |||
61 | diff = -20; | 63 | diff = -20; |
62 | break; | 64 | break; |
63 | default: | 65 | default: |
66 | trace_cfg80211_return_bool(true); | ||
64 | return true; | 67 | return true; |
65 | } | 68 | } |
66 | 69 | ||
67 | sec_chan = ieee80211_get_channel(wiphy, chan->center_freq + diff); | 70 | sec_chan = ieee80211_get_channel(wiphy, chan->center_freq + diff); |
68 | if (!sec_chan) | 71 | if (!sec_chan) { |
72 | trace_cfg80211_return_bool(false); | ||
69 | return false; | 73 | return false; |
74 | } | ||
70 | 75 | ||
71 | /* we'll need a DFS capability later */ | 76 | /* we'll need a DFS capability later */ |
72 | if (sec_chan->flags & (IEEE80211_CHAN_DISABLED | | 77 | if (sec_chan->flags & (IEEE80211_CHAN_DISABLED | |
73 | IEEE80211_CHAN_PASSIVE_SCAN | | 78 | IEEE80211_CHAN_PASSIVE_SCAN | |
74 | IEEE80211_CHAN_NO_IBSS | | 79 | IEEE80211_CHAN_NO_IBSS | |
75 | IEEE80211_CHAN_RADAR)) | 80 | IEEE80211_CHAN_RADAR)) { |
81 | trace_cfg80211_return_bool(false); | ||
76 | return false; | 82 | return false; |
77 | 83 | } | |
84 | trace_cfg80211_return_bool(true); | ||
78 | return true; | 85 | return true; |
79 | } | 86 | } |
80 | EXPORT_SYMBOL(cfg80211_can_beacon_sec_chan); | 87 | EXPORT_SYMBOL(cfg80211_can_beacon_sec_chan); |
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index 7fda94fb1a3e..27941d5db72b 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c | |||
@@ -62,6 +62,8 @@ void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp) | |||
62 | struct cfg80211_event *ev; | 62 | struct cfg80211_event *ev; |
63 | unsigned long flags; | 63 | unsigned long flags; |
64 | 64 | ||
65 | trace_cfg80211_ibss_joined(dev, bssid); | ||
66 | |||
65 | CFG80211_DEV_WARN_ON(wdev->sme_state != CFG80211_SME_CONNECTING); | 67 | CFG80211_DEV_WARN_ON(wdev->sme_state != CFG80211_SME_CONNECTING); |
66 | 68 | ||
67 | ev = kzalloc(sizeof(*ev), gfp); | 69 | ev = kzalloc(sizeof(*ev), gfp); |
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c index a18bb3417be5..966cfc4cd79d 100644 --- a/net/wireless/mesh.c +++ b/net/wireless/mesh.c | |||
@@ -242,6 +242,7 @@ void cfg80211_notify_new_peer_candidate(struct net_device *dev, | |||
242 | { | 242 | { |
243 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 243 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
244 | 244 | ||
245 | trace_cfg80211_notify_new_peer_candidate(dev, macaddr); | ||
245 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_MESH_POINT)) | 246 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_MESH_POINT)) |
246 | return; | 247 | return; |
247 | 248 | ||
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 2a74395e6ab3..46aeafce08d0 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -24,6 +24,7 @@ void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len) | |||
24 | struct wiphy *wiphy = wdev->wiphy; | 24 | struct wiphy *wiphy = wdev->wiphy; |
25 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 25 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
26 | 26 | ||
27 | trace_cfg80211_send_rx_auth(dev); | ||
27 | wdev_lock(wdev); | 28 | wdev_lock(wdev); |
28 | 29 | ||
29 | nl80211_send_rx_auth(rdev, dev, buf, len, GFP_KERNEL); | 30 | nl80211_send_rx_auth(rdev, dev, buf, len, GFP_KERNEL); |
@@ -44,6 +45,7 @@ void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss, | |||
44 | u8 *ie = mgmt->u.assoc_resp.variable; | 45 | u8 *ie = mgmt->u.assoc_resp.variable; |
45 | int ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable); | 46 | int ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable); |
46 | 47 | ||
48 | trace_cfg80211_send_rx_assoc(dev, bss); | ||
47 | wdev_lock(wdev); | 49 | wdev_lock(wdev); |
48 | 50 | ||
49 | status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); | 51 | status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); |
@@ -100,6 +102,7 @@ void __cfg80211_send_deauth(struct net_device *dev, | |||
100 | const u8 *bssid = mgmt->bssid; | 102 | const u8 *bssid = mgmt->bssid; |
101 | bool was_current = false; | 103 | bool was_current = false; |
102 | 104 | ||
105 | trace___cfg80211_send_deauth(dev); | ||
103 | ASSERT_WDEV_LOCK(wdev); | 106 | ASSERT_WDEV_LOCK(wdev); |
104 | 107 | ||
105 | if (wdev->current_bss && | 108 | if (wdev->current_bss && |
@@ -149,6 +152,7 @@ void __cfg80211_send_disassoc(struct net_device *dev, | |||
149 | u16 reason_code; | 152 | u16 reason_code; |
150 | bool from_ap; | 153 | bool from_ap; |
151 | 154 | ||
155 | trace___cfg80211_send_disassoc(dev); | ||
152 | ASSERT_WDEV_LOCK(wdev); | 156 | ASSERT_WDEV_LOCK(wdev); |
153 | 157 | ||
154 | nl80211_send_disassoc(rdev, dev, buf, len, GFP_KERNEL); | 158 | nl80211_send_disassoc(rdev, dev, buf, len, GFP_KERNEL); |
@@ -190,6 +194,7 @@ void cfg80211_send_unprot_deauth(struct net_device *dev, const u8 *buf, | |||
190 | struct wiphy *wiphy = wdev->wiphy; | 194 | struct wiphy *wiphy = wdev->wiphy; |
191 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 195 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
192 | 196 | ||
197 | trace_cfg80211_send_unprot_deauth(dev); | ||
193 | nl80211_send_unprot_deauth(rdev, dev, buf, len, GFP_ATOMIC); | 198 | nl80211_send_unprot_deauth(rdev, dev, buf, len, GFP_ATOMIC); |
194 | } | 199 | } |
195 | EXPORT_SYMBOL(cfg80211_send_unprot_deauth); | 200 | EXPORT_SYMBOL(cfg80211_send_unprot_deauth); |
@@ -201,6 +206,7 @@ void cfg80211_send_unprot_disassoc(struct net_device *dev, const u8 *buf, | |||
201 | struct wiphy *wiphy = wdev->wiphy; | 206 | struct wiphy *wiphy = wdev->wiphy; |
202 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 207 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
203 | 208 | ||
209 | trace_cfg80211_send_unprot_disassoc(dev); | ||
204 | nl80211_send_unprot_disassoc(rdev, dev, buf, len, GFP_ATOMIC); | 210 | nl80211_send_unprot_disassoc(rdev, dev, buf, len, GFP_ATOMIC); |
205 | } | 211 | } |
206 | EXPORT_SYMBOL(cfg80211_send_unprot_disassoc); | 212 | EXPORT_SYMBOL(cfg80211_send_unprot_disassoc); |
@@ -211,6 +217,7 @@ void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr) | |||
211 | struct wiphy *wiphy = wdev->wiphy; | 217 | struct wiphy *wiphy = wdev->wiphy; |
212 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 218 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
213 | 219 | ||
220 | trace_cfg80211_send_auth_timeout(dev, addr); | ||
214 | wdev_lock(wdev); | 221 | wdev_lock(wdev); |
215 | 222 | ||
216 | nl80211_send_auth_timeout(rdev, dev, addr, GFP_KERNEL); | 223 | nl80211_send_auth_timeout(rdev, dev, addr, GFP_KERNEL); |
@@ -229,6 +236,7 @@ void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr) | |||
229 | struct wiphy *wiphy = wdev->wiphy; | 236 | struct wiphy *wiphy = wdev->wiphy; |
230 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 237 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
231 | 238 | ||
239 | trace_cfg80211_send_assoc_timeout(dev, addr); | ||
232 | wdev_lock(wdev); | 240 | wdev_lock(wdev); |
233 | 241 | ||
234 | nl80211_send_assoc_timeout(rdev, dev, addr, GFP_KERNEL); | 242 | nl80211_send_assoc_timeout(rdev, dev, addr, GFP_KERNEL); |
@@ -263,6 +271,7 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, | |||
263 | } | 271 | } |
264 | #endif | 272 | #endif |
265 | 273 | ||
274 | trace_cfg80211_michael_mic_failure(dev, addr, key_type, key_id, tsc); | ||
266 | nl80211_michael_mic_failure(rdev, dev, addr, key_type, key_id, tsc, gfp); | 275 | nl80211_michael_mic_failure(rdev, dev, addr, key_type, key_id, tsc, gfp); |
267 | } | 276 | } |
268 | EXPORT_SYMBOL(cfg80211_michael_mic_failure); | 277 | EXPORT_SYMBOL(cfg80211_michael_mic_failure); |
@@ -582,6 +591,8 @@ void cfg80211_ready_on_channel(struct wireless_dev *wdev, u64 cookie, | |||
582 | struct wiphy *wiphy = wdev->wiphy; | 591 | struct wiphy *wiphy = wdev->wiphy; |
583 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 592 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
584 | 593 | ||
594 | trace_cfg80211_ready_on_channel(wdev, cookie, chan, channel_type, | ||
595 | duration); | ||
585 | nl80211_send_remain_on_channel(rdev, wdev, cookie, chan, channel_type, | 596 | nl80211_send_remain_on_channel(rdev, wdev, cookie, chan, channel_type, |
586 | duration, gfp); | 597 | duration, gfp); |
587 | } | 598 | } |
@@ -595,6 +606,8 @@ void cfg80211_remain_on_channel_expired(struct wireless_dev *wdev, u64 cookie, | |||
595 | struct wiphy *wiphy = wdev->wiphy; | 606 | struct wiphy *wiphy = wdev->wiphy; |
596 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 607 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
597 | 608 | ||
609 | trace_cfg80211_ready_on_channel_expired(wdev, cookie, chan, | ||
610 | channel_type); | ||
598 | nl80211_send_remain_on_channel_cancel(rdev, wdev, cookie, chan, | 611 | nl80211_send_remain_on_channel_cancel(rdev, wdev, cookie, chan, |
599 | channel_type, gfp); | 612 | channel_type, gfp); |
600 | } | 613 | } |
@@ -606,6 +619,7 @@ void cfg80211_new_sta(struct net_device *dev, const u8 *mac_addr, | |||
606 | struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; | 619 | struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; |
607 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 620 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
608 | 621 | ||
622 | trace_cfg80211_new_sta(dev, mac_addr, sinfo); | ||
609 | nl80211_send_sta_event(rdev, dev, mac_addr, sinfo, gfp); | 623 | nl80211_send_sta_event(rdev, dev, mac_addr, sinfo, gfp); |
610 | } | 624 | } |
611 | EXPORT_SYMBOL(cfg80211_new_sta); | 625 | EXPORT_SYMBOL(cfg80211_new_sta); |
@@ -615,6 +629,7 @@ void cfg80211_del_sta(struct net_device *dev, const u8 *mac_addr, gfp_t gfp) | |||
615 | struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; | 629 | struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; |
616 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 630 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
617 | 631 | ||
632 | trace_cfg80211_del_sta(dev, mac_addr); | ||
618 | nl80211_send_sta_del_event(rdev, dev, mac_addr, gfp); | 633 | nl80211_send_sta_del_event(rdev, dev, mac_addr, gfp); |
619 | } | 634 | } |
620 | EXPORT_SYMBOL(cfg80211_del_sta); | 635 | EXPORT_SYMBOL(cfg80211_del_sta); |
@@ -867,10 +882,13 @@ bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm, | |||
867 | cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE); | 882 | cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE); |
868 | u16 stype; | 883 | u16 stype; |
869 | 884 | ||
885 | trace_cfg80211_rx_mgmt(wdev, freq, sig_mbm); | ||
870 | stype = (le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE) >> 4; | 886 | stype = (le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE) >> 4; |
871 | 887 | ||
872 | if (!(stypes->rx & BIT(stype))) | 888 | if (!(stypes->rx & BIT(stype))) { |
889 | trace_cfg80211_return_bool(false); | ||
873 | return false; | 890 | return false; |
891 | } | ||
874 | 892 | ||
875 | data = buf + ieee80211_hdrlen(mgmt->frame_control); | 893 | data = buf + ieee80211_hdrlen(mgmt->frame_control); |
876 | data_len = len - ieee80211_hdrlen(mgmt->frame_control); | 894 | data_len = len - ieee80211_hdrlen(mgmt->frame_control); |
@@ -901,6 +919,7 @@ bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm, | |||
901 | 919 | ||
902 | spin_unlock_bh(&wdev->mgmt_registrations_lock); | 920 | spin_unlock_bh(&wdev->mgmt_registrations_lock); |
903 | 921 | ||
922 | trace_cfg80211_return_bool(result); | ||
904 | return result; | 923 | return result; |
905 | } | 924 | } |
906 | EXPORT_SYMBOL(cfg80211_rx_mgmt); | 925 | EXPORT_SYMBOL(cfg80211_rx_mgmt); |
@@ -911,6 +930,8 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie, | |||
911 | struct wiphy *wiphy = wdev->wiphy; | 930 | struct wiphy *wiphy = wdev->wiphy; |
912 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 931 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
913 | 932 | ||
933 | trace_cfg80211_mgmt_tx_status(wdev, cookie, ack); | ||
934 | |||
914 | /* Indicate TX status of the Action frame to user space */ | 935 | /* Indicate TX status of the Action frame to user space */ |
915 | nl80211_send_mgmt_tx_status(rdev, wdev, cookie, buf, len, ack, gfp); | 936 | nl80211_send_mgmt_tx_status(rdev, wdev, cookie, buf, len, ack, gfp); |
916 | } | 937 | } |
@@ -924,6 +945,8 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev, | |||
924 | struct wiphy *wiphy = wdev->wiphy; | 945 | struct wiphy *wiphy = wdev->wiphy; |
925 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 946 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
926 | 947 | ||
948 | trace_cfg80211_cqm_rssi_notify(dev, rssi_event); | ||
949 | |||
927 | /* Indicate roaming trigger event to user space */ | 950 | /* Indicate roaming trigger event to user space */ |
928 | nl80211_send_cqm_rssi_notify(rdev, dev, rssi_event, gfp); | 951 | nl80211_send_cqm_rssi_notify(rdev, dev, rssi_event, gfp); |
929 | } | 952 | } |
@@ -936,6 +959,8 @@ void cfg80211_cqm_pktloss_notify(struct net_device *dev, | |||
936 | struct wiphy *wiphy = wdev->wiphy; | 959 | struct wiphy *wiphy = wdev->wiphy; |
937 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 960 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
938 | 961 | ||
962 | trace_cfg80211_cqm_pktloss_notify(dev, peer, num_packets); | ||
963 | |||
939 | /* Indicate roaming trigger event to user space */ | 964 | /* Indicate roaming trigger event to user space */ |
940 | nl80211_send_cqm_pktloss_notify(rdev, dev, peer, num_packets, gfp); | 965 | nl80211_send_cqm_pktloss_notify(rdev, dev, peer, num_packets, gfp); |
941 | } | 966 | } |
@@ -961,6 +986,7 @@ void cfg80211_gtk_rekey_notify(struct net_device *dev, const u8 *bssid, | |||
961 | struct wiphy *wiphy = wdev->wiphy; | 986 | struct wiphy *wiphy = wdev->wiphy; |
962 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 987 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
963 | 988 | ||
989 | trace_cfg80211_gtk_rekey_notify(dev, bssid); | ||
964 | nl80211_gtk_rekey_notify(rdev, dev, bssid, replay_ctr, gfp); | 990 | nl80211_gtk_rekey_notify(rdev, dev, bssid, replay_ctr, gfp); |
965 | } | 991 | } |
966 | EXPORT_SYMBOL(cfg80211_gtk_rekey_notify); | 992 | EXPORT_SYMBOL(cfg80211_gtk_rekey_notify); |
@@ -972,6 +998,7 @@ void cfg80211_pmksa_candidate_notify(struct net_device *dev, int index, | |||
972 | struct wiphy *wiphy = wdev->wiphy; | 998 | struct wiphy *wiphy = wdev->wiphy; |
973 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 999 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
974 | 1000 | ||
1001 | trace_cfg80211_pmksa_candidate_notify(dev, index, bssid, preauth); | ||
975 | nl80211_pmksa_candidate_notify(rdev, dev, index, bssid, preauth, gfp); | 1002 | nl80211_pmksa_candidate_notify(rdev, dev, index, bssid, preauth, gfp); |
976 | } | 1003 | } |
977 | EXPORT_SYMBOL(cfg80211_pmksa_candidate_notify); | 1004 | EXPORT_SYMBOL(cfg80211_pmksa_candidate_notify); |
@@ -984,6 +1011,8 @@ void cfg80211_ch_switch_notify(struct net_device *dev, int freq, | |||
984 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 1011 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
985 | struct ieee80211_channel *chan; | 1012 | struct ieee80211_channel *chan; |
986 | 1013 | ||
1014 | trace_cfg80211_ch_switch_notify(dev, freq, type); | ||
1015 | |||
987 | wdev_lock(wdev); | 1016 | wdev_lock(wdev); |
988 | 1017 | ||
989 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP && | 1018 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP && |
@@ -1006,12 +1035,18 @@ bool cfg80211_rx_spurious_frame(struct net_device *dev, | |||
1006 | const u8 *addr, gfp_t gfp) | 1035 | const u8 *addr, gfp_t gfp) |
1007 | { | 1036 | { |
1008 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1037 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1038 | bool ret; | ||
1039 | |||
1040 | trace_cfg80211_rx_spurious_frame(dev, addr); | ||
1009 | 1041 | ||
1010 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP && | 1042 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP && |
1011 | wdev->iftype != NL80211_IFTYPE_P2P_GO)) | 1043 | wdev->iftype != NL80211_IFTYPE_P2P_GO)) { |
1044 | trace_cfg80211_return_bool(false); | ||
1012 | return false; | 1045 | return false; |
1013 | 1046 | } | |
1014 | return nl80211_unexpected_frame(dev, addr, gfp); | 1047 | ret = nl80211_unexpected_frame(dev, addr, gfp); |
1048 | trace_cfg80211_return_bool(ret); | ||
1049 | return ret; | ||
1015 | } | 1050 | } |
1016 | EXPORT_SYMBOL(cfg80211_rx_spurious_frame); | 1051 | EXPORT_SYMBOL(cfg80211_rx_spurious_frame); |
1017 | 1052 | ||
@@ -1019,12 +1054,18 @@ bool cfg80211_rx_unexpected_4addr_frame(struct net_device *dev, | |||
1019 | const u8 *addr, gfp_t gfp) | 1054 | const u8 *addr, gfp_t gfp) |
1020 | { | 1055 | { |
1021 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1056 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1057 | bool ret; | ||
1058 | |||
1059 | trace_cfg80211_rx_unexpected_4addr_frame(dev, addr); | ||
1022 | 1060 | ||
1023 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP && | 1061 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP && |
1024 | wdev->iftype != NL80211_IFTYPE_P2P_GO && | 1062 | wdev->iftype != NL80211_IFTYPE_P2P_GO && |
1025 | wdev->iftype != NL80211_IFTYPE_AP_VLAN)) | 1063 | wdev->iftype != NL80211_IFTYPE_AP_VLAN)) { |
1064 | trace_cfg80211_return_bool(false); | ||
1026 | return false; | 1065 | return false; |
1027 | 1066 | } | |
1028 | return nl80211_unexpected_4addr_frame(dev, addr, gfp); | 1067 | ret = nl80211_unexpected_4addr_frame(dev, addr, gfp); |
1068 | trace_cfg80211_return_bool(ret); | ||
1069 | return ret; | ||
1029 | } | 1070 | } |
1030 | EXPORT_SYMBOL(cfg80211_rx_unexpected_4addr_frame); | 1071 | EXPORT_SYMBOL(cfg80211_rx_unexpected_4addr_frame); |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index e26f7455538d..5d3167d71b5f 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -8876,7 +8876,10 @@ void cfg80211_probe_status(struct net_device *dev, const u8 *addr, | |||
8876 | void *hdr; | 8876 | void *hdr; |
8877 | int err; | 8877 | int err; |
8878 | 8878 | ||
8879 | trace_cfg80211_probe_status(dev, addr, cookie, acked); | ||
8880 | |||
8879 | msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); | 8881 | msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); |
8882 | |||
8880 | if (!msg) | 8883 | if (!msg) |
8881 | return; | 8884 | return; |
8882 | 8885 | ||
@@ -8918,6 +8921,8 @@ void cfg80211_report_obss_beacon(struct wiphy *wiphy, | |||
8918 | void *hdr; | 8921 | void *hdr; |
8919 | u32 nlportid = ACCESS_ONCE(rdev->ap_beacons_nlportid); | 8922 | u32 nlportid = ACCESS_ONCE(rdev->ap_beacons_nlportid); |
8920 | 8923 | ||
8924 | trace_cfg80211_report_obss_beacon(wiphy, frame, len, freq, sig_dbm); | ||
8925 | |||
8921 | if (!nlportid) | 8926 | if (!nlportid) |
8922 | return; | 8927 | return; |
8923 | 8928 | ||
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index a957077dd961..7f97a087f452 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -145,6 +145,7 @@ void __cfg80211_scan_done(struct work_struct *wk) | |||
145 | 145 | ||
146 | void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted) | 146 | void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted) |
147 | { | 147 | { |
148 | trace_cfg80211_scan_done(request, aborted); | ||
148 | WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req); | 149 | WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req); |
149 | 150 | ||
150 | request->aborted = aborted; | 151 | request->aborted = aborted; |
@@ -182,6 +183,7 @@ void __cfg80211_sched_scan_results(struct work_struct *wk) | |||
182 | 183 | ||
183 | void cfg80211_sched_scan_results(struct wiphy *wiphy) | 184 | void cfg80211_sched_scan_results(struct wiphy *wiphy) |
184 | { | 185 | { |
186 | trace_cfg80211_sched_scan_results(wiphy); | ||
185 | /* ignore if we're not scanning */ | 187 | /* ignore if we're not scanning */ |
186 | if (wiphy_to_dev(wiphy)->sched_scan_req) | 188 | if (wiphy_to_dev(wiphy)->sched_scan_req) |
187 | queue_work(cfg80211_wq, | 189 | queue_work(cfg80211_wq, |
@@ -193,6 +195,8 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy) | |||
193 | { | 195 | { |
194 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 196 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
195 | 197 | ||
198 | trace_cfg80211_sched_scan_stopped(wiphy); | ||
199 | |||
196 | mutex_lock(&rdev->sched_scan_mtx); | 200 | mutex_lock(&rdev->sched_scan_mtx); |
197 | __cfg80211_stop_sched_scan(rdev, true); | 201 | __cfg80211_stop_sched_scan(rdev, true); |
198 | mutex_unlock(&rdev->sched_scan_mtx); | 202 | mutex_unlock(&rdev->sched_scan_mtx); |
@@ -485,6 +489,9 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy, | |||
485 | struct cfg80211_internal_bss *bss, *res = NULL; | 489 | struct cfg80211_internal_bss *bss, *res = NULL; |
486 | unsigned long now = jiffies; | 490 | unsigned long now = jiffies; |
487 | 491 | ||
492 | trace_cfg80211_get_bss(wiphy, channel, bssid, ssid, ssid_len, capa_mask, | ||
493 | capa_val); | ||
494 | |||
488 | spin_lock_bh(&dev->bss_lock); | 495 | spin_lock_bh(&dev->bss_lock); |
489 | 496 | ||
490 | list_for_each_entry(bss, &dev->bss_list, list) { | 497 | list_for_each_entry(bss, &dev->bss_list, list) { |
@@ -506,6 +513,7 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy, | |||
506 | spin_unlock_bh(&dev->bss_lock); | 513 | spin_unlock_bh(&dev->bss_lock); |
507 | if (!res) | 514 | if (!res) |
508 | return NULL; | 515 | return NULL; |
516 | trace_cfg80211_return_bss(&res->pub); | ||
509 | return &res->pub; | 517 | return &res->pub; |
510 | } | 518 | } |
511 | EXPORT_SYMBOL(cfg80211_get_bss); | 519 | EXPORT_SYMBOL(cfg80211_get_bss); |
@@ -818,6 +826,7 @@ cfg80211_inform_bss(struct wiphy *wiphy, | |||
818 | if (res->pub.capability & WLAN_CAPABILITY_ESS) | 826 | if (res->pub.capability & WLAN_CAPABILITY_ESS) |
819 | regulatory_hint_found_beacon(wiphy, channel, gfp); | 827 | regulatory_hint_found_beacon(wiphy, channel, gfp); |
820 | 828 | ||
829 | trace_cfg80211_return_bss(&res->pub); | ||
821 | /* cfg80211_bss_update gives us a referenced result */ | 830 | /* cfg80211_bss_update gives us a referenced result */ |
822 | return &res->pub; | 831 | return &res->pub; |
823 | } | 832 | } |
@@ -830,10 +839,13 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, | |||
830 | s32 signal, gfp_t gfp) | 839 | s32 signal, gfp_t gfp) |
831 | { | 840 | { |
832 | struct cfg80211_internal_bss *res; | 841 | struct cfg80211_internal_bss *res; |
842 | |||
833 | size_t ielen = len - offsetof(struct ieee80211_mgmt, | 843 | size_t ielen = len - offsetof(struct ieee80211_mgmt, |
834 | u.probe_resp.variable); | 844 | u.probe_resp.variable); |
835 | size_t privsz; | 845 | size_t privsz; |
836 | 846 | ||
847 | trace_cfg80211_inform_bss_frame(wiphy, channel, mgmt, len, signal); | ||
848 | |||
837 | if (WARN_ON(!mgmt)) | 849 | if (WARN_ON(!mgmt)) |
838 | return NULL; | 850 | return NULL; |
839 | 851 | ||
@@ -887,6 +899,7 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, | |||
887 | if (res->pub.capability & WLAN_CAPABILITY_ESS) | 899 | if (res->pub.capability & WLAN_CAPABILITY_ESS) |
888 | regulatory_hint_found_beacon(wiphy, channel, gfp); | 900 | regulatory_hint_found_beacon(wiphy, channel, gfp); |
889 | 901 | ||
902 | trace_cfg80211_return_bss(&res->pub); | ||
890 | /* cfg80211_bss_update gives us a referenced result */ | 903 | /* cfg80211_bss_update gives us a referenced result */ |
891 | return &res->pub; | 904 | return &res->pub; |
892 | } | 905 | } |
diff --git a/net/wireless/trace.h b/net/wireless/trace.h index 0940e9103776..857734c4b357 100644 --- a/net/wireless/trace.h +++ b/net/wireless/trace.h | |||
@@ -1741,6 +1741,542 @@ TRACE_EVENT(rdev_return_channel, | |||
1741 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->type) | 1741 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->type) |
1742 | ); | 1742 | ); |
1743 | 1743 | ||
1744 | /************************************************************* | ||
1745 | * cfg80211 exported functions traces * | ||
1746 | *************************************************************/ | ||
1747 | |||
1748 | TRACE_EVENT(cfg80211_return_bool, | ||
1749 | TP_PROTO(bool ret), | ||
1750 | TP_ARGS(ret), | ||
1751 | TP_STRUCT__entry( | ||
1752 | __field(bool, ret) | ||
1753 | ), | ||
1754 | TP_fast_assign( | ||
1755 | __entry->ret = ret; | ||
1756 | ), | ||
1757 | TP_printk("returned %s", BOOL_TO_STR(__entry->ret)) | ||
1758 | ); | ||
1759 | |||
1760 | DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt, | ||
1761 | TP_PROTO(struct net_device *netdev, const u8 *macaddr), | ||
1762 | TP_ARGS(netdev, macaddr), | ||
1763 | TP_STRUCT__entry( | ||
1764 | NETDEV_ENTRY | ||
1765 | MAC_ENTRY(macaddr) | ||
1766 | ), | ||
1767 | TP_fast_assign( | ||
1768 | NETDEV_ASSIGN; | ||
1769 | MAC_ASSIGN(macaddr, macaddr); | ||
1770 | ), | ||
1771 | TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT, | ||
1772 | NETDEV_PR_ARG, MAC_PR_ARG(macaddr)) | ||
1773 | ); | ||
1774 | |||
1775 | DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate, | ||
1776 | TP_PROTO(struct net_device *netdev, const u8 *macaddr), | ||
1777 | TP_ARGS(netdev, macaddr) | ||
1778 | ); | ||
1779 | |||
1780 | DECLARE_EVENT_CLASS(netdev_evt_only, | ||
1781 | TP_PROTO(struct net_device *netdev), | ||
1782 | TP_ARGS(netdev), | ||
1783 | TP_STRUCT__entry( | ||
1784 | NETDEV_ENTRY | ||
1785 | ), | ||
1786 | TP_fast_assign( | ||
1787 | NETDEV_ASSIGN; | ||
1788 | ), | ||
1789 | TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG) | ||
1790 | ); | ||
1791 | |||
1792 | DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth, | ||
1793 | TP_PROTO(struct net_device *netdev), | ||
1794 | TP_ARGS(netdev) | ||
1795 | ); | ||
1796 | |||
1797 | TRACE_EVENT(cfg80211_send_rx_assoc, | ||
1798 | TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss), | ||
1799 | TP_ARGS(netdev, bss), | ||
1800 | TP_STRUCT__entry( | ||
1801 | NETDEV_ENTRY | ||
1802 | MAC_ENTRY(bssid) | ||
1803 | CHAN_ENTRY | ||
1804 | ), | ||
1805 | TP_fast_assign( | ||
1806 | NETDEV_ASSIGN; | ||
1807 | MAC_ASSIGN(bssid, bss->bssid); | ||
1808 | CHAN_ASSIGN(bss->channel); | ||
1809 | ), | ||
1810 | TP_printk(NETDEV_PR_FMT MAC_PR_FMT CHAN_PR_FMT, | ||
1811 | NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG) | ||
1812 | ); | ||
1813 | |||
1814 | DEFINE_EVENT(netdev_evt_only, __cfg80211_send_deauth, | ||
1815 | TP_PROTO(struct net_device *netdev), | ||
1816 | TP_ARGS(netdev) | ||
1817 | ); | ||
1818 | |||
1819 | DEFINE_EVENT(netdev_evt_only, __cfg80211_send_disassoc, | ||
1820 | TP_PROTO(struct net_device *netdev), | ||
1821 | TP_ARGS(netdev) | ||
1822 | ); | ||
1823 | |||
1824 | DEFINE_EVENT(netdev_evt_only, cfg80211_send_unprot_deauth, | ||
1825 | TP_PROTO(struct net_device *netdev), | ||
1826 | TP_ARGS(netdev) | ||
1827 | ); | ||
1828 | |||
1829 | DEFINE_EVENT(netdev_evt_only, cfg80211_send_unprot_disassoc, | ||
1830 | TP_PROTO(struct net_device *netdev), | ||
1831 | TP_ARGS(netdev) | ||
1832 | ); | ||
1833 | |||
1834 | DECLARE_EVENT_CLASS(netdev_mac_evt, | ||
1835 | TP_PROTO(struct net_device *netdev, const u8 *mac), | ||
1836 | TP_ARGS(netdev, mac), | ||
1837 | TP_STRUCT__entry( | ||
1838 | NETDEV_ENTRY | ||
1839 | MAC_ENTRY(mac) | ||
1840 | ), | ||
1841 | TP_fast_assign( | ||
1842 | NETDEV_ASSIGN; | ||
1843 | MAC_ASSIGN(mac, mac) | ||
1844 | ), | ||
1845 | TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT, | ||
1846 | NETDEV_PR_ARG, MAC_PR_ARG(mac)) | ||
1847 | ); | ||
1848 | |||
1849 | DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout, | ||
1850 | TP_PROTO(struct net_device *netdev, const u8 *mac), | ||
1851 | TP_ARGS(netdev, mac) | ||
1852 | ); | ||
1853 | |||
1854 | DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout, | ||
1855 | TP_PROTO(struct net_device *netdev, const u8 *mac), | ||
1856 | TP_ARGS(netdev, mac) | ||
1857 | ); | ||
1858 | |||
1859 | TRACE_EVENT(cfg80211_michael_mic_failure, | ||
1860 | TP_PROTO(struct net_device *netdev, const u8 *addr, | ||
1861 | enum nl80211_key_type key_type, int key_id, const u8 *tsc), | ||
1862 | TP_ARGS(netdev, addr, key_type, key_id, tsc), | ||
1863 | TP_STRUCT__entry( | ||
1864 | NETDEV_ENTRY | ||
1865 | MAC_ENTRY(addr) | ||
1866 | __field(enum nl80211_key_type, key_type) | ||
1867 | __field(int, key_id) | ||
1868 | __array(u8, tsc, 6) | ||
1869 | ), | ||
1870 | TP_fast_assign( | ||
1871 | NETDEV_ASSIGN; | ||
1872 | MAC_ASSIGN(addr, addr); | ||
1873 | __entry->key_type = key_type; | ||
1874 | __entry->key_id = key_id; | ||
1875 | memcpy(__entry->tsc, tsc, 6); | ||
1876 | ), | ||
1877 | TP_printk(NETDEV_PR_FMT MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm", | ||
1878 | NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type, | ||
1879 | __entry->key_id, __entry->tsc) | ||
1880 | ); | ||
1881 | |||
1882 | TRACE_EVENT(cfg80211_ready_on_channel, | ||
1883 | TP_PROTO(struct wireless_dev *wdev, u64 cookie, | ||
1884 | struct ieee80211_channel *chan, | ||
1885 | enum nl80211_channel_type channel_type, unsigned int duration), | ||
1886 | TP_ARGS(wdev, cookie, chan, channel_type, duration), | ||
1887 | TP_STRUCT__entry( | ||
1888 | WDEV_ENTRY | ||
1889 | __field(u64, cookie) | ||
1890 | CHAN_ENTRY | ||
1891 | __field(enum nl80211_channel_type, channel_type) | ||
1892 | __field(unsigned int, duration) | ||
1893 | ), | ||
1894 | TP_fast_assign( | ||
1895 | WDEV_ASSIGN; | ||
1896 | __entry->cookie = cookie; | ||
1897 | CHAN_ASSIGN(chan); | ||
1898 | __entry->channel_type = channel_type; | ||
1899 | __entry->duration = duration; | ||
1900 | ), | ||
1901 | TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", channel type: %d, duration: %u", | ||
1902 | WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG, | ||
1903 | __entry->channel_type, __entry->duration) | ||
1904 | ); | ||
1905 | |||
1906 | TRACE_EVENT(cfg80211_ready_on_channel_expired, | ||
1907 | TP_PROTO(struct wireless_dev *wdev, u64 cookie, | ||
1908 | struct ieee80211_channel *chan, | ||
1909 | enum nl80211_channel_type channel_type), | ||
1910 | TP_ARGS(wdev, cookie, chan, channel_type), | ||
1911 | TP_STRUCT__entry( | ||
1912 | WDEV_ENTRY | ||
1913 | __field(u64, cookie) | ||
1914 | CHAN_ENTRY | ||
1915 | __field(enum nl80211_channel_type, channel_type) | ||
1916 | ), | ||
1917 | TP_fast_assign( | ||
1918 | WDEV_ASSIGN; | ||
1919 | __entry->cookie = cookie; | ||
1920 | CHAN_ASSIGN(chan); | ||
1921 | __entry->channel_type = channel_type; | ||
1922 | ), | ||
1923 | TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", channel type: %d", | ||
1924 | WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG, | ||
1925 | __entry->channel_type) | ||
1926 | ); | ||
1927 | |||
1928 | TRACE_EVENT(cfg80211_new_sta, | ||
1929 | TP_PROTO(struct net_device *netdev, const u8 *mac_addr, | ||
1930 | struct station_info *sinfo), | ||
1931 | TP_ARGS(netdev, mac_addr, sinfo), | ||
1932 | TP_STRUCT__entry( | ||
1933 | NETDEV_ENTRY | ||
1934 | MAC_ENTRY(mac_addr) | ||
1935 | SINFO_ENTRY | ||
1936 | ), | ||
1937 | TP_fast_assign( | ||
1938 | NETDEV_ASSIGN; | ||
1939 | MAC_ASSIGN(mac_addr, mac_addr); | ||
1940 | SINFO_ASSIGN; | ||
1941 | ), | ||
1942 | TP_printk(NETDEV_PR_FMT MAC_PR_FMT, | ||
1943 | NETDEV_PR_ARG, MAC_PR_ARG(mac_addr)) | ||
1944 | ); | ||
1945 | |||
1946 | DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta, | ||
1947 | TP_PROTO(struct net_device *netdev, const u8 *macaddr), | ||
1948 | TP_ARGS(netdev, macaddr) | ||
1949 | ); | ||
1950 | |||
1951 | TRACE_EVENT(cfg80211_rx_mgmt, | ||
1952 | TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm), | ||
1953 | TP_ARGS(wdev, freq, sig_mbm), | ||
1954 | TP_STRUCT__entry( | ||
1955 | WDEV_ENTRY | ||
1956 | __field(int, freq) | ||
1957 | __field(int, sig_mbm) | ||
1958 | ), | ||
1959 | TP_fast_assign( | ||
1960 | WDEV_ASSIGN; | ||
1961 | __entry->freq = freq; | ||
1962 | __entry->sig_mbm = sig_mbm; | ||
1963 | ), | ||
1964 | TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d", | ||
1965 | WDEV_PR_ARG, __entry->freq, __entry->sig_mbm) | ||
1966 | ); | ||
1967 | |||
1968 | TRACE_EVENT(cfg80211_mgmt_tx_status, | ||
1969 | TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack), | ||
1970 | TP_ARGS(wdev, cookie, ack), | ||
1971 | TP_STRUCT__entry( | ||
1972 | WDEV_ENTRY | ||
1973 | __field(u64, cookie) | ||
1974 | __field(bool, ack) | ||
1975 | ), | ||
1976 | TP_fast_assign( | ||
1977 | WDEV_ASSIGN; | ||
1978 | __entry->cookie = cookie; | ||
1979 | __entry->ack = ack; | ||
1980 | ), | ||
1981 | TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s", | ||
1982 | WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack)) | ||
1983 | ); | ||
1984 | |||
1985 | TRACE_EVENT(cfg80211_cqm_rssi_notify, | ||
1986 | TP_PROTO(struct net_device *netdev, | ||
1987 | enum nl80211_cqm_rssi_threshold_event rssi_event), | ||
1988 | TP_ARGS(netdev, rssi_event), | ||
1989 | TP_STRUCT__entry( | ||
1990 | NETDEV_ENTRY | ||
1991 | __field(enum nl80211_cqm_rssi_threshold_event, rssi_event) | ||
1992 | ), | ||
1993 | TP_fast_assign( | ||
1994 | NETDEV_ASSIGN; | ||
1995 | __entry->rssi_event = rssi_event; | ||
1996 | ), | ||
1997 | TP_printk(NETDEV_PR_FMT ", rssi event: %d", | ||
1998 | NETDEV_PR_ARG, __entry->rssi_event) | ||
1999 | ); | ||
2000 | |||
2001 | TRACE_EVENT(cfg80211_can_beacon_sec_chan, | ||
2002 | TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel, | ||
2003 | enum nl80211_channel_type channel_type), | ||
2004 | TP_ARGS(wiphy, channel, channel_type), | ||
2005 | TP_STRUCT__entry( | ||
2006 | WIPHY_ENTRY | ||
2007 | CHAN_ENTRY | ||
2008 | __field(enum nl80211_channel_type, channel_type) | ||
2009 | ), | ||
2010 | TP_fast_assign( | ||
2011 | WIPHY_ASSIGN; | ||
2012 | CHAN_ASSIGN(channel); | ||
2013 | __entry->channel_type = channel_type; | ||
2014 | ), | ||
2015 | TP_printk(WIPHY_PR_FMT CHAN_PR_FMT ", channel_type: %d", | ||
2016 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->channel_type) | ||
2017 | ); | ||
2018 | |||
2019 | TRACE_EVENT(cfg80211_ch_switch_notify, | ||
2020 | TP_PROTO(struct net_device *netdev, int freq, | ||
2021 | enum nl80211_channel_type type), | ||
2022 | TP_ARGS(netdev, freq, type), | ||
2023 | TP_STRUCT__entry( | ||
2024 | NETDEV_ENTRY | ||
2025 | __field(int, freq) | ||
2026 | __field(enum nl80211_channel_type, type) | ||
2027 | ), | ||
2028 | TP_fast_assign( | ||
2029 | NETDEV_ASSIGN; | ||
2030 | __entry->freq = freq; | ||
2031 | __entry->type = type; | ||
2032 | ), | ||
2033 | TP_printk(NETDEV_PR_FMT ", freq: %d, type: %d", NETDEV_PR_ARG, | ||
2034 | __entry->freq, __entry->type) | ||
2035 | ); | ||
2036 | |||
2037 | DECLARE_EVENT_CLASS(cfg80211_rx_evt, | ||
2038 | TP_PROTO(struct net_device *netdev, const u8 *addr), | ||
2039 | TP_ARGS(netdev, addr), | ||
2040 | TP_STRUCT__entry( | ||
2041 | NETDEV_ENTRY | ||
2042 | MAC_ENTRY(addr) | ||
2043 | ), | ||
2044 | TP_fast_assign( | ||
2045 | NETDEV_ASSIGN; | ||
2046 | MAC_ASSIGN(addr, addr); | ||
2047 | ), | ||
2048 | TP_printk(NETDEV_PR_FMT MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr)) | ||
2049 | ); | ||
2050 | |||
2051 | DEFINE_EVENT(cfg80211_rx_evt, cfg80211_ibss_joined, | ||
2052 | TP_PROTO(struct net_device *netdev, const u8 *addr), | ||
2053 | TP_ARGS(netdev, addr) | ||
2054 | ); | ||
2055 | |||
2056 | DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame, | ||
2057 | TP_PROTO(struct net_device *netdev, const u8 *addr), | ||
2058 | TP_ARGS(netdev, addr) | ||
2059 | ); | ||
2060 | |||
2061 | DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame, | ||
2062 | TP_PROTO(struct net_device *netdev, const u8 *addr), | ||
2063 | TP_ARGS(netdev, addr) | ||
2064 | ); | ||
2065 | |||
2066 | TRACE_EVENT(cfg80211_probe_status, | ||
2067 | TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie, | ||
2068 | bool acked), | ||
2069 | TP_ARGS(netdev, addr, cookie, acked), | ||
2070 | TP_STRUCT__entry( | ||
2071 | NETDEV_ENTRY | ||
2072 | MAC_ENTRY(addr) | ||
2073 | __field(u64, cookie) | ||
2074 | __field(bool, acked) | ||
2075 | ), | ||
2076 | TP_fast_assign( | ||
2077 | NETDEV_ASSIGN; | ||
2078 | MAC_ASSIGN(addr, addr); | ||
2079 | __entry->cookie = cookie; | ||
2080 | __entry->acked = acked; | ||
2081 | ), | ||
2082 | TP_printk(NETDEV_PR_FMT MAC_PR_FMT ", cookie: %llu, acked: %s", | ||
2083 | NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie, | ||
2084 | BOOL_TO_STR(__entry->acked)) | ||
2085 | ); | ||
2086 | |||
2087 | TRACE_EVENT(cfg80211_cqm_pktloss_notify, | ||
2088 | TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets), | ||
2089 | TP_ARGS(netdev, peer, num_packets), | ||
2090 | TP_STRUCT__entry( | ||
2091 | NETDEV_ENTRY | ||
2092 | MAC_ENTRY(peer) | ||
2093 | __field(u32, num_packets) | ||
2094 | ), | ||
2095 | TP_fast_assign( | ||
2096 | NETDEV_ASSIGN; | ||
2097 | MAC_ASSIGN(peer, peer); | ||
2098 | __entry->num_packets = num_packets; | ||
2099 | ), | ||
2100 | TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u", | ||
2101 | NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets) | ||
2102 | ); | ||
2103 | |||
2104 | DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify, | ||
2105 | TP_PROTO(struct net_device *netdev, const u8 *macaddr), | ||
2106 | TP_ARGS(netdev, macaddr) | ||
2107 | ); | ||
2108 | |||
2109 | TRACE_EVENT(cfg80211_pmksa_candidate_notify, | ||
2110 | TP_PROTO(struct net_device *netdev, int index, const u8 *bssid, | ||
2111 | bool preauth), | ||
2112 | TP_ARGS(netdev, index, bssid, preauth), | ||
2113 | TP_STRUCT__entry( | ||
2114 | NETDEV_ENTRY | ||
2115 | __field(int, index) | ||
2116 | MAC_ENTRY(bssid) | ||
2117 | __field(bool, preauth) | ||
2118 | ), | ||
2119 | TP_fast_assign( | ||
2120 | NETDEV_ASSIGN; | ||
2121 | __entry->index = index; | ||
2122 | MAC_ASSIGN(bssid, bssid); | ||
2123 | __entry->preauth = preauth; | ||
2124 | ), | ||
2125 | TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s", | ||
2126 | NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid), | ||
2127 | BOOL_TO_STR(__entry->preauth)) | ||
2128 | ); | ||
2129 | |||
2130 | TRACE_EVENT(cfg80211_report_obss_beacon, | ||
2131 | TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len, | ||
2132 | int freq, int sig_dbm), | ||
2133 | TP_ARGS(wiphy, frame, len, freq, sig_dbm), | ||
2134 | TP_STRUCT__entry( | ||
2135 | WIPHY_ENTRY | ||
2136 | __field(int, freq) | ||
2137 | __field(int, sig_dbm) | ||
2138 | ), | ||
2139 | TP_fast_assign( | ||
2140 | WIPHY_ASSIGN; | ||
2141 | __entry->freq = freq; | ||
2142 | __entry->sig_dbm = sig_dbm; | ||
2143 | ), | ||
2144 | TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d", | ||
2145 | WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm) | ||
2146 | ); | ||
2147 | |||
2148 | TRACE_EVENT(cfg80211_scan_done, | ||
2149 | TP_PROTO(struct cfg80211_scan_request *request, bool aborted), | ||
2150 | TP_ARGS(request, aborted), | ||
2151 | TP_STRUCT__entry( | ||
2152 | __field(u32, n_channels) | ||
2153 | __dynamic_array(u8, ie, request ? request->ie_len : 0) | ||
2154 | __array(u32, rates, IEEE80211_NUM_BANDS) | ||
2155 | __field(u32, wdev_id) | ||
2156 | MAC_ENTRY(wiphy_mac) | ||
2157 | __field(bool, no_cck) | ||
2158 | __field(bool, aborted) | ||
2159 | ), | ||
2160 | TP_fast_assign( | ||
2161 | if (request) { | ||
2162 | memcpy(__get_dynamic_array(ie), request->ie, | ||
2163 | request->ie_len); | ||
2164 | memcpy(__entry->rates, request->rates, | ||
2165 | IEEE80211_NUM_BANDS); | ||
2166 | __entry->wdev_id = request->wdev ? | ||
2167 | request->wdev->identifier : 0; | ||
2168 | if (request->wiphy) | ||
2169 | MAC_ASSIGN(wiphy_mac, | ||
2170 | request->wiphy->perm_addr); | ||
2171 | __entry->no_cck = request->no_cck; | ||
2172 | } | ||
2173 | __entry->aborted = aborted; | ||
2174 | ), | ||
2175 | TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted)) | ||
2176 | ); | ||
2177 | |||
2178 | DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results, | ||
2179 | TP_PROTO(struct wiphy *wiphy), | ||
2180 | TP_ARGS(wiphy) | ||
2181 | ); | ||
2182 | |||
2183 | DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped, | ||
2184 | TP_PROTO(struct wiphy *wiphy), | ||
2185 | TP_ARGS(wiphy) | ||
2186 | ); | ||
2187 | |||
2188 | TRACE_EVENT(cfg80211_get_bss, | ||
2189 | TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel, | ||
2190 | const u8 *bssid, const u8 *ssid, size_t ssid_len, | ||
2191 | u16 capa_mask, u16 capa_val), | ||
2192 | TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val), | ||
2193 | TP_STRUCT__entry( | ||
2194 | WIPHY_ENTRY | ||
2195 | CHAN_ENTRY | ||
2196 | MAC_ENTRY(bssid) | ||
2197 | __dynamic_array(u8, ssid, ssid_len) | ||
2198 | __field(u16, capa_mask) | ||
2199 | __field(u16, capa_val) | ||
2200 | ), | ||
2201 | TP_fast_assign( | ||
2202 | WIPHY_ASSIGN; | ||
2203 | CHAN_ASSIGN(channel); | ||
2204 | MAC_ASSIGN(bssid, bssid); | ||
2205 | memcpy(__get_dynamic_array(ssid), ssid, ssid_len); | ||
2206 | __entry->capa_mask = capa_mask; | ||
2207 | __entry->capa_val = capa_val; | ||
2208 | ), | ||
2209 | TP_printk(WIPHY_PR_FMT CHAN_PR_FMT MAC_PR_FMT ", buf: %#.2x, " | ||
2210 | "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG, | ||
2211 | MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0], | ||
2212 | __entry->capa_mask, __entry->capa_val) | ||
2213 | ); | ||
2214 | |||
2215 | TRACE_EVENT(cfg80211_inform_bss_frame, | ||
2216 | TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel, | ||
2217 | struct ieee80211_mgmt *mgmt, size_t len, | ||
2218 | s32 signal), | ||
2219 | TP_ARGS(wiphy, channel, mgmt, len, signal), | ||
2220 | TP_STRUCT__entry( | ||
2221 | WIPHY_ENTRY | ||
2222 | CHAN_ENTRY | ||
2223 | __dynamic_array(u8, mgmt, len) | ||
2224 | __field(s32, signal) | ||
2225 | ), | ||
2226 | TP_fast_assign( | ||
2227 | WIPHY_ASSIGN; | ||
2228 | CHAN_ASSIGN(channel); | ||
2229 | if (mgmt) | ||
2230 | memcpy(__get_dynamic_array(mgmt), mgmt, len); | ||
2231 | __entry->signal = signal; | ||
2232 | ), | ||
2233 | TP_printk(WIPHY_PR_FMT CHAN_PR_FMT "signal: %d", | ||
2234 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->signal) | ||
2235 | ); | ||
2236 | |||
2237 | DECLARE_EVENT_CLASS(cfg80211_bss_evt, | ||
2238 | TP_PROTO(struct cfg80211_bss *pub), | ||
2239 | TP_ARGS(pub), | ||
2240 | TP_STRUCT__entry( | ||
2241 | MAC_ENTRY(bssid) | ||
2242 | CHAN_ENTRY | ||
2243 | ), | ||
2244 | TP_fast_assign( | ||
2245 | MAC_ASSIGN(bssid, pub->bssid); | ||
2246 | CHAN_ASSIGN(pub->channel); | ||
2247 | ), | ||
2248 | TP_printk(MAC_PR_FMT CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG) | ||
2249 | ); | ||
2250 | |||
2251 | DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss, | ||
2252 | TP_PROTO(struct cfg80211_bss *pub), | ||
2253 | TP_ARGS(pub) | ||
2254 | ); | ||
2255 | |||
2256 | TRACE_EVENT(cfg80211_return_uint, | ||
2257 | TP_PROTO(unsigned int ret), | ||
2258 | TP_ARGS(ret), | ||
2259 | TP_STRUCT__entry( | ||
2260 | __field(unsigned int, ret) | ||
2261 | ), | ||
2262 | TP_fast_assign( | ||
2263 | __entry->ret = ret; | ||
2264 | ), | ||
2265 | TP_printk("ret: %d", __entry->ret) | ||
2266 | ); | ||
2267 | |||
2268 | TRACE_EVENT(cfg80211_return_u32, | ||
2269 | TP_PROTO(u32 ret), | ||
2270 | TP_ARGS(ret), | ||
2271 | TP_STRUCT__entry( | ||
2272 | __field(u32, ret) | ||
2273 | ), | ||
2274 | TP_fast_assign( | ||
2275 | __entry->ret = ret; | ||
2276 | ), | ||
2277 | TP_printk("ret: %u", __entry->ret) | ||
2278 | ); | ||
2279 | |||
1744 | #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */ | 2280 | #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */ |
1745 | 2281 | ||
1746 | #undef TRACE_INCLUDE_PATH | 2282 | #undef TRACE_INCLUDE_PATH |