summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54/main.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-07-29 20:47:07 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-07-29 20:47:07 +0200
commitae3568adf42d5d3bb3cfa505b94351c5d1ce4924 (patch)
tree112865a6e6b1e4ddf70362f3efb295c495ec85b9 /drivers/net/wireless/p54/main.c
parentnet: bnx2x_cmn.c needs net/ip6_checksum.h for csum_ipv6_magic (diff)
parentcfg80211: fix dev <-> wiphy typo (diff)
downloadlinux-ae3568adf42d5d3bb3cfa505b94351c5d1ce4924.tar.xz
linux-ae3568adf42d5d3bb3cfa505b94351c5d1ce4924.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Diffstat (limited to 'drivers/net/wireless/p54/main.c')
-rw-r--r--drivers/net/wireless/p54/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index c072f41747ca..47db439b63bf 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -507,6 +507,22 @@ out_unlock:
return ret;
}
+static int p54_get_survey(struct ieee80211_hw *dev, int idx,
+ struct survey_info *survey)
+{
+ struct p54_common *priv = dev->priv;
+ struct ieee80211_conf *conf = &dev->conf;
+
+ if (idx != 0)
+ return -ENOENT;
+
+ survey->channel = conf->channel;
+ survey->filled = SURVEY_INFO_NOISE_DBM;
+ survey->noise = clamp_t(s8, priv->noise, -128, 127);
+
+ return 0;
+}
+
static const struct ieee80211_ops p54_ops = {
.tx = p54_tx_80211,
.start = p54_start,
@@ -523,6 +539,7 @@ static const struct ieee80211_ops p54_ops = {
.configure_filter = p54_configure_filter,
.conf_tx = p54_conf_tx,
.get_stats = p54_get_stats,
+ .get_survey = p54_get_survey,
};
struct ieee80211_hw *p54_init_common(size_t priv_data_len)