summaryrefslogtreecommitdiff
path: root/net/mac80211/driver-ops.h
diff options
context:
space:
mode:
authorHolger Schurig <holgerschurig@gmail.com>2010-04-19 10:23:57 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-04-20 11:50:52 -0400
commit1289723ef238908ca8d95ff48a46ee0de970f882 (patch)
treeb4d584aee8abcc33dec2039fb45112156d3cd3d0 /net/mac80211/driver-ops.h
parent03ceedea972a82d343fa5c2528b3952fa9e615d5 (diff)
mac80211: sample survey implementation for mac80211 & hwsim
This adds the survey function to both mac80211 itself and to mac80211_hwsim. For the latter driver, we simply invent some noise level.A real driver which cannot determine the real channel noise MUST NOT report any noise, especially not a magically conjured one :-) Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r--net/mac80211/driver-ops.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index c3d844093a2f..d1f8a7c2225a 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -346,6 +346,15 @@ static inline int drv_ampdu_action(struct ieee80211_local *local,
return ret;
}
+static inline int drv_get_survey(struct ieee80211_local *local, int idx,
+ struct survey_info *survey)
+{
+ int ret = -EOPNOTSUPP;
+ if (local->ops->conf_tx)
+ ret = local->ops->get_survey(&local->hw, idx, survey);
+ /* trace_drv_get_survey(local, idx, survey, ret); */
+ return ret;
+}
static inline void drv_rfkill_poll(struct ieee80211_local *local)
{