diff options
-rw-r--r-- | net/mac80211/mesh.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 8bad414c52ad..19205c821dee 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -254,6 +254,8 @@ int mesh_add_meshconf_ie(struct ieee80211_sub_if_data *sdata, | |||
254 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; | 254 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; |
255 | u8 *pos, neighbors; | 255 | u8 *pos, neighbors; |
256 | u8 meshconf_len = sizeof(struct ieee80211_meshconf_ie); | 256 | u8 meshconf_len = sizeof(struct ieee80211_meshconf_ie); |
257 | bool is_connected_to_gate = ifmsh->num_gates > 0 || | ||
258 | ifmsh->mshcfg.dot11MeshGateAnnouncementProtocol; | ||
257 | 259 | ||
258 | if (skb_tailroom(skb) < 2 + meshconf_len) | 260 | if (skb_tailroom(skb) < 2 + meshconf_len) |
259 | return -ENOMEM; | 261 | return -ENOMEM; |
@@ -278,7 +280,7 @@ int mesh_add_meshconf_ie(struct ieee80211_sub_if_data *sdata, | |||
278 | /* Mesh Formation Info - number of neighbors */ | 280 | /* Mesh Formation Info - number of neighbors */ |
279 | neighbors = atomic_read(&ifmsh->estab_plinks); | 281 | neighbors = atomic_read(&ifmsh->estab_plinks); |
280 | neighbors = min_t(int, neighbors, IEEE80211_MAX_MESH_PEERINGS); | 282 | neighbors = min_t(int, neighbors, IEEE80211_MAX_MESH_PEERINGS); |
281 | *pos++ = neighbors << 1; | 283 | *pos++ = (neighbors << 1) | is_connected_to_gate; |
282 | /* Mesh capability */ | 284 | /* Mesh capability */ |
283 | *pos = 0x00; | 285 | *pos = 0x00; |
284 | *pos |= ifmsh->mshcfg.dot11MeshForwarding ? | 286 | *pos |= ifmsh->mshcfg.dot11MeshForwarding ? |