USB: include/usb/*.h checkpatch cleanup
Lots of minor formatting cleanups in includes/usb/ to make checkpatch happier. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -477,7 +477,7 @@ static inline int usb_endpoint_xfer_isoc(
|
|||||||
static inline int usb_endpoint_is_bulk_in(
|
static inline int usb_endpoint_is_bulk_in(
|
||||||
const struct usb_endpoint_descriptor *epd)
|
const struct usb_endpoint_descriptor *epd)
|
||||||
{
|
{
|
||||||
return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd));
|
return usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -490,7 +490,7 @@ static inline int usb_endpoint_is_bulk_in(
|
|||||||
static inline int usb_endpoint_is_bulk_out(
|
static inline int usb_endpoint_is_bulk_out(
|
||||||
const struct usb_endpoint_descriptor *epd)
|
const struct usb_endpoint_descriptor *epd)
|
||||||
{
|
{
|
||||||
return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd));
|
return usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -503,7 +503,7 @@ static inline int usb_endpoint_is_bulk_out(
|
|||||||
static inline int usb_endpoint_is_int_in(
|
static inline int usb_endpoint_is_int_in(
|
||||||
const struct usb_endpoint_descriptor *epd)
|
const struct usb_endpoint_descriptor *epd)
|
||||||
{
|
{
|
||||||
return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd));
|
return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -516,7 +516,7 @@ static inline int usb_endpoint_is_int_in(
|
|||||||
static inline int usb_endpoint_is_int_out(
|
static inline int usb_endpoint_is_int_out(
|
||||||
const struct usb_endpoint_descriptor *epd)
|
const struct usb_endpoint_descriptor *epd)
|
||||||
{
|
{
|
||||||
return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd));
|
return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -529,7 +529,7 @@ static inline int usb_endpoint_is_int_out(
|
|||||||
static inline int usb_endpoint_is_isoc_in(
|
static inline int usb_endpoint_is_isoc_in(
|
||||||
const struct usb_endpoint_descriptor *epd)
|
const struct usb_endpoint_descriptor *epd)
|
||||||
{
|
{
|
||||||
return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd));
|
return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -542,7 +542,7 @@ static inline int usb_endpoint_is_isoc_in(
|
|||||||
static inline int usb_endpoint_is_isoc_out(
|
static inline int usb_endpoint_is_isoc_out(
|
||||||
const struct usb_endpoint_descriptor *epd)
|
const struct usb_endpoint_descriptor *epd)
|
||||||
{
|
{
|
||||||
return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd));
|
return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------*/
|
||||||
|
@@ -45,7 +45,7 @@ struct ehci_caps {
|
|||||||
#define HCC_CANPARK(p) ((p)&(1 << 2)) /* true: can park on async qh */
|
#define HCC_CANPARK(p) ((p)&(1 << 2)) /* true: can park on async qh */
|
||||||
#define HCC_PGM_FRAMELISTLEN(p) ((p)&(1 << 1)) /* true: periodic_size changes*/
|
#define HCC_PGM_FRAMELISTLEN(p) ((p)&(1 << 1)) /* true: periodic_size changes*/
|
||||||
#define HCC_64BIT_ADDR(p) ((p)&(1)) /* true: can use 64-bit addr */
|
#define HCC_64BIT_ADDR(p) ((p)&(1)) /* true: can use 64-bit addr */
|
||||||
u8 portroute [8]; /* nibbles for routing - offset 0xC */
|
u8 portroute[8]; /* nibbles for routing - offset 0xC */
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
|
||||||
@@ -92,14 +92,14 @@ struct ehci_regs {
|
|||||||
/* ASYNCLISTADDR: offset 0x18 */
|
/* ASYNCLISTADDR: offset 0x18 */
|
||||||
u32 async_next; /* address of next async queue head */
|
u32 async_next; /* address of next async queue head */
|
||||||
|
|
||||||
u32 reserved [9];
|
u32 reserved[9];
|
||||||
|
|
||||||
/* CONFIGFLAG: offset 0x40 */
|
/* CONFIGFLAG: offset 0x40 */
|
||||||
u32 configured_flag;
|
u32 configured_flag;
|
||||||
#define FLAG_CF (1<<0) /* true: we'll support "high speed" */
|
#define FLAG_CF (1<<0) /* true: we'll support "high speed" */
|
||||||
|
|
||||||
/* PORTSC: offset 0x44 */
|
/* PORTSC: offset 0x44 */
|
||||||
u32 port_status [0]; /* up to N_PORTS */
|
u32 port_status[0]; /* up to N_PORTS */
|
||||||
/* 31:23 reserved */
|
/* 31:23 reserved */
|
||||||
#define PORT_WKOC_E (1<<22) /* wake on overcurrent (enable) */
|
#define PORT_WKOC_E (1<<22) /* wake on overcurrent (enable) */
|
||||||
#define PORT_WKDISC_E (1<<21) /* wake on disconnect (enable) */
|
#define PORT_WKDISC_E (1<<21) /* wake on disconnect (enable) */
|
||||||
|
@@ -500,7 +500,7 @@ static inline struct usb_gadget *dev_to_usb_gadget(struct device *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* iterates the non-control endpoints; 'tmp' is a struct usb_ep pointer */
|
/* iterates the non-control endpoints; 'tmp' is a struct usb_ep pointer */
|
||||||
#define gadget_for_each_ep(tmp,gadget) \
|
#define gadget_for_each_ep(tmp, gadget) \
|
||||||
list_for_each_entry(tmp, &(gadget)->ep_list, ep_list)
|
list_for_each_entry(tmp, &(gadget)->ep_list, ep_list)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
#define __LINUX_USB_GADGETFS_H
|
#define __LINUX_USB_GADGETFS_H
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <asm/ioctl.h>
|
#include <linux/ioctl.h>
|
||||||
|
|
||||||
#include <linux/usb/ch9.h>
|
#include <linux/usb/ch9.h>
|
||||||
|
|
||||||
|
@@ -126,7 +126,7 @@ struct usb_hcd {
|
|||||||
|
|
||||||
|
|
||||||
#define HCD_BUFFER_POOLS 4
|
#define HCD_BUFFER_POOLS 4
|
||||||
struct dma_pool *pool [HCD_BUFFER_POOLS];
|
struct dma_pool *pool[HCD_BUFFER_POOLS];
|
||||||
|
|
||||||
int state;
|
int state;
|
||||||
# define __ACTIVE 0x01
|
# define __ACTIVE 0x01
|
||||||
@@ -265,16 +265,18 @@ struct hc_driver {
|
|||||||
/* Note that add_endpoint() can only be called once per endpoint before
|
/* Note that add_endpoint() can only be called once per endpoint before
|
||||||
* check_bandwidth() or reset_bandwidth() must be called.
|
* check_bandwidth() or reset_bandwidth() must be called.
|
||||||
* drop_endpoint() can only be called once per endpoint also.
|
* drop_endpoint() can only be called once per endpoint also.
|
||||||
* A call to xhci_drop_endpoint() followed by a call to xhci_add_endpoint() will
|
* A call to xhci_drop_endpoint() followed by a call to
|
||||||
* add the endpoint to the schedule with possibly new parameters denoted by a
|
* xhci_add_endpoint() will add the endpoint to the schedule with
|
||||||
* different endpoint descriptor in usb_host_endpoint.
|
* possibly new parameters denoted by a different endpoint descriptor
|
||||||
* A call to xhci_add_endpoint() followed by a call to xhci_drop_endpoint() is
|
* in usb_host_endpoint. A call to xhci_add_endpoint() followed by a
|
||||||
* not allowed.
|
* call to xhci_drop_endpoint() is not allowed.
|
||||||
*/
|
*/
|
||||||
/* Allocate endpoint resources and add them to a new schedule */
|
/* Allocate endpoint resources and add them to a new schedule */
|
||||||
int (*add_endpoint)(struct usb_hcd *, struct usb_device *, struct usb_host_endpoint *);
|
int (*add_endpoint)(struct usb_hcd *, struct usb_device *,
|
||||||
|
struct usb_host_endpoint *);
|
||||||
/* Drop an endpoint from a new schedule */
|
/* Drop an endpoint from a new schedule */
|
||||||
int (*drop_endpoint)(struct usb_hcd *, struct usb_device *, struct usb_host_endpoint *);
|
int (*drop_endpoint)(struct usb_hcd *, struct usb_device *,
|
||||||
|
struct usb_host_endpoint *);
|
||||||
/* Check that a new hardware configuration, set using
|
/* Check that a new hardware configuration, set using
|
||||||
* endpoint_enable and endpoint_disable, does not exceed bus
|
* endpoint_enable and endpoint_disable, does not exceed bus
|
||||||
* bandwidth. This must be called before any set configuration
|
* bandwidth. This must be called before any set configuration
|
||||||
@@ -484,8 +486,8 @@ extern void usb_ep0_reinit(struct usb_device *);
|
|||||||
#define HS_NSECS_ISO(bytes) (((38 * 8 * 2083) \
|
#define HS_NSECS_ISO(bytes) (((38 * 8 * 2083) \
|
||||||
+ (2083UL * (3 + BitTime(bytes))))/1000 \
|
+ (2083UL * (3 + BitTime(bytes))))/1000 \
|
||||||
+ USB2_HOST_DELAY)
|
+ USB2_HOST_DELAY)
|
||||||
#define HS_USECS(bytes) NS_TO_US (HS_NSECS(bytes))
|
#define HS_USECS(bytes) NS_TO_US(HS_NSECS(bytes))
|
||||||
#define HS_USECS_ISO(bytes) NS_TO_US (HS_NSECS_ISO(bytes))
|
#define HS_USECS_ISO(bytes) NS_TO_US(HS_NSECS_ISO(bytes))
|
||||||
|
|
||||||
extern long usb_calc_bus_time(int speed, int is_input,
|
extern long usb_calc_bus_time(int speed, int is_input,
|
||||||
int isoc, int bytecount);
|
int isoc, int bytecount);
|
||||||
|
@@ -353,7 +353,7 @@ struct net2280_dma_regs { /* [11.7] */
|
|||||||
#define DMA_TRANSACTION_DONE_INTERRUPT 24
|
#define DMA_TRANSACTION_DONE_INTERRUPT 24
|
||||||
#define DMA_ABORT 1
|
#define DMA_ABORT 1
|
||||||
#define DMA_START 0
|
#define DMA_START 0
|
||||||
u32 _unused0 [2];
|
u32 _unused0[2];
|
||||||
/* offset 0x0190, 0x01b0, 0x01d0, 0x01f0, */
|
/* offset 0x0190, 0x01b0, 0x01d0, 0x01f0, */
|
||||||
u32 dmacount;
|
u32 dmacount;
|
||||||
#define VALID_BIT 31
|
#define VALID_BIT 31
|
||||||
@@ -374,7 +374,7 @@ struct net2280_dep_regs { /* [11.8] */
|
|||||||
u32 dep_cfg;
|
u32 dep_cfg;
|
||||||
/* offset 0x0204, 0x0214, 0x224, 0x234, 0x244 */
|
/* offset 0x0204, 0x0214, 0x224, 0x234, 0x244 */
|
||||||
u32 dep_rsp;
|
u32 dep_rsp;
|
||||||
u32 _unused [2];
|
u32 _unused[2];
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
/* configurable endpoint registers, BAR0 + 0x0300 ... array of seven structs
|
/* configurable endpoint registers, BAR0 + 0x0300 ... array of seven structs
|
||||||
@@ -437,7 +437,7 @@ struct net2280_ep_regs { /* [11.9] */
|
|||||||
/* offset 0x0310, 0x0330, 0x0350, 0x0370, 0x0390, 0x03b0, 0x03d0 */
|
/* offset 0x0310, 0x0330, 0x0350, 0x0370, 0x0390, 0x03b0, 0x03d0 */
|
||||||
u32 ep_avail;
|
u32 ep_avail;
|
||||||
u32 ep_data;
|
u32 ep_data;
|
||||||
u32 _unused0 [2];
|
u32 _unused0[2];
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
#endif /* __LINUX_USB_NET2280_H */
|
#endif /* __LINUX_USB_NET2280_H */
|
||||||
|
@@ -34,10 +34,10 @@
|
|||||||
struct rndis_msg_hdr {
|
struct rndis_msg_hdr {
|
||||||
__le32 msg_type; /* RNDIS_MSG_* */
|
__le32 msg_type; /* RNDIS_MSG_* */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
// followed by data that varies between messages
|
/* followed by data that varies between messages */
|
||||||
__le32 request_id;
|
__le32 request_id;
|
||||||
__le32 status;
|
__le32 status;
|
||||||
// ... and more
|
/* ... and more */
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
/* MS-Windows uses this strange size, but RNDIS spec says 1024 minimum */
|
/* MS-Windows uses this strange size, but RNDIS spec says 1024 minimum */
|
||||||
@@ -92,67 +92,67 @@ struct rndis_msg_hdr {
|
|||||||
|
|
||||||
struct rndis_data_hdr {
|
struct rndis_data_hdr {
|
||||||
__le32 msg_type; /* RNDIS_MSG_PACKET */
|
__le32 msg_type; /* RNDIS_MSG_PACKET */
|
||||||
__le32 msg_len; // rndis_data_hdr + data_len + pad
|
__le32 msg_len; /* rndis_data_hdr + data_len + pad */
|
||||||
__le32 data_offset; // 36 -- right after header
|
__le32 data_offset; /* 36 -- right after header */
|
||||||
__le32 data_len; // ... real packet size
|
__le32 data_len; /* ... real packet size */
|
||||||
|
|
||||||
__le32 oob_data_offset; // zero
|
__le32 oob_data_offset; /* zero */
|
||||||
__le32 oob_data_len; // zero
|
__le32 oob_data_len; /* zero */
|
||||||
__le32 num_oob; // zero
|
__le32 num_oob; /* zero */
|
||||||
__le32 packet_data_offset; // zero
|
__le32 packet_data_offset; /* zero */
|
||||||
|
|
||||||
__le32 packet_data_len; // zero
|
__le32 packet_data_len; /* zero */
|
||||||
__le32 vc_handle; // zero
|
__le32 vc_handle; /* zero */
|
||||||
__le32 reserved; // zero
|
__le32 reserved; /* zero */
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_init { /* OUT */
|
struct rndis_init { /* OUT */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_INIT */
|
__le32 msg_type; /* RNDIS_MSG_INIT */
|
||||||
__le32 msg_len; // 24
|
__le32 msg_len; /* 24 */
|
||||||
__le32 request_id;
|
__le32 request_id;
|
||||||
__le32 major_version; // of rndis (1.0)
|
__le32 major_version; /* of rndis (1.0) */
|
||||||
__le32 minor_version;
|
__le32 minor_version;
|
||||||
__le32 max_transfer_size;
|
__le32 max_transfer_size;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_init_c { /* IN */
|
struct rndis_init_c { /* IN */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_INIT_C */
|
__le32 msg_type; /* RNDIS_MSG_INIT_C */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
__le32 request_id;
|
__le32 request_id;
|
||||||
__le32 status;
|
__le32 status;
|
||||||
__le32 major_version; // of rndis (1.0)
|
__le32 major_version; /* of rndis (1.0) */
|
||||||
__le32 minor_version;
|
__le32 minor_version;
|
||||||
__le32 device_flags;
|
__le32 device_flags;
|
||||||
__le32 medium; // zero == 802.3
|
__le32 medium; /* zero == 802.3 */
|
||||||
__le32 max_packets_per_message;
|
__le32 max_packets_per_message;
|
||||||
__le32 max_transfer_size;
|
__le32 max_transfer_size;
|
||||||
__le32 packet_alignment; // max 7; (1<<n) bytes
|
__le32 packet_alignment; /* max 7; (1<<n) bytes */
|
||||||
__le32 af_list_offset; // zero
|
__le32 af_list_offset; /* zero */
|
||||||
__le32 af_list_size; // zero
|
__le32 af_list_size; /* zero */
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_halt { /* OUT (no reply) */
|
struct rndis_halt { /* OUT (no reply) */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_HALT */
|
__le32 msg_type; /* RNDIS_MSG_HALT */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
__le32 request_id;
|
__le32 request_id;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_query { /* OUT */
|
struct rndis_query { /* OUT */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_QUERY */
|
__le32 msg_type; /* RNDIS_MSG_QUERY */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
__le32 request_id;
|
__le32 request_id;
|
||||||
__le32 oid;
|
__le32 oid;
|
||||||
__le32 len;
|
__le32 len;
|
||||||
__le32 offset;
|
__le32 offset;
|
||||||
/*?*/ __le32 handle; // zero
|
/*?*/ __le32 handle; /* zero */
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_query_c { /* IN */
|
struct rndis_query_c { /* IN */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_QUERY_C */
|
__le32 msg_type; /* RNDIS_MSG_QUERY_C */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
__le32 request_id;
|
__le32 request_id;
|
||||||
@@ -162,18 +162,18 @@ struct rndis_query_c { /* IN */
|
|||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_set { /* OUT */
|
struct rndis_set { /* OUT */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_SET */
|
__le32 msg_type; /* RNDIS_MSG_SET */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
__le32 request_id;
|
__le32 request_id;
|
||||||
__le32 oid;
|
__le32 oid;
|
||||||
__le32 len;
|
__le32 len;
|
||||||
__le32 offset;
|
__le32 offset;
|
||||||
/*?*/ __le32 handle; // zero
|
/*?*/ __le32 handle; /* zero */
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_set_c { /* IN */
|
struct rndis_set_c { /* IN */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_SET_C */
|
__le32 msg_type; /* RNDIS_MSG_SET_C */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
__le32 request_id;
|
__le32 request_id;
|
||||||
@@ -181,14 +181,14 @@ struct rndis_set_c { /* IN */
|
|||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_reset { /* IN */
|
struct rndis_reset { /* IN */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_RESET */
|
__le32 msg_type; /* RNDIS_MSG_RESET */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
__le32 reserved;
|
__le32 reserved;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_reset_c { /* OUT */
|
struct rndis_reset_c { /* OUT */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_RESET_C */
|
__le32 msg_type; /* RNDIS_MSG_RESET_C */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
__le32 status;
|
__le32 status;
|
||||||
@@ -196,7 +196,7 @@ struct rndis_reset_c { /* OUT */
|
|||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_indicate { /* IN (unrequested) */
|
struct rndis_indicate { /* IN (unrequested) */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_INDICATE */
|
__le32 msg_type; /* RNDIS_MSG_INDICATE */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
__le32 status;
|
__le32 status;
|
||||||
@@ -208,14 +208,14 @@ struct rndis_indicate { /* IN (unrequested) */
|
|||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_keepalive { /* OUT (optionally IN) */
|
struct rndis_keepalive { /* OUT (optionally IN) */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_KEEPALIVE */
|
__le32 msg_type; /* RNDIS_MSG_KEEPALIVE */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
__le32 request_id;
|
__le32 request_id;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct rndis_keepalive_c { /* IN (optionally OUT) */
|
struct rndis_keepalive_c { /* IN (optionally OUT) */
|
||||||
// header and:
|
/* header and: */
|
||||||
__le32 msg_type; /* RNDIS_MSG_KEEPALIVE_C */
|
__le32 msg_type; /* RNDIS_MSG_KEEPALIVE_C */
|
||||||
__le32 msg_len;
|
__le32 msg_len;
|
||||||
__le32 request_id;
|
__le32 request_id;
|
||||||
|
@@ -43,7 +43,7 @@ struct usbnet {
|
|||||||
/* protocol/interface state */
|
/* protocol/interface state */
|
||||||
struct net_device *net;
|
struct net_device *net;
|
||||||
int msg_enable;
|
int msg_enable;
|
||||||
unsigned long data [5];
|
unsigned long data[5];
|
||||||
u32 xid;
|
u32 xid;
|
||||||
u32 hard_mtu; /* count any extra framing */
|
u32 hard_mtu; /* count any extra framing */
|
||||||
size_t rx_urb_size; /* size for rx urbs */
|
size_t rx_urb_size; /* size for rx urbs */
|
||||||
@@ -148,8 +148,8 @@ struct driver_info {
|
|||||||
* much everything except custom framing and chip-specific stuff.
|
* much everything except custom framing and chip-specific stuff.
|
||||||
*/
|
*/
|
||||||
extern int usbnet_probe(struct usb_interface *, const struct usb_device_id *);
|
extern int usbnet_probe(struct usb_interface *, const struct usb_device_id *);
|
||||||
extern int usbnet_suspend (struct usb_interface *, pm_message_t );
|
extern int usbnet_suspend(struct usb_interface *, pm_message_t);
|
||||||
extern int usbnet_resume (struct usb_interface *);
|
extern int usbnet_resume(struct usb_interface *);
|
||||||
extern void usbnet_disconnect(struct usb_interface *);
|
extern void usbnet_disconnect(struct usb_interface *);
|
||||||
|
|
||||||
|
|
||||||
@@ -165,8 +165,8 @@ struct cdc_state {
|
|||||||
struct usb_interface *data;
|
struct usb_interface *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int usbnet_generic_cdc_bind (struct usbnet *, struct usb_interface *);
|
extern int usbnet_generic_cdc_bind(struct usbnet *, struct usb_interface *);
|
||||||
extern void usbnet_cdc_unbind (struct usbnet *, struct usb_interface *);
|
extern void usbnet_cdc_unbind(struct usbnet *, struct usb_interface *);
|
||||||
|
|
||||||
/* CDC and RNDIS support the same host-chosen packet filters for IN transfers */
|
/* CDC and RNDIS support the same host-chosen packet filters for IN transfers */
|
||||||
#define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \
|
#define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \
|
||||||
@@ -189,29 +189,31 @@ struct skb_data { /* skb->cb is one of these */
|
|||||||
size_t length;
|
size_t length;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int usbnet_open (struct net_device *net);
|
extern int usbnet_open(struct net_device *net);
|
||||||
extern int usbnet_stop (struct net_device *net);
|
extern int usbnet_stop(struct net_device *net);
|
||||||
extern netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
|
extern netdev_tx_t usbnet_start_xmit(struct sk_buff *skb,
|
||||||
struct net_device *net);
|
struct net_device *net);
|
||||||
extern void usbnet_tx_timeout (struct net_device *net);
|
extern void usbnet_tx_timeout(struct net_device *net);
|
||||||
extern int usbnet_change_mtu (struct net_device *net, int new_mtu);
|
extern int usbnet_change_mtu(struct net_device *net, int new_mtu);
|
||||||
|
|
||||||
extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *);
|
extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *);
|
||||||
extern int usbnet_get_ethernet_addr(struct usbnet *, int);
|
extern int usbnet_get_ethernet_addr(struct usbnet *, int);
|
||||||
extern void usbnet_defer_kevent (struct usbnet *, int);
|
extern void usbnet_defer_kevent(struct usbnet *, int);
|
||||||
extern void usbnet_skb_return (struct usbnet *, struct sk_buff *);
|
extern void usbnet_skb_return(struct usbnet *, struct sk_buff *);
|
||||||
extern void usbnet_unlink_rx_urbs(struct usbnet *);
|
extern void usbnet_unlink_rx_urbs(struct usbnet *);
|
||||||
|
|
||||||
extern void usbnet_pause_rx(struct usbnet *);
|
extern void usbnet_pause_rx(struct usbnet *);
|
||||||
extern void usbnet_resume_rx(struct usbnet *);
|
extern void usbnet_resume_rx(struct usbnet *);
|
||||||
extern void usbnet_purge_paused_rxq(struct usbnet *);
|
extern void usbnet_purge_paused_rxq(struct usbnet *);
|
||||||
|
|
||||||
extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd);
|
extern int usbnet_get_settings(struct net_device *net,
|
||||||
extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd);
|
struct ethtool_cmd *cmd);
|
||||||
extern u32 usbnet_get_link (struct net_device *net);
|
extern int usbnet_set_settings(struct net_device *net,
|
||||||
extern u32 usbnet_get_msglevel (struct net_device *);
|
struct ethtool_cmd *cmd);
|
||||||
extern void usbnet_set_msglevel (struct net_device *, u32);
|
extern u32 usbnet_get_link(struct net_device *net);
|
||||||
extern void usbnet_get_drvinfo (struct net_device *, struct ethtool_drvinfo *);
|
extern u32 usbnet_get_msglevel(struct net_device *);
|
||||||
|
extern void usbnet_set_msglevel(struct net_device *, u32);
|
||||||
|
extern void usbnet_get_drvinfo(struct net_device *, struct ethtool_drvinfo *);
|
||||||
extern int usbnet_nway_reset(struct net_device *net);
|
extern int usbnet_nway_reset(struct net_device *net);
|
||||||
|
|
||||||
#endif /* __LINUX_USB_USBNET_H */
|
#endif /* __LINUX_USB_USBNET_H */
|
||||||
|
Reference in New Issue
Block a user