aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2010-12-02 05:12:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-07 16:09:12 -0500
commit541a45a142df281c974d74eac2066138fc107b23 (patch)
treeb96f4808c3f17f2f560db9569ca2b08dba9eab67 /include/net
parent22de94de7de78b8de2fb1f2df5aa85b5556cfcfd (diff)
nl80211/mac80211: Report signal average
Extend nl80211 to report an exponential weighted moving average (EWMA) of the signal value. Since the signal value usually fluctuates between different packets, an average can be more useful than the value of the last packet. This uses the recently added generic EWMA library function. -- v2: fix ABI breakage and change factor to be a power of 2. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg80211.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 788c3989a9e..8764c9a5bab 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -420,6 +420,7 @@ struct station_parameters {
420 * @STATION_INFO_TX_RETRIES: @tx_retries filled 420 * @STATION_INFO_TX_RETRIES: @tx_retries filled
421 * @STATION_INFO_TX_FAILED: @tx_failed filled 421 * @STATION_INFO_TX_FAILED: @tx_failed filled
422 * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled 422 * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled
423 * @STATION_INFO_SIGNAL_AVG: @signal_avg filled
423 */ 424 */
424enum station_info_flags { 425enum station_info_flags {
425 STATION_INFO_INACTIVE_TIME = 1<<0, 426 STATION_INFO_INACTIVE_TIME = 1<<0,
@@ -435,6 +436,7 @@ enum station_info_flags {
435 STATION_INFO_TX_RETRIES = 1<<10, 436 STATION_INFO_TX_RETRIES = 1<<10,
436 STATION_INFO_TX_FAILED = 1<<11, 437 STATION_INFO_TX_FAILED = 1<<11,
437 STATION_INFO_RX_DROP_MISC = 1<<12, 438 STATION_INFO_RX_DROP_MISC = 1<<12,
439 STATION_INFO_SIGNAL_AVG = 1<<13,
438}; 440};
439 441
440/** 442/**
@@ -481,6 +483,7 @@ struct rate_info {
481 * @plid: mesh peer link id 483 * @plid: mesh peer link id
482 * @plink_state: mesh peer link state 484 * @plink_state: mesh peer link state
483 * @signal: signal strength of last received packet in dBm 485 * @signal: signal strength of last received packet in dBm
486 * @signal_avg: signal strength average in dBm
484 * @txrate: current unicast bitrate to this station 487 * @txrate: current unicast bitrate to this station
485 * @rx_packets: packets received from this station 488 * @rx_packets: packets received from this station
486 * @tx_packets: packets transmitted to this station 489 * @tx_packets: packets transmitted to this station
@@ -501,6 +504,7 @@ struct station_info {
501 u16 plid; 504 u16 plid;
502 u8 plink_state; 505 u8 plink_state;
503 s8 signal; 506 s8 signal;
507 s8 signal_avg;
504 struct rate_info txrate; 508 struct rate_info txrate;
505 u32 rx_packets; 509 u32 rx_packets;
506 u32 tx_packets; 510 u32 tx_packets;