Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3038401ybe; Sun, 8 Sep 2019 05:58:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuucSXhlORxgu9+P91aWz9lrvFAp+c03jlP3t5T/wgFsuGW//ljUUorwG289m6fwoL9k4s X-Received: by 2002:a50:858a:: with SMTP id a10mr19652412edh.284.1567947497964; Sun, 08 Sep 2019 05:58:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567947497; cv=none; d=google.com; s=arc-20160816; b=exrg04IuQBzZLhcS1vyQenyEmA4MQSqtLeXwY8UlTeo5yQbD5WNFauOM3KZ3bfp71q BikIKqKcWl2x9BCoQdHk0jatqepTPsG6soyzkJWTQvW2PwtiHei47uAJI2jukU83xMIJ sLyPvnEkIzHUufOKBtOgaCV0rQ2VYyyW+1VrwyTHf3Vp3h2A1b2DO7TUwgZgyVCeMqW0 VTw+vL4HJX+XbDXEMA2IbbaEj4rlKLhjxFqZiMh+TUkXMzbmUt1/EGcPuhBqN3cvsW4k 8VN3u1Ss87H2119o9c4rbS4pGWpxwUlsEAgxg0VuKlW9sDsVAy/krpp92VYIb3qpfuGH BJbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=MPAKeNGBTLYWKG2FeQb4L/Fpx18S8Wzoe9zSUAfTXEw=; b=Rla8qU7IWuDpbHpB02SS7/ayq+seucnSIclSxptNnQVh6vOsAVMawmYtHP0GdM9KEA NOJaolI4ykMuO7MPLANiMhOQWr/3Txfi18CNvv9CExXsxoqnr9xYsmWNBST9X3Y2NZoX nbcyvdBPvZu8gZu7dhDQiqCDTgzQsSVnE45Q3VSMgjsrJHsB4wdAogdiQR2po+EfMk9V oFLFv/HRgjSRtCOntOS1joAKN9daYtjONJjdWGWiFXSVf6aygvyex3CBDkSmt7xpe5N1 cbpK2jEHttO85F64rUcP11u/BzRs5SJTSMU8YZbQrdvrk6X2/E/WRptXjdaMZAcZZ11Y CS7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 c22si5792015ejr.377.2019.09.08.05.57.53; Sun, 08 Sep 2019 05:58:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727474AbfIHIjW (ORCPT + 99 others); Sun, 8 Sep 2019 04:39:22 -0400 Received: from alexa-out-ams-02.qualcomm.com ([185.23.61.163]:51394 "EHLO alexa-out-ams-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727418AbfIHIjS (ORCPT ); Sun, 8 Sep 2019 04:39:18 -0400 X-Greylist: delayed 365 seconds by postgrey-1.27 at vger.kernel.org; Sun, 08 Sep 2019 04:39:09 EDT Received: from ironmsg03-ams.qualcomm.com ([10.251.56.4]) by alexa-out-ams-02.qualcomm.com with ESMTP; 08 Sep 2019 10:33:04 +0200 Received: from lx-merez1.mea.qualcomm.com ([10.18.173.103]) by ironmsg03-ams.qualcomm.com with ESMTP; 08 Sep 2019 10:33:03 +0200 From: Maya Erez To: Kalle Valo Cc: Maya Erez , linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com Subject: [PATCH 08/11] wil6210: report boottime_ns in scan results Date: Sun, 8 Sep 2019 11:32:52 +0300 Message-Id: <1567931575-27984-9-git-send-email-merez@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1567931575-27984-1-git-send-email-merez@codeaurora.org> References: <1567931575-27984-1-git-send-email-merez@codeaurora.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Call cfg80211_inform_bss_frame_data to report cfg80211 on the boottime_ns in order to prevent the scan results filtering due to aging. Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/wmi.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 88d9e5a..153b844 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c @@ -878,6 +878,12 @@ static void wmi_evt_rx_mgmt(struct wil6210_vif *vif, int id, void *d, int len) if (ieee80211_is_beacon(fc) || ieee80211_is_probe_resp(fc)) { struct cfg80211_bss *bss; + struct cfg80211_inform_bss bss_data = { + .chan = channel, + .scan_width = NL80211_BSS_CHAN_WIDTH_20, + .signal = signal, + .boottime_ns = ktime_to_ns(ktime_get_boottime()), + }; u64 tsf = le64_to_cpu(rx_mgmt_frame->u.beacon.timestamp); u16 cap = le16_to_cpu(rx_mgmt_frame->u.beacon.capab_info); u16 bi = le16_to_cpu(rx_mgmt_frame->u.beacon.beacon_int); @@ -892,8 +898,9 @@ static void wmi_evt_rx_mgmt(struct wil6210_vif *vif, int id, void *d, int len) wil_dbg_wmi(wil, "Capability info : 0x%04x\n", cap); - bss = cfg80211_inform_bss_frame(wiphy, channel, rx_mgmt_frame, - d_len, signal, GFP_KERNEL); + bss = cfg80211_inform_bss_frame_data(wiphy, &bss_data, + rx_mgmt_frame, + d_len, GFP_KERNEL); if (bss) { wil_dbg_wmi(wil, "Added BSS %pM\n", rx_mgmt_frame->bssid); @@ -1391,6 +1398,10 @@ static void wmi_evt_delba(struct wil6210_vif *vif, int id, void *d, int len) __le16 fc; u32 d_len; struct cfg80211_bss *bss; + struct cfg80211_inform_bss bss_data = { + .scan_width = NL80211_BSS_CHAN_WIDTH_20, + .boottime_ns = ktime_to_ns(ktime_get_boottime()), + }; if (flen < 0) { wil_err(wil, "sched scan result event too short, len %d\n", @@ -1433,8 +1444,10 @@ static void wmi_evt_delba(struct wil6210_vif *vif, int id, void *d, int len) return; } - bss = cfg80211_inform_bss_frame(wiphy, channel, rx_mgmt_frame, - d_len, signal, GFP_KERNEL); + bss_data.signal = signal; + bss_data.chan = channel; + bss = cfg80211_inform_bss_frame_data(wiphy, &bss_data, rx_mgmt_frame, + d_len, GFP_KERNEL); if (bss) { wil_dbg_wmi(wil, "Added BSS %pM\n", rx_mgmt_frame->bssid); cfg80211_put_bss(wiphy, bss); -- 1.9.1