diff options
-rw-r--r-- | drivers/usb/gadget/f_rndis.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/rndis.c | 8 | ||||
-rw-r--r-- | include/linux/rndis.h | 60 |
3 files changed, 29 insertions, 45 deletions
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 52343654f5df..d4f823f463e9 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c | |||
@@ -637,7 +637,7 @@ static void rndis_open(struct gether *geth) | |||
637 | 637 | ||
638 | DBG(cdev, "%s\n", __func__); | 638 | DBG(cdev, "%s\n", __func__); |
639 | 639 | ||
640 | rndis_set_param_medium(rndis->config, NDIS_MEDIUM_802_3, | 640 | rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, |
641 | bitrate(cdev->gadget) / 100); | 641 | bitrate(cdev->gadget) / 100); |
642 | rndis_signal_connect(rndis->config); | 642 | rndis_signal_connect(rndis->config); |
643 | } | 643 | } |
@@ -648,7 +648,7 @@ static void rndis_close(struct gether *geth) | |||
648 | 648 | ||
649 | DBG(geth->func.config->cdev, "%s\n", __func__); | 649 | DBG(geth->func.config->cdev, "%s\n", __func__); |
650 | 650 | ||
651 | rndis_set_param_medium(rndis->config, NDIS_MEDIUM_802_3, 0); | 651 | rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, 0); |
652 | rndis_signal_disconnect(rndis->config); | 652 | rndis_signal_disconnect(rndis->config); |
653 | } | 653 | } |
654 | 654 | ||
@@ -765,7 +765,7 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f) | |||
765 | goto fail; | 765 | goto fail; |
766 | rndis->config = status; | 766 | rndis->config = status; |
767 | 767 | ||
768 | rndis_set_param_medium(rndis->config, NDIS_MEDIUM_802_3, 0); | 768 | rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, 0); |
769 | rndis_set_host_mac(rndis->config, rndis->ethaddr); | 769 | rndis_set_host_mac(rndis->config, rndis->ethaddr); |
770 | 770 | ||
771 | #if 0 | 771 | #if 0 |
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 79ed261c88c1..d9086caab64b 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c | |||
@@ -252,7 +252,7 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf, | |||
252 | if (rndis_debug > 1) | 252 | if (rndis_debug > 1) |
253 | pr_debug("%s: RNDIS_OID_GEN_LINK_SPEED\n", __func__); | 253 | pr_debug("%s: RNDIS_OID_GEN_LINK_SPEED\n", __func__); |
254 | if (rndis_per_dev_params[configNr].media_state | 254 | if (rndis_per_dev_params[configNr].media_state |
255 | == NDIS_MEDIA_STATE_DISCONNECTED) | 255 | == RNDIS_MEDIA_STATE_DISCONNECTED) |
256 | *outbuf = cpu_to_le32(0); | 256 | *outbuf = cpu_to_le32(0); |
257 | else | 257 | else |
258 | *outbuf = cpu_to_le32( | 258 | *outbuf = cpu_to_le32( |
@@ -758,7 +758,7 @@ static int rndis_indicate_status_msg(int configNr, u32 status) | |||
758 | int rndis_signal_connect(int configNr) | 758 | int rndis_signal_connect(int configNr) |
759 | { | 759 | { |
760 | rndis_per_dev_params[configNr].media_state | 760 | rndis_per_dev_params[configNr].media_state |
761 | = NDIS_MEDIA_STATE_CONNECTED; | 761 | = RNDIS_MEDIA_STATE_CONNECTED; |
762 | return rndis_indicate_status_msg(configNr, | 762 | return rndis_indicate_status_msg(configNr, |
763 | RNDIS_STATUS_MEDIA_CONNECT); | 763 | RNDIS_STATUS_MEDIA_CONNECT); |
764 | } | 764 | } |
@@ -766,7 +766,7 @@ int rndis_signal_connect(int configNr) | |||
766 | int rndis_signal_disconnect(int configNr) | 766 | int rndis_signal_disconnect(int configNr) |
767 | { | 767 | { |
768 | rndis_per_dev_params[configNr].media_state | 768 | rndis_per_dev_params[configNr].media_state |
769 | = NDIS_MEDIA_STATE_DISCONNECTED; | 769 | = RNDIS_MEDIA_STATE_DISCONNECTED; |
770 | return rndis_indicate_status_msg(configNr, | 770 | return rndis_indicate_status_msg(configNr, |
771 | RNDIS_STATUS_MEDIA_DISCONNECT); | 771 | RNDIS_STATUS_MEDIA_DISCONNECT); |
772 | } | 772 | } |
@@ -1173,7 +1173,7 @@ int rndis_init(void) | |||
1173 | rndis_per_dev_params[i].used = 0; | 1173 | rndis_per_dev_params[i].used = 0; |
1174 | rndis_per_dev_params[i].state = RNDIS_UNINITIALIZED; | 1174 | rndis_per_dev_params[i].state = RNDIS_UNINITIALIZED; |
1175 | rndis_per_dev_params[i].media_state | 1175 | rndis_per_dev_params[i].media_state |
1176 | = NDIS_MEDIA_STATE_DISCONNECTED; | 1176 | = RNDIS_MEDIA_STATE_DISCONNECTED; |
1177 | INIT_LIST_HEAD(&(rndis_per_dev_params[i].resp_queue)); | 1177 | INIT_LIST_HEAD(&(rndis_per_dev_params[i].resp_queue)); |
1178 | } | 1178 | } |
1179 | 1179 | ||
diff --git a/include/linux/rndis.h b/include/linux/rndis.h index 2e0b1bd108c9..485795930013 100644 --- a/include/linux/rndis.h +++ b/include/linux/rndis.h | |||
@@ -112,6 +112,28 @@ | |||
112 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN 0x00000008 | 112 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN 0x00000008 |
113 | #define RNDIS_PHYSICAL_MEDIUM_MAX 0x00000009 | 113 | #define RNDIS_PHYSICAL_MEDIUM_MAX 0x00000009 |
114 | 114 | ||
115 | /* Remote NDIS medium types. */ | ||
116 | #define RNDIS_MEDIUM_UNSPECIFIED 0x00000000 | ||
117 | #define RNDIS_MEDIUM_802_3 0x00000000 | ||
118 | #define RNDIS_MEDIUM_802_5 0x00000001 | ||
119 | #define RNDIS_MEDIUM_FDDI 0x00000002 | ||
120 | #define RNDIS_MEDIUM_WAN 0x00000003 | ||
121 | #define RNDIS_MEDIUM_LOCAL_TALK 0x00000004 | ||
122 | #define RNDIS_MEDIUM_ARCNET_RAW 0x00000006 | ||
123 | #define RNDIS_MEDIUM_ARCNET_878_2 0x00000007 | ||
124 | #define RNDIS_MEDIUM_ATM 0x00000008 | ||
125 | #define RNDIS_MEDIUM_WIRELESS_LAN 0x00000009 | ||
126 | #define RNDIS_MEDIUM_IRDA 0x0000000A | ||
127 | #define RNDIS_MEDIUM_BPC 0x0000000B | ||
128 | #define RNDIS_MEDIUM_CO_WAN 0x0000000C | ||
129 | #define RNDIS_MEDIUM_1394 0x0000000D | ||
130 | /* Not a real medium, defined as an upper-bound */ | ||
131 | #define RNDIS_MEDIUM_MAX 0x0000000E | ||
132 | |||
133 | /* Remote NDIS medium connection states. */ | ||
134 | #define RNDIS_MEDIA_STATE_CONNECTED 0x00000000 | ||
135 | #define RNDIS_MEDIA_STATE_DISCONNECTED 0x00000001 | ||
136 | |||
115 | /* packet filter bits used by RNDIS_OID_GEN_CURRENT_PACKET_FILTER */ | 137 | /* packet filter bits used by RNDIS_OID_GEN_CURRENT_PACKET_FILTER */ |
116 | #define RNDIS_PACKET_TYPE_DIRECTED 0x00000001 | 138 | #define RNDIS_PACKET_TYPE_DIRECTED 0x00000001 |
117 | #define RNDIS_PACKET_TYPE_MULTICAST 0x00000002 | 139 | #define RNDIS_PACKET_TYPE_MULTICAST 0x00000002 |
@@ -163,21 +185,6 @@ | |||
163 | #define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000 | 185 | #define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000 |
164 | #define NDIS_MINIPORT_64BITS_DMA 0x01000000 | 186 | #define NDIS_MINIPORT_64BITS_DMA 0x01000000 |
165 | 187 | ||
166 | #define NDIS_MEDIUM_802_3 0x00000000 | ||
167 | #define NDIS_MEDIUM_802_5 0x00000001 | ||
168 | #define NDIS_MEDIUM_FDDI 0x00000002 | ||
169 | #define NDIS_MEDIUM_WAN 0x00000003 | ||
170 | #define NDIS_MEDIUM_LOCAL_TALK 0x00000004 | ||
171 | #define NDIS_MEDIUM_DIX 0x00000005 | ||
172 | #define NDIS_MEDIUM_ARCENT_RAW 0x00000006 | ||
173 | #define NDIS_MEDIUM_ARCENT_878_2 0x00000007 | ||
174 | #define NDIS_MEDIUM_ATM 0x00000008 | ||
175 | #define NDIS_MEDIUM_WIRELESS_LAN 0x00000009 | ||
176 | #define NDIS_MEDIUM_IRDA 0x0000000A | ||
177 | #define NDIS_MEDIUM_BPC 0x0000000B | ||
178 | #define NDIS_MEDIUM_CO_WAN 0x0000000C | ||
179 | #define NDIS_MEDIUM_1394 0x0000000D | ||
180 | |||
181 | #define NDIS_PACKET_TYPE_DIRECTED 0x00000001 | 188 | #define NDIS_PACKET_TYPE_DIRECTED 0x00000001 |
182 | #define NDIS_PACKET_TYPE_MULTICAST 0x00000002 | 189 | #define NDIS_PACKET_TYPE_MULTICAST 0x00000002 |
183 | #define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004 | 190 | #define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004 |
@@ -191,9 +198,6 @@ | |||
191 | #define NDIS_PACKET_TYPE_FUNCTIONAL 0x00000400 | 198 | #define NDIS_PACKET_TYPE_FUNCTIONAL 0x00000400 |
192 | #define NDIS_PACKET_TYPE_MAC_FRAME 0x00000800 | 199 | #define NDIS_PACKET_TYPE_MAC_FRAME 0x00000800 |
193 | 200 | ||
194 | #define NDIS_MEDIA_STATE_CONNECTED 0x00000000 | ||
195 | #define NDIS_MEDIA_STATE_DISCONNECTED 0x00000001 | ||
196 | |||
197 | #define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001 | 201 | #define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001 |
198 | #define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002 | 202 | #define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002 |
199 | #define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004 | 203 | #define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004 |
@@ -421,23 +425,3 @@ | |||
421 | * driver and remote device, if necessary. | 425 | * driver and remote device, if necessary. |
422 | */ | 426 | */ |
423 | #define REMOTE_NDIS_BUS_MSG 0xff000001 | 427 | #define REMOTE_NDIS_BUS_MSG 0xff000001 |
424 | |||
425 | /* Remote NDIS medium types. */ | ||
426 | #define RNDIS_MEDIUM_802_3 0x00000000 | ||
427 | #define RNDIS_MEDIUM_802_5 0x00000001 | ||
428 | #define RNDIS_MEDIUM_FDDI 0x00000002 | ||
429 | #define RNDIS_MEDIUM_WAN 0x00000003 | ||
430 | #define RNDIS_MEDIUM_LOCAL_TALK 0x00000004 | ||
431 | #define RNDIS_MEDIUM_ARCNET_RAW 0x00000006 | ||
432 | #define RNDIS_MEDIUM_ARCNET_878_2 0x00000007 | ||
433 | #define RNDIS_MEDIUM_ATM 0x00000008 | ||
434 | #define RNDIS_MEDIUM_WIRELESS_WAN 0x00000009 | ||
435 | #define RNDIS_MEDIUM_IRDA 0x0000000a | ||
436 | #define RNDIS_MEDIUM_CO_WAN 0x0000000b | ||
437 | /* Not a real medium, defined as an upper-bound */ | ||
438 | #define RNDIS_MEDIUM_MAX 0x0000000d | ||
439 | |||
440 | |||
441 | /* Remote NDIS medium connection states. */ | ||
442 | #define RNDIS_MEDIA_STATE_CONNECTED 0x00000000 | ||
443 | #define RNDIS_MEDIA_STATE_DISCONNECTED 0x00000001 | ||