.. | .. |
---|
46 | 46 | #define CDC_NCM_DATA_ALTSETTING_NCM 1 |
---|
47 | 47 | #define CDC_NCM_DATA_ALTSETTING_MBIM 2 |
---|
48 | 48 | |
---|
49 | | -/* CDC NCM subclass 3.2.1 */ |
---|
| 49 | +/* CDC NCM subclass 3.3.1 */ |
---|
50 | 50 | #define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10 |
---|
| 51 | + |
---|
| 52 | +/* CDC NCM subclass 3.3.2 */ |
---|
| 53 | +#define USB_CDC_NCM_NDP32_LENGTH_MIN 0x20 |
---|
51 | 54 | |
---|
52 | 55 | /* Maximum NTB length */ |
---|
53 | 56 | #define CDC_NCM_NTB_MAX_SIZE_TX 32768 /* bytes */ |
---|
.. | .. |
---|
84 | 87 | /* Driver flags */ |
---|
85 | 88 | #define CDC_NCM_FLAG_NDP_TO_END 0x02 /* NDP is placed at end of frame */ |
---|
86 | 89 | #define CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE 0x04 /* Avoid altsetting toggle during init */ |
---|
87 | | -#define CDC_NCM_FLAG_RESET_NTB16 0x08 /* set NDP16 one more time after altsetting switch */ |
---|
| 90 | +#define CDC_NCM_FLAG_PREFER_NTB32 0x08 /* prefer NDP32 over NDP16 */ |
---|
88 | 91 | |
---|
89 | 92 | #define cdc_ncm_comm_intf_is_mbim(x) ((x)->desc.bInterfaceSubClass == USB_CDC_SUBCLASS_MBIM && \ |
---|
90 | 93 | (x)->desc.bInterfaceProtocol == USB_CDC_PROTO_NONE) |
---|
.. | .. |
---|
113 | 116 | |
---|
114 | 117 | u32 timer_interval; |
---|
115 | 118 | u32 max_ndp_size; |
---|
116 | | - struct usb_cdc_ncm_ndp16 *delayed_ndp16; |
---|
| 119 | + u8 is_ndp16; |
---|
| 120 | + union { |
---|
| 121 | + struct usb_cdc_ncm_ndp16 *delayed_ndp16; |
---|
| 122 | + struct usb_cdc_ncm_ndp32 *delayed_ndp32; |
---|
| 123 | + }; |
---|
117 | 124 | |
---|
118 | 125 | u32 tx_timer_pending; |
---|
119 | 126 | u32 tx_curr_frame_num; |
---|
.. | .. |
---|
150 | 157 | struct sk_buff *cdc_ncm_fill_tx_frame(struct usbnet *dev, struct sk_buff *skb, __le32 sign); |
---|
151 | 158 | int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in); |
---|
152 | 159 | int cdc_ncm_rx_verify_ndp16(struct sk_buff *skb_in, int ndpoffset); |
---|
| 160 | +int cdc_ncm_rx_verify_nth32(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in); |
---|
| 161 | +int cdc_ncm_rx_verify_ndp32(struct sk_buff *skb_in, int ndpoffset); |
---|
153 | 162 | struct sk_buff * |
---|
154 | 163 | cdc_ncm_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags); |
---|
155 | 164 | int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in); |
---|