Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197093
b: refs/heads/master
c: 437de95
h: refs/heads/master
i:
  197091: 8df45ba
v: v3
  • Loading branch information
Ruslan Pisarev authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 0f03ed2 commit eda5f62
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 068b561c3c96e7a52a4974da457fb8591064d40b
refs/heads/master: 437de951eca9c831dc69a47b58603b1d8d9cbf82
15 changes: 10 additions & 5 deletions trunk/drivers/staging/wlags49_h2/dhf.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,19 @@ CFG_PROG_STRCT *p;
int i;

/* validate the image */
for (i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++); /* NOP */
for (i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++)
; /* NOP */
if (i != sizeof(signature) ||
fw->signature[i] != 0x01 ||
/* test for Little/Big Endian Binary flag */
fw->signature[i+1] != (/* HCF_BIG_ENDIAN ? 'B' : */ 'L')) rc = DHF_ERR_INCOMP_FW;
fw->signature[i+1] != (/* HCF_BIG_ENDIAN ? 'B' : */ 'L'))
rc = DHF_ERR_INCOMP_FW;
else { /* Little Endian Binary format */
fw->codep = (CFG_PROG_STRCT FAR*)((PSEUDO_CHARP)fw->codep + (hcf_32)fw);
fw->identity = (CFG_IDENTITY_STRCT FAR*)((PSEUDO_CHARP)fw->identity + (hcf_32)fw);
fw->compat = (CFG_RANGE20_STRCT FAR*)((PSEUDO_CHARP)fw->compat + (hcf_32)fw);
for (i = 0; fw->p[i]; i++) fw->p[i] = ((PSEUDO_CHARP)fw->p[i] + (hcf_32)fw);
for (i = 0; fw->p[i]; i++)
fw->p[i] = ((PSEUDO_CHARP)fw->p[i] + (hcf_32)fw);
p = fw->codep;
while (p->len) {
p->host_addr = (PSEUDO_CHARP)p->host_addr + (hcf_32)fw;
Expand Down Expand Up @@ -361,7 +364,8 @@ int i;

MMDASSERT(fw != NULL, 0)
/* validate the image */
for (i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++) /* NOP */;
for (i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++)
; /* NOP */
if (i != sizeof(signature) ||
fw->signature[i] != 0x01 ||
/* check for binary image */
Expand All @@ -376,7 +380,8 @@ int i;
MMDASSERT(rc == HCF_SUCCESS, ltvp->typ)
MMDASSERT(rc == HCF_SUCCESS, ltvp->len)
}
if (rc == HCF_SUCCESS) rc = check_comp_fw(fw);
if (rc == HCF_SUCCESS)
rc = check_comp_fw(fw);
if (rc == HCF_SUCCESS) {
while (rc == HCF_SUCCESS && p->len) {
rc = PUT_INFO(p);
Expand Down

0 comments on commit eda5f62

Please sign in to comment.