From patchwork Sun Sep 2 13:06:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145723 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1473354ljw; Sun, 2 Sep 2018 06:13:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY+8hRKrVuBAzQoYmSy0i/SbrlSMnGWHJCNdqcYkYmnAVRM+JwtyhgEm1LSOixjfQNF1taf X-Received: by 2002:a65:5304:: with SMTP id m4-v6mr22685883pgq.250.1535894017693; Sun, 02 Sep 2018 06:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535894017; cv=none; d=google.com; s=arc-20160816; b=UCTbuIEAWlSQv+8jMGChFZd5y+rhAQjh8K8417ey9j8jBo8wjh165MrXwQyiP1XHgt FRnsO5JXyaR5oT5tAasAKXHx7xHSU3xYbFoe/iH0Rni5I1YcctOB+the6ZBYk326+0hN ldQN+WandmeCzU3Sk9H2EUpu6gnKPhptApO1wC9uhaB9ALYycM0uGC+2t4zdf+2geLen DP9g4nORYcbVuNpTB8LktOzknVtXy23ERqMZenS4nXkdknHTDz2ElR/AQgymuwgygz65 wfR7KIVHJcyGk8wPeyPnyw0vz2nIdBSLq2WLqTk0MHapgPQeg0/9+NIVJ9Swoi0W6MC7 mbdg== 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=8movVkFd11BFbwEzn83QjVr6cJBPOMaHE9q6TWK0H48=; b=I3PjDuYQThhf1iIYzedMu0Un933r44uQzCLmhqSx1nkSMu4y84EC1sojNOKobaMOZz 9l2spVn5gjL34ZYcrqAMnuL0/a8gyP6FBhzgncgROAJ3RDflZfYA6KIaodxvaI8sLJFt mhxf7gu7+GqCHHqsKOhVhnr/lvJghaVWBMm1p9yuS5CV+LHT9qa87Ay08abM9xlxa/DU atTXinNWQGCIE+eoC9kDbb7TTX7OLqy6OhgkWXBQ7b27GUjWQHT9JzN8406B43ESulOj qa6hKYxk+nGpoiIQB2g0C8MMO9tQFUsAfhOhRTJOSC50f5VSsv7cPlVAyZTdpEbLVmnU BRDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=E2tsI4WD; 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 p21-v6si14973316pgd.56.2018.09.02.06.13.37; Sun, 02 Sep 2018 06:13:37 -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=E2tsI4WD; 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 S1729481AbeIBR3U (ORCPT + 32 others); Sun, 2 Sep 2018 13:29:20 -0400 Received: from mail-eopbgr700118.outbound.protection.outlook.com ([40.107.70.118]:63159 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728137AbeIBRXR (ORCPT ); Sun, 2 Sep 2018 13:23:17 -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=8movVkFd11BFbwEzn83QjVr6cJBPOMaHE9q6TWK0H48=; b=E2tsI4WDcBK1K6BJqBnaF6llvJBU/m7EYc71bexfmsbK6WhalSUFcVjtDjGjR0bqX6UxBvLjlKV7s9h+uQEke+7XDomWMXSelODG8BBWYmBsnTcGiyAywJvDhM6Zb/SU2KkWDJaPUC74x7uX7TKt/Ia6kBPZ8eDZM75dcQqweTg= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0856.namprd21.prod.outlook.com (10.173.192.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.1; Sun, 2 Sep 2018 13:07:09 +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:07:09 +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.14 38/89] wlcore: Set rx_status boottime_ns field on rx Thread-Topic: [PATCH AUTOSEL 4.14 38/89] wlcore: Set rx_status boottime_ns field on rx Thread-Index: AQHUQr3RA4VO8mci3EuHkEe8w8bH3Q== Date: Sun, 2 Sep 2018 13:06:53 +0000 Message-ID: <20180902064918.183387-38-alexander.levin@microsoft.com> References: <20180902064918.183387-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064918.183387-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; CY4PR21MB0856; 6:mp7N3CSGwoSuLTOi/GYQtG6SKdqg5iEISMHyGL1btNCyULHJuquUQB3eGSdlxtX8EM0TIUX+WQiaAGJxPehXdZ1G2MntheC6bUAfTlL9bE9syOcr47f4NOkv9a1473ywnY588vopXIEdUrSPUgtk/vzBn0XO5QnkEywOWVfSAj5ldWu+o//gh48Z2gQPeRBiJv7WVu+OkiHICtABVsy/FqjNbj4awaCCGZF9gClbktlPvGtEyDygecRQVqdwskoH1dZPsEw0e2DkKJ15ipQK2wZkaxk07O94eHjpWA6Qb0SlIqNV6udkU+95GzeL/baduOxhqNK5rSuaITWB4369R67Fl0g2GtK0HocCjn61+ZSEI9akIvTFPLBTcOQFw6rPh7pFOSOXk7UOE5qsawQfSD5kqBd5Lq022du7h/I/ikdTMEuEHUsXAED+s1FaHvLOvmocnXEhD0z96mpsfjOFyw==; 5:npNZcrF0wK0MgIQUQ4DKU4fCith5OhUSpZzcCFTfWEDshhQPR3OrMv+pHAW9cK40TpFc1nkgck6OLn5MkZbps1dI/G7pXnKw3FviymnfdIdYYPhUh/cDHckyTMtKg7Ru7Cf5PIaoZDz0B8ujmyJTFvy2p5BeeK/91rGFr27hnSc=; 7:Aj6ScAmLSOxzUtvy6gvJ921v0cfzwi+yGWekksxOl2KtX8dOf4FjEZNNUbda5irDqqkbNGfCq/rIa5YyarFZV5Rbx0wF4PGG779i0afeMsm80E5KxXsp78chRQG/ThxovsWhxK242q0CXmMjZeo4sFgbezKqP51bGyNDE4cIWHlpXSO4iUlBoKv+/uTmhpB+DPF2oOx4teQkGRfYU1YooWvav7YVLGwshoVoxeEmmogefN3GJ9t1rFNz7ejln0V9 x-ms-office365-filtering-correlation-id: 27dde917-1b71-46fd-fde5-08d610d4fdf9 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:CY4PR21MB0856; x-ms-traffictypediagnostic: CY4PR21MB0856: 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)(5005006)(8121501046)(3231340)(944501410)(52105095)(2018427008)(3002001)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0856; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0856; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(136003)(346002)(376002)(39860400002)(366004)(189003)(199004)(53936002)(81166006)(11346002)(81156014)(446003)(476003)(4326008)(5660300001)(25786009)(86612001)(8936002)(26005)(6506007)(6486002)(102836004)(2616005)(86362001)(8676002)(6512007)(14444005)(6436002)(107886003)(66066001)(256004)(10090500001)(217873002)(14454004)(3846002)(478600001)(1076002)(72206003)(6116002)(99286004)(305945005)(7736002)(22452003)(36756003)(76176011)(105586002)(486006)(106356001)(2900100001)(186003)(97736004)(68736007)(6666003)(316002)(10290500003)(2501003)(110136005)(54906003)(2906002)(5250100002)(83323001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0856; 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: plGZBFd9FFGNeALFsmQTzZiUjTDDmLMwoWm3bkQtM7pBt/7PCYKMJPYC1TJfwRjLxsQI0OK4BhcVuuo6CG0YSmUaOuLCmFa8Nl1hJdSAGWSnXGWWbS2KIaB3H10VtnKfVvXbsL/8pJUwH+5Z6jkc5kCjbvGF3Fjcxz7GeN8XHUkV85Y85yKhSlPMivI9G3ZyPS3ML2xTOYoM/NTiKuzkzjj7gnthrRMzRnfCiRLFlS9IEtKnJOAINtkmNSZvcPBiNUFzYUS+8/06dORTMsZ821mMFDrjNaczSMv11qFIUUSJUnB/oJAQRyGrnzYB/9ANNLAY13KCmHqQGlFyR7thM4i7mPAtKKt4K/9ikpUWlog= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27dde917-1b71-46fd-fde5-08d610d4fdf9 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:06:53.5387 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0856 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 0f15696195f8..078a4940bc5c 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); @@ -191,7 +194,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;