Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: provide 64-bit traffic counters
@ 2013-02-05  9:56 Johannes Berg
  2013-02-05 17:21 ` Ben Greear
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2013-02-05  9:56 UTC (permalink / raw)
  To: linux-wireless; +Cc: qca_vkondrat, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

"unsigned long" is already 64-bit on (most?) 64-bit
machines, use u64 and tell cfg80211 that we provide
64-bit counters now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/cfg.c         | 4 ++--
 net/mac80211/ieee80211_i.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index f4f7e76..fb06d13 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -449,8 +449,8 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
 	sinfo->generation = sdata->local->sta_generation;
 
 	sinfo->filled = STATION_INFO_INACTIVE_TIME |
-			STATION_INFO_RX_BYTES |
-			STATION_INFO_TX_BYTES |
+			STATION_INFO_RX_BYTES64 |
+			STATION_INFO_TX_BYTES64 |
 			STATION_INFO_RX_PACKETS |
 			STATION_INFO_TX_PACKETS |
 			STATION_INFO_TX_RETRIES |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 2b06ff1..4631de0 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -822,7 +822,7 @@ struct tpt_led_trigger {
 	unsigned int blink_table_len;
 	struct timer_list timer;
 	unsigned long prev_traffic;
-	unsigned long tx_bytes, rx_bytes;
+	u64 tx_bytes, rx_bytes;
 	unsigned int active, want;
 	bool running;
 };
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-05 17:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-05  9:56 [PATCH] mac80211: provide 64-bit traffic counters Johannes Berg
2013-02-05 17:21 ` Ben Greear
2013-02-05 17:24   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox