aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>2014-03-24 16:24:58 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2014-03-25 08:15:27 -0400
commit2289188c273e2ce6aab9ff7a7972da40a8e82efb (patch)
tree2cd865077bf969aee64d965156e74caaf061adca /drivers/net/wireless
parent6df92a3d02d37df07459bb9b56b01d3ea854d61d (diff)
ath10k: fix rssi and rate reporting
RSSI and RATES fields are valid only when START_VALID bit is set. So, in current implementation we have to remember/caclulate them when START_VALID and report the same when only END_VALID is set. Currently during heavy traffic we could have: - 10 packets with START_VALID - correct RSSI and RATES - 10 packets with END_VALID - 10 packets with START_VALID - correct RSSI and RATES - 10 packets with END_VALID ... Next using monitor interface we will see: - 10 packets with correct rssi/rates - 10 packets with rssi=-95/rate=6Mbps Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath10k/htt_rx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index be25e160d5f0..f7ecc108ef80 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -1154,8 +1154,6 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
1154 1154
1155 lockdep_assert_held(&htt->rx_ring.lock); 1155 lockdep_assert_held(&htt->rx_ring.lock);
1156 1156
1157 memset(rx_status, 0, sizeof(*rx_status));
1158
1159 fw_desc_len = __le16_to_cpu(rx->prefix.fw_rx_desc_bytes); 1157 fw_desc_len = __le16_to_cpu(rx->prefix.fw_rx_desc_bytes);
1160 fw_desc = (u8 *)&rx->fw_desc; 1158 fw_desc = (u8 *)&rx->fw_desc;
1161 1159
@@ -1164,8 +1162,11 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
1164 mpdu_ranges = htt_rx_ind_get_mpdu_ranges(rx); 1162 mpdu_ranges = htt_rx_ind_get_mpdu_ranges(rx);
1165 1163
1166 /* Fill this once, while this is per-ppdu */ 1164 /* Fill this once, while this is per-ppdu */
1167 rx_status->signal = ATH10K_DEFAULT_NOISE_FLOOR; 1165 if (rx->ppdu.info0 & HTT_RX_INDICATION_INFO0_START_VALID) {
1168 rx_status->signal += rx->ppdu.combined_rssi; 1166 memset(rx_status, 0, sizeof(*rx_status));
1167 rx_status->signal = ATH10K_DEFAULT_NOISE_FLOOR +
1168 rx->ppdu.combined_rssi;
1169 }
1169 1170
1170 if (rx->ppdu.info0 & HTT_RX_INDICATION_INFO0_END_VALID) { 1171 if (rx->ppdu.info0 & HTT_RX_INDICATION_INFO0_END_VALID) {
1171 /* TSF available only in 32-bit */ 1172 /* TSF available only in 32-bit */