#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/etherdevice.h>
#include <linux/atomic.h>
#include "u_ether.h"
#include "u_ether_configfs.h"
#include "u_rndis.h"
#include "rndis.h"
#include "configfs.h"
struct f_rndis { … };
static inline struct f_rndis *func_to_rndis(struct usb_function *f)
{ … }
#define RNDIS_STATUS_INTERVAL_MS …
#define STATUS_BYTECOUNT …
static struct usb_interface_descriptor rndis_control_intf = …;
static struct usb_cdc_header_desc header_desc = …;
static struct usb_cdc_call_mgmt_descriptor call_mgmt_descriptor = …;
static struct usb_cdc_acm_descriptor rndis_acm_descriptor = …;
static struct usb_cdc_union_desc rndis_union_desc = …;
static struct usb_interface_descriptor rndis_data_intf = …;
static struct usb_interface_assoc_descriptor
rndis_iad_descriptor = …;
static struct usb_endpoint_descriptor fs_notify_desc = …;
static struct usb_endpoint_descriptor fs_in_desc = …;
static struct usb_endpoint_descriptor fs_out_desc = …;
static struct usb_descriptor_header *eth_fs_function[] = …;
static struct usb_endpoint_descriptor hs_notify_desc = …;
static struct usb_endpoint_descriptor hs_in_desc = …;
static struct usb_endpoint_descriptor hs_out_desc = …;
static struct usb_descriptor_header *eth_hs_function[] = …;
static struct usb_endpoint_descriptor ss_notify_desc = …;
static struct usb_ss_ep_comp_descriptor ss_intr_comp_desc = …;
static struct usb_endpoint_descriptor ss_in_desc = …;
static struct usb_endpoint_descriptor ss_out_desc = …;
static struct usb_ss_ep_comp_descriptor ss_bulk_comp_desc = …;
static struct usb_descriptor_header *eth_ss_function[] = …;
static struct usb_string rndis_string_defs[] = …;
static struct usb_gadget_strings rndis_string_table = …;
static struct usb_gadget_strings *rndis_strings[] = …;
static struct sk_buff *rndis_add_header(struct gether *port,
struct sk_buff *skb)
{ … }
static void rndis_response_available(void *_rndis)
{ … }
static void rndis_response_complete(struct usb_ep *ep, struct usb_request *req)
{ … }
static void rndis_command_complete(struct usb_ep *ep, struct usb_request *req)
{ … }
static int
rndis_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
{ … }
static int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
{ … }
static void rndis_disable(struct usb_function *f)
{ … }
static void rndis_open(struct gether *geth)
{ … }
static void rndis_close(struct gether *geth)
{ … }
static inline bool can_support_rndis(struct usb_configuration *c)
{ … }
static int
rndis_bind(struct usb_configuration *c, struct usb_function *f)
{ … }
void rndis_borrow_net(struct usb_function_instance *f, struct net_device *net)
{ … }
EXPORT_SYMBOL_GPL(…);
static inline struct f_rndis_opts *to_f_rndis_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(…);
USB_ETHER_CONFIGFS_ITEM_ATTR_U8_RW(…);
USB_ETHER_CONFIGFS_ITEM_ATTR_U8_RW(…);
USB_ETHER_CONFIGFS_ITEM_ATTR_U8_RW(…);
static struct configfs_attribute *rndis_attrs[] = …;
static const struct config_item_type rndis_func_type = …;
static void rndis_free_inst(struct usb_function_instance *f)
{ … }
static struct usb_function_instance *rndis_alloc_inst(void)
{ … }
static void rndis_free(struct usb_function *f)
{ … }
static void rndis_unbind(struct usb_configuration *c, struct usb_function *f)
{ … }
static struct usb_function *rndis_alloc(struct usb_function_instance *fi)
{ … }
DECLARE_USB_FUNCTION_INIT(rndis, rndis_alloc_inst, rndis_alloc);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;