From patchwork Tue Nov 5 19:17:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 3143441 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3AD8E9F432 for ; Tue, 5 Nov 2013 19:23:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 077BB2058D for ; Tue, 5 Nov 2013 19:23:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1177205C6 for ; Tue, 5 Nov 2013 19:23:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755458Ab3KETXG (ORCPT ); Tue, 5 Nov 2013 14:23:06 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:56337 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755433Ab3KETXE (ORCPT ); Tue, 5 Nov 2013 14:23:04 -0500 Received: by mail-pa0-f43.google.com with SMTP id hz1so9373402pad.30 for ; Tue, 05 Nov 2013 11:23:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aaQf3HyJsTfXb/0r8KoQ6ccdEaYtzYJ3iLFy3AlflzE=; b=ZQuBYz+RGqEFtxJN4S8XNVx8KQ27xmP31jewIGqkPQaGREEjJSADf7M534E1XpHkcd XpbzLf9Dus9oeeROTzFWSdLWIEqCzQv+kDd00y71/xwNQb/LZpnCXdKTwyglCYUNzwJv n0y2qhm/Ydc0/u4IHNGx1ktKrw3qu+bXP8rYkk0L4Lp1aWSqXmHCNbTuuBW7na/HC0A0 Ag5rSFAwMsqmSBv00b5AwJFVAxZ3Ssm5giiBTm8Qh2sJmSgVyAQhPlV5Gs64FbO4K11b +kpsr/sxCQsKjJJiJu97mYHIgpcZIIhDJPqyC5TGxlL7gVNFHNzNyGCVVSwu53wF3aK+ rM2w== X-Gm-Message-State: ALoCoQkE89YbiW9SpEl01AHYpk6+XovROfXx2Z7mPqUHyDLprn9ceJT8BgMPumhz/6ehMm9suguJ X-Received: by 10.68.49.232 with SMTP id x8mr8281722pbn.167.1383679383584; Tue, 05 Nov 2013 11:23:03 -0800 (PST) Received: from cable.cozybit (70-35-43-50.static.wiline.com. [70.35.43.50]) by mx.google.com with ESMTPSA id de1sm36237294pbc.7.2013.11.05.11.23.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Nov 2013 11:23:02 -0800 (PST) From: Thomas Pedersen To: Johannes Berg Cc: Bob Copeland , linux-wireless , open80211s , Thomas Pedersen Subject: [PATCH 13/17] mac80211: assign sta plid early Date: Tue, 5 Nov 2013 11:17:01 -0800 Message-Id: <1383679025-7150-13-git-send-email-thomas@cozybit.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1383679025-7150-1-git-send-email-thomas@cozybit.com> References: <1383679025-7150-1-git-send-email-thomas@cozybit.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If we store the peer link ID right after initializing a new neighbor, there is no need to do it later in the peering FSM. Signed-off-by: Thomas Pedersen --- net/mac80211/mesh_plink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index e70f490..fa86d35 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -844,6 +844,7 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata, mpl_dbg(sdata, "Mesh plink: failed to init peer!\n"); goto unlock_rcu; } + sta->plid = plid; } mpl_dbg(sdata, "peer %pM in state %s got event %s\n", mgmt->sa, @@ -857,7 +858,6 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata, break; case OPN_ACPT: sta->plink_state = NL80211_PLINK_OPN_RCVD; - sta->plid = plid; get_random_bytes(&llid, 2); sta->llid = llid; mesh_plink_timer_set(sta, @@ -885,7 +885,6 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata, case OPN_ACPT: /* retry timer is left untouched */ sta->plink_state = NL80211_PLINK_OPN_RCVD; - sta->plid = plid; action = WLAN_SP_MESH_PEERING_CONFIRM; break; case CNF_ACPT: