netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hostap: allow flashing firmware
@ 2005-12-30 23:22 Pavel Roskin
  2006-01-05  5:18 ` Jouni Malinen
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Roskin @ 2005-12-30 23:22 UTC (permalink / raw)
  To: NetDev; +Cc: hostap

Host AP driver has code to support writing firmware to non-volatile
memory, a.k.a. flash.  This code has been extensively tested when Host
AP was a standalone driver.

Add a configuration option to the kernel to allow enabling this
functionality.  Improve the description of the RAM download option. 
Mention cards that require it.  Remove obsolete scary comment.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---

 drivers/net/wireless/hostap/Kconfig         |   22 ++++++++++++++++++----
 drivers/net/wireless/hostap/hostap_config.h |   13 ++++---------
 2 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/hostap/Kconfig b/drivers/net/wireless/hostap/Kconfig
index 56f41c7..c8f6286 100644
--- a/drivers/net/wireless/hostap/Kconfig
+++ b/drivers/net/wireless/hostap/Kconfig
@@ -26,11 +26,25 @@ config HOSTAP_FIRMWARE
 	depends on HOSTAP
 	---help---
 	Configure Host AP driver to include support for firmware image
-	download. Current version supports only downloading to volatile, i.e.,
-	RAM memory. Flash upgrade is not yet supported.
+	download. This option by itself only enables downloading to the
+	volatile memory, i.e. the card RAM. This option is required to
+	support cards that don't have firmware in flash, such as D-Link
+	DWL-520 rev E and D-Link DWL-650 rev P.
+
+	Firmware image downloading needs a user space tool, prism2_srec.
+	It is available from http://hostap.epitest.fi/.
+
+config HOSTAP_FIRMWARE_NVRAM
+	bool "Support for non-volatile firmware download"
+	depends on HOSTAP_FIRMWARE
+	---help---
+	Allow Host AP driver to write firmware images to the non-volatile
+	card memory, i.e. flash memory that survives power cycling.
+	Enable this option if you want to be able to change card firmware
+	permanently.
 
-	Firmware image downloading needs user space tool, prism2_srec. It is
-	available from http://hostap.epitest.fi/.
+	Firmware image downloading needs a user space tool, prism2_srec.
+	It is available from http://hostap.epitest.fi/.
 
 config HOSTAP_PLX
 	tristate "Host AP driver for Prism2/2.5/3 in PLX9052 PCI adaptors"
diff --git a/drivers/net/wireless/hostap/hostap_config.h b/drivers/net/wireless/hostap/hostap_config.h
index 7ed3425..c090a5a 100644
--- a/drivers/net/wireless/hostap/hostap_config.h
+++ b/drivers/net/wireless/hostap/hostap_config.h
@@ -21,15 +21,10 @@
 #define PRISM2_DOWNLOAD_SUPPORT
 #endif
 
-#ifdef PRISM2_DOWNLOAD_SUPPORT
-/* Allow writing firmware images into flash, i.e., to non-volatile storage.
- * Before you enable this option, you should make absolutely sure that you are
- * using prism2_srec utility that comes with THIS version of the driver!
- * In addition, please note that it is possible to kill your card with
- * non-volatile download if you are using incorrect image. This feature has not
- * been fully tested, so please be careful with it. */
-/* #define PRISM2_NON_VOLATILE_DOWNLOAD */
-#endif /* PRISM2_DOWNLOAD_SUPPORT */
+/* Allow kernel configuration to enable non-volatile download support. */
+#ifdef CONFIG_HOSTAP_FIRMWARE_NVRAM
+#define PRISM2_NON_VOLATILE_DOWNLOAD
+#endif
 
 /* Save low-level I/O for debugging. This should not be enabled in normal use.
  */

-- 
Regards,
Pavel Roskin

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] hostap: allow flashing firmware
  2005-12-30 23:22 [PATCH] hostap: allow flashing firmware Pavel Roskin
@ 2006-01-05  5:18 ` Jouni Malinen
  2006-01-05 11:34   ` Henrik Brix Andersen
  0 siblings, 1 reply; 3+ messages in thread
From: Jouni Malinen @ 2006-01-05  5:18 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: NetDev, hostap

On Fri, Dec 30, 2005 at 06:22:26PM -0500, Pavel Roskin wrote:

> Host AP driver has code to support writing firmware to non-volatile
> memory, a.k.a. flash.  This code has been extensively tested when Host
> AP was a standalone driver.
> 
> Add a configuration option to the kernel to allow enabling this
> functionality.  Improve the description of the RAM download option. 
> Mention cards that require it.  Remove obsolete scary comment.

I'm not completely against this change, but that scary comment is there
on purpose and it is not fully obsolete. It is still possible to get
HFA3841 cards into state which require hardware modifications to recover
from (i.e., they are as good as dead for most users). Taken into this
account, I would prefer that the help text for HOSTAP_FIRMWARE_NVRAM
would include a warning about the potential issues of using incorrect
firmware images. In most cases, RAM (volatile) download can be used to
upgrade the firmware without having to modify the flash contents. This
is also what the current Windows drivers are doing.

-- 
Jouni Malinen                                            PGP id EFC895FA

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hostap: allow flashing firmware
  2006-01-05  5:18 ` Jouni Malinen
@ 2006-01-05 11:34   ` Henrik Brix Andersen
  0 siblings, 0 replies; 3+ messages in thread
From: Henrik Brix Andersen @ 2006-01-05 11:34 UTC (permalink / raw)
  To: hostap; +Cc: NetDev


[-- Attachment #1.1: Type: text/plain, Size: 946 bytes --]

On Wed, Jan 04, 2006 at 09:18:57PM -0800, Jouni Malinen wrote:
> I'm not completely against this change, but that scary comment is there
> on purpose and it is not fully obsolete. It is still possible to get
> HFA3841 cards into state which require hardware modifications to recover
> from (i.e., they are as good as dead for most users). Taken into this
> account, I would prefer that the help text for HOSTAP_FIRMWARE_NVRAM
> would include a warning about the potential issues of using incorrect
> firmware images. In most cases, RAM (volatile) download can be used to
> upgrade the firmware without having to modify the flash contents. This
> is also what the current Windows drivers are doing.

I would welcome such a warning as well - perhaps make
CONFIG_HOSTAP_FIRMWARE_NVRAM depend on CONFIG_EXPERIMENTAL as well?

Regards,
Brix
-- 
Henrik Brix Andersen <brix@gentoo.org>
Gentoo Metadistribution | Mobile computing herd

[-- Attachment #1.2: Type: application/pgp-signature, Size: 211 bytes --]

[-- Attachment #2: Type: text/plain, Size: 132 bytes --]

_______________________________________________
HostAP mailing list
HostAP@shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-05 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-30 23:22 [PATCH] hostap: allow flashing firmware Pavel Roskin
2006-01-05  5:18 ` Jouni Malinen
2006-01-05 11:34   ` Henrik Brix Andersen

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).