summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-10-13 16:26:32 +0200
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:02:52 -0800
commit8de8c5162b157884aa4855564cbfd9ec9119c819 (patch)
tree42171390590a9623117846ccd377c4b42e72ddf1 /drivers/net/wireless/rt2x00/rt2x00.h
parent39e75857d08fe35ffad4dd9004580acf0d725b75 (diff)
[PATCH] rt2x00: Remove rt2x00_clear_link
rt2x00_clear_link() was becoming too large for statically inline, also it was used on a single location and shouldn't really be used anywhere else. So move the entire code into the function rt2x00lib_start_link_tuner() Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h18
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;
}
/*