#define pr_fmt(fmt) …
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/firmware.h>
#include <linux/netdevice.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/olpc-ec.h>
#ifdef CONFIG_OLPC
#include <asm/olpc.h>
#endif
#define DRV_NAME …
#include "host.h"
#include "decl.h"
#include "defs.h"
#include "dev.h"
#include "cmd.h"
#include "if_usb.h"
#define INSANEDEBUG …
#define lbs_deb_usb2(...) …
#define MESSAGE_HEADER_LEN …
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
enum { … };
static const struct lbs_fw_table fw_table[] = …;
static const struct usb_device_id if_usb_table[] = …;
MODULE_DEVICE_TABLE(usb, if_usb_table);
static void if_usb_receive(struct urb *urb);
static void if_usb_receive_fwload(struct urb *urb);
static void if_usb_prog_firmware(struct lbs_private *priv, int ret,
const struct firmware *fw,
const struct firmware *unused);
static int if_usb_host_to_card(struct lbs_private *priv, uint8_t type,
uint8_t *payload, uint16_t nb);
static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload,
uint16_t nb);
static void if_usb_free(struct if_usb_card *cardp);
static int if_usb_submit_rx_urb(struct if_usb_card *cardp);
static int if_usb_reset_device(struct if_usb_card *cardp);
static void if_usb_write_bulk_callback(struct urb *urb)
{ … }
static void if_usb_free(struct if_usb_card *cardp)
{ … }
static void if_usb_setup_firmware(struct lbs_private *priv)
{ … }
static void if_usb_fw_timeo(struct timer_list *t)
{ … }
#ifdef CONFIG_OLPC
static void if_usb_reset_olpc_card(struct lbs_private *priv)
{
printk(KERN_CRIT "Resetting OLPC wireless via EC...\n");
olpc_ec_cmd(0x25, NULL, 0, NULL, 0);
}
#endif
static int if_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static void if_usb_disconnect(struct usb_interface *intf)
{ … }
static int if_usb_send_fw_pkt(struct if_usb_card *cardp)
{ … }
static int if_usb_reset_device(struct if_usb_card *cardp)
{ … }
static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb)
{ … }
static int __if_usb_submit_rx_urb(struct if_usb_card *cardp,
void (*callbackfn)(struct urb *urb))
{ … }
static int if_usb_submit_rx_urb_fwload(struct if_usb_card *cardp)
{ … }
static int if_usb_submit_rx_urb(struct if_usb_card *cardp)
{ … }
static void if_usb_receive_fwload(struct urb *urb)
{ … }
#define MRVDRV_MIN_PKT_LEN …
static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb,
struct if_usb_card *cardp,
struct lbs_private *priv)
{ … }
static inline void process_cmdrequest(int recvlength, uint8_t *recvbuff,
struct sk_buff *skb,
struct if_usb_card *cardp,
struct lbs_private *priv)
{ … }
static void if_usb_receive(struct urb *urb)
{ … }
static int if_usb_host_to_card(struct lbs_private *priv, uint8_t type,
uint8_t *payload, uint16_t nb)
{ … }
static int if_usb_issue_boot_command(struct if_usb_card *cardp, int ivalue)
{ … }
static int check_fwfile_format(const uint8_t *data, uint32_t totlen)
{ … }
static void if_usb_prog_firmware(struct lbs_private *priv, int ret,
const struct firmware *fw,
const struct firmware *unused)
{ … }
#ifdef CONFIG_PM
static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
{ … }
static int if_usb_resume(struct usb_interface *intf)
{ … }
#else
#define if_usb_suspend …
#define if_usb_resume …
#endif
static struct usb_driver if_usb_driver = …;
module_usb_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;