On Fri, Aug 12, 2011 at 2:31 AM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > On Wed, 2011-08-10 at 14:31 -0700, Thomas Pedersen wrote: >> On Wed, Aug 10, 2011 at 6:47 AM, Johannes Berg >> <johannes@xxxxxxxxxxxxxxxx> wrote: >> > On Tue, 2011-08-09 at 16:45 -0700, Thomas Pedersen wrote: >> >> From: Javier Cardona <javier@xxxxxxxxxxx> >> >> >> >> Allow userspace to set NL80211_MESHCONF_GATE_ANNOUNCEMENTS attribute, >> >> which will advertise this mesh node as being a mesh gate. >> >> NL80211_HWMP_ROOTMODE must be set or this will do nothing. >> > >> > IMHO it should be rejected instead of doing nothing. >> > >> Maybe the "right thing" to do is not require the user to know anything >> about the limitations of our implementation, and instead just enable >> root mode as needed? > > I don't know? Is it a limitation of the implementation? I know > practically nothing about mesh :-) It just didn't seem right to silently > ignore something. Currently we're setting a bit in the Root Announcement (RANN) frames indicating "this root node is also a mesh gate". Obviously this requires the mesh gate to also be a root node. There is a separate Gate Announcement (GANN) protocol in the standard which allows you to define these two separately, but it's not currently implemented. So in v1 of the patch, you would have to do something like: iw mesh0 set mesh_param mesh_hwmp_rootmode=1 iw mesh0 set mesh_param mesh_gate_announcements=1 And the connection between the two would only be apparent to someone familiar with our limited implementation. So in v2, it's enough to just enable mesh gate announcements and root mode will be turned on automagically. This gets sort of ugly if say you turn off root mode and still expect gate announcements to work, or disable gate announcements and now you're still broadcasting as a root node for some reason. (we can't really just disable root mode when we turn of gate announcements, since the two should be independent). That said, this seems preferable to someone doing 'iw mesh0 set mesh_param mesh_gate_announcements=1', and then spending an inordinate time debugging when it should just work. Of course the correct thing to do would be implement the GANN protocol, and then we wouldn't have to go behind the user's back., but this would require significantly more work. The v2 works for now, and does the expected thing as long as you weren't expecting us to enable root mode (arrrgh! what was that thing about mechanism vs. policy?). Consider this patchset as implementing 2/3 of mesh gate functionality and papering over the last 1/3. Of course if you feel strongly about this either way, just let me know and I'll make the appropriate changes. Thanks, Thomas -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html