From patchwork Thu Dec 8 01:15:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masashi Honma X-Patchwork-Id: 9465581 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 C17A0607D3 for ; Thu, 8 Dec 2016 01:16:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A65E2854A for ; Thu, 8 Dec 2016 01:16:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CF3B2856B; Thu, 8 Dec 2016 01:16:15 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI 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 2BC902854A for ; Thu, 8 Dec 2016 01:16:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932972AbcLHBQO (ORCPT ); Wed, 7 Dec 2016 20:16:14 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34263 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932966AbcLHBQM (ORCPT ); Wed, 7 Dec 2016 20:16:12 -0500 Received: by mail-pf0-f195.google.com with SMTP id y68so21305149pfb.1 for ; Wed, 07 Dec 2016 17:16:03 -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:in-reply-to:references; bh=/bvzC/gQpXitZphkpj6v203CFI+pdOiZk9QW+hCHJwI=; b=pmJK0cLlPwBVOjF7EWMexHLXv9E1LxpGVaGiZeoWxb8aSRYtHftF9v9ASqmPC6TZIs ORYZZJ9Vjp/OjpzA3ILcmmoQTSkwcbWV3+Q+PQ4t1w4ng+hr0YOZVbQlXrqg/MGtV9aA e08HfISaLBc8e0poxnP4VSF2Z+X2PZeYbKFk7eRKgAC1bsF/mp5elOg351DTY0CUVHY/ JCmf/U02EvX3gVeC6FoF4u4uAfQbVcaE0S0n7WQKFNGy0VhbQkshCT1CDURJW+AEgcIf 8FCPBSlC1qnuFvk7YzVIOr9o2jO5OPlxb/iUR4AkrYliqO/v1t66BhKclT0m8sDvzFYH n1UA== 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=/bvzC/gQpXitZphkpj6v203CFI+pdOiZk9QW+hCHJwI=; b=mhNL3WTjl7v4x4QXQw19JRpqTodV+wg5K9kwYWn4JkDJAg09gBFuk+p/DlyTGI3MHI 5D0wzfN+2weDMq0OS/R7/lTA2bdV0ey8dwPcpO13Kv5zUIR19AJzgtoxwwx/mOSdFomJ y3Zc+sjLWKv4m2qR5QTGfJcUT84pp5JWJTv1kNUUhMvN1XRzFbK3bfge2miV6niMIYOp qj73b+0h+2ApbG9bT2xnFumdvGfxaxXxc+e2MgqKSnYhVQDLXBnX9imHGO5XNA41RPJ7 EtaUE8bnWQI4MbgqVOyZAfWSv4YdNyFjlM9BTwpRK3dV5V0gN6GFz9VN9YQy80gbGXPV lNeA== X-Gm-Message-State: AKaTC03N/IFzLQlRLTYHCcrDwFJz+toaX9v9Hp8XgUjsxw2XzAXB7uqq/fP9i223gdt/DQ== X-Received: by 10.84.148.203 with SMTP id y11mr153682921plg.29.1481159763460; Wed, 07 Dec 2016 17:16:03 -0800 (PST) Received: from localhost.localdomain (p7902fa58.kngwnt01.ap.so-net.ne.jp. [121.2.250.88]) by smtp.gmail.com with ESMTPSA id b80sm45221132pfe.52.2016.12.07.17.16.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Dec 2016 17:16:03 -0800 (PST) From: Masashi Honma To: johannes@sipsolutions.net, me@bobcopeland.com Cc: linux-wireless@vger.kernel.org, Masashi Honma Subject: [PATCH v2 1/2] mac80211: Remove invalid flag operations in mesh TSF synchronization Date: Thu, 8 Dec 2016 10:15:50 +0900 Message-Id: <1481159751-4097-1-git-send-email-masashi.honma@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480545889-3690-1-git-send-email-masashi.honma@gmail.com> References: <1480545889-3690-1-git-send-email-masashi.honma@gmail.com> 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 | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/net/mac80211/mesh_sync.c b/net/mac80211/mesh_sync.c index faca22c..75608c0 100644 --- a/net/mac80211/mesh_sync.c +++ b/net/mac80211/mesh_sync.c @@ -123,7 +123,6 @@ static void mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, */ if (elems->mesh_config && mesh_peer_tbtt_adjusting(elems)) { - clear_sta_flag(sta, WLAN_STA_TOFFSET_KNOWN); msync_dbg(sdata, "STA %pM : is adjusting TBTT\n", sta->sta.addr); goto no_sync; @@ -172,11 +171,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 +187,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[] = {