{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
@@ -2028,6 +2028,9 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
|
||||
nconf->dot11MeshAwakeWindowDuration;
|
||||
if (_chg_mesh_attr(NL80211_MESHCONF_PLINK_TIMEOUT, mask))
|
||||
conf->plink_timeout = nconf->plink_timeout;
|
||||
if (_chg_mesh_attr(NL80211_MESHCONF_CONNECTED_TO_GATE, mask))
|
||||
conf->dot11MeshConnectedToMeshGate =
|
||||
nconf->dot11MeshConnectedToMeshGate;
|
||||
ieee80211_mbss_info_change_notify(sdata, BSS_CHANGED_BEACON);
|
||||
return 0;
|
||||
}
|
||||
|
@@ -641,6 +641,8 @@ IEEE80211_IF_FILE(dot11MeshHWMPconfirmationInterval,
|
||||
IEEE80211_IF_FILE(power_mode, u.mesh.mshcfg.power_mode, DEC);
|
||||
IEEE80211_IF_FILE(dot11MeshAwakeWindowDuration,
|
||||
u.mesh.mshcfg.dot11MeshAwakeWindowDuration, DEC);
|
||||
IEEE80211_IF_FILE(dot11MeshConnectedToMeshGate,
|
||||
u.mesh.mshcfg.dot11MeshConnectedToMeshGate, DEC);
|
||||
#endif
|
||||
|
||||
#define DEBUGFS_ADD_MODE(name, mode) \
|
||||
@@ -762,6 +764,7 @@ static void add_mesh_config(struct ieee80211_sub_if_data *sdata)
|
||||
MESHPARAMS_ADD(dot11MeshHWMPconfirmationInterval);
|
||||
MESHPARAMS_ADD(power_mode);
|
||||
MESHPARAMS_ADD(dot11MeshAwakeWindowDuration);
|
||||
MESHPARAMS_ADD(dot11MeshConnectedToMeshGate);
|
||||
#undef MESHPARAMS_ADD
|
||||
}
|
||||
#endif
|
||||
|
@@ -255,7 +255,8 @@ int mesh_add_meshconf_ie(struct ieee80211_sub_if_data *sdata,
|
||||
u8 *pos, neighbors;
|
||||
u8 meshconf_len = sizeof(struct ieee80211_meshconf_ie);
|
||||
bool is_connected_to_gate = ifmsh->num_gates > 0 ||
|
||||
ifmsh->mshcfg.dot11MeshGateAnnouncementProtocol;
|
||||
ifmsh->mshcfg.dot11MeshGateAnnouncementProtocol ||
|
||||
ifmsh->mshcfg.dot11MeshConnectedToMeshGate;
|
||||
|
||||
if (skb_tailroom(skb) < 2 + meshconf_len)
|
||||
return -ENOMEM;
|
||||
|
Reference in New Issue
Block a user