#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/firmware.h>
#include <linux/usb.h>
#include <linux/vmalloc.h>
#include <brcmu_utils.h>
#include <brcm_hw_ids.h>
#include <brcmu_wifi.h>
#include "bus.h"
#include "debug.h"
#include "firmware.h"
#include "usb.h"
#include "core.h"
#include "common.h"
#include "bcdc.h"
#define IOCTL_RESP_TIMEOUT …
#define BRCMF_USB_RESET_GETVER_SPINWAIT …
#define BRCMF_USB_RESET_GETVER_LOOP_CNT …
#define BRCMF_POSTBOOT_ID …
#define BRCMF_USB_NRXQ …
#define BRCMF_USB_NTXQ …
#define BRCMF_USB_CBCTL_WRITE …
#define BRCMF_USB_CBCTL_READ …
#define BRCMF_USB_MAX_PKT_SIZE …
BRCMF_FW_DEF(…) …;
BRCMF_FW_DEF(…) …;
BRCMF_FW_DEF(…) …;
BRCMF_FW_DEF(…) …;
BRCMF_FW_DEF(…) …;
static const struct brcmf_firmware_mapping brcmf_usb_fwnames[] = …;
#define TRX_MAGIC …
#define TRX_MAX_OFFSET …
#define TRX_UNCOMP_IMAGE …
#define TRX_RDL_CHUNK …
#define TRX_OFFSETS_DLFWLEN_IDX …
#define DL_GETSTATE …
#define DL_CHECK_CRC …
#define DL_GO …
#define DL_START …
#define DL_REBOOT …
#define DL_GETVER …
#define DL_GO_PROTECTED …
#define DL_EXEC …
#define DL_RESETCFG …
#define DL_DEFER_RESP_OK …
#define DL_WAITING …
#define DL_READY …
#define DL_BAD_HDR …
#define DL_BAD_CRC …
#define DL_RUNNABLE …
#define DL_START_FAIL …
#define DL_NVRAM_TOOBIG …
#define DL_IMAGE_TOOBIG …
struct trx_header_le { … };
struct rdl_state_le { … };
struct bootrom_id_le { … };
struct brcmf_usbdev_info { … };
static void brcmf_usb_rx_refill(struct brcmf_usbdev_info *devinfo,
struct brcmf_usbreq *req);
static struct brcmf_usbdev *brcmf_usb_get_buspub(struct device *dev)
{ … }
static struct brcmf_usbdev_info *brcmf_usb_get_businfo(struct device *dev)
{ … }
static int brcmf_usb_ioctl_resp_wait(struct brcmf_usbdev_info *devinfo)
{ … }
static void brcmf_usb_ioctl_resp_wake(struct brcmf_usbdev_info *devinfo)
{ … }
static void
brcmf_usb_ctl_complete(struct brcmf_usbdev_info *devinfo, int type, int status)
{ … }
static void
brcmf_usb_ctlread_complete(struct urb *urb)
{ … }
static void
brcmf_usb_ctlwrite_complete(struct urb *urb)
{ … }
static int
brcmf_usb_send_ctl(struct brcmf_usbdev_info *devinfo, u8 *buf, int len)
{ … }
static int
brcmf_usb_recv_ctl(struct brcmf_usbdev_info *devinfo, u8 *buf, int len)
{ … }
static int brcmf_usb_tx_ctlpkt(struct device *dev, u8 *buf, u32 len)
{ … }
static int brcmf_usb_rx_ctlpkt(struct device *dev, u8 *buf, u32 len)
{ … }
static struct brcmf_usbreq *brcmf_usb_deq(struct brcmf_usbdev_info *devinfo,
struct list_head *q, int *counter)
{ … }
static void brcmf_usb_enq(struct brcmf_usbdev_info *devinfo,
struct list_head *q, struct brcmf_usbreq *req,
int *counter)
{ … }
static struct brcmf_usbreq *
brcmf_usbdev_qinit(struct list_head *q, int qsize)
{ … }
static void brcmf_usb_free_q(struct list_head *q)
{ … }
static void brcmf_usb_del_fromq(struct brcmf_usbdev_info *devinfo,
struct brcmf_usbreq *req)
{ … }
static void brcmf_usb_tx_complete(struct urb *urb)
{ … }
static void brcmf_usb_rx_complete(struct urb *urb)
{ … }
static void brcmf_usb_rx_refill(struct brcmf_usbdev_info *devinfo,
struct brcmf_usbreq *req)
{ … }
static void brcmf_usb_rx_fill_all(struct brcmf_usbdev_info *devinfo)
{ … }
static void
brcmf_usb_state_change(struct brcmf_usbdev_info *devinfo, int state)
{ … }
static int brcmf_usb_tx(struct device *dev, struct sk_buff *skb)
{ … }
static int brcmf_usb_up(struct device *dev)
{ … }
static void brcmf_cancel_all_urbs(struct brcmf_usbdev_info *devinfo)
{ … }
static void brcmf_usb_down(struct device *dev)
{ … }
static void
brcmf_usb_sync_complete(struct urb *urb)
{ … }
static int brcmf_usb_dl_cmd(struct brcmf_usbdev_info *devinfo, u8 cmd,
void *buffer, int buflen)
{ … }
static bool
brcmf_usb_dlneeded(struct brcmf_usbdev_info *devinfo)
{ … }
static int
brcmf_usb_resetcfg(struct brcmf_usbdev_info *devinfo)
{ … }
static int
brcmf_usb_dl_send_bulk(struct brcmf_usbdev_info *devinfo, void *buffer, int len)
{ … }
static int
brcmf_usb_dl_writeimage(struct brcmf_usbdev_info *devinfo, u8 *fw, int fwlen)
{ … }
static int brcmf_usb_dlstart(struct brcmf_usbdev_info *devinfo, u8 *fw, int len)
{ … }
static int brcmf_usb_dlrun(struct brcmf_usbdev_info *devinfo)
{ … }
static int
brcmf_usb_fw_download(struct brcmf_usbdev_info *devinfo)
{ … }
static void brcmf_usb_detach(struct brcmf_usbdev_info *devinfo)
{ … }
static int check_file(const u8 *headers)
{ … }
static
struct brcmf_usbdev *brcmf_usb_attach(struct brcmf_usbdev_info *devinfo,
int nrxq, int ntxq)
{ … }
static int brcmf_usb_get_blob(struct device *dev, const struct firmware **fw,
enum brcmf_blob_type type)
{ … }
static const struct brcmf_bus_ops brcmf_usb_bus_ops = …;
#define BRCMF_USB_FW_CODE …
static void brcmf_usb_probe_phase2(struct device *dev, int ret,
struct brcmf_fw_request *fwreq)
{ … }
static struct brcmf_fw_request *
brcmf_usb_prepare_fw_request(struct brcmf_usbdev_info *devinfo)
{ … }
static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo,
enum brcmf_fwvendor fwvid)
{ … }
static void
brcmf_usb_disconnect_cb(struct brcmf_usbdev_info *devinfo)
{ … }
static const struct usb_device_id brcmf_usb_devid_table[];
static int
brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
{ … }
static void
brcmf_usb_disconnect(struct usb_interface *intf)
{ … }
static int brcmf_usb_suspend(struct usb_interface *intf, pm_message_t state)
{ … }
static int brcmf_usb_resume(struct usb_interface *intf)
{ … }
static int brcmf_usb_reset_resume(struct usb_interface *intf)
{ … }
#define BRCMF_USB_DEVICE(dev_id) …
#define LINKSYS_USB_DEVICE(dev_id) …
#define CYPRESS_USB_DEVICE(dev_id) …
static const struct usb_device_id brcmf_usb_devid_table[] = …;
MODULE_DEVICE_TABLE(usb, brcmf_usb_devid_table);
static struct usb_driver brcmf_usbdrvr = …;
static int brcmf_usb_reset_device(struct device *dev, void *notused)
{ … }
void brcmf_usb_exit(void)
{ … }
int brcmf_usb_register(void)
{ … }