aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-10-13 17:08:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:20 -0400
commitc49d154a800c55b8948e6d34563e593b500b31b9 (patch)
tree3af13e2b6d95afffb067e7577dd79c20254c6872 /drivers
parent4fe0657ed41590ea4c2d4920c76836cb4a483caf (diff)
ath9k: correct signal quality report
This adjusts ath9k's signal quality reporting taking into consideration received beacons at an RSSI of 45 should indicate you can use of MCS 15 rate (144 Mbps) reliably on dual stream card. Keep in mind mac80211 does not yet have aggregation fixed but this should still provide more accurate results. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath9k/main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 7555c3413384..32acaf7ff622 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -279,8 +279,15 @@ static void ath9k_rx_prepare(struct ath_softc *sc,
279 rx_status->rate_idx = ath_rate2idx(sc, (status->rateKbps / 100)); 279 rx_status->rate_idx = ath_rate2idx(sc, (status->rateKbps / 100));
280 rx_status->antenna = status->antenna; 280 rx_status->antenna = status->antenna;
281 281
282 /* XXX Fix me, 64 cannot be the max rssi value, rigure it out */ 282 /* at 45 you will be able to use MCS 15 reliably. A more elaborate
283 rx_status->qual = status->rssi * 100 / 64; 283 * scheme can be used here but it requires tables of SNR/throughput for
284 * each possible mode used. */
285 rx_status->qual = status->rssi * 100 / 45;
286
287 /* rssi can be more than 45 though, anything above that
288 * should be considered at 100% */
289 if (rx_status->qual > 100)
290 rx_status->qual = 100;
284 291
285 if (status->flags & ATH_RX_MIC_ERROR) 292 if (status->flags & ATH_RX_MIC_ERROR)
286 rx_status->flag |= RX_FLAG_MMIC_ERROR; 293 rx_status->flag |= RX_FLAG_MMIC_ERROR;