blob: cd2efbb7bc61815156c0bd76c46205e27576da23 [file] [log] [blame]
From fd9861fb72e25bf25242551185d0a319305f49bb Mon Sep 17 00:00:00 2001
From: Julan Hsu <julanhsu@google.com>
Date: Tue, 15 Jan 2019 15:28:43 -0800
Subject: [PATCH] FROMGIT: nl80211/mac80211: mesh: add mesh path change count
to mpath info
Expose path change count to destination in mpath info
Signed-off-by: Julan Hsu <julanhsu@google.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry-picked from commit 540bbcb930ed2fc9d6a57e0babea00027a7ecc67
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git)
BUG=b:117941803
TEST=use mpath dump to verify path change over time
Change-Id: Iefdf2c782fda4545c714e2989a04c5d77b809177
Reviewed-on: https://chromium-review.googlesource.com/1450134
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Julan Hsu <julanhsu@google.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
---
include/net/cfg80211.h | 5 ++++-
include/uapi/linux/nl80211.h | 4 +++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 330d6678b29a..f84efe908aae 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1262,7 +1262,8 @@ enum mpath_info_flags {
MPATH_INFO_DISCOVERY_TIMEOUT = BIT(4),
MPATH_INFO_DISCOVERY_RETRIES = BIT(5),
MPATH_INFO_FLAGS = BIT(6),
- MPATH_INFO_HOP_COUNT = BIT(7)
+ MPATH_INFO_HOP_COUNT = BIT(7),
+ MPATH_INFO_PATH_CHANGE = BIT(8),
};
/**
@@ -1283,6 +1284,7 @@ enum mpath_info_flags {
* changes, i.e. when a station is added or removed, so that
* userspace can tell whether it got a consistent snapshot.
* @hop_count: hops to destination
+ * @path_change_count: total number of path changes to destination
*/
struct mpath_info {
u32 filled;
@@ -1294,6 +1296,7 @@ struct mpath_info {
u8 discovery_retries;
u8 flags;
u8 hop_count;
+ u32 path_change_count;
int generation;
};
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 52838f814ab0..60f6d0ce9307 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -2991,8 +2991,9 @@ enum nl80211_mpath_flags {
* @NL80211_MPATH_INFO_DISCOVERY_TIMEOUT: total path discovery timeout, in msec
* @NL80211_MPATH_INFO_DISCOVERY_RETRIES: mesh path discovery retries
* @NL80211_MPATH_INFO_HOP_COUNT: hop count to destination
+ * @NL80211_MPATH_INFO_PATH_CHANGE: total number of path changes to destination
* @NL80211_MPATH_INFO_MAX: highest mesh path information attribute number
- * currently defind
+ * currently defined
* @__NL80211_MPATH_INFO_AFTER_LAST: internal use
*/
enum nl80211_mpath_info {
@@ -3005,6 +3006,7 @@ enum nl80211_mpath_info {
NL80211_MPATH_INFO_DISCOVERY_TIMEOUT,
NL80211_MPATH_INFO_DISCOVERY_RETRIES,
NL80211_MPATH_INFO_HOP_COUNT,
+ NL80211_MPATH_INFO_PATH_CHANGE,
/* keep last */
__NL80211_MPATH_INFO_AFTER_LAST,
--
2.21.0.360.g471c308f928-goog