Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6023017ybc; Wed, 27 Nov 2019 13:34:23 -0800 (PST) X-Google-Smtp-Source: APXvYqwJg6GE48/JCEdZBZevuUauk9At7ukThd/tG8+YGVWArmcP/kci5nD8QvPox4ia0+Q1Mvv7 X-Received: by 2002:a17:906:4e94:: with SMTP id v20mr52210204eju.34.1574890463550; Wed, 27 Nov 2019 13:34:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890463; cv=none; d=google.com; s=arc-20160816; b=REqzr01KrNtmQ1PRS27kVrNzMBTag8D5z58UjwMzw47/dmFSZj2EqgmGwA39T8Om6o MLZAh2hH2w+uDAMH/pjkuVmJOnEWEuowOaWHEKvbB1p6BIvCFqOFbTz3u9mS7bQ0DBsI G+KX8MmaqdP8aJaKgDu8+7IfyVKdy6T2BdSMX0NXGTJOsZZYBahtQBSyoHCW+IwmtbzO X6bWc4LPZk5+ZbTxxVamwtcxOstC52jhqHP71eZYw3uJqQ9xaAakmwp1f5l+RbiJCrvN FdFGsE+8uD8DucjF+WMbGQUHYNRqot9IxzpPDt4ynpeNOnJlua9zAG/F5md6xI5xcXyQ ZzcQ== 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:dkim-signature; bh=pyZ9SyTap6WQjVgjF7RVVv6NQWBjnZOHRTmo45loXxk=; b=O1B1z75imZivMWxGoCgfyCYen0ROXMbYIeEd5mcINxi8VtvKuhKoE7Buuqqs1i5Mg5 BHRS40NIuWkLiSjqH7/nfHhfv15Bw9i8omNs7XsJ9gQDo7Z0fFBU7M3cbyOPKoMOiIW/ LpsvrfJHOtvShakBv4t1ySy3eZc8QEv4ex2UTp8IngFiE60PiIb5qhK7saT6RUa+GD9d gBrbmmQvOFlcAq/FIv5vtD/RPlC8FpNrurxavvp14YnCWb/Iqfn7rdHbAuogA+moUJjm VI1cyUM88s56ENc2OcqwGM32OSx50uv+hhrA88gR2EdupZU0I8BIf+J4mklTuA6jn7S2 Q4hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GiPjF41Y; 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 g21si207829ejr.195.2019.11.27.13.33.59; Wed, 27 Nov 2019 13:34:23 -0800 (PST) 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=@kernel.org header.s=default header.b=GiPjF41Y; 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 S1731092AbfK0U4i (ORCPT + 99 others); Wed, 27 Nov 2019 15:56:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:47412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731067AbfK0U4g (ORCPT ); Wed, 27 Nov 2019 15:56:36 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 629F22068E; Wed, 27 Nov 2019 20:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888195; bh=40KOctADMc2kGz5duai8pYEfu7RExPJwRBK9jHSlvf4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GiPjF41Yiok0hGIgiDGpnHydX2mSh/NCZs5QdS1TMp567V4WWPohigVnF2nW61O9w Wzxs8qbBCYgcoQS0T1UjnHXn6rHhbxiBUSbRmW35Q/eeEdjcxbNUQS1+PlRCoOR6Y/ zyZTsKRd68Or7Ut/oU9WUucQA50u9/p3jNzOU7Sg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rakesh Pillai , Kalle Valo , Sasha Levin Subject: [PATCH 4.19 040/306] ath10k: set probe request oui during driver start Date: Wed, 27 Nov 2019 21:28:10 +0100 Message-Id: <20191127203117.777116671@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Rakesh Pillai [ Upstream commit f1157695c527d4ee949ac83f743f80107751a70c ] Currently the wmi command for setting probe request oui, needed for mac randomization, is sent during the mac register. At this time, during the driver init the wmi has already been detached. This can cause unexpected behavior since the firmware is already down and the wmi has been detached. Send the wmi command for setting probe request oui during the driver start. This will make sure that the firmware is started and wmi is initialized before we send this command. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Fixes: 60e1d0fb290197fe505dff6e4e3b7e4d258dbf60 Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/mac.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index d3d33cc2adfde..613ca74f1b286 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4686,6 +4686,14 @@ static int ath10k_start(struct ieee80211_hw *hw) goto err_core_stop; } + if (test_bit(WMI_SERVICE_SPOOF_MAC_SUPPORT, ar->wmi.svc_map)) { + ret = ath10k_wmi_scan_prob_req_oui(ar, ar->mac_addr); + if (ret) { + ath10k_err(ar, "failed to set prob req oui: %i\n", ret); + goto err_core_stop; + } + } + if (test_bit(WMI_SERVICE_ADAPTIVE_OCS, ar->wmi.svc_map)) { ret = ath10k_wmi_adaptive_qcs(ar, true); if (ret) { @@ -8551,12 +8559,6 @@ int ath10k_mac_register(struct ath10k *ar) } if (test_bit(WMI_SERVICE_SPOOF_MAC_SUPPORT, ar->wmi.svc_map)) { - ret = ath10k_wmi_scan_prob_req_oui(ar, ar->mac_addr); - if (ret) { - ath10k_err(ar, "failed to set prob req oui: %i\n", ret); - goto err_dfs_detector_exit; - } - ar->hw->wiphy->features |= NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR; } -- 2.20.1