diff options
Diffstat (limited to 'include/linux/usb/rndis_host.h')
-rw-r--r-- | include/linux/usb/rndis_host.h | 66 |
1 files changed, 2 insertions, 64 deletions
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index 88fceb718c77..d44ef85db177 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef __LINUX_USB_RNDIS_HOST_H | 20 | #ifndef __LINUX_USB_RNDIS_HOST_H |
21 | #define __LINUX_USB_RNDIS_HOST_H | 21 | #define __LINUX_USB_RNDIS_HOST_H |
22 | 22 | ||
23 | #include <linux/rndis.h> | ||
24 | |||
23 | /* | 25 | /* |
24 | * CONTROL uses CDC "encapsulated commands" with funky notifications. | 26 | * CONTROL uses CDC "encapsulated commands" with funky notifications. |
25 | * - control-out: SEND_ENCAPSULATED | 27 | * - control-out: SEND_ENCAPSULATED |
@@ -49,47 +51,6 @@ struct rndis_msg_hdr { | |||
49 | */ | 51 | */ |
50 | #define RNDIS_CONTROL_TIMEOUT_MS (5 * 1000) | 52 | #define RNDIS_CONTROL_TIMEOUT_MS (5 * 1000) |
51 | 53 | ||
52 | #define RNDIS_MSG_COMPLETION cpu_to_le32(0x80000000) | ||
53 | |||
54 | /* codes for "msg_type" field of rndis messages; | ||
55 | * only the data channel uses packet messages (maybe batched); | ||
56 | * everything else goes on the control channel. | ||
57 | */ | ||
58 | #define RNDIS_MSG_PACKET cpu_to_le32(0x00000001) /* 1-N packets */ | ||
59 | #define RNDIS_MSG_INIT cpu_to_le32(0x00000002) | ||
60 | #define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) | ||
61 | #define RNDIS_MSG_HALT cpu_to_le32(0x00000003) | ||
62 | #define RNDIS_MSG_QUERY cpu_to_le32(0x00000004) | ||
63 | #define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION) | ||
64 | #define RNDIS_MSG_SET cpu_to_le32(0x00000005) | ||
65 | #define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION) | ||
66 | #define RNDIS_MSG_RESET cpu_to_le32(0x00000006) | ||
67 | #define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION) | ||
68 | #define RNDIS_MSG_INDICATE cpu_to_le32(0x00000007) | ||
69 | #define RNDIS_MSG_KEEPALIVE cpu_to_le32(0x00000008) | ||
70 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) | ||
71 | |||
72 | /* codes for "status" field of completion messages */ | ||
73 | #define RNDIS_STATUS_SUCCESS cpu_to_le32(0x00000000) | ||
74 | #define RNDIS_STATUS_FAILURE cpu_to_le32(0xc0000001) | ||
75 | #define RNDIS_STATUS_INVALID_DATA cpu_to_le32(0xc0010015) | ||
76 | #define RNDIS_STATUS_NOT_SUPPORTED cpu_to_le32(0xc00000bb) | ||
77 | #define RNDIS_STATUS_MEDIA_CONNECT cpu_to_le32(0x4001000b) | ||
78 | #define RNDIS_STATUS_MEDIA_DISCONNECT cpu_to_le32(0x4001000c) | ||
79 | #define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION cpu_to_le32(0x40010012) | ||
80 | |||
81 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ | ||
82 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED cpu_to_le32(0x00000000) | ||
83 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN cpu_to_le32(0x00000001) | ||
84 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM cpu_to_le32(0x00000002) | ||
85 | #define RNDIS_PHYSICAL_MEDIUM_PHONE_LINE cpu_to_le32(0x00000003) | ||
86 | #define RNDIS_PHYSICAL_MEDIUM_POWER_LINE cpu_to_le32(0x00000004) | ||
87 | #define RNDIS_PHYSICAL_MEDIUM_DSL cpu_to_le32(0x00000005) | ||
88 | #define RNDIS_PHYSICAL_MEDIUM_FIBRE_CHANNEL cpu_to_le32(0x00000006) | ||
89 | #define RNDIS_PHYSICAL_MEDIUM_1394 cpu_to_le32(0x00000007) | ||
90 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN cpu_to_le32(0x00000008) | ||
91 | #define RNDIS_PHYSICAL_MEDIUM_MAX cpu_to_le32(0x00000009) | ||
92 | |||
93 | struct rndis_data_hdr { | 54 | struct rndis_data_hdr { |
94 | __le32 msg_type; /* RNDIS_MSG_PACKET */ | 55 | __le32 msg_type; /* RNDIS_MSG_PACKET */ |
95 | __le32 msg_len; /* rndis_data_hdr + data_len + pad */ | 56 | __le32 msg_len; /* rndis_data_hdr + data_len + pad */ |
@@ -222,29 +183,6 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */ | |||
222 | __le32 status; | 183 | __le32 status; |
223 | } __attribute__ ((packed)); | 184 | } __attribute__ ((packed)); |
224 | 185 | ||
225 | /* NOTE: about 30 OIDs are "mandatory" for peripherals to support ... and | ||
226 | * there are gobs more that may optionally be supported. We'll avoid as much | ||
227 | * of that mess as possible. | ||
228 | */ | ||
229 | #define OID_802_3_PERMANENT_ADDRESS cpu_to_le32(0x01010101) | ||
230 | #define OID_GEN_MAXIMUM_FRAME_SIZE cpu_to_le32(0x00010106) | ||
231 | #define OID_GEN_CURRENT_PACKET_FILTER cpu_to_le32(0x0001010e) | ||
232 | #define OID_GEN_PHYSICAL_MEDIUM cpu_to_le32(0x00010202) | ||
233 | |||
234 | /* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */ | ||
235 | #define RNDIS_PACKET_TYPE_DIRECTED cpu_to_le32(0x00000001) | ||
236 | #define RNDIS_PACKET_TYPE_MULTICAST cpu_to_le32(0x00000002) | ||
237 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST cpu_to_le32(0x00000004) | ||
238 | #define RNDIS_PACKET_TYPE_BROADCAST cpu_to_le32(0x00000008) | ||
239 | #define RNDIS_PACKET_TYPE_SOURCE_ROUTING cpu_to_le32(0x00000010) | ||
240 | #define RNDIS_PACKET_TYPE_PROMISCUOUS cpu_to_le32(0x00000020) | ||
241 | #define RNDIS_PACKET_TYPE_SMT cpu_to_le32(0x00000040) | ||
242 | #define RNDIS_PACKET_TYPE_ALL_LOCAL cpu_to_le32(0x00000080) | ||
243 | #define RNDIS_PACKET_TYPE_GROUP cpu_to_le32(0x00001000) | ||
244 | #define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL cpu_to_le32(0x00002000) | ||
245 | #define RNDIS_PACKET_TYPE_FUNCTIONAL cpu_to_le32(0x00004000) | ||
246 | #define RNDIS_PACKET_TYPE_MAC_FRAME cpu_to_le32(0x00008000) | ||
247 | |||
248 | /* default filter used with RNDIS devices */ | 186 | /* default filter used with RNDIS devices */ |
249 | #define RNDIS_DEFAULT_FILTER ( \ | 187 | #define RNDIS_DEFAULT_FILTER ( \ |
250 | RNDIS_PACKET_TYPE_DIRECTED | \ | 188 | RNDIS_PACKET_TYPE_DIRECTED | \ |