aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorGravatar Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> 2013-02-04 13:53:11 +0200
committerGravatar Johannes Berg <johannes.berg@intel.com> 2013-02-04 18:57:22 +0100
commit42745e039312ab4672c60ec584651f0c74e8264f (patch)
tree36c9593c931239d2c9ab4c0edc307506647525dc /include/net
parentmac80211: always allow calling ieee80211_connection_loss() (diff)
downloadlinux-42745e039312ab4672c60ec584651f0c74e8264f.tar.gz
linux-42745e039312ab4672c60ec584651f0c74e8264f.tar.bz2
linux-42745e039312ab4672c60ec584651f0c74e8264f.zip
cfg80211: expand per-station byte counters to 64bit
In per-station statistics, present 32bit counters are too small for practical purposes - with gigabit speeds, it get overlapped every few seconds. Expand counters in the struct station_info to be 64-bit. Driver can still fill only 32-bit and indicate in @filled only bits like STATION_INFO_[TR]X_BYTES; in case driver provides full 64-bit counter, it should also set in @filled bit STATION_INFO_[TR]RX_BYTES64 Netlink sends both 32-bit and 64-bit counters, if present, to not break userspace. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> [change to also have 32-bit counters if driver advertises 64-bit] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg80211.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 63599ab6005b..94a0810ef68e 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -672,8 +672,10 @@ struct station_parameters {
* @STATION_INFO_SIGNAL: @signal filled
* @STATION_INFO_TX_BITRATE: @txrate fields are filled
* (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs)
- * @STATION_INFO_RX_PACKETS: @rx_packets filled
- * @STATION_INFO_TX_PACKETS: @tx_packets filled
+ * @STATION_INFO_RX_PACKETS: @rx_packets filled with 32-bit value
+ * @STATION_INFO_TX_PACKETS: @tx_packets filled with 32-bit value
+ * @STATION_INFO_RX_PACKETS64: @rx_packets filled with 64-bit value
+ * @STATION_INFO_TX_PACKETS64: @tx_packets filled with 64-bit value
* @STATION_INFO_TX_RETRIES: @tx_retries filled
* @STATION_INFO_TX_FAILED: @tx_failed filled
* @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled
@@ -714,6 +716,8 @@ enum station_info_flags {
STATION_INFO_LOCAL_PM = 1<<21,
STATION_INFO_PEER_PM = 1<<22,
STATION_INFO_NONPEER_PM = 1<<23,
+ STATION_INFO_RX_BYTES64 = 1<<24,
+ STATION_INFO_TX_BYTES64 = 1<<25,
};
/**
@@ -835,8 +839,8 @@ struct station_info {
u32 filled;
u32 connected_time;
u32 inactive_time;
- u32 rx_bytes;
- u32 tx_bytes;
+ u64 rx_bytes;
+ u64 tx_bytes;
u16 llid;
u16 plid;
u8 plink_state;