summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_plink.c
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2018-10-25 15:48:53 -0400
committerJohannes Berg <johannes.berg@intel.com>2018-11-09 11:38:29 +0100
commitdbdaee7aa6e61f56aac61b71a7807e76f92cc895 (patch)
treecfa0018280f5a983d6b77a475349388fc125375f /net/mac80211/mesh_plink.c
parent4a6ecd35f95b0e29b3470ca16772a1cc89607c97 (diff)
downloadlinux-dbdaee7aa6e61f56aac61b71a7807e76f92cc895.tar.bz2
{nl,mac}80211: report gate connectivity in station info
Capture the current state of gate connectivity from the mesh formation field in mesh config whenever we receive a beacon, and report that via GET_STATION. This allows applications doing mesh peering in userspace to make peering decisions based on peers' current upstream connectivity. Signed-off-by: Bob Copeland <bobcopeland@fb.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r--net/mac80211/mesh_plink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 5b5b0f95ffd1..5f45a2b273df 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -590,6 +590,9 @@ void mesh_neighbour_update(struct ieee80211_sub_if_data *sdata,
if (!sta)
goto out;
+ sta->mesh->connected_to_gate = elems->mesh_config->meshconf_form &
+ IEEE80211_MESHCONF_FORM_CONNECTED_TO_GATE;
+
if (mesh_peer_accepts_plinks(elems) &&
sta->mesh->plink_state == NL80211_PLINK_LISTEN &&
sdata->u.mesh.accepting_plinks &&