aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-06-19 14:57:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:55 -0400
commit7d5ca3b8b2b38ab676d0adc268a3c6a82e7a7588 (patch)
tree6ed7ec7159815f12f02af7e8c185b2d9d1a1c3bd /drivers
parent23b149c1890f9a55f065c6b7842e9383d22e0c04 (diff)
ath9k: differentiate quality reporting between legacy and HT configurations
We were not differentiating quality between legacy and HT configurations. We change this to consider the differences. New theory for reporting quality: At a hardware RSSI of 45 you will be able to use MCS 7 reliably. At a hardware RSSI of 45 you will be able to use MCS 15 reliably. At a hardware RSSI of 35 you should be able use 54 Mbps reliably. MCS 7 is the highets MCS index usable by a 1-stream device. MCS 15 is the highest MCS index usable by a 2-stream device. All ath9k devices are either 1-stream or 2-stream. How many bars you see is derived from the qual reporting. A more elaborate scheme can be used here but it requires tables of SNR/throughput for each possible mode used. For the MCS table you can refer to the wireless wiki: http://wireless.kernel.org/en/developers/Documentation/ieee80211/802.11n This should fix this bug report: http://bugzilla.kernel.org/show_bug.cgi?id=13537 Cc: Janath.Peiris@atheros.com Cc: Matt.Smith@atheros.com 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/ath/ath9k/recv.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 2b2872baaa30..b3da81db453b 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -236,10 +236,31 @@ static int ath_rx_prepare(struct sk_buff *skb, struct ath_desc *ds,
236 rx_status->signal = rx_status->noise + ds->ds_rxstat.rs_rssi; 236 rx_status->signal = rx_status->noise + ds->ds_rxstat.rs_rssi;
237 rx_status->antenna = ds->ds_rxstat.rs_antenna; 237 rx_status->antenna = ds->ds_rxstat.rs_antenna;
238 238
239 /* at 45 you will be able to use MCS 15 reliably. A more elaborate 239 /*
240 * scheme can be used here but it requires tables of SNR/throughput for 240 * Theory for reporting quality:
241 * each possible mode used. */ 241 *
242 rx_status->qual = ds->ds_rxstat.rs_rssi * 100 / 45; 242 * At a hardware RSSI of 45 you will be able to use MCS 7 reliably.
243 * At a hardware RSSI of 45 you will be able to use MCS 15 reliably.
244 * At a hardware RSSI of 35 you should be able use 54 Mbps reliably.
245 *
246 * MCS 7 is the highets MCS index usable by a 1-stream device.
247 * MCS 15 is the highest MCS index usable by a 2-stream device.
248 *
249 * All ath9k devices are either 1-stream or 2-stream.
250 *
251 * How many bars you see is derived from the qual reporting.
252 *
253 * A more elaborate scheme can be used here but it requires tables
254 * of SNR/throughput for each possible mode used. For the MCS table
255 * you can refer to the wireless wiki:
256 *
257 * http://wireless.kernel.org/en/developers/Documentation/ieee80211/802.11n
258 *
259 */
260 if (conf_is_ht(&hw->conf))
261 rx_status->qual = ds->ds_rxstat.rs_rssi * 100 / 45;
262 else
263 rx_status->qual = ds->ds_rxstat.rs_rssi * 100 / 35;
243 264
244 /* rssi can be more than 45 though, anything above that 265 /* rssi can be more than 45 though, anything above that
245 * should be considered at 100% */ 266 * should be considered at 100% */