From patchwork Tue Aug 24 13:28:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 501803 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp3134399jab; Tue, 24 Aug 2021 06:18:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjcGK3f+NlOvVNv04oc7X8Cs1VMQto592eznk1+w/QoHQ0gXF7vczm+g9A31Z0MW0I8KzK X-Received: by 2002:a05:6402:2d8:: with SMTP id b24mr10180885edx.176.1629811083106; Tue, 24 Aug 2021 06:18:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629811083; cv=none; d=google.com; s=arc-20160816; b=xiBnOU1sVfcMyKcvjbfMHQnLLRBZQHrdcWuspZyn0MC6bDUixCjeyRcdDDLcqcQ9gr PzvlxGeZmnxPl7F7OxijGRZ6PkW5PzYJEcthHlDqfPgLR9cRIxy9npAAzB9o6Ezd7C8D wkckZmuRHxY0jhxG0QMT8eOxhwUw3JUc7O81KYyS+p1353aXyXrtge5qDlqSwixyKv11 NANvXCHKDEbQ0qw+g6gaGBBX/wqQUhZyV9w51x8nE4kWkBfmHCnJMSQ3eFrHYQwUqj/v Z3eLNTeA9bKqqHIfeHeilVRkfC9tBdHaaPspsMUrYeT1g+Li+okkONi7QmVoiZ4+RgZS jFIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=qrTrr1okSA/fyylaW41NxAWOmdaQK6vB6FUFZcoBy8E=; b=PFUeCjEt6CWkEJJtknRPCXGG7enkMXCuDKcW1P2/U3vG12skdSmfWlzepsqkzJlCfo xzsSk/ze5babyNH69KNlxTJcKN7cRMuFhciFqIrIXngLnRGp129QUdEn4XDTqcay2VJP FE6l2+U312dHq2h97yJRStmu3gFsil/sA0e9bQwjr13QkJtFvxfWugxFvG+NajdAfOe8 9XfguRSm77jRNizQfOLIKjLvBjBDPjNeQgGP6DDhjDmeMVHbCOKXR2ZvDvdikini3hG+ TBfzsZow8DxNJ7YCkhk3b33lBB51TwpGAGs7DPksAeZfHNhBUwQl1b9sl0Eb/3OBSVon kCZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VUrfu731; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si20507490ejb.398.2021.08.24.06.18.02; Tue, 24 Aug 2021 06:18:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VUrfu731; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237440AbhHXNSp (ORCPT + 2 others); Tue, 24 Aug 2021 09:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236443AbhHXNSp (ORCPT ); Tue, 24 Aug 2021 09:18:45 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10E81C061757 for ; Tue, 24 Aug 2021 06:18:01 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id g138so12782001wmg.4 for ; Tue, 24 Aug 2021 06:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=qrTrr1okSA/fyylaW41NxAWOmdaQK6vB6FUFZcoBy8E=; b=VUrfu731jedX2nyO/kVotTBM+gs3Yalxz9o70AmMsj4zgfd2keaPly4AuihmEEkNuy 6ncRjwZ2m6+5sfVEE7MQPDBd4JHqBGV0lOqDzz2E7ShOjEwyHWVhQA7Uc4jPE8N0T3X3 9OqB/XdEmTUBvuZhmWlpifKYIY1Jp15btiTtldnf73qfj4R+M4Mydl9OEai++ucUHzyi zu/iqoGxCy4xQgmofGtNeoM13qjawhCD3YZwCXCLvatvXimgGA2rw5Q5RFvPZW6XwBbT 1rk6YwKb9+/0ppqYzL9NBP/prYe4hWzZaR0IFMybm0LXAYDMR1c0geQGND2RMO0cDnf6 QE7Q== 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; bh=qrTrr1okSA/fyylaW41NxAWOmdaQK6vB6FUFZcoBy8E=; b=hpBbmNwNgJUZ2JbCEJCa+f1PLRx0Ih7pbl71mlaFpV1yKXypHbpEwALToK9wpKizxl jKEXo6RMoIb86ou5+vwn1h0vIRfwUJE+VMW13lRRXTruIvsEHxNCwQUO3WaU80yPfsID FLWsbZYPZ2jnmHvsMqor5k1YtQPKgrUHPgpU1aFo3nKvpMEvK2btyUg391MNlfKE+fCv yCFRPMlo4fGqiD2EbPAWd3wC7UzmvfBPEWvmmPfsfoaqEG/Kx8xTh1vDBLX4voHRZ1pm iIGU7UmPYQIyYV9GxPJjgOGhbTKK3bCi372e+EW1WmOY9ylraRoSb956cFxAx+EoeuqL VMdQ== X-Gm-Message-State: AOAM532AHyKovKqMam7YJhGFJNqZZQXIkI8Mx8//MQHCuvYfrjzgDeOE 9IGbko/MKjSmNUHAK2gfN4gvmA== X-Received: by 2002:a7b:c318:: with SMTP id k24mr4205383wmj.144.1629811079530; Tue, 24 Aug 2021 06:17:59 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:82c:5f0:edf4:979b:2385:1df8]) by smtp.gmail.com with ESMTPSA id h4sm18266299wrm.42.2021.08.24.06.17.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Aug 2021 06:17:59 -0700 (PDT) From: Loic Poulain To: kvalo@codeaurora.org Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Loic Poulain Subject: [PATCH] ath10k: Fix missing frame timestamp for beacon/probe-resp Date: Tue, 24 Aug 2021 15:28:53 +0200 Message-Id: <1629811733-7927-1-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When receiving a beacon or probe response, we should update the boottime_ns field which is the timestamp the frame was received at. (cf mac80211.h) This fixes a scanning issue with Android since it relies on this timestamp to determine when the AP has been seen for the last time (via the nl80211 BSS_LAST_SEEN_BOOTTIME parameter). Fixes: 5e3dd157d7e7 ("ath10k: mac80211 driver for Qualcomm Atheros 802.11ac CQA98xx devices") Signed-off-by: Loic Poulain --- drivers/net/wireless/ath/ath10k/wmi.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.7.4 diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index d48b922..33d23f1 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -2610,6 +2610,10 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) if (ieee80211_is_beacon(hdr->frame_control)) ath10k_mac_handle_beacon(ar, skb); + if (ieee80211_is_beacon(hdr->frame_control) || + ieee80211_is_probe_resp(hdr->frame_control)) + status->boottime_ns = ktime_get_boottime_ns(); + ath10k_dbg(ar, ATH10K_DBG_MGMT, "event mgmt rx skb %pK len %d ftype %02x stype %02x\n", skb, skb->len,