From patchwork Sat Mar 2 06:02:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 2206041 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9C1B33FCA4 for ; Sat, 2 Mar 2013 06:04:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752024Ab3CBGEU (ORCPT ); Sat, 2 Mar 2013 01:04:20 -0500 Received: from mail-pb0-f48.google.com ([209.85.160.48]:45459 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751993Ab3CBGEP (ORCPT ); Sat, 2 Mar 2013 01:04:15 -0500 Received: by mail-pb0-f48.google.com with SMTP id wy12so2140877pbc.35 for ; Fri, 01 Mar 2013 22:04:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=T8xfA0SFj+LdOVQT8S8te1Py/6AC5w1m3UA/Ok47c+g=; b=MFATJW92h02yx4NyUi8z324U/c8MDD7Nb5IRZOmBLMnxtiSsooPM2HRpoiweKK9vJi a70+Anjw7l6bGf7TZ82xgOXb6X866IhcvWUrC2SiGkx0MKdWX+KtsHWvsuw4HhLYGiSU gavF/LpHILSXSLc0/zvAUfdyzYN3udbr33hRog3he84Mkvz5JQHQiBAZeonjQubLOIUa WALnC2AiuDH5dLNrRHyC+c0OxwTc5N6XY+tfuBuXV3g1/b1T4NUUoh8BQvP6yWuytthX m8Bkao2u8Q8Hu1T1iwqWH+jqLVig8Pap89OckURj65Ek0xorR9f7X9dTFLjjdmURf+y1 lh1Q== X-Received: by 10.66.88.37 with SMTP id bd5mr22320780pab.75.1362204254711; Fri, 01 Mar 2013 22:04:14 -0800 (PST) Received: from cable.lan (70-35-43-50.static.wiline.com. [70.35.43.50]) by mx.google.com with ESMTPS id u10sm15650692pax.14.2013.03.01.22.04.13 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Mar 2013 22:04:14 -0800 (PST) From: Thomas Pedersen To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org, Thomas Pedersen Subject: [PATCH 6/6] mac80211: init mesh timer for user authed STAs Date: Fri, 1 Mar 2013 22:02:52 -0800 Message-Id: <1362204172-28307-6-git-send-email-thomas@cozybit.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1362204172-28307-1-git-send-email-thomas@cozybit.com> References: <1362204172-28307-1-git-send-email-thomas@cozybit.com> X-Gm-Message-State: ALoCoQnEbINMBLPgplgGPZo3m6lgBgd/smVBKRvw2Xxm9qKDozUuUpqCDyMqMVHn29xB4to+mv6u Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- 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;