Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp979860ybi; Fri, 14 Jun 2019 06:39:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqy66ZlmUpOVjq8vkrB/HUTyk/XKYSLPXQf7iBJsQtzwCpNYIiVrejcaUktAG3VeUCa+/2cu X-Received: by 2002:a63:5152:: with SMTP id r18mr12461708pgl.94.1560519580927; Fri, 14 Jun 2019 06:39:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560519580; cv=none; d=google.com; s=arc-20160816; b=aJoVAXAf+RRapt7dkcx/Xf4rOoqeYcoMbzPj8AgHLcZ0n98K5lnnTDGJMWkM7wbvV1 5wI6bpFq0+XEXSqG/42ZmyC6Ob/MHem95msAUCUNMKlrrRejwoiwNVjw4yzKwkhagz11 Md0IFMlddHfawCiy7P99rg5Xvbj8zr0pyjKiEZU6I6oQepq9rGu0DA6eB4sGkHNkDqWz ySerEkWd0nSa2XK4+BXoXGaomLBhOQa9wl7MTQ0j+R3eePBdwvQXDiVIIDbDKp1yEQCw 3UF7IL+aByweOeZlGllV+3rPU8HKKthXISuvTLe/TUeKGc02tW/47vMasUYeLWq31Dnf zjLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:to:from:subject:message-id; bh=O3RVvLmFgnhxt72rJ4R+hn8C0ifhKFajRF90dPs9Mlc=; b=d4MIPyXDgX9OZwXWBu1GdqGMBOvwMI4rIzFxEwU9DaCoH7ikQjJXf3XsEfXEr7TVZU rKDHgQa4mgdy2JhJpA9x1NzYEhCD6IiDrOrwV+hTCYZQKqshlbuVbquZAc9w9OG7EZLG 8QscCl45mJnZdO9xq8JT8JE0RgfVFnFN2vHJnBvzbPhqaXTyggts/RktP+w0+v5HYMGb 0YOrjgOmec2VSre8pP/ajmbw+lsAjLbSV/t9GhH8mH0Rm3kw287V2ZbXJfoAXbG5QvCs dNatXv7yPkaY4ElRQ3cRylzbZeyWVXWZA4bjO9HLf/e02zASH1k5eNGv3T7rdbcjdzvS tGrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 y23si2587031pgj.185.2019.06.14.06.39.23; Fri, 14 Jun 2019 06:39:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728297AbfFNNi3 (ORCPT + 99 others); Fri, 14 Jun 2019 09:38:29 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:42192 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727982AbfFNNi3 (ORCPT ); Fri, 14 Jun 2019 09:38:29 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hbmPM-00018i-I7; Fri, 14 Jun 2019 15:38:20 +0200 Message-ID: <21fa668485f4eb0a8056aac1797854f267d5f1e0.camel@sipsolutions.net> Subject: Re: [PATCH-v3 1/2] wireless: Support assoc-at-ms timer in sta-info From: Johannes Berg To: greearb@candelatech.com, linux-wireless@vger.kernel.org Date: Fri, 14 Jun 2019 15:38:19 +0200 In-Reply-To: <20190415172123.6532-1-greearb@candelatech.com> (sfid-20190415_192129_410858_A3814220) References: <20190415172123.6532-1-greearb@candelatech.com> (sfid-20190415_192129_410858_A3814220) Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-2.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, 2019-04-15 at 10:21 -0700, greearb@candelatech.com wrote: > From: Ben Greear > > Report time stamp of when sta became associated. I guess that makes sense. > Signed-off-by: Ben Greear > --- > include/net/cfg80211.h | 2 ++ > include/uapi/linux/nl80211.h | 2 ++ > net/wireless/nl80211.c | 1 + > 3 files changed, 5 insertions(+) > > diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h > index f49eb1464b7a..a3ad78b9d9f4 100644 > --- a/include/net/cfg80211.h > +++ b/include/net/cfg80211.h > @@ -1268,6 +1268,7 @@ struct cfg80211_tid_stats { > * indicate the relevant values in this struct for them > * @connected_time: time(in secs) since a station is last connected > * @inactive_time: time since last station activity (tx/rx) in milliseconds > + * @assoc_at_ms: time in ms of the last association I think the "_at_ms" doesn't really make sense. "time in ms" also doesn't make sense as documentation. I think you need to say what should be assigned here. Also, you're actually using ktime_get_real() for this, which again doesn't make much sense. For exposing an absolute time, I think we're better off with CLOCK_BOOTTIME like we use elsewhere: * @boottime_ns: CLOCK_BOOTTIME timestamp the frame was received at, this is * needed only for beacons and probe responses that update the scan cache. > + * @NL80211_STA_INFO_ASSOC_AT_MS: Timestamp of last association _ASSOC_TIMESTAMP or something would make more sense too as the attribute name, and clearly the documentation needs to spell out the semantics here too. johannes