diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-05-11 18:17:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-12 15:11:18 -0400 |
commit | 514911678fdcb35f7f69ebf96daf0e22cdae95ae (patch) | |
tree | 5cee6cd2efe05692076d2d202c6f1569af77eba9 /drivers/net/hyperv | |
parent | c80174f3da2f0edec2b66afad673e1f854e8f0ee (diff) |
usb/net: rndis: merge command codes
Switch the hyperv filter and rndis gadget driver to use the same command
enumerators as the other drivers and delete the surplus command codes.
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r-- | drivers/net/hyperv/rndis_filter.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c index 0d1034839d68..981ebb115637 100644 --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c | |||
@@ -129,8 +129,8 @@ static void dump_rndis_message(struct hv_device *hv_dev, | |||
129 | netdev = net_device->ndev; | 129 | netdev = net_device->ndev; |
130 | 130 | ||
131 | switch (rndis_msg->ndis_msg_type) { | 131 | switch (rndis_msg->ndis_msg_type) { |
132 | case REMOTE_NDIS_PACKET_MSG: | 132 | case RNDIS_MSG_PACKET: |
133 | netdev_dbg(netdev, "REMOTE_NDIS_PACKET_MSG (len %u, " | 133 | netdev_dbg(netdev, "RNDIS_MSG_PACKET (len %u, " |
134 | "data offset %u data len %u, # oob %u, " | 134 | "data offset %u data len %u, # oob %u, " |
135 | "oob offset %u, oob len %u, pkt offset %u, " | 135 | "oob offset %u, oob len %u, pkt offset %u, " |
136 | "pkt len %u\n", | 136 | "pkt len %u\n", |
@@ -144,8 +144,8 @@ static void dump_rndis_message(struct hv_device *hv_dev, | |||
144 | rndis_msg->msg.pkt.per_pkt_info_len); | 144 | rndis_msg->msg.pkt.per_pkt_info_len); |
145 | break; | 145 | break; |
146 | 146 | ||
147 | case REMOTE_NDIS_INITIALIZE_CMPLT: | 147 | case RNDIS_MSG_INIT_C: |
148 | netdev_dbg(netdev, "REMOTE_NDIS_INITIALIZE_CMPLT " | 148 | netdev_dbg(netdev, "RNDIS_MSG_INIT_C " |
149 | "(len %u, id 0x%x, status 0x%x, major %d, minor %d, " | 149 | "(len %u, id 0x%x, status 0x%x, major %d, minor %d, " |
150 | "device flags %d, max xfer size 0x%x, max pkts %u, " | 150 | "device flags %d, max xfer size 0x%x, max pkts %u, " |
151 | "pkt aligned %u)\n", | 151 | "pkt aligned %u)\n", |
@@ -162,8 +162,8 @@ static void dump_rndis_message(struct hv_device *hv_dev, | |||
162 | pkt_alignment_factor); | 162 | pkt_alignment_factor); |
163 | break; | 163 | break; |
164 | 164 | ||
165 | case REMOTE_NDIS_QUERY_CMPLT: | 165 | case RNDIS_MSG_QUERY_C: |
166 | netdev_dbg(netdev, "REMOTE_NDIS_QUERY_CMPLT " | 166 | netdev_dbg(netdev, "RNDIS_MSG_QUERY_C " |
167 | "(len %u, id 0x%x, status 0x%x, buf len %u, " | 167 | "(len %u, id 0x%x, status 0x%x, buf len %u, " |
168 | "buf offset %u)\n", | 168 | "buf offset %u)\n", |
169 | rndis_msg->msg_len, | 169 | rndis_msg->msg_len, |
@@ -175,16 +175,16 @@ static void dump_rndis_message(struct hv_device *hv_dev, | |||
175 | info_buf_offset); | 175 | info_buf_offset); |
176 | break; | 176 | break; |
177 | 177 | ||
178 | case REMOTE_NDIS_SET_CMPLT: | 178 | case RNDIS_MSG_SET_C: |
179 | netdev_dbg(netdev, | 179 | netdev_dbg(netdev, |
180 | "REMOTE_NDIS_SET_CMPLT (len %u, id 0x%x, status 0x%x)\n", | 180 | "RNDIS_MSG_SET_C (len %u, id 0x%x, status 0x%x)\n", |
181 | rndis_msg->msg_len, | 181 | rndis_msg->msg_len, |
182 | rndis_msg->msg.set_complete.req_id, | 182 | rndis_msg->msg.set_complete.req_id, |
183 | rndis_msg->msg.set_complete.status); | 183 | rndis_msg->msg.set_complete.status); |
184 | break; | 184 | break; |
185 | 185 | ||
186 | case REMOTE_NDIS_INDICATE_STATUS_MSG: | 186 | case RNDIS_MSG_INDICATE: |
187 | netdev_dbg(netdev, "REMOTE_NDIS_INDICATE_STATUS_MSG " | 187 | netdev_dbg(netdev, "RNDIS_MSG_INDICATE " |
188 | "(len %u, status 0x%x, buf len %u, buf offset %u)\n", | 188 | "(len %u, status 0x%x, buf len %u, buf offset %u)\n", |
189 | rndis_msg->msg_len, | 189 | rndis_msg->msg_len, |
190 | rndis_msg->msg.indicate_status.status, | 190 | rndis_msg->msg.indicate_status.status, |
@@ -264,7 +264,7 @@ static void rndis_filter_receive_response(struct rndis_device *dev, | |||
264 | sizeof(struct rndis_filter_packet)); | 264 | sizeof(struct rndis_filter_packet)); |
265 | 265 | ||
266 | if (resp->ndis_msg_type == | 266 | if (resp->ndis_msg_type == |
267 | REMOTE_NDIS_RESET_CMPLT) { | 267 | RNDIS_MSG_RESET_C) { |
268 | /* does not have a request id field */ | 268 | /* does not have a request id field */ |
269 | request->response_msg.msg.reset_complete. | 269 | request->response_msg.msg.reset_complete. |
270 | status = RNDIS_STATUS_BUFFER_OVERFLOW; | 270 | status = RNDIS_STATUS_BUFFER_OVERFLOW; |
@@ -415,19 +415,19 @@ int rndis_filter_receive(struct hv_device *dev, | |||
415 | dump_rndis_message(dev, rndis_msg); | 415 | dump_rndis_message(dev, rndis_msg); |
416 | 416 | ||
417 | switch (rndis_msg->ndis_msg_type) { | 417 | switch (rndis_msg->ndis_msg_type) { |
418 | case REMOTE_NDIS_PACKET_MSG: | 418 | case RNDIS_MSG_PACKET: |
419 | /* data msg */ | 419 | /* data msg */ |
420 | rndis_filter_receive_data(rndis_dev, rndis_msg, pkt); | 420 | rndis_filter_receive_data(rndis_dev, rndis_msg, pkt); |
421 | break; | 421 | break; |
422 | 422 | ||
423 | case REMOTE_NDIS_INITIALIZE_CMPLT: | 423 | case RNDIS_MSG_INIT_C: |
424 | case REMOTE_NDIS_QUERY_CMPLT: | 424 | case RNDIS_MSG_QUERY_C: |
425 | case REMOTE_NDIS_SET_CMPLT: | 425 | case RNDIS_MSG_SET_C: |
426 | /* completion msgs */ | 426 | /* completion msgs */ |
427 | rndis_filter_receive_response(rndis_dev, rndis_msg); | 427 | rndis_filter_receive_response(rndis_dev, rndis_msg); |
428 | break; | 428 | break; |
429 | 429 | ||
430 | case REMOTE_NDIS_INDICATE_STATUS_MSG: | 430 | case RNDIS_MSG_INDICATE: |
431 | /* notification msgs */ | 431 | /* notification msgs */ |
432 | rndis_filter_receive_indicate_status(rndis_dev, rndis_msg); | 432 | rndis_filter_receive_indicate_status(rndis_dev, rndis_msg); |
433 | break; | 433 | break; |
@@ -456,7 +456,7 @@ static int rndis_filter_query_device(struct rndis_device *dev, u32 oid, | |||
456 | return -EINVAL; | 456 | return -EINVAL; |
457 | 457 | ||
458 | *result_size = 0; | 458 | *result_size = 0; |
459 | request = get_rndis_request(dev, REMOTE_NDIS_QUERY_MSG, | 459 | request = get_rndis_request(dev, RNDIS_MSG_QUERY, |
460 | RNDIS_MESSAGE_SIZE(struct rndis_query_request)); | 460 | RNDIS_MESSAGE_SIZE(struct rndis_query_request)); |
461 | if (!request) { | 461 | if (!request) { |
462 | ret = -ENOMEM; | 462 | ret = -ENOMEM; |
@@ -536,7 +536,7 @@ int rndis_filter_set_packet_filter(struct rndis_device *dev, u32 new_filter) | |||
536 | 536 | ||
537 | ndev = dev->net_dev->ndev; | 537 | ndev = dev->net_dev->ndev; |
538 | 538 | ||
539 | request = get_rndis_request(dev, REMOTE_NDIS_SET_MSG, | 539 | request = get_rndis_request(dev, RNDIS_MSG_SET, |
540 | RNDIS_MESSAGE_SIZE(struct rndis_set_request) + | 540 | RNDIS_MESSAGE_SIZE(struct rndis_set_request) + |
541 | sizeof(u32)); | 541 | sizeof(u32)); |
542 | if (!request) { | 542 | if (!request) { |
@@ -588,7 +588,7 @@ static int rndis_filter_init_device(struct rndis_device *dev) | |||
588 | u32 status; | 588 | u32 status; |
589 | int ret, t; | 589 | int ret, t; |
590 | 590 | ||
591 | request = get_rndis_request(dev, REMOTE_NDIS_INITIALIZE_MSG, | 591 | request = get_rndis_request(dev, RNDIS_MSG_INIT, |
592 | RNDIS_MESSAGE_SIZE(struct rndis_initialize_request)); | 592 | RNDIS_MESSAGE_SIZE(struct rndis_initialize_request)); |
593 | if (!request) { | 593 | if (!request) { |
594 | ret = -ENOMEM; | 594 | ret = -ENOMEM; |
@@ -641,7 +641,7 @@ static void rndis_filter_halt_device(struct rndis_device *dev) | |||
641 | struct rndis_halt_request *halt; | 641 | struct rndis_halt_request *halt; |
642 | 642 | ||
643 | /* Attempt to do a rndis device halt */ | 643 | /* Attempt to do a rndis device halt */ |
644 | request = get_rndis_request(dev, REMOTE_NDIS_HALT_MSG, | 644 | request = get_rndis_request(dev, RNDIS_MSG_HALT, |
645 | RNDIS_MESSAGE_SIZE(struct rndis_halt_request)); | 645 | RNDIS_MESSAGE_SIZE(struct rndis_halt_request)); |
646 | if (!request) | 646 | if (!request) |
647 | goto cleanup; | 647 | goto cleanup; |
@@ -805,7 +805,7 @@ int rndis_filter_send(struct hv_device *dev, | |||
805 | if (isvlan) | 805 | if (isvlan) |
806 | rndis_msg_size += NDIS_VLAN_PPI_SIZE; | 806 | rndis_msg_size += NDIS_VLAN_PPI_SIZE; |
807 | 807 | ||
808 | rndis_msg->ndis_msg_type = REMOTE_NDIS_PACKET_MSG; | 808 | rndis_msg->ndis_msg_type = RNDIS_MSG_PACKET; |
809 | rndis_msg->msg_len = pkt->total_data_buflen + | 809 | rndis_msg->msg_len = pkt->total_data_buflen + |
810 | rndis_msg_size; | 810 | rndis_msg_size; |
811 | 811 | ||