aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
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