diff options
45 files changed, 356 insertions, 333 deletions
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c index 6738983e2d5..6171ebf56ff 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c @@ -39,7 +39,7 @@ struct bcmsdh_info { bool init_success; /* underlying driver successfully attached */ void *sdioh; /* handler for sdioh */ u32 vendevid; /* Target Vendor and Device ID on SD bus */ - osl_t *osh; + struct osl_info *osh; bool regfail; /* Save status of last reg_read/reg_write call */ u32 sbwad; /* Save backplane window address */ @@ -56,7 +56,8 @@ void bcmsdh_enable_hw_oob_intr(bcmsdh_info_t *sdh, bool enable) } #endif -bcmsdh_info_t *bcmsdh_attach(osl_t *osh, void *cfghdl, void **regsva, uint irq) +bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl, + void **regsva, uint irq) { bcmsdh_info_t *bcmsdh; @@ -85,7 +86,7 @@ bcmsdh_info_t *bcmsdh_attach(osl_t *osh, void *cfghdl, void **regsva, uint irq) return bcmsdh; } -int bcmsdh_detach(osl_t *osh, void *sdh) +int bcmsdh_detach(struct osl_info *osh, void *sdh) { bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh; diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c index b021d97e59f..6e32056451f 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c @@ -56,7 +56,7 @@ struct bcmsdh_hc { #else struct pci_dev *dev; /* pci device handle */ #endif /* BCMPLATFORM_BUS */ - osl_t *osh; + struct osl_info *osh; void *regs; /* SDIO Host Controller address */ bcmsdh_info_t *sdh; /* SDIO Host Controller handle */ void *ch; @@ -142,7 +142,7 @@ static #endif /* BCMLXSDMMC */ int bcmsdh_probe(struct device *dev) { - osl_t *osh = NULL; + struct osl_info *osh = NULL; bcmsdh_hc_t *sdhc = NULL; unsigned long regs = 0; bcmsdh_info_t *sdh = NULL; @@ -246,7 +246,7 @@ static int bcmsdh_remove(struct device *dev) { bcmsdh_hc_t *sdhc, *prev; - osl_t *osh; + struct osl_info *osh; sdhc = sdhcinfo; drvinfo.detach(sdhc->ch); @@ -339,7 +339,7 @@ module_param(sd_pci_slot, uint, 0); static int __devinit bcmsdh_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { - osl_t *osh = NULL; + struct osl_info *osh = NULL; bcmsdh_hc_t *sdhc = NULL; unsigned long regs; bcmsdh_info_t *sdh = NULL; @@ -470,7 +470,7 @@ err: static void __devexit bcmsdh_pci_remove(struct pci_dev *pdev) { bcmsdh_hc_t *sdhc, *prev; - osl_t *osh; + struct osl_info *osh; /* find the SDIO Host Controller state for this pdev and take it out from the list */ diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 039f114130d..babda77d932 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c @@ -112,7 +112,7 @@ static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd) /* * Public entry points & extern's */ -extern sdioh_info_t *sdioh_attach(osl_t *osh, void *bar0, uint irq) +extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *bar0, uint irq) { sdioh_info_t *sd; int err_ret; @@ -175,7 +175,7 @@ extern sdioh_info_t *sdioh_attach(osl_t *osh, void *bar0, uint irq) return sd; } -extern SDIOH_API_RC sdioh_detach(osl_t *osh, sdioh_info_t *sd) +extern SDIOH_API_RC sdioh_detach(struct osl_info *osh, sdioh_info_t *sd) { sd_trace(("%s\n", __func__)); diff --git a/drivers/staging/brcm80211/brcmfmac/dhd.h b/drivers/staging/brcm80211/brcmfmac/dhd.h index 57d06b2da46..7785772ed91 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd.h +++ b/drivers/staging/brcm80211/brcmfmac/dhd.h @@ -77,7 +77,7 @@ enum dhd_prealloc_index { /* Common structure for module and instance linkage */ typedef struct dhd_pub { /* Linkage ponters */ - osl_t *osh; /* OSL handle */ + struct osl_info *osh; /* OSL handle */ struct dhd_bus *bus; /* Bus module handle */ struct dhd_prot *prot; /* Protocol module handle */ struct dhd_info *info; /* Info module handle */ @@ -277,15 +277,16 @@ typedef struct dhd_if_event { */ /* To allow osl_attach/detach calls from os-independent modules */ -osl_t *dhd_osl_attach(void *pdev, uint bustype); -void dhd_osl_detach(osl_t *osh); +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. * Return dhd_pub_t pointer, used as handle to OS module in later calls. * Returned structure should have bus and prot pointers filled in. * bus_hdrlen specifies required headroom for bus module header. */ -extern dhd_pub_t *dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen); +extern dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus, + uint bus_hdrlen); extern int dhd_net_attach(dhd_pub_t *dhdp, int idx); /* Indication from bus module regarding removal/absence of dongle */ diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_bus.h b/drivers/staging/brcm80211/brcmfmac/dhd_bus.h index 3b39c9966f8..6629a229b4a 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_bus.h +++ b/drivers/staging/brcm80211/brcmfmac/dhd_bus.h @@ -26,8 +26,8 @@ extern int dhd_bus_register(void); extern void dhd_bus_unregister(void); /* Download firmware image and nvram image */ -extern bool dhd_bus_download_firmware(struct dhd_bus *bus, osl_t * osh, - char *fw_path, char *nv_path); +extern bool dhd_bus_download_firmware(struct dhd_bus *bus, + struct osl_info *osh, char *fw_path, char *nv_path); /* Stop bus module: clear pending frames, disable data flow */ extern void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex); diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c index 48f0e6c518b..27d4e02d3aa 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c @@ -1863,12 +1863,12 @@ static int dhd_open(struct net_device *net) return ret; } -osl_t *dhd_osl_attach(void *pdev, uint bustype) +struct osl_info *dhd_osl_attach(void *pdev, uint bustype) { return osl_attach(pdev, bustype); } -void dhd_osl_detach(osl_t *osh) +void dhd_osl_detach(struct osl_info *osh) { osl_detach(osh); } @@ -1926,7 +1926,8 @@ void dhd_del_if(dhd_info_t *dhd, int ifidx) up(&dhd->sysioc_sem); } -dhd_pub_t *dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen) +dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus, + uint bus_hdrlen) { dhd_info_t *dhd = NULL; struct net_device *net; diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c index 66884d47e83..bc8739665d6 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c @@ -431,15 +431,16 @@ static int dhdsdio_mem_dump(dhd_bus_t *bus); #endif /* DHD_DEBUG */ static int dhdsdio_download_state(dhd_bus_t *bus, bool enter); -static void dhdsdio_release(dhd_bus_t *bus, osl_t *osh); -static void dhdsdio_release_malloc(dhd_bus_t *bus, osl_t *osh); +static void dhdsdio_release(dhd_bus_t *bus, struct osl_info *osh); +static void dhdsdio_release_malloc(dhd_bus_t *bus, struct osl_info *osh); static void dhdsdio_disconnect(void *ptr); static bool dhdsdio_chipmatch(u16 chipid); -static bool dhdsdio_probe_attach(dhd_bus_t *bus, osl_t *osh, void *sdh, - void *regsva, u16 devid); -static bool dhdsdio_probe_malloc(dhd_bus_t *bus, osl_t *osh, void *sdh); -static bool dhdsdio_probe_init(dhd_bus_t *bus, osl_t *osh, void *sdh); -static void dhdsdio_release_dongle(dhd_bus_t *bus, osl_t * osh); +static bool dhdsdio_probe_attach(dhd_bus_t *bus, struct osl_info *osh, + void *sdh, void *regsva, u16 devid); +static bool dhdsdio_probe_malloc(dhd_bus_t *bus, struct osl_info *osh, + void *sdh); +static bool dhdsdio_probe_init(dhd_bus_t *bus, struct osl_info *osh, void *sdh); +static void dhdsdio_release_dongle(dhd_bus_t *bus, struct osl_info * osh); static uint process_nvram_vars(char *varbuf, uint len); @@ -451,7 +452,7 @@ static int dhd_bcmsdh_send_buf(dhd_bus_t *bus, u32 addr, uint fn, uint flags, u8 *buf, uint nbytes, void *pkt, bcmsdh_cmplt_fn_t complete, void *handle); -static bool dhdsdio_download_firmware(struct dhd_bus *bus, osl_t *osh, +static bool dhdsdio_download_firmware(struct dhd_bus *bus, struct osl_info *osh, void *sdh); static int _dhdsdio_download_firmware(struct dhd_bus *bus); @@ -904,7 +905,7 @@ void dhd_enable_oob_intr(struct dhd_bus *bus, bool enable) static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt) { int ret; - osl_t *osh; + struct osl_info *osh; u8 *frame; u16 len, pad = 0; u32 swheader; @@ -1065,7 +1066,7 @@ done: int dhd_bus_txdata(struct dhd_bus *bus, void *pkt) { int ret = BCME_ERROR; - osl_t *osh; + struct osl_info *osh; uint datalen, prec; DHD_TRACE(("%s: Enter\n", __func__)); @@ -2824,7 +2825,7 @@ exit: void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex) { - osl_t *osh = bus->dhd->osh; + struct osl_info *osh = bus->dhd->osh; u32 local_hostintmask; u8 saveclk; uint retries; @@ -3180,7 +3181,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq) u16 sublen, check; void *pfirst, *plast, *pnext, *save_pfirst; - osl_t *osh = bus->dhd->osh; + struct osl_info *osh = bus->dhd->osh; int errcode; u8 chan, seq, doff, sfdoff; @@ -3581,7 +3582,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq) /* Return true if there may be more frames to read */ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) { - osl_t *osh = bus->dhd->osh; + struct osl_info *osh = bus->dhd->osh; bcmsdh_info_t *sdh = bus->sdh; u16 len, check; /* Extracted hardware header fields */ @@ -4631,7 +4632,7 @@ static void dhdsdio_pktgen(dhd_bus_t *bus) u8 *data; uint pktcount; uint fillbyte; - osl_t *osh = bus->dhd->osh; + struct osl_info *osh = bus->dhd->osh; u16 len; /* Display current count if appropriate */ @@ -4736,7 +4737,7 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start) { void *pkt; u8 *data; - osl_t *osh = bus->dhd->osh; + struct osl_info *osh = bus->dhd->osh; /* Allocate the packet */ pkt = PKTGET(osh, SDPCM_HDRLEN + SDPCM_TEST_HDRLEN + DHD_SDALIGN, @@ -4761,7 +4762,7 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start) static void dhdsdio_testrcv(dhd_bus_t *bus, void *pkt, uint seq) { - osl_t *osh = bus->dhd->osh; + struct osl_info *osh = bus->dhd->osh; u8 *data; uint pktlen; @@ -5062,7 +5063,7 @@ static bool dhdsdio_chipmatch(u16 chipid) static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no, u16 slot, u16 func, uint bustype, void *regsva, - osl_t *osh, void *sdh) + struct osl_info *osh, void *sdh) { int ret; dhd_bus_t *bus; @@ -5221,8 +5222,8 @@ fail: } static bool -dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva, - u16 devid) +dhdsdio_probe_attach(struct dhd_bus *bus, struct osl_info *osh, void *sdh, + void *regsva, u16 devid) { u8 clkctl = 0; int err = 0; @@ -5379,7 +5380,8 @@ fail: return false; } -static bool dhdsdio_probe_malloc(dhd_bus_t *bus, osl_t *osh, void *sdh) +static bool dhdsdio_probe_malloc(dhd_bus_t *bus, struct osl_info *osh, + void *sdh) { DHD_TRACE(("%s: Enter\n", __func__)); @@ -5420,7 +5422,7 @@ fail: return false; } -static bool dhdsdio_probe_init(dhd_bus_t *bus, osl_t *osh, void *sdh) +static bool dhdsdio_probe_init(dhd_bus_t *bus, struct osl_info *osh, void *sdh) { s32 fnum; @@ -5497,7 +5499,7 @@ static bool dhdsdio_probe_init(dhd_bus_t *bus, osl_t *osh, void *sdh) } bool -dhd_bus_download_firmware(struct dhd_bus *bus, osl_t *osh, +dhd_bus_download_firmware(struct dhd_bus *bus, struct osl_info *osh, char *fw_path, char *nv_path) { bool ret; @@ -5510,7 +5512,7 @@ dhd_bus_download_firmware(struct dhd_bus *bus, osl_t *osh, } static bool -dhdsdio_download_firmware(struct dhd_bus *bus, osl_t *osh, void *sdh) +dhdsdio_download_firmware(struct dhd_bus *bus, struct osl_info *osh, void *sdh) { bool ret; @@ -5525,7 +5527,7 @@ dhdsdio_download_firmware(struct dhd_bus *bus, osl_t *osh, void *sdh) } /* Detach and free everything */ -static void dhdsdio_release(dhd_bus_t *bus, osl_t *osh) +static void dhdsdio_release(dhd_bus_t *bus, struct osl_info *osh) { DHD_TRACE(("%s: Enter\n", __func__)); @@ -5555,7 +5557,7 @@ static void dhdsdio_release(dhd_bus_t *bus, osl_t *osh) DHD_TRACE(("%s: Disconnected\n", __func__)); } -static void dhdsdio_release_malloc(dhd_bus_t *bus, osl_t *osh) +static void dhdsdio_release_malloc(dhd_bus_t *bus, struct osl_info *osh) { DHD_TRACE(("%s: Enter\n", __func__)); @@ -5574,7 +5576,7 @@ static void dhdsdio_release_malloc(dhd_bus_t *bus, osl_t *osh) } } -static void dhdsdio_release_dongle(dhd_bus_t *bus, osl_t *osh) +static void dhdsdio_release_dongle(dhd_bus_t *bus, struct osl_info *osh) { DHD_TRACE(("%s: Enter\n", __func__)); diff --git a/drivers/staging/brcm80211/include/bcm_rpc.h b/drivers/staging/brcm80211/include/bcm_rpc.h index 77e5d8f7196..7a379ba15ce 100644 --- a/drivers/staging/brcm80211/include/bcm_rpc.h +++ b/drivers/staging/brcm80211/include/bcm_rpc.h @@ -26,7 +26,7 @@ typedef void (*rpc_dispatch_cb_t) (void *ctx, struct rpc_buf *buf); typedef void (*rpc_resync_cb_t) (void *ctx); typedef void (*rpc_down_cb_t) (void *ctx); typedef void (*rpc_txdone_cb_t) (void *ctx, struct rpc_buf *buf); -extern struct rpc_info *bcm_rpc_attach(void *pdev, osl_t *osh, +extern struct rpc_info *bcm_rpc_attach(void *pdev, struct osl_info *osh, struct rpc_transport_info *rpc_th); extern void bcm_rpc_detach(struct rpc_info *rpc); diff --git a/drivers/staging/brcm80211/include/bcm_rpc_tp.h b/drivers/staging/brcm80211/include/bcm_rpc_tp.h index bb8dc6dd6f4..0136118284f 100644 --- a/drivers/staging/brcm80211/include/bcm_rpc_tp.h +++ b/drivers/staging/brcm80211/include/bcm_rpc_tp.h @@ -57,7 +57,7 @@ typedef void (*rpc_rx_fn_t) (void *, rpc_buf_t *); typedef void (*rpc_txflowctl_cb_t) (void *ctx, bool on); #endif -extern rpc_tp_info_t *bcm_rpc_tp_attach(osl_t *osh, void *bus); +extern rpc_tp_info_t *bcm_rpc_tp_attach(struct osl_info *osh, void *bus); extern void bcm_rpc_tp_detach(rpc_tp_info_t *rpcb); extern void bcm_rpc_tp_down(rpc_tp_info_t *rpcb); extern void bcm_rpc_tp_watchdog(rpc_tp_info_t *rpcb); diff --git a/drivers/staging/brcm80211/include/bcmsdbus.h b/drivers/staging/brcm80211/include/bcmsdbus.h index ca99495eaa8..4f040e41ae5 100644 --- a/drivers/staging/brcm80211/include/bcmsdbus.h +++ b/drivers/staging/brcm80211/include/bcmsdbus.h @@ -46,8 +46,8 @@ typedef void (*sdioh_cb_fn_t) (void *); * The handler shall be provided by all subsequent calls. No local cache * cfghdl points to the starting address of pci device mapped memory */ -extern sdioh_info_t *sdioh_attach(osl_t *osh, void *cfghdl, uint irq); -extern SDIOH_API_RC sdioh_detach(osl_t *osh, sdioh_info_t *si); +extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *cfghdl, uint irq); +extern SDIOH_API_RC sdioh_detach(struct osl_info *osh, sdioh_info_t *si); extern SDIOH_API_RC sdioh_interrupt_register(sdioh_info_t *si, sdioh_cb_fn_t fn, void *argh); extern SDIOH_API_RC sdioh_interrupt_deregister(sdioh_info_t *si); diff --git a/drivers/staging/brcm80211/include/bcmsdh.h b/drivers/staging/brcm80211/include/bcmsdh.h index 6b80983d43c..69aa061bb52 100644 --- a/drivers/staging/brcm80211/include/bcmsdh.h +++ b/drivers/staging/brcm80211/include/bcmsdh.h @@ -40,11 +40,11 @@ typedef void (*bcmsdh_cb_fn_t) (void *); * implementation may maintain a single "default" handle (e.g. the first or * most recent one) to enable single-instance implementations to pass NULL. */ -extern bcmsdh_info_t *bcmsdh_attach(osl_t *osh, void *cfghdl, void **regsva, - uint irq); +extern bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl, + void **regsva, uint irq); /* Detach - freeup resources allocated in attach */ -extern int bcmsdh_detach(osl_t *osh, void *sdh); +extern int bcmsdh_detach(struct osl_info *osh, void *sdh); /* Query if SD device interrupts are enabled */ extern bool bcmsdh_intr_query(void *sdh); @@ -174,8 +174,8 @@ extern void *bcmsdh_get_sdioh(bcmsdh_info_t *sdh); typedef struct { /* attach to device */ void *(*attach) (u16 vend_id, u16 dev_id, u16 bus, u16 slot, - u16 func, uint bustype, void *regsva, osl_t *osh, - void *param); + u16 func, uint bustype, void *regsva, + struct osl_info *osh, void *param); /* detach from device */ void (*detach) (void *ch); } bcmsdh_driver_t; diff --git a/drivers/staging/brcm80211/include/bcmsdh_sdmmc.h b/drivers/staging/brcm80211/include/bcmsdh_sdmmc.h index 7d5aa71a7dc..4d671ddb3af 100644 --- a/drivers/staging/brcm80211/include/bcmsdh_sdmmc.h +++ b/drivers/staging/brcm80211/include/bcmsdh_sdmmc.h @@ -51,7 +51,7 @@ extern void sdioh_sdmmc_osfree(sdioh_info_t *sd); #define CLIENT_INTR 0x100 /* Get rid of this! */ struct sdioh_info { - osl_t *osh; /* osh handler */ + struct osl_info *osh; /* osh handler */ bool client_intr_enabled; /* interrupt connnected flag */ bool intr_handler_valid; /* client driver interrupt handler valid */ sdioh_cb_fn_t intr_handler; /* registered interrupt handler */ @@ -94,8 +94,8 @@ extern void sdioh_sdmmc_devintr_off(sdioh_info_t *sd); */ /* Register mapping routines */ -extern u32 *sdioh_sdmmc_reg_map(osl_t *osh, s32 addr, int size); -extern void sdioh_sdmmc_reg_unmap(osl_t *osh, s32 addr, int size); +extern u32 *sdioh_sdmmc_reg_map(struct osl_info *osh, s32 addr, int size); +extern void sdioh_sdmmc_reg_unmap(struct osl_info *osh, s32 addr, int size); /* Interrupt (de)registration routines */ extern int sdioh_sdmmc_register_irq(sdioh_info_t *sd, uint irq); diff --git a/drivers/staging/brcm80211/include/bcmsrom.h b/drivers/staging/brcm80211/include/bcmsrom.h index 9d53657fdaa..cdcef746284 100644 --- a/drivers/staging/brcm80211/include/bcmsrom.h +++ b/drivers/staging/brcm80211/include/bcmsrom.h @@ -20,15 +20,15 @@ #include <bcmsrom_fmt.h> /* Prototypes */ -extern int srom_var_init(si_t *sih, uint bus, void *curmap, osl_t *osh, - char **vars, uint *count); +extern int srom_var_init(si_t *sih, uint bus, void *curmap, + struct osl_info *osh, char **vars, uint *count); -extern int srom_read(si_t *sih, uint bus, void *curmap, osl_t *osh, +extern int srom_read(si_t *sih, uint bus, void *curmap, struct osl_info *osh, uint byteoff, uint nbytes, u16 *buf, bool check_crc); /* parse standard PCMCIA cis, normally used by SB/PCMCIA/SDIO/SPI/OTP * and extract from it into name=value pairs */ -extern int srom_parsecis(osl_t *osh, u8 **pcis, uint ciscnt, +extern int srom_parsecis(struct osl_info *osh, u8 **pcis, uint ciscnt, char **vars, uint *count); #endif /* _bcmsrom_h_ */ diff --git a/drivers/staging/brcm80211/include/bcmutils.h b/drivers/staging/brcm80211/include/bcmutils.h index 7f1d33481ee..4c1c111bac9 100644 --- a/drivers/staging/brcm80211/include/bcmutils.h +++ b/drivers/staging/brcm80211/include/bcmutils.h @@ -110,10 +110,10 @@ extern void *pktq_pdeq_tail(struct pktq *pq, int prec); /* Empty the queue at particular precedence level */ #ifdef BRCM_FULLMAC - extern void pktq_pflush(osl_t *osh, struct pktq *pq, int prec, + extern void pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir); #else - extern void pktq_pflush(osl_t *osh, struct pktq *pq, int prec, + extern void pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir, ifpkt_cb_t fn, int arg); #endif /* BRCM_FULLMAC */ @@ -141,18 +141,18 @@ /* prec_out may be NULL if caller is not interested in return value */ extern void *pktq_peek_tail(struct pktq *pq, int *prec_out); #ifdef BRCM_FULLMAC - extern void pktq_flush(osl_t *osh, struct pktq *pq, bool dir); + extern void pktq_flush(struct osl_info *osh, struct pktq *pq, bool dir); #else - extern void pktq_flush(osl_t *osh, struct pktq *pq, bool dir, + extern void pktq_flush(struct osl_info *osh, struct pktq *pq, bool dir, ifpkt_cb_t fn, int arg); #endif /* externs */ /* packet */ - extern uint pktfrombuf(osl_t *osh, void *p, uint offset, int len, - unsigned char *buf); - extern uint pktsegcnt(osl_t *osh, void *p); - extern uint pkttotlen(osl_t *osh, void *p); + extern uint pktfrombuf(struct osl_info *osh, void *p, uint offset, + int len, unsigned char *buf); + extern uint pktsegcnt(struct osl_info *osh, void *p); + extern uint pkttotlen(struct osl_info *osh, void *p); /* ethernet address */ extern int bcm_ether_atoe(char *p, struct ether_addr *ea); @@ -165,7 +165,7 @@ extern char *getvar(char *vars, const char *name); extern int getintvar(char *vars, const char *name); #ifdef BCMDBG - extern void prpkt(const char *msg, osl_t *osh, void *p0); + extern void prpkt(const char *msg, struct osl_info *osh, void *p0); #endif /* BCMDBG */ #define bcm_perf_enable() #define bcmstats(fmt) diff --git a/drivers/staging/brcm80211/include/hnddma.h b/drivers/staging/brcm80211/include/hnddma.h index bee4c89be23..854a3996baa 100644 --- a/drivers/staging/brcm80211/include/hnddma.h +++ b/drivers/staging/brcm80211/include/hnddma.h @@ -141,7 +141,7 @@ struct hnddma_pub { uint txnobuf; /* tx out of dma descriptors */ }; -extern hnddma_t *dma_attach(osl_t *osh, char *name, si_t *sih, +extern hnddma_t *dma_attach(struct osl_info *osh, char *name, si_t *sih, void *dmaregstx, void *dmaregsrx, uint ntxd, uint nrxd, uint rxbufsize, int rxextheadroom, uint nrxpost, uint rxoffset, uint *msg_level); @@ -238,6 +238,6 @@ extern const di_fcn_t dma64proc; extern uint dma_addrwidth(si_t *sih, void *dmaregs); /* pio helpers */ -extern void dma_txpioloopback(osl_t *osh, dma32regs_t *); +extern void dma_txpioloopback(struct osl_info *osh, dma32regs_t *); #endif /* _hnddma_h_ */ diff --git a/drivers/staging/brcm80211/include/hndpmu.h b/drivers/staging/brcm80211/include/hndpmu.h index bbcf0eecd21..a0110e4c9ac 100644 --- a/drivers/staging/brcm80211/include/hndpmu.h +++ b/drivers/staging/brcm80211/include/hndpmu.h @@ -28,44 +28,44 @@ #define SET_LDO_VOLTAGE_LNLDO1 9 #define SET_LDO_VOLTAGE_LNLDO2_SEL 10 -extern void si_pmu_init(si_t *sih, osl_t *osh); -extern void si_pmu_chip_init(si_t *sih, osl_t *osh); -extern void si_pmu_pll_init(si_t *sih, osl_t *osh, u32 xtalfreq); -extern void si_pmu_res_init(si_t *sih, osl_t *osh); -extern void si_pmu_swreg_init(si_t *sih, osl_t *osh); +extern void si_pmu_init(si_t *sih, struct osl_info *osh); +extern void si_pmu_chip_init(si_t *sih, struct osl_info *osh); +extern void si_pmu_pll_init(si_t *sih, struct osl_info *osh, u32 xtalfreq); +extern void si_pmu_res_init(si_t *sih, struct osl_info *osh); +extern void si_pmu_swreg_init(si_t *sih, struct osl_info *osh); -extern u32 si_pmu_force_ilp(si_t *sih, osl_t *osh, bool force); +extern u32 si_pmu_force_ilp(si_t *sih, struct osl_info *osh, bool force); -extern u32 si_pmu_si_clock(si_t *sih, osl_t *osh); -extern u32 si_pmu_cpu_clock(si_t *sih, osl_t *osh); -extern u32 si_pmu_mem_clock(si_t *sih, osl_t *osh); -extern u32 si_pmu_alp_clock(si_t *sih, osl_t *osh); -extern u32 si_pmu_ilp_clock(si_t *sih, osl_t *osh); +extern u32 si_pmu_si_clock(si_t *sih, struct osl_info *osh); +extern u32 si_pmu_cpu_clock(si_t *sih, struct osl_info *osh); +extern u32 si_pmu_mem_clock(si_t *sih, struct osl_info *osh); +extern u32 si_pmu_alp_clock(si_t *sih, struct osl_info *osh); +extern u32 si_pmu_ilp_clock(si_t *sih, struct osl_info *osh); -extern void si_pmu_set_switcher_voltage(si_t *sih, osl_t *osh, +extern void si_pmu_set_switcher_voltage(si_t *sih, struct osl_info *osh, u8 bb_voltage, u8 rf_voltage); -extern void si_pmu_set_ldo_voltage(si_t *sih, osl_t *osh, u8 ldo, +extern void si_pmu_set_ldo_voltage(si_t *sih, struct osl_info *osh, u8 ldo, u8 voltage); -extern u16 si_pmu_fast_pwrup_delay(si_t *sih, osl_t *osh); -extern void si_pmu_rcal(si_t *sih, osl_t *osh); +extern u16 si_pmu_fast_pwrup_delay(si_t *sih, struct osl_info *osh); +extern void si_pmu_rcal(si_t *sih, struct osl_info *osh); extern void si_pmu_pllupd(si_t *sih); -extern void si_pmu_spuravoid(si_t *sih, osl_t *osh, u8 spuravoid); +extern void si_pmu_spuravoid(si_t *sih, struct osl_info *osh, u8 spuravoid); -extern bool si_pmu_is_otp_powered(si_t *sih, osl_t *osh); -extern u32 si_pmu_measure_alpclk(si_t *sih, osl_t *osh); +extern bool si_pmu_is_otp_powered(si_t *sih, struct osl_info *osh); +extern u32 si_pmu_measure_alpclk(si_t *sih, struct osl_info *osh); extern u32 si_pmu_chipcontrol(si_t *sih, uint reg, u32 mask, u32 val); extern u32 si_pmu_regcontrol(si_t *sih, uint reg, u32 mask, u32 val); extern u32 si_pmu_pllcontrol(si_t *sih, uint reg, u32 mask, u32 val); extern void si_pmu_pllupd(si_t *sih); -extern void si_pmu_sprom_enable(si_t *sih, osl_t *osh, bool enable); +extern void si_pmu_sprom_enable(si_t *sih, struct osl_info *osh, bool enable); extern void si_pmu_radio_enable(si_t *sih, bool enable); -extern u32 si_pmu_waitforclk_on_backplane(si_t *sih, osl_t *osh, +extern u32 si_pmu_waitforclk_on_backplane(si_t *sih, struct osl_info *osh, u32 clk, u32 delay); -extern void si_pmu_otp_power(si_t *sih, osl_t *osh, bool on); -extern void si_sdiod_drive_strength_init(si_t *sih, osl_t *osh, +extern void si_pmu_otp_power(si_t *sih, struct osl_info *osh, bool on); +extern void si_sdiod_drive_strength_init(si_t *sih, struct osl_info *osh, u32 drivestrength); #endif /* _hndpmu_h_ */ diff --git a/drivers/staging/brcm80211/include/linux_osl.h b/drivers/staging/brcm80211/include/linux_osl.h index 124b579f87c..70621692150 100644 --- a/drivers/staging/brcm80211/include/linux_osl.h +++ b/drivers/staging/brcm80211/include/linux_osl.h @@ -18,8 +18,8 @@ #define _linux_osl_h_ -extern osl_t *osl_attach(void *pdev, uint bustype); -extern void osl_detach(osl_t *osh); +extern struct osl_info *osl_attach(void *pdev, uint bustype); +extern void osl_detach(struct osl_info *osh); extern u32 g_assert_type; @@ -45,14 +45,15 @@ extern void osl_assert(char *exp, char *file, int line); osl_pci_read_config((osh), (offset), (size)) #define OSL_PCI_WRITE_CONFIG(osh, offset, size, val) \ osl_pci_write_config((osh), (offset), (size), (val)) -extern u32 osl_pci_read_config(osl_t *osh, uint offset, uint size); -extern void osl_pci_write_config(osl_t *osh, uint offset, uint size, uint val); +extern u32 osl_pci_read_config(struct osl_info *osh, uint offset, uint size); +extern void osl_pci_write_config(struct osl_info *osh, uint offset, uint size, + uint val); /* PCI device bus # and slot # */ #define OSL_PCI_BUS(osh) osl_pci_bus(osh) #define OSL_PCI_SLOT(osh) osl_pci_slot(osh) -extern uint osl_pci_bus(osl_t *osh); -extern uint osl_pci_slot(osl_t *osh); +extern uint osl_pci_bus(struct osl_info *osh); +extern uint osl_pci_slot(struct osl_info *osh); #define PKTFREESETCB(osh, _tx_fn, _tx_ctx) \ do { \ @@ -71,8 +72,8 @@ extern uint osl_pci_slot(osl_t *osh); #define BUS_SWAP32(v) (v) -extern void *osl_dma_alloc_consistent(osl_t *osh, uint size, u16 align, - uint *tot, unsigned long *pap); +extern void *osl_dma_alloc_consistent(struct osl_info *osh, uint size, + u16 align, uint *tot, unsigned long *pap); #ifdef BRCM_FULLMAC #define DMA_ALLOC_CONSISTENT(osh, size, pap, dmah, alignbits) \ @@ -84,7 +85,8 @@ extern void *osl_dma_alloc_consistent(osl_t *osh, uint size, u16 align, #define DMA_FREE_CONSISTENT(osh, va, size, pa, dmah) \ osl_dma_free_consistent((osh), (void *)(va), (size), (pa)) -extern void osl_dma_free_consistent(osl_t *osh, void *va, uint size, unsigned long pa); +extern void osl_dma_free_consistent(struct osl_info *osh, void *va, + uint size, unsigned long pa); /* map/unmap direction */ #define DMA_TX 1 /* TX direction for DMA */ @@ -95,8 +97,10 @@ extern void osl_dma_free_consistent(osl_t *osh, void *va, uint size, unsigned lo osl_dma_map((osh), (va), (size), (direction)) #define DMA_UNMAP(osh, pa, size, direction, p, dmah) \ osl_dma_unmap((osh), (pa), (size), (direction)) -extern uint osl_dma_map(osl_t *osh, void *va, uint size, int direction); -extern void osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction); +extern uint osl_dma_map(struct osl_info *osh, void *va, uint size, + int direction); +extern void osl_dma_unmap(struct osl_info *osh, uint pa, uint size, + int direction); /* API for DMA addressing capability */ #define OSL_DMADDRWIDTH(osh, addrwidth) do {} while (0) @@ -275,8 +279,8 @@ extern void osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction); #define PKTALLOCED(osh) (((struct osl_pubinfo *)(osh))->pktalloced) #define PKTSETPOOL(osh, skb, x, y) do {} while (0) #define PKTPOOL(osh, skb) false -extern void *osl_pktget(osl_t *osh, uint len); -extern void osl_pktfree(osl_t *osh, void *skb, bool send); +extern void *osl_pktget(struct osl_info *osh, uint len); +extern void osl_pktfree(struct osl_info *osh, void *skb, bool send); #ifdef BRCM_FULLMAC static inline void * @@ -342,12 +346,12 @@ osl_pkt_tonative(struct osl_pubinfo *osh, void *pkt) } \ } while (0) -extern u8 osl_readb(osl_t *osh, volatile u8 *r); -extern u16 osl_readw(osl_t *osh, volatile u16 *r); -extern u32 osl_readl(osl_t *osh, volatile u32 *r); -extern void osl_writeb(osl_t *osh, volatile u8 *r, u8 v); -extern void osl_writew(osl_t *osh, volatile u16 *r, u16 v); -extern void osl_writel(osl_t *osh, volatile u32 *r, u32 v); +extern u8 osl_readb(struct osl_info *osh, volatile u8 *r); +extern u16 osl_readw(struct osl_info *osh, volatile u16 *r); +extern u32 osl_readl(struct osl_info *osh, volatile u32 *r); +extern void osl_writeb(struct osl_info *osh, volatile u8 *r, u8 v); +extern void osl_writew(struct osl_info *osh, volatile u16 *r, u16 v); +extern void osl_writel(struct osl_info *osh, volatile u32 *r, u32 v); #endif /* BCMSDIO */ #endif /* _linux_osl_h_ */ diff --git a/drivers/staging/brcm80211/include/nicpci.h b/drivers/staging/brcm80211/include/nicpci.h index ce146e88ffd..7ea7daf7c2b 100644 --- a/drivers/staging/brcm80211/include/nicpci.h +++ b/drivers/staging/brcm80211/include/nicpci.h @@ -45,17 +45,17 @@ #else struct sbpcieregs; -extern u8 pcicore_find_pci_capability(osl_t *osh, u8 req_cap_id, +extern u8 pcicore_find_pci_capability(struct osl_info *osh, u8 req_cap_id, unsigned char *buf, u32 *buflen); -extern uint pcie_readreg(osl_t *osh, struct sbpcieregs *pcieregs, +extern uint pcie_readreg(struct osl_info *osh, struct sbpcieregs *pcieregs, uint addrtype, uint offset); -extern uint pcie_writereg(osl_t *osh, struct sbpcieregs *pcieregs, +extern uint pcie_writereg(struct osl_info *osh, struct sbpcieregs *pcieregs, uint addrtype, uint offset, uint val); extern u8 pcie_clkreq(void *pch, u32 mask, u32 val); extern u32 pcie_lcreg(void *pch, u32 mask, u32 val); -extern void *pcicore_init(si_t *sih, osl_t *osh, void *regs); +extern void *pcicore_init(si_t *sih, struct osl_info *osh, void *regs); extern void pcicore_deinit(void *pch); extern void pcicore_attach(void *pch, char *pvars, int state); extern void pcicore_hwup(void *pch); @@ -70,7 +70,7 @@ extern u32 pcicore_pcieserdesreg(void *pch, u32 mdioslave, u32 offset, extern u32 pcicore_pciereg(void *pch, u32 offset, u32 mask, u32 val, uint type); -extern bool pcicore_pmecap_fast(osl_t *osh); +extern bool pcicore_pmecap_fast(struct osl_info *osh); extern void pcicore_pmeen(void *pch); extern void pcicore_pmeclr(void *pch); extern bool pcicore_pmestat(void *pch); diff --git a/drivers/staging/brcm80211/include/osl.h b/drivers/staging/brcm80211/include/osl.h index 5a9bc59e921..e2205c481a3 100644 --- a/drivers/staging/brcm80211/include/osl.h +++ b/drivers/staging/brcm80211/include/osl.h @@ -41,7 +41,6 @@ struct osl_info { uint bustype; }; -typedef struct osl_info osl_t; typedef struct osl_dmainfo osldma_t; diff --git a/drivers/staging/brcm80211/include/rpc_osl.h b/drivers/staging/brcm80211/include/rpc_osl.h index 4a2648001bf..c59d9ed1397 100644 --- a/drivers/staging/brcm80211/include/rpc_osl.h +++ b/drivers/staging/brcm80211/include/rpc_osl.h @@ -18,7 +18,7 @@ #define _rpcosl_h_ typedef struct rpc_osl rpc_osl_t; -extern rpc_osl_t *rpc_osl_attach(osl_t *osh); +extern rpc_osl_t *rpc_osl_attach(struct osl_info *osh); extern void rpc_osl_detach(rpc_osl_t *rpc_osh); #define RPC_OSL_LOCK(rpc_osh) rpc_osl_lock((rpc_osh)) diff --git a/drivers/staging/brcm80211/include/siutils.h b/drivers/staging/brcm80211/include/siutils.h index 57c36507a04..6f83e7e5b31 100644 --- a/drivers/staging/brcm80211/include/siutils.h +++ b/drivers/staging/brcm80211/include/siutils.h @@ -128,8 +128,8 @@ typedef void (*gpio_handler_t) (u32 stat, void *arg); #define GPIO_CTRL_EPA_EN_MASK 0x40 /* === exported functions === */ -extern si_t *si_attach(uint pcidev, osl_t *osh, void *regs, uint bustype, - void *sdh, char **vars, uint *varsz); +extern si_t *si_attach(uint pcidev, struct osl_info *osh, void *regs, + uint bustype, void *sdh, char **vars, uint *varsz); extern void si_detach(si_t *sih); extern bool si_pci_war16165(si_t *sih); @@ -344,9 +344,9 @@ extern void si_epa_4313war(si_t *sih); char *si_getnvramflvar(si_t *sih, const char *name); /* AMBA Interconnect exported externs */ -extern si_t *ai_attach(uint pcidev, osl_t *osh, void *regs, uint bustype, - void *sdh, char **vars, uint *varsz); -extern si_t *ai_kattach(osl_t *osh); +extern si_t *ai_attach(uint pcidev, struct osl_info *osh, void *regs, + uint bustype, void *sdh, char **vars, uint *varsz); +extern si_t *ai_kattach(struct osl_info *osh); extern void ai_scan(si_t *sih, void *regs, uint devid); extern uint ai_flag(si_t *sih); diff --git a/drivers/staging/brcm80211/phy/wlc_phy_cmn.c b/drivers/staging/brcm80211/phy/wlc_phy_cmn.c index 9e6bbcdf8b6..e20c1f09f8b 100644 --- a/drivers/staging/brcm80211/phy/wlc_phy_cmn.c +++ b/drivers/staging/brcm80211/phy/wlc_phy_cmn.c @@ -276,7 +276,7 @@ u16 read_radio_reg(phy_info_t *pi, u16 addr) void write_radio_reg(phy_info_t *pi, u16 addr, u16 val) { - osl_t *osh; + struct osl_info *osh; if (NORADIO_ENAB(pi->pubpi)) return; @@ -409,7 +409,7 @@ static bool wlc_phy_war41476(phy_info_t *pi) u16 read_phy_reg(phy_info_t *pi, u16 addr) { - osl_t *osh; + struct osl_info *osh; d11regs_t *regs; osh = pi->sh->osh; @@ -430,7 +430,7 @@ u16 read_phy_reg(phy_info_t *pi, u16 addr) void write_phy_reg(phy_info_t *pi, u16 addr, u16 val) { - osl_t *osh; + struct osl_info *osh; d11regs_t *regs; osh = pi->sh->osh; @@ -456,7 +456,7 @@ void write_phy_reg(phy_info_t *pi, u16 addr, u16 val) void and_phy_reg(phy_info_t *pi, u16 addr, u16 val) { - osl_t *osh; + struct osl_info *osh; d11regs_t *regs; osh = pi->sh->osh; @@ -477,7 +477,7 @@ void and_phy_reg(phy_info_t *pi, u16 addr, u16 val) void or_phy_reg(phy_info_t *pi, u16 addr, u16 val) { - osl_t *osh; + struct osl_info *osh; d11regs_t *regs; osh = pi->sh->osh; @@ -498,7 +498,7 @@ void or_phy_reg(phy_info_t *pi, u16 addr, u16 val) void mod_phy_reg(phy_info_t *pi, u16 addr, u16 mask, u16 val) { - osl_t *osh; + struct osl_info *osh; d11regs_t *regs; osh = pi->sh->osh; @@ -595,7 +595,7 @@ shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp) void wlc_phy_shared_detach(shared_phy_t *phy_sh) { - osl_t *osh; + struct osl_info *osh; if (phy_sh) { osh = phy_sh->osh; @@ -613,7 +613,7 @@ wlc_phy_t *wlc_phy_attach(shared_phy_t *sh, void *regs, int bandtype, char *vars u32 sflags = 0; uint phyversion; int i; - osl_t *osh; + struct osl_info *osh; osh = sh->osh; diff --git a/drivers/staging/brcm80211/phy/wlc_phy_int.h b/drivers/staging/brcm80211/phy/wlc_phy_int.h index 9513b87fa16..fb92c3bccb1 100644 --- a/drivers/staging/brcm80211/phy/wlc_phy_int.h +++ b/drivers/staging/brcm80211/phy/wlc_phy_int.h @@ -527,7 +527,7 @@ typedef struct { struct shared_phy { struct phy_info *phy_head; uint unit; - osl_t *osh; + struct osl_info *osh; si_t *sih; void *physhim; uint corerev; diff --git a/drivers/staging/brcm80211/sys/wl_export.h b/drivers/staging/brcm80211/sys/wl_export.h index 08442f8e84e..aa8b5a3ed63 100644 --- a/drivers/staging/brcm80211/sys/wl_export.h +++ b/drivers/staging/brcm80211/sys/wl_export.h @@ -45,10 +45,10 @@ extern void wl_add_timer(struct wl_info *wl, struct wl_timer *timer, uint ms, int periodic); extern bool wl_del_timer(struct wl_info *wl, struct wl_timer *timer); -extern uint wl_buf_to_pktcopy(osl_t *osh, void *p, unsigned char *buf, int len, - uint offset); -extern void *wl_get_pktbuffer(osl_t *osh, int len); -extern int wl_set_pktlen(osl_t *osh, void *p, int len); +extern uint wl_buf_to_pktcopy(struct osl_info *osh, void *p, unsigned char *buf, + int len, uint offset); +extern void *wl_get_pktbuffer(struct osl_info *osh, int len); +extern int wl_set_pktlen(struct osl_info *osh, void *p, int len); #define wl_sort_bsslist(a, b) false diff --git a/drivers/staging/brcm80211/sys/wl_mac80211.c b/drivers/staging/brcm80211/sys/wl_mac80211.c index 4b59e073aa1..af6d7dea469 100644 --- a/drivers/staging/brcm80211/sys/wl_mac80211.c +++ b/drivers/staging/brcm80211/sys/wl_mac80211.c @@ -743,7 +743,7 @@ static wl_info_t *wl_attach(u16 vendor, u16 device, unsigned long regs, uint bustype, void *btparam, uint irq) { wl_info_t *wl; - osl_t *osh; + struct osl_info *osh; int unit, err; unsigned long base_addr; @@ -1512,7 +1512,7 @@ module_exit(wl_module_exit); void wl_free(wl_info_t *wl) { wl_timer_t *t, *next; - osl_t *osh; + struct osl_info *osh; ASSERT(wl); #ifndef WLC_HIGH_ONLY diff --git a/drivers/staging/brcm80211/sys/wl_mac80211.h b/drivers/staging/brcm80211/sys/wl_mac80211.h index 78cee4454b0..54bbb15d958 100644 --- a/drivers/staging/brcm80211/sys/wl_mac80211.h +++ b/drivers/staging/brcm80211/sys/wl_mac80211.h @@ -62,7 +62,7 @@ struct wl_firmware { struct wl_info { wlc_pub_t *pub; /* pointer to public wlc state */ void *wlc; /* pointer to private common os-independent data */ - osl_t *osh; /* pointer to os handler */ + struct osl_info *osh; /* pointer to os handler */ u32 magic; int irq; diff --git a/drivers/staging/brcm80211/sys/wlc_alloc.c b/drivers/staging/brcm80211/sys/wlc_alloc.c index 8001dca4491..1fb9976ef8b 100644 --- a/drivers/staging/brcm80211/sys/wlc_alloc.c +++ b/drivers/staging/brcm80211/sys/wlc_alloc.c @@ -32,12 +32,12 @@ #include <wlc_alloc.h> #include <wl_dbg.h> -static wlc_pub_t *wlc_pub_malloc(osl_t *osh, uint unit, uint *err, +static wlc_pub_t *wlc_pub_malloc(struct osl_info *osh, uint unit, uint *err, uint devid); -static void wlc_pub_mfree(osl_t *osh, wlc_pub_t *pub); +static void wlc_pub_mfree(struct osl_info *osh, wlc_pub_t *pub); static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid); -void *wlc_calloc(osl_t *osh, uint unit, uint size) +void *wlc_calloc(struct osl_info *osh, uint unit, uint size) { void *item; @@ -70,7 +70,8 @@ void wlc_tunables_init(wlc_tunables_t *tunables, uint devid) #endif /* WLC_HIGH_ONLY */ } -static wlc_pub_t *wlc_pub_malloc(osl_t *osh, uint unit, uint *err, uint devid) +static wlc_pub_t *wlc_pub_malloc(struct osl_info *osh, uint unit, uint *err, + uint devid) { wlc_pub_t *pub; @@ -104,7 +105,7 @@ static wlc_pub_t *wlc_pub_malloc(osl_t *osh, uint unit, uint *err, uint devid) return NULL; } -static void wlc_pub_mfree(osl_t *osh, wlc_pub_t *pub) +static void wlc_pub_mfree(struct osl_info *osh, wlc_pub_t *pub) { if (pub == NULL) return; @@ -119,7 +120,7 @@ static void wlc_pub_mfree(osl_t *osh, wlc_pub_t *pub) kfree(pub); } -wlc_bsscfg_t *wlc_bsscfg_malloc(osl_t *osh, uint unit) +wlc_bsscfg_t *wlc_bsscfg_malloc(struct osl_info *osh, uint unit) { wlc_bsscfg_t *cfg; @@ -139,7 +140,7 @@ wlc_bsscfg_t *wlc_bsscfg_malloc(osl_t *osh, uint unit) return NULL; } -void wlc_bsscfg_mfree(osl_t *osh, wlc_bsscfg_t *cfg) +void wlc_bsscfg_mfree(struct osl_info *osh, wlc_bsscfg_t *cfg) { if (cfg == NULL) return; @@ -169,7 +170,8 @@ void wlc_bsscfg_ID_assign(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg) /* * The common driver entry routine. Error codes should be unique */ -wlc_info_t *wlc_attach_malloc(osl_t *osh, uint unit, uint *err, uint devid) +wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err, + uint devid) { wlc_info_t *wlc; @@ -306,7 +308,7 @@ wlc_info_t *wlc_attach_malloc(osl_t *osh, uint unit, uint *err, uint devid) return NULL; } -void wlc_detach_mfree(wlc_info_t *wlc, osl_t *osh) +void wlc_detach_mfree(wlc_info_t *wlc, struct osl_info *osh) { if (wlc == NULL) return; diff --git a/drivers/staging/brcm80211/sys/wlc_alloc.h b/drivers/staging/brcm80211/sys/wlc_alloc.h index 678a2b9784f..eedf6291269 100644 --- a/drivers/staging/brcm80211/sys/wlc_alloc.h +++ b/drivers/staging/brcm80211/sys/wlc_alloc.h @@ -14,12 +14,12 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -extern void *wlc_calloc(osl_t *osh, uint unit, uint size); +extern void *wlc_calloc(struct osl_info *osh, uint unit, uint size); -extern wlc_info_t *wlc_attach_malloc(osl_t *osh, uint unit, uint *err, +extern wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err, uint devid); -extern void wlc_detach_mfree(wlc_info_t *wlc, osl_t *osh); +extern void wlc_detach_mfree(wlc_info_t *wlc, struct osl_info *osh); struct wlc_bsscfg; -extern struct wlc_bsscfg *wlc_bsscfg_malloc(osl_t *osh, uint unit); -extern void wlc_bsscfg_mfree(osl_t *osh, struct wlc_bsscfg *cfg); +extern struct wlc_bsscfg *wlc_bsscfg_malloc(struct osl_info *osh, uint unit); +extern void wlc_bsscfg_mfree(struct osl_info *osh, struct wlc_bsscfg *cfg); diff --git a/drivers/staging/brcm80211/sys/wlc_ampdu.c b/drivers/staging/brcm80211/sys/wlc_ampdu.c index 0bd7069dc33..5d06105ba1f 100644 --- a/drivers/staging/brcm80211/sys/wlc_ampdu.c +++ b/drivers/staging/brcm80211/sys/wlc_ampdu.c @@ -504,7 +504,7 @@ int BCMFASTPATH wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec) { wlc_info_t *wlc; - osl_t *osh; + struct osl_info *osh; void *p, *pkt[AMPDU_MAX_MPDU]; u8 tid, ndelim; int err = 0; diff --git a/drivers/staging/brcm80211/sys/wlc_antsel.c b/drivers/staging/brcm80211/sys/wlc_antsel.c index ecc35de7700..4e4571a098f 100644 --- a/drivers/staging/brcm80211/sys/wlc_antsel.c +++ b/drivers/staging/brcm80211/sys/wlc_antsel.c @@ -93,7 +93,7 @@ const u8 mimo_2x3_div_antselid_tbl[16] = { 0, 0, 0, 0, 0, 0, 0, 0 /* pat to antselid */ }; -antsel_info_t *wlc_antsel_attach(wlc_info_t *wlc, osl_t *osh, +antsel_info_t *wlc_antsel_attach(wlc_info_t *wlc, struct osl_info *osh, wlc_pub_t *pub, wlc_hw_info_t *wlc_hw) { antsel_info_t *asi; diff --git a/drivers/staging/brcm80211/sys/wlc_antsel.h b/drivers/staging/brcm80211/sys/wlc_antsel.h index 1d048bbea94..f3361f8106e 100644 --- a/drivers/staging/brcm80211/sys/wlc_antsel.h +++ b/drivers/staging/brcm80211/sys/wlc_antsel.h @@ -16,7 +16,7 @@ #ifndef _wlc_antsel_h_ #define _wlc_antsel_h_ -extern antsel_info_t *wlc_antsel_attach(wlc_info_t *wlc, osl_t *osh, +extern antsel_info_t *wlc_antsel_attach(wlc_info_t *wlc, struct osl_info *osh, wlc_pub_t *pub, wlc_hw_info_t *wlc_hw); extern void wlc_antsel_detach(antsel_info_t *asi); diff --git a/drivers/staging/brcm80211/sys/wlc_bmac.c b/drivers/staging/brcm80211/sys/wlc_bmac.c index fc5201d5171..214b5d82ab2 100644 --- a/drivers/staging/brcm80211/sys/wlc_bmac.c +++ b/drivers/staging/brcm80211/sys/wlc_bmac.c @@ -193,7 +193,7 @@ void wlc_bmac_set_shortslot(wlc_hw_info_t *wlc_hw, bool shortslot) */ static void wlc_bmac_update_slot_timing(wlc_hw_info_t *wlc_hw, bool shortslot) { - osl_t *osh; + struct osl_info *osh; d11regs_t *regs; osh = wlc_hw->osh; @@ -586,7 +586,7 @@ static bool wlc_bmac_attach_dmapio(wlc_info_t *wlc, uint j, bool wme) if (wlc_hw->di[0] == 0) { /* Init FIFOs */ uint addrwidth; int dma_attach_err = 0; - osl_t *osh = wlc_hw->osh; + struct osl_info *osh = wlc_hw->osh; /* Find out the DMA addressing capability and let OS know * All the channels within one DMA core have 'common-minimum' same @@ -708,8 +708,8 @@ static void wlc_bmac_detach_dmapio(wlc_hw_info_t *wlc_hw) * put the whole chip in reset(driver down state), no clock */ int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, uint unit, - bool piomode, osl_t *osh, void *regsva, uint bustype, - void *btparam) + bool piomode, struct osl_info *osh, void *regsva, + uint bustype, void *btparam) { wlc_hw_info_t *wlc_hw; d11regs_t *regs; @@ -1719,7 +1719,7 @@ wlc_bmac_set_rcmta(wlc_hw_info_t *wlc_hw, int idx, volatile u16 *objdata16 = (volatile u16 *)®s->objdata; u32 mac_hm; u16 mac_l; - osl_t *osh; + struct osl_info *osh; WL_TRACE(("wl%d: %s\n", wlc_hw->unit, __func__)); @@ -1752,7 +1752,7 @@ wlc_bmac_set_addrmatch(wlc_hw_info_t *wlc_hw, int match_reg_offset, u16 mac_l; u16 mac_m; u16 mac_h; - osl_t *osh; + struct osl_info *osh; WL_TRACE(("wl%d: wlc_bmac_set_addrmatch\n", wlc_hw->unit)); @@ -1783,7 +1783,7 @@ wlc_bmac_write_template_ram(wlc_hw_info_t *wlc_hw, int offset, int len, #ifdef IL_BIGENDIAN volatile u16 *dptr = NULL; #endif /* IL_BIGENDIAN */ - osl_t *osh; + struct osl_info *osh; WL_TRACE(("wl%d: wlc_bmac_write_template_ram\n", wlc_hw->unit)); @@ -1819,7 +1819,7 @@ wlc_bmac_write_template_ram(wlc_hw_info_t *wlc_hw, int offset, int len, void wlc_bmac_set_cwmin(wlc_hw_info_t *wlc_hw, u16 newmin) { - osl_t *osh; + struct osl_info *osh; osh = wlc_hw->osh; wlc_hw->band->CWmin = newmin; @@ -1831,7 +1831,7 @@ void wlc_bmac_set_cwmin(wlc_hw_info_t *wlc_hw, u16 newmin) void wlc_bmac_set_cwmax(wlc_hw_info_t *wlc_hw, u16 newmax) { - osl_t *osh; + struct osl_info *osh; osh = wlc_hw->osh; wlc_hw->band->CWmax = newmax; @@ -2299,7 +2299,7 @@ void wlc_bmac_hw_up(wlc_hw_info_t *wlc_hw) static bool wlc_dma_rxreset(wlc_hw_info_t *wlc_hw, uint fifo) { hnddma_t *di = wlc_hw->di[fifo]; - osl_t *osh; + struct osl_info *osh; if (D11REV_LT(wlc_hw->corerev, 12)) { bool rxidle = true; @@ -2425,7 +2425,7 @@ static void wlc_corerev_fifofixup(wlc_hw_info_t *wlc_hw) u16 txfifo_startblk = TXFIFO_START_BLK, txfifo_endblk; u16 txfifo_def, txfifo_def1; u16 txfifo_cmd; - osl_t *osh; + struct osl_info *osh; if (D11REV_LT(wlc_hw->corerev, 9)) goto exit; @@ -2486,7 +2486,7 @@ static void wlc_coreinit(wlc_info_t *wlc) uint bcnint_us; uint i = 0; bool fifosz_fixup = false; - osl_t *osh; + struct osl_info *osh; int err = 0; u16 buf[NFIFO]; @@ -2692,7 +2692,7 @@ static void wlc_coreinit(wlc_info_t *wlc) void wlc_bmac_switch_macfreq(wlc_hw_info_t *wlc_hw, u8 spurmode) { d11regs_t *regs; - osl_t *osh; + struct osl_info *osh; regs = wlc_hw->regs; osh = wlc_hw->osh; @@ -2725,7 +2725,7 @@ static void wlc_gpio_init(wlc_info_t *wlc) wlc_hw_info_t *wlc_hw = wlc->hw; d11regs_t *regs; u32 gc, gm; - osl_t *osh; + struct osl_info *osh; regs = wlc_hw->regs; osh = wlc_hw->osh; @@ -2815,7 +2815,7 @@ static void wlc_ucode_download(wlc_hw_info_t *wlc_hw) static void wlc_ucode_write(wlc_hw_info_t *wlc_hw, const u32 ucode[], const uint nbytes) { - osl_t *osh; + struct osl_info *osh; d11regs_t *regs = wlc_hw->regs; uint i; uint count; @@ -2837,7 +2837,7 @@ static void wlc_ucode_write(wlc_hw_info_t *wlc_hw, const u32 ucode[], static void wlc_write_inits(wlc_hw_info_t *wlc_hw, const d11init_t *inits) { int i; - osl_t *osh; + struct osl_info *osh; volatile u8 *base; WL_TRACE(("wl%d: wlc_write_inits\n", wlc_hw->unit)); @@ -3180,7 +3180,7 @@ static inline u32 wlc_intstatus(wlc_info_t *wlc, bool in_isr) d11regs_t *regs = wlc_hw->regs; u32 macintstatus; u32 intstatus_rxfifo, intstatus_txsfifo; - osl_t *osh; + struct osl_info *osh; osh = wlc_hw->osh; @@ -3326,7 +3326,7 @@ static bool wlc_bmac_txstatus_corerev4(wlc_hw_info_t *wlc_hw) { void *status_p; tx_status_t *txs; - osl_t *osh; + struct osl_info *osh; bool fatal = false; WL_TRACE(("wl%d: wlc_txstatusrecv\n", wlc_hw->unit)); @@ -3393,7 +3393,7 @@ wlc_bmac_txstatus(wlc_hw_info_t *wlc_hw, bool bound, bool *fatal) } else { /* corerev >= 5 */ d11regs_t *regs; - osl_t *osh; + struct osl_info *osh; tx_status_t txstatus, *txs; u32 s1, s2; uint n = 0; @@ -3446,7 +3446,7 @@ void wlc_suspend_mac_and_wait(wlc_info_t *wlc) wlc_hw_info_t *wlc_hw = wlc->hw; d11regs_t *regs = wlc_hw->regs; u32 mc, mi; - osl_t *osh; + struct osl_info *osh; WL_TRACE(("wl%d: wlc_suspend_mac_and_wait: bandunit %d\n", wlc_hw->unit, wlc_hw->band->bandunit)); @@ -3510,7 +3510,7 @@ void wlc_enable_mac(wlc_info_t *wlc) wlc_hw_info_t *wlc_hw = wlc->hw; d11regs_t *regs = wlc_hw->regs; u32 mc, mi; - osl_t *osh; + struct osl_info *osh; WL_TRACE(("wl%d: wlc_enable_mac: bandunit %d\n", wlc_hw->unit, wlc->band->bandunit)); @@ -3673,7 +3673,7 @@ bool wlc_bmac_validate_chip_access(wlc_hw_info_t *wlc_hw) d11regs_t *regs; u32 w, val; volatile u16 *reg16; - osl_t *osh; + struct osl_info *osh; WL_TRACE(("wl%d: validate_chip_access\n", wlc_hw->unit)); @@ -3766,7 +3766,7 @@ bool wlc_bmac_validate_chip_access(wlc_hw_info_t *wlc_hw) void wlc_bmac_core_phypll_ctl(wlc_hw_info_t *wlc_hw, bool on) { d11regs_t *regs; - osl_t *osh; + struct osl_info *osh; u32 tmp; WL_TRACE(("wl%d: wlc_bmac_core_phypll_ctl\n", wlc_hw->unit)); diff --git a/drivers/staging/brcm80211/sys/wlc_bmac.h b/drivers/staging/brcm80211/sys/wlc_bmac.h index 872bc8d866d..4cc41f9f461 100644 --- a/drivers/staging/brcm80211/sys/wlc_bmac.h +++ b/drivers/staging/brcm80211/sys/wlc_bmac.h @@ -131,8 +131,8 @@ typedef enum { } wlc_bmac_state_id_t; extern int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, - uint unit, bool piomode, osl_t *osh, void *regsva, - uint bustype, void *btparam); + uint unit, bool piomode, struct osl_info *osh, + void *regsva, uint bustype, void *btparam); extern int wlc_bmac_detach(wlc_info_t *wlc); extern void wlc_bmac_watchdog(void *arg); extern void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw); diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c index a9fa48a14c5..9e57dc3cde2 100644 --- a/drivers/staging/brcm80211/sys/wlc_mac80211.c +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c @@ -265,8 +265,9 @@ static int wlc_iovar_rangecheck(wlc_info_t *wlc, u32 val, static u8 wlc_local_constraint_qdbm(wlc_info_t *wlc); /* send and receive */ -static wlc_txq_info_t *wlc_txq_alloc(wlc_info_t *wlc, osl_t *osh); -static void wlc_txq_free(wlc_info_t *wlc, osl_t *osh, wlc_txq_info_t *qi); +static wlc_txq_info_t *wlc_txq_alloc(wlc_info_t *wlc, struct osl_info *osh); +static void wlc_txq_free(wlc_info_t *wlc, struct osl_info *osh, + wlc_txq_info_t *qi); static void wlc_txflowcontrol_signal(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on, int prio); static void wlc_txflowcontrol_reset(wlc_info_t *wlc); @@ -277,7 +278,7 @@ static void wlc_compute_ofdm_plcp(ratespec_t rate, uint length, u8 *plcp); static void wlc_compute_mimo_plcp(ratespec_t rate, uint length, u8 *plcp); static u16 wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate, u8 preamble_type, uint next_frag_len); -static void wlc_recvctl(wlc_info_t *wlc, osl_t *osh, d11rxhdr_t *rxh, +static void wlc_recvctl(wlc_info_t *wlc, struct osl_info *osh, d11rxhdr_t *rxh, void *p); static uint wlc_calc_frame_len(wlc_info_t *wlc, ratespec_t rate, u8 preamble_type, uint dur); @@ -324,7 +325,7 @@ void wlc_get_rcmta(wlc_info_t *wlc, int idx, struct ether_addr *addr) { d11regs_t *regs = wlc->regs; u32 v32; - osl_t *osh; + struct osl_info *osh; WL_TRACE(("wl%d: %s\n", WLCWLUNIT(wlc), __func__)); @@ -1754,8 +1755,8 @@ wlc_pub_t *wlc_pub(void *wlc) * The common driver entry routine. Error codes should be unique */ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, - osl_t *osh, void *regsva, uint bustype, void *btparam, - uint *perr) + struct osl_info *osh, void *regsva, uint bustype, + void *btparam, uint *perr) { wlc_info_t *wlc; uint err = 0; @@ -2141,8 +2142,8 @@ static bool wlc_attach_stf_ant_init(wlc_info_t *wlc) #ifdef WLC_HIGH_ONLY /* HIGH_ONLY bmac_attach, which sync over LOW_ONLY bmac_attach states */ int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, uint unit, - bool piomode, osl_t *osh, void *regsva, uint bustype, - void *btparam) + bool piomode, struct osl_info *osh, void *regsva, + uint bustype, void *btparam) { wlc_bmac_revinfo_t revinfo; uint idx = 0; @@ -3271,7 +3272,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) uint band; rw_reg_t *r; wlc_bsscfg_t *bsscfg; - osl_t *osh; + struct osl_info *osh; wlc_bss_info_t *current_bss; /* update bsscfg pointer */ @@ -5877,7 +5878,7 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, struct dot11_header *h; d11txh_t *txh; u8 *plcp, plcp_fallback[D11_PHY_HDR_LEN]; - osl_t *osh; + struct osl_info *osh; int len, phylen, rts_phylen; u16 fc, type, frameid, mch, phyctl, xfts, mainrates; u16 seq = 0, mcl = 0, status = 0; @@ -6750,7 +6751,7 @@ wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, u32 frm_tx2) d11txh_t *txh; struct scb *scb = NULL; bool free_pdu; - osl_t *osh; + struct osl_info *osh; int tx_rts, tx_frame_count, tx_rts_count; uint totlen, supr_status; bool lastframe; @@ -7144,7 +7145,7 @@ prep_mac80211_status(wlc_info_t *wlc, d11rxhdr_t *rxh, void *p, } static void -wlc_recvctl(wlc_info_t *wlc, osl_t *osh, d11rxhdr_t *rxh, void *p) +wlc_recvctl(wlc_info_t *wlc, struct osl_info *osh, d11rxhdr_t *rxh, void *p) { int len_mpdu; struct ieee80211_rx_status rx_status; @@ -7211,7 +7212,7 @@ void BCMFASTPATH wlc_recv(wlc_info_t *wlc, void *p) { d11rxhdr_t *rxh; struct dot11_header *h; - osl_t *osh; + struct osl_info *osh; u16 fc; uint len; bool is_amsdu; @@ -7913,7 +7914,7 @@ void wlc_bss_update_beacon(wlc_info_t *wlc, wlc_bsscfg_t *cfg) u16 bcn[BCN_TMPL_LEN / 2]; u32 both_valid = MCMD_BCN0VLD | MCMD_BCN1VLD; d11regs_t *regs = wlc->regs; - osl_t *osh = NULL; + struct osl_info *osh = NULL; osh = wlc->osh; @@ -8035,7 +8036,7 @@ wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg, bool suspend) /* prepares pdu for transmission. returns BCM error codes */ int wlc_prep_pdu(wlc_info_t *wlc, void *pdu, uint *fifop) { - osl_t *osh; + struct osl_info *osh; uint fifo; d11txh_t *txh; struct dot11_header *h; @@ -8628,7 +8629,7 @@ wlc_txflowcontrol_signal(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on, } } -static wlc_txq_info_t *wlc_txq_alloc(wlc_info_t *wlc, osl_t *osh) +static wlc_txq_info_t *wlc_txq_alloc(wlc_info_t *wlc, struct osl_info *osh) { wlc_txq_info_t *qi, *p; @@ -8658,7 +8659,8 @@ static wlc_txq_info_t *wlc_txq_alloc(wlc_info_t *wlc, osl_t *osh) return qi; } -static void wlc_txq_free(wlc_info_t *wlc, osl_t *osh, wlc_txq_info_t *qi) +static void wlc_txq_free(wlc_info_t *wlc, struct osl_info *osh, + wlc_txq_info_t *qi) { wlc_txq_info_t *p; diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.h b/drivers/staging/brcm80211/sys/wlc_mac80211.h index a3c6fb88499..ee0081b307f 100644 --- a/drivers/staging/brcm80211/sys/wlc_mac80211.h +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.h @@ -433,7 +433,7 @@ struct wlc_hw_info { #ifdef WLC_SPLIT rpc_info_t *rpc; /* Handle to RPC module */ #endif - osl_t *osh; /* pointer to os handle */ + struct osl_info *osh; /* pointer to os handle */ bool _piomode; /* true if pio mode */ wlc_info_t *wlc; @@ -536,7 +536,7 @@ typedef struct wlc_txq_info { */ struct wlc_info { wlc_pub_t *pub; /* pointer to wlc public state */ - osl_t *osh; /* pointer to os handle */ + struct osl_info *osh; /* pointer to os handle */ struct wl_info *wl; /* pointer to os-specific private state */ d11regs_t *regs; /* pointer to device registers */ diff --git a/drivers/staging/brcm80211/sys/wlc_pub.h b/drivers/staging/brcm80211/sys/wlc_pub.h index f6ac5e99cf3..09be41d921c 100644 --- a/drivers/staging/brcm80211/sys/wlc_pub.h +++ b/drivers/staging/brcm80211/sys/wlc_pub.h @@ -260,7 +260,7 @@ typedef struct wlc_pub { uint mac80211_state; uint unit; /* device instance number */ uint corerev; /* core revision */ - osl_t *osh; /* pointer to os handle */ + struct osl_info *osh; /* pointer to os handle */ si_t *sih; /* SB handle (cookie for siutils calls) */ char *vars; /* "environment" name=value */ bool up; /* interface up and running */ @@ -493,8 +493,8 @@ extern const u8 wme_fifo2ac[]; /* common functions for every port */ extern void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, - bool piomode, osl_t *osh, void *regsva, uint bustype, - void *btparam, uint *perr); + bool piomode, struct osl_info *osh, void *regsva, + uint bustype, void *btparam, uint *perr); extern uint wlc_detach(struct wlc_info *wlc); extern int wlc_up(struct wlc_info *wlc); extern uint wlc_down(struct wlc_info *wlc); diff --git a/drivers/staging/brcm80211/util/bcmotp.c b/drivers/staging/brcm80211/util/bcmotp.c index 9b1e6d961a7..499cf036620 100644 --- a/drivers/staging/brcm80211/util/bcmotp.c +++ b/drivers/staging/brcm80211/util/bcmotp.c @@ -78,7 +78,7 @@ typedef struct { uint ccrev; /* chipc revision */ otp_fn_t *fn; /* OTP functions */ si_t *sih; /* Saved sb handle */ - osl_t *osh; + struct osl_info *osh; #ifdef BCMIPXOTP /* IPX OTP section */ @@ -570,7 +570,7 @@ static int hndotp_size(void *oh) static u16 hndotp_otpr(void *oh, chipcregs_t *cc, uint wn) { otpinfo_t *oi = (otpinfo_t *) oh; - osl_t *osh; + struct osl_info *osh; volatile u16 *ptr; ASSERT(wn < ((oi->size / 2) + OTP_RC_LIM_OFF)); @@ -585,7 +585,7 @@ static u16 hndotp_otpr(void *oh, chipcregs_t *cc, uint wn) static u16 hndotp_otproff(void *oh, chipcregs_t *cc, int woff) { otpinfo_t *oi = (otpinfo_t *) oh; - osl_t *osh; + struct osl_info *osh; volatile u16 *ptr; ASSERT(woff >= (-((int)oi->size / 2))); @@ -604,7 +604,7 @@ static u16 hndotp_read_bit(void *oh, chipcregs_t *cc, uint idx) otpinfo_t *oi = (otpinfo_t *) oh; uint k, row, col; u32 otpp, st; - osl_t *osh; + struct osl_info *osh; osh = si_osh(oi->sih); row = idx / 65; @@ -637,7 +637,7 @@ static void *hndotp_init(si_t *sih) otpinfo_t *oi; u32 cap = 0, clkdiv, otpdiv = 0; void *ret = NULL; - osl_t *osh; + struct osl_info *osh; oi = &otpinfo; diff --git a/drivers/staging/brcm80211/util/bcmsrom.c b/drivers/staging/brcm80211/util/bcmsrom.c index 4f3d3ca1af7..7240e3c11c5 100644 --- a/drivers/staging/brcm80211/util/bcmsrom.c +++ b/drivers/staging/brcm80211/util/bcmsrom.c @@ -67,29 +67,30 @@ extern uint _varsz; #define SROM_CIS_SINGLE 1 -static int initvars_srom_si(si_t *sih, osl_t *osh, void *curmap, char **vars, - uint *count); +static int initvars_srom_si(si_t *sih, struct osl_info *osh, void *curmap, + char **vars, uint *count); static void _initvars_srom_pci(u8 sromrev, u16 *srom, uint off, varbuf_t *b); static int initvars_srom_pci(si_t *sih, void *curmap, char **vars, uint *count); static int initvars_flash_si(si_t *sih, char **vars, uint *count); #ifdef BCMSDIO -static int initvars_cis_sdio(osl_t *osh, char **vars, uint *count); -static int sprom_cmd_sdio(osl_t *osh, u8 cmd); -static int sprom_read_sdio(osl_t *osh, u16 addr, u16 *data); +static int initvars_cis_sdio(struct osl_info *osh, char **vars, uint *count); +static int sprom_cmd_sdio(struct osl_info *osh, u8 cmd); +static int sprom_read_sdio(struct osl_info *osh, u16 addr, u16 *data); #endif /* BCMSDIO */ -static int sprom_read_pci(osl_t *osh, si_t *sih, u16 *sprom, uint wordoff, - u16 *buf, uint nwords, bool check_crc); +static int sprom_read_pci(struct osl_info *osh, si_t *sih, u16 *sprom, + uint wordoff, u16 *buf, uint nwords, bool check_crc); #if defined(BCMNVRAMR) -static int otp_read_pci(osl_t *osh, si_t *sih, u16 *buf, uint bufsz); +static int otp_read_pci(struct osl_info *osh, si_t *sih, u16 *buf, uint bufsz); #endif -static u16 srom_cc_cmd(si_t *sih, osl_t *osh, void *ccregs, u32 cmd, +static u16 srom_cc_cmd(si_t *sih, struct osl_info *osh, void *ccregs, u32 cmd, uint wordoff, u16 data); -static int initvars_table(osl_t *osh, char *start, char *end, char **vars, - uint *count); -static int initvars_flash(si_t *sih, osl_t *osh, char **vp, uint len); +static int initvars_table(struct osl_info *osh, char *start, char *end, + char **vars, uint *count); +static int initvars_flash(si_t *sih, struct osl_info *osh, char **vp, + uint len); /* Initialization of varbuf structure */ static void varbuf_init(varbuf_t *b, char *buf, uint size) @@ -156,7 +157,7 @@ static int varbuf_append(varbuf_t *b, const char *fmt, ...) * Initialize local vars from the right source for this platform. * Return 0 on success, nonzero on error. */ -int srom_var_init(si_t *sih, uint bustype, void *curmap, osl_t *osh, +int srom_var_init(si_t *sih, uint bustype, void *curmap, struct osl_info *osh, char **vars, uint *count) { uint len; @@ -195,7 +196,7 @@ int srom_var_init(si_t *sih, uint bustype, void *curmap, osl_t *osh, /* support only 16-bit word read from srom */ int -srom_read(si_t *sih, uint bustype, void *curmap, osl_t *osh, +srom_read(si_t *sih, uint bustype, void *curmap, struct osl_info *osh, uint byteoff, uint nbytes, u16 *buf, bool check_crc) { uint off, nw; @@ -377,7 +378,8 @@ u8 patch_pair; /* For dongle HW, accept partial calibration parameters */ #define BCMDONGLECASE(n) -int srom_parsecis(osl_t *osh, u8 *pcis[], uint ciscnt, char **vars, uint *count) +int srom_parsecis(struct osl_info *osh, u8 *pcis[], uint ciscnt, char **vars, + uint *count) { char eabuf[32]; char *base; @@ -1406,8 +1408,8 @@ int srom_parsecis(osl_t *osh, u8 *pcis[], uint ciscnt, char **vars, uint *count) * not in the bus cores. */ static u16 -srom_cc_cmd(si_t *sih, osl_t *osh, void *ccregs, u32 cmd, uint wordoff, - u16 data) +srom_cc_cmd(si_t *sih, struct osl_info *osh, void *ccregs, u32 cmd, + uint wordoff, u16 data) { chipcregs_t *cc = (chipcregs_t *) ccregs; uint wait_cnt = 1000; @@ -1440,7 +1442,7 @@ srom_cc_cmd(si_t *sih, osl_t *osh, void *ccregs, u32 cmd, uint wordoff, * Return 0 on success, nonzero on error. */ static int -sprom_read_pci(osl_t *osh, si_t *sih, u16 *sprom, uint wordoff, +sprom_read_pci(struct osl_info *osh, si_t *sih, u16 *sprom, uint wordoff, u16 *buf, uint nwords, bool check_crc) { int err = 0; @@ -1500,7 +1502,7 @@ sprom_read_pci(osl_t *osh, si_t *sih, u16 *sprom, uint wordoff, } #if defined(BCMNVRAMR) -static int otp_read_pci(osl_t *osh, si_t *sih, u16 *buf, uint bufsz) +static int otp_read_pci(struct osl_info *osh, si_t *sih, u16 *buf, uint bufsz) { u8 *otp; uint sz = OTP_SZ_MAX / 2; /* size in words */ @@ -1548,8 +1550,8 @@ static int otp_read_pci(osl_t *osh, si_t *sih, u16 *buf, uint bufsz) * Create variable table from memory. * Return 0 on success, nonzero on error. */ -static int initvars_table(osl_t *osh, char *start, char *end, char **vars, - uint *count) +static int initvars_table(struct osl_info *osh, char *start, char *end, + char **vars, uint *count) { int c = (int)(end - start); @@ -1575,7 +1577,8 @@ static int initvars_table(osl_t *osh, char *start, char *end, char **vars, * of the table upon enter and to the end of the table upon exit when success. * Return 0 on success, nonzero on error. */ -static int initvars_flash(si_t *sih, osl_t *osh, char **base, uint len) +static int initvars_flash(si_t *sih, struct osl_info *osh, char **base, + uint len) { char *vp = *base; char *flash; @@ -1635,7 +1638,7 @@ static int initvars_flash(si_t *sih, osl_t *osh, char **base, uint len) */ static int initvars_flash_si(si_t *sih, char **vars, uint *count) { - osl_t *osh = si_osh(sih); + struct osl_info *osh = si_osh(sih); char *vp, *base; int err; @@ -1846,7 +1849,7 @@ static int initvars_srom_pci(si_t *sih, void *curmap, char **vars, uint *count) u32 sr; varbuf_t b; char *vp, *base = NULL; - osl_t *osh = si_osh(sih); + struct osl_info *osh = si_osh(sih); bool flash = false; int err = 0; @@ -1987,7 +1990,7 @@ static int initvars_srom_pci(si_t *sih, void *curmap, char **vars, uint *count) * Read the SDIO cis and call parsecis to initialize the vars. * Return 0 on success, nonzero on error. */ -static int initvars_cis_sdio(osl_t *osh, char **vars, uint *count) +static int initvars_cis_sdio(struct osl_info *osh, char **vars, uint *count) { u8 *cis[SBSDIO_NUM_FUNCTION + 1]; uint fn, numfn; @@ -2021,7 +2024,7 @@ static int initvars_cis_sdio(osl_t *osh, char **vars, uint *count) } /* set SDIO sprom command register */ -static int sprom_cmd_sdio(osl_t *osh, u8 cmd) +static int sprom_cmd_sdio(struct osl_info *osh, u8 cmd) { u8 status = 0; uint wait_cnt = 1000; @@ -2041,7 +2044,7 @@ static int sprom_cmd_sdio(osl_t *osh, u8 cmd) } /* read a word from the SDIO srom */ -static int sprom_read_sdio(osl_t *osh, u16 addr, u16 *data) +static int sprom_read_sdio(struct osl_info *osh, u16 addr, u16 *data) { u8 addr_l, addr_h, data_l, data_h; @@ -2069,8 +2072,8 @@ static int sprom_read_sdio(osl_t *osh, u16 addr, u16 *data) } #endif /* BCMSDIO */ -static int initvars_srom_si(si_t *sih, osl_t *osh, void *curmap, char **vars, - uint *varsz) +static int initvars_srom_si(si_t *sih, struct osl_info *osh, void *curmap, + char **vars, uint *varsz) { /* Search flash nvram section for srom variables */ return initvars_flash_si(sih, vars, varsz); diff --git a/drivers/staging/brcm80211/util/bcmutils.c b/drivers/staging/brcm80211/util/bcmutils.c index 869d34c420d..83f96cdfe77 100644 --- a/drivers/staging/brcm80211/util/bcmutils.c +++ b/drivers/staging/brcm80211/util/bcmutils.c @@ -33,7 +33,8 @@ #include <proto/802.11.h> /* copy a buffer into a pkt buffer chain */ -uint pktfrombuf(osl_t *osh, void *p, uint offset, int len, unsigned char *buf) +uint pktfrombuf(struct osl_info *osh, void *p, uint offset, int len, + unsigned char *buf) { uint n, ret = 0; @@ -60,7 +61,7 @@ uint pktfrombuf(osl_t *osh, void *p, uint offset, int len, unsigned char *buf) return ret; } /* return total length of buffer chain */ -uint BCMFASTPATH pkttotlen(osl_t *osh, void *p) +uint BCMFASTPATH pkttotlen(struct osl_info *osh, void *p) { uint total; @@ -185,7 +186,7 @@ void *BCMFASTPATH pktq_pdeq_tail(struct pktq *pq, int prec) } #ifdef BRCM_FULLMAC -void pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir) +void pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir) { struct pktq_prec *q; void *p; @@ -204,7 +205,7 @@ void pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir) q->tail = NULL; } -void pktq_flush(osl_t *osh, struct pktq *pq, bool dir) +void pktq_flush(struct osl_info *osh, struct pktq *pq, bool dir) { int prec; for (prec = 0; prec < pq->num_prec; prec++) @@ -213,8 +214,8 @@ void pktq_flush(osl_t *osh, struct pktq *pq, bool dir) } #else /* !BRCM_FULLMAC */ void -pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir, ifpkt_cb_t fn, - int arg) +pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir, + ifpkt_cb_t fn, int arg) { struct pktq_prec *q; void *p, *prev = NULL; @@ -245,7 +246,8 @@ pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir, ifpkt_cb_t fn, } } -void pktq_flush(osl_t *osh, struct pktq *pq, bool dir, ifpkt_cb_t fn, int arg) +void pktq_flush(struct osl_info *osh, struct pktq *pq, bool dir, + ifpkt_cb_t fn, int arg) { int prec; for (prec = 0; prec < pq->num_prec; prec++) @@ -405,7 +407,7 @@ int getintvar(char *vars, const char *name) #if defined(BCMDBG) /* pretty hex print a pkt buffer chain */ -void prpkt(const char *msg, osl_t *osh, void *p0) +void prpkt(const char *msg, struct osl_info *osh, void *p0) { void *p; diff --git a/drivers/staging/brcm80211/util/hnddma.c b/drivers/staging/brcm80211/util/hnddma.c index b4dcb05705b..a945156eb31 100644 --- a/drivers/staging/brcm80211/util/hnddma.c +++ b/drivers/staging/brcm80211/util/hnddma.c @@ -223,7 +223,7 @@ static void _dma_counterreset(dma_info_t *di); static void _dma_fifoloopbackenable(dma_info_t *di); static uint _dma_ctrlflags(dma_info_t *di, uint mask, uint flags); static u8 dma_align_sizetobits(uint size); -static void *dma_ringalloc(osl_t *osh, u32 boundary, uint size, +static void *dma_ringalloc(struct osl_info *osh, u32 boundary, uint size, u16 *alignbits, uint *alloced, dmaaddr_t *descpa, osldma_t **dmah); @@ -247,7 +247,7 @@ static bool dma32_txstopped(dma_info_t *di); static bool dma32_rxstopped(dma_info_t *di); static bool dma32_rxenabled(dma_info_t *di); -static bool _dma32_addrext(osl_t *osh, dma32regs_t *dma32regs); +static bool _dma32_addrext(struct osl_info *osh, dma32regs_t *dma32regs); /* Prototypes for 64-bit routines */ static bool dma64_alloc(dma_info_t *di, uint direction); @@ -271,7 +271,7 @@ static void dma64_txreclaim(dma_info_t *di, txd_range_t range); static bool dma64_txstopped(dma_info_t *di); static bool dma64_rxstopped(dma_info_t *di); static bool dma64_rxenabled(dma_info_t *di); -static bool _dma64_addrext(osl_t *osh, dma64regs_t *dma64regs); +static bool _dma64_addrext(struct osl_info *osh, dma64regs_t *dma64regs); static inline u32 parity32(u32 data); @@ -369,10 +369,10 @@ static const di_fcn_t dma32proc = { 39 }; -hnddma_t *dma_attach(osl_t *osh, char *name, si_t *sih, void *dmaregstx, - void *dmaregsrx, uint ntxd, uint nrxd, uint rxbufsize, - int rxextheadroom, uint nrxpost, uint rxoffset, - uint *msg_level) +hnddma_t *dma_attach(struct osl_info *osh, char *name, si_t *sih, + void *dmaregstx, void *dmaregsrx, uint ntxd, + uint nrxd, uint rxbufsize, int rxextheadroom, + uint nrxpost, uint rxoffset, uint *msg_level) { dma_info_t *di; uint size; @@ -664,7 +664,7 @@ dma64_dd_upd(dma_info_t *di, dma64dd_t *ddring, dmaaddr_t pa, uint outidx, } } -static bool _dma32_addrext(osl_t *osh, dma32regs_t *dma32regs) +static bool _dma32_addrext(struct osl_info *osh, dma32regs_t *dma32regs) { u32 w; @@ -1373,7 +1373,7 @@ static unsigned long _dma_getvar(dma_info_t *di, const char *name) return 0; } -void dma_txpioloopback(osl_t *osh, dma32regs_t *regs) +void dma_txpioloopback(struct osl_info *osh, dma32regs_t *regs) { OR_REG(osh, ®s->control, XC_LE); } @@ -1396,7 +1396,7 @@ u8 dma_align_sizetobits(uint size) * descriptor ring size aligned location. This will ensure that the ring will * not cross page boundary */ -static void *dma_ringalloc(osl_t *osh, u32 boundary, uint size, +static void *dma_ringalloc(struct osl_info *osh, u32 boundary, uint size, u16 *alignbits, uint *alloced, dmaaddr_t *descpa, osldma_t **dmah) { @@ -2564,7 +2564,7 @@ static void *BCMFASTPATH dma64_getnextrxp(dma_info_t *di, bool forceall) return rxp; } -static bool _dma64_addrext(osl_t *osh, dma64regs_t * dma64regs) +static bool _dma64_addrext(struct osl_info *osh, dma64regs_t * dma64regs) { u32 w; OR_REG(osh, &dma64regs->control, D64_XC_AE); @@ -2655,7 +2655,7 @@ static void dma64_txrotate(dma_info_t *di) uint dma_addrwidth(si_t *sih, void *dmaregs) { dma32regs_t *dma32regs; - osl_t *osh; + struct osl_info *osh; osh = si_osh(sih); diff --git a/drivers/staging/brcm80211/util/hndpmu.c b/drivers/staging/brcm80211/util/hndpmu.c index 6fb256bc554..5b6fa72b99e 100644 --- a/drivers/staging/brcm80211/util/hndpmu.c +++ b/drivers/staging/brcm80211/util/hndpmu.c @@ -44,23 +44,23 @@ #define PMU_NONE(args) /* PLL controls/clocks */ -static void si_pmu1_pllinit0(si_t *sih, osl_t *osh, chipcregs_t *cc, +static void si_pmu1_pllinit0(si_t *sih, struct osl_info *osh, chipcregs_t *cc, u32 xtal); -static u32 si_pmu1_cpuclk0(si_t *sih, osl_t *osh, chipcregs_t *cc); -static u32 si_pmu1_alpclk0(si_t *sih, osl_t *osh, chipcregs_t *cc); +static u32 si_pmu1_cpuclk0(si_t *sih, struct osl_info *osh, chipcregs_t *cc); +static u32 si_pmu1_alpclk0(si_t *sih, struct osl_info *osh, chipcregs_t *cc); /* PMU resources */ static bool si_pmu_res_depfltr_bb(si_t *sih); static bool si_pmu_res_depfltr_ncb(si_t *sih); static bool si_pmu_res_depfltr_paldo(si_t *sih); static bool si_pmu_res_depfltr_npaldo(si_t *sih); -static u32 si_pmu_res_deps(si_t *sih, osl_t *osh, chipcregs_t *cc, +static u32 si_pmu_res_deps(si_t *sih, struct osl_info *osh, chipcregs_t *cc, u32 rsrcs, bool all); -static uint si_pmu_res_uptime(si_t *sih, osl_t *osh, chipcregs_t *cc, +static uint si_pmu_res_uptime(si_t *sih, struct osl_info *osh, chipcregs_t *cc, u8 rsrc); static void si_pmu_res_masks(si_t *sih, u32 * pmin, u32 * pmax); static void si_pmu_spuravoid_pllupdate(si_t *sih, chipcregs_t *cc, - osl_t *osh, u8 spuravoid); + struct osl_info *osh, u8 spuravoid); static void si_pmu_set_4330_plldivs(si_t *sih); @@ -105,7 +105,7 @@ void si_pmu_pllupd(si_t *sih) } /* Setup switcher voltage */ -void si_pmu_set_switcher_voltage(si_t *sih, osl_t *osh, u8 bb_voltage, +void si_pmu_set_switcher_voltage(si_t *sih, struct osl_info *osh, u8 bb_voltage, u8 rf_voltage) { chipcregs_t *cc; @@ -128,7 +128,7 @@ void si_pmu_set_switcher_voltage(si_t *sih, osl_t *osh, u8 bb_voltage, si_setcoreidx(sih, origidx); } -void si_pmu_set_ldo_voltage(si_t *sih, osl_t *osh, u8 ldo, u8 voltage) +void si_pmu_set_ldo_voltage(si_t *sih, struct osl_info *osh, u8 ldo, u8 voltage) { u8 sr_cntl_shift = 0, rc_shift = 0, shift = 0, mask = 0; u8 addr = 0; @@ -186,7 +186,7 @@ void si_pmu_set_ldo_voltage(si_t *sih, osl_t *osh, u8 ldo, u8 voltage) /* d11 slow to fast clock transition time in slow clock cycles */ #define D11SCC_SLOW2FAST_TRANSITION 2 -u16 si_pmu_fast_pwrup_delay(si_t *sih, osl_t *osh) +u16 si_pmu_fast_pwrup_delay(si_t *sih, struct osl_info *osh) { uint delay = PMU_MAX_TRANSITION_DLY; chipcregs_t *cc; @@ -263,7 +263,7 @@ u16 si_pmu_fast_pwrup_delay(si_t *sih, osl_t *osh) return (u16) delay; } -u32 si_pmu_force_ilp(si_t *sih, osl_t *osh, bool force) +u32 si_pmu_force_ilp(si_t *sih, struct osl_info *osh, bool force) { chipcregs_t *cc; uint origidx; @@ -681,7 +681,7 @@ static void si_pmu_res_masks(si_t *sih, u32 * pmin, u32 * pmax) } /* initialize PMU resources */ -void si_pmu_res_init(si_t *sih, osl_t *osh) +void si_pmu_res_init(si_t *sih, struct osl_info *osh) { chipcregs_t *cc; uint origidx; @@ -1182,7 +1182,7 @@ static u32 si_pmu1_pllfvco0(si_t *sih) /* query alp/xtal clock frequency */ static u32 -si_pmu1_alpclk0(si_t *sih, osl_t *osh, chipcregs_t *cc) +si_pmu1_alpclk0(si_t *sih, struct osl_info *osh, chipcregs_t *cc) { const pmu1_xtaltab0_t *xt; u32 xf; @@ -1207,7 +1207,8 @@ si_pmu1_alpclk0(si_t *sih, osl_t *osh, chipcregs_t *cc) * case the xtal frequency is unknown to the s/w so we need to call * si_pmu1_xtaldef0() wherever it is needed to return a default value. */ -static void si_pmu1_pllinit0(si_t *sih, osl_t *osh, chipcregs_t *cc, u32 xtal) +static void si_pmu1_pllinit0(si_t *sih, struct osl_info *osh, chipcregs_t *cc, + u32 xtal) { const pmu1_xtaltab0_t *xt; u32 tmp; @@ -1452,7 +1453,7 @@ static void si_pmu1_pllinit0(si_t *sih, osl_t *osh, chipcregs_t *cc, u32 xtal) /* query the CPU clock frequency */ static u32 -si_pmu1_cpuclk0(si_t *sih, osl_t *osh, chipcregs_t *cc) +si_pmu1_cpuclk0(si_t *sih, struct osl_info *osh, chipcregs_t *cc) { u32 tmp, m1div; #ifdef BCMDBG @@ -1506,7 +1507,7 @@ si_pmu1_cpuclk0(si_t *sih, osl_t *osh, chipcregs_t *cc) } /* initialize PLL */ -void si_pmu_pll_init(si_t *sih, osl_t *osh, uint xtalfreq) +void si_pmu_pll_init(si_t *sih, struct osl_info *osh, uint xtalfreq) { chipcregs_t *cc; uint origidx; @@ -1559,7 +1560,7 @@ void si_pmu_pll_init(si_t *sih, osl_t *osh, uint xtalfreq) } /* query alp/xtal clock frequency */ -u32 si_pmu_alp_clock(si_t *sih, osl_t *osh) +u32 si_pmu_alp_clock(si_t *sih, struct osl_info *osh) { chipcregs_t *cc; uint origidx; @@ -1620,7 +1621,7 @@ u32 si_pmu_alp_clock(si_t *sih, osl_t *osh) * pllreg "pll0" i.e. 12 for main 6 for phy, 0 for misc. */ static u32 -si_pmu5_clock(si_t *sih, osl_t *osh, chipcregs_t *cc, uint pll0, +si_pmu5_clock(si_t *sih, struct osl_info *osh, chipcregs_t *cc, uint pll0, uint m) { u32 tmp, div, ndiv, p1, p2, fc; @@ -1673,7 +1674,7 @@ si_pmu5_clock(si_t *sih, osl_t *osh, chipcregs_t *cc, uint pll0, /* For designs that feed the same clock to both backplane * and CPU just return the CPU clock speed. */ -u32 si_pmu_si_clock(si_t *sih, osl_t *osh) +u32 si_pmu_si_clock(si_t *sih, struct osl_info *osh) { chipcregs_t *cc; uint origidx; @@ -1752,7 +1753,7 @@ u32 si_pmu_si_clock(si_t *sih, osl_t *osh) } /* query CPU clock frequency */ -u32 si_pmu_cpu_clock(si_t *sih, osl_t *osh) +u32 si_pmu_cpu_clock(si_t *sih, struct osl_info *osh) { chipcregs_t *cc; uint origidx; @@ -1796,7 +1797,7 @@ u32 si_pmu_cpu_clock(si_t *sih, osl_t *osh) } /* query memory clock frequency */ -u32 si_pmu_mem_clock(si_t *sih, osl_t *osh) +u32 si_pmu_mem_clock(si_t *sih, struct osl_info *osh) { chipcregs_t *cc; uint origidx; @@ -1845,7 +1846,7 @@ u32 si_pmu_mem_clock(si_t *sih, osl_t *osh) static u32 ilpcycles_per_sec; -u32 si_pmu_ilp_clock(si_t *sih, osl_t *osh) +u32 si_pmu_ilp_clock(si_t *sih, struct osl_info *osh) { if (ISSIM_ENAB(sih)) return ILP_CLOCK; @@ -1909,7 +1910,7 @@ static const sdiod_drive_str_t sdiod_drive_strength_tab3[] = { #define SDIOD_DRVSTR_KEY(chip, pmu) (((chip) << 16) | (pmu)) void -si_sdiod_drive_strength_init(si_t *sih, osl_t *osh, +si_sdiod_drive_strength_init(si_t *sih, struct osl_info *osh, u32 drivestrength) { chipcregs_t *cc; uint origidx, intr_val = 0; @@ -1980,7 +1981,7 @@ si_sdiod_drive_strength_init(si_t *sih, osl_t *osh, } /* initialize PMU */ -void si_pmu_init(si_t *sih, osl_t *osh) +void si_pmu_init(si_t *sih, struct osl_info *osh) { chipcregs_t *cc; uint origidx; @@ -2012,7 +2013,7 @@ void si_pmu_init(si_t *sih, osl_t *osh) /* Return up time in ILP cycles for the given resource. */ static uint -si_pmu_res_uptime(si_t *sih, osl_t *osh, chipcregs_t *cc, +si_pmu_res_uptime(si_t *sih, struct osl_info *osh, chipcregs_t *cc, u8 rsrc) { u32 deps; uint up, i, dup, dmax; @@ -2049,7 +2050,7 @@ si_pmu_res_uptime(si_t *sih, osl_t *osh, chipcregs_t *cc, /* Return dependancies (direct or all/indirect) for the given resources */ static u32 -si_pmu_res_deps(si_t *sih, osl_t *osh, chipcregs_t *cc, u32 rsrcs, +si_pmu_res_deps(si_t *sih, struct osl_info *osh, chipcregs_t *cc, u32 rsrcs, bool all) { u32 deps = 0; @@ -2069,7 +2070,7 @@ si_pmu_res_deps(si_t *sih, osl_t *osh, chipcregs_t *cc, u32 rsrcs, } /* power up/down OTP through PMU resources */ -void si_pmu_otp_power(si_t *sih, osl_t *osh, bool on) +void si_pmu_otp_power(si_t *sih, struct osl_info *osh, bool on) { chipcregs_t *cc; uint origidx; @@ -2139,7 +2140,7 @@ void si_pmu_otp_power(si_t *sih, osl_t *osh, bool on) si_setcoreidx(sih, origidx); } -void si_pmu_rcal(si_t *sih, osl_t *osh) +void si_pmu_rcal(si_t *sih, struct osl_info *osh) { chipcregs_t *cc; uint origidx; @@ -2222,7 +2223,7 @@ void si_pmu_rcal(si_t *sih, osl_t *osh) si_setcoreidx(sih, origidx); } -void si_pmu_spuravoid(si_t *sih, osl_t *osh, u8 spuravoid) +void si_pmu_spuravoid(si_t *sih, struct osl_info *osh, u8 spuravoid) { chipcregs_t *cc; uint origidx, intr_val; @@ -2259,7 +2260,7 @@ void si_pmu_spuravoid(si_t *sih, osl_t *osh, u8 spuravoid) } static void -si_pmu_spuravoid_pllupdate(si_t *sih, chipcregs_t *cc, osl_t *osh, +si_pmu_spuravoid_pllupdate(si_t *sih, chipcregs_t *cc, struct osl_info *osh, u8 spuravoid) { u32 tmp = 0; @@ -2455,7 +2456,7 @@ si_pmu_spuravoid_pllupdate(si_t *sih, chipcregs_t *cc, osl_t *osh, W_REG(osh, &cc->pmucontrol, tmp); } -bool si_pmu_is_otp_powered(si_t *sih, osl_t *osh) +bool si_pmu_is_otp_powered(si_t *sih, struct osl_info *osh) { uint idx; chipcregs_t *cc; @@ -2507,9 +2508,9 @@ bool si_pmu_is_otp_powered(si_t *sih, osl_t *osh) void #if defined(BCMDBG) -si_pmu_sprom_enable(si_t *sih, osl_t *osh, bool enable) +si_pmu_sprom_enable(si_t *sih, struct osl_info *osh, bool enable) #else -si_pmu_sprom_enable(si_t *sih, osl_t *osh, bool enable) +si_pmu_sprom_enable(si_t *sih, struct osl_info *osh, bool enable) #endif { chipcregs_t *cc; @@ -2525,7 +2526,7 @@ si_pmu_sprom_enable(si_t *sih, osl_t *osh, bool enable) } /* initialize PMU chip controls and other chip level stuff */ -void si_pmu_chip_init(si_t *sih, osl_t *osh) +void si_pmu_chip_init(si_t *sih, struct osl_info *osh) { uint origidx; @@ -2547,7 +2548,7 @@ void si_pmu_chip_init(si_t *sih, osl_t *osh) } /* initialize PMU switch/regulators */ -void si_pmu_swreg_init(si_t *sih, osl_t *osh) +void si_pmu_swreg_init(si_t *sih, struct osl_info *osh) { ASSERT(sih->cccaps & CC_CAP_PMU); @@ -2591,7 +2592,7 @@ void si_pmu_radio_enable(si_t *sih, bool enable) /* Wait for a particular clock level to be on the backplane */ u32 -si_pmu_waitforclk_on_backplane(si_t *sih, osl_t *osh, u32 clk, +si_pmu_waitforclk_on_backplane(si_t *sih, struct osl_info *osh, u32 clk, u32 delay) { chipcregs_t *cc; @@ -2620,7 +2621,7 @@ si_pmu_waitforclk_on_backplane(si_t *sih, osl_t *osh, u32 clk, #define EXT_ILP_HZ 32768 -u32 si_pmu_measure_alpclk(si_t *sih, osl_t *osh) +u32 si_pmu_measure_alpclk(si_t *sih, struct osl_info *osh) { chipcregs_t *cc; uint origidx; diff --git a/drivers/staging/brcm80211/util/linux_osl.c b/drivers/staging/brcm80211/util/linux_osl.c index eb5d285efc0..e6e52f66078 100644 --- a/drivers/staging/brcm80211/util/linux_osl.c +++ b/drivers/staging/brcm80211/util/linux_osl.c @@ -36,14 +36,14 @@ /* Global ASSERT type flag */ u32 g_assert_type; -osl_t *osl_attach(void *pdev, uint bustype) +struct osl_info *osl_attach(void *pdev, uint bustype) { - osl_t *osh; + struct osl_info *osh; - osh = kmalloc(sizeof(osl_t), GFP_ATOMIC); + osh = kmalloc(sizeof(struct osl_info), GFP_ATOMIC); ASSERT(osh); - bzero(osh, sizeof(osl_t)); + bzero(osh, sizeof(struct osl_info)); osh->magic = OS_HANDLE_MAGIC; osh->pdev = pdev; @@ -70,7 +70,7 @@ osl_t *osl_attach(void *pdev, uint bustype) return osh; } -void osl_detach(osl_t *osh) +void osl_detach(struct osl_info *osh) { if (osh == NULL) return; @@ -79,7 +79,7 @@ void osl_detach(osl_t *osh) kfree(osh); } -void *BCMFASTPATH osl_pktget(osl_t *osh, uint len) +void *BCMFASTPATH osl_pktget(struct osl_info *osh, uint len) { struct sk_buff *skb; @@ -95,7 +95,7 @@ void *BCMFASTPATH osl_pktget(osl_t *osh, uint len) } /* Free the driver packet. Free the tag if present */ -void BCMFASTPATH osl_pktfree(osl_t *osh, void *p, bool send) +void BCMFASTPATH osl_pktfree(struct osl_info *osh, void *p, bool send) { struct sk_buff *skb, *nskb; int nest = 0; @@ -128,20 +128,21 @@ void BCMFASTPATH osl_pktfree(osl_t *osh, void *p, bool send) } } -u32 osl_pci_read_config(osl_t *osh, uint offset, uint size) +u32 osl_pci_read_config(struct osl_info *osh, uint offset, uint size) { uint val; pci_read_config_dword(osh->pdev, offset, &val); return val; } -void osl_pci_write_config(osl_t *osh, uint offset, uint size, uint val) +void osl_pci_write_config(struct osl_info *osh, uint offset, uint size, + uint val) { pci_write_config_dword(osh->pdev, offset, val); } /* return bus # for the pci device pointed by osh->pdev */ -uint osl_pci_bus(osl_t *osh) +uint osl_pci_bus(struct osl_info *osh) { ASSERT(osh && (osh->magic == OS_HANDLE_MAGIC) && osh->pdev); @@ -149,14 +150,14 @@ uint osl_pci_bus(osl_t *osh) } /* return slot # for the pci device pointed by osh->pdev */ -uint osl_pci_slot(osl_t *osh) +uint osl_pci_slot(struct osl_info *osh) { ASSERT(osh && (osh->magic == OS_HANDLE_MAGIC) && osh->pdev); return PCI_SLOT(((struct pci_dev *)osh->pdev)->devfn); } -void *osl_dma_alloc_consistent(osl_t *osh, uint size, u16 align_bits, +void *osl_dma_alloc_consistent(struct osl_info *osh, uint size, u16 align_bits, uint *alloced, unsigned long *pap) { ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); @@ -170,14 +171,16 @@ void *osl_dma_alloc_consistent(osl_t *osh, uint size, u16 align_bits, return pci_alloc_consistent(osh->pdev, size, (dma_addr_t *) pap); } -void osl_dma_free_consistent(osl_t *osh, void *va, uint size, unsigned long pa) +void osl_dma_free_consistent(struct osl_info *osh, void *va, uint size, + unsigned long pa) { ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); pci_free_consistent(osh->pdev, size, va, (dma_addr_t) pa); } -uint BCMFASTPATH osl_dma_map(osl_t *osh, void *va, uint size, int direction) +uint BCMFASTPATH osl_dma_map(struct osl_info *osh, void *va, uint size, + int direction) { int dir; @@ -186,7 +189,8 @@ uint BCMFASTPATH osl_dma_map(osl_t *osh, void *va, uint size, int direction) return pci_map_single(osh->pdev, va, size, dir); } -void BCMFASTPATH osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction) +void BCMFASTPATH osl_dma_unmap(struct osl_info *osh, uint pa, uint size, + int direction) { int dir; @@ -243,7 +247,7 @@ void osl_assert(char *exp, char *file, int line) #endif /* defined(BCMDBG_ASSERT) */ #if defined(BCMSDIO) && !defined(BRCM_FULLMAC) -u8 osl_readb(osl_t *osh, volatile u8 *r) +u8 osl_readb(struct osl_info *osh, volatile u8 *r) { osl_rreg_fn_t rreg = ((struct osl_pubinfo *) osh)->rreg_fn; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx; @@ -251,7 +255,7 @@ u8 osl_readb(osl_t *osh, volatile u8 *r) return (u8) ((rreg) (ctx, (void *)r, sizeof(u8))); } -u16 osl_readw(osl_t *osh, volatile u16 *r) +u16 osl_readw(struct osl_info *osh, volatile u16 *r) { osl_rreg_fn_t rreg = ((struct osl_pubinfo *) osh)->rreg_fn; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx; @@ -259,7 +263,7 @@ u16 osl_readw(osl_t *osh, volatile u16 *r) return (u16) ((rreg) (ctx, (void *)r, sizeof(u16))); } -u32 osl_readl(osl_t *osh, volatile u32 *r) +u32 osl_readl(struct osl_info *osh, volatile u32 *r) { osl_rreg_fn_t rreg = ((struct osl_pubinfo *) osh)->rreg_fn; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx; @@ -267,7 +271,7 @@ u32 osl_readl(osl_t *osh, volatile u32 *r) return (u32) ((rreg) (ctx, (void *)r, sizeof(u32))); } -void osl_writeb(osl_t *osh, volatile u8 *r, u8 v) +void osl_writeb(struct osl_info *osh, volatile u8 *r, u8 v) { osl_wreg_fn_t wreg = ((struct osl_pubinfo *) osh)->wreg_fn; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx; @@ -275,7 +279,7 @@ void osl_writeb(osl_t *osh, volatile u8 *r, u8 v) ((wreg) (ctx, (void *)r, v, sizeof(u8))); } -void osl_writew(osl_t *osh, volatile u16 *r, u16 v) +void osl_writew(struct osl_info *osh, volatile u16 *r, u16 v) { osl_wreg_fn_t wreg = ((struct osl_pubinfo *) osh)->wreg_fn; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx; @@ -283,7 +287,7 @@ void osl_writew(osl_t *osh, volatile u16 *r, u16 v) ((wreg) (ctx, (void *)r, v, sizeof(u16))); } -void osl_writel(osl_t *osh, volatile u32 *r, u32 v) +void osl_writel(struct osl_info *osh, volatile u32 *r, u32 v) { osl_wreg_fn_t wreg = ((struct osl_pubinfo *) osh)->wreg_fn; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx; diff --git a/drivers/staging/brcm80211/util/nicpci.c b/drivers/staging/brcm80211/util/nicpci.c index 169a4287ee6..8a7b71ee93d 100644 --- a/drivers/staging/brcm80211/util/nicpci.c +++ b/drivers/staging/brcm80211/util/nicpci.c @@ -35,7 +35,7 @@ typedef struct { } regs; /* Memory mapped register to the core */ si_t *sih; /* System interconnect handle */ - osl_t *osh; /* OSL handle */ + struct osl_info *osh; /* OSL handle */ u8 pciecap_lcreg_offset; /* PCIE capability LCreg offset in the config space */ bool pcie_pr42767; u8 pcie_polarity; @@ -107,7 +107,7 @@ static bool pcicore_pmecap(pcicore_info_t *pi); /* Initialize the PCI core. It's caller's responsibility to make sure that this is done * only once */ -void *pcicore_init(si_t *sih, osl_t *osh, void *regs) +void *pcicore_init(si_t *sih, struct osl_info *osh, void *regs) { pcicore_info_t *pi; @@ -149,8 +149,8 @@ void pcicore_deinit(void *pch) /* return cap_offset if requested capability exists in the PCI config space */ /* Note that it's caller's responsibility to make sure it's a pci bus */ u8 -pcicore_find_pci_capability(osl_t *osh, u8 req_cap_id, unsigned char *buf, - u32 *buflen) +pcicore_find_pci_capability(struct osl_info *osh, u8 req_cap_id, + unsigned char *buf, u32 *buflen) { u8 cap_id; u8 cap_ptr = 0; @@ -210,7 +210,8 @@ pcicore_find_pci_capability(osl_t *osh, u8 req_cap_id, unsigned char *buf, /* ***** Register Access API */ uint -pcie_readreg(osl_t *osh, sbpcieregs_t *pcieregs, uint addrtype, uint offset) +pcie_readreg(struct osl_info *osh, sbpcieregs_t *pcieregs, uint addrtype, + uint offset) { uint retval = 0xFFFFFFFF; @@ -236,8 +237,8 @@ pcie_readreg(osl_t *osh, sbpcieregs_t *pcieregs, uint addrtype, uint offset) } uint -pcie_writereg(osl_t *osh, sbpcieregs_t *pcieregs, uint addrtype, uint offset, - uint val) +pcie_writereg(struct osl_info *osh, sbpcieregs_t *pcieregs, uint addrtype, + uint offset, uint val) { ASSERT(pcieregs != NULL); @@ -393,7 +394,7 @@ static void pcie_extendL1timer(pcicore_info_t *pi, bool extend) { u32 w; si_t *sih = pi->sih; - osl_t *osh = pi->osh; + struct osl_info *osh = pi->osh; sbpcieregs_t *pcieregs = pi->regs.pcieregs; if (!PCIE_PUB(sih) || sih->buscorerev < 7) @@ -577,7 +578,7 @@ static void pcie_war_noplldown(pcicore_info_t *pi) static void pcie_war_pci_setup(pcicore_info_t *pi) { si_t *sih = pi->sih; - osl_t *osh = pi->osh; + struct osl_info *osh = pi->osh; sbpcieregs_t *pcieregs = pi->regs.pcieregs; u32 w; @@ -718,7 +719,7 @@ void pcicore_down(void *pch, int state) /* ***** Wake-on-wireless-LAN (WOWL) support functions ***** */ /* Just uses PCI config accesses to find out, when needed before sb_attach is done */ -bool pcicore_pmecap_fast(osl_t *osh) +bool pcicore_pmecap_fast(struct osl_info *osh) { u8 cap_ptr; u32 pmecap; @@ -842,7 +843,7 @@ pcicore_pciereg(void *pch, u32 offset, u32 mask, u32 val, uint type) u32 reg_val = 0; pcicore_info_t *pi = (pcicore_info_t *) pch; sbpcieregs_t *pcieregs = pi->regs.pcieregs; - osl_t *osh = pi->osh; + struct osl_info *osh = pi->osh; if (mask) { PCI_ERROR(("PCIEREG: 0x%x writeval 0x%x\n", offset, val)); diff --git a/drivers/staging/brcm80211/util/nvram/nvram_ro.c b/drivers/staging/brcm80211/util/nvram/nvram_ro.c index f80375cd680..2521c5b1919 100644 --- a/drivers/staging/brcm80211/util/nvram/nvram_ro.c +++ b/drivers/staging/brcm80211/util/nvram/nvram_ro.c @@ -49,7 +49,7 @@ static char *findvar(char *vars, char *lim, const char *name); /* copy flash to ram */ static void get_flash_nvram(si_t *sih, struct nvram_header *nvh) { - osl_t *osh; + struct osl_info *osh; uint nvs, bufsz; vars_t *new; diff --git a/drivers/staging/brcm80211/util/siutils.c b/drivers/staging/brcm80211/util/siutils.c index 3b99293307e..4d2df497772 100644 --- a/drivers/staging/brcm80211/util/siutils.c +++ b/drivers/staging/brcm80211/util/siutils.c @@ -57,7 +57,7 @@ #endif /* local prototypes */ -static si_info_t *si_doattach(si_info_t *sii, uint devid, osl_t *osh, +static si_info_t *si_doattach(si_info_t *sii, uint devid, struct osl_info *osh, void *regs, uint bustype, void *sdh, char **vars, uint *varsz); static bool si_buscore_prep(si_info_t *sii, uint bustype, uint devid, @@ -85,8 +85,8 @@ static u32 si_gpioreservation; * vars - pointer to a pointer area for "environment" variables * varsz - pointer to int to return the size of the vars */ -si_t *si_attach(uint devid, osl_t *osh, void *regs, uint bustype, void *sdh, - char **vars, uint *varsz) +si_t *si_attach(uint devid, struct osl_info *osh, void *regs, uint bustype, + void *sdh, char **vars, uint *varsz) { si_info_t *sii; @@ -368,7 +368,7 @@ static __used void si_nvram_process(si_info_t *sii, char *pvars) /* this is will make Sonics calls directly, since Sonics is no longer supported in the Si abstraction */ /* this has been customized for the bcm 4329 ONLY */ #ifdef BCMSDIO -static si_info_t *si_doattach(si_info_t *sii, uint devid, osl_t *osh, +static si_info_t *si_doattach(si_info_t *sii, uint devid, struct osl_info *osh, void *regs, uint bustype, void *sdh, char **vars, uint *varsz) { @@ -503,7 +503,7 @@ static si_info_t *si_doattach(si_info_t *sii, uint devid, osl_t *osh, } #else /* BCMSDIO */ -static si_info_t *si_doattach(si_info_t *sii, uint devid, osl_t *osh, +static si_info_t *si_doattach(si_info_t *sii, uint devid, struct osl_info *osh, void *regs, uint bustype, void *sdh, char **vars, uint *varsz) { |