aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-12-20 04:53:29 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:58:34 -0500
commit84e3196ff867c623056eea02c11a45e046490d89 (patch)
treea2f5c1d69a63b22f202713a501762a777e04d19a /drivers/net/wireless/rt2x00/rt2x00.h
parent7d7f19ccb777946df0a8fb7c83189ba2ae08b02e (diff)
rt2x00: Move link tuning into seperate file
Move link and antenna tuning into a seperate file named rt2x00link.c, this makes the interface to the link tuner a lot cleaner. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h29
1 files changed, 1 insertions, 28 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 39ecf3b82ca1..19c068727a85 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -212,7 +212,7 @@ struct link_qual {
212 * (WEIGHT_TX * tx_percentage) + 212 * (WEIGHT_TX * tx_percentage) +
213 * (WEIGHT_RX * rx_percentage)) / 100 213 * (WEIGHT_RX * rx_percentage)) / 100
214 * 214 *
215 * This value should then be checked to not be greated then 100. 215 * This value should then be checked to not be greater then 100.
216 */ 216 */
217 int rx_percentage; 217 int rx_percentage;
218 int rx_success; 218 int rx_success;
@@ -318,33 +318,6 @@ static inline int rt2x00_get_link_rssi(struct link *link)
318 return DEFAULT_RSSI; 318 return DEFAULT_RSSI;
319} 319}
320 320
321static inline int rt2x00_get_link_ant_rssi(struct link *link)
322{
323 if (link->ant.rssi_ant && link->qual.rx_success)
324 return link->ant.rssi_ant;
325 return DEFAULT_RSSI;
326}
327
328static inline void rt2x00_reset_link_ant_rssi(struct link *link)
329{
330 link->ant.rssi_ant = 0;
331}
332
333static inline int rt2x00_get_link_ant_rssi_history(struct link *link,
334 enum antenna ant)
335{
336 if (link->ant.rssi_history[ant - ANTENNA_A])
337 return link->ant.rssi_history[ant - ANTENNA_A];
338 return DEFAULT_RSSI;
339}
340
341static inline int rt2x00_update_ant_rssi(struct link *link, int rssi)
342{
343 int old_rssi = link->ant.rssi_history[link->ant.active.rx - ANTENNA_A];
344 link->ant.rssi_history[link->ant.active.rx - ANTENNA_A] = rssi;
345 return old_rssi;
346}
347
348/* 321/*
349 * Interface structure 322 * Interface structure
350 * Per interface configuration details, this structure 323 * Per interface configuration details, this structure