On Tue, Jun 14, 2016 at 12:31:15PM +0900, Masashi Honma wrote: > The "Accepting Additional Mesh Peerings bit == 0" means the peer can not accept > any more peer. So suppress to open the connection to the peer. It looks like this breaks the wpas_mesh_reconnect hwsim test case by triggering a mac80211 bug in counting established plinks.. If I understood the design correctly, mac80211 misses a call to decrement the counter if a mesh STA entry is deleted by user space when plink_state == NL80211_PLINK_ESTAB. Something like this may be needed in mac80211 to fix this: diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 21b1fdf..9a8ffe9 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -148,14 +148,16 @@ u32 mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata) void mesh_sta_cleanup(struct sta_info *sta) { struct ieee80211_sub_if_data *sdata = sta->sdata; - u32 changed; + u32 changed = 0; /* * maybe userspace handles peer allocation and peering, but in either * case the beacon is still generated by the kernel and we might need * an update. */ - changed = mesh_accept_plinks_update(sdata); + if (sta->mesh->plink_state == NL80211_PLINK_ESTAB) + changed |= mesh_plink_dec_estab_count(sdata); + changed |= mesh_accept_plinks_update(sdata); if (!sdata->u.mesh.user_mpm) { changed |= mesh_plink_deactivate(sta); del_timer_sync(&sta->mesh->plink_timer); -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap