[PATCH] Flash download is broken in CVS

Pavel Roskin proski
Tue Feb 3 18:08:55 PST 2004


Hello!

Flash download is broken in CVS HostAP.  hfa384x_get_rid() won't access
RIDs when local->hw_downloading is set.  prism2_download_nonvolatile()
sets local->hw_downloading too early and fails to access
HFA384X_RID_DOWNLOADBUFFER.  It should be safe to set
local->hw_downloading later.  This allows flash download.

Thanks to KC Ferguson for reporting the bug.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- driver/modules/hostap_config.h
+++ driver/modules/hostap_config.h
@@ -59,7 +59,7 @@
  * 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 */
+#define PRISM2_NON_VOLATILE_DOWNLOAD
 #endif /* PRISM2_DOWNLOAD_SUPPORT */
 
 /* Include wireless extensions sub-ioctl support even if wireless extensions
--- driver/modules/hostap_download.c
+++ driver/modules/hostap_download.c
@@ -541,8 +541,6 @@ static int prism2_download_nonvolatile(l
 		return -1;
 	}
 
-	local->hw_downloading = 1;
-
 	ret = local->func->get_rid(dev, HFA384X_RID_DOWNLOADBUFFER,
 				   &dlbuffer, 6, 0);
 
@@ -561,6 +559,8 @@ static int prism2_download_nonvolatile(l
 
 	bufaddr = (dlbuffer.page << 7) + dlbuffer.offset;
 
+	local->hw_downloading = 1;
+
 	if (!local->pri_only) {
 		prism2_hw_shutdown(dev, 0);
 



More information about the Hostap mailing list