From patchwork Tue Oct 2 18:03:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rakesh Pillai X-Patchwork-Id: 10623965 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9EE5A1515 for ; Tue, 2 Oct 2018 18:03:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CC3926E56 for ; Tue, 2 Oct 2018 18:03:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74CFA2766D; Tue, 2 Oct 2018 18:03:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 06C1126E56 for ; Tue, 2 Oct 2018 18:03:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=5Lx8xoAAcMKrWUz/ISvnhseyl39nQvZJSQd48neTeXs=; b=kr2 A1aJ1ZmIJeimWUzCVmBNFrTVTbekOZSekfh3kbniYkBOiYT2JpBhMDTNzoUUDZlF+OZ/ntJHOaJu2 mq03dGqGGv0B+YxJ0rrxzaDBu/UYMPzmskkuxpjpA3fl9b6xNVK9KBTauRgbNetrr0ClCw204UmsZ S1gCrZLkz6Ygc1Mjf4LOec56igS3PEoohaJPYbzhm+UqWzQxPjyJUqt3HZw+lA5qcLU8L7R7g9284 I2vMf18by504Ls1+NmvrGggZm44CliITAXvnkMj2lKvVQezEs+p5XrctHNuZyuc1pdZs+IFoMFQNs 98HbIREYm4l9RzBw82goBA2iloqNRmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g7P1I-0005TH-E2; Tue, 02 Oct 2018 18:03:40 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g7P1D-0005SS-RS for ath10k@lists.infradead.org; Tue, 02 Oct 2018 18:03:37 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D2DB46081B; Tue, 2 Oct 2018 18:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538503404; bh=OOzWkRV0IvTKUIAGjKatQzjCfbwMCDuGEWcq+Be2cPg=; h=From:To:Cc:Subject:Date:From; b=JgRWZdCh6EVUhoin/zCjezdWa6CliCnVYH4ipB2QIoVThqc2ooYOeoV36yK8H51CW YELQxg1mKQiHpq3wN9spxbIUuNg6SyilBcd65QJqA3q3/IqrIKHYeZfZMhvAaYCRaQ FCGAR7O0XcTnCMsL2/r3dFmVSEYwWB1MwWq0v7LY= Received: from pillair-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pillair@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0B8376031A; Tue, 2 Oct 2018 18:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538503404; bh=OOzWkRV0IvTKUIAGjKatQzjCfbwMCDuGEWcq+Be2cPg=; h=From:To:Cc:Subject:Date:From; b=JgRWZdCh6EVUhoin/zCjezdWa6CliCnVYH4ipB2QIoVThqc2ooYOeoV36yK8H51CW YELQxg1mKQiHpq3wN9spxbIUuNg6SyilBcd65QJqA3q3/IqrIKHYeZfZMhvAaYCRaQ FCGAR7O0XcTnCMsL2/r3dFmVSEYwWB1MwWq0v7LY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0B8376031A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=pillair@codeaurora.org From: Rakesh Pillai To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: Set probe request oui during driver start Date: Tue, 2 Oct 2018 23:33:13 +0530 Message-Id: <1538503393-17543-1-git-send-email-pillair@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181002_110335_924903_D639D359 X-CRM114-Status: GOOD ( 11.25 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rakesh Pillai , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 97548f9..5e2f14b 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4682,6 +4682,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) { @@ -8565,12 +8573,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; }