diff options
Diffstat (limited to 'drivers/net/wireless/b43legacy/main.c')
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index bb2dd9329aa0..1713f5f7a58b 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -3482,6 +3482,23 @@ static int b43legacy_op_beacon_set_tim(struct ieee80211_hw *hw, | |||
3482 | return 0; | 3482 | return 0; |
3483 | } | 3483 | } |
3484 | 3484 | ||
3485 | static int b43legacy_op_get_survey(struct ieee80211_hw *hw, int idx, | ||
3486 | struct survey_info *survey) | ||
3487 | { | ||
3488 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); | ||
3489 | struct b43legacy_wldev *dev = wl->current_dev; | ||
3490 | struct ieee80211_conf *conf = &hw->conf; | ||
3491 | |||
3492 | if (idx != 0) | ||
3493 | return -ENOENT; | ||
3494 | |||
3495 | survey->channel = conf->channel; | ||
3496 | survey->filled = SURVEY_INFO_NOISE_DBM; | ||
3497 | survey->noise = dev->stats.link_noise; | ||
3498 | |||
3499 | return 0; | ||
3500 | } | ||
3501 | |||
3485 | static const struct ieee80211_ops b43legacy_hw_ops = { | 3502 | static const struct ieee80211_ops b43legacy_hw_ops = { |
3486 | .tx = b43legacy_op_tx, | 3503 | .tx = b43legacy_op_tx, |
3487 | .conf_tx = b43legacy_op_conf_tx, | 3504 | .conf_tx = b43legacy_op_conf_tx, |
@@ -3494,6 +3511,7 @@ static const struct ieee80211_ops b43legacy_hw_ops = { | |||
3494 | .start = b43legacy_op_start, | 3511 | .start = b43legacy_op_start, |
3495 | .stop = b43legacy_op_stop, | 3512 | .stop = b43legacy_op_stop, |
3496 | .set_tim = b43legacy_op_beacon_set_tim, | 3513 | .set_tim = b43legacy_op_beacon_set_tim, |
3514 | .get_survey = b43legacy_op_get_survey, | ||
3497 | .rfkill_poll = b43legacy_rfkill_poll, | 3515 | .rfkill_poll = b43legacy_rfkill_poll, |
3498 | }; | 3516 | }; |
3499 | 3517 | ||
@@ -3769,8 +3787,7 @@ static int b43legacy_wireless_init(struct ssb_device *dev) | |||
3769 | 3787 | ||
3770 | /* fill hw info */ | 3788 | /* fill hw info */ |
3771 | hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | | 3789 | hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | |
3772 | IEEE80211_HW_SIGNAL_DBM | | 3790 | IEEE80211_HW_SIGNAL_DBM; |
3773 | IEEE80211_HW_NOISE_DBM; | ||
3774 | hw->wiphy->interface_modes = | 3791 | hw->wiphy->interface_modes = |
3775 | BIT(NL80211_IFTYPE_AP) | | 3792 | BIT(NL80211_IFTYPE_AP) | |
3776 | BIT(NL80211_IFTYPE_STATION) | | 3793 | BIT(NL80211_IFTYPE_STATION) | |