diff options
Diffstat (limited to 'drivers/net/wireless/ath5k/base.c')
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 3201c1604340..c76ada178781 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -458,13 +458,11 @@ ath5k_pci_probe(struct pci_dev *pdev, | |||
458 | 458 | ||
459 | /* Initialize driver private data */ | 459 | /* Initialize driver private data */ |
460 | SET_IEEE80211_DEV(hw, &pdev->dev); | 460 | SET_IEEE80211_DEV(hw, &pdev->dev); |
461 | hw->flags = IEEE80211_HW_RX_INCLUDES_FCS; | 461 | hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | |
462 | IEEE80211_HW_SIGNAL_DBM | | ||
463 | IEEE80211_HW_NOISE_DBM; | ||
462 | hw->extra_tx_headroom = 2; | 464 | hw->extra_tx_headroom = 2; |
463 | hw->channel_change_time = 5000; | 465 | hw->channel_change_time = 5000; |
464 | /* these names are misleading */ | ||
465 | hw->max_rssi = -110; /* signal in dBm */ | ||
466 | hw->max_noise = -110; /* noise in dBm */ | ||
467 | hw->max_signal = 100; /* we will provide a percentage based on rssi */ | ||
468 | sc = hw->priv; | 466 | sc = hw->priv; |
469 | sc->hw = hw; | 467 | sc->hw = hw; |
470 | sc->pdev = pdev; | 468 | sc->pdev = pdev; |
@@ -1787,6 +1785,8 @@ ath5k_tasklet_rx(unsigned long data) | |||
1787 | 1785 | ||
1788 | spin_lock(&sc->rxbuflock); | 1786 | spin_lock(&sc->rxbuflock); |
1789 | do { | 1787 | do { |
1788 | rxs.flag = 0; | ||
1789 | |||
1790 | if (unlikely(list_empty(&sc->rxbuf))) { | 1790 | if (unlikely(list_empty(&sc->rxbuf))) { |
1791 | ATH5K_WARN(sc, "empty rx buf pool\n"); | 1791 | ATH5K_WARN(sc, "empty rx buf pool\n"); |
1792 | break; | 1792 | break; |
@@ -1893,20 +1893,9 @@ accept: | |||
1893 | rxs.freq = sc->curchan->center_freq; | 1893 | rxs.freq = sc->curchan->center_freq; |
1894 | rxs.band = sc->curband->band; | 1894 | rxs.band = sc->curband->band; |
1895 | 1895 | ||
1896 | /* | ||
1897 | * signal quality: | ||
1898 | * the names here are misleading and the usage of these | ||
1899 | * values by iwconfig makes it even worse | ||
1900 | */ | ||
1901 | /* noise floor in dBm, from the last noise calibration */ | ||
1902 | rxs.noise = sc->ah->ah_noise_floor; | 1896 | rxs.noise = sc->ah->ah_noise_floor; |
1903 | /* signal level in dBm */ | 1897 | rxs.signal = rxs.noise + rs.rs_rssi; |
1904 | rxs.ssi = rxs.noise + rs.rs_rssi; | 1898 | rxs.qual = rs.rs_rssi * 100 / 64; |
1905 | /* | ||
1906 | * "signal" is actually displayed as Link Quality by iwconfig | ||
1907 | * we provide a percentage based on rssi (assuming max rssi 64) | ||
1908 | */ | ||
1909 | rxs.signal = rs.rs_rssi * 100 / 64; | ||
1910 | 1899 | ||
1911 | rxs.antenna = rs.rs_antenna; | 1900 | rxs.antenna = rs.rs_antenna; |
1912 | rxs.rate_idx = ath5k_hw_to_driver_rix(sc, rs.rs_rate); | 1901 | rxs.rate_idx = ath5k_hw_to_driver_rix(sc, rs.rs_rate); |