From patchwork Mon Nov 6 13:55:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10043517 X-Patchwork-Delegate: kvalo@adurom.com 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 34E9460247 for ; Mon, 6 Nov 2017 13:58:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24F2929C9C for ; Mon, 6 Nov 2017 13:58:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1985C29CA0; Mon, 6 Nov 2017 13:58:28 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 7EBA329C9C for ; Mon, 6 Nov 2017 13:58:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753414AbdKFN56 (ORCPT ); Mon, 6 Nov 2017 08:57:58 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:56136 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753131AbdKFN55 (ORCPT ); Mon, 6 Nov 2017 08:57:57 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0MVteq-1eibty3IYC-00X3vr; Mon, 06 Nov 2017 14:57:46 +0100 From: Arnd Bergmann To: Larry Finger , Chaoming Li , Kalle Valo Cc: Arnd Bergmann , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] rtlwifi: drop unused ppsc->last_wakeup_time Date: Mon, 6 Nov 2017 14:55:37 +0100 Message-Id: <20171106135619.1248453-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20171106135619.1248453-1-arnd@arndb.de> References: <20171106135619.1248453-1-arnd@arndb.de> X-Provags-ID: V03:K0:1UHN0JMBY2UT9WEXCH7XNtsggsBNa5bgmR59B33f1cn1j3Q5SH0 qrS6U2bjRvNpoXJzicGJSpNdDxijeW4YVEhB7Q7bIItMZMqKbf5eZH4JAB8fFUjFnFQy1lG hbhJeCNrQbOM5BeQMTmph6h6bxgdAdpeXJDukQUP+5bonoqSs4qnpyBTKf5TiZjy5nW/bXz S553I5xS1RgFLz8unLmUQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:s6joNLk5kIg=:VbHjyuWv0IWYMHEAeBJ3+d 1UpU+Dk7V8qQiYaSSmU8DCxQfTRwPIaVAZK/2u6ClSmr+z0kS5r7z9X8AE6MYpKQfn5KceiAi 8AzZJaa677moQySQLBl3SWcv5BhNsQ0buH3iABjQguzrsgNBmwGLM5DemGlc0m2bD+fgkfFAK Xxd6IgdmOizDftuvLg2RfLj5GEmhzTaBGR85bUzc17ZxLCvPfvXjSWcUxE+Sr/h7VNN8/egiy xzIrHIkX79x7ZVLT7MXZm9d0mfSgGDJEhvMJ/5rqFV7niV5upY7Ovt3gbXP3rh29jnLxwUbXQ aIWOS34oI+iZf4si/ANQ6mFEVhGD6KWVMIfAxyO1JXyTWFirxuZQ0wtDDEB9Y/pAhQIckIq67 yju2nPEj4R1FTNkspP0d7UlzF1xBYICfzgTCsoM9tR/3xNBFbILtVkBpHPq/BxR9K+GQnzB4k pbMSop+tUZY3Of+gc4gV/e6lUefQvxh+YnyWOz4G5iClPG6u8YrYNnYGHxmu8NLVbzjapjRLn HIqOAJJVkqk/HDrHLKGagck9SDy5P5eUk5XMX+dLEDERCIo1AanuMEeUccal6lEk3353bTsw9 IRvQdoO3toAy+1q0Epyio2pg70r6DZZ58UxD48otHcN2R3NW3XHfvADv/pPbNKRxtepNVsj9E QcMBKeMmW6sjHR3SWskIRcvb5+Wcv33AosNYnSJFOH8M3cGtLgA9IPtj0ovTH5LWaKN5O+YXi LW9N3hGIBVBnFh75Ptabwy2DZmVBqxkIaR47Ag== 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 The calculation of ppsc->last_wakeup_time is not y2038-safe, but the variable is not used at all, so we can simply drop it. Signed-off-by: Arnd Bergmann --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 5 ----- drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c index ad28e188bd04..36f785c4ea0f 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c @@ -1364,7 +1364,6 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw) struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_ps_ctl *ppsc = rtl_psc(rtlpriv); u8 fw_reason = 0; - struct timeval ts; fw_reason = rtl_read_byte(rtlpriv, REG_MCUTST_WOWLAN); @@ -1378,15 +1377,11 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw) switch (fw_reason) { case FW_WOW_V2_PTK_UPDATE_EVENT: ppsc->wakeup_reason = WOL_REASON_PTK_UPDATE; - do_gettimeofday(&ts); - ppsc->last_wakeup_time = ts.tv_sec*1000 + ts.tv_usec/1000; RT_TRACE(rtlpriv, COMP_POWER, DBG_DMESG, "It's a WOL PTK Key update event!\n"); break; case FW_WOW_V2_GTK_UPDATE_EVENT: ppsc->wakeup_reason = WOL_REASON_GTK_UPDATE; - do_gettimeofday(&ts); - ppsc->last_wakeup_time = ts.tv_sec*1000 + ts.tv_usec/1000; RT_TRACE(rtlpriv, COMP_POWER, DBG_DMESG, "It's a WOL GTK Key update event!\n"); break; diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h index 6f1b0f4667d9..d9776af41976 100644 --- a/drivers/net/wireless/realtek/rtlwifi/wifi.h +++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h @@ -1953,8 +1953,6 @@ struct rtl_ps_ctl { u8 gtk_offload_enable; /* Used for WOL, indicates the reason for waking event.*/ u32 wakeup_reason; - /* Record the last waking time for comparison with setting key. */ - u64 last_wakeup_time; }; struct rtl_stats {