From 1b56da5f3e3ea868c69a242a3fb33e6b4649bcad Mon Sep 17 00:00:00 2001
From: Luca Coelho <luciano.coelho@intel.com>
Date: Tue, 15 Aug 2017 23:12:39 +0300
Subject: [PATCH 62/68] iwlwifi: fw: fix lar_enabled endian problem in
iwl_fw_get_nvm
References: FATE#322675
Patch-mainline: v4.14-rc1
Git-commit: 8a0d53ce10053ce39b9512a054ab4c0bef2e2cc3
We read the regulatory.lar_enabled field in iwl_fw_get_nvm() and store
it in nvm->lar_enabled, taking care of endianness. But then later we
read it again to pass the value to iwl_init_sbands() without handling
endianness. To solve this, simply reuse nvm->lar_enabled when calling
that function.
Fixes: e9e1ba3dbf00 ("iwlwifi: mvm: support getting nvm data from firmware")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/net/wireless/intel/iwlwifi/fw/nvm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/nvm.c b/drivers/net/wireless/intel/iwlwifi/fw/nvm.c
index e81f6dd3744e..bd2e1fb43f5a 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/nvm.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/nvm.c
@@ -148,8 +148,7 @@ struct iwl_nvm_data *iwl_fw_get_nvm(struct iwl_fw_runtime *fwrt)
rsp->regulatory.channel_profile,
nvm->valid_tx_ant & fwrt->fw->valid_tx_ant,
nvm->valid_rx_ant & fwrt->fw->valid_rx_ant,
- rsp->regulatory.lar_enabled && lar_fw_supported,
- false);
+ nvm->lar_enabled, false);
iwl_free_resp(&hcmd);
return nvm;
--
2.12.3