From patchwork Tue Nov 5 19:16:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 3143391 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 912779F432 for ; Tue, 5 Nov 2013 19:23:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 35385205B3 for ; Tue, 5 Nov 2013 19:23:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22D1D205C1 for ; Tue, 5 Nov 2013 19:23:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755402Ab3KETW6 (ORCPT ); Tue, 5 Nov 2013 14:22:58 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:36246 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754830Ab3KETWz (ORCPT ); Tue, 5 Nov 2013 14:22:55 -0500 Received: by mail-pa0-f48.google.com with SMTP id kq14so9318572pab.21 for ; Tue, 05 Nov 2013 11:22:54 -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=pypiwFDvIA6NpD7mt0IatscsBe9TWyyqxLfLSIGrKts=; b=Gcur7sLp20slDjSLlblv716MLPSx6lPsUihpoLGVDpyUTFAxNDiWgu+LQeLzoiwL3/ Mk6BTCOjkIwtrjZNGKf1nhIzMi4+/A9QCk5t4pUTgutI14zQ890eRH1tqGDhr0y4EZi5 K+4N20bpb3zoTcGnIN/D+F7VyFMO0yOJKjPCTazCLjrc7y1LbzjNBIx7VltfkIMWkNWR ZaJVicFEFT56SIlBX28k0U/YicXGMAZbBTbexR6QEN8z1xwkZw3gSPiUC8+wKtVMUyNC EX49+Q0A/mkEpo1X+Wri/fEhcPvFGtu/UVRPSA6nr/TBpjNoqSX0XVUGpX+NIKWztyW2 bH8g== X-Gm-Message-State: ALoCoQls3IvWuGCSSHFOf5x1Y0H6PZryyNyppKqIMGsd9uaa+fRFmfVlN+MvjpcCdZ3Vf6N49D37 X-Received: by 10.66.144.198 with SMTP id so6mr785218pab.190.1383679373905; Tue, 05 Nov 2013 11:22:53 -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.22.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Nov 2013 11:22:52 -0800 (PST) From: Thomas Pedersen To: Johannes Berg Cc: Bob Copeland , linux-wireless , open80211s Subject: [PATCH 08/17] mac80211: mesh_plink: don't ignore holding timer Date: Tue, 5 Nov 2013 11:16:56 -0800 Message-Id: <1383679025-7150-8-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 From: Bob Copeland The ignore_plink_timer flag is set when doing mod_timer() if the timer was not previously active. This is to avoid executing the timeout if del_timer() was subsequently called. However, del_timer() only happens if we are moving to ESTAB state or get a close frame while in HOLDING. We cannot leave HOLDING and re-enter ESTAB unless we receive a close frame (in which case ignore_plink_timer is already set) or if the timeout expires, so there actually isn't a case where this is needed on mod_timer(). Signed-off-by: Bob Copeland --- 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 8e23395..550ebc1 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -671,8 +671,7 @@ static void mesh_plink_close(struct ieee80211_sub_if_data *sdata, sta->reason = reason; sta->plink_state = NL80211_PLINK_HOLDING; - if (!mod_plink_timer(sta, mshcfg->dot11MeshHoldingTimeout)) - sta->ignore_plink_timer = true; + mod_plink_timer(sta, mshcfg->dot11MeshHoldingTimeout); } static u32 mesh_plink_establish(struct ieee80211_sub_if_data *sdata,