aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>2013-02-04 06:53:11 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-04 12:57:22 -0500
commit42745e039312ab4672c60ec584651f0c74e8264f (patch)
tree36c9593c931239d2c9ab4c0edc307506647525dc /include
parent682bd38b8ac1fa3e84e84cddd1f1d7eeebce1212 (diff)
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')
-rw-r--r--include/net/cfg80211.h12
-rw-r--r--include/uapi/linux/nl80211.h4
2 files changed, 12 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 {
672 * @STATION_INFO_SIGNAL: @signal filled 672 * @STATION_INFO_SIGNAL: @signal filled
673 * @STATION_INFO_TX_BITRATE: @txrate fields are filled 673 * @STATION_INFO_TX_BITRATE: @txrate fields are filled
674 * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs) 674 * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs)
675 * @STATION_INFO_RX_PACKETS: @rx_packets filled 675 * @STATION_INFO_RX_PACKETS: @rx_packets filled with 32-bit value
676 * @STATION_INFO_TX_PACKETS: @tx_packets filled 676 * @STATION_INFO_TX_PACKETS: @tx_packets filled with 32-bit value
677 * @STATION_INFO_RX_PACKETS64: @rx_packets filled with 64-bit value
678 * @STATION_INFO_TX_PACKETS64: @tx_packets filled with 64-bit value
677 * @STATION_INFO_TX_RETRIES: @tx_retries filled 679 * @STATION_INFO_TX_RETRIES: @tx_retries filled
678 * @STATION_INFO_TX_FAILED: @tx_failed filled 680 * @STATION_INFO_TX_FAILED: @tx_failed filled
679 * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled 681 * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled
@@ -714,6 +716,8 @@ enum station_info_flags {
714 STATION_INFO_LOCAL_PM = 1<<21, 716 STATION_INFO_LOCAL_PM = 1<<21,
715 STATION_INFO_PEER_PM = 1<<22, 717 STATION_INFO_PEER_PM = 1<<22,
716 STATION_INFO_NONPEER_PM = 1<<23, 718 STATION_INFO_NONPEER_PM = 1<<23,
719 STATION_INFO_RX_BYTES64 = 1<<24,
720 STATION_INFO_TX_BYTES64 = 1<<25,
717}; 721};
718 722
719/** 723/**
@@ -835,8 +839,8 @@ struct station_info {
835 u32 filled; 839 u32 filled;
836 u32 connected_time; 840 u32 connected_time;
837 u32 inactive_time; 841 u32 inactive_time;
838 u32 rx_bytes; 842 u64 rx_bytes;
839 u32 tx_bytes; 843 u64 tx_bytes;
840 u16 llid; 844 u16 llid;
841 u16 plid; 845 u16 plid;
842 u8 plink_state; 846 u8 plink_state;
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 225a65e72219..9a2ecdc4136c 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1857,6 +1857,8 @@ enum nl80211_sta_bss_param {
1857 * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) 1857 * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs)
1858 * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) 1858 * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station)
1859 * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) 1859 * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station)
1860 * @NL80211_STA_INFO_RX_BYTES64: total received bytes (u64, from this station)
1861 * @NL80211_STA_INFO_TX_BYTES64: total transmitted bytes (u64, to this station)
1860 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) 1862 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
1861 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute 1863 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
1862 * containing info as possible, see &enum nl80211_rate_info 1864 * containing info as possible, see &enum nl80211_rate_info
@@ -1909,6 +1911,8 @@ enum nl80211_sta_info {
1909 NL80211_STA_INFO_LOCAL_PM, 1911 NL80211_STA_INFO_LOCAL_PM,
1910 NL80211_STA_INFO_PEER_PM, 1912 NL80211_STA_INFO_PEER_PM,
1911 NL80211_STA_INFO_NONPEER_PM, 1913 NL80211_STA_INFO_NONPEER_PM,
1914 NL80211_STA_INFO_RX_BYTES64,
1915 NL80211_STA_INFO_TX_BYTES64,
1912 1916
1913 /* keep last */ 1917 /* keep last */
1914 __NL80211_STA_INFO_AFTER_LAST, 1918 __NL80211_STA_INFO_AFTER_LAST,