diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-04-29 15:56:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-03 14:51:46 -0400 |
commit | 354b4f04f2aa9d9652ecd5a4cdace784c7cfcca8 (patch) | |
tree | 04edf451bff046b32a6377944034ce5295ae8903 | |
parent | 91639c76bfd9d27ac54a3c521a2559d02f409ebe (diff) |
b43: Added get_survey callback in order to get channel noise
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/b43/main.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index e0575591828c..f6019828ed3f 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -4570,6 +4570,23 @@ static void b43_op_sw_scan_complete_notifier(struct ieee80211_hw *hw) | |||
4570 | mutex_unlock(&wl->mutex); | 4570 | mutex_unlock(&wl->mutex); |
4571 | } | 4571 | } |
4572 | 4572 | ||
4573 | static int b43_op_get_survey(struct ieee80211_hw *hw, int idx, | ||
4574 | struct survey_info *survey) | ||
4575 | { | ||
4576 | struct b43_wl *wl = hw_to_b43_wl(hw); | ||
4577 | struct b43_wldev *dev = wl->current_dev; | ||
4578 | struct ieee80211_conf *conf = &hw->conf; | ||
4579 | |||
4580 | if (idx != 0) | ||
4581 | return -ENOENT; | ||
4582 | |||
4583 | survey->channel = conf->channel; | ||
4584 | survey->filled = SURVEY_INFO_NOISE_DBM; | ||
4585 | survey->noise = dev->stats.link_noise; | ||
4586 | |||
4587 | return 0; | ||
4588 | } | ||
4589 | |||
4573 | static const struct ieee80211_ops b43_hw_ops = { | 4590 | static const struct ieee80211_ops b43_hw_ops = { |
4574 | .tx = b43_op_tx, | 4591 | .tx = b43_op_tx, |
4575 | .conf_tx = b43_op_conf_tx, | 4592 | .conf_tx = b43_op_conf_tx, |
@@ -4589,6 +4606,7 @@ static const struct ieee80211_ops b43_hw_ops = { | |||
4589 | .sta_notify = b43_op_sta_notify, | 4606 | .sta_notify = b43_op_sta_notify, |
4590 | .sw_scan_start = b43_op_sw_scan_start_notifier, | 4607 | .sw_scan_start = b43_op_sw_scan_start_notifier, |
4591 | .sw_scan_complete = b43_op_sw_scan_complete_notifier, | 4608 | .sw_scan_complete = b43_op_sw_scan_complete_notifier, |
4609 | .get_survey = b43_op_get_survey, | ||
4592 | .rfkill_poll = b43_rfkill_poll, | 4610 | .rfkill_poll = b43_rfkill_poll, |
4593 | }; | 4611 | }; |
4594 | 4612 | ||