.. | .. |
---|
1 | | -// SPDX-License-Identifier: GPL-2.0+ |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ |
---|
2 | 2 | /* |
---|
3 | 3 | * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. |
---|
4 | 4 | * All rights reserved. |
---|
.. | .. |
---|
18 | 18 | |
---|
19 | 19 | #include "device.h" |
---|
20 | 20 | |
---|
| 21 | +struct vnt_interrupt_data { |
---|
| 22 | + u8 tsr0; |
---|
| 23 | + u8 pkt0; |
---|
| 24 | + u16 time0; |
---|
| 25 | + u8 tsr1; |
---|
| 26 | + u8 pkt1; |
---|
| 27 | + u16 time1; |
---|
| 28 | + u8 tsr2; |
---|
| 29 | + u8 pkt2; |
---|
| 30 | + u16 time2; |
---|
| 31 | + u8 tsr3; |
---|
| 32 | + u8 pkt3; |
---|
| 33 | + u16 time3; |
---|
| 34 | + __le64 tsf; |
---|
| 35 | + u8 isr0; |
---|
| 36 | + u8 isr1; |
---|
| 37 | + u8 rts_success; |
---|
| 38 | + u8 rts_fail; |
---|
| 39 | + u8 ack_fail; |
---|
| 40 | + u8 fcs_err; |
---|
| 41 | + u8 sw[2]; |
---|
| 42 | +} __packed; |
---|
| 43 | + |
---|
| 44 | +struct vnt_tx_usb_header { |
---|
| 45 | + u8 type; |
---|
| 46 | + u8 pkt_no; |
---|
| 47 | + __le16 tx_byte_count; |
---|
| 48 | +} __packed; |
---|
| 49 | + |
---|
| 50 | +#define VNT_REG_BLOCK_SIZE 64 |
---|
| 51 | + |
---|
21 | 52 | int vnt_control_out(struct vnt_private *priv, u8 request, u16 value, |
---|
22 | | - u16 index, u16 length, u8 *buffer); |
---|
| 53 | + u16 index, u16 length, const u8 *buffer); |
---|
23 | 54 | int vnt_control_in(struct vnt_private *priv, u8 request, u16 value, |
---|
24 | 55 | u16 index, u16 length, u8 *buffer); |
---|
25 | 56 | |
---|
26 | | -void vnt_control_out_u8(struct vnt_private *priv, u8 reg, u8 ref_off, u8 data); |
---|
27 | | -void vnt_control_in_u8(struct vnt_private *priv, u8 reg, u8 reg_off, u8 *data); |
---|
| 57 | +int vnt_control_out_u8(struct vnt_private *priv, u8 reg, u8 ref_off, u8 data); |
---|
| 58 | +int vnt_control_in_u8(struct vnt_private *priv, u8 reg, u8 reg_off, u8 *data); |
---|
| 59 | + |
---|
| 60 | +int vnt_control_out_blocks(struct vnt_private *priv, |
---|
| 61 | + u16 block, u8 reg, u16 len, const u8 *data); |
---|
28 | 62 | |
---|
29 | 63 | int vnt_start_interrupt_urb(struct vnt_private *priv); |
---|
30 | 64 | int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb); |
---|
31 | 65 | int vnt_tx_context(struct vnt_private *priv, |
---|
32 | | - struct vnt_usb_send_context *context); |
---|
| 66 | + struct vnt_usb_send_context *context, |
---|
| 67 | + struct sk_buff *skb); |
---|
33 | 68 | |
---|
34 | 69 | #endif /* __USBPIPE_H__ */ |
---|