linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: linville@tuxdriver.com
To: ipwpatch@vger.kernel.org
Cc: linux-wireless@vger.kernel.org, Zhu Yi <yi.zhu@intel.com>,
	Ben Cahill <ben.m.cahill@intel.com>
Subject: [PATCH 16/17] iwlwifi: Add uCode/driver compatibility version number
Date: Fri, 27 Jul 2007 17:26:40 +0800	[thread overview]
Message-ID: <11855284303672-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <11855284281570-git-send-email-yi.zhu@intel.com>

Add uCode/driver compatibility version number in firmware
filename, to enable compatibility enforcement and coexistence
of old/new drivers.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 drivers/net/wireless/iwl-base.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/iwl-base.c b/drivers/net/wireless/iwl-base.c
index 8558ea8..e3cd459 100644
--- a/drivers/net/wireless/iwl-base.c
+++ b/drivers/net/wireless/iwl-base.c
@@ -110,6 +110,13 @@ BUILD_BUG()
 #define DRV_COPYRIGHT	"Copyright(c) 2003-2007 Intel Corporation"
 #define DRV_VERSION     IWLWIFI_VERSION
 
+/* Change firmware file name, using "-" and incrementing number,
+ *   *only* when uCode interface or architecture changes so that it
+ *   is not compatible with earlier drivers.
+ * This number will also appear in << 8 position of 1st dword of uCode file */
+#define IWL3945_UCODE_API "-1"
+#define IWL4965_UCODE_API "-1"
+
 MODULE_DESCRIPTION(DRV_DESCRIPTION);
 MODULE_VERSION(DRV_VERSION);
 MODULE_AUTHOR(DRV_COPYRIGHT);
@@ -6191,21 +6198,17 @@ static int iwl_read_ucode(struct iwl_priv *priv)
 	int rc = 0;
 	const struct firmware *ucode_raw;
 #if IWL == 3945
-	const char *name = "iwlwifi-3945.ucode";	/* firmware file name */
+	/* firmware file name contains uCode/driver compatibility version */
+	const char *name = "iwlwifi-3945" IWL3945_UCODE_API ".ucode";
 #elif IWL == 4965
-	const char *name = "iwlwifi-4965.ucode";	/* firmware file name */
+	const char *name = "iwlwifi-4965" IWL4965_UCODE_API ".ucode";
 #endif
 	u8 *src;
 	size_t len;
 	u32 ver, inst_size, data_size, init_size, init_data_size, boot_size;
 
 	/* Ask kernel firmware_class module to get the boot firmware off disk.
-	 * request_firmware() is synchronous call, file is in memory on return.
-	 * TODO:  Would it be more polite to use asynchronous
-	 *        request_firmware_nowait()??  If so, put request back into
-	 *        iwl_pci_probe(), and rest of this function would serve as
-	 *        the callback for request_firmware_nowait().  Also need to
-	 *        make sure everything waits for this callback to complete! */
+	 * request_firmware() is synchronous, file is in memory on return. */
 	rc = request_firmware(&ucode_raw, name, &priv->pci_dev->dev);
 	if (rc < 0) {
 		IWL_ERROR("%s firmware file req failed: Reason %d\n", name, rc);
-- 
1.5.2

  reply	other threads:[~2007-07-27  9:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <11855284012123-git-send-email-yi.zhu@intel.com>
2007-07-27  9:26 ` [PATCH 01/17] iwlwifi: provide frequency to radiotap monitor not channel index Zhu Yi
2007-07-27  9:26   ` [PATCH 02/17] iwlwifi: Calculate and report noise level while associated Zhu Yi
2007-07-27  9:26     ` [PATCH 03/17] iwlwifi: modify station fix Zhu Yi
2007-07-27  9:26       ` [PATCH 04/17] iwlwifi: cleanup tx queue allocation Zhu Yi
2007-07-27  9:26         ` [PATCH 05/17] iwlwifi: rxon filter_flags endianity fix Zhu Yi
2007-07-27  9:26           ` [PATCH 06/17] iwlwifi: rename base.c to iwl-base.c Zhu Yi
2007-07-27  9:26             ` [PATCH 07/17] iwilwifi: removed unused constant Zhu Yi
2007-07-27  9:26               ` [PATCH 08/17] iwlwifi: QoS control endianity fixes Zhu Yi
2007-07-27  9:26                 ` [PATCH 09/17] iwlwifi: EEPROM reading fix Zhu Yi
2007-07-27  9:26                   ` [PATCH 10/17] iwlwifi: endianity cleaning of iwl_print_rx_config_cmd Zhu Yi
2007-07-27  9:26                     ` [PATCH 11/17] iwlwifi: endianity cleanup for QoS host command Zhu Yi
2007-07-27  9:26                       ` [PATCH 12/17] iwlwifi: endianity cleanup for power table " Zhu Yi
2007-07-27  9:26                         ` [PATCH 13/17] iwlwifi: fix 11n on 2.4 channel Zhu Yi
2007-07-27  9:26                           ` [PATCH 14/17] iwlwifi: fix channel switch assert Zhu Yi
2007-07-27  9:26                             ` [PATCH 15/17] iwlwifi: fix scaing watchdog time out Zhu Yi
2007-07-27  9:26                               ` Zhu Yi [this message]
2007-07-27  9:26                                 ` [PATCH 17/17] iwlwifi: update version stamp to 0.1.5 Zhu Yi
2007-07-27 11:22                   ` [PATCH 09/17] iwlwifi: EEPROM reading fix Michael Buesch
2007-07-27 22:24                     ` Tomas Winkler
2007-07-27 22:32                       ` Michael Buesch
2007-07-27  9:30 ` [PATCH 00/17] iwlwifi driver updated to version 0.1.5 Zhu Yi

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=11855284303672-git-send-email-yi.zhu@intel.com \
    --to=yi.zhu@intel.com \
    --cc=ben.m.cahill@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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).