summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1251_main.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-07-28 15:23:30 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-29 12:46:47 -0400
commit19434148d16dc231026f37af7c40e81ad9342e75 (patch)
treeee649a89a690db417e2f3d19980a4a6ec4b9e6fb /drivers/net/wireless/wl12xx/wl1251_main.c
parenta55427e8284541d43630f10a6c637b28802c21b0 (diff)
downloadop-kernel-dev-19434148d16dc231026f37af7c40e81ad9342e75.zip
op-kernel-dev-19434148d16dc231026f37af7c40e81ad9342e75.tar.gz
wl1251: add get_survey callback in order to get channel noise
Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Kalle Valo <kvalo@adurom.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_main.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c
index 38f72f4..a6d8d1a 100644
--- a/drivers/net/wireless/wl12xx/wl1251_main.c
+++ b/drivers/net/wireless/wl12xx/wl1251_main.c
@@ -1172,6 +1172,22 @@ out:
return ret;
}
+static int wl1251_op_get_survey(struct ieee80211_hw *hw, int idx,
+ struct survey_info *survey)
+{
+ struct wl1251 *wl = hw->priv;
+ struct ieee80211_conf *conf = &hw->conf;
+
+ if (idx != 0)
+ return -ENOENT;
+
+ survey->channel = conf->channel;
+ survey->filled = SURVEY_INFO_NOISE_DBM;
+ survey->noise = wl->noise;
+
+ return 0;
+}
+
/* can't be const, mac80211 writes to this */
static struct ieee80211_supported_band wl1251_band_2ghz = {
.channels = wl1251_channels,
@@ -1193,6 +1209,7 @@ static const struct ieee80211_ops wl1251_ops = {
.bss_info_changed = wl1251_op_bss_info_changed,
.set_rts_threshold = wl1251_op_set_rts_threshold,
.conf_tx = wl1251_op_conf_tx,
+ .get_survey = wl1251_op_get_survey,
};
static int wl1251_read_eeprom_byte(struct wl1251 *wl, off_t offset, u8 *data)
OpenPOWER on IntegriCloud