Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp963163ybi; Fri, 24 May 2019 14:34:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYGoQap2q5F3QHwN3Y2Bv0O5HUwpIaTMbwrxO/kIay2btY22HGDF9oEp0B3+HHzABKbk5A X-Received: by 2002:a62:1692:: with SMTP id 140mr92807617pfw.166.1558733662191; Fri, 24 May 2019 14:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558733662; cv=none; d=google.com; s=arc-20160816; b=N9NFVDgCCQQcIZj7I/yaELOOEYfd5dumQASyeV4SwD3BtvQEdmwWVF0iLOxb797wEu +rPf12U6q8gxOfSYF3Em9SGPTyFVe8mrPz2idSMMHf/Quu1AtEgd483fI1AZLn6RyjO+ yUFMVqBYR5odaEaJBJBo8Zj0imKumle2S/jPINxu68liTkIrUD8sWnQKl6JIg3X2TEyt 3VzVZSc2wEWd0eGW25VN5OyQYBlhs+kYX7PhZjjDJTPhD38AFOoriL4ertrjULj3PBE2 wBMWv49mLu+HFyTjc32tvL16iESEo1YqBuGGldyb2rbYgLfyrLNs/h3Yd6g9qJTWQpp4 riMw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=xFni9jtRRxUdDmA43yqyYLPLzOMVbPJFUYV2ZNviRZU=; b=HmqAwOAfpuW5tXhSxEUnqGmHN2m6UO9X2WIvgL5MtuAJrgk62rLM0lBB7k2MADSb4g 4VMf9KyG8dzg3GhquMlwxWfdhm8eM5ucqLOyJraoE6MQ+Z5JdJ8DbAzKg46MaxhPDZTQ LTDHt6UfezqwQ3PhO8DTH2a1yg7Ri0LA0YfpN//cqIQKk3mk/FmBso+qOrABDebhCSQw jFbKHBpMV/6gmR5vTYzO+7azx2dFVhgSMqCwqF+tf5IskPptBojEyGRPT/YNQEfkaRtZ lXjqx54IcirTgToLA9qnLmdR3QEhAn0ZJdACP1PRzKvu0xSWyXMh6UUjIx4pPtOhEijo g9xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JPKd2Ovy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7si6154730pfn.266.2019.05.24.14.34.01; Fri, 24 May 2019 14:34:22 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JPKd2Ovy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404249AbfEXVdM (ORCPT + 99 others); Fri, 24 May 2019 17:33:12 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53613 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391745AbfEXVdM (ORCPT ); Fri, 24 May 2019 17:33:12 -0400 Received: by mail-wm1-f67.google.com with SMTP id 198so10698284wme.3 for ; Fri, 24 May 2019 14:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xFni9jtRRxUdDmA43yqyYLPLzOMVbPJFUYV2ZNviRZU=; b=JPKd2OvyYiPKIe1EP5/4psKek2cFxS4SjLNRtJO4vT1BoMcUheBPcf3oWgdvdpgCu3 eAnNlzHYSGsIHRbkkoe9OuQFVNZLjKpoDjD4ugTA/2pnII5VL5Fz6h1NLH7MLUR71nXY /cuaoiGZ+WLuQ72RbIkhVjGqkVgppnx7ITW5/kHHyO/5IHo34mmYNIOZp8AIr+LFd97h IF+0Fiyb0AOyZhEV/132L1yLUCfQOGU7o8tXDVE4qrhuMWS4ePSK28Jet9naGXAL8d74 r0b2FEn+kZkQSYcro66MsWxrk0F/jJAy8N4wPXt/APl338HT9M7XT66r39BaIdz8pYzR YAGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xFni9jtRRxUdDmA43yqyYLPLzOMVbPJFUYV2ZNviRZU=; b=H2DwrklSrrLCJA7lJ//TN+roIJ14W13wWYnJpTtAj7MsFhzKTRUx013T+1veeYwpsd Nvou6KmNj05KEfTy0CdRdNHcVV/Fy31No8oFSdabM8K6+LMxnjvgtOVNPEMBtYAdRFw6 sJXV5G9ib2+gEgWnJHYFYT9RxFyTrgsjY7dLCDppiBFodi6fdoO3bZTfZReAPhhSlmv8 hanBkANP/XnE78A+YMQaBqzXbrdyu8R1p0UutiPAI3bOB1Cb1TUB142hLuBPs5ryLxId VAL4GF5CiNLQINWnkfuLyYgiv867CfYtJUPhV5wJFnPzovZdetsJhgsaE+pbVPsRIO/A MGNg== X-Gm-Message-State: APjAAAWnzCXmZO02BoQR2YX7YR/06EB/VI71rJBxUNppWzfZwWMqBoyQ 2eC2W4D8sVtZ5fS2NQJzs8HKDQni X-Received: by 2002:a1c:96c9:: with SMTP id y192mr17072667wmd.75.1558733589552; Fri, 24 May 2019 14:33:09 -0700 (PDT) Received: from debian64.daheim (p4FD09F8E.dip0.t-ipconnect.de. [79.208.159.142]) by smtp.gmail.com with ESMTPSA id j206sm6247678wma.47.2019.05.24.14.33.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 May 2019 14:33:09 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.92) (envelope-from ) id 1hUHoK-0004qL-CA; Fri, 24 May 2019 23:33:08 +0200 From: Christian Lamparter To: linux-wireless@vger.kernel.org Cc: Kalle Valo Subject: [PATCH] p54: Support boottime in scan results Date: Fri, 24 May 2019 23:33:08 +0200 Message-Id: <20190524213308.18575-1-chunkeey@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch fixes an issue with wpa_supplicant dropping all scan results because their where considered to be "too old" (e.g.: "skip - scan result not recent enough (121056.086325 seconds too old)") which is very weird because this looks like that the scan results have been received before a scan started. This is due to the inaccuracy of the default timing mechanism for calculating the BSS entry age. Signed-off-by: Christian Lamparter --- drivers/net/wireless/intersil/p54/txrx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/intersil/p54/txrx.c b/drivers/net/wireless/intersil/p54/txrx.c index 5bf1c19ecced..f80c5056ccb7 100644 --- a/drivers/net/wireless/intersil/p54/txrx.c +++ b/drivers/net/wireless/intersil/p54/txrx.c @@ -334,6 +334,7 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb) u16 freq = le16_to_cpu(hdr->freq); size_t header_len = sizeof(*hdr); u32 tsf32; + __le16 fc; u8 rate = hdr->rate & 0xf; /* @@ -382,6 +383,11 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb) skb_pull(skb, header_len); skb_trim(skb, le16_to_cpu(hdr->len)); + + fc = ((struct ieee80211_hdr *)skb->data)->frame_control; + if (ieee80211_is_probe_resp(fc) || ieee80211_is_beacon(fc)) + rx_status->boottime_ns = ktime_get_boot_ns(); + if (unlikely(priv->hw->conf.flags & IEEE80211_CONF_PS)) p54_pspoll_workaround(priv, skb); -- 2.20.1