diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index c47a1e6333c..d6f0a72b7a0 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h @@ -277,25 +277,13 @@ struct link { }; /* - * Clear all counters inside the link structure. - */ -static inline void rt2x00_clear_link(struct link *link) -{ - link->count = 0; - memset(&link->qual, 0, sizeof(link->qual)); - link->qual.rx_percentage = 50; - link->qual.tx_percentage = 50; -} - -/* * Update the rssi using the walking average approach. */ static inline void rt2x00_update_link_rssi(struct link *link, int rssi) { - if (!link->qual.avg_rssi) - link->qual.avg_rssi = rssi; - else - link->qual.avg_rssi = ((link->qual.avg_rssi * 7) + rssi) / 8; + if (link->qual.avg_rssi) + rssi = ((link->qual.avg_rssi * 7) + rssi) / 8; + link->qual.avg_rssi = rssi; } /* |