diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-04-29 15:56:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-03 14:51:47 -0400 |
commit | c7ab1a4dcb8fb63364e9460b1182da6eae5f0d16 (patch) | |
tree | 02744bf81cc0e88fabd90f6de553921581e1f12c /drivers/net | |
parent | 354b4f04f2aa9d9652ecd5a4cdace784c7cfcca8 (diff) |
b43legacy: Added get_survey callback in order to get channel noise
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index b2df432d3c63..9304dc0f2f66 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -3481,6 +3481,23 @@ static int b43legacy_op_beacon_set_tim(struct ieee80211_hw *hw, | |||
3481 | return 0; | 3481 | return 0; |
3482 | } | 3482 | } |
3483 | 3483 | ||
3484 | static int b43legacy_op_get_survey(struct ieee80211_hw *hw, int idx, | ||
3485 | struct survey_info *survey) | ||
3486 | { | ||
3487 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); | ||
3488 | struct b43legacy_wldev *dev = wl->current_dev; | ||
3489 | struct ieee80211_conf *conf = &hw->conf; | ||
3490 | |||
3491 | if (idx != 0) | ||
3492 | return -ENOENT; | ||
3493 | |||
3494 | survey->channel = conf->channel; | ||
3495 | survey->filled = SURVEY_INFO_NOISE_DBM; | ||
3496 | survey->noise = dev->stats.link_noise; | ||
3497 | |||
3498 | return 0; | ||
3499 | } | ||
3500 | |||
3484 | static const struct ieee80211_ops b43legacy_hw_ops = { | 3501 | static const struct ieee80211_ops b43legacy_hw_ops = { |
3485 | .tx = b43legacy_op_tx, | 3502 | .tx = b43legacy_op_tx, |
3486 | .conf_tx = b43legacy_op_conf_tx, | 3503 | .conf_tx = b43legacy_op_conf_tx, |
@@ -3493,6 +3510,7 @@ static const struct ieee80211_ops b43legacy_hw_ops = { | |||
3493 | .start = b43legacy_op_start, | 3510 | .start = b43legacy_op_start, |
3494 | .stop = b43legacy_op_stop, | 3511 | .stop = b43legacy_op_stop, |
3495 | .set_tim = b43legacy_op_beacon_set_tim, | 3512 | .set_tim = b43legacy_op_beacon_set_tim, |
3513 | .get_survey = b43legacy_op_get_survey, | ||
3496 | .rfkill_poll = b43legacy_rfkill_poll, | 3514 | .rfkill_poll = b43legacy_rfkill_poll, |
3497 | }; | 3515 | }; |
3498 | 3516 | ||