#define DRV_NAME …
#define pr_fmt(fmt) …
#include "libertas_tf.h"
#include "if_usb.h"
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/firmware.h>
#include <linux/netdevice.h>
#include <linux/slab.h>
#include <linux/usb.h>
#define INSANEDEBUG …
#define lbtf_deb_usb2(...) …
#define MESSAGE_HEADER_LEN …
static char *lbtf_fw_name = …;
module_param_named(fw_name, lbtf_fw_name, charp, 0644);
MODULE_FIRMWARE(…) …;
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 int if_usb_prog_firmware(struct lbtf_private *priv);
static int if_usb_host_to_card(struct lbtf_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, u8 data);
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 lbtf_private *priv);
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 lbtf_private *priv)
{ … }
static void if_usb_fw_timeo(struct timer_list *t)
{ … }
static const struct lbtf_ops if_usb_ops = …;
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 lbtf_private *priv)
{ … }
static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload,
uint16_t nb, u8 data)
{ … }
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 lbtf_private *priv)
{ … }
static inline void process_cmdrequest(int recvlength, uint8_t *recvbuff,
struct sk_buff *skb,
struct if_usb_card *cardp,
struct lbtf_private *priv)
{ … }
static void if_usb_receive(struct urb *urb)
{ … }
static int if_usb_host_to_card(struct lbtf_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 u8 *data, u32 totlen)
{ … }
static int if_usb_prog_firmware(struct lbtf_private *priv)
{ … }
#define if_usb_suspend …
#define if_usb_resume …
static struct usb_driver if_usb_driver = …;
module_usb_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;