From: Thomas Pedersen <thomas@cozybit.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org,
Thomas Pedersen <thomas@cozybit.com>
Subject: [PATCH 6/6] mac80211: init mesh timer for user authed STAs
Date: Fri, 1 Mar 2013 22:02:52 -0800 [thread overview]
Message-ID: <1362204172-28307-6-git-send-email-thomas@cozybit.com> (raw)
In-Reply-To: <1362204172-28307-1-git-send-email-thomas@cozybit.com>
There is a corner case which wasn't being covered:
userspace may authenticate and allocate stations,
but still leave the peering up to the kernel.
Initialize the peering timer if the MPM is not in
userspace, in a path which is taken by both the kernel and
userspace when allocating stations.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
---
net/mac80211/mesh_plink.c | 1 -
net/mac80211/sta_info.c | 5 +++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 635d643..bfb1720 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -420,7 +420,6 @@ __mesh_sta_info_alloc(struct ieee80211_sub_if_data *sdata, u8 *hw_addr)
return NULL;
sta->plink_state = NL80211_PLINK_LISTEN;
- init_timer(&sta->plink_timer);
sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC);
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index a79ce82..2216361 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -342,6 +342,11 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
INIT_WORK(&sta->drv_unblock_wk, sta_unblock);
INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
mutex_init(&sta->ampdu_mlme.mtx);
+#ifdef CONFIG_MAC80211_MESH
+ if (ieee80211_vif_is_mesh(&sdata->vif) &&
+ !sdata->u.mesh.user_mpm)
+ init_timer(&sta->plink_timer);
+#endif
memcpy(sta->sta.addr, addr, ETH_ALEN);
sta->local = local;
--
1.7.10.4
next prev parent reply other threads:[~2013-03-02 6:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-02 6:02 [PATCH 1/6] nl80211: explicit userspace MPM Thomas Pedersen
2013-03-02 6:02 ` [PATCH 2/6] cfg80211: rename mesh station types Thomas Pedersen
2013-03-02 6:02 ` [PATCH 3/6] mac80211: support userspace MPM Thomas Pedersen
2013-03-02 6:02 ` [PATCH 4/6] nl80211: user_mpm overrides auto_open_plinks Thomas Pedersen
2013-03-04 15:10 ` Johannes Berg
2013-03-04 20:04 ` Thomas Pedersen
2013-03-04 20:07 ` Johannes Berg
2013-03-02 6:02 ` [PATCH 5/6] mac80211: disallow changing auto_open_plinks Thomas Pedersen
2013-03-02 6:02 ` Thomas Pedersen [this message]
2013-03-04 15:11 ` [PATCH 6/6] mac80211: init mesh timer for user authed STAs Johannes Berg
2013-03-04 20:05 ` Thomas Pedersen
2013-03-04 21:10 ` Thomas Pedersen
2013-03-05 18:55 ` Johannes Berg
2013-03-05 18:59 ` Johannes Berg
2013-03-04 15:09 ` [PATCH 1/6] nl80211: explicit userspace MPM Johannes Berg
2013-03-04 19:59 ` Thomas Pedersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362204172-28307-6-git-send-email-thomas@cozybit.com \
--to=thomas@cozybit.com \
--cc=devel@lists.open80211s.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).