Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4534904imm; Mon, 17 Sep 2018 16:02:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY9vq73J1Yn2pMSDCplDOo6uG5QpI9EAx4rRe9MYN276HIC+YXVUGXsz9MfToqLQAgUkb8R X-Received: by 2002:a17:902:6115:: with SMTP id t21-v6mr26829390plj.92.1537225372602; Mon, 17 Sep 2018 16:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537225372; cv=none; d=google.com; s=arc-20160816; b=zA0rEWypyYCN7W+1187e+6Shlup+UaKlh8ltRav7D4nGLTY8FoWEduwfH/ho3AtZot EaLJZXswrXPCrsh8KS+abjJSZfRAq6rQ63H0MfrRzgq+2mTp79ptsLvUVjcx+oK4XbO7 SLqzHNXkSbgQZKTQhRMbwNd9SUuRJobhmIAVHl3GDf5AuE8MYnptv9lAo6JYDveYtDek E6iQ/u4EN54i9bNPmctt6PyUtNUiv66q94O/qO8de4QF11OEzOHnxYKuv7piBpQl3TvY ZXyaL+1VE9AgNkj4Ph1HSv65VCV7PaKvEtqeboTdBlO9cnJ53syfXPiR/hdZbjyBmzGU 0jWA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=2P+fYRhcS5tv5wmSNus9U5mPfRJtv5OmPqfa/kjGvtU=; b=e+EI76EVtZRyX5aOJPpcEPDEhM3obPDVh2ucPGEQy7Nudw5uXtJiNMj+hScQ3MVuJs hsqAPAnhmBAgVWIZOFBtszUqR+Yxqu36O8Y2tgJ0cNH5HiAPLq4OF8D0qHbVCBZXzLxT C0YiyXtsBKWLBVOMQS87KlZtrkcr889EjGai6E8qVjmrnD3VUWQXEIogVrEyTHWZuU09 U/kEOJsNlzmA41EIcz18nQV8lu1qfNGFSQkFWqPdBNxlYZhHHs5QKDFiUy8QdUvw1zbV t+hYjs8WLh0+TyhtmGCtK3+KpxhbTzJFQ4VkTvFldQGbop8KAAHuQZpKJPlxYF3kk8mX Jkdw== 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 l5-v6si16992152pgh.451.2018.09.17.16.02.37; Mon, 17 Sep 2018 16:02:52 -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 S1730407AbeIREbw (ORCPT + 99 others); Tue, 18 Sep 2018 00:31:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48478 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727088AbeIREbv (ORCPT ); Tue, 18 Sep 2018 00:31:51 -0400 Received: from localhost (li1825-44.members.linode.com [172.104.248.44]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2CE9FC03; Mon, 17 Sep 2018 23:02:22 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Loic Poulain , Kalle Valo , Sasha Levin Subject: [PATCH 4.14 054/126] wlcore: Set rx_status boottime_ns field on rx Date: Tue, 18 Sep 2018 00:41:42 +0200 Message-Id: <20180917211708.056376598@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180917211703.481236999@linuxfoundation.org> References: <20180917211703.481236999@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Loic Poulain [ Upstream commit 37a634f60fd6dfbda2c312657eec7ef0750546e7 ] 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 Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ti/wlcore/rx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/net/wireless/ti/wlcore/rx.c +++ b/drivers/net/wireless/ti/wlcore/rx.c @@ -59,7 +59,7 @@ static u32 wlcore_rx_get_align_buf_size( static void wl1271_rx_status(struct wl1271 *wl, struct wl1271_rx_descriptor *desc, struct ieee80211_rx_status *status, - u8 beacon) + u8 beacon, u8 probe_rsp) { memset(status, 0, sizeof(struct ieee80211_rx_status)); @@ -106,6 +106,9 @@ static void wl1271_rx_status(struct wl12 } } + if (beacon || probe_rsp) + status->boottime_ns = ktime_get_boot_ns(); + if (beacon) wlcore_set_pending_regdomain_ch(wl, (u16)desc->channel, status->band); @@ -191,7 +194,8 @@ static int wl1271_rx_handle_data(struct if (ieee80211_is_data_present(hdr->frame_control)) is_data = 1; - wl1271_rx_status(wl, desc, IEEE80211_SKB_RXCB(skb), beacon); + wl1271_rx_status(wl, desc, IEEE80211_SKB_RXCB(skb), beacon, + ieee80211_is_probe_resp(hdr->frame_control)); wlcore_hw_set_rx_csum(wl, desc, skb); seq_num = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;