[2/2,SRU,B/D/E/OEM-B/OEM-OSP1-B] iwlwifi: exclude GEO SAR support for 3168
diff mbox series

Message ID 20191018043338.11725-3-vicamo.yang@canonical.com
State Accepted
Headers show
Series
  • [1/2,SRU,B/D/E/OEM-B/OEM-OSP1-B] iwlwifi: fw: don't send GEO_TX_POWER_LIMIT command to FW version 36
Related show

Commit Message

You-Sheng Yang Oct. 18, 2019, 4:33 a.m. UTC
From: Luca Coelho <luciano.coelho@intel.com>

BugLink: https://bugs.launchpad.net/bugs/1846016

We currently support two NICs in FW version 29, namely 7265D and 3168.
Out of these, only 7265D supports GEO SAR, so adjust the function that
checks for it accordingly.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Fixes: f5a47fae6aa3 ("iwlwifi: mvm: fix version check for GEO_TX_POWER_LIMIT support")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
(cherry picked from commit 12e36d98d3e5acf5fc57774e0a15906d55f30cb9
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git)
Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

Comments

AceLan Kao Oct. 23, 2019, 4:41 a.m. UTC | #1
The first commit has been included in the Ubuntu 4.15.0-67.76 from stable,
so I applied the second on on linux-oem 4.15.0-1060.69

Acked-By: AceLan Kao <acelan.kao@canonical.com>

Patch
diff mbox series

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 5fadbb0f025e..5c70abda4af5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -795,15 +795,17 @@  static bool iwl_mvm_sar_geo_support(struct iwl_mvm *mvm)
 	 * firmware versions.  Unfortunately, we don't have a TLV API
 	 * flag to rely on, so rely on the major version which is in
 	 * the first byte of ucode_ver.  This was implemented
-	 * initially on version 38 and then backported to29 and 17.
-	 * The intention was to have it in 36 as well, but not all
-	 * 8000 family got this feature enabled.  The 8000 family is
-	 * the only one using version 36, so skip this version
-	 * entirely.
+	 * initially on version 38 and then backported to 17.  It was
+	 * also backported to 29, but only for 7265D devices.  The
+	 * intention was to have it in 36 as well, but not all 8000
+	 * family got this feature enabled.  The 8000 family is the
+	 * only one using version 36, so skip this version entirely.
 	 */
 	return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 38 ||
-	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 ||
-	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17;
+	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17 ||
+	       (IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 &&
+		((mvm->trans->hw_rev & CSR_HW_REV_TYPE_MSK) ==
+		 CSR_HW_REV_TYPE_7265D));
 }
 
 int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)