From patchwork Fri Nov 27 08:37:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 7711771 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 91BD3BF90C for ; Fri, 27 Nov 2015 08:37:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4B972063F for ; Fri, 27 Nov 2015 08:37:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E26EB205F9 for ; Fri, 27 Nov 2015 08:37:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754132AbbK0Iha (ORCPT ); Fri, 27 Nov 2015 03:37:30 -0500 Received: from mail-lf0-f45.google.com ([209.85.215.45]:33230 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751504AbbK0Ih0 (ORCPT ); Fri, 27 Nov 2015 03:37:26 -0500 Received: by lfaz4 with SMTP id z4so121313988lfa.0 for ; Fri, 27 Nov 2015 00:37:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OQoq9wYJ6Wy/5AE+EO1nCUphMdHxCMjChBC6TdIb6Uo=; b=3JhfF6cqXE3R8foiLN88SLqNwrk6Ygjvc7z5j6AFxsXhCokEH0DM+0TZxUa/AfCcIS thz/2awTZbHcgb0FSUXR6C+uHVJQ7vnqHOK0o20BYv1BEenPTOZ+Dbsgrs7thX7VA5yW o2JCXIOTHIUwOH5iXflWSBonuYptMNQckiAjI= 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=OQoq9wYJ6Wy/5AE+EO1nCUphMdHxCMjChBC6TdIb6Uo=; b=WbmXj15LXVKX7F4Bp69HRgp+xyPvgdMO6yTTevMQC7A36SfT0yS5LBsbEZK9oeiH8L 661aNmTYwCZsL86dYiSG4INcH6HcrIDtSaXIKzU5IjVInjyBLrA/9yrgYNzEz+6mjOEp SJSkaFs7A2vlbgsc/e2K0K3/oAV8qAvf/zPKNMhfGDQ3EBFCF9nqxJG4D92O1tCsGeW4 zt5jBlC6GAOVmxLRHIa1ZNRbUmUJVb1nCI1MsbaXh4oPgNzpkY7033rv2L7B8/l+5Hmf wuQzbdks75ZH/7T2t9cXQYPniIT5xsAGTnlCvSBOiIeDa1uBSfp8Umw3UPRuFlAQjN7V O2KQ== X-Gm-Message-State: ALoCoQncjFosuOt0qCGqQ+pJpEy19X5FUgSxI/KWBQB4UQJTCVKGdZ+MGEvvTlbGStI3GYuCyTEL08DwBTrAQx+rjasa7rnQ/lO7ReLfaY3H2uD0oFh60h9BNPpKayizOYqCUkgGmhSJrUSQzvGHupWB4MNCrRpiTFXHaJFIRVIpK6Vqe5lIXbs2pLDxdnCdQMUoke+NlZHP X-Received: by 10.112.157.36 with SMTP id wj4mr18838659lbb.100.1448613444918; Fri, 27 Nov 2015 00:37:24 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id l128sm4838004lfe.27.2015.11.27.00.37.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Nov 2015 00:37:24 -0800 (PST) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: ath9k-devel@lists.ath9k.org, nbd@openwrt.org, Janusz Dziedzic Subject: [PATCH v2 02/13] ath9k: print real timer value Date: Fri, 27 Nov 2015 09:37:07 +0100 Message-Id: <1448613438-5173-2-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1448613438-5173-1-git-send-email-janusz.dziedzic@tieto.com> References: <1448613438-5173-1-git-send-email-janusz.dziedzic@tieto.com> X-DomainID: tieto.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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_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 In case of low HZ before this patch we saw wrong values in debug message. Print real timeout value. Signed-off-by: Janusz Dziedzic --- drivers/net/wireless/ath/ath9k/channel.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 35802c9..dddaaea 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -356,14 +356,16 @@ static void ath_chanctx_setup_timer(struct ath_softc *sc, u32 tsf_time) { struct ath_common *common = ath9k_hw_common(sc->sc_ah); struct ath_hw *ah = sc->sc_ah; + unsigned long timeout; ath9k_hw_gen_timer_start(ah, sc->p2p_ps_timer, tsf_time, 1000000); tsf_time -= ath9k_hw_gettsf32(ah); - tsf_time = msecs_to_jiffies(tsf_time / 1000) + 1; - mod_timer(&sc->sched.timer, jiffies + tsf_time); + timeout = msecs_to_jiffies(tsf_time / 1000) + 1; + mod_timer(&sc->sched.timer, jiffies + timeout); ath_dbg(common, CHAN_CTX, - "Setup chanctx timer with timeout: %d ms\n", jiffies_to_msecs(tsf_time)); + "Setup chanctx timer with timeout: %d (%d) ms\n", + tsf_time / 1000, jiffies_to_msecs(timeout)); } static void ath_chanctx_handle_bmiss(struct ath_softc *sc,