aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wlcore/rx.c
diff options
context:
space:
mode:
authorGuy Mishol <guym@ti.com>2015-07-16 11:22:47 +0300
committerKalle Valo <kvalo@codeaurora.org>2015-07-21 18:07:34 +0300
commit5d6af28a2d240602a594cea236406a9d29bc719a (patch)
tree4b8943404738be8b1269f6714aa6e3010eebfc43 /drivers/net/wireless/ti/wlcore/rx.c
parentath9k: export HW random number generator (diff)
downloadlinux-dev-5d6af28a2d240602a594cea236406a9d29bc719a.tar.xz
linux-dev-5d6af28a2d240602a594cea236406a9d29bc719a.zip
wlcore: add antenna diversity reading
update the rssi reading on rx_status to read both RSSI level (7 bits) and antenna diversity (msb) Signed-off-by: Guy Mishol <guym@ti.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/rx.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/rx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wlcore/rx.c b/drivers/net/wireless/ti/wlcore/rx.c
index e125974285cc..7df672a84530 100644
--- a/drivers/net/wireless/ti/wlcore/rx.c
+++ b/drivers/net/wireless/ti/wlcore/rx.c
@@ -74,7 +74,8 @@ static void wl1271_rx_status(struct wl1271 *wl,
if (desc->rate <= wl->hw_min_ht_rate)
status->flag |= RX_FLAG_HT;
- status->signal = desc->rssi;
+ status->signal = ((desc->rssi & RSSI_LEVEL_BITMASK) | BIT(7));
+ status->antenna = ((desc->rssi & ANT_DIVERSITY_BITMASK) >> 7);
/*
* FIXME: In wl1251, the SNR should be divided by two. In wl1271 we