Search Linux Wireless

[PATCH] ath10k: report per-chain RSSI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ath10k: report per-chain RSSI.

Signed-off-by: Dmitry Ivanov <dima@xxxxxxxx>
---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index d7d1183..2d50939 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -832,6 +832,20 @@ static void ath10k_htt_rx_h_signal(struct ath10k *ar,
 				   struct ieee80211_rx_status *status,
 				   struct htt_rx_desc *rxd)
 {
+	{
+		/* Linux array has size IEEE80211_MAX_CHAINS, FW array has size 4 */
+		BUILD_BUG_ON(IEEE80211_MAX_CHAINS != 4);
+		u32 i = IEEE80211_MAX_CHAINS;
+		u8 signal_per_chain;
+		do {
+			i--;
+			signal_per_chain = rxd->ppdu_start.rssi_chains[i].pri20_mhz;
+			if (signal_per_chain != 0x80) {
+				status->chains |= BIT(i);
+				status->chain_signal[i] = ATH10K_DEFAULT_NOISE_FLOOR + signal_per_chain;
+			}
+		} while (i);
+	}
 	/* FIXME: Get real NF */
 	status->signal = ATH10K_DEFAULT_NOISE_FLOOR +
 			 rxd->ppdu_start.rssi_comb;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux