Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158900
b: refs/heads/master
c: 7d5ca3b
h: refs/heads/master
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Jul 10, 2009
1 parent a1988c6 commit cb2233e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 23b149c1890f9a55f065c6b7842e9383d22e0c04
refs/heads/master: 7d5ca3b8b2b38ab676d0adc268a3c6a82e7a7588
29 changes: 25 additions & 4 deletions trunk/drivers/net/wireless/ath/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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->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
* each possible mode used. */
rx_status->qual = ds->ds_rxstat.rs_rssi * 100 / 45;
/*
* 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
*
*/
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
* should be considered at 100% */
Expand Down

0 comments on commit cb2233e

Please sign in to comment.