{nl,mac}80211: add dot11MeshConnectedToMeshGate to meshconf
When userspace is controlling mesh routing, it may have better knowledge about whether a mesh STA is connected to a mesh gate than the kernel mpath table. Add dot11MeshConnectedToMeshGate to the mesh config so that such applications can explicitly signal that a mesh STA is connected to a gate, which will then be advertised in the beacon. Signed-off-by: Bob Copeland <bobcopeland@fb.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
dbdaee7aa6
commit
01d66fbd5b
@@ -6275,7 +6275,9 @@ static int nl80211_get_mesh_config(struct sk_buff *skb,
|
||||
nla_put_u16(msg, NL80211_MESHCONF_AWAKE_WINDOW,
|
||||
cur_params.dot11MeshAwakeWindowDuration) ||
|
||||
nla_put_u32(msg, NL80211_MESHCONF_PLINK_TIMEOUT,
|
||||
cur_params.plink_timeout))
|
||||
cur_params.plink_timeout) ||
|
||||
nla_put_u8(msg, NL80211_MESHCONF_CONNECTED_TO_GATE,
|
||||
cur_params.dot11MeshConnectedToMeshGate))
|
||||
goto nla_put_failure;
|
||||
nla_nest_end(msg, pinfoattr);
|
||||
genlmsg_end(msg, hdr);
|
||||
@@ -6332,6 +6334,7 @@ nl80211_meshconf_params_policy[NL80211_MESHCONF_ATTR_MAX+1] = {
|
||||
NL80211_MESH_POWER_MAX),
|
||||
[NL80211_MESHCONF_AWAKE_WINDOW] = { .type = NLA_U16 },
|
||||
[NL80211_MESHCONF_PLINK_TIMEOUT] = { .type = NLA_U32 },
|
||||
[NL80211_MESHCONF_CONNECTED_TO_GATE] = NLA_POLICY_RANGE(NLA_U8, 0, 1),
|
||||
};
|
||||
|
||||
static const struct nla_policy
|
||||
@@ -6443,6 +6446,9 @@ do { \
|
||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, mask,
|
||||
NL80211_MESHCONF_RSSI_THRESHOLD,
|
||||
nla_get_s32);
|
||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshConnectedToMeshGate, mask,
|
||||
NL80211_MESHCONF_CONNECTED_TO_GATE,
|
||||
nla_get_u8);
|
||||
/*
|
||||
* Check HT operation mode based on
|
||||
* IEEE 802.11-2016 9.4.2.57 HT Operation element.
|
||||
|
Reference in New Issue
Block a user