From patchwork Sun Sep 2 13:14:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145727 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1482766ljw; Sun, 2 Sep 2018 06:24:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbAeBFqhw8WUEMlk37Dt8Fb/Qlua5EezsGGcSj5IDl+QGo5tJtaXiUa7igxBWEc3DN3y+ua X-Received: by 2002:a62:f208:: with SMTP id m8-v6mr24677309pfh.222.1535894653644; Sun, 02 Sep 2018 06:24:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535894653; cv=none; d=google.com; s=arc-20160816; b=t5Qf8XIY2myRc9Z63rB0mMZxYcxX0Eafm+rqRfbHma/Yr4JKBTs3ou6C3JkfujLwKb 0o31SUlhmRIiDC3o3FpN72AgW/z+AsS1LKa6ujUtKYiy3fIQ7zst0yJCU7D83Sx9tARI OkCH2uPvSqhyhte8kRbAPO/Sfgu/ajhRIZlXlARvoauXjlsA1bwoNVtT+OsLiBfh0iZH 7KBMr2D0N6ZOwene1A/2826TtTJB0cFstF1yvsoOx/THAsL15Unf4JKew3IKkEioKqXw ZtoYBfSUR8yJ6lMsAaTkr9Q1S6hflHOYNpKYwP+ZqvflgG4/fUWQOdNGb3DnB1dElk0K PgFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=6q0mNKrUVZzE/fPHf3iy6kQUxjMu6PHm0MKjkatitis=; b=PJaMEmZ7fTifUuXkYoypNpSVG8q5/QxsbwoZArCYWETPr/d5tglKPI16rwKdoc9FkM It080Xz5u0vXeJHh0Ux+4yUZUUs2yfkhd/lpP20Fk3a0A3yB1iPU/YP2wxv+c6oZn2Hk RCbiIrKhNI19sNE3Qdwg7kHOn2QW0igYeG7GDJZrViQmK84rm7wdGTUrsenqA52x9f5h TCEwP/PvoHbg0v7jG52v5RFKuWPzVJSHTAJnTGdhWoKlHnqlPBLBq20Y0tojTHIHdXqj XwTubacdV3fzPYVj+d8kp/uQ1jdVc7NkmxX8UWrPd7CaqPBiQAR0RLgUDq7nh0CAe0sf LtZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=fnq2nf1B; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s14-v6si14742619pga.21.2018.09.02.06.24.13; Sun, 02 Sep 2018 06:24:13 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=fnq2nf1B; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729329AbeIBRkA (ORCPT + 32 others); Sun, 2 Sep 2018 13:40:00 -0400 Received: from mail-co1nam03on0123.outbound.protection.outlook.com ([104.47.40.123]:41136 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729276AbeIBRaU (ORCPT ); Sun, 2 Sep 2018 13:30:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6q0mNKrUVZzE/fPHf3iy6kQUxjMu6PHm0MKjkatitis=; b=fnq2nf1B77UBtxYdbyKoMZbUlSSfJXSKyEZiPSN9cj7Dyc9j6Y+GfIXV1vy3NLjOSQkDOJnO5Ig4wlySoZBKL6g1QI14S710RQ8+MPxC9MZqrYlm49R7rzQVxbDxPixAgdrLdvunGXp39jBkMxOczA4X8Tb/L5+RzIVr28Cefk4= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0120.namprd21.prod.outlook.com (10.173.189.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.2; Sun, 2 Sep 2018 13:14:26 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:14:26 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Loic Poulain , Kalle Valo , Sasha Levin Subject: [PATCH AUTOSEL 4.9 21/62] wlcore: Set rx_status boottime_ns field on rx Thread-Topic: [PATCH AUTOSEL 4.9 21/62] wlcore: Set rx_status boottime_ns field on rx Thread-Index: AQHUQr7fWQGkf43yvk6HaFWQCzmfzg== Date: Sun, 2 Sep 2018 13:14:26 +0000 Message-ID: <20180902131411.183978-11-alexander.levin@microsoft.com> References: <20180902131411.183978-1-alexander.levin@microsoft.com> In-Reply-To: <20180902131411.183978-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0120; 6:jePItx4z3CbL4ABFClxBU2LPhNIPmSeW2Dm9znZRGrxWdVr6K0HXpXK866madcp+uaaedmSUBfXjKTqktYqXZ203cRxU/KsvLgn7Krzql6L49JvmwRGTZPOKDUxRZ8K+fcYxvSTrrX+15WEZOixEDgOakhzvEspgBZcdKmuxOaMXzbtdADwvQg2X5ZKyLL/lgcweDmuujZimPNTPKWdtDhl+lsWBTo2QMNiW0kZDXMMzVipZ7p5I73MwGIwI8rbcm6vUFg5KV78px+C+bIhcVq5zVXvxrNnSVmFG1L1UrPQmfEDIkXo0o0xW39sGS8beD9g5LHwJfCG52Ufaqj3mTAN3ToDOLJG0IQgicOeJaMuoFtVELrYAZNJPjfX6P9S1uISmfrlJLh+q8+lt+2v5GgtvX8VoWUzwumOiuqm5URGA8UIps6FLLTbstZox5ZVPKRNxKvGCxGzwdvFgcx7F5Q==; 5:11cXlPEpunI3QAqs/9YH3VxtzZTX2w4uHxMnwQ8KH2gXSJ6a+evfmaoxJgZ6HfWwnqOUvnAAAFmnBh0hZ8gJeF7ywfp/DZC4BqvM0doAaKkeF286qgHUVOpY+MOuu5d50dJtSGG3c5L49ZTTp+lugX7Jfj1S38NFwIOaGCN6+04=; 7:cIk8wK4HonBd3HIyKbcxATsV5oZVemtuS8Mo8RJSob7G0U630VFNTezAkQYECWg3pChZtSx+QP7PtX3XtgyPCUQe9C2xZhOLwUV5H5zdCWdxnmtFbqwNqwPoC/izGuDLqCUGyLJdj+AVvdyS5xLBiL9MQDMFZ/btt/4MAXQZw52Bf1m1EX7VMEy6lBuEcMqy74uTqvQHxPruLpM5KfJq8DEH5Q8LSkH9VSW7YCXu6shmFWSav6xyoVQD/kSX05aV x-ms-office365-filtering-correlation-id: ae9bfff8-7ad4-4f79-bc0d-08d610d60266 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0120; x-ms-traffictypediagnostic: CY4PR21MB0120: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231340)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0120; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0120; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(346002)(136003)(376002)(396003)(366004)(189003)(199004)(106356001)(53936002)(72206003)(5250100002)(22452003)(97736004)(6512007)(10090500001)(2616005)(2501003)(446003)(11346002)(478600001)(10290500003)(476003)(14454004)(81166006)(186003)(486006)(25786009)(4326008)(36756003)(102836004)(8676002)(81156014)(105586002)(8936002)(2900100001)(99286004)(66066001)(68736007)(110136005)(26005)(107886003)(6506007)(5660300001)(76176011)(14444005)(54906003)(316002)(1076002)(86612001)(3846002)(6116002)(256004)(7736002)(6486002)(86362001)(6436002)(305945005)(217873002)(2906002)(83323001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0120; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: gX8q2H6fmjCEcX+2H/gUI9egASm5DM3Ev516YmAxhAYGj4PFhALJ2xdP44KooGnwj+qy2heai7kMTlLGykt+oHizfyDQ7AAXiUej5riZ1gXu9uN14P5T7aWhYnOKM+GuRNbAK4DndXuSOjlH+uOOG/du4p+a6W5ixXUakSxR/HcfL0WCd/uy+RhkGUjaYMVnKJQF31Uj0sEkG2XEo6wdtLpKHpvWitPhxapNYpe+cMbkBPgLBfXuKnws6FKU/GzKqdMGAtLjDDz3Q/kgMm9/bQsPgi1VpfZpV/OTtWniNPekKElZ8csm47Wuilr1MhFsDK5jwgFO3JIAJ2pDrTo4oQlv7p/DrucEkB30CnKCM08= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae9bfff8-7ad4-4f79-bc0d-08d610d60266 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:14:26.7625 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0120 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/wireless/ti/wlcore/rx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/wireless/ti/wlcore/rx.c b/drivers/net/wireless/ti/wlcore/rx.c index b9e14045195f..7367f0947825 100644 --- 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(struct wl1271 *wl, u32 pkt_len) 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 wl1271 *wl, } } + if (beacon || probe_rsp) + status->boottime_ns = ktime_get_boot_ns(); + if (beacon) wlcore_set_pending_regdomain_ch(wl, (u16)desc->channel, status->band); @@ -194,7 +197,8 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length, 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;