* [PATCH v4] mac80211: keep sending peer candidate events while in listen state
@ 2014-11-21 11:24 Nishikawa, Kenzoh
2014-12-12 11:41 ` Johannes Berg
2014-12-15 12:40 ` Johannes Berg
0 siblings, 2 replies; 6+ messages in thread
From: Nishikawa, Kenzoh @ 2014-11-21 11:24 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
Cc: devel@lists.open80211s.org, Johannes Berg,
Bob Copeland (me@bobcopeland.com),
Thomas Pedersen (thomas@noack.us)
Instead of sending peer candidate events just once, send them
as long as the peer remains in the LISTEN state in the peering
state machine, when userspace is implementing the peering manager.
Userspace may silence the events from a peer by progressing
the state machine or by setting the link state to BLOCKED.
Fixes the problem that a mesh peering process won't be fired
again after the previous first peering trial fails due to
like air propagation error if the peering is managed by
user space such as wpa_supplicant.
This patch works with another patch for wpa_supplicant described
here which fires a peering process again triggered by the notice
from kernel.
http://lists.shmoo.com/pipermail/hostap/2014-November/031235.html
Signed-off-by: Kenzoh Nishikawa <Kenzoh.Nishikawa at jp.sony.com>
---
net/mac80211/mesh_plink.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 32c7bd0..dfc429b 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -524,6 +524,13 @@ void mesh_neighbour_update(struct ieee80211_sub_if_data *sdata,
sdata->u.mesh.mshcfg.auto_open_plinks &&
rssi_threshold_check(sta, sdata))
changed = mesh_plink_open(sta);
+ else if (sta->plink_state == NL80211_PLINK_LISTEN &&
+ (sdata->u.mesh.user_mpm ||
+ sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED))
+ cfg80211_notify_new_peer_candidate(sdata->dev, hw_addr,
+ elems->ie_start,
+ elems->total_len,
+ GFP_ATOMIC);
ieee80211_mps_frame_release(sta, elems);
out:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4] mac80211: keep sending peer candidate events while in listen state
2014-11-21 11:24 [PATCH v4] mac80211: keep sending peer candidate events while in listen state Nishikawa, Kenzoh
@ 2014-12-12 11:41 ` Johannes Berg
2014-12-12 16:47 ` Bob Copeland (me@bobcopeland.com)
2014-12-14 2:18 ` Nishikawa, Kenzoh
2014-12-15 12:40 ` Johannes Berg
1 sibling, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2014-12-12 11:41 UTC (permalink / raw)
To: Nishikawa, Kenzoh
Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org,
Bob Copeland (me@bobcopeland.com),
Thomas Pedersen (thomas@noack.us)
On Fri, 2014-11-21 at 11:24 +0000, Nishikawa, Kenzoh wrote:
> Instead of sending peer candidate events just once, send them
> as long as the peer remains in the LISTEN state in the peering
> state machine, when userspace is implementing the peering manager.
> Userspace may silence the events from a peer by progressing
> the state machine or by setting the link state to BLOCKED.
>
> Fixes the problem that a mesh peering process won't be fired
> again after the previous first peering trial fails due to
> like air propagation error if the peering is managed by
> user space such as wpa_supplicant.
>
> This patch works with another patch for wpa_supplicant described
> here which fires a peering process again triggered by the notice
> from kernel.
> http://lists.shmoo.com/pipermail/hostap/2014-November/031235.html
Can any of the mesh folks comment on this?
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4] mac80211: keep sending peer candidate events while in listen state
2014-12-12 11:41 ` Johannes Berg
@ 2014-12-12 16:47 ` Bob Copeland (me@bobcopeland.com)
2014-12-15 12:39 ` Johannes Berg
2014-12-14 2:18 ` Nishikawa, Kenzoh
1 sibling, 1 reply; 6+ messages in thread
From: Bob Copeland (me@bobcopeland.com) @ 2014-12-12 16:47 UTC (permalink / raw)
To: Johannes Berg
Cc: Nishikawa, Kenzoh, linux-wireless@vger.kernel.org,
devel@lists.open80211s.org, Thomas Pedersen (thomas@noack.us)
On Fri, Dec 12, 2014 at 12:41:30PM +0100, Johannes Berg wrote:
> On Fri, 2014-11-21 at 11:24 +0000, Nishikawa, Kenzoh wrote:
> > Instead of sending peer candidate events just once, send them
> > as long as the peer remains in the LISTEN state in the peering
> > state machine, when userspace is implementing the peering manager.
> > Userspace may silence the events from a peer by progressing
> > the state machine or by setting the link state to BLOCKED.
> >
> > Fixes the problem that a mesh peering process won't be fired
> > again after the previous first peering trial fails due to
> > like air propagation error if the peering is managed by
> > user space such as wpa_supplicant.
> >
> > This patch works with another patch for wpa_supplicant described
> > here which fires a peering process again triggered by the notice
> > from kernel.
> > http://lists.shmoo.com/pipermail/hostap/2014-November/031235.html
>
> Can any of the mesh folks comment on this?
I think it's fine. It's not strictly necessary: userspace could
run its own timers to restart peering with any unpeered candidates
periodically, but doing it based on beacon arrival is a little better
since it indicates the peer is still alive, and this is also exactly
how the in-kernel MPM operates.
--
Bob Copeland %% http://bobcopeland.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4] mac80211: keep sending peer candidate events while in listen state
2014-12-12 16:47 ` Bob Copeland (me@bobcopeland.com)
@ 2014-12-15 12:39 ` Johannes Berg
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2014-12-15 12:39 UTC (permalink / raw)
To: Bob Copeland (me@bobcopeland.com)
Cc: Nishikawa, Kenzoh, linux-wireless@vger.kernel.org,
devel@lists.open80211s.org, Thomas Pedersen (thomas@noack.us)
On Fri, 2014-12-12 at 11:47 -0500, Bob Copeland (me@bobcopeland.com)
wrote:
> On Fri, Dec 12, 2014 at 12:41:30PM +0100, Johannes Berg wrote:
> > On Fri, 2014-11-21 at 11:24 +0000, Nishikawa, Kenzoh wrote:
> > > Instead of sending peer candidate events just once, send them
> > > as long as the peer remains in the LISTEN state in the peering
> > > state machine, when userspace is implementing the peering manager.
> > > Userspace may silence the events from a peer by progressing
> > > the state machine or by setting the link state to BLOCKED.
> > >
> > > Fixes the problem that a mesh peering process won't be fired
> > > again after the previous first peering trial fails due to
> > > like air propagation error if the peering is managed by
> > > user space such as wpa_supplicant.
> > >
> > > This patch works with another patch for wpa_supplicant described
> > > here which fires a peering process again triggered by the notice
> > > from kernel.
> > > http://lists.shmoo.com/pipermail/hostap/2014-November/031235.html
> >
> > Can any of the mesh folks comment on this?
>
> I think it's fine. It's not strictly necessary: userspace could
> run its own timers to restart peering with any unpeered candidates
> periodically, but doing it based on beacon arrival is a little better
> since it indicates the peer is still alive, and this is also exactly
> how the in-kernel MPM operates.
Great, thanks.
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v4] mac80211: keep sending peer candidate events while in listen state
2014-12-12 11:41 ` Johannes Berg
2014-12-12 16:47 ` Bob Copeland (me@bobcopeland.com)
@ 2014-12-14 2:18 ` Nishikawa, Kenzoh
1 sibling, 0 replies; 6+ messages in thread
From: Nishikawa, Kenzoh @ 2014-12-14 2:18 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org,
Bob Copeland (me@bobcopeland.com),
Thomas Pedersen (thomas@noack.us)
SGkgSm9oYW5uZXMsDQoNCkkgY2hhbmdlZCB0aGUgcGF0Y2ggdGl0bGUgZnJvbSBWMy4gVGhlIHBy
ZXZpb3VzIHBhdGNoIHRpdGxlIHdhcyANCiJtYWM4MDIxMTogU2VuZCBwZWVyaW5nIG9wZW4gZnJh
bWUgYWdhaW4gaWYgYmVhY29uIGZyb20gbGlzdGVuIHN0YXRlIHBlZXIgaXMgcmVjZWl2ZWQiLg0K
DQpUaGUgY29tbWVudHMgZnJvbSB0aGUgbWVzaCBmb3JrcyBhcmUgYXMgZm9sbG93cy4NCmh0dHA6
Ly9tYXJjLmluZm8vP2w9bGludXgtd2lyZWxlc3MmbT0xNDE1OTAzMDkyMDg2NjImdz0yDQpodHRw
Oi8vbWFyYy5pbmZvLz9sPWxpbnV4LXdpcmVsZXNzJm09MTQxNjIzMTQ2MDAzMzQxJnc9Mg0KDQoN
Ci0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBKb2hhbm5lcyBCZXJnIFttYWlsdG86
am9oYW5uZXNAc2lwc29sdXRpb25zLm5ldF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VlcmluZyB0cmlhbCBmYWlscyBkdWUgdG8gbGlrZSBhaXIgDQo+IHBy
b3BhZ2F0aW9uIGVycm9yIGlmIHRoZSBwZWVyaW5nIGlzIG1hbmFnZWQgYnkgdXNlciBzcGFjZSBz
dWNoIGFzIA0KPiB3cGFfc3VwcGxpY2FudC4NCj4gDQo+IFRoaXMgcGF0Y2ggd29ya3Mgd2l0aCBh
bm90aGVyIHBhdGNoIGZvciB3cGFfc3VwcGxpY2FudCBkZXNjcmliZWQgaGVyZSANCj4gd2hpY2gg
ZmlyZXMgYSBwZWVyaW5nIHByb2Nlc3MgYWdhaW4gdHJpZ2dlcmVkIGJ5IHRoZSBub3RpY2UgZnJv
bSANCj4ga2VybmVsLg0KPiBodHRwOi8vbGlzdHMuc2htb28uY29tL3BpcGVybWFpbC9ob3N0YXAv
MjAxNC1Ob3ZlbWJlci8wMzEyMzUuaHRtbA0KDQpDYW4gYW55IG9mIHRoZSBtZXNoIGZvbGtzIGNv
bW1lbnQgb24gdGhpcz8NCg0Kam9oYW5uZXMNCg0K
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4] mac80211: keep sending peer candidate events while in listen state
2014-11-21 11:24 [PATCH v4] mac80211: keep sending peer candidate events while in listen state Nishikawa, Kenzoh
2014-12-12 11:41 ` Johannes Berg
@ 2014-12-15 12:40 ` Johannes Berg
1 sibling, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2014-12-15 12:40 UTC (permalink / raw)
To: Nishikawa, Kenzoh
Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org,
Bob Copeland (me@bobcopeland.com),
Thomas Pedersen (thomas@noack.us)
On Fri, 2014-11-21 at 11:24 +0000, Nishikawa, Kenzoh wrote:
> + cfg80211_notify_new_peer_candidate(sdata->dev, hw_addr,
> + elems->ie_start,
> + elems->total_len,
> + GFP_ATOMIC);
Please indent properly (to align after the opening parenthesis)
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-12-15 12:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-21 11:24 [PATCH v4] mac80211: keep sending peer candidate events while in listen state Nishikawa, Kenzoh
2014-12-12 11:41 ` Johannes Berg
2014-12-12 16:47 ` Bob Copeland (me@bobcopeland.com)
2014-12-15 12:39 ` Johannes Berg
2014-12-14 2:18 ` Nishikawa, Kenzoh
2014-12-15 12:40 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).