]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ath10k: set probe request oui during driver start
authorRakesh Pillai <pillair@codeaurora.org>
Tue, 2 Oct 2018 18:03:13 +0000 (23:33 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:16:19 +0000 (09:16 +0100)
[ 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 <pillair@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath10k/mac.c

index d3d33cc2adfdeed1f3bf379706a161ceb3599630..613ca74f1b2867a7143e25812a9104cd4ff51ed2 100644 (file)
@@ -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;
        }