Commit 7d5ca3b8 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville

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: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 23b149c1
...@@ -236,10 +236,31 @@ static int ath_rx_prepare(struct sk_buff *skb, struct ath_desc *ds, ...@@ -236,10 +236,31 @@ static int ath_rx_prepare(struct sk_buff *skb, struct ath_desc *ds,
rx_status->signal = rx_status->noise + ds->ds_rxstat.rs_rssi; rx_status->signal = rx_status->noise + ds->ds_rxstat.rs_rssi;
rx_status->antenna = ds->ds_rxstat.rs_antenna; rx_status->antenna = ds->ds_rxstat.rs_antenna;
/* at 45 you will be able to use MCS 15 reliably. A more elaborate /*
* scheme can be used here but it requires tables of SNR/throughput for * Theory for reporting quality:
* each possible mode used. */ *
rx_status->qual = ds->ds_rxstat.rs_rssi * 100 / 45; * 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
*
*/
if (conf_is_ht(&hw->conf))
rx_status->qual = ds->ds_rxstat.rs_rssi * 100 / 45;
else
rx_status->qual = ds->ds_rxstat.rs_rssi * 100 / 35;
/* rssi can be more than 45 though, anything above that /* rssi can be more than 45 though, anything above that
* should be considered at 100% */ * should be considered at 100% */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment