#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/etherdevice.h>
#include <linux/crc32.h>
#include <linux/slab.h>
#include "u_ether.h"
#include "u_ether_configfs.h"
#include "u_eem.h"
#define EEM_HLEN …
struct f_eem { … };
struct in_context { … };
static inline struct f_eem *func_to_eem(struct usb_function *f)
{ … }
static struct usb_interface_descriptor eem_intf = …;
static struct usb_endpoint_descriptor eem_fs_in_desc = …;
static struct usb_endpoint_descriptor eem_fs_out_desc = …;
static struct usb_descriptor_header *eem_fs_function[] = …;
static struct usb_endpoint_descriptor eem_hs_in_desc = …;
static struct usb_endpoint_descriptor eem_hs_out_desc = …;
static struct usb_descriptor_header *eem_hs_function[] = …;
static struct usb_endpoint_descriptor eem_ss_in_desc = …;
static struct usb_endpoint_descriptor eem_ss_out_desc = …;
static struct usb_ss_ep_comp_descriptor eem_ss_bulk_comp_desc = …;
static struct usb_descriptor_header *eem_ss_function[] = …;
static struct usb_string eem_string_defs[] = …;
static struct usb_gadget_strings eem_string_table = …;
static struct usb_gadget_strings *eem_strings[] = …;
static int eem_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
{ … }
static int eem_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
{ … }
static void eem_disable(struct usb_function *f)
{ … }
static int eem_bind(struct usb_configuration *c, struct usb_function *f)
{ … }
static void eem_cmd_complete(struct usb_ep *ep, struct usb_request *req)
{ … }
static struct sk_buff *eem_wrap(struct gether *port, struct sk_buff *skb)
{ … }
static int eem_unwrap(struct gether *port,
struct sk_buff *skb,
struct sk_buff_head *list)
{ … }
static inline struct f_eem_opts *to_f_eem_opts(struct config_item *item)
{ … }
USB_ETHERNET_CONFIGFS_ITEM(…);
USB_ETHERNET_CONFIGFS_ITEM_ATTR_DEV_ADDR(…);
USB_ETHERNET_CONFIGFS_ITEM_ATTR_HOST_ADDR(…);
USB_ETHERNET_CONFIGFS_ITEM_ATTR_QMULT(…);
USB_ETHERNET_CONFIGFS_ITEM_ATTR_IFNAME(…);
static struct configfs_attribute *eem_attrs[] = …;
static const struct config_item_type eem_func_type = …;
static void eem_free_inst(struct usb_function_instance *f)
{ … }
static struct usb_function_instance *eem_alloc_inst(void)
{ … }
static void eem_free(struct usb_function *f)
{ … }
static void eem_unbind(struct usb_configuration *c, struct usb_function *f)
{ … }
static struct usb_function *eem_alloc(struct usb_function_instance *fi)
{ … }
DECLARE_USB_FUNCTION_INIT(eem, eem_alloc_inst, eem_alloc);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;