Commit 3c9d4c37 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: remove struct osl_info from driver sources

The struct osl_info was being used only in attach functions but
previous changes make the entire usage of this structure obsolete.
Reviewed-by: default avatarBrett Rudley <brudley@broadcom.com>
Reviewed-by: default avatarHenry Ptasinski <henryp@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 537ebbbe
...@@ -46,7 +46,7 @@ typedef void (*sdioh_cb_fn_t) (void *); ...@@ -46,7 +46,7 @@ typedef void (*sdioh_cb_fn_t) (void *);
* The handler shall be provided by all subsequent calls. No local cache * The handler shall be provided by all subsequent calls. No local cache
* cfghdl points to the starting address of pci device mapped memory * cfghdl points to the starting address of pci device mapped memory
*/ */
extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *cfghdl, uint irq); extern sdioh_info_t *sdioh_attach(void *cfghdl, uint irq);
extern SDIOH_API_RC sdioh_detach(sdioh_info_t *si); extern SDIOH_API_RC sdioh_detach(sdioh_info_t *si);
extern SDIOH_API_RC sdioh_interrupt_register(sdioh_info_t *si, extern SDIOH_API_RC sdioh_interrupt_register(sdioh_info_t *si,
sdioh_cb_fn_t fn, void *argh); sdioh_cb_fn_t fn, void *argh);
......
...@@ -38,7 +38,6 @@ struct bcmsdh_info { ...@@ -38,7 +38,6 @@ struct bcmsdh_info {
bool init_success; /* underlying driver successfully attached */ bool init_success; /* underlying driver successfully attached */
void *sdioh; /* handler for sdioh */ void *sdioh; /* handler for sdioh */
u32 vendevid; /* Target Vendor and Device ID on SD bus */ u32 vendevid; /* Target Vendor and Device ID on SD bus */
struct osl_info *osh;
bool regfail; /* Save status of last bool regfail; /* Save status of last
reg_read/reg_write call */ reg_read/reg_write call */
u32 sbwad; /* Save backplane window address */ u32 sbwad; /* Save backplane window address */
...@@ -55,8 +54,7 @@ void bcmsdh_enable_hw_oob_intr(bcmsdh_info_t *sdh, bool enable) ...@@ -55,8 +54,7 @@ void bcmsdh_enable_hw_oob_intr(bcmsdh_info_t *sdh, bool enable)
} }
#endif #endif
bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl, bcmsdh_info_t *bcmsdh_attach(void *cfghdl, void **regsva, uint irq)
void **regsva, uint irq)
{ {
bcmsdh_info_t *bcmsdh; bcmsdh_info_t *bcmsdh;
...@@ -69,13 +67,12 @@ bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl, ...@@ -69,13 +67,12 @@ bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl,
/* save the handler locally */ /* save the handler locally */
l_bcmsdh = bcmsdh; l_bcmsdh = bcmsdh;
bcmsdh->sdioh = sdioh_attach(osh, cfghdl, irq); bcmsdh->sdioh = sdioh_attach(cfghdl, irq);
if (!bcmsdh->sdioh) { if (!bcmsdh->sdioh) {
bcmsdh_detach(bcmsdh); bcmsdh_detach(bcmsdh);
return NULL; return NULL;
} }
bcmsdh->osh = osh;
bcmsdh->init_success = true; bcmsdh->init_success = true;
*regsva = (u32 *) SI_ENUM_BASE; *regsva = (u32 *) SI_ENUM_BASE;
......
...@@ -56,7 +56,6 @@ struct bcmsdh_hc { ...@@ -56,7 +56,6 @@ struct bcmsdh_hc {
#else #else
struct pci_dev *dev; /* pci device handle */ struct pci_dev *dev; /* pci device handle */
#endif /* BCMPLATFORM_BUS */ #endif /* BCMPLATFORM_BUS */
struct osl_info *osh;
void *regs; /* SDIO Host Controller address */ void *regs; /* SDIO Host Controller address */
bcmsdh_info_t *sdh; /* SDIO Host Controller handle */ bcmsdh_info_t *sdh; /* SDIO Host Controller handle */
void *ch; void *ch;
...@@ -142,7 +141,6 @@ static ...@@ -142,7 +141,6 @@ static
#endif /* BCMLXSDMMC */ #endif /* BCMLXSDMMC */
int bcmsdh_probe(struct device *dev) int bcmsdh_probe(struct device *dev)
{ {
struct osl_info *osh = NULL;
bcmsdh_hc_t *sdhc = NULL; bcmsdh_hc_t *sdhc = NULL;
unsigned long regs = 0; unsigned long regs = 0;
bcmsdh_info_t *sdh = NULL; bcmsdh_info_t *sdh = NULL;
...@@ -177,28 +175,21 @@ int bcmsdh_probe(struct device *dev) ...@@ -177,28 +175,21 @@ int bcmsdh_probe(struct device *dev)
} }
#endif /* defined(OOB_INTR_ONLY) */ #endif /* defined(OOB_INTR_ONLY) */
/* allocate SDIO Host Controller state info */ /* allocate SDIO Host Controller state info */
osh = osl_attach(dev, PCI_BUS);
if (!osh) {
SDLX_MSG(("%s: osl_attach failed\n", __func__));
goto err;
}
sdhc = kzalloc(sizeof(bcmsdh_hc_t), GFP_ATOMIC); sdhc = kzalloc(sizeof(bcmsdh_hc_t), GFP_ATOMIC);
if (!sdhc) { if (!sdhc) {
SDLX_MSG(("%s: out of memory\n", __func__)); SDLX_MSG(("%s: out of memory\n", __func__));
goto err; goto err;
} }
sdhc->osh = osh;
sdhc->dev = (void *)dev; sdhc->dev = (void *)dev;
#ifdef BCMLXSDMMC #ifdef BCMLXSDMMC
sdh = bcmsdh_attach(osh, (void *)0, (void **)&regs, irq); sdh = bcmsdh_attach((void *)0, (void **)&regs, irq);
if (!sdh) { if (!sdh) {
SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__)); SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
goto err; goto err;
} }
#else #else
sdh = bcmsdh_attach(osh, (void *)r->start, (void **)&regs, irq); sdh = bcmsdh_attach((void *)r->start, (void **)&regs, irq);
if (!sdh) { if (!sdh) {
SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__)); SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
goto err; goto err;
...@@ -220,7 +211,7 @@ int bcmsdh_probe(struct device *dev) ...@@ -220,7 +211,7 @@ int bcmsdh_probe(struct device *dev)
/* try to attach to the target device */ /* try to attach to the target device */
sdhc->ch = drvinfo.attach((vendevid >> 16), (vendevid & 0xFFFF), sdhc->ch = drvinfo.attach((vendevid >> 16), (vendevid & 0xFFFF),
0, 0, 0, 0, (void *)regs, NULL, sdh); 0, 0, 0, 0, (void *)regs, sdh);
if (!sdhc->ch) { if (!sdhc->ch) {
SDLX_MSG(("%s: device attach failed\n", __func__)); SDLX_MSG(("%s: device attach failed\n", __func__));
goto err; goto err;
...@@ -235,8 +226,7 @@ int bcmsdh_probe(struct device *dev) ...@@ -235,8 +226,7 @@ int bcmsdh_probe(struct device *dev)
bcmsdh_detach(sdhc->sdh); bcmsdh_detach(sdhc->sdh);
kfree(sdhc); kfree(sdhc);
} }
if (osh)
osl_detach(osh);
return -ENODEV; return -ENODEV;
} }
...@@ -246,7 +236,6 @@ static ...@@ -246,7 +236,6 @@ static
int bcmsdh_remove(struct device *dev) int bcmsdh_remove(struct device *dev)
{ {
bcmsdh_hc_t *sdhc, *prev; bcmsdh_hc_t *sdhc, *prev;
struct osl_info *osh;
sdhc = sdhcinfo; sdhc = sdhcinfo;
drvinfo.detach(sdhc->ch); drvinfo.detach(sdhc->ch);
...@@ -269,9 +258,7 @@ int bcmsdh_remove(struct device *dev) ...@@ -269,9 +258,7 @@ int bcmsdh_remove(struct device *dev)
} }
/* release SDIO Host Controller info */ /* release SDIO Host Controller info */
osh = sdhc->osh;
kfree(sdhc); kfree(sdhc);
osl_detach(osh);
#if !defined(BCMLXSDMMC) #if !defined(BCMLXSDMMC)
dev_set_drvdata(dev, NULL); dev_set_drvdata(dev, NULL);
......
...@@ -111,7 +111,7 @@ static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd) ...@@ -111,7 +111,7 @@ static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd)
/* /*
* Public entry points & extern's * Public entry points & extern's
*/ */
extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *bar0, uint irq) sdioh_info_t *sdioh_attach(void *bar0, uint irq)
{ {
sdioh_info_t *sd; sdioh_info_t *sd;
int err_ret; int err_ret;
...@@ -128,7 +128,6 @@ extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *bar0, uint irq) ...@@ -128,7 +128,6 @@ extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *bar0, uint irq)
sd_err(("sdioh_attach: out of memory\n")); sd_err(("sdioh_attach: out of memory\n"));
return NULL; return NULL;
} }
sd->osh = osh;
if (sdioh_sdmmc_osinit(sd) != 0) { if (sdioh_sdmmc_osinit(sd) != 0) {
sd_err(("%s:sdioh_sdmmc_osinit() failed\n", __func__)); sd_err(("%s:sdioh_sdmmc_osinit() failed\n", __func__));
kfree(sd); kfree(sd);
......
...@@ -118,8 +118,8 @@ extern void sdioh_sdmmc_devintr_off(sdioh_info_t *sd); ...@@ -118,8 +118,8 @@ extern void sdioh_sdmmc_devintr_off(sdioh_info_t *sd);
*/ */
/* Register mapping routines */ /* Register mapping routines */
extern u32 *sdioh_sdmmc_reg_map(struct osl_info *osh, s32 addr, int size); extern u32 *sdioh_sdmmc_reg_map(s32 addr, int size);
extern void sdioh_sdmmc_reg_unmap(struct osl_info *osh, s32 addr, int size); extern void sdioh_sdmmc_reg_unmap(s32 addr, int size);
/* Interrupt (de)registration routines */ /* Interrupt (de)registration routines */
extern int sdioh_sdmmc_register_irq(sdioh_info_t *sd, uint irq); extern int sdioh_sdmmc_register_irq(sdioh_info_t *sd, uint irq);
......
...@@ -52,7 +52,6 @@ enum dhd_bus_state { ...@@ -52,7 +52,6 @@ enum dhd_bus_state {
/* Common structure for module and instance linkage */ /* Common structure for module and instance linkage */
typedef struct dhd_pub { typedef struct dhd_pub {
/* Linkage ponters */ /* Linkage ponters */
struct osl_info *osh; /* OSL handle */
struct dhd_bus *bus; /* Bus module handle */ struct dhd_bus *bus; /* Bus module handle */
struct dhd_prot *prot; /* Protocol module handle */ struct dhd_prot *prot; /* Protocol module handle */
struct dhd_info *info; /* Info module handle */ struct dhd_info *info; /* Info module handle */
...@@ -213,16 +212,12 @@ typedef struct dhd_if_event { ...@@ -213,16 +212,12 @@ typedef struct dhd_if_event {
* Exported from dhd OS modules (dhd_linux/dhd_ndis) * Exported from dhd OS modules (dhd_linux/dhd_ndis)
*/ */
/* To allow osl_attach/detach calls from os-independent modules */
struct osl_info *dhd_osl_attach(void *pdev, uint bustype);
void dhd_osl_detach(struct osl_info *osh);
/* Indication from bus module regarding presence/insertion of dongle. /* Indication from bus module regarding presence/insertion of dongle.
* Return dhd_pub_t pointer, used as handle to OS module in later calls. * Return dhd_pub_t pointer, used as handle to OS module in later calls.
* Returned structure should have bus and prot pointers filled in. * Returned structure should have bus and prot pointers filled in.
* bus_hdrlen specifies required headroom for bus module header. * bus_hdrlen specifies required headroom for bus module header.
*/ */
extern dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus, extern dhd_pub_t *dhd_attach(struct dhd_bus *bus,
uint bus_hdrlen); uint bus_hdrlen);
extern int dhd_net_attach(dhd_pub_t *dhdp, int idx); extern int dhd_net_attach(dhd_pub_t *dhdp, int idx);
......
...@@ -1858,16 +1858,6 @@ static int dhd_open(struct net_device *net) ...@@ -1858,16 +1858,6 @@ static int dhd_open(struct net_device *net)
return ret; return ret;
} }
struct osl_info *dhd_osl_attach(void *pdev, uint bustype)
{
return osl_attach(pdev, bustype);
}
void dhd_osl_detach(struct osl_info *osh)
{
osl_detach(osh);
}
int int
dhd_add_if(dhd_info_t *dhd, int ifidx, void *handle, char *name, dhd_add_if(dhd_info_t *dhd, int ifidx, void *handle, char *name,
u8 *mac_addr, u32 flags, u8 bssidx) u8 *mac_addr, u32 flags, u8 bssidx)
...@@ -1921,8 +1911,7 @@ void dhd_del_if(dhd_info_t *dhd, int ifidx) ...@@ -1921,8 +1911,7 @@ void dhd_del_if(dhd_info_t *dhd, int ifidx)
up(&dhd->sysioc_sem); up(&dhd->sysioc_sem);
} }
dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus, dhd_pub_t *dhd_attach(struct dhd_bus *bus, uint bus_hdrlen)
uint bus_hdrlen)
{ {
dhd_info_t *dhd = NULL; dhd_info_t *dhd = NULL;
struct net_device *net; struct net_device *net;
...@@ -1955,7 +1944,6 @@ dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus, ...@@ -1955,7 +1944,6 @@ dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus,
* Save the dhd_info into the priv * Save the dhd_info into the priv
*/ */
memcpy(netdev_priv(net), &dhd, sizeof(dhd)); memcpy(netdev_priv(net), &dhd, sizeof(dhd));
dhd->pub.osh = osh;
/* Set network interface name if it was provided as module parameter */ /* Set network interface name if it was provided as module parameter */
if (iface_name[0]) { if (iface_name[0]) {
......
...@@ -362,7 +362,7 @@ extern void bcmsdh_enable_hw_oob_intr(void *sdh, bool enable); ...@@ -362,7 +362,7 @@ extern void bcmsdh_enable_hw_oob_intr(void *sdh, bool enable);
#if defined(OOB_INTR_ONLY) && defined(SDIO_ISR_THREAD) #if defined(OOB_INTR_ONLY) && defined(SDIO_ISR_THREAD)
#error OOB_INTR_ONLY is NOT working with SDIO_ISR_THREAD #error OOB_INTR_ONLY is NOT working with SDIO_ISR_THREAD
#endif /* defined(OOB_INTR_ONLY) && defined(SDIO_ISR_THREAD) */ #endif /* defined(OOB_INTR_ONLY) && defined(SDIO_ISR_THREAD) */
#define PKTALIGN(_osh, _p, _len, _align) \ #define PKTALIGN(_p, _len, _align) \
do { \ do { \
uint datalign; \ uint datalign; \
datalign = (unsigned long)((_p)->data); \ datalign = (unsigned long)((_p)->data); \
...@@ -436,7 +436,7 @@ static int dhdsdio_mem_dump(dhd_bus_t *bus); ...@@ -436,7 +436,7 @@ static int dhdsdio_mem_dump(dhd_bus_t *bus);
#endif /* DHD_DEBUG */ #endif /* DHD_DEBUG */
static int dhdsdio_download_state(dhd_bus_t *bus, bool enter); static int dhdsdio_download_state(dhd_bus_t *bus, bool enter);
static void dhdsdio_release(dhd_bus_t *bus, struct osl_info *osh); static void dhdsdio_release(dhd_bus_t *bus);
static void dhdsdio_release_malloc(dhd_bus_t *bus); static void dhdsdio_release_malloc(dhd_bus_t *bus);
static void dhdsdio_disconnect(void *ptr); static void dhdsdio_disconnect(void *ptr);
static bool dhdsdio_chipmatch(u16 chipid); static bool dhdsdio_chipmatch(u16 chipid);
...@@ -911,7 +911,6 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan, ...@@ -911,7 +911,6 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan,
bool free_pkt) bool free_pkt)
{ {
int ret; int ret;
struct osl_info *osh;
u8 *frame; u8 *frame;
u16 len, pad = 0; u16 len, pad = 0;
u32 swheader; u32 swheader;
...@@ -923,7 +922,6 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan, ...@@ -923,7 +922,6 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan,
DHD_TRACE(("%s: Enter\n", __func__)); DHD_TRACE(("%s: Enter\n", __func__));
sdh = bus->sdh; sdh = bus->sdh;
osh = bus->dhd->osh;
if (bus->dhd->dongle_reset) { if (bus->dhd->dongle_reset) {
ret = BCME_NOTREADY; ret = BCME_NOTREADY;
...@@ -948,7 +946,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan, ...@@ -948,7 +946,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan,
goto done; goto done;
} }
PKTALIGN(osh, new, pkt->len, DHD_SDALIGN); PKTALIGN(new, pkt->len, DHD_SDALIGN);
memcpy(new->data, pkt->data, pkt->len); memcpy(new->data, pkt->data, pkt->len);
if (free_pkt) if (free_pkt)
pkt_buf_free_skb(pkt); pkt_buf_free_skb(pkt);
...@@ -1073,12 +1071,10 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan, ...@@ -1073,12 +1071,10 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan,
int dhd_bus_txdata(struct dhd_bus *bus, struct sk_buff *pkt) int dhd_bus_txdata(struct dhd_bus *bus, struct sk_buff *pkt)
{ {
int ret = BCME_ERROR; int ret = BCME_ERROR;
struct osl_info *osh;
uint datalen, prec; uint datalen, prec;
DHD_TRACE(("%s: Enter\n", __func__)); DHD_TRACE(("%s: Enter\n", __func__));
osh = bus->dhd->osh;
datalen = pkt->len; datalen = pkt->len;
#ifdef SDTEST #ifdef SDTEST
...@@ -2484,9 +2480,6 @@ dhdsdio_doiovar(dhd_bus_t *bus, const bcm_iovar_t *vi, u32 actionid, ...@@ -2484,9 +2480,6 @@ dhdsdio_doiovar(dhd_bus_t *bus, const bcm_iovar_t *vi, u32 actionid,
__func__, bool_val, bus->dhd->dongle_reset, __func__, bool_val, bus->dhd->dongle_reset,
bus->dhd->busstate)); bus->dhd->busstate));
ASSERT(bus->dhd->osh);
/* ASSERT(bus->cl_devid); */
dhd_bus_devreset(bus->dhd, (u8) bool_val); dhd_bus_devreset(bus->dhd, (u8) bool_val);
break; break;
...@@ -3259,7 +3252,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq) ...@@ -3259,7 +3252,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
} }
/* Adhere to start alignment requirements */ /* Adhere to start alignment requirements */
PKTALIGN(osh, pnext, sublen, DHD_SDALIGN); PKTALIGN(pnext, sublen, DHD_SDALIGN);
} }
/* If all allocations succeeded, save packet chain /* If all allocations succeeded, save packet chain
...@@ -3739,7 +3732,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) ...@@ -3739,7 +3732,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
bus->usebufpool = true; bus->usebufpool = true;
ASSERT(!(pkt->prev)); ASSERT(!(pkt->prev));
PKTALIGN(osh, pkt, rdlen, DHD_SDALIGN); PKTALIGN(pkt, rdlen, DHD_SDALIGN);
rxbuf = (u8 *) (pkt->data); rxbuf = (u8 *) (pkt->data);
/* Read the entire frame */ /* Read the entire frame */
sdret = sdret =
...@@ -4108,7 +4101,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) ...@@ -4108,7 +4101,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
/* Leave room for what we already read, and align remainder */ /* Leave room for what we already read, and align remainder */
ASSERT(firstread < pkt->len); ASSERT(firstread < pkt->len);
skb_pull(pkt, firstread); skb_pull(pkt, firstread);
PKTALIGN(osh, pkt, rdlen, DHD_SDALIGN); PKTALIGN(pkt, rdlen, DHD_SDALIGN);
/* Read the remaining frame data */ /* Read the remaining frame data */
sdret = sdret =
...@@ -4635,7 +4628,6 @@ static void dhdsdio_pktgen(dhd_bus_t *bus) ...@@ -4635,7 +4628,6 @@ static void dhdsdio_pktgen(dhd_bus_t *bus)
u8 *data; u8 *data;
uint pktcount; uint pktcount;
uint fillbyte; uint fillbyte;
struct osl_info *osh = bus->dhd->osh;
u16 len; u16 len;
/* Display current count if appropriate */ /* Display current count if appropriate */
...@@ -4663,14 +4655,14 @@ static void dhdsdio_pktgen(dhd_bus_t *bus) ...@@ -4663,14 +4655,14 @@ static void dhdsdio_pktgen(dhd_bus_t *bus)
/* Allocate an appropriate-sized packet */ /* Allocate an appropriate-sized packet */
len = bus->pktgen_len; len = bus->pktgen_len;
pkt = pkt_buf_get_skb(osh, pkt = pkt_buf_get_skb(
(len + SDPCM_HDRLEN + SDPCM_TEST_HDRLEN + DHD_SDALIGN), (len + SDPCM_HDRLEN + SDPCM_TEST_HDRLEN + DHD_SDALIGN),
true); true);
if (!pkt) { if (!pkt) {
DHD_ERROR(("%s: pkt_buf_get_skb failed!\n", __func__)); DHD_ERROR(("%s: pkt_buf_get_skb failed!\n", __func__));
break; break;
} }
PKTALIGN(osh, pkt, (len + SDPCM_HDRLEN + SDPCM_TEST_HDRLEN), PKTALIGN(pkt, (len + SDPCM_HDRLEN + SDPCM_TEST_HDRLEN),
DHD_SDALIGN); DHD_SDALIGN);
data = (u8 *) (pkt->data) + SDPCM_HDRLEN; data = (u8 *) (pkt->data) + SDPCM_HDRLEN;
...@@ -4694,7 +4686,7 @@ static void dhdsdio_pktgen(dhd_bus_t *bus) ...@@ -4694,7 +4686,7 @@ static void dhdsdio_pktgen(dhd_bus_t *bus)
default: default:
DHD_ERROR(("Unrecognized pktgen mode %d\n", DHD_ERROR(("Unrecognized pktgen mode %d\n",
bus->pktgen_mode)); bus->pktgen_mode));
pkt_buf_free_skb(osh, pkt, true); pkt_buf_free_skb(pkt, true);
bus->pktgen_count = 0; bus->pktgen_count = 0;
return; return;
} }
...@@ -4740,16 +4732,15 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start) ...@@ -4740,16 +4732,15 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start)
{ {
struct sk_buff *pkt; struct sk_buff *pkt;
u8 *data; u8 *data;
struct osl_info *osh = bus->dhd->osh;
/* Allocate the packet */ /* Allocate the packet */
pkt = pkt_buf_get_skb(osh, SDPCM_HDRLEN + SDPCM_TEST_HDRLEN + DHD_SDALIGN, pkt = pkt_buf_get_skb(SDPCM_HDRLEN + SDPCM_TEST_HDRLEN + DHD_SDALIGN,
true); true);
if (!pkt) { if (!pkt) {
DHD_ERROR(("%s: pkt_buf_get_skb failed!\n", __func__)); DHD_ERROR(("%s: pkt_buf_get_skb failed!\n", __func__));
return; return;
} }
PKTALIGN(osh, pkt, (SDPCM_HDRLEN + SDPCM_TEST_HDRLEN), DHD_SDALIGN); PKTALIGN(pkt, (SDPCM_HDRLEN + SDPCM_TEST_HDRLEN), DHD_SDALIGN);
data = (u8 *) (pkt->data) + SDPCM_HDRLEN; data = (u8 *) (pkt->data) + SDPCM_HDRLEN;
/* Fill in the test header */ /* Fill in the test header */
...@@ -4765,7 +4756,6 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start) ...@@ -4765,7 +4756,6 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start)
static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq) static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq)
{ {
struct osl_info *osh = bus->dhd->osh;
u8 *data; u8 *data;
uint pktlen; uint pktlen;
...@@ -4779,7 +4769,7 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq) ...@@ -4779,7 +4769,7 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq)
if (pktlen < SDPCM_TEST_HDRLEN) { if (pktlen < SDPCM_TEST_HDRLEN) {
DHD_ERROR(("dhdsdio_restrcv: toss runt frame, pktlen %d\n", DHD_ERROR(("dhdsdio_restrcv: toss runt frame, pktlen %d\n",
pktlen)); pktlen));
pkt_buf_free_skb(osh, pkt, false); pkt_buf_free_skb(pkt, false);
return; return;
} }
...@@ -4797,7 +4787,7 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq) ...@@ -4797,7 +4787,7 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq)
DHD_ERROR(("dhdsdio_testrcv: frame length mismatch, " DHD_ERROR(("dhdsdio_testrcv: frame length mismatch, "
"pktlen %d seq %d" " cmd %d extra %d len %d\n", "pktlen %d seq %d" " cmd %d extra %d len %d\n",
pktlen, seq, cmd, extra, len)); pktlen, seq, cmd, extra, len));
pkt_buf_free_skb(osh, pkt, false); pkt_buf_free_skb(pkt, false);
return; return;
} }
} }
...@@ -4812,14 +4802,14 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq) ...@@ -4812,14 +4802,14 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq)
bus->pktgen_sent++; bus->pktgen_sent++;
} else { } else {
bus->pktgen_fail++; bus->pktgen_fail++;
pkt_buf_free_skb(osh, pkt, false); pkt_buf_free_skb(pkt, false);
} }
bus->pktgen_rcvd++; bus->pktgen_rcvd++;
break; break;
case SDPCM_TEST_ECHORSP: case SDPCM_TEST_ECHORSP:
if (bus->ext_loop) { if (bus->ext_loop) {
pkt_buf_free_skb(osh, pkt, false); pkt_buf_free_skb(pkt, false);
bus->pktgen_rcvd++; bus->pktgen_rcvd++;
break; break;
} }
...@@ -4832,12 +4822,12 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq) ...@@ -4832,12 +4822,12 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq)
break; break;
} }
} }
pkt_buf_free_skb(osh, pkt, false); pkt_buf_free_skb(pkt, false);
bus->pktgen_rcvd++; bus->pktgen_rcvd++;
break; break;
case SDPCM_TEST_DISCARD: case SDPCM_TEST_DISCARD:
pkt_buf_free_skb(osh, pkt, false); pkt_buf_free_skb(pkt, false);
bus->pktgen_rcvd++; bus->pktgen_rcvd++;
break; break;
...@@ -4847,7 +4837,7 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq) ...@@ -4847,7 +4837,7 @@ static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq)
DHD_INFO(("dhdsdio_testrcv: unsupported or unknown command, " DHD_INFO(("dhdsdio_testrcv: unsupported or unknown command, "
"pktlen %d seq %d" " cmd %d extra %d len %d\n", "pktlen %d seq %d" " cmd %d extra %d len %d\n",
pktlen, seq, cmd, extra, len)); pktlen, seq, cmd, extra, len));
pkt_buf_free_skb(osh, pkt, false); pkt_buf_free_skb(pkt, false);
break; break;
} }
...@@ -5066,7 +5056,7 @@ static bool dhdsdio_chipmatch(u16 chipid) ...@@ -5066,7 +5056,7 @@ static bool dhdsdio_chipmatch(u16 chipid)
static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no, static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no,
u16 slot, u16 func, uint bustype, void *regsva, u16 slot, u16 func, uint bustype, void *regsva,
struct osl_info *osh, void *sdh) void *sdh)
{ {
int ret; int ret;
dhd_bus_t *bus; dhd_bus_t *bus;
...@@ -5143,15 +5133,6 @@ static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no, ...@@ -5143,15 +5133,6 @@ static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no,
return NULL; return NULL;
} }
if (osh == NULL) {
/* Ask the OS interface part for an OSL handle */
osh = dhd_osl_attach(sdh, DHD_BUS);
if (!osh) {
DHD_ERROR(("%s: osl_attach failed!\n", __func__));
return NULL;
}
}
/* Allocate private bus interface state */ /* Allocate private bus interface state */
bus = kzalloc(sizeof(dhd_bus_t), GFP_ATOMIC); bus = kzalloc(sizeof(dhd_bus_t), GFP_ATOMIC);
if (!bus) { if (!bus) {
...@@ -5172,7 +5153,7 @@ static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no, ...@@ -5172,7 +5153,7 @@ static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no,
} }
/* Attach to the dhd/OS/network interface */ /* Attach to the dhd/OS/network interface */
bus->dhd = dhd_attach(osh, bus, SDPCM_RESERVE); bus->dhd = dhd_attach(bus, SDPCM_RESERVE);
if (!bus->dhd) { if (!bus->dhd) {
DHD_ERROR(("%s: dhd_attach failed\n", __func__)); DHD_ERROR(("%s: dhd_attach failed\n", __func__));
goto fail; goto fail;
...@@ -5220,7 +5201,7 @@ static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no, ...@@ -5220,7 +5201,7 @@ static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no,
return bus; return bus;
fail: fail:
dhdsdio_release(bus, osh); dhdsdio_release(bus);
return NULL; return NULL;
} }
...@@ -5527,7 +5508,7 @@ dhdsdio_download_firmware(struct dhd_bus *bus, void *sdh) ...@@ -5527,7 +5508,7 @@ dhdsdio_download_firmware(struct dhd_bus *bus, void *sdh)
} }
/* Detach and free everything */ /* Detach and free everything */
static void dhdsdio_release(dhd_bus_t *bus, struct osl_info *osh) static void dhdsdio_release(dhd_bus_t *bus)
{ {
DHD_TRACE(("%s: Enter\n", __func__)); DHD_TRACE(("%s: Enter\n", __func__));
...@@ -5549,9 +5530,6 @@ static void dhdsdio_release(dhd_bus_t *bus, struct osl_info *osh) ...@@ -5549,9 +5530,6 @@ static void dhdsdio_release(dhd_bus_t *bus, struct osl_info *osh)
kfree(bus); kfree(bus);
} }
if (osh)
dhd_osl_detach(osh);
DHD_TRACE(("%s: Disconnected\n", __func__)); DHD_TRACE(("%s: Disconnected\n", __func__));
} }
...@@ -5604,7 +5582,7 @@ static void dhdsdio_disconnect(void *ptr) ...@@ -5604,7 +5582,7 @@ static void dhdsdio_disconnect(void *ptr)
if (bus) { if (bus) {
ASSERT(bus->dhd); ASSERT(bus->dhd);
dhdsdio_release(bus, bus->dhd->osh); dhdsdio_release(bus);
} }
DHD_TRACE(("%s: Disconnected\n", __func__)); DHD_TRACE(("%s: Disconnected\n", __func__));
......
...@@ -790,7 +790,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs, ...@@ -790,7 +790,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
} }
/* common load-time initialization */ /* common load-time initialization */
wl->wlc = wlc_attach((void *)wl, vendor, device, unit, wl->piomode, osh, wl->wlc = wlc_attach((void *)wl, vendor, device, unit, wl->piomode,
wl->regsva, wl->bcm_bustype, btparam, &err); wl->regsva, wl->bcm_bustype, btparam, &err);
wl_release_fw(wl); wl_release_fw(wl);
if (!wl->wlc) { if (!wl->wlc) {
......
...@@ -531,8 +531,6 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme) ...@@ -531,8 +531,6 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme)
if (wlc_hw->di[0] == 0) { /* Init FIFOs */ if (wlc_hw->di[0] == 0) { /* Init FIFOs */
uint addrwidth; uint addrwidth;
int dma_attach_err = 0; int dma_attach_err = 0;
struct osl_info *osh = wlc->osh;
/* Find out the DMA addressing capability and let OS know /* Find out the DMA addressing capability and let OS know
* All the channels within one DMA core have 'common-minimum' same * All the channels within one DMA core have 'common-minimum' same
* capability * capability
...@@ -553,7 +551,7 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme) ...@@ -553,7 +551,7 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme)
*/ */
ASSERT(TX_AC_BK_FIFO == 0); ASSERT(TX_AC_BK_FIFO == 0);
ASSERT(RX_FIFO == 0); ASSERT(RX_FIFO == 0);
wlc_hw->di[0] = dma_attach(osh, name, wlc_hw->sih, wlc_hw->di[0] = dma_attach(name, wlc_hw->sih,
(wme ? DMAREG(wlc_hw, DMA_TX, 0) : (wme ? DMAREG(wlc_hw, DMA_TX, 0) :
NULL), DMAREG(wlc_hw, DMA_RX, 0), NULL), DMAREG(wlc_hw, DMA_RX, 0),
(wme ? tune->ntxd : 0), tune->nrxd, (wme ? tune->ntxd : 0), tune->nrxd,
...@@ -569,7 +567,7 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme) ...@@ -569,7 +567,7 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme)
*/ */
ASSERT(TX_AC_BE_FIFO == 1); ASSERT(TX_AC_BE_FIFO == 1);
ASSERT(TX_DATA_FIFO == 1); ASSERT(TX_DATA_FIFO == 1);
wlc_hw->di[1] = dma_attach(osh, name, wlc_hw->sih, wlc_hw->di[1] = dma_attach(name, wlc_hw->sih,
DMAREG(wlc_hw, DMA_TX, 1), NULL, DMAREG(wlc_hw, DMA_TX, 1), NULL,
tune->ntxd, 0, 0, -1, 0, 0, tune->ntxd, 0, 0, -1, 0, 0,
&wl_msg_level); &wl_msg_level);
...@@ -581,7 +579,7 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme) ...@@ -581,7 +579,7 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme)
* RX: UNUSED * RX: UNUSED
*/ */
ASSERT(TX_AC_VI_FIFO == 2); ASSERT(TX_AC_VI_FIFO == 2);
wlc_hw->di[2] = dma_attach(osh, name, wlc_hw->sih, wlc_hw->di[2] = dma_attach(name, wlc_hw->sih,
DMAREG(wlc_hw, DMA_TX, 2), NULL, DMAREG(wlc_hw, DMA_TX, 2), NULL,
tune->ntxd, 0, 0, -1, 0, 0, tune->ntxd, 0, 0, -1, 0, 0,
&wl_msg_level); &wl_msg_level);
...@@ -593,7 +591,7 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme) ...@@ -593,7 +591,7 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme)
*/ */
ASSERT(TX_AC_VO_FIFO == 3); ASSERT(TX_AC_VO_FIFO == 3);
ASSERT(TX_CTL_FIFO == 3); ASSERT(TX_CTL_FIFO == 3);
wlc_hw->di[3] = dma_attach(osh, name, wlc_hw->sih, wlc_hw->di[3] = dma_attach(name, wlc_hw->sih,
DMAREG(wlc_hw, DMA_TX, 3), DMAREG(wlc_hw, DMA_TX, 3),
NULL, tune->ntxd, 0, 0, -1, NULL, tune->ntxd, 0, 0, -1,
0, 0, &wl_msg_level); 0, 0, &wl_msg_level);
......
...@@ -1722,8 +1722,7 @@ struct wlc_pub *wlc_pub(void *wlc) ...@@ -1722,8 +1722,7 @@ struct wlc_pub *wlc_pub(void *wlc)
* The common driver entry routine. Error codes should be unique * The common driver entry routine. Error codes should be unique
*/ */
void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
struct osl_info *osh, void *regsva, uint bustype, void *regsva, uint bustype, void *btparam, uint *perr)
void *btparam, uint *perr)
{ {
struct wlc_info *wlc; struct wlc_info *wlc;
uint err = 0; uint err = 0;
...@@ -1772,7 +1771,6 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, ...@@ -1772,7 +1771,6 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
wlc = (struct wlc_info *) wlc_attach_malloc(unit, &err, device); wlc = (struct wlc_info *) wlc_attach_malloc(unit, &err, device);
if (wlc == NULL) if (wlc == NULL)
goto fail; goto fail;
wlc->osh = osh;
pub = wlc->pub; pub = wlc->pub;
#if defined(BCMDBG) #if defined(BCMDBG)
...@@ -1783,7 +1781,6 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, ...@@ -1783,7 +1781,6 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
wlc->core = wlc->corestate; wlc->core = wlc->corestate;
wlc->wl = wl; wlc->wl = wl;
pub->unit = unit; pub->unit = unit;
pub->osh = osh;
wlc->btparam = btparam; wlc->btparam = btparam;
pub->_piomode = piomode; pub->_piomode = piomode;
wlc->bandinit_pending = false; wlc->bandinit_pending = false;
......
...@@ -488,7 +488,6 @@ struct wlc_txq_info { ...@@ -488,7 +488,6 @@ struct wlc_txq_info {
*/ */
struct wlc_info { struct wlc_info {
struct wlc_pub *pub; /* pointer to wlc public state */ struct wlc_pub *pub; /* pointer to wlc public state */
struct osl_info *osh; /* pointer to os handle */
struct wl_info *wl; /* pointer to os-specific private state */ struct wl_info *wl; /* pointer to os-specific private state */
d11regs_t *regs; /* pointer to device registers */ d11regs_t *regs; /* pointer to device registers */
......
...@@ -241,7 +241,6 @@ struct wlc_pub { ...@@ -241,7 +241,6 @@ struct wlc_pub {
uint mac80211_state; uint mac80211_state;
uint unit; /* device instance number */ uint unit; /* device instance number */
uint corerev; /* core revision */ uint corerev; /* core revision */
struct osl_info *osh; /* pointer to os handle */
si_t *sih; /* SB handle (cookie for siutils calls) */ si_t *sih; /* SB handle (cookie for siutils calls) */
char *vars; /* "environment" name=value */ char *vars; /* "environment" name=value */
bool up; /* interface up and running */ bool up; /* interface up and running */
...@@ -480,8 +479,8 @@ extern const u8 wme_fifo2ac[]; ...@@ -480,8 +479,8 @@ extern const u8 wme_fifo2ac[];
/* common functions for every port */ /* common functions for every port */
extern void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, extern void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit,
bool piomode, struct osl_info *osh, void *regsva, bool piomode, void *regsva, uint bustype, void *btparam,
uint bustype, void *btparam, uint *perr); uint *perr);
extern uint wlc_detach(struct wlc_info *wlc); extern uint wlc_detach(struct wlc_info *wlc);
extern int wlc_up(struct wlc_info *wlc); extern int wlc_up(struct wlc_info *wlc);
extern uint wlc_down(struct wlc_info *wlc); extern uint wlc_down(struct wlc_info *wlc);
......
...@@ -49,8 +49,7 @@ typedef void (*bcmsdh_cb_fn_t) (void *); ...@@ -49,8 +49,7 @@ typedef void (*bcmsdh_cb_fn_t) (void *);
* implementation may maintain a single "default" handle (e.g. the first or * implementation may maintain a single "default" handle (e.g. the first or
* most recent one) to enable single-instance implementations to pass NULL. * most recent one) to enable single-instance implementations to pass NULL.
*/ */
extern bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl, extern bcmsdh_info_t *bcmsdh_attach(void *cfghdl, void **regsva, uint irq);
void **regsva, uint irq);
/* Detach - freeup resources allocated in attach */ /* Detach - freeup resources allocated in attach */
extern int bcmsdh_detach(void *sdh); extern int bcmsdh_detach(void *sdh);
...@@ -183,8 +182,7 @@ extern void *bcmsdh_get_sdioh(bcmsdh_info_t *sdh); ...@@ -183,8 +182,7 @@ extern void *bcmsdh_get_sdioh(bcmsdh_info_t *sdh);
typedef struct { typedef struct {
/* attach to device */ /* attach to device */
void *(*attach) (u16 vend_id, u16 dev_id, u16 bus, u16 slot, void *(*attach) (u16 vend_id, u16 dev_id, u16 bus, u16 slot,
u16 func, uint bustype, void *regsva, u16 func, uint bustype, void *regsva, void *param);
struct osl_info *osh, void *param);
/* detach from device */ /* detach from device */
void (*detach) (void *ch); void (*detach) (void *ch);
} bcmsdh_driver_t; } bcmsdh_driver_t;
......
...@@ -148,8 +148,7 @@ struct hnddma_pub { ...@@ -148,8 +148,7 @@ struct hnddma_pub {
uint txnobuf; /* tx out of dma descriptors */ uint txnobuf; /* tx out of dma descriptors */
}; };
extern struct hnddma_pub *dma_attach(struct osl_info *osh, char *name, extern struct hnddma_pub *dma_attach(char *name, si_t *sih,
si_t *sih,
void *dmaregstx, void *dmaregsrx, uint ntxd, void *dmaregstx, void *dmaregsrx, uint ntxd,
uint nrxd, uint rxbufsize, int rxextheadroom, uint nrxd, uint rxbufsize, int rxextheadroom,
uint nrxpost, uint rxoffset, uint *msg_level); uint nrxpost, uint rxoffset, uint *msg_level);
......
...@@ -328,9 +328,9 @@ extern void si_epa_4313war(si_t *sih); ...@@ -328,9 +328,9 @@ extern void si_epa_4313war(si_t *sih);
char *si_getnvramflvar(si_t *sih, const char *name); char *si_getnvramflvar(si_t *sih, const char *name);
/* AMBA Interconnect exported externs */ /* AMBA Interconnect exported externs */
extern si_t *ai_attach(uint pcidev, struct osl_info *osh, void *regs, extern si_t *ai_attach(uint pcidev, void *regs, uint bustype,
uint bustype, void *sdh, char **vars, uint *varsz); void *sdh, char **vars, uint *varsz);
extern si_t *ai_kattach(struct osl_info *osh); extern si_t *ai_kattach(void);
extern void ai_scan(si_t *sih, void *regs, uint devid); extern void ai_scan(si_t *sih, void *regs, uint devid);
extern uint ai_flag(si_t *sih); extern uint ai_flag(si_t *sih);
......
...@@ -80,7 +80,6 @@ typedef struct dma_info { ...@@ -80,7 +80,6 @@ typedef struct dma_info {
uint *msg_level; /* message level pointer */ uint *msg_level; /* message level pointer */
char name[MAXNAMEL]; /* callers name for diag msgs */ char name[MAXNAMEL]; /* callers name for diag msgs */
struct osl_info *osh; /* os handle */
void *pbus; /* bus handle */ void *pbus; /* bus handle */
bool dma64; /* this dma engine is operating in 64-bit mode */ bool dma64; /* this dma engine is operating in 64-bit mode */
...@@ -276,7 +275,7 @@ const di_fcn_t dma64proc = { ...@@ -276,7 +275,7 @@ const di_fcn_t dma64proc = {
39 39
}; };
struct hnddma_pub *dma_attach(struct osl_info *osh, char *name, si_t *sih, struct hnddma_pub *dma_attach(char *name, si_t *sih,
void *dmaregstx, void *dmaregsrx, uint ntxd, void *dmaregstx, void *dmaregsrx, uint ntxd,
uint nrxd, uint rxbufsize, int rxextheadroom, uint nrxd, uint rxbufsize, int rxextheadroom,
uint nrxpost, uint rxoffset, uint *msg_level) uint nrxpost, uint rxoffset, uint *msg_level)
...@@ -324,9 +323,9 @@ struct hnddma_pub *dma_attach(struct osl_info *osh, char *name, si_t *sih, ...@@ -324,9 +323,9 @@ struct hnddma_pub *dma_attach(struct osl_info *osh, char *name, si_t *sih,
di->hnddma.di_fn->ctrlflags(&di->hnddma, DMA_CTRL_ROC | DMA_CTRL_PEN, di->hnddma.di_fn->ctrlflags(&di->hnddma, DMA_CTRL_ROC | DMA_CTRL_PEN,
0); 0);
DMA_TRACE(("%s: dma_attach: %s osh %p flags 0x%x ntxd %d nrxd %d " DMA_TRACE(("%s: dma_attach: %s flags 0x%x ntxd %d nrxd %d "
"rxbufsize %d rxextheadroom %d nrxpost %d rxoffset %d " "rxbufsize %d rxextheadroom %d nrxpost %d rxoffset %d "
"dmaregstx %p dmaregsrx %p\n", name, "DMA64", osh, "dmaregstx %p dmaregsrx %p\n", name, "DMA64",
di->hnddma.dmactrlflags, ntxd, nrxd, rxbufsize, di->hnddma.dmactrlflags, ntxd, nrxd, rxbufsize,
rxextheadroom, nrxpost, rxoffset, dmaregstx, dmaregsrx)); rxextheadroom, nrxpost, rxoffset, dmaregstx, dmaregsrx));
...@@ -334,7 +333,6 @@ struct hnddma_pub *dma_attach(struct osl_info *osh, char *name, si_t *sih, ...@@ -334,7 +333,6 @@ struct hnddma_pub *dma_attach(struct osl_info *osh, char *name, si_t *sih,
strncpy(di->name, name, MAXNAMEL); strncpy(di->name, name, MAXNAMEL);
di->name[MAXNAMEL - 1] = '\0'; di->name[MAXNAMEL - 1] = '\0';
di->osh = osh;
di->pbus = ((struct si_info *)sih)->pbus; di->pbus = ((struct si_info *)sih)->pbus;
/* save tunables */ /* save tunables */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment