Skip to content

Commit 5f06f6b

Browse files
lucacoelhoKalle Valo
authored andcommitted
iwlwifi: mvm: don't send SAR GEO command for 3160 devices
SAR GEO offsets are not supported on 3160 devices. The code was refactored and caused us to start sending the command anyway, which causes a FW assertion failure. Fix that only considering this feature supported on FW API with major version is 17 if the device is not 3160. Additionally, fix the caller of iwl_mvm_sar_geo_init() so that it checks for the return value, which it was ignoring. Reported-by: Len Brown <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Fixes: 78a19d5 ("iwlwifi: mvm: Read the PPAG and SAR tables at INIT stage") Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20220128144623.96f683a89b42.I14e2985bfd7ddd8a8d83eb1869b800c0e7f30db4@changeid
1 parent 92883a5 commit 5f06f6b

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

drivers/net/wireless/intel/iwlwifi/fw/acpi.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
22
/*
33
* Copyright (C) 2017 Intel Deutschland GmbH
4-
* Copyright (C) 2019-2021 Intel Corporation
4+
* Copyright (C) 2019-2022 Intel Corporation
55
*/
66
#include <linux/uuid.h>
77
#include "iwl-drv.h"
@@ -888,10 +888,11 @@ bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt)
888888
* only one using version 36, so skip this version entirely.
889889
*/
890890
return IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) >= 38 ||
891-
IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 17 ||
892-
(IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 29 &&
893-
((fwrt->trans->hw_rev & CSR_HW_REV_TYPE_MSK) ==
894-
CSR_HW_REV_TYPE_7265D));
891+
(IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 17 &&
892+
fwrt->trans->hw_rev != CSR_HW_REV_TYPE_3160) ||
893+
(IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 29 &&
894+
((fwrt->trans->hw_rev & CSR_HW_REV_TYPE_MSK) ==
895+
CSR_HW_REV_TYPE_7265D));
895896
}
896897
IWL_EXPORT_SYMBOL(iwl_sar_geo_support);
897898

drivers/net/wireless/intel/iwlwifi/iwl-csr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
22
/*
3-
* Copyright (C) 2005-2014, 2018-2021 Intel Corporation
3+
* Copyright (C) 2005-2014, 2018-2022 Intel Corporation
44
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
55
* Copyright (C) 2016 Intel Deutschland GmbH
66
*/
@@ -329,6 +329,7 @@ enum {
329329
#define CSR_HW_REV_TYPE_2x00 (0x0000100)
330330
#define CSR_HW_REV_TYPE_105 (0x0000110)
331331
#define CSR_HW_REV_TYPE_135 (0x0000120)
332+
#define CSR_HW_REV_TYPE_3160 (0x0000164)
332333
#define CSR_HW_REV_TYPE_7265D (0x0000210)
333334
#define CSR_HW_REV_TYPE_NONE (0x00001F0)
334335
#define CSR_HW_REV_TYPE_QNJ (0x0000360)

drivers/net/wireless/intel/iwlwifi/mvm/fw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
17411741
ret = iwl_mvm_sar_init(mvm);
17421742
if (ret == 0)
17431743
ret = iwl_mvm_sar_geo_init(mvm);
1744-
else if (ret < 0)
1744+
if (ret < 0)
17451745
goto error;
17461746

17471747
ret = iwl_mvm_sgom_init(mvm);

0 commit comments

Comments
 (0)