diff options
author | Norik Dzhandzhapanyan <norikd@gmail.com> | 2017-06-12 17:03:34 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2017-06-16 08:52:30 +0200 |
commit | 8241253d03fe9098e98315a4d66027ae31ab65c5 (patch) | |
tree | 390b32e17adea4796a71a92eaf0b9ca0004aa839 /drivers/net/wireless/ath/ath10k | |
parent | ath10k: define structures for CE ctrl/misc register (diff) | |
download | linux-8241253d03fe9098e98315a4d66027ae31ab65c5.tar.xz linux-8241253d03fe9098e98315a4d66027ae31ab65c5.zip |
ath10k: add per chain RSSI reporting
Report per chain RSSI to mac80211.
Signed-off-by: Norik Dzhandzhapanyan <norikd@gmail.com>
[kvalo@qca.qualcomm.com: fix conflicts and style]
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/htt_rx.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 6c0a821fe79d..398dda978d6e 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -829,6 +829,19 @@ static void ath10k_htt_rx_h_signal(struct ath10k *ar, struct ieee80211_rx_status *status, struct htt_rx_desc *rxd) { + int i; + + for (i = 0; i < IEEE80211_MAX_CHAINS ; i++) { + status->chains &= ~BIT(i); + + if (rxd->ppdu_start.rssi_chains[i].pri20_mhz != 0x80) { + status->chain_signal[i] = ATH10K_DEFAULT_NOISE_FLOOR + + rxd->ppdu_start.rssi_chains[i].pri20_mhz; + + status->chains |= BIT(i); + } + } + /* FIXME: Get real NF */ status->signal = ATH10K_DEFAULT_NOISE_FLOOR + rxd->ppdu_start.rssi_comb; |