Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1539990pxb; Thu, 16 Sep 2021 09:31:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxC6gvbtVMidKkV+F0bTpN/SaudZInW8xmAjm1U5d91UTEuJAfbA2EMyCCEXTlh0to3OjK4 X-Received: by 2002:a05:6e02:804:: with SMTP id u4mr4500572ilm.169.1631809878139; Thu, 16 Sep 2021 09:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631809878; cv=none; d=google.com; s=arc-20160816; b=Wt2ZATa4fDjovDNaPS1RuIYrGVUl9zAIiSfMWJ6IBrSSo7jzIoGJ04WxGO42JCfp9M +LA0EYpIEyagnVx6iLOW0FGMrY4SMxUSt/JYefDFoEoHDdsbpEmRnkWD5g1Phmxkijzv OrOCdiJVLHLNrfnRXS5KRMN+zupyKgRzl30+ojkPQ1pADKme3HsjOBtWOoU2wMtgV4xL xhv8I/e4CQYpDXyNRV30kLl99mdOaEIMSILh/y6ZAH5IsUgViJmay/50URrv4ns3SnGr 01Mukl1TlHqINiBUaZGaeo8Ckul7OBz1VU8dra6T56MNzcgz0arqkv01YTpXDJ5vteoN tVZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dwmGq792ZcwW2DC2whSh1eeuYuIK2KTjT9BNHEKw9S4=; b=TE5tpMHsqPsYhcOaD0dET2Y4eo1xxhicvCf2D+Abf8xDW8eQcOvbW7N64tiHu9EFmZ K69Oh57zU2t9A7yuRXRYlcIt+fVg1UwREBGK3cSVcSfKpkgCjp81BY64ryXGs+EdiMQ+ K2f5jZgORfWSCovIbKf5s+HgdTB9Lcz/Pdvl5k4eUH1dOE/2kcKPs6MEUIv8kG6WMfci MuDf7udH4m+xwXcIa08vjdtc1UZP1DowTsnVAvcPgraD7y8nJY2n1eAV4nImNg9uYHmG Td1QgXh9nEv3SHwm9jrEe+SJmGUULduikX5bcMUdHRQTOuN6EpQtZys71eBjrp/Zhj7S L3fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GKgWMipY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a13si2754833ilk.74.2021.09.16.09.31.05; Thu, 16 Sep 2021 09:31:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=GKgWMipY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242353AbhIPQbH (ORCPT + 99 others); Thu, 16 Sep 2021 12:31:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:59936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241856AbhIPQWc (ORCPT ); Thu, 16 Sep 2021 12:22:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AB5B16140D; Thu, 16 Sep 2021 16:15:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808921; bh=k7GlPxKjxxPV1E0dBBXMjRRHeWhi0zDdQc+CVA8fLYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GKgWMipYJqJiTU2VGgzmHiFJcqBSJssklq81ZZu3AP0fJeP9Km10gsZpaJT1ObPi5 UtRh3823u+LJzBbBP5D7IYxv2dPgZbuzjtnMlYNd83N4Y/7nSVOI3PClIjV3yWHlDJ J25Qju67vhPi1Ivq8DduQd4PGWj8+0yBWMXkLJP8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Loic Poulain , Bryan ODonoghue , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 271/306] wcn36xx: Fix missing frame timestamp for beacon/probe-resp Date: Thu, 16 Sep 2021 18:00:16 +0200 Message-Id: <20210916155803.312358138@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Loic Poulain [ Upstream commit 8678fd31f2d3eb14f2b8b39c9bc266f16fa24b22 ] 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). Signed-off-by: Loic Poulain Reviewed-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1629992768-23785-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/wcn36xx/txrx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.c b/drivers/net/wireless/ath/wcn36xx/txrx.c index 1b831157ede1..cab196bb38cd 100644 --- a/drivers/net/wireless/ath/wcn36xx/txrx.c +++ b/drivers/net/wireless/ath/wcn36xx/txrx.c @@ -287,6 +287,10 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb) status.rate_idx = 0; } + if (ieee80211_is_beacon(hdr->frame_control) || + ieee80211_is_probe_resp(hdr->frame_control)) + status.boottime_ns = ktime_get_boottime_ns(); + memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status)); if (ieee80211_is_beacon(hdr->frame_control)) { -- 2.30.2