aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-08-07 10:17:38 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:43 -0400
commitf5ea9120be2e5d5c846243416cfdce01d02f5836 (patch)
treecade27e47a90dde79a523598b96a2ebb50770d2f /include/net/cfg80211.h
parentf401a6f7ede753e56b84025e7d2db0d5ef560ce6 (diff)
nl80211: add generation number to all dumps
In order for userspace to be able to figure out whether it obtained a consistent snapshot of data or not when using netlink dumps, we need to have a generation number in each dump message that indicates whether the list has changed or not -- its value is arbitrary. This patch adds such a number to all dumps, this needs some mac80211 involvement to keep track of a generation number to start with when adding/removing mesh paths or stations. The wiphy and netdev lists can be fully handled within cfg80211, of course, but generation numbers need to be stored there as well. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 1ee30fcd6fdc..de7d116acc3d 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -372,6 +372,10 @@ struct rate_info {
372 * @txrate: current unicast bitrate to this station 372 * @txrate: current unicast bitrate to this station
373 * @rx_packets: packets received from this station 373 * @rx_packets: packets received from this station
374 * @tx_packets: packets transmitted to this station 374 * @tx_packets: packets transmitted to this station
375 * @generation: generation number for nl80211 dumps.
376 * This number should increase every time the list of stations
377 * changes, i.e. when a station is added or removed, so that
378 * userspace can tell whether it got a consistent snapshot.
375 */ 379 */
376struct station_info { 380struct station_info {
377 u32 filled; 381 u32 filled;
@@ -385,6 +389,8 @@ struct station_info {
385 struct rate_info txrate; 389 struct rate_info txrate;
386 u32 rx_packets; 390 u32 rx_packets;
387 u32 tx_packets; 391 u32 tx_packets;
392
393 int generation;
388}; 394};
389 395
390/** 396/**
@@ -444,6 +450,10 @@ enum mpath_info_flags {
444 * @flags: mesh path flags 450 * @flags: mesh path flags
445 * @discovery_timeout: total mesh path discovery timeout, in msecs 451 * @discovery_timeout: total mesh path discovery timeout, in msecs
446 * @discovery_retries: mesh path discovery retries 452 * @discovery_retries: mesh path discovery retries
453 * @generation: generation number for nl80211 dumps.
454 * This number should increase every time the list of mesh paths
455 * changes, i.e. when a station is added or removed, so that
456 * userspace can tell whether it got a consistent snapshot.
447 */ 457 */
448struct mpath_info { 458struct mpath_info {
449 u32 filled; 459 u32 filled;
@@ -454,6 +464,8 @@ struct mpath_info {
454 u32 discovery_timeout; 464 u32 discovery_timeout;
455 u8 discovery_retries; 465 u8 discovery_retries;
456 u8 flags; 466 u8 flags;
467
468 int generation;
457}; 469};
458 470
459/** 471/**