From 87f59c70ce6d1abeaaf97594835be29f746b81a0 Mon Sep 17 00:00:00 2001 From: Thomas Pedersen Date: Fri, 1 Mar 2013 22:02:52 -0800 Subject: mac80211: init mesh timer for user authed STAs 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 Signed-off-by: Johannes Berg --- net/mac80211/sta_info.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'net/mac80211/sta_info.c') diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 0141e4951adf..3644ad79688a 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; -- cgit v1.2.3