diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-07-28 23:23:30 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-29 20:46:47 +0400 |
commit | 19434148d16dc231026f37af7c40e81ad9342e75 (patch) | |
tree | ee649a89a690db417e2f3d19980a4a6ec4b9e6fb /drivers/net/wireless/wl12xx/wl1251_rx.c | |
parent | a55427e8284541d43630f10a6c637b28802c21b0 (diff) | |
download | linux-19434148d16dc231026f37af7c40e81ad9342e75.tar.xz |
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_rx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_rx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_rx.c b/drivers/net/wireless/wl12xx/wl1251_rx.c index 851515836a7f..1b6294b3b996 100644 --- a/drivers/net/wireless/wl12xx/wl1251_rx.c +++ b/drivers/net/wireless/wl12xx/wl1251_rx.c @@ -74,6 +74,12 @@ static void wl1251_rx_status(struct wl1251 *wl, status->signal = desc->rssi; + /* + * FIXME: guessing that snr needs to be divided by two, otherwise + * the values don't make any sense + */ + wl->noise = desc->rssi - desc->snr / 2; + status->freq = ieee80211_channel_to_frequency(desc->channel); status->flag |= RX_FLAG_TSFT; |