linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emmanuel Grumbach <egrumbach@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Liad Kaufman <liad.kaufman@intel.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 13/17] iwlwifi: 8000: fix fw name to account for revision
Date: Sun, 21 Sep 2014 22:22:14 +0300	[thread overview]
Message-ID: <1411327338-23099-13-git-send-email-egrumbach@gmail.com> (raw)
In-Reply-To: <541F23D2.90600@gmail.com>

From: Liad Kaufman <liad.kaufman@intel.com>

The 8000 HW series also includes the revision in the FW
name.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-8000.c |  2 +-
 drivers/net/wireless/iwlwifi/iwl-drv.c  | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-8000.c b/drivers/net/wireless/iwlwifi/iwl-8000.c
index 4ae8ba6..e435148 100644
--- a/drivers/net/wireless/iwlwifi/iwl-8000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-8000.c
@@ -81,7 +81,7 @@
 #define IWL8000_NVM_VERSION		0x0a1d
 #define IWL8000_TX_POWER_VERSION	0xffff /* meaningless */
 
-#define IWL8000_FW_PRE "iwlwifi-8000-"
+#define IWL8000_FW_PRE "iwlwifi-8000"
 #define IWL8000_MODULE_FIRMWARE(api) IWL8000_FW_PRE __stringify(api) ".ucode"
 
 #define NVM_HW_SECTION_NUM_FAMILY_8000		10
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c
index ed673ba..0f1084f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/iwlwifi/iwl-drv.c
@@ -69,6 +69,7 @@
 #include <linux/vmalloc.h>
 
 #include "iwl-drv.h"
+#include "iwl-csr.h"
 #include "iwl-debug.h"
 #include "iwl-trans.h"
 #include "iwl-op-mode.h"
@@ -244,6 +245,23 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
 	snprintf(drv->firmware_name, sizeof(drv->firmware_name), "%s%s.ucode",
 		 name_pre, tag);
 
+	/*
+	 * Starting 8000B - FW name format has changed. This overwrites the
+	 * previous name and uses the new format.
+	 */
+	if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) {
+		char rev_step[2] = {
+			'A' + CSR_HW_REV_STEP(drv->trans->hw_rev), 0
+		};
+
+		/* A-step doesn't have an indication */
+		if (CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_A_STEP)
+			rev_step[0] = 0;
+
+		snprintf(drv->firmware_name, sizeof(drv->firmware_name),
+			 "%s%s-%s.ucode", name_pre, rev_step, tag);
+	}
+
 	IWL_DEBUG_INFO(drv, "attempting to load firmware %s'%s'\n",
 		       (drv->fw_index == UCODE_EXPERIMENTAL_INDEX)
 				? "EXPERIMENTAL " : "",
-- 
1.9.1


  parent reply	other threads:[~2014-09-21 19:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-21 19:15 pull request: iwlwifi-next 2014-09-21 Emmanuel Grumbach
2014-09-21 19:21 ` Emmanuel Grumbach
2014-09-26 17:35   ` John W. Linville
2014-09-21 19:22 ` [PATCH 01/17] iwlwifi: mvm: support cloned tx skbs Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 02/17] iwlwifi: mvm: Update TX power in TPC reports Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 03/17] iwlwifi: mvm: Announce Quiet Period support Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 04/17] iwlwifi: mvm: Set RRM_ENABLED bit in scan commands Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 05/17] iwlwifi: mvm: prepare for scheduler config command Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 06/17] iwlwifi: mvm: add debugfs entry to read the current temperature Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 07/17] iwlwifi: mvm: Allow schedule scan while connected Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 08/17] iwlwifi: mvm: choose an initial tx rate based on rssi conditions Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 09/17] iwlwifi: mvm: rs: refactor to allow direct rs updating Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 10/17] iwlwifi: mvm: limit aggregation size in low latency to 6 Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 11/17] iwlwifi: Add missing PCI IDs for the 7260 series Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 12/17] iwlwifi: pcie: fix HW_REV saving for 8000 series Emmanuel Grumbach
2014-09-21 19:22 ` Emmanuel Grumbach [this message]
2014-09-22 10:45   ` [PATCH 13/17] iwlwifi: 8000: fix fw name to account for revision Bjørn Mork
2014-09-22 17:28     ` Grumbach, Emmanuel
2014-09-23 11:09       ` Bjørn Mork
2014-09-23 11:38         ` Grumbach, Emmanuel
2014-09-26 19:44           ` Luca Coelho
2014-09-27  6:41             ` Bjørn Mork
2015-11-21 21:12               ` [PATCH] iwlwifi: mvm: add hwmon device for the temperature sensor Bjørn Mork
2015-11-26 15:46                 ` Johannes Berg
2015-11-26 16:52                   ` Bjørn Mork
2015-11-26 17:04                     ` Johannes Berg
2014-09-21 19:22 ` [PATCH 14/17] iwlwifi: mvm: report all BA notifs to RS Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 15/17] iwlwifi: mvm: rs: fix logic in case of multiple TIDs Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 16/17] iwlwifi: mvm: disable BT Co-running by default Emmanuel Grumbach
2014-09-21 19:22 ` [PATCH 17/17] iwlwifi: mvm: Refactor and fix max probe len computation Emmanuel Grumbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411327338-23099-13-git-send-email-egrumbach@gmail.com \
    --to=egrumbach@gmail.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=liad.kaufman@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).