aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mac80211_hwsim.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-04-23 14:43:45 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-23 14:43:45 -0400
commit3b51cc996e81d8a113416d8094fa4a88f8360a51 (patch)
treee75b98b228bb4e456c30673fcc4b56ffa1d09cf5 /drivers/net/wireless/mac80211_hwsim.c
parentc68ed255265968c3948fa2678bf59d15c471b055 (diff)
parent672724403b42da1d276c6cf811e8e34d15efd964 (diff)
Merge branch 'master' into for-davem
Conflicts: drivers/net/wireless/ath/ath9k/phy.c drivers/net/wireless/iwlwifi/iwl-6000.c drivers/net/wireless/iwlwifi/iwl-debugfs.c
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index dfff02f5c86d..6f0d8c9fa933 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -830,6 +830,33 @@ static int mac80211_hwsim_conf_tx(
830 return 0; 830 return 0;
831} 831}
832 832
833static int mac80211_hwsim_get_survey(
834 struct ieee80211_hw *hw, int idx,
835 struct survey_info *survey)
836{
837 struct ieee80211_conf *conf = &hw->conf;
838
839 printk(KERN_DEBUG "%s:%s (idx=%d)\n",
840 wiphy_name(hw->wiphy), __func__, idx);
841
842 if (idx != 0)
843 return -ENOENT;
844
845 /* Current channel */
846 survey->channel = conf->channel;
847
848 /*
849 * Magically conjured noise level --- this is only ok for simulated hardware.
850 *
851 * A real driver which cannot determine the real channel noise MUST NOT
852 * report any noise, especially not a magically conjured one :-)
853 */
854 survey->filled = SURVEY_INFO_NOISE_DBM;
855 survey->noise = -92;
856
857 return 0;
858}
859
833#ifdef CONFIG_NL80211_TESTMODE 860#ifdef CONFIG_NL80211_TESTMODE
834/* 861/*
835 * This section contains example code for using netlink 862 * This section contains example code for using netlink
@@ -1013,6 +1040,7 @@ static struct ieee80211_ops mac80211_hwsim_ops =
1013 .sta_notify = mac80211_hwsim_sta_notify, 1040 .sta_notify = mac80211_hwsim_sta_notify,
1014 .set_tim = mac80211_hwsim_set_tim, 1041 .set_tim = mac80211_hwsim_set_tim,
1015 .conf_tx = mac80211_hwsim_conf_tx, 1042 .conf_tx = mac80211_hwsim_conf_tx,
1043 .get_survey = mac80211_hwsim_get_survey,
1016 CFG80211_TESTMODE_CMD(mac80211_hwsim_testmode_cmd) 1044 CFG80211_TESTMODE_CMD(mac80211_hwsim_testmode_cmd)
1017 .ampdu_action = mac80211_hwsim_ampdu_action, 1045 .ampdu_action = mac80211_hwsim_ampdu_action,
1018 .sw_scan_start = mac80211_hwsim_sw_scan, 1046 .sw_scan_start = mac80211_hwsim_sw_scan,