Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278906
b: refs/heads/master
c: 28a5344
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Dec 13, 2011
1 parent 1b0e2f5 commit b488726
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 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: cbc80db2922112cf3c77a6121827ad662ea78c2d
refs/heads/master: 28a5344261753fadb1731b82c5eeecca708a877c
18 changes: 9 additions & 9 deletions trunk/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1022,22 +1022,25 @@ static __used void ai_nvram_process(struct si_info *sii)
}

static struct si_info *ai_doattach(struct si_info *sii,
void __iomem *regs, struct pci_dev *pbus)
struct bcma_bus *pbus)
{
void __iomem *regs = pbus->mmio;
struct si_pub *sih = &sii->pub;
u32 w, savewin;
struct chipcregs __iomem *cc;
uint socitype;
uint origidx;

/* assume the window is looking at chipcommon */
WARN_ON(pbus->mapped_core->id.id != BCMA_CORE_CHIPCOMMON);
memset((unsigned char *) sii, 0, sizeof(struct si_info));

savewin = 0;

sii->icbus = pbus;
sii->buscoreidx = BADIDX;

sii->curmap = regs;
sii->pcibus = pbus;
sii->pcibus = pbus->host_pci;

/* find Chipcommon address */
pci_read_config_dword(sii->pcibus, PCI_BAR0_WIN, &savewin);
Expand Down Expand Up @@ -1160,13 +1163,10 @@ static struct si_info *ai_doattach(struct si_info *sii,
}

/*
* Allocate a si handle.
* devid - pci device id (used to determine chip#)
* osh - opaque OS handle
* regs - virtual address of initial core registers
* Allocate a si handle and do the attach.
*/
struct si_pub *
ai_attach(void __iomem *regs, struct pci_dev *sdh)
ai_attach(struct bcma_bus *pbus)
{
struct si_info *sii;

Expand All @@ -1175,7 +1175,7 @@ ai_attach(void __iomem *regs, struct pci_dev *sdh)
if (sii == NULL)
return NULL;

if (ai_doattach(sii, regs, sdh) == NULL) {
if (ai_doattach(sii, pbus) == NULL) {
kfree(sii);
return NULL;
}
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef _BRCM_AIUTILS_H_
#define _BRCM_AIUTILS_H_

#include <linux/bcma/bcma.h>

#include "types.h"

/*
Expand Down Expand Up @@ -170,6 +172,7 @@ struct gpioh_item {
/* misc si info needed by some of the routines */
struct si_info {
struct si_pub pub; /* back plane public state (must be first) */
struct bcma_bus *icbus; /* handle to soc interconnect bus */
struct pci_dev *pcibus; /* handle to pci bus */
uint dev_coreid; /* the core provides driver functions */
void *intr_arg; /* interrupt callback function arg */
Expand Down Expand Up @@ -235,7 +238,7 @@ extern u32 ai_addrspacesize(struct si_pub *sih, uint asidx);
extern void ai_write_wrap_reg(struct si_pub *sih, u32 offset, u32 val);

/* === exported functions === */
extern struct si_pub *ai_attach(void __iomem *regs, struct pci_dev *sdh);
extern struct si_pub *ai_attach(struct bcma_bus *pbus);
extern void ai_detach(struct si_pub *sih);
extern uint ai_coreid(struct si_pub *sih);
extern uint ai_corerev(struct si_pub *sih);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/brcm80211/brcmsmac/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4469,7 +4469,7 @@ static int brcms_b_attach(struct brcms_c_info *wlc, struct bcma_device *core,
* Do the hardware portion of the attach. Also initialize software
* state that depends on the particular hardware we are running.
*/
wlc_hw->sih = ai_attach(core->bus->mmio, core->bus->host_pci);
wlc_hw->sih = ai_attach(core->bus);
if (wlc_hw->sih == NULL) {
wiphy_err(wiphy, "wl%d: brcms_b_attach: si_attach failed\n",
unit);
Expand Down

0 comments on commit b488726

Please sign in to comment.