Commit 6e0e0bf8 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville

ath5k: correct ath5k signal quality

This adjusts ath5k's signal quality reporting taking into
consideration received beacons at an RSSI of 35 should indicate
you can use of 54 Mbps on a single stream card (all ath5k cards)
reliably.
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: default avatarNick Kossifidis <mickflemm@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c49d154a
...@@ -1778,7 +1778,17 @@ ath5k_tasklet_rx(unsigned long data) ...@@ -1778,7 +1778,17 @@ ath5k_tasklet_rx(unsigned long data)
rxs.noise = sc->ah->ah_noise_floor; rxs.noise = sc->ah->ah_noise_floor;
rxs.signal = rxs.noise + rs.rs_rssi; rxs.signal = rxs.noise + rs.rs_rssi;
rxs.qual = rs.rs_rssi * 100 / 64;
/* An rssi of 35 indicates you should be able use
* 54 Mbps reliably. A more elaborate scheme can be used
* here but it requires a map of SNR/throughput for each
* possible mode used */
rxs.qual = rs.rs_rssi * 100 / 35;
/* rssi can be more than 35 though, anything above that
* should be considered at 100% */
if (rxs.qual > 100)
rxs.qual = 100;
rxs.antenna = rs.rs_antenna; rxs.antenna = rs.rs_antenna;
rxs.rate_idx = ath5k_hw_to_driver_rix(sc, rs.rs_rate); rxs.rate_idx = ath5k_hw_to_driver_rix(sc, rs.rs_rate);
......
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