diff options
Diffstat (limited to 'include/linux/usb/cdc_ncm.h')
| -rw-r--r-- | include/linux/usb/cdc_ncm.h | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h index cc25b70af33c..c3fa80745996 100644 --- a/include/linux/usb/cdc_ncm.h +++ b/include/linux/usb/cdc_ncm.h | |||
| @@ -36,6 +36,9 @@ | |||
| 36 | * SUCH DAMAGE. | 36 | * SUCH DAMAGE. |
| 37 | */ | 37 | */ |
| 38 | 38 | ||
| 39 | #ifndef __LINUX_USB_CDC_NCM_H | ||
| 40 | #define __LINUX_USB_CDC_NCM_H | ||
| 41 | |||
| 39 | #define CDC_NCM_COMM_ALTSETTING_NCM 0 | 42 | #define CDC_NCM_COMM_ALTSETTING_NCM 0 |
| 40 | #define CDC_NCM_COMM_ALTSETTING_MBIM 1 | 43 | #define CDC_NCM_COMM_ALTSETTING_MBIM 1 |
| 41 | 44 | ||
| @@ -85,22 +88,13 @@ | |||
| 85 | #define cdc_ncm_data_intf_is_mbim(x) ((x)->desc.bInterfaceProtocol == USB_CDC_MBIM_PROTO_NTB) | 88 | #define cdc_ncm_data_intf_is_mbim(x) ((x)->desc.bInterfaceProtocol == USB_CDC_MBIM_PROTO_NTB) |
| 86 | 89 | ||
| 87 | struct cdc_ncm_ctx { | 90 | struct cdc_ncm_ctx { |
| 88 | struct usb_cdc_ncm_ntb_parameters ncm_parm; | ||
| 89 | struct hrtimer tx_timer; | 91 | struct hrtimer tx_timer; |
| 90 | struct tasklet_struct bh; | 92 | struct tasklet_struct bh; |
| 91 | 93 | ||
| 92 | const struct usb_cdc_ncm_desc *func_desc; | 94 | const struct usb_cdc_ncm_desc *func_desc; |
| 93 | const struct usb_cdc_mbim_desc *mbim_desc; | 95 | const struct usb_cdc_mbim_desc *mbim_desc; |
| 94 | const struct usb_cdc_header_desc *header_desc; | ||
| 95 | const struct usb_cdc_union_desc *union_desc; | ||
| 96 | const struct usb_cdc_ether_desc *ether_desc; | 96 | const struct usb_cdc_ether_desc *ether_desc; |
| 97 | 97 | ||
| 98 | struct net_device *netdev; | ||
| 99 | struct usb_device *udev; | ||
| 100 | struct usb_host_endpoint *in_ep; | ||
| 101 | struct usb_host_endpoint *out_ep; | ||
| 102 | struct usb_host_endpoint *status_ep; | ||
| 103 | struct usb_interface *intf; | ||
| 104 | struct usb_interface *control; | 98 | struct usb_interface *control; |
| 105 | struct usb_interface *data; | 99 | struct usb_interface *data; |
| 106 | 100 | ||
| @@ -113,8 +107,6 @@ struct cdc_ncm_ctx { | |||
| 113 | 107 | ||
| 114 | u32 tx_timer_pending; | 108 | u32 tx_timer_pending; |
| 115 | u32 tx_curr_frame_num; | 109 | u32 tx_curr_frame_num; |
| 116 | u32 rx_speed; | ||
| 117 | u32 tx_speed; | ||
| 118 | u32 rx_max; | 110 | u32 rx_max; |
| 119 | u32 tx_max; | 111 | u32 tx_max; |
| 120 | u32 max_datagram_size; | 112 | u32 max_datagram_size; |
| @@ -127,9 +119,14 @@ struct cdc_ncm_ctx { | |||
| 127 | u16 connected; | 119 | u16 connected; |
| 128 | }; | 120 | }; |
| 129 | 121 | ||
| 130 | extern u8 cdc_ncm_select_altsetting(struct usbnet *dev, struct usb_interface *intf); | 122 | u8 cdc_ncm_select_altsetting(struct usbnet *dev, struct usb_interface *intf); |
| 131 | extern int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting); | 123 | int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting); |
| 132 | extern void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf); | 124 | void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf); |
| 133 | extern struct sk_buff *cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb, __le32 sign); | 125 | struct sk_buff *cdc_ncm_fill_tx_frame(struct usbnet *dev, struct sk_buff *skb, __le32 sign); |
| 134 | extern int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in); | 126 | int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in); |
| 135 | extern int cdc_ncm_rx_verify_ndp16(struct sk_buff *skb_in, int ndpoffset); | 127 | int cdc_ncm_rx_verify_ndp16(struct sk_buff *skb_in, int ndpoffset); |
| 128 | struct sk_buff * | ||
| 129 | cdc_ncm_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags); | ||
| 130 | int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in); | ||
| 131 | |||
| 132 | #endif /* __LINUX_USB_CDC_NCM_H */ | ||
