From patchwork Wed Nov 30 22:44:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masashi Honma X-Patchwork-Id: 9455059 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 91C3B6074E for ; Wed, 30 Nov 2016 22:45:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 836E7284A2 for ; Wed, 30 Nov 2016 22:45:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74F27284A9; Wed, 30 Nov 2016 22:45:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15F24284A2 for ; Wed, 30 Nov 2016 22:45:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758059AbcK3WpC (ORCPT ); Wed, 30 Nov 2016 17:45:02 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:32861 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753834AbcK3WpB (ORCPT ); Wed, 30 Nov 2016 17:45:01 -0500 Received: by mail-pg0-f66.google.com with SMTP id 3so2553268pgd.0 for ; Wed, 30 Nov 2016 14:45:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=lO8vYc1JeOQ5lyK0UnvRW74nupMGk3vhKHr5Y4Rz8ag=; b=t7KhBf2YVPg3Yt/FAe5Jsfn4wHmiBM8vI0p1j8N+NpnP3Syw5vaDo4iolUA0EFCl/s nSZvXhkQh0X43yxJQlNNK4pc9B2VZgf9dLPBUl8TX4p/DYiK3Dgxsr1qwvqvr9JhB5Mv lSVFMH7dWlEmsN+czdUzdBfdsgicMW9l9y3TH1HJ6mcnV0SEOJ4aRNzvimYUDQ26vtZG EyDr/0a5DFIokdtOf9Ht4Fs3uzY/MxmyPOrFIt7+BmFOhWxFjVHbeqWMaXsJ0l3nQbMs YF0MjRpMCmXnQPR+YaMWBua+ZVXRF5OLfSlmA4eXpg3OstJoZ8vBENhN+lhw5w3ZmtrY Oimg== 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; bh=lO8vYc1JeOQ5lyK0UnvRW74nupMGk3vhKHr5Y4Rz8ag=; b=LT1Lp1ff+7weuZzhATj4YA+lNkCzfiPsWy787NsvrD+/tdsP+GBSy05z+lqRxDOEI/ yUNDAe7+w5+llroMo0Fs5EGzwpn777iUDsKKpDfqPtUxUj6hoaPMdrQFYC/OGk9aOfGR tVq972AvrTDORWwpp8MFfiRPOqSIHtlbWaTs8lJ91cMymPVRUU3JBrQ7PqjXIieX6hq6 91e1cqZnQmoYFMyFW+QCEzX9LknYRec525o4rlHr5GwaAzoVRS0PoSZRAj0UYzXitTUa hDhva5O2wVzPFUN2ddLZReDJVssVSdFR+hjolF1ix7gUci2UfxVcj4YHdxx7CNFbwRTO v0+Q== X-Gm-Message-State: AKaTC030qLU+DByesKVBXPVwrvvyxjkj27v11yZruO8HPE8/kjRn8K8Glpq+JPFC76ePSQ== X-Received: by 10.84.218.13 with SMTP id q13mr77652244pli.168.1480545900934; Wed, 30 Nov 2016 14:45:00 -0800 (PST) Received: from localhost.localdomain (p03491a.kngwnt01.ap.so-net.ne.jp. [121.3.73.26]) by smtp.gmail.com with ESMTPSA id 186sm105117006pfv.61.2016.11.30.14.44.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Nov 2016 14:45:00 -0800 (PST) From: Masashi Honma To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, me@bobcopeland.com, Masashi Honma Subject: [PATCH] mac80211: Remove invalid flag operations in mesh TSF synchronization Date: Thu, 1 Dec 2016 07:44:49 +0900 Message-Id: <1480545889-3690-1-git-send-email-masashi.honma@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP mesh_sync_offset_adjust_tbtt() implements Extensible synchronization framework ([1] 13.13.2 Extensible synchronization framework). It shall not operate the flag "TBTT Adjusting subfield" ([1] 8.4.2.100.8 Mesh Capability), since it is used only for MBCA ([1] 13.13.4 Mesh beacon collision avoidance, see 13.13.4.4.3 TBTT scanning and adjustment procedures for detail). So this patch remove the flag operations. [1] IEEE Std 802.11 2012 Signed-off-by: Masashi Honma --- net/mac80211/mesh_sync.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/net/mac80211/mesh_sync.c b/net/mac80211/mesh_sync.c index faca22c..836d791 100644 --- a/net/mac80211/mesh_sync.c +++ b/net/mac80211/mesh_sync.c @@ -172,11 +172,9 @@ static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata, struct beacon_data *beacon) { struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; - u8 cap; WARN_ON(ifmsh->mesh_sp_id != IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET); WARN_ON(!rcu_read_lock_held()); - cap = beacon->meshconf->meshconf_cap; spin_lock_bh(&ifmsh->sync_offset_lock); @@ -190,21 +188,13 @@ static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata, "TBTT : kicking off TBTT adjustment with clockdrift_max=%lld\n", ifmsh->sync_offset_clockdrift_max); set_bit(MESH_WORK_DRIFT_ADJUST, &ifmsh->wrkq_flags); - - ifmsh->adjusting_tbtt = true; } else { msync_dbg(sdata, "TBTT : max clockdrift=%lld; too small to adjust\n", (long long)ifmsh->sync_offset_clockdrift_max); ifmsh->sync_offset_clockdrift_max = 0; - - ifmsh->adjusting_tbtt = false; } spin_unlock_bh(&ifmsh->sync_offset_lock); - - beacon->meshconf->meshconf_cap = ifmsh->adjusting_tbtt ? - IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING | cap : - ~IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING & cap; } static const struct sync_method sync_methods[] = {