aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
authorBeni Lev <beni.lev@intel.com>2012-08-27 05:49:39 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-18 04:53:38 -0400
commit4ee3e063f10acf6fd17c0ee6f1d0a95726e74cb2 (patch)
tree66b8846df1311155856710cabe811739451566ed /net/wireless/scan.c
parent14e8a3c47e808772a5ba8118ef1f9a8d604dbbe5 (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/wireless/scan.c')
-rw-r--r--net/wireless/scan.c13
1 files changed, 13 insertions, 0 deletions
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
146void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted) 146void 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
183void cfg80211_sched_scan_results(struct wiphy *wiphy) 184void 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}
511EXPORT_SYMBOL(cfg80211_get_bss); 519EXPORT_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}