From patchwork Mon Jun 18 15:11:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 138991 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4070355lji; Mon, 18 Jun 2018 08:13:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLBFs3/e29NAQwSiVfLuoi4M/tJC6dV+JHH6fF1Xgy4Bi6nFQ8jgbSgGsVJ4osVJLEp0Skh X-Received: by 2002:a17:902:e00a:: with SMTP id ca10-v6mr14482959plb.224.1529334782942; Mon, 18 Jun 2018 08:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529334782; cv=none; d=google.com; s=arc-20160816; b=bQxeaz87V9mpdD7kEnhe0NVarc3LNih+7CnkbO81REwRxcfisaGdS/9xhhgVZK6OBe ire2IpbMaPTNZR1Srs4iaqkZf2Y6BePWXj3yjnI4aivmq4FLnV52XuZ+caskwR9bHVmK FSR6Fln/ojkKdJsXx5UzQ1KMK84ovsHM2n0xvUpspjwQN3w1c1cmDDn3AidNVCfKGv0c CcIf8DW+vJp9hdPYOIJXV+knYB82iBwuK8JZl2FlDQf5bV+yc5dGxdEFhnSIdo2+I9w9 64RAUy+7hpeQqTLetPV485aDjUV/gddriKXB0/C2ieRa3qTa3BjFYFk4zeiLje2yOw6A Hwiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fbPR9lVS/9OEz46P4dP/Nh2RIMpZmxjsyWM02VcwFZc=; b=v2X1TBTCUR5s4YxF8jMngVGY3FhHiqgZSPmTCNJiBnbwYlq5FD0daUx8fQEBXdapke mJfARj89qQN+0IXV7H0qF2XiJAHQ8zDOJ/usvTngnqb6aVe4c8PgA9VZswmmUro+ZRMQ TgakdxcetuB0y5kQAOb+aFRYLZ1WZC0Bu/JVip93Vo+VdoiVuyApUwCTLSSgC2O7S061 Q31l2fj9ttPCeZB0ZXqpuI/D5p57XyEx+8lfx32Z27XNP9ey4uOqBUURQK4jC9clBcsB mJtTkEcex6g/MOQl8zF8eI39QUSbEYXIGSr1jyRh9mlPnTDf8dhMrSkVhBBminIQCiL6 kKCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g28-v6si17162950plj.307.2018.06.18.08.13.02; Mon, 18 Jun 2018 08:13:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754904AbeFRPNB (ORCPT + 30 others); Mon, 18 Jun 2018 11:13:01 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:42161 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754601AbeFRPM5 (ORCPT ); Mon, 18 Jun 2018 11:12:57 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MN3u4-1fbXWU3ktc-006bN2; Mon, 18 Jun 2018 17:11:47 +0200 From: Arnd Bergmann To: Johannes Berg , "David S. Miller" Cc: y2038@lists.linaro.org, Arnd Bergmann , Denis Kenzior , Avraham Stern , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] cfg80211: track time using boottime Date: Mon, 18 Jun 2018 17:11:14 +0200 Message-Id: <20180618151142.1214422-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:iR3hvAtd74kynI32m9Sy9zzWb4Woz8XM6PWniSLf5dkz1CNPl8Y K7JZZs4FS0VToyUxfIHgkvkPkh23I0vyhU9q0udYW7bcnW2K2T/v8PKowdpQO6kxAqHeydy s4WsGKtqEBhw2u2aZrXEeFh7tiKQB+puYs1B5UGkCwBE6nxEfQa2BwiYe8T/4KMa1B2n5FL eJYnYbuNMBpFlcM2eLo1g== X-UI-Out-Filterresults: notjunk:1; V01:K0:wOajXHmDs7o=:NfbAIxEPQjUoHe1kQN2w3Z sEFlRHi+BjF3Vlu/RSdbdVl+Mv/LU/rmqdAIZ57siT0wa3TZUeGwDsi6oIwb++PS0Rz8dR5TW ZIOb7zx5M/TM6ITByOFpi3oic5dAsjqkWfsLc3f1DFQe3cuG69l+wuLfvz+szg+3/6fPAU5Wo KWH+AZahqcgIWdwGL7i6axcYGmMyXJ9EgwfI1vHtKjpFw6Wi4UMZaYsaS/wx4yoyJOJDsmOBD NbCCMaNrT1hv9leds2lFnmW4tVE/PpgsIuLcQzAeG98WeEe6YPxl8+k3QAUb+148PwhLPyKig zLgMBhbB7UwIdVklwh0C/iz3qm8CJFJOeSdS+oHktwSpwekZzrOdM/Th7/WpaY8okiW9VCfQ9 N/61MbAsKolv3ZEy2uHbJNhZPg5S4LyPxNFUEE1GEbN+v+jLT5R4EzJG+kWZVKYsDmQEHql5P /WVypBCKkJ8IvZR5fW+ddbsy2wLx/KbbR88AinsTc2ub7vlmDvj/VedrXVZEJ7dKJvrwVy0gm 4I2ZyJ+/5NetJFrP7jLMJmWHAdxQP1IGe5z7HkZb/vaL8myCGKoBGVvjo7EOYrCamKeYb9MwR mn0JlZmvOiS/yG9jROFtIB2+MtsIN3G0bRJqJFNm8SDJeh0B6qxC8dhzukPA8nbPhDTQ9z6cV /rST7h9akvfP6K+vrlBwQfwM1Hv1GmkUJUD5eUNnA+pVWSYWu5oSLQC178V/libBHGi0= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The cfg80211 layer uses get_seconds() to read the current time in its supend handling. This function is deprecated because of the 32-bit time_t overflow, and it can cause unexpected behavior when the time changes due to settimeofday() calls or leap second updates. In many cases, we want to use monotonic time instead, however cfg80211 explicitly tracks the time spent in suspend, so this changes the driver over to use ktime_get_boottime_seconds(), which is slightly slower, but not used in a fastpath here. Signed-off-by: Arnd Bergmann --- net/wireless/core.h | 2 +- net/wireless/sysfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/net/wireless/core.h b/net/wireless/core.h index 63eb1b5fdd04..7f52ef569320 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -76,7 +76,7 @@ struct cfg80211_registered_device { struct cfg80211_scan_request *scan_req; /* protected by RTNL */ struct sk_buff *scan_msg; struct list_head sched_scan_req_list; - unsigned long suspend_at; + time64_t suspend_at; struct work_struct scan_done_wk; struct genl_info *cur_cmd_info; diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c index 570a2b67ca10..6ab32f6a1961 100644 --- a/net/wireless/sysfs.c +++ b/net/wireless/sysfs.c @@ -102,7 +102,7 @@ static int wiphy_suspend(struct device *dev) struct cfg80211_registered_device *rdev = dev_to_rdev(dev); int ret = 0; - rdev->suspend_at = get_seconds(); + rdev->suspend_at = ktime_get_boottime_seconds(); rtnl_lock(); if (rdev->wiphy.registered) { @@ -130,7 +130,7 @@ static int wiphy_resume(struct device *dev) int ret = 0; /* Age scan results with time spent in suspend */ - cfg80211_bss_age(rdev, get_seconds() - rdev->suspend_at); + cfg80211_bss_age(rdev, ktime_get_boottime_seconds() - rdev->suspend_at); rtnl_lock(); if (rdev->wiphy.registered && rdev->ops->resume) From patchwork Mon Jun 18 15:11:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 138989 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4069519lji; Mon, 18 Jun 2018 08:12:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJDPHXO7OMEN+hDP5RfkESeI3zgJRkkXJTUbKstrzzK/hktjtmktju3L49XJnoez3fb6J0o X-Received: by 2002:a62:50d6:: with SMTP id g83-v6mr13914519pfj.31.1529334738208; Mon, 18 Jun 2018 08:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529334738; cv=none; d=google.com; s=arc-20160816; b=DvQFnA8oshEVEh94JBXk1gakjQstMc3uPZbvG6wMmDSe95vybfdu6KY+O8+OYI46I1 icyheYqcivhmZElIZY9PKaQ/eJir5IedR1N9HDqi+OXxbXGu1yOA6Lq0bkqB1lMqmGHa 9ezI2Xot4RWmBGjEcjo18Zrm+Ry4bTuAT8v4lUJ5Y6IBrcfP/3W1bPUOqx9q7QP7Orw7 drsM3djOp2yGqjLHcp/gw4JP02Jsf0NIZT++vXKx1jvWtb7Wx/Rno/SRSa3oo5OnFJ+9 zYokHwZnV97f/6BwDAgADD3rfyqF0aEClXoFaU4Cycpw/wbANOUKyVUnuAFRNDxygEeK oJoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=bQu25eHjmcrYPZ9S1sWQlOJPoSp/6UretJWQFe88Xg4=; b=xbJ6xXPUcrLKS7d4D7hqm90dfjeupNYyTOUo2DJRJ6frqetw3+mA3JhzDQoZmqlTy+ f9eTLECFc0AupQn8sSUUn8n+CYJVjS8tBi/aWNiyI1tciPXV7X54dYUT3g7Mus1Z3RNx n6/1uuU+B9i5dZVTpQvP7hrfOD9w9f+EFeOWFJEJGJ/2D6JYcuTrA77sRtgTacJmW4y+ npM7evMKld/dF7ZE7IfZE36Y8zSsWXnFcw1OxTlYeg9IzHBh/kXOXrqvgwcMfMWXdyVU iCGpWdPOIknHnL+ENLR/zuNaJLlYozQ0KDscUOGfHsRk1DsCLhYnGN1vQC9nmDwMj4Pl jlVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g28-v6si17162950plj.307.2018.06.18.08.12.17; Mon, 18 Jun 2018 08:12:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933389AbeFRPMQ (ORCPT + 30 others); Mon, 18 Jun 2018 11:12:16 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:42417 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754321AbeFRPMM (ORCPT ); Mon, 18 Jun 2018 11:12:12 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0LnBO9-1g9EC42oKD-00hJhV; Mon, 18 Jun 2018 17:12:01 +0200 From: Arnd Bergmann To: Daniel Drake , Ulrich Kunitz , Kalle Valo , "David S. Miller" Cc: y2038@lists.linaro.org, Arnd Bergmann , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] zd1211rw: stop using deprecated get_seconds() Date: Mon, 18 Jun 2018 17:11:15 +0200 Message-Id: <20180618151142.1214422-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180618151142.1214422-1-arnd@arndb.de> References: <20180618151142.1214422-1-arnd@arndb.de> X-Provags-ID: V03:K1:Ei5MIm6yM4wBsY2O+tJ/g5PyqDStFsygF1ivgCfqqi7iSma4DY5 4UQbV5zVhaqZqCNKF32kEw5I+oxDsSl4JZG4oZGHySAV3Jieq/bdMjpIPG0qXgqHKGdyVO3 5VYRz09thRudlwHvElmJ6fFmVdwgQNldNNHDJ1Mla16/PVkFf74rVYiUooaLH4OchChi2qh ByBy32xRrTDaiJJpIMTEQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:f57maYKLt48=:kvjviJDgce0N1adDqxaBZI TUNW9Ab4AyhcGqinN5u8QqWjiNRpXQFUQUrFFvt3MrWVuOthCEc272I9/5K2bPNOuTUJf6k1D majueNK/ZNoMUeBzAJCq4wjjCLfZVpH7Uxz4d0ksUqY4Q6v4xcmWiXSHCkwh0CyncMznps5F6 8A/33iwiRYNZilunbz5PjDWcT49owwxUZoEfIte5vguPPiObhVIXIgO8TVTfLxqXmwnpI4AIg gBYBF6ACFkBAfnWRW2Ua4SL2gWS+4XdWcfTUboMk6Ny1U5O9KMD0Ngvhx1NT/mMpiLjLXAum1 CD0h6L3Piz2YaLnJH0Lj7cHqpSrkKrXvSigOGpFhXksydVVZIGVftQOe2vqmBvuSLx+0RDrT3 0piie7q7Q63e+afKqN+LRr4PSKfSHsy1GGe9l9fQZmZ6A3MsbEkcXIcMhtJw7PS+2mtj4NPXj 1jzO+gqQCQ3xxEifiut9RlXY1HlwEYGiEwsJHsdr4Uq0tLrGnPWry7dt1tkUCTF6BVVx+eQTT lMXY+PUsmYX5+NlUwJHkkZq8sfULC7JB8qO7LgQ24e5hE+sXS/pKeFC68dFc6QTxQKsr+OdkW u3f64Ptt/neRwraS0aHjbPNVo7269P1sjt7n4baENUNzchnpGimmYnv0ZZBnSVcfOpGmf2GOO JlvUWXfHM/WojsvuSbkDNk+BeX9O/pgznyeO5NeqjgsHAVU0XqFPniqaSlz2GBsmlbi8= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The get_seconds() function is deprecated because of the y2038 overflow. In zd1211rw we don't even care about the absolute value, so this is not a problem, but it's equally trivial to change to the non-deprecated ktime_get_seconds(). Signed-off-by: Arnd Bergmann --- drivers/net/wireless/zydas/zd1211rw/zd_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_chip.c b/drivers/net/wireless/zydas/zd1211rw/zd_chip.c index 07b94eda9604..dd6a86b899eb 100644 --- a/drivers/net/wireless/zydas/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zydas/zd1211rw/zd_chip.c @@ -1341,7 +1341,7 @@ int zd_chip_control_leds(struct zd_chip *chip, enum led_status status) case ZD_LED_SCANNING: ioreqs[0].value = FW_LINK_OFF; ioreqs[1].value = v[1] & ~other_led; - if (get_seconds() % 3 == 0) { + if ((u32)ktime_get_seconds() % 3 == 0) { ioreqs[1].value &= ~chip->link_led; } else { ioreqs[1].value |= chip->link_led; From patchwork Mon Jun 18 15:11:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 138990 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4070085lji; Mon, 18 Jun 2018 08:12:49 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIe6jT6u534gNwLkOTVVQfVbTZ7ROVAOWS7nBUIA5sPvgjaPTljIyajxaXP5uDDyQj0piU+ X-Received: by 2002:a63:ad08:: with SMTP id g8-v6mr11106305pgf.74.1529334769042; Mon, 18 Jun 2018 08:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529334769; cv=none; d=google.com; s=arc-20160816; b=YtCa3RoLxLGq1jz9vklEf3uhVy1NrAS+Cx5Eb7oZOAWKxCe/QhuKRU7GsnrBO3gxlY mkzSnFwD4JVTs8rj0Pi00XalTiwbA4cjTBHx9uvEj8ULWuJGoN1zvR66QNFUw0zAkagY vXwfWsR317Q3IGryTZSP+4dnstmuyK/b+hMLZK9SdSSsOa2aAUr1+KzrJ5tlr/AIzC01 d6iE1YdWmdALvoIudRLmQyCbGwvK67u7zAQWamblHT79GpqHiIjIwOIlFBa0BVklQSnf ls7naioqD3hkRGkPVbxVDXgAut/+H5M1a632vFnLfSjBgls5LLcMY5mYL7q4vEF6PLRy fnTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=84JbXJ3LYSC/ji+0Gl7GNdObppBwMLKZh1KJWdS7rqw=; b=w9pmP5DtlkcIcxYXzi0zhwS4TkngibaZHKCYUpqILtny/ovTiSbbbboE8HVy/aN+RM BYmnGXxH/ociTaTf/RMHAXEM4+ildfnRv4ERWLGENYE8dMgruilnd78x0UBB3CN/Bmwn G1Up2K5qdb/ShBej+LRub34akuVGHElDZErX5TzRwWg7k59Oq8x58Mbkj0vE839KDDuF sRmHG3seR9X4XHePLL9cyHeaXlYLYZvq7koolL5xzjutMvnFDsHyM8W/ofOo5AB9dO+I Q5nKkCMHqMiayXFcghwp0Q2HTbz5PgfkuWqbnaxgp5Y4BaLP9vBQlPv6QN4Z6j+oIVrg 8mSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g28-v6si17162950plj.307.2018.06.18.08.12.48; Mon, 18 Jun 2018 08:12:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754761AbeFRPMr (ORCPT + 30 others); Mon, 18 Jun 2018 11:12:47 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:39073 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754601AbeFRPMo (ORCPT ); Mon, 18 Jun 2018 11:12:44 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0LzJvV-1gGtgA44zx-014WRN; Mon, 18 Jun 2018 17:12:36 +0200 From: Arnd Bergmann To: Stanislav Yakovlev , Kalle Valo , "David S. Miller" Cc: y2038@lists.linaro.org, Arnd Bergmann , Arvind Yadav , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] ipw2x00: track time using boottime Date: Mon, 18 Jun 2018 17:11:16 +0200 Message-Id: <20180618151142.1214422-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180618151142.1214422-1-arnd@arndb.de> References: <20180618151142.1214422-1-arnd@arndb.de> X-Provags-ID: V03:K1:ymvPGCSA4ZZqQOW44nXwPLPxVeLmDDCTwIW6gSVc3DXykze/2LT QTybKlr0hM6zDHPqjwA6UpJmXFokF3AGayFQW5cpqGEgcp04tIUw56s3R5eqOyOiTxgoq7D /IpviYB70OFapR1wPMuE+qqU93drJ6+FCMGNBePkC+2EQP5HEFuRkTb0LzVNSj4Mx/75l6X k9cwSTmhzy26RJj+Nk5Eg== X-UI-Out-Filterresults: notjunk:1; V01:K0:4+k4d7ac9vE=:pMrEyq2Ky7Ig2rZt3o5GKI VYLq75q6SKWwm/Su05OBhg+Mtacun8M59ZNF+FtRj29HLJbK1Au33mS9aY9eciSYqAQ5wmD5A IysP6fOGqboEXnfMr0T0j60DDWmPK5GCvQRXeRQMpPP1jb+/AS/86XsFbBQCJgZ0oGxMgvU2T +suMCMyLYB2r8h+NvyWokXRtnNf2NOj67QwsbuUA3FHk0A1H7QGhd79/NpscyB5s5rGW4aX0a dG16jHVLJN8AkzlsIXGOBPrIhxyzajSlXA7MQ/Vg8Q1LV9B44WKgzCVrLGQTWIT2YbLMXMU/L 29PwaORX4CjJ93vs7LK+T7nyAhDxw5qcq+gBGlWAQwAJlfSOgOjBv2ThY3+cN9EXk0/RoirS8 pNgTMdbpkdHoMDxKHc/nDzBPLIwa0oHzBljfu7BwheLllvXUe1iMQ9LwJQvibiROzSmPWZHZA byzq2p3n/RQEDLoiPJVGyAMI16VykonMjmcr58WOsunr+M1utVbfXz7ITeJQLcK7YyHSY4pMw aosQBEC0YGGSwhm7j5k2Q8NDXk/2FkkLvg1DpWwhCg4zYSMRqALbc/e/hOiu6jN1Edz2Awoul DuYKJLa/y+RnrIR9Tj26wpuSqPIZhx4/9I1PJ2p1/Re5IPJcyjaYmbwJ/ZTDbosT8/bK95vUJ LQiXYmnNDC9Ww0ke9LM1xUHtCnsd0oRmlDKYDR99Y0+vawRHXtnzyBLiB7nLylpYF4fI= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ipw2x00 driver family uses get_seconds() to read the current time for various purposes. This function is deprecated because of the 32-bit time_t overflow, and it can cause unexpected behavior when the time changes due to settimeofday() calls or leap second updates. In many cases, we want to use monotonic time instead, however ipw2x00 explicitly tracks the time spent in suspend, so this changes the driver over to use ktime_get_boottime_seconds(), which is slightly slower, but not used in a fastpath here. Signed-off-by: Arnd Bergmann --- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 18 +++++++++--------- drivers/net/wireless/intel/ipw2x00/ipw2100.h | 12 ++++++------ drivers/net/wireless/intel/ipw2x00/ipw2200.c | 4 ++-- drivers/net/wireless/intel/ipw2x00/ipw2200.h | 6 +++--- 4 files changed, 20 insertions(+), 20 deletions(-) -- 2.9.0 Acked-by: Stanislav Yakovlev diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c index b8fd3cc90634..1ad83ef5f202 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c @@ -692,7 +692,7 @@ static void printk_buf(int level, const u8 * data, u32 len) static void schedule_reset(struct ipw2100_priv *priv) { - unsigned long now = get_seconds(); + time64_t now = ktime_get_boottime_seconds(); /* If we haven't received a reset request within the backoff period, * then we can reset the backoff interval so this reset occurs @@ -701,10 +701,10 @@ static void schedule_reset(struct ipw2100_priv *priv) (now - priv->last_reset > priv->reset_backoff)) priv->reset_backoff = 0; - priv->last_reset = get_seconds(); + priv->last_reset = now; if (!(priv->status & STATUS_RESET_PENDING)) { - IPW_DEBUG_INFO("%s: Scheduling firmware restart (%ds).\n", + IPW_DEBUG_INFO("%s: Scheduling firmware restart (%llds).\n", priv->net_dev->name, priv->reset_backoff); netif_carrier_off(priv->net_dev); netif_stop_queue(priv->net_dev); @@ -2079,7 +2079,7 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status) memcpy(priv->bssid, bssid, ETH_ALEN); priv->status |= STATUS_ASSOCIATING; - priv->connect_start = get_seconds(); + priv->connect_start = ktime_get_boottime_seconds(); schedule_delayed_work(&priv->wx_event_work, HZ / 10); } @@ -4070,8 +4070,8 @@ static ssize_t show_internals(struct device *d, struct device_attribute *attr, #define DUMP_VAR(x,y) len += sprintf(buf + len, # x ": %" y "\n", priv-> x) if (priv->status & STATUS_ASSOCIATED) - len += sprintf(buf + len, "connected: %lu\n", - get_seconds() - priv->connect_start); + len += sprintf(buf + len, "connected: %llu\n", + ktime_get_boottime_seconds() - priv->connect_start); else len += sprintf(buf + len, "not connected\n"); @@ -4108,7 +4108,7 @@ static ssize_t show_internals(struct device *d, struct device_attribute *attr, DUMP_VAR(txq_stat.lo, "d"); DUMP_VAR(ieee->scans, "d"); - DUMP_VAR(reset_backoff, "d"); + DUMP_VAR(reset_backoff, "lld"); return len; } @@ -6437,7 +6437,7 @@ static int ipw2100_suspend(struct pci_dev *pci_dev, pm_message_t state) pci_disable_device(pci_dev); pci_set_power_state(pci_dev, PCI_D3hot); - priv->suspend_at = get_seconds(); + priv->suspend_at = ktime_get_boottime_seconds(); mutex_unlock(&priv->action_mutex); @@ -6482,7 +6482,7 @@ static int ipw2100_resume(struct pci_dev *pci_dev) * the queue of needed */ netif_device_attach(dev); - priv->suspend_time = get_seconds() - priv->suspend_at; + priv->suspend_time = ktime_get_boottime_seconds() - priv->suspend_at; /* Bring the device back up */ if (!(priv->status & STATUS_RF_KILL_SW)) diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.h b/drivers/net/wireless/intel/ipw2x00/ipw2100.h index ce3e35f6b60f..8c11c7fa2eef 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.h +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.h @@ -491,7 +491,7 @@ struct ipw2100_priv { /* Statistics */ int resets; - int reset_backoff; + time64_t reset_backoff; /* Context */ u8 essid[IW_ESSID_MAX_SIZE]; @@ -500,8 +500,8 @@ struct ipw2100_priv { u8 channel; int last_mode; - unsigned long connect_start; - unsigned long last_reset; + time64_t connect_start; + time64_t last_reset; u32 channel_mask; u32 fatal_error; @@ -581,9 +581,9 @@ struct ipw2100_priv { int user_requested_scan; - /* Track time in suspend */ - unsigned long suspend_at; - unsigned long suspend_time; + /* Track time in suspend, using CLOCK_BOOTTIME */ + time64_t suspend_at; + time64_t suspend_time; u32 interrupts; int tx_interrupts; diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c index 8a858f7e36f4..33186a6b28c0 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c @@ -11888,7 +11888,7 @@ static int ipw_pci_suspend(struct pci_dev *pdev, pm_message_t state) pci_disable_device(pdev); pci_set_power_state(pdev, pci_choose_state(pdev, state)); - priv->suspend_at = get_seconds(); + priv->suspend_at = ktime_get_boottime_seconds(); return 0; } @@ -11925,7 +11925,7 @@ static int ipw_pci_resume(struct pci_dev *pdev) * the queue of needed */ netif_device_attach(dev); - priv->suspend_time = get_seconds() - priv->suspend_at; + priv->suspend_time = ktime_get_boottime_seconds() - priv->suspend_at; /* Bring the device back up */ schedule_work(&priv->up); diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.h b/drivers/net/wireless/intel/ipw2x00/ipw2200.h index aa301d1eee3c..f98ab1f71edd 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.h +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.h @@ -1343,9 +1343,9 @@ struct ipw_priv { s8 tx_power; - /* Track time in suspend */ - unsigned long suspend_at; - unsigned long suspend_time; + /* Track time in suspend using CLOCK_BOOTIME */ + time64_t suspend_at; + time64_t suspend_time; #ifdef CONFIG_PM u32 pm_state[16]; From patchwork Mon Jun 18 15:11:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 138992 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4071302lji; Mon, 18 Jun 2018 08:13:54 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIK/74NPDp8Lz01SzIwHe4F39cdHH2ehtD7kRy8ivE9wfX8H0rh0IHnUdc2ftpcyWnvxG/P X-Received: by 2002:a63:8f0d:: with SMTP id n13-v6mr11718110pgd.109.1529334834011; Mon, 18 Jun 2018 08:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529334834; cv=none; d=google.com; s=arc-20160816; b=GCOVf550ATUanbH/qOdPrpAg5WhfOad48plP4whVcfmgTJJRXJg6w5nwWeS/sskPQA ABgaNgmsn3utPFmOjt9td/cPYebnRpcRhwfwZXi3IwWPDGR44tzfT98x/pgCaF2LEnAT YJUG0JBYZbjhH7PKBWrbiEdTksvlLKbdkM2a4rF6qeupvAFgKtPqYjT4zKlzKrarIT+R L3hCzeYpaVgpgIjPCkyQCKDOXrecXTIC3slkGUfR2j0iUlpNRcwP/wgZACrjQ7crMkv7 MDb3AhFsY0VW/LbLnu0Vk1C7BK8rcohDPzddvQ/EjO8GJHPqin8ITgO3MeHckBexIUfy TXbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=6T0vZKECBQve+XQsItwXS+DCiOErd9Wu2bR1RT9BJhE=; b=fqlj1N31k3nwkuRJ1AQzYL1RvXrvMUmjX7b47pZ/fZMiAWUFCoMsND19NbYuS+eUOf 4M+yiHsEuQqULn4jWr38xAiOXUFHzt0eoILvThzQVYAW5KpW7pL2k5KE88NOSMqBjMRg zLakPozNDar/ztueWbBmcvZN2tgOkyduyTBTLtnVZcAnlkOxcjTNFjL/DBCzAX800SLc Fudq+wJUBfFtQgQOny9S2Ntimp1pDxs95doaeEfc2+1+dDlP+JgO9YymVstV+dUNu98T l5AbYtxmZZiEdlr5KaQU7AHKHI783REP0PhMSpWlE44t4tOloIzT57ZW6P4Vzi30Loes oaQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10-v6si12544689pgf.515.2018.06.18.08.13.53; Mon, 18 Jun 2018 08:13:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755076AbeFRPNw (ORCPT + 30 others); Mon, 18 Jun 2018 11:13:52 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:54153 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754976AbeFRPNs (ORCPT ); Mon, 18 Jun 2018 11:13:48 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0LnSVK-1g8wtL3SLm-00haYA; Mon, 18 Jun 2018 17:13:21 +0200 From: Arnd Bergmann To: QCA ath9k Development , Kalle Valo , "David S. Miller" Cc: y2038@lists.linaro.org, Arnd Bergmann , Johannes Berg , =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Wojciech Dubowik , Russell Hu , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] ath9k: use timespec64 for tsf_ts Date: Mon, 18 Jun 2018 17:11:17 +0200 Message-Id: <20180618151142.1214422-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180618151142.1214422-1-arnd@arndb.de> References: <20180618151142.1214422-1-arnd@arndb.de> X-Provags-ID: V03:K1:CQkvaqPLDQ4YTNsn6CwqHcpw6n5wUEYFsvijcgTibnlEJro4puX KNgreg+IVlOdONLTaY4sj4CWpvzO4CGm7esaxL3XVj4cxGsjids489Tvg116gQuMvF6zbh8 cn0PfmYawoh4TVuXgybqdNqXoGyFWIS1I6LhhaV+iMSVFzkbUNY0cvJDa/9tXoElwrGfYfh hOf24nUBEm47RP5DzrjrA== X-UI-Out-Filterresults: notjunk:1; V01:K0:jrg5u2Y4750=:huiLQQGVCQI+NYGY7rCSPB HLQgTr5lpBi4Pz0LqQRbz/t7yMazJdejvZ1MChrTbLMjr4olBfu3dnpNHxPwNes26+OqZds8G Kz8FpB3AADKMU7W+7/22wKFEtwBf4leoDmlNRHnAYUBnrNCS8boGcYfvEKo02OALbqOziz89m loiK8RUc7xB1sQB+L7TaX9+DMF/ALJHZOHIBL6W+FtGOcOgA6SM2HLFzJ2pAolGes2S4gI1Gi 01YL8juv0a698uaurccEBwg83UXrV05+2tW7iyHqw7d9ldsqtCS6YBXsC1YvSaUKyUCG79J+a 2Oe7qW/51/AyG9tnwkMOyCIUaAS/0/+g/G0WkqkySWHFsf/IEEOlQ0WXmlWaqfgH9YdLeZ+8P wGJCXbwkwsO+SVaTBzsnFdw0qVJV/f27M12nA7Vic+J3+jtSR2kocyK4obtrv7ookfVo1yR65 3ob9wdW4ZwW8bido7QIffXHA1RT982NhrE84aKsaotjWGwzR/LhL0rEhd9jqRXNFvCYQ6dyLV DhISL3dq1cvI7WWVqnRN6Y95nnmFss+V7ugk23Bd14WWc1+FowkynIuKfyQVcN0VraNl89ebr wsFGnBfTKKRChV2E56+y51HrEeRiekBRZjZcs559Rr6YW8599myxrrbDXg6tw5QEJYw0lw74V kwgtpzdsDejat7dEZmdPycKGr52qdU1faUmcEUeBQP4T9/MSoMjtiGo65171JmxbMQVs= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ath9k is the last remaining user of the deprecated getrawmonotonic() interface. There is nothing wrong with this usage, but migrating to a timespec64 based interface lets us clean up the old API. Signed-off-by: Arnd Bergmann --- drivers/net/wireless/ath/ath9k/ath9k.h | 4 ++-- drivers/net/wireless/ath/ath9k/channel.c | 14 +++++++------- drivers/net/wireless/ath/ath9k/hw.c | 10 +++++----- drivers/net/wireless/ath/ath9k/hw.h | 2 +- drivers/net/wireless/ath/ath9k/main.c | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) -- 2.9.0 diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index ef0de4f1312c..21ba20981a80 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h @@ -342,7 +342,7 @@ struct ath_chanctx { struct ath_beacon_config beacon; struct ath9k_hw_cal_data caldata; - struct timespec tsf_ts; + struct timespec64 tsf_ts; u64 tsf_val; u32 last_beacon; @@ -1021,7 +1021,7 @@ struct ath_softc { struct ath_offchannel offchannel; struct ath_chanctx *next_chan; struct completion go_beacon; - struct timespec last_event_time; + struct timespec64 last_event_time; #endif unsigned long driver_data; diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 1b05b5d7a038..fd61ae4782b6 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -233,9 +233,9 @@ static const char *chanctx_state_string(enum ath_chanctx_state state) static u32 chanctx_event_delta(struct ath_softc *sc) { u64 ms; - struct timespec ts, *old; + struct timespec64 ts, *old; - getrawmonotonic(&ts); + ktime_get_raw_ts64(&ts); old = &sc->last_event_time; ms = ts.tv_sec * 1000 + ts.tv_nsec / 1000000; ms -= old->tv_sec * 1000 + old->tv_nsec / 1000000; @@ -334,7 +334,7 @@ ath_chanctx_get_next(struct ath_softc *sc, struct ath_chanctx *ctx) static void ath_chanctx_adjust_tbtt_delta(struct ath_softc *sc) { struct ath_chanctx *prev, *cur; - struct timespec ts; + struct timespec64 ts; u32 cur_tsf, prev_tsf, beacon_int; s32 offset; @@ -346,7 +346,7 @@ static void ath_chanctx_adjust_tbtt_delta(struct ath_softc *sc) if (!prev->switch_after_beacon) return; - getrawmonotonic(&ts); + ktime_get_raw_ts64(&ts); cur_tsf = (u32) cur->tsf_val + ath9k_hw_get_tsf_offset(&cur->tsf_ts, &ts); @@ -1230,7 +1230,7 @@ void ath_chanctx_set_next(struct ath_softc *sc, bool force) { struct ath_common *common = ath9k_hw_common(sc->sc_ah); struct ath_chanctx *old_ctx; - struct timespec ts; + struct timespec64 ts; bool measure_time = false; bool send_ps = false; bool queues_stopped = false; @@ -1260,7 +1260,7 @@ void ath_chanctx_set_next(struct ath_softc *sc, bool force) spin_unlock_bh(&sc->chan_lock); if (sc->next_chan == &sc->offchannel.chan) { - getrawmonotonic(&ts); + ktime_get_raw_ts64(&ts); measure_time = true; } @@ -1277,7 +1277,7 @@ void ath_chanctx_set_next(struct ath_softc *sc, bool force) spin_lock_bh(&sc->chan_lock); if (sc->cur_chan != &sc->offchannel.chan) { - getrawmonotonic(&sc->cur_chan->tsf_ts); + ktime_get_raw_ts64(&sc->cur_chan->tsf_ts); sc->cur_chan->tsf_val = ath9k_hw_gettsf64(sc->sc_ah); } } diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index e60bea4604e4..e8e1f785bc5c 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -1835,13 +1835,13 @@ static int ath9k_hw_do_fastcc(struct ath_hw *ah, struct ath9k_channel *chan) return -EINVAL; } -u32 ath9k_hw_get_tsf_offset(struct timespec *last, struct timespec *cur) +u32 ath9k_hw_get_tsf_offset(struct timespec64 *last, struct timespec64 *cur) { - struct timespec ts; + struct timespec64 ts; s64 usec; if (!cur) { - getrawmonotonic(&ts); + ktime_get_raw_ts64(&ts); cur = &ts; } @@ -1859,7 +1859,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, u32 saveLedState; u32 saveDefAntenna; u32 macStaId1; - struct timespec tsf_ts; + struct timespec64 tsf_ts; u32 tsf_offset; u64 tsf = 0; int r; @@ -1905,7 +1905,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, macStaId1 = REG_READ(ah, AR_STA_ID1) & AR_STA_ID1_BASE_RATE_11B; /* Save TSF before chip reset, a cold reset clears it */ - getrawmonotonic(&tsf_ts); + ktime_get_raw_ts64(&tsf_ts); tsf = ath9k_hw_gettsf64(ah); saveLedState = REG_READ(ah, AR_CFG_LED) & diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 9804a24a2dc0..68956cdc8c9a 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h @@ -1060,7 +1060,7 @@ u32 ath9k_hw_gettsf32(struct ath_hw *ah); u64 ath9k_hw_gettsf64(struct ath_hw *ah); void ath9k_hw_settsf64(struct ath_hw *ah, u64 tsf64); void ath9k_hw_reset_tsf(struct ath_hw *ah); -u32 ath9k_hw_get_tsf_offset(struct timespec *last, struct timespec *cur); +u32 ath9k_hw_get_tsf_offset(struct timespec64 *last, struct timespec64 *cur); void ath9k_hw_set_tsfadjust(struct ath_hw *ah, bool set); void ath9k_hw_init_global_settings(struct ath_hw *ah); u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah); diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index b6663c80e7dd..acb681b096d9 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1865,7 +1865,7 @@ static void ath9k_set_tsf(struct ieee80211_hw *hw, mutex_lock(&sc->mutex); ath9k_ps_wakeup(sc); tsf -= le64_to_cpu(avp->tsf_adjust); - getrawmonotonic(&avp->chanctx->tsf_ts); + ktime_get_raw_ts64(&avp->chanctx->tsf_ts); if (sc->cur_chan == avp->chanctx) ath9k_hw_settsf64(sc->sc_ah, tsf); avp->chanctx->tsf_val = tsf; @@ -1881,7 +1881,7 @@ static void ath9k_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) mutex_lock(&sc->mutex); ath9k_ps_wakeup(sc); - getrawmonotonic(&avp->chanctx->tsf_ts); + ktime_get_raw_ts64(&avp->chanctx->tsf_ts); if (sc->cur_chan == avp->chanctx) ath9k_hw_reset_tsf(sc->sc_ah); avp->chanctx->tsf_val = 0;