From patchwork Sun Dec 15 21:14:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 3350941 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7148BC0D4C for ; Sun, 15 Dec 2013 21:15:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B82E920211 for ; Sun, 15 Dec 2013 21:15:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7392201F9 for ; Sun, 15 Dec 2013 21:15:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752053Ab3LOVPV (ORCPT ); Sun, 15 Dec 2013 16:15:21 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:42627 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751914Ab3LOVPU (ORCPT ); Sun, 15 Dec 2013 16:15:20 -0500 Received: by mail-pb0-f46.google.com with SMTP id md12so4589634pbc.5 for ; Sun, 15 Dec 2013 13:15:20 -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=nLnTyyrrC1uWVj22j0iGxJq0F4lSMGUnGrfO7PumCtM=; b=zICkewTd7tjkwMAbSC4zPy8Qpcc7hghy09JgMbzQLshK5i6Xjgz6F9C0bvRhUu3VG2 WpAyE14CILq7vXZaSWSZ4rNutpfToI8DNgKEQyjhUlv63noAlLE6LeR9hlxdYkaDXAvF bszKujLJNzUIPrmrMV/oRQLkE04T6X1aNu/IThn/fMrZV3cAj7oSzP1ACE82e0h9j+8y hVU5vsYOSGebWs7fGaP06CqX8Cw0Gg22JssDflvAtppu5sUR6v3vc4HmtX7NuU0Qe8w1 jXrr2lrRdK2wTgiIx409lAEL5EYL1axThZwcIJBSmlTl8aUiqtoudJbXbAdCxEqvY5jv /F0Q== X-Received: by 10.68.197.165 with SMTP id iv5mr16423957pbc.150.1387142120263; Sun, 15 Dec 2013 13:15:20 -0800 (PST) Received: from localhost.localdomain (c-69-181-202-165.hsd1.ca.comcast.net. [69.181.202.165]) by mx.google.com with ESMTPSA id ql10sm21100387pbc.44.2013.12.15.13.15.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Dec 2013 13:15:19 -0800 (PST) From: Thomas Pedersen To: Johannes Berg Cc: open80211s , linux-wireless , Thomas Pedersen Subject: [PATCH 2/3] mac80211: reset TSF to 0 when joining a mesh Date: Sun, 15 Dec 2013 13:14:15 -0800 Message-Id: <1387142056-21850-2-git-send-email-twpedersen@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1387142056-21850-1-git-send-email-twpedersen@gmail.com> References: <1387142056-21850-1-git-send-email-twpedersen@gmail.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=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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: Thomas Pedersen This should ensure the mac80211 DTIM count matches that of the firmware beacon timer (DTIM 0 starts at TSF 0). Signed-off-by: Thomas Pedersen --- net/mac80211/mesh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 330d1f7..1174157 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -802,6 +802,8 @@ int ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) return -ENOMEM; } + /* next beacon will be DTIM-1, so TSF=0 was DTIM=0 */ + drv_set_tsf(local, sdata, 0); ieee80211_bss_info_change_notify(sdata, changed); netif_carrier_on(sdata->dev);