Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171231
b: refs/heads/master
c: 28cff50
h: refs/heads/master
i:
  171229: 6cf51f0
  171227: 39c0b7b
  171223: 44cf5b4
  171215: 214d5b5
  171199: 6fbfd01
v: v3
  • Loading branch information
Cindy H Kao authored and Inaky Perez-Gonzalez committed Oct 19, 2009
1 parent 5208a06 commit 8b7418b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 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: 6f4fc90a36fbe87e3003b3f7c8090ecc89bd1353
refs/heads/master: 28cff50d99ce9a1db65b7d4dcdcc0f1f8d9f9309
15 changes: 11 additions & 4 deletions trunk/drivers/net/wimax/i2400m/fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1388,15 +1388,16 @@ const struct i2400m_bcf_hdr *i2400m_bcf_hdr_find(struct i2400m *i2400m)
*/
static
int i2400m_fw_dnload(struct i2400m *i2400m, const struct i2400m_bcf_hdr *bcf,
size_t bcf_size, enum i2400m_bri flags)
size_t fw_size, enum i2400m_bri flags)
{
int ret = 0;
struct device *dev = i2400m_dev(i2400m);
int count = i2400m->bus_bm_retries;
const struct i2400m_bcf_hdr *bcf_hdr;
size_t bcf_size;

d_fnstart(5, dev, "(i2400m %p bcf %p size %zu)\n",
i2400m, bcf, bcf_size);
d_fnstart(5, dev, "(i2400m %p bcf %p fw size %zu)\n",
i2400m, bcf, fw_size);
i2400m->boot_mode = 1;
wmb(); /* Make sure other readers see it */
hw_reboot:
Expand Down Expand Up @@ -1434,6 +1435,12 @@ int i2400m_fw_dnload(struct i2400m *i2400m, const struct i2400m_bcf_hdr *bcf,
if (ret < 0)
goto error_dnload_init;

/*
* bcf_size refers to one header size plus the fw sections size
* indicated by the header,ie. if there are other extended headers
* at the tail, they are not counted
*/
bcf_size = sizeof(u32) * le32_to_cpu(bcf_hdr->size);
ret = i2400m_dnload_bcf(i2400m, bcf, bcf_size);
if (ret == -ERESTARTSYS)
goto error_dev_rebooted;
Expand Down Expand Up @@ -1464,7 +1471,7 @@ int i2400m_fw_dnload(struct i2400m *i2400m, const struct i2400m_bcf_hdr *bcf,
error_bootrom_init:
error_too_many_reboots:
d_fnend(5, dev, "(i2400m %p bcf %p size %zu) = %d\n",
i2400m, bcf, bcf_size, ret);
i2400m, bcf, fw_size, ret);
return ret;

error_dev_rebooted:
Expand Down

0 comments on commit 8b7418b

Please sign in to comment.