From patchwork Thu Dec 8 01:15:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masashi Honma X-Patchwork-Id: 9465583 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 D506F607D3 for ; Thu, 8 Dec 2016 01:16:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB1802854A for ; Thu, 8 Dec 2016 01:16:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE6902856B; Thu, 8 Dec 2016 01:16:23 +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 22FB72854A for ; Thu, 8 Dec 2016 01:16:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933197AbcLHBQR (ORCPT ); Wed, 7 Dec 2016 20:16:17 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34946 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932967AbcLHBQM (ORCPT ); Wed, 7 Dec 2016 20:16:12 -0500 Received: by mail-pg0-f68.google.com with SMTP id p66so25071118pga.2 for ; Wed, 07 Dec 2016 17:16:05 -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=a7G4ib5+6b93bxQySoYSMlBEZnqPmE3kr2JFBccsrKE=; b=vpD5nV+SvDWmaWe9YdasTDWLItqe/ihvxZ1wkfZdeNCh+7wvXxRCYPdu4H9fGvRzrv qvt24OBKFiBztt7XYTkHo9qylpq7m7Ij0eLli1U2y1AVho9IU/mNGqCMPW77lTpRN0V/ WuN0xB6//er/S2RFLnaxHVbnPqX1rBInRi7JZMicoo122Q9MbFfTYIZBZaWEkievQM/2 Te+A12FTz85J2q3W0DdREJqXzJmWACEAl/2Sg2IVoL7tMkKTczn3Ia3ma3mYDF4Gz9kf RIcMAxu5iETcVwn2QYezk5FA9meP8fBbffYTDNVx4NMzDVNvyoKtNOwSDf0FuYrnCekb BBjw== 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=a7G4ib5+6b93bxQySoYSMlBEZnqPmE3kr2JFBccsrKE=; b=Tyfk91o43QNnNYq7SmWMIOrLLBBSOKhIlJL0yu1OdHh93vlqPs1Kv7wC+cDuSFpUkW 6arb+9k8m2Eyavhw8CdkxoPCFAVaXJWRjwkY7wXR0MLBTyv6W6OxZVlwv1BsCChN6vqS NbamkRX1zvtwzM2f+bvgJ1r7tRvW/R3pWVPrdhvO4d/nCDnxOfcXocxUp5HFG3g25hYk aq9QIYd8h0Nd3xnvbQvicd2Gf3u67hnxdjTxsGVxh8eTatM9LqAvbv/hkEUTC27AwK5K kv8lb96vNeIwrZUYLJrCz9DUI2ZPjbR89enVD8aBmpwX2kheHLf4EjovaSVTRoaINSqD C7DA== X-Gm-Message-State: AKaTC00yenSAMFgAWU7lrn9+tMKphgje2Y4yrO95TbAPhhD2k5V5H6eIHz9B4sG3CjNnmg== X-Received: by 10.84.178.7 with SMTP id y7mr153780315plb.147.1481159765031; Wed, 07 Dec 2016 17:16:05 -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.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Dec 2016 17:16:04 -0800 (PST) From: Masashi Honma To: johannes@sipsolutions.net, me@bobcopeland.com Cc: linux-wireless@vger.kernel.org, Masashi Honma Subject: [PATCH v2 2/2] mac80211: Use appropriate name for functions and messages Date: Thu, 8 Dec 2016 10:15:51 +0900 Message-Id: <1481159751-4097-2-git-send-email-masashi.honma@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481159751-4097-1-git-send-email-masashi.honma@gmail.com> References: <1480545889-3690-1-git-send-email-masashi.honma@gmail.com> <1481159751-4097-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 These functions drifts TSF timers, not TBTT. Signed-off-by: Masashi Honma --- net/mac80211/ieee80211_i.h | 4 ++-- net/mac80211/mesh.c | 2 +- net/mac80211/mesh.h | 2 +- net/mac80211/mesh_sync.c | 16 ++++++++-------- net/mac80211/tx.c | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index d37a577..94b2c9e 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -624,8 +624,8 @@ struct ieee80211_mesh_sync_ops { struct ieee80211_rx_status *rx_status); /* should be called with beacon_data under RCU read lock */ - void (*adjust_tbtt)(struct ieee80211_sub_if_data *sdata, - struct beacon_data *beacon); + void (*adjust_tsf)(struct ieee80211_sub_if_data *sdata, + struct beacon_data *beacon); /* add other framework functions here */ }; diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 42120d9..a6b43e4 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -1349,7 +1349,7 @@ void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata) ieee80211_mesh_rootpath(sdata); if (test_and_clear_bit(MESH_WORK_DRIFT_ADJUST, &ifmsh->wrkq_flags)) - mesh_sync_adjust_tbtt(sdata); + mesh_sync_adjust_tsf(sdata); if (test_and_clear_bit(MESH_WORK_MBSS_CHANGED, &ifmsh->wrkq_flags)) mesh_bss_info_changed(sdata); diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index 26b9ccb..7e5f271 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h @@ -341,7 +341,7 @@ static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata) } void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata); -void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata); +void mesh_sync_adjust_tsf(struct ieee80211_sub_if_data *sdata); void ieee80211s_stop(void); #else static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata) diff --git a/net/mac80211/mesh_sync.c b/net/mac80211/mesh_sync.c index 75608c0..a435f09 100644 --- a/net/mac80211/mesh_sync.c +++ b/net/mac80211/mesh_sync.c @@ -12,7 +12,7 @@ #include "mesh.h" #include "driver-ops.h" -/* This is not in the standard. It represents a tolerable tbtt drift below +/* This is not in the standard. It represents a tolerable tsf drift below * which we do no TSF adjustment. */ #define TOFFSET_MINIMUM_ADJUSTMENT 10 @@ -46,7 +46,7 @@ static bool mesh_peer_tbtt_adjusting(struct ieee802_11_elems *ie) IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING) != 0; } -void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata) +void mesh_sync_adjust_tsf(struct ieee80211_sub_if_data *sdata) { struct ieee80211_local *local = sdata->local; struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; @@ -57,12 +57,12 @@ void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata) spin_lock_bh(&ifmsh->sync_offset_lock); if (ifmsh->sync_offset_clockdrift_max < beacon_int_fraction) { - msync_dbg(sdata, "TBTT : max clockdrift=%lld; adjusting\n", + msync_dbg(sdata, "TSF : max clockdrift=%lld; adjusting\n", (long long) ifmsh->sync_offset_clockdrift_max); tsfdelta = -ifmsh->sync_offset_clockdrift_max; ifmsh->sync_offset_clockdrift_max = 0; } else { - msync_dbg(sdata, "TBTT : max clockdrift=%lld; adjusting by %llu\n", + msync_dbg(sdata, "TSF : max clockdrift=%lld; adjusting by %llu\n", (long long) ifmsh->sync_offset_clockdrift_max, (unsigned long long) beacon_int_fraction); tsfdelta = -beacon_int_fraction; @@ -167,7 +167,7 @@ static void mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, rcu_read_unlock(); } -static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata, +static void mesh_sync_offset_adjust_tsf(struct ieee80211_sub_if_data *sdata, struct beacon_data *beacon) { struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; @@ -184,12 +184,12 @@ static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata, * the tsf adjustment to the mesh tasklet */ msync_dbg(sdata, - "TBTT : kicking off TBTT adjustment with clockdrift_max=%lld\n", + "TSF : kicking off TSF adjustment with clockdrift_max=%lld\n", ifmsh->sync_offset_clockdrift_max); set_bit(MESH_WORK_DRIFT_ADJUST, &ifmsh->wrkq_flags); } else { msync_dbg(sdata, - "TBTT : max clockdrift=%lld; too small to adjust\n", + "TSF : max clockdrift=%lld; too small to adjust\n", (long long)ifmsh->sync_offset_clockdrift_max); ifmsh->sync_offset_clockdrift_max = 0; } @@ -201,7 +201,7 @@ static const struct sync_method sync_methods[] = { .method = IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET, .ops = { .rx_bcn_presp = &mesh_sync_offset_rx_bcn_presp, - .adjust_tbtt = &mesh_sync_offset_adjust_tbtt, + .adjust_tsf = &mesh_sync_offset_adjust_tsf, } }, }; diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 2c21b70..874332d 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -4076,7 +4076,7 @@ __ieee80211_beacon_get(struct ieee80211_hw *hw, } if (ifmsh->sync_ops) - ifmsh->sync_ops->adjust_tbtt(sdata, beacon); + ifmsh->sync_ops->adjust_tsf(sdata, beacon); skb = dev_alloc_skb(local->tx_headroom + beacon->head_len +