diff options
author | Bruno Randolf <br1@einfach.org> | 2010-11-15 20:58:48 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-18 14:22:20 -0500 |
commit | 86107fd170bc379869250eb7e1bd393a3a70e8ae (patch) | |
tree | 579ee24be87e94246450420f4de57d8eda942848 /include | |
parent | eef39befaae2a1559efe197d795c376a317af2af (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.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nl80211.h | 2 | ||||
-rw-r--r-- | include/net/cfg80211.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 037b4e49889..1ce3775e9e2 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -1161,6 +1161,7 @@ enum nl80211_rate_info { | |||
1161 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 1161 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
1162 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 1162 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
1163 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | 1163 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) |
1164 | * @NL80211_STA_INFO_SIGNAL_AVG: signal strength average (u8, dBm) | ||
1164 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | 1165 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute |
1165 | * containing info as possible, see &enum nl80211_sta_info_txrate. | 1166 | * containing info as possible, see &enum nl80211_sta_info_txrate. |
1166 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) | 1167 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) |
@@ -1178,6 +1179,7 @@ enum nl80211_sta_info { | |||
1178 | NL80211_STA_INFO_PLID, | 1179 | NL80211_STA_INFO_PLID, |
1179 | NL80211_STA_INFO_PLINK_STATE, | 1180 | NL80211_STA_INFO_PLINK_STATE, |
1180 | NL80211_STA_INFO_SIGNAL, | 1181 | NL80211_STA_INFO_SIGNAL, |
1182 | NL80211_STA_INFO_SIGNAL_AVG, | ||
1181 | NL80211_STA_INFO_TX_BITRATE, | 1183 | NL80211_STA_INFO_TX_BITRATE, |
1182 | NL80211_STA_INFO_RX_PACKETS, | 1184 | NL80211_STA_INFO_RX_PACKETS, |
1183 | NL80211_STA_INFO_TX_PACKETS, | 1185 | NL80211_STA_INFO_TX_PACKETS, |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 8fd9eebd0cc..69e2364889f 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -424,6 +424,7 @@ struct station_parameters { | |||
424 | * @STATION_INFO_TX_RETRIES: @tx_retries filled | 424 | * @STATION_INFO_TX_RETRIES: @tx_retries filled |
425 | * @STATION_INFO_TX_FAILED: @tx_failed filled | 425 | * @STATION_INFO_TX_FAILED: @tx_failed filled |
426 | * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled | 426 | * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled |
427 | * @STATION_INFO_SIGNAL_AVG: @signal_avg filled | ||
427 | */ | 428 | */ |
428 | enum station_info_flags { | 429 | enum station_info_flags { |
429 | STATION_INFO_INACTIVE_TIME = 1<<0, | 430 | STATION_INFO_INACTIVE_TIME = 1<<0, |
@@ -439,6 +440,7 @@ enum station_info_flags { | |||
439 | STATION_INFO_TX_RETRIES = 1<<10, | 440 | STATION_INFO_TX_RETRIES = 1<<10, |
440 | STATION_INFO_TX_FAILED = 1<<11, | 441 | STATION_INFO_TX_FAILED = 1<<11, |
441 | STATION_INFO_RX_DROP_MISC = 1<<12, | 442 | STATION_INFO_RX_DROP_MISC = 1<<12, |
443 | STATION_INFO_SIGNAL_AVG = 1<<13, | ||
442 | }; | 444 | }; |
443 | 445 | ||
444 | /** | 446 | /** |
@@ -485,6 +487,7 @@ struct rate_info { | |||
485 | * @plid: mesh peer link id | 487 | * @plid: mesh peer link id |
486 | * @plink_state: mesh peer link state | 488 | * @plink_state: mesh peer link state |
487 | * @signal: signal strength of last received packet in dBm | 489 | * @signal: signal strength of last received packet in dBm |
490 | * @signal_avg: signal strength average in dBm | ||
488 | * @txrate: current unicast bitrate to this station | 491 | * @txrate: current unicast bitrate to this station |
489 | * @rx_packets: packets received from this station | 492 | * @rx_packets: packets received from this station |
490 | * @tx_packets: packets transmitted to this station | 493 | * @tx_packets: packets transmitted to this station |
@@ -505,6 +508,7 @@ struct station_info { | |||
505 | u16 plid; | 508 | u16 plid; |
506 | u8 plink_state; | 509 | u8 plink_state; |
507 | s8 signal; | 510 | s8 signal; |
511 | s8 signal_avg; | ||
508 | struct rate_info txrate; | 512 | struct rate_info txrate; |
509 | u32 rx_packets; | 513 | u32 rx_packets; |
510 | u32 tx_packets; | 514 | u32 tx_packets; |