aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uwb/i1480/dfu/mac.c
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@indt.org.br>2008-09-17 11:34:38 -0400
committerDavid Vrabel <dv02@dv02pc01.europe.root.pri>2008-09-17 11:54:34 -0400
commitb5784f10d559b3c7b25874b21702ad0907b6fcb7 (patch)
treec3e678d182a8c928cbb3660895458ed98e6c9b03 /drivers/uwb/i1480/dfu/mac.c
parent8c7e8cb85557cc500122f3e489936582b7d11a7c (diff)
uwb: i1480/GUWA100U: fix firmware download issues
IOGear firmware versions >= 1.4.12224 fail to be downloaded because of a spurious (and harmless) RCEB received after the download notification. This patch handles this RCEB and keeps compatibility with future versions that might not emit this RCEB. i1480_rceb_check() is reused to check for the RCEB. It is also refactored with improved comments and reused in another place in mac.c where the checking was being duplicated. This patch was tested on both i1480 and GUWA100U HWAs, with all firmware versions currently available. Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br>
Diffstat (limited to 'drivers/uwb/i1480/dfu/mac.c')
-rw-r--r--drivers/uwb/i1480/dfu/mac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/uwb/i1480/dfu/mac.c b/drivers/uwb/i1480/dfu/mac.c
index 3d445541e8e9..8d069907a3b5 100644
--- a/drivers/uwb/i1480/dfu/mac.c
+++ b/drivers/uwb/i1480/dfu/mac.c
@@ -507,8 +507,8 @@ int i1480_mac_fw_upload(struct i1480 *i1480)
507 goto error_size; 507 goto error_size;
508 } 508 }
509 result = -EIO; 509 result = -EIO;
510 if (rcebe->rceb.bEventType != i1480_CET_VS1 510 if (i1480_rceb_check(i1480, &rcebe->rceb, NULL, 0, i1480_CET_VS1,
511 || le16_to_cpu(rcebe->rceb.wEvent) != i1480_EVT_RM_INIT_DONE) { 511 i1480_EVT_RM_INIT_DONE) < 0) {
512 dev_err(i1480->dev, "wrong initialization event 0x%02x/%04x/%02x " 512 dev_err(i1480->dev, "wrong initialization event 0x%02x/%04x/%02x "
513 "received; expected 0x%02x/%04x/00\n", 513 "received; expected 0x%02x/%04x/00\n",
514 rcebe->rceb.bEventType, le16_to_cpu(rcebe->rceb.wEvent), 514 rcebe->rceb.bEventType, le16_to_cpu(rcebe->rceb.wEvent),