Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236023
b: refs/heads/master
c: 7249e6a
h: refs/heads/master
i:
  236021: ab647ff
  236019: df9f2f7
  236015: 59c06aa
v: v3
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Feb 18, 2011
1 parent e6a2896 commit 3ab6152
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 30 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: 490e00f68534cd724ba8e486ff6cd6b10d1891b1
refs/heads/master: 7249e6a17bacbb18c4baf1b0d5ca70925409120d
8 changes: 4 additions & 4 deletions trunk/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
spin_lock_init(&wl->isr_lock);

/* prepare ucode */
if (wl_request_fw(wl, (struct pci_dev *)btparam)) {
if (wl_request_fw(wl, (struct pci_dev *)btparam) < 0) {
WL_ERROR("%s: Failed to find firmware usually in %s\n",
KBUILD_MODNAME, "/lib/firmware/brcm");
wl_release_fw(wl);
Expand Down Expand Up @@ -1760,7 +1760,7 @@ int wl_ucode_init_buf(struct wl_info *wl, void **pbuf, u32 idx)
WL_ERROR("ERROR: ucode buf tag:%d can not be found!\n", idx);
*pbuf = NULL;
fail:
return -1;
return BCME_NOTFOUND;
}

int wl_ucode_init_uint(struct wl_info *wl, u32 *data, u32 idx)
Expand Down Expand Up @@ -1868,8 +1868,8 @@ int wl_check_firmwares(struct wl_info *wl)
} else {
/* check if ucode section overruns firmware image */
ucode_hdr = (struct wl_fw_hdr *)fw_hdr->data;
for (entry = 0; entry < wl->fw.hdr_num_entries[i] && rc;
entry++, ucode_hdr++) {
for (entry = 0; entry < wl->fw.hdr_num_entries[i] &&
!rc; entry++, ucode_hdr++) {
if (ucode_hdr->offset + ucode_hdr->len >
fw->size) {
WL_ERROR("%s: conflicting bin/hdr\n",
Expand Down
56 changes: 31 additions & 25 deletions trunk/drivers/staging/brcm80211/brcmsmac/wl_ucode_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,38 @@ int wl_ucode_data_init(struct wl_info *wl)
{
int rc;
rc = wl_check_firmwares(wl);
if (rc < 0)
return rc;
wl_ucode_init_buf(wl, (void **)&d11lcn0bsinitvals24,
D11LCN0BSINITVALS24);
wl_ucode_init_buf(wl, (void **)&d11lcn0initvals24, D11LCN0INITVALS24);
wl_ucode_init_buf(wl, (void **)&d11lcn1bsinitvals24,
D11LCN1BSINITVALS24);
wl_ucode_init_buf(wl, (void **)&d11lcn1initvals24, D11LCN1INITVALS24);
wl_ucode_init_buf(wl, (void **)&d11lcn2bsinitvals24,
D11LCN2BSINITVALS24);
wl_ucode_init_buf(wl, (void **)&d11lcn2initvals24, D11LCN2INITVALS24);
wl_ucode_init_buf(wl, (void **)&d11n0absinitvals16, D11N0ABSINITVALS16);
wl_ucode_init_buf(wl, (void **)&d11n0bsinitvals16, D11N0BSINITVALS16);
wl_ucode_init_buf(wl, (void **)&d11n0initvals16, D11N0INITVALS16);
wl_ucode_init_buf(wl, (void **)&bcm43xx_16_mimo,
D11UCODE_OVERSIGHT16_MIMO);
wl_ucode_init_uint(wl, &bcm43xx_16_mimosz, D11UCODE_OVERSIGHT16_MIMOSZ);
wl_ucode_init_buf(wl, (void **)&bcm43xx_24_lcn,
D11UCODE_OVERSIGHT24_LCN);
wl_ucode_init_uint(wl, &bcm43xx_24_lcnsz, D11UCODE_OVERSIGHT24_LCNSZ);
wl_ucode_init_buf(wl, (void **)&bcm43xx_bommajor,
D11UCODE_OVERSIGHT_BOMMAJOR);
wl_ucode_init_buf(wl, (void **)&bcm43xx_bomminor,
D11UCODE_OVERSIGHT_BOMMINOR);

return 0;
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn0bsinitvals24,
D11LCN0BSINITVALS24);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn0initvals24,
D11LCN0INITVALS24);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn1bsinitvals24,
D11LCN1BSINITVALS24);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn1initvals24,
D11LCN1INITVALS24);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn2bsinitvals24,
D11LCN2BSINITVALS24);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11lcn2initvals24,
D11LCN2INITVALS24);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11n0absinitvals16,
D11N0ABSINITVALS16);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11n0bsinitvals16,
D11N0BSINITVALS16);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&d11n0initvals16,
D11N0INITVALS16);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_16_mimo,
D11UCODE_OVERSIGHT16_MIMO);
rc = rc < 0 ? rc : wl_ucode_init_uint(wl, &bcm43xx_16_mimosz,
D11UCODE_OVERSIGHT16_MIMOSZ);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_24_lcn,
D11UCODE_OVERSIGHT24_LCN);
rc = rc < 0 ? rc : wl_ucode_init_uint(wl, &bcm43xx_24_lcnsz,
D11UCODE_OVERSIGHT24_LCNSZ);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_bommajor,
D11UCODE_OVERSIGHT_BOMMAJOR);
rc = rc < 0 ? rc : wl_ucode_init_buf(wl, (void **)&bcm43xx_bomminor,
D11UCODE_OVERSIGHT_BOMMINOR);
return rc;
}

void wl_ucode_data_free(void)
Expand Down

0 comments on commit 3ab6152

Please sign in to comment.