aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-02-17 06:24:57 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:52:39 -0500
commit98c8a60a04316e94ccea8221cf16768ce91bd214 (patch)
treec698e0526f7521bf0f7bd0122c0ee6a2ab08eb1c /include
parentfdbf7335ea1a4048ff4818bf15bdcab1925dc6df (diff)
nl80211: Provide access to STA TX/RX packet counters
The TX/RX packet counters are needed to fill in RADIUS Accounting attributes Acct-Output-Packets and Acct-Input-Packets. We already collect the needed information, but only the TX/RX bytes were previously exposed through nl80211. Allow applications to fetch the packet counters, too, to provide more complete support for accounting. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h5
-rw-r--r--include/net/cfg80211.h8
2 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 8802d1bda382..f6e56370ea65 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -526,6 +526,9 @@ enum nl80211_rate_info {
526 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) 526 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
527 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute 527 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
528 * containing info as possible, see &enum nl80211_sta_info_txrate. 528 * containing info as possible, see &enum nl80211_sta_info_txrate.
529 * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station)
530 * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this
531 * station)
529 */ 532 */
530enum nl80211_sta_info { 533enum nl80211_sta_info {
531 __NL80211_STA_INFO_INVALID, 534 __NL80211_STA_INFO_INVALID,
@@ -537,6 +540,8 @@ enum nl80211_sta_info {
537 NL80211_STA_INFO_PLINK_STATE, 540 NL80211_STA_INFO_PLINK_STATE,
538 NL80211_STA_INFO_SIGNAL, 541 NL80211_STA_INFO_SIGNAL,
539 NL80211_STA_INFO_TX_BITRATE, 542 NL80211_STA_INFO_TX_BITRATE,
543 NL80211_STA_INFO_RX_PACKETS,
544 NL80211_STA_INFO_TX_PACKETS,
540 545
541 /* keep last */ 546 /* keep last */
542 __NL80211_STA_INFO_AFTER_LAST, 547 __NL80211_STA_INFO_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 33f43b0d08fb..8dcc46444037 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -178,6 +178,8 @@ struct station_parameters {
178 * @STATION_INFO_SIGNAL: @signal filled 178 * @STATION_INFO_SIGNAL: @signal filled
179 * @STATION_INFO_TX_BITRATE: @tx_bitrate fields are filled 179 * @STATION_INFO_TX_BITRATE: @tx_bitrate fields are filled
180 * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs) 180 * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs)
181 * @STATION_INFO_RX_PACKETS: @rx_packets filled
182 * @STATION_INFO_TX_PACKETS: @tx_packets filled
181 */ 183 */
182enum station_info_flags { 184enum station_info_flags {
183 STATION_INFO_INACTIVE_TIME = 1<<0, 185 STATION_INFO_INACTIVE_TIME = 1<<0,
@@ -188,6 +190,8 @@ enum station_info_flags {
188 STATION_INFO_PLINK_STATE = 1<<5, 190 STATION_INFO_PLINK_STATE = 1<<5,
189 STATION_INFO_SIGNAL = 1<<6, 191 STATION_INFO_SIGNAL = 1<<6,
190 STATION_INFO_TX_BITRATE = 1<<7, 192 STATION_INFO_TX_BITRATE = 1<<7,
193 STATION_INFO_RX_PACKETS = 1<<8,
194 STATION_INFO_TX_PACKETS = 1<<9,
191}; 195};
192 196
193/** 197/**
@@ -235,6 +239,8 @@ struct rate_info {
235 * @plink_state: mesh peer link state 239 * @plink_state: mesh peer link state
236 * @signal: signal strength of last received packet in dBm 240 * @signal: signal strength of last received packet in dBm
237 * @txrate: current unicast bitrate to this station 241 * @txrate: current unicast bitrate to this station
242 * @rx_packets: packets received from this station
243 * @tx_packets: packets transmitted to this station
238 */ 244 */
239struct station_info { 245struct station_info {
240 u32 filled; 246 u32 filled;
@@ -246,6 +252,8 @@ struct station_info {
246 u8 plink_state; 252 u8 plink_state;
247 s8 signal; 253 s8 signal;
248 struct rate_info txrate; 254 struct rate_info txrate;
255 u32 rx_packets;
256 u32 tx_packets;
249}; 257};
250 258
251/** 259/**