From: Marcel Holtmann <holtmann@linux.intel.com>
To: reinette chatre <reinette.chatre@intel.com>
Cc: "linville@tuxdriver.com" <linville@tuxdriver.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"ipw3945-devel@lists.sourceforge.net"
<ipw3945-devel@lists.sourceforge.net>
Subject: Re: [PATCH 10/11] iwlwifi: rely on API version read from firmware
Date: Tue, 02 Dec 2008 22:51:08 +0100 [thread overview]
Message-ID: <1228254668.31158.257.camel@violet.holtmann.net> (raw)
In-Reply-To: <1228254303.10900.90.camel@rc-desk>
Hi Reinette,
> > > This adds the infrastructure to support older firmware APIs.
> > > The API version number is stored as part of the filename, we first try to
> > > load the most recent firmware and progressively try lower versions.
> > > The API version is also read from the firmware self and stored as part
> > > of the iwl_priv structure. Only firmware that is supported by driver will
> > > be loaded. The version number read from firmware is compared
> > > to supported versions in the driver not the API version used as part of
> > > filename.
> >
> > thanks for doing this. This can really help smooth upgrade path in case
> > the firmware API changes.
> >
> > > -MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE);
> > > -MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE);
> > > +MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
> > > +MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));
> >
> > So we don't have clear semantics on how MODULE_FIRMWARE should be used.
> > The current way is that it list all potential firmware versions. So in
> > cases it support API -1 and -2, then it has to list both. And not only
> > the latest.
>
> Even though the driver supports older firmware we really want the user
> to use the latest firmware. The driver will also print a clear error if
> the user is using API -1 and the latest available is -2. For this reason
> we do want to make clear through MODULE_FIRMWARE which firmware the
> driver would like to work with: the latest.
as I said, we never clearly defined the semantics of MODULE_FIRMWARE for
these cases. The only problem that I see is that some initrd tools are
actually using MODULE_FIRMWARE to figure which files need to be included
for the builtin kernel drivers. So on a system with old firmware only,
it will not include these.
Maybe we need to extend MODULE_FIRMWARE. Maybe something like
MODULE_ALTERNATE_FIRMWARE or some extra flags.
> > Personally I think we should not create too many macros here and just
> > list all the firmware files manually.
>
> Having one spot to change when a new API is supported makes the code
> less error prone.
I agree on that, but it doesn't make it easier to read through the
source code.
Regards
Marcel
next prev parent reply other threads:[~2008-12-02 21:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-02 20:13 [PATCH 0/11] iwlwifi driver updates Reinette Chatre
2008-12-02 20:13 ` [PATCH 01/11] iwlwifi: move host command check function into separate file Reinette Chatre
2008-12-02 20:13 ` [PATCH 02/11] iwlwifi: fix printk size format error Reinette Chatre
2008-12-02 20:13 ` [PATCH 03/11] iwl3945: Select correct sta ID from find_station() Reinette Chatre
2008-12-02 20:14 ` [PATCH 04/11] iwlwifi: move disable/enable interrupts to iwl-core.c Reinette Chatre
2008-12-02 20:14 ` [PATCH 05/11] iwlwifi: move channels sysfs to debugfs Reinette Chatre
2008-12-02 20:14 ` [PATCH 06/11] iwl3945: add debugfs support Reinette Chatre
2008-12-02 20:14 ` [PATCH 07/11] iwl3945: Fix iwl3945 rate scaling Reinette Chatre
2008-12-02 20:14 ` [PATCH 08/11] iwlwifi: fix DMA channel number in iwl_txq_ctx_stop Reinette Chatre
2008-12-02 20:14 ` [PATCH 09/11] iwlwifi: store ucode version number Reinette Chatre
2008-12-02 20:14 ` [PATCH 10/11] iwlwifi: rely on API version read from firmware Reinette Chatre
2008-12-02 20:14 ` [PATCH 11/11] iwl3945 : Fix a-band association for passive channels Reinette Chatre
2008-12-03 16:49 ` [ipw3945-devel] " Helmut Schaa
2008-12-03 17:58 ` reinette chatre
2008-12-02 21:19 ` [PATCH 10/11] iwlwifi: rely on API version read from firmware Marcel Holtmann
2008-12-02 21:45 ` reinette chatre
2008-12-02 21:51 ` Marcel Holtmann [this message]
2008-12-02 22:51 ` reinette chatre
2008-12-04 7:23 ` [PATCH 07/11] iwl3945: Fix iwl3945 rate scaling Kalle Valo
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=1228254668.31158.257.camel@violet.holtmann.net \
--to=holtmann@linux.intel.com \
--cc=ipw3945-devel@lists.sourceforge.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=reinette.chatre@intel.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).