diff options
-rw-r--r-- | drivers/net/hyperv/hyperv_net.h | 290 | ||||
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 49 | ||||
-rw-r--r-- | drivers/usb/gadget/ndis.h | 164 | ||||
-rw-r--r-- | drivers/usb/gadget/rndis.h | 48 | ||||
-rw-r--r-- | include/linux/rndis.h | 561 | ||||
-rw-r--r-- | include/linux/usb/rndis_host.h | 66 |
6 files changed, 565 insertions, 613 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index c35824552792..4ffcd57b011b 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/drivers/net/hyperv/hyperv_net.h | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/hyperv.h> | 29 | #include <linux/hyperv.h> |
30 | #include <linux/rndis.h> | ||
30 | 31 | ||
31 | /* Fwd declaration */ | 32 | /* Fwd declaration */ |
32 | struct hv_netvsc_packet; | 33 | struct hv_netvsc_packet; |
@@ -506,295 +507,6 @@ struct netvsc_device { | |||
506 | void *extension; | 507 | void *extension; |
507 | }; | 508 | }; |
508 | 509 | ||
509 | |||
510 | /* Status codes */ | ||
511 | |||
512 | |||
513 | #ifndef STATUS_SUCCESS | ||
514 | #define STATUS_SUCCESS (0x00000000L) | ||
515 | #endif | ||
516 | |||
517 | #ifndef STATUS_UNSUCCESSFUL | ||
518 | #define STATUS_UNSUCCESSFUL (0xC0000001L) | ||
519 | #endif | ||
520 | |||
521 | #ifndef STATUS_PENDING | ||
522 | #define STATUS_PENDING (0x00000103L) | ||
523 | #endif | ||
524 | |||
525 | #ifndef STATUS_INSUFFICIENT_RESOURCES | ||
526 | #define STATUS_INSUFFICIENT_RESOURCES (0xC000009AL) | ||
527 | #endif | ||
528 | |||
529 | #ifndef STATUS_BUFFER_OVERFLOW | ||
530 | #define STATUS_BUFFER_OVERFLOW (0x80000005L) | ||
531 | #endif | ||
532 | |||
533 | #ifndef STATUS_NOT_SUPPORTED | ||
534 | #define STATUS_NOT_SUPPORTED (0xC00000BBL) | ||
535 | #endif | ||
536 | |||
537 | #define RNDIS_STATUS_SUCCESS (STATUS_SUCCESS) | ||
538 | #define RNDIS_STATUS_PENDING (STATUS_PENDING) | ||
539 | #define RNDIS_STATUS_NOT_RECOGNIZED (0x00010001L) | ||
540 | #define RNDIS_STATUS_NOT_COPIED (0x00010002L) | ||
541 | #define RNDIS_STATUS_NOT_ACCEPTED (0x00010003L) | ||
542 | #define RNDIS_STATUS_CALL_ACTIVE (0x00010007L) | ||
543 | |||
544 | #define RNDIS_STATUS_ONLINE (0x40010003L) | ||
545 | #define RNDIS_STATUS_RESET_START (0x40010004L) | ||
546 | #define RNDIS_STATUS_RESET_END (0x40010005L) | ||
547 | #define RNDIS_STATUS_RING_STATUS (0x40010006L) | ||
548 | #define RNDIS_STATUS_CLOSED (0x40010007L) | ||
549 | #define RNDIS_STATUS_WAN_LINE_UP (0x40010008L) | ||
550 | #define RNDIS_STATUS_WAN_LINE_DOWN (0x40010009L) | ||
551 | #define RNDIS_STATUS_WAN_FRAGMENT (0x4001000AL) | ||
552 | #define RNDIS_STATUS_MEDIA_CONNECT (0x4001000BL) | ||
553 | #define RNDIS_STATUS_MEDIA_DISCONNECT (0x4001000CL) | ||
554 | #define RNDIS_STATUS_HARDWARE_LINE_UP (0x4001000DL) | ||
555 | #define RNDIS_STATUS_HARDWARE_LINE_DOWN (0x4001000EL) | ||
556 | #define RNDIS_STATUS_INTERFACE_UP (0x4001000FL) | ||
557 | #define RNDIS_STATUS_INTERFACE_DOWN (0x40010010L) | ||
558 | #define RNDIS_STATUS_MEDIA_BUSY (0x40010011L) | ||
559 | #define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION (0x40010012L) | ||
560 | #define RNDIS_STATUS_WW_INDICATION RDIA_SPECIFIC_INDICATION | ||
561 | #define RNDIS_STATUS_LINK_SPEED_CHANGE (0x40010013L) | ||
562 | |||
563 | #define RNDIS_STATUS_NOT_RESETTABLE (0x80010001L) | ||
564 | #define RNDIS_STATUS_SOFT_ERRORS (0x80010003L) | ||
565 | #define RNDIS_STATUS_HARD_ERRORS (0x80010004L) | ||
566 | #define RNDIS_STATUS_BUFFER_OVERFLOW (STATUS_BUFFER_OVERFLOW) | ||
567 | |||
568 | #define RNDIS_STATUS_FAILURE (STATUS_UNSUCCESSFUL) | ||
569 | #define RNDIS_STATUS_RESOURCES (STATUS_INSUFFICIENT_RESOURCES) | ||
570 | #define RNDIS_STATUS_CLOSING (0xC0010002L) | ||
571 | #define RNDIS_STATUS_BAD_VERSION (0xC0010004L) | ||
572 | #define RNDIS_STATUS_BAD_CHARACTERISTICS (0xC0010005L) | ||
573 | #define RNDIS_STATUS_ADAPTER_NOT_FOUND (0xC0010006L) | ||
574 | #define RNDIS_STATUS_OPEN_FAILED (0xC0010007L) | ||
575 | #define RNDIS_STATUS_DEVICE_FAILED (0xC0010008L) | ||
576 | #define RNDIS_STATUS_MULTICAST_FULL (0xC0010009L) | ||
577 | #define RNDIS_STATUS_MULTICAST_EXISTS (0xC001000AL) | ||
578 | #define RNDIS_STATUS_MULTICAST_NOT_FOUND (0xC001000BL) | ||
579 | #define RNDIS_STATUS_REQUEST_ABORTED (0xC001000CL) | ||
580 | #define RNDIS_STATUS_RESET_IN_PROGRESS (0xC001000DL) | ||
581 | #define RNDIS_STATUS_CLOSING_INDICATING (0xC001000EL) | ||
582 | #define RNDIS_STATUS_NOT_SUPPORTED (STATUS_NOT_SUPPORTED) | ||
583 | #define RNDIS_STATUS_INVALID_PACKET (0xC001000FL) | ||
584 | #define RNDIS_STATUS_OPEN_LIST_FULL (0xC0010010L) | ||
585 | #define RNDIS_STATUS_ADAPTER_NOT_READY (0xC0010011L) | ||
586 | #define RNDIS_STATUS_ADAPTER_NOT_OPEN (0xC0010012L) | ||
587 | #define RNDIS_STATUS_NOT_INDICATING (0xC0010013L) | ||
588 | #define RNDIS_STATUS_INVALID_LENGTH (0xC0010014L) | ||
589 | #define RNDIS_STATUS_INVALID_DATA (0xC0010015L) | ||
590 | #define RNDIS_STATUS_BUFFER_TOO_SHORT (0xC0010016L) | ||
591 | #define RNDIS_STATUS_INVALID_OID (0xC0010017L) | ||
592 | #define RNDIS_STATUS_ADAPTER_REMOVED (0xC0010018L) | ||
593 | #define RNDIS_STATUS_UNSUPPORTED_MEDIA (0xC0010019L) | ||
594 | #define RNDIS_STATUS_GROUP_ADDRESS_IN_USE (0xC001001AL) | ||
595 | #define RNDIS_STATUS_FILE_NOT_FOUND (0xC001001BL) | ||
596 | #define RNDIS_STATUS_ERROR_READING_FILE (0xC001001CL) | ||
597 | #define RNDIS_STATUS_ALREADY_MAPPED (0xC001001DL) | ||
598 | #define RNDIS_STATUS_RESOURCE_CONFLICT (0xC001001EL) | ||
599 | #define RNDIS_STATUS_NO_CABLE (0xC001001FL) | ||
600 | |||
601 | #define RNDIS_STATUS_INVALID_SAP (0xC0010020L) | ||
602 | #define RNDIS_STATUS_SAP_IN_USE (0xC0010021L) | ||
603 | #define RNDIS_STATUS_INVALID_ADDRESS (0xC0010022L) | ||
604 | #define RNDIS_STATUS_VC_NOT_ACTIVATED (0xC0010023L) | ||
605 | #define RNDIS_STATUS_DEST_OUT_OF_ORDER (0xC0010024L) | ||
606 | #define RNDIS_STATUS_VC_NOT_AVAILABLE (0xC0010025L) | ||
607 | #define RNDIS_STATUS_CELLRATE_NOT_AVAILABLE (0xC0010026L) | ||
608 | #define RNDIS_STATUS_INCOMPATABLE_QOS (0xC0010027L) | ||
609 | #define RNDIS_STATUS_AAL_PARAMS_UNSUPPORTED (0xC0010028L) | ||
610 | #define RNDIS_STATUS_NO_ROUTE_TO_DESTINATION (0xC0010029L) | ||
611 | |||
612 | #define RNDIS_STATUS_TOKEN_RING_OPEN_ERROR (0xC0011000L) | ||
613 | |||
614 | /* Object Identifiers used by NdisRequest Query/Set Information */ | ||
615 | /* General Objects */ | ||
616 | #define RNDIS_OID_GEN_SUPPORTED_LIST 0x00010101 | ||
617 | #define RNDIS_OID_GEN_HARDWARE_STATUS 0x00010102 | ||
618 | #define RNDIS_OID_GEN_MEDIA_SUPPORTED 0x00010103 | ||
619 | #define RNDIS_OID_GEN_MEDIA_IN_USE 0x00010104 | ||
620 | #define RNDIS_OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105 | ||
621 | #define RNDIS_OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106 | ||
622 | #define RNDIS_OID_GEN_LINK_SPEED 0x00010107 | ||
623 | #define RNDIS_OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108 | ||
624 | #define RNDIS_OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109 | ||
625 | #define RNDIS_OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A | ||
626 | #define RNDIS_OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B | ||
627 | #define RNDIS_OID_GEN_VENDOR_ID 0x0001010C | ||
628 | #define RNDIS_OID_GEN_VENDOR_DESCRIPTION 0x0001010D | ||
629 | #define RNDIS_OID_GEN_CURRENT_PACKET_FILTER 0x0001010E | ||
630 | #define RNDIS_OID_GEN_CURRENT_LOOKAHEAD 0x0001010F | ||
631 | #define RNDIS_OID_GEN_DRIVER_VERSION 0x00010110 | ||
632 | #define RNDIS_OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111 | ||
633 | #define RNDIS_OID_GEN_PROTOCOL_OPTIONS 0x00010112 | ||
634 | #define RNDIS_OID_GEN_MAC_OPTIONS 0x00010113 | ||
635 | #define RNDIS_OID_GEN_MEDIA_CONNECT_STATUS 0x00010114 | ||
636 | #define RNDIS_OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115 | ||
637 | #define RNDIS_OID_GEN_VENDOR_DRIVER_VERSION 0x00010116 | ||
638 | #define RNDIS_OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118 | ||
639 | #define RNDIS_OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119 | ||
640 | #define RNDIS_OID_GEN_MACHINE_NAME 0x0001021A | ||
641 | #define RNDIS_OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021B | ||
642 | |||
643 | #define RNDIS_OID_GEN_XMIT_OK 0x00020101 | ||
644 | #define RNDIS_OID_GEN_RCV_OK 0x00020102 | ||
645 | #define RNDIS_OID_GEN_XMIT_ERROR 0x00020103 | ||
646 | #define RNDIS_OID_GEN_RCV_ERROR 0x00020104 | ||
647 | #define RNDIS_OID_GEN_RCV_NO_BUFFER 0x00020105 | ||
648 | |||
649 | #define RNDIS_OID_GEN_DIRECTED_BYTES_XMIT 0x00020201 | ||
650 | #define RNDIS_OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202 | ||
651 | #define RNDIS_OID_GEN_MULTICAST_BYTES_XMIT 0x00020203 | ||
652 | #define RNDIS_OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204 | ||
653 | #define RNDIS_OID_GEN_BROADCAST_BYTES_XMIT 0x00020205 | ||
654 | #define RNDIS_OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206 | ||
655 | #define RNDIS_OID_GEN_DIRECTED_BYTES_RCV 0x00020207 | ||
656 | #define RNDIS_OID_GEN_DIRECTED_FRAMES_RCV 0x00020208 | ||
657 | #define RNDIS_OID_GEN_MULTICAST_BYTES_RCV 0x00020209 | ||
658 | #define RNDIS_OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A | ||
659 | #define RNDIS_OID_GEN_BROADCAST_BYTES_RCV 0x0002020B | ||
660 | #define RNDIS_OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C | ||
661 | |||
662 | #define RNDIS_OID_GEN_RCV_CRC_ERROR 0x0002020D | ||
663 | #define RNDIS_OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E | ||
664 | |||
665 | #define RNDIS_OID_GEN_GET_TIME_CAPS 0x0002020F | ||
666 | #define RNDIS_OID_GEN_GET_NETCARD_TIME 0x00020210 | ||
667 | |||
668 | /* These are connection-oriented general OIDs. */ | ||
669 | /* These replace the above OIDs for connection-oriented media. */ | ||
670 | #define RNDIS_OID_GEN_CO_SUPPORTED_LIST 0x00010101 | ||
671 | #define RNDIS_OID_GEN_CO_HARDWARE_STATUS 0x00010102 | ||
672 | #define RNDIS_OID_GEN_CO_MEDIA_SUPPORTED 0x00010103 | ||
673 | #define RNDIS_OID_GEN_CO_MEDIA_IN_USE 0x00010104 | ||
674 | #define RNDIS_OID_GEN_CO_LINK_SPEED 0x00010105 | ||
675 | #define RNDIS_OID_GEN_CO_VENDOR_ID 0x00010106 | ||
676 | #define RNDIS_OID_GEN_CO_VENDOR_DESCRIPTION 0x00010107 | ||
677 | #define RNDIS_OID_GEN_CO_DRIVER_VERSION 0x00010108 | ||
678 | #define RNDIS_OID_GEN_CO_PROTOCOL_OPTIONS 0x00010109 | ||
679 | #define RNDIS_OID_GEN_CO_MAC_OPTIONS 0x0001010A | ||
680 | #define RNDIS_OID_GEN_CO_MEDIA_CONNECT_STATUS 0x0001010B | ||
681 | #define RNDIS_OID_GEN_CO_VENDOR_DRIVER_VERSION 0x0001010C | ||
682 | #define RNDIS_OID_GEN_CO_MINIMUM_LINK_SPEED 0x0001010D | ||
683 | |||
684 | #define RNDIS_OID_GEN_CO_GET_TIME_CAPS 0x00010201 | ||
685 | #define RNDIS_OID_GEN_CO_GET_NETCARD_TIME 0x00010202 | ||
686 | |||
687 | /* These are connection-oriented statistics OIDs. */ | ||
688 | #define RNDIS_OID_GEN_CO_XMIT_PDUS_OK 0x00020101 | ||
689 | #define RNDIS_OID_GEN_CO_RCV_PDUS_OK 0x00020102 | ||
690 | #define RNDIS_OID_GEN_CO_XMIT_PDUS_ERROR 0x00020103 | ||
691 | #define RNDIS_OID_GEN_CO_RCV_PDUS_ERROR 0x00020104 | ||
692 | #define RNDIS_OID_GEN_CO_RCV_PDUS_NO_BUFFER 0x00020105 | ||
693 | |||
694 | |||
695 | #define RNDIS_OID_GEN_CO_RCV_CRC_ERROR 0x00020201 | ||
696 | #define RNDIS_OID_GEN_CO_TRANSMIT_QUEUE_LENGTH 0x00020202 | ||
697 | #define RNDIS_OID_GEN_CO_BYTES_XMIT 0x00020203 | ||
698 | #define RNDIS_OID_GEN_CO_BYTES_RCV 0x00020204 | ||
699 | #define RNDIS_OID_GEN_CO_BYTES_XMIT_OUTSTANDING 0x00020205 | ||
700 | #define RNDIS_OID_GEN_CO_NETCARD_LOAD 0x00020206 | ||
701 | |||
702 | /* These are objects for Connection-oriented media call-managers. */ | ||
703 | #define RNDIS_OID_CO_ADD_PVC 0xFF000001 | ||
704 | #define RNDIS_OID_CO_DELETE_PVC 0xFF000002 | ||
705 | #define RNDIS_OID_CO_GET_CALL_INFORMATION 0xFF000003 | ||
706 | #define RNDIS_OID_CO_ADD_ADDRESS 0xFF000004 | ||
707 | #define RNDIS_OID_CO_DELETE_ADDRESS 0xFF000005 | ||
708 | #define RNDIS_OID_CO_GET_ADDRESSES 0xFF000006 | ||
709 | #define RNDIS_OID_CO_ADDRESS_CHANGE 0xFF000007 | ||
710 | #define RNDIS_OID_CO_SIGNALING_ENABLED 0xFF000008 | ||
711 | #define RNDIS_OID_CO_SIGNALING_DISABLED 0xFF000009 | ||
712 | |||
713 | /* 802.3 Objects (Ethernet) */ | ||
714 | #define RNDIS_OID_802_3_PERMANENT_ADDRESS 0x01010101 | ||
715 | #define RNDIS_OID_802_3_CURRENT_ADDRESS 0x01010102 | ||
716 | #define RNDIS_OID_802_3_MULTICAST_LIST 0x01010103 | ||
717 | #define RNDIS_OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 | ||
718 | #define RNDIS_OID_802_3_MAC_OPTIONS 0x01010105 | ||
719 | |||
720 | #define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001 | ||
721 | |||
722 | #define RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101 | ||
723 | #define RNDIS_OID_802_3_XMIT_ONE_COLLISION 0x01020102 | ||
724 | #define RNDIS_OID_802_3_XMIT_MORE_COLLISIONS 0x01020103 | ||
725 | |||
726 | #define RNDIS_OID_802_3_XMIT_DEFERRED 0x01020201 | ||
727 | #define RNDIS_OID_802_3_XMIT_MAX_COLLISIONS 0x01020202 | ||
728 | #define RNDIS_OID_802_3_RCV_OVERRUN 0x01020203 | ||
729 | #define RNDIS_OID_802_3_XMIT_UNDERRUN 0x01020204 | ||
730 | #define RNDIS_OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205 | ||
731 | #define RNDIS_OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206 | ||
732 | #define RNDIS_OID_802_3_XMIT_LATE_COLLISIONS 0x01020207 | ||
733 | |||
734 | /* Remote NDIS message types */ | ||
735 | #define REMOTE_NDIS_PACKET_MSG 0x00000001 | ||
736 | #define REMOTE_NDIS_INITIALIZE_MSG 0x00000002 | ||
737 | #define REMOTE_NDIS_HALT_MSG 0x00000003 | ||
738 | #define REMOTE_NDIS_QUERY_MSG 0x00000004 | ||
739 | #define REMOTE_NDIS_SET_MSG 0x00000005 | ||
740 | #define REMOTE_NDIS_RESET_MSG 0x00000006 | ||
741 | #define REMOTE_NDIS_INDICATE_STATUS_MSG 0x00000007 | ||
742 | #define REMOTE_NDIS_KEEPALIVE_MSG 0x00000008 | ||
743 | |||
744 | #define REMOTE_CONDIS_MP_CREATE_VC_MSG 0x00008001 | ||
745 | #define REMOTE_CONDIS_MP_DELETE_VC_MSG 0x00008002 | ||
746 | #define REMOTE_CONDIS_MP_ACTIVATE_VC_MSG 0x00008005 | ||
747 | #define REMOTE_CONDIS_MP_DEACTIVATE_VC_MSG 0x00008006 | ||
748 | #define REMOTE_CONDIS_INDICATE_STATUS_MSG 0x00008007 | ||
749 | |||
750 | /* Remote NDIS message completion types */ | ||
751 | #define REMOTE_NDIS_INITIALIZE_CMPLT 0x80000002 | ||
752 | #define REMOTE_NDIS_QUERY_CMPLT 0x80000004 | ||
753 | #define REMOTE_NDIS_SET_CMPLT 0x80000005 | ||
754 | #define REMOTE_NDIS_RESET_CMPLT 0x80000006 | ||
755 | #define REMOTE_NDIS_KEEPALIVE_CMPLT 0x80000008 | ||
756 | |||
757 | #define REMOTE_CONDIS_MP_CREATE_VC_CMPLT 0x80008001 | ||
758 | #define REMOTE_CONDIS_MP_DELETE_VC_CMPLT 0x80008002 | ||
759 | #define REMOTE_CONDIS_MP_ACTIVATE_VC_CMPLT 0x80008005 | ||
760 | #define REMOTE_CONDIS_MP_DEACTIVATE_VC_CMPLT 0x80008006 | ||
761 | |||
762 | /* | ||
763 | * Reserved message type for private communication between lower-layer host | ||
764 | * driver and remote device, if necessary. | ||
765 | */ | ||
766 | #define REMOTE_NDIS_BUS_MSG 0xff000001 | ||
767 | |||
768 | /* Defines for DeviceFlags in struct rndis_initialize_complete */ | ||
769 | #define RNDIS_DF_CONNECTIONLESS 0x00000001 | ||
770 | #define RNDIS_DF_CONNECTION_ORIENTED 0x00000002 | ||
771 | #define RNDIS_DF_RAW_DATA 0x00000004 | ||
772 | |||
773 | /* Remote NDIS medium types. */ | ||
774 | #define RNDIS_MEDIUM_802_3 0x00000000 | ||
775 | #define RNDIS_MEDIUM_802_5 0x00000001 | ||
776 | #define RNDIS_MEDIUM_FDDI 0x00000002 | ||
777 | #define RNDIS_MEDIUM_WAN 0x00000003 | ||
778 | #define RNDIS_MEDIUM_LOCAL_TALK 0x00000004 | ||
779 | #define RNDIS_MEDIUM_ARCNET_RAW 0x00000006 | ||
780 | #define RNDIS_MEDIUM_ARCNET_878_2 0x00000007 | ||
781 | #define RNDIS_MEDIUM_ATM 0x00000008 | ||
782 | #define RNDIS_MEDIUM_WIRELESS_WAN 0x00000009 | ||
783 | #define RNDIS_MEDIUM_IRDA 0x0000000a | ||
784 | #define RNDIS_MEDIUM_CO_WAN 0x0000000b | ||
785 | /* Not a real medium, defined as an upper-bound */ | ||
786 | #define RNDIS_MEDIUM_MAX 0x0000000d | ||
787 | |||
788 | |||
789 | /* Remote NDIS medium connection states. */ | ||
790 | #define RNDIS_MEDIA_STATE_CONNECTED 0x00000000 | ||
791 | #define RNDIS_MEDIA_STATE_DISCONNECTED 0x00000001 | ||
792 | |||
793 | /* Remote NDIS version numbers */ | ||
794 | #define RNDIS_MAJOR_VERSION 0x00000001 | ||
795 | #define RNDIS_MINOR_VERSION 0x00000000 | ||
796 | |||
797 | |||
798 | /* NdisInitialize message */ | 510 | /* NdisInitialize message */ |
799 | struct rndis_initialize_request { | 511 | struct rndis_initialize_request { |
800 | u32 req_id; | 512 | u32 req_id; |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index cd828e3b8e40..dc3caba2c18b 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -88,49 +88,6 @@ module_param_named(workaround_interval, modparam_workaround_interval, | |||
88 | MODULE_PARM_DESC(workaround_interval, | 88 | MODULE_PARM_DESC(workaround_interval, |
89 | "set stall workaround interval in msecs (0=disabled) (default: 0)"); | 89 | "set stall workaround interval in msecs (0=disabled) (default: 0)"); |
90 | 90 | ||
91 | |||
92 | /* various RNDIS OID defs */ | ||
93 | #define OID_GEN_LINK_SPEED 0x00010107 | ||
94 | #define OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021b | ||
95 | |||
96 | #define OID_GEN_XMIT_OK 0x00020101 | ||
97 | #define OID_GEN_RCV_OK 0x00020102 | ||
98 | #define OID_GEN_XMIT_ERROR 0x00020103 | ||
99 | #define OID_GEN_RCV_ERROR 0x00020104 | ||
100 | #define OID_GEN_RCV_NO_BUFFER 0x00020105 | ||
101 | |||
102 | #define OID_802_3_CURRENT_ADDRESS 0x01010102 | ||
103 | #define OID_802_3_MULTICAST_LIST 0x01010103 | ||
104 | #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 | ||
105 | |||
106 | #define OID_802_11_BSSID 0x0d010101 | ||
107 | #define OID_802_11_SSID 0x0d010102 | ||
108 | #define OID_802_11_INFRASTRUCTURE_MODE 0x0d010108 | ||
109 | #define OID_802_11_ADD_WEP 0x0d010113 | ||
110 | #define OID_802_11_REMOVE_WEP 0x0d010114 | ||
111 | #define OID_802_11_DISASSOCIATE 0x0d010115 | ||
112 | #define OID_802_11_AUTHENTICATION_MODE 0x0d010118 | ||
113 | #define OID_802_11_PRIVACY_FILTER 0x0d010119 | ||
114 | #define OID_802_11_BSSID_LIST_SCAN 0x0d01011a | ||
115 | #define OID_802_11_ENCRYPTION_STATUS 0x0d01011b | ||
116 | #define OID_802_11_ADD_KEY 0x0d01011d | ||
117 | #define OID_802_11_REMOVE_KEY 0x0d01011e | ||
118 | #define OID_802_11_ASSOCIATION_INFORMATION 0x0d01011f | ||
119 | #define OID_802_11_CAPABILITY 0x0d010122 | ||
120 | #define OID_802_11_PMKID 0x0d010123 | ||
121 | #define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0d010203 | ||
122 | #define OID_802_11_NETWORK_TYPE_IN_USE 0x0d010204 | ||
123 | #define OID_802_11_TX_POWER_LEVEL 0x0d010205 | ||
124 | #define OID_802_11_RSSI 0x0d010206 | ||
125 | #define OID_802_11_RSSI_TRIGGER 0x0d010207 | ||
126 | #define OID_802_11_FRAGMENTATION_THRESHOLD 0x0d010209 | ||
127 | #define OID_802_11_RTS_THRESHOLD 0x0d01020a | ||
128 | #define OID_802_11_SUPPORTED_RATES 0x0d01020e | ||
129 | #define OID_802_11_CONFIGURATION 0x0d010211 | ||
130 | #define OID_802_11_POWER_MODE 0x0d010216 | ||
131 | #define OID_802_11_BSSID_LIST 0x0d010217 | ||
132 | |||
133 | |||
134 | /* Typical noise/maximum signal level values taken from ndiswrapper iw_ndis.h */ | 91 | /* Typical noise/maximum signal level values taken from ndiswrapper iw_ndis.h */ |
135 | #define WL_NOISE -96 /* typical noise level in dBm */ | 92 | #define WL_NOISE -96 /* typical noise level in dBm */ |
136 | #define WL_SIGMAX -32 /* typical maximum signal level in dBm */ | 93 | #define WL_SIGMAX -32 /* typical maximum signal level in dBm */ |
@@ -149,12 +106,6 @@ MODULE_PARM_DESC(workaround_interval, | |||
149 | #define BCM4320_DEFAULT_TXPOWER_DBM_50 10 | 106 | #define BCM4320_DEFAULT_TXPOWER_DBM_50 10 |
150 | #define BCM4320_DEFAULT_TXPOWER_DBM_25 7 | 107 | #define BCM4320_DEFAULT_TXPOWER_DBM_25 7 |
151 | 108 | ||
152 | |||
153 | /* codes for "status" field of completion messages */ | ||
154 | #define RNDIS_STATUS_ADAPTER_NOT_READY 0xc0010011 | ||
155 | #define RNDIS_STATUS_ADAPTER_NOT_OPEN 0xc0010012 | ||
156 | |||
157 | |||
158 | /* Known device types */ | 109 | /* Known device types */ |
159 | #define RNDIS_UNKNOWN 0 | 110 | #define RNDIS_UNKNOWN 0 |
160 | #define RNDIS_BCM4320A 1 | 111 | #define RNDIS_BCM4320A 1 |
diff --git a/drivers/usb/gadget/ndis.h b/drivers/usb/gadget/ndis.h index b0e52fc277b4..a19f72dec0cd 100644 --- a/drivers/usb/gadget/ndis.h +++ b/drivers/usb/gadget/ndis.h | |||
@@ -15,11 +15,6 @@ | |||
15 | #ifndef _LINUX_NDIS_H | 15 | #ifndef _LINUX_NDIS_H |
16 | #define _LINUX_NDIS_H | 16 | #define _LINUX_NDIS_H |
17 | 17 | ||
18 | |||
19 | #define NDIS_STATUS_MULTICAST_FULL 0xC0010009 | ||
20 | #define NDIS_STATUS_MULTICAST_EXISTS 0xC001000A | ||
21 | #define NDIS_STATUS_MULTICAST_NOT_FOUND 0xC001000B | ||
22 | |||
23 | enum NDIS_DEVICE_POWER_STATE { | 18 | enum NDIS_DEVICE_POWER_STATE { |
24 | NdisDeviceStateUnspecified = 0, | 19 | NdisDeviceStateUnspecified = 0, |
25 | NdisDeviceStateD0, | 20 | NdisDeviceStateD0, |
@@ -35,11 +30,6 @@ struct NDIS_PM_WAKE_UP_CAPABILITIES { | |||
35 | enum NDIS_DEVICE_POWER_STATE MinLinkChangeWakeUp; | 30 | enum NDIS_DEVICE_POWER_STATE MinLinkChangeWakeUp; |
36 | }; | 31 | }; |
37 | 32 | ||
38 | /* NDIS_PNP_CAPABILITIES.Flags constants */ | ||
39 | #define NDIS_DEVICE_WAKE_UP_ENABLE 0x00000001 | ||
40 | #define NDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE 0x00000002 | ||
41 | #define NDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE 0x00000004 | ||
42 | |||
43 | struct NDIS_PNP_CAPABILITIES { | 33 | struct NDIS_PNP_CAPABILITIES { |
44 | __le32 Flags; | 34 | __le32 Flags; |
45 | struct NDIS_PM_WAKE_UP_CAPABILITIES WakeUpCapabilities; | 35 | struct NDIS_PM_WAKE_UP_CAPABILITIES WakeUpCapabilities; |
@@ -54,158 +44,4 @@ struct NDIS_PM_PACKET_PATTERN { | |||
54 | __le32 PatternFlags; | 44 | __le32 PatternFlags; |
55 | }; | 45 | }; |
56 | 46 | ||
57 | |||
58 | /* Required Object IDs (OIDs) */ | ||
59 | #define OID_GEN_SUPPORTED_LIST 0x00010101 | ||
60 | #define OID_GEN_HARDWARE_STATUS 0x00010102 | ||
61 | #define OID_GEN_MEDIA_SUPPORTED 0x00010103 | ||
62 | #define OID_GEN_MEDIA_IN_USE 0x00010104 | ||
63 | #define OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105 | ||
64 | #define OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106 | ||
65 | #define OID_GEN_LINK_SPEED 0x00010107 | ||
66 | #define OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108 | ||
67 | #define OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109 | ||
68 | #define OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A | ||
69 | #define OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B | ||
70 | #define OID_GEN_VENDOR_ID 0x0001010C | ||
71 | #define OID_GEN_VENDOR_DESCRIPTION 0x0001010D | ||
72 | #define OID_GEN_CURRENT_PACKET_FILTER 0x0001010E | ||
73 | #define OID_GEN_CURRENT_LOOKAHEAD 0x0001010F | ||
74 | #define OID_GEN_DRIVER_VERSION 0x00010110 | ||
75 | #define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111 | ||
76 | #define OID_GEN_PROTOCOL_OPTIONS 0x00010112 | ||
77 | #define OID_GEN_MAC_OPTIONS 0x00010113 | ||
78 | #define OID_GEN_MEDIA_CONNECT_STATUS 0x00010114 | ||
79 | #define OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115 | ||
80 | #define OID_GEN_VENDOR_DRIVER_VERSION 0x00010116 | ||
81 | #define OID_GEN_SUPPORTED_GUIDS 0x00010117 | ||
82 | #define OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118 | ||
83 | #define OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119 | ||
84 | #define OID_GEN_MACHINE_NAME 0x0001021A | ||
85 | #define OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021B | ||
86 | #define OID_GEN_VLAN_ID 0x0001021C | ||
87 | |||
88 | /* Optional OIDs */ | ||
89 | #define OID_GEN_MEDIA_CAPABILITIES 0x00010201 | ||
90 | #define OID_GEN_PHYSICAL_MEDIUM 0x00010202 | ||
91 | |||
92 | /* Required statistics OIDs */ | ||
93 | #define OID_GEN_XMIT_OK 0x00020101 | ||
94 | #define OID_GEN_RCV_OK 0x00020102 | ||
95 | #define OID_GEN_XMIT_ERROR 0x00020103 | ||
96 | #define OID_GEN_RCV_ERROR 0x00020104 | ||
97 | #define OID_GEN_RCV_NO_BUFFER 0x00020105 | ||
98 | |||
99 | /* Optional statistics OIDs */ | ||
100 | #define OID_GEN_DIRECTED_BYTES_XMIT 0x00020201 | ||
101 | #define OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202 | ||
102 | #define OID_GEN_MULTICAST_BYTES_XMIT 0x00020203 | ||
103 | #define OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204 | ||
104 | #define OID_GEN_BROADCAST_BYTES_XMIT 0x00020205 | ||
105 | #define OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206 | ||
106 | #define OID_GEN_DIRECTED_BYTES_RCV 0x00020207 | ||
107 | #define OID_GEN_DIRECTED_FRAMES_RCV 0x00020208 | ||
108 | #define OID_GEN_MULTICAST_BYTES_RCV 0x00020209 | ||
109 | #define OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A | ||
110 | #define OID_GEN_BROADCAST_BYTES_RCV 0x0002020B | ||
111 | #define OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C | ||
112 | #define OID_GEN_RCV_CRC_ERROR 0x0002020D | ||
113 | #define OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E | ||
114 | #define OID_GEN_GET_TIME_CAPS 0x0002020F | ||
115 | #define OID_GEN_GET_NETCARD_TIME 0x00020210 | ||
116 | #define OID_GEN_NETCARD_LOAD 0x00020211 | ||
117 | #define OID_GEN_DEVICE_PROFILE 0x00020212 | ||
118 | #define OID_GEN_INIT_TIME_MS 0x00020213 | ||
119 | #define OID_GEN_RESET_COUNTS 0x00020214 | ||
120 | #define OID_GEN_MEDIA_SENSE_COUNTS 0x00020215 | ||
121 | #define OID_GEN_FRIENDLY_NAME 0x00020216 | ||
122 | #define OID_GEN_MINIPORT_INFO 0x00020217 | ||
123 | #define OID_GEN_RESET_VERIFY_PARAMETERS 0x00020218 | ||
124 | |||
125 | /* IEEE 802.3 (Ethernet) OIDs */ | ||
126 | #define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001 | ||
127 | |||
128 | #define OID_802_3_PERMANENT_ADDRESS 0x01010101 | ||
129 | #define OID_802_3_CURRENT_ADDRESS 0x01010102 | ||
130 | #define OID_802_3_MULTICAST_LIST 0x01010103 | ||
131 | #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 | ||
132 | #define OID_802_3_MAC_OPTIONS 0x01010105 | ||
133 | #define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101 | ||
134 | #define OID_802_3_XMIT_ONE_COLLISION 0x01020102 | ||
135 | #define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103 | ||
136 | #define OID_802_3_XMIT_DEFERRED 0x01020201 | ||
137 | #define OID_802_3_XMIT_MAX_COLLISIONS 0x01020202 | ||
138 | #define OID_802_3_RCV_OVERRUN 0x01020203 | ||
139 | #define OID_802_3_XMIT_UNDERRUN 0x01020204 | ||
140 | #define OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205 | ||
141 | #define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206 | ||
142 | #define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207 | ||
143 | |||
144 | /* OID_GEN_MINIPORT_INFO constants */ | ||
145 | #define NDIS_MINIPORT_BUS_MASTER 0x00000001 | ||
146 | #define NDIS_MINIPORT_WDM_DRIVER 0x00000002 | ||
147 | #define NDIS_MINIPORT_SG_LIST 0x00000004 | ||
148 | #define NDIS_MINIPORT_SUPPORTS_MEDIA_QUERY 0x00000008 | ||
149 | #define NDIS_MINIPORT_INDICATES_PACKETS 0x00000010 | ||
150 | #define NDIS_MINIPORT_IGNORE_PACKET_QUEUE 0x00000020 | ||
151 | #define NDIS_MINIPORT_IGNORE_REQUEST_QUEUE 0x00000040 | ||
152 | #define NDIS_MINIPORT_IGNORE_TOKEN_RING_ERRORS 0x00000080 | ||
153 | #define NDIS_MINIPORT_INTERMEDIATE_DRIVER 0x00000100 | ||
154 | #define NDIS_MINIPORT_IS_NDIS_5 0x00000200 | ||
155 | #define NDIS_MINIPORT_IS_CO 0x00000400 | ||
156 | #define NDIS_MINIPORT_DESERIALIZE 0x00000800 | ||
157 | #define NDIS_MINIPORT_REQUIRES_MEDIA_POLLING 0x00001000 | ||
158 | #define NDIS_MINIPORT_SUPPORTS_MEDIA_SENSE 0x00002000 | ||
159 | #define NDIS_MINIPORT_NETBOOT_CARD 0x00004000 | ||
160 | #define NDIS_MINIPORT_PM_SUPPORTED 0x00008000 | ||
161 | #define NDIS_MINIPORT_SUPPORTS_MAC_ADDRESS_OVERWRITE 0x00010000 | ||
162 | #define NDIS_MINIPORT_USES_SAFE_BUFFER_APIS 0x00020000 | ||
163 | #define NDIS_MINIPORT_HIDDEN 0x00040000 | ||
164 | #define NDIS_MINIPORT_SWENUM 0x00080000 | ||
165 | #define NDIS_MINIPORT_SURPRISE_REMOVE_OK 0x00100000 | ||
166 | #define NDIS_MINIPORT_NO_HALT_ON_SUSPEND 0x00200000 | ||
167 | #define NDIS_MINIPORT_HARDWARE_DEVICE 0x00400000 | ||
168 | #define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000 | ||
169 | #define NDIS_MINIPORT_64BITS_DMA 0x01000000 | ||
170 | |||
171 | #define NDIS_MEDIUM_802_3 0x00000000 | ||
172 | #define NDIS_MEDIUM_802_5 0x00000001 | ||
173 | #define NDIS_MEDIUM_FDDI 0x00000002 | ||
174 | #define NDIS_MEDIUM_WAN 0x00000003 | ||
175 | #define NDIS_MEDIUM_LOCAL_TALK 0x00000004 | ||
176 | #define NDIS_MEDIUM_DIX 0x00000005 | ||
177 | #define NDIS_MEDIUM_ARCENT_RAW 0x00000006 | ||
178 | #define NDIS_MEDIUM_ARCENT_878_2 0x00000007 | ||
179 | #define NDIS_MEDIUM_ATM 0x00000008 | ||
180 | #define NDIS_MEDIUM_WIRELESS_LAN 0x00000009 | ||
181 | #define NDIS_MEDIUM_IRDA 0x0000000A | ||
182 | #define NDIS_MEDIUM_BPC 0x0000000B | ||
183 | #define NDIS_MEDIUM_CO_WAN 0x0000000C | ||
184 | #define NDIS_MEDIUM_1394 0x0000000D | ||
185 | |||
186 | #define NDIS_PACKET_TYPE_DIRECTED 0x00000001 | ||
187 | #define NDIS_PACKET_TYPE_MULTICAST 0x00000002 | ||
188 | #define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004 | ||
189 | #define NDIS_PACKET_TYPE_BROADCAST 0x00000008 | ||
190 | #define NDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010 | ||
191 | #define NDIS_PACKET_TYPE_PROMISCUOUS 0x00000020 | ||
192 | #define NDIS_PACKET_TYPE_SMT 0x00000040 | ||
193 | #define NDIS_PACKET_TYPE_ALL_LOCAL 0x00000080 | ||
194 | #define NDIS_PACKET_TYPE_GROUP 0x00000100 | ||
195 | #define NDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00000200 | ||
196 | #define NDIS_PACKET_TYPE_FUNCTIONAL 0x00000400 | ||
197 | #define NDIS_PACKET_TYPE_MAC_FRAME 0x00000800 | ||
198 | |||
199 | #define NDIS_MEDIA_STATE_CONNECTED 0x00000000 | ||
200 | #define NDIS_MEDIA_STATE_DISCONNECTED 0x00000001 | ||
201 | |||
202 | #define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001 | ||
203 | #define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002 | ||
204 | #define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004 | ||
205 | #define NDIS_MAC_OPTION_NO_LOOPBACK 0x00000008 | ||
206 | #define NDIS_MAC_OPTION_FULL_DUPLEX 0x00000010 | ||
207 | #define NDIS_MAC_OPTION_EOTX_INDICATION 0x00000020 | ||
208 | #define NDIS_MAC_OPTION_8021P_PRIORITY 0x00000040 | ||
209 | #define NDIS_MAC_OPTION_RESERVED 0x80000000 | ||
210 | |||
211 | #endif /* _LINUX_NDIS_H */ | 47 | #endif /* _LINUX_NDIS_H */ |
diff --git a/drivers/usb/gadget/rndis.h b/drivers/usb/gadget/rndis.h index 907c33008118..0647f2f34e89 100644 --- a/drivers/usb/gadget/rndis.h +++ b/drivers/usb/gadget/rndis.h | |||
@@ -15,58 +15,12 @@ | |||
15 | #ifndef _LINUX_RNDIS_H | 15 | #ifndef _LINUX_RNDIS_H |
16 | #define _LINUX_RNDIS_H | 16 | #define _LINUX_RNDIS_H |
17 | 17 | ||
18 | #include <linux/rndis.h> | ||
18 | #include "ndis.h" | 19 | #include "ndis.h" |
19 | 20 | ||
20 | #define RNDIS_MAXIMUM_FRAME_SIZE 1518 | 21 | #define RNDIS_MAXIMUM_FRAME_SIZE 1518 |
21 | #define RNDIS_MAX_TOTAL_SIZE 1558 | 22 | #define RNDIS_MAX_TOTAL_SIZE 1558 |
22 | 23 | ||
23 | /* Remote NDIS Versions */ | ||
24 | #define RNDIS_MAJOR_VERSION 1 | ||
25 | #define RNDIS_MINOR_VERSION 0 | ||
26 | |||
27 | /* Status Values */ | ||
28 | #define RNDIS_STATUS_SUCCESS 0x00000000U /* Success */ | ||
29 | #define RNDIS_STATUS_FAILURE 0xC0000001U /* Unspecified error */ | ||
30 | #define RNDIS_STATUS_INVALID_DATA 0xC0010015U /* Invalid data */ | ||
31 | #define RNDIS_STATUS_NOT_SUPPORTED 0xC00000BBU /* Unsupported request */ | ||
32 | #define RNDIS_STATUS_MEDIA_CONNECT 0x4001000BU /* Device connected */ | ||
33 | #define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000CU /* Device disconnected */ | ||
34 | /* For all not specified status messages: | ||
35 | * RNDIS_STATUS_Xxx -> NDIS_STATUS_Xxx | ||
36 | */ | ||
37 | |||
38 | /* Message Set for Connectionless (802.3) Devices */ | ||
39 | #define REMOTE_NDIS_PACKET_MSG 0x00000001U | ||
40 | #define REMOTE_NDIS_INITIALIZE_MSG 0x00000002U /* Initialize device */ | ||
41 | #define REMOTE_NDIS_HALT_MSG 0x00000003U | ||
42 | #define REMOTE_NDIS_QUERY_MSG 0x00000004U | ||
43 | #define REMOTE_NDIS_SET_MSG 0x00000005U | ||
44 | #define REMOTE_NDIS_RESET_MSG 0x00000006U | ||
45 | #define REMOTE_NDIS_INDICATE_STATUS_MSG 0x00000007U | ||
46 | #define REMOTE_NDIS_KEEPALIVE_MSG 0x00000008U | ||
47 | |||
48 | /* Message completion */ | ||
49 | #define REMOTE_NDIS_INITIALIZE_CMPLT 0x80000002U | ||
50 | #define REMOTE_NDIS_QUERY_CMPLT 0x80000004U | ||
51 | #define REMOTE_NDIS_SET_CMPLT 0x80000005U | ||
52 | #define REMOTE_NDIS_RESET_CMPLT 0x80000006U | ||
53 | #define REMOTE_NDIS_KEEPALIVE_CMPLT 0x80000008U | ||
54 | |||
55 | /* Device Flags */ | ||
56 | #define RNDIS_DF_CONNECTIONLESS 0x00000001U | ||
57 | #define RNDIS_DF_CONNECTION_ORIENTED 0x00000002U | ||
58 | |||
59 | #define RNDIS_MEDIUM_802_3 0x00000000U | ||
60 | |||
61 | /* from drivers/net/sk98lin/h/skgepnmi.h */ | ||
62 | #define OID_PNP_CAPABILITIES 0xFD010100 | ||
63 | #define OID_PNP_SET_POWER 0xFD010101 | ||
64 | #define OID_PNP_QUERY_POWER 0xFD010102 | ||
65 | #define OID_PNP_ADD_WAKE_UP_PATTERN 0xFD010103 | ||
66 | #define OID_PNP_REMOVE_WAKE_UP_PATTERN 0xFD010104 | ||
67 | #define OID_PNP_ENABLE_WAKE_UP 0xFD010106 | ||
68 | |||
69 | |||
70 | typedef struct rndis_init_msg_type | 24 | typedef struct rndis_init_msg_type |
71 | { | 25 | { |
72 | __le32 MessageType; | 26 | __le32 MessageType; |
diff --git a/include/linux/rndis.h b/include/linux/rndis.h new file mode 100644 index 000000000000..430d72eefc09 --- /dev/null +++ b/include/linux/rndis.h | |||
@@ -0,0 +1,561 @@ | |||
1 | /* From include/linux/usb/rndis_host.h */ | ||
2 | |||
3 | #define RNDIS_MSG_COMPLETION 0x80000000 | ||
4 | |||
5 | /* codes for "msg_type" field of rndis messages; | ||
6 | * only the data channel uses packet messages (maybe batched); | ||
7 | * everything else goes on the control channel. | ||
8 | */ | ||
9 | #define RNDIS_MSG_PACKET 0x00000001 /* 1-N packets */ | ||
10 | #define RNDIS_MSG_INIT 0x00000002 | ||
11 | #define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) | ||
12 | #define RNDIS_MSG_HALT 0x00000003 | ||
13 | #define RNDIS_MSG_QUERY 0x00000004 | ||
14 | #define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION) | ||
15 | #define RNDIS_MSG_SET 0x00000005 | ||
16 | #define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION) | ||
17 | #define RNDIS_MSG_RESET 0x00000006 | ||
18 | #define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION) | ||
19 | #define RNDIS_MSG_INDICATE 0x00000007 | ||
20 | #define RNDIS_MSG_KEEPALIVE 0x00000008 | ||
21 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) | ||
22 | |||
23 | |||
24 | /* codes for "status" field of completion messages */ | ||
25 | #define RNDIS_STATUS_SUCCESS 0x00000000 | ||
26 | #define RNDIS_STATUS_FAILURE 0xc0000001 | ||
27 | #define RNDIS_STATUS_INVALID_DATA 0xc0010015 | ||
28 | #define RNDIS_STATUS_NOT_SUPPORTED 0xc00000bb | ||
29 | #define RNDIS_STATUS_MEDIA_CONNECT 0x4001000b | ||
30 | #define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000c | ||
31 | #define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION 0x40010012 | ||
32 | |||
33 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ | ||
34 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED 0x00000000 | ||
35 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN 0x00000001 | ||
36 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM 0x00000002 | ||
37 | #define RNDIS_PHYSICAL_MEDIUM_PHONE_LINE 0x00000003 | ||
38 | #define RNDIS_PHYSICAL_MEDIUM_POWER_LINE 0x00000004 | ||
39 | #define RNDIS_PHYSICAL_MEDIUM_DSL 0x00000005 | ||
40 | #define RNDIS_PHYSICAL_MEDIUM_FIBRE_CHANNEL 0x00000006 | ||
41 | #define RNDIS_PHYSICAL_MEDIUM_1394 0x00000007 | ||
42 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN 0x00000008 | ||
43 | #define RNDIS_PHYSICAL_MEDIUM_MAX 0x00000009 | ||
44 | |||
45 | /* NOTE: about 30 OIDs are "mandatory" for peripherals to support ... and | ||
46 | * there are gobs more that may optionally be supported. We'll avoid as much | ||
47 | * of that mess as possible. | ||
48 | */ | ||
49 | #define OID_802_3_PERMANENT_ADDRESS 0x01010101 | ||
50 | #define OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106 | ||
51 | #define OID_GEN_CURRENT_PACKET_FILTER 0x0001010e | ||
52 | #define OID_GEN_PHYSICAL_MEDIUM 0x00010202 | ||
53 | |||
54 | /* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */ | ||
55 | #define RNDIS_PACKET_TYPE_DIRECTED 0x00000001 | ||
56 | #define RNDIS_PACKET_TYPE_MULTICAST 0x00000002 | ||
57 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004 | ||
58 | #define RNDIS_PACKET_TYPE_BROADCAST 0x00000008 | ||
59 | #define RNDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010 | ||
60 | #define RNDIS_PACKET_TYPE_PROMISCUOUS 0x00000020 | ||
61 | #define RNDIS_PACKET_TYPE_SMT 0x00000040 | ||
62 | #define RNDIS_PACKET_TYPE_ALL_LOCAL 0x00000080 | ||
63 | #define RNDIS_PACKET_TYPE_GROUP 0x00001000 | ||
64 | #define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00002000 | ||
65 | #define RNDIS_PACKET_TYPE_FUNCTIONAL 0x00004000 | ||
66 | #define RNDIS_PACKET_TYPE_MAC_FRAME 0x00008000 | ||
67 | |||
68 | /* From drivers/usb/gadget/ndis.h */ | ||
69 | |||
70 | #define NDIS_STATUS_MULTICAST_FULL 0xC0010009 | ||
71 | #define NDIS_STATUS_MULTICAST_EXISTS 0xC001000A | ||
72 | #define NDIS_STATUS_MULTICAST_NOT_FOUND 0xC001000B | ||
73 | |||
74 | /* NDIS_PNP_CAPABILITIES.Flags constants */ | ||
75 | #define NDIS_DEVICE_WAKE_UP_ENABLE 0x00000001 | ||
76 | #define NDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE 0x00000002 | ||
77 | #define NDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE 0x00000004 | ||
78 | |||
79 | /* Required Object IDs (OIDs) */ | ||
80 | #define OID_GEN_SUPPORTED_LIST 0x00010101 | ||
81 | #define OID_GEN_HARDWARE_STATUS 0x00010102 | ||
82 | #define OID_GEN_MEDIA_SUPPORTED 0x00010103 | ||
83 | #define OID_GEN_MEDIA_IN_USE 0x00010104 | ||
84 | #define OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105 | ||
85 | #define OID_GEN_LINK_SPEED 0x00010107 | ||
86 | #define OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108 | ||
87 | #define OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109 | ||
88 | #define OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A | ||
89 | #define OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B | ||
90 | #define OID_GEN_VENDOR_ID 0x0001010C | ||
91 | #define OID_GEN_VENDOR_DESCRIPTION 0x0001010D | ||
92 | #define OID_GEN_CURRENT_LOOKAHEAD 0x0001010F | ||
93 | #define OID_GEN_DRIVER_VERSION 0x00010110 | ||
94 | #define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111 | ||
95 | #define OID_GEN_PROTOCOL_OPTIONS 0x00010112 | ||
96 | #define OID_GEN_MAC_OPTIONS 0x00010113 | ||
97 | #define OID_GEN_MEDIA_CONNECT_STATUS 0x00010114 | ||
98 | #define OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115 | ||
99 | #define OID_GEN_VENDOR_DRIVER_VERSION 0x00010116 | ||
100 | #define OID_GEN_SUPPORTED_GUIDS 0x00010117 | ||
101 | #define OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118 | ||
102 | #define OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119 | ||
103 | #define OID_GEN_MACHINE_NAME 0x0001021A | ||
104 | #define OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021B | ||
105 | #define OID_GEN_VLAN_ID 0x0001021C | ||
106 | |||
107 | /* Optional OIDs */ | ||
108 | #define OID_GEN_MEDIA_CAPABILITIES 0x00010201 | ||
109 | |||
110 | /* Required statistics OIDs */ | ||
111 | #define OID_GEN_XMIT_OK 0x00020101 | ||
112 | #define OID_GEN_RCV_OK 0x00020102 | ||
113 | #define OID_GEN_XMIT_ERROR 0x00020103 | ||
114 | #define OID_GEN_RCV_ERROR 0x00020104 | ||
115 | #define OID_GEN_RCV_NO_BUFFER 0x00020105 | ||
116 | |||
117 | /* Optional statistics OIDs */ | ||
118 | #define OID_GEN_DIRECTED_BYTES_XMIT 0x00020201 | ||
119 | #define OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202 | ||
120 | #define OID_GEN_MULTICAST_BYTES_XMIT 0x00020203 | ||
121 | #define OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204 | ||
122 | #define OID_GEN_BROADCAST_BYTES_XMIT 0x00020205 | ||
123 | #define OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206 | ||
124 | #define OID_GEN_DIRECTED_BYTES_RCV 0x00020207 | ||
125 | #define OID_GEN_DIRECTED_FRAMES_RCV 0x00020208 | ||
126 | #define OID_GEN_MULTICAST_BYTES_RCV 0x00020209 | ||
127 | #define OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A | ||
128 | #define OID_GEN_BROADCAST_BYTES_RCV 0x0002020B | ||
129 | #define OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C | ||
130 | #define OID_GEN_RCV_CRC_ERROR 0x0002020D | ||
131 | #define OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E | ||
132 | #define OID_GEN_GET_TIME_CAPS 0x0002020F | ||
133 | #define OID_GEN_GET_NETCARD_TIME 0x00020210 | ||
134 | #define OID_GEN_NETCARD_LOAD 0x00020211 | ||
135 | #define OID_GEN_DEVICE_PROFILE 0x00020212 | ||
136 | #define OID_GEN_INIT_TIME_MS 0x00020213 | ||
137 | #define OID_GEN_RESET_COUNTS 0x00020214 | ||
138 | #define OID_GEN_MEDIA_SENSE_COUNTS 0x00020215 | ||
139 | #define OID_GEN_FRIENDLY_NAME 0x00020216 | ||
140 | #define OID_GEN_MINIPORT_INFO 0x00020217 | ||
141 | #define OID_GEN_RESET_VERIFY_PARAMETERS 0x00020218 | ||
142 | |||
143 | /* IEEE 802.3 (Ethernet) OIDs */ | ||
144 | #define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001 | ||
145 | |||
146 | #define OID_802_3_CURRENT_ADDRESS 0x01010102 | ||
147 | #define OID_802_3_MULTICAST_LIST 0x01010103 | ||
148 | #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 | ||
149 | #define OID_802_3_MAC_OPTIONS 0x01010105 | ||
150 | #define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101 | ||
151 | #define OID_802_3_XMIT_ONE_COLLISION 0x01020102 | ||
152 | #define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103 | ||
153 | #define OID_802_3_XMIT_DEFERRED 0x01020201 | ||
154 | #define OID_802_3_XMIT_MAX_COLLISIONS 0x01020202 | ||
155 | #define OID_802_3_RCV_OVERRUN 0x01020203 | ||
156 | #define OID_802_3_XMIT_UNDERRUN 0x01020204 | ||
157 | #define OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205 | ||
158 | #define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206 | ||
159 | #define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207 | ||
160 | |||
161 | /* OID_GEN_MINIPORT_INFO constants */ | ||
162 | #define NDIS_MINIPORT_BUS_MASTER 0x00000001 | ||
163 | #define NDIS_MINIPORT_WDM_DRIVER 0x00000002 | ||
164 | #define NDIS_MINIPORT_SG_LIST 0x00000004 | ||
165 | #define NDIS_MINIPORT_SUPPORTS_MEDIA_QUERY 0x00000008 | ||
166 | #define NDIS_MINIPORT_INDICATES_PACKETS 0x00000010 | ||
167 | #define NDIS_MINIPORT_IGNORE_PACKET_QUEUE 0x00000020 | ||
168 | #define NDIS_MINIPORT_IGNORE_REQUEST_QUEUE 0x00000040 | ||
169 | #define NDIS_MINIPORT_IGNORE_TOKEN_RING_ERRORS 0x00000080 | ||
170 | #define NDIS_MINIPORT_INTERMEDIATE_DRIVER 0x00000100 | ||
171 | #define NDIS_MINIPORT_IS_NDIS_5 0x00000200 | ||
172 | #define NDIS_MINIPORT_IS_CO 0x00000400 | ||
173 | #define NDIS_MINIPORT_DESERIALIZE 0x00000800 | ||
174 | #define NDIS_MINIPORT_REQUIRES_MEDIA_POLLING 0x00001000 | ||
175 | #define NDIS_MINIPORT_SUPPORTS_MEDIA_SENSE 0x00002000 | ||
176 | #define NDIS_MINIPORT_NETBOOT_CARD 0x00004000 | ||
177 | #define NDIS_MINIPORT_PM_SUPPORTED 0x00008000 | ||
178 | #define NDIS_MINIPORT_SUPPORTS_MAC_ADDRESS_OVERWRITE 0x00010000 | ||
179 | #define NDIS_MINIPORT_USES_SAFE_BUFFER_APIS 0x00020000 | ||
180 | #define NDIS_MINIPORT_HIDDEN 0x00040000 | ||
181 | #define NDIS_MINIPORT_SWENUM 0x00080000 | ||
182 | #define NDIS_MINIPORT_SURPRISE_REMOVE_OK 0x00100000 | ||
183 | #define NDIS_MINIPORT_NO_HALT_ON_SUSPEND 0x00200000 | ||
184 | #define NDIS_MINIPORT_HARDWARE_DEVICE 0x00400000 | ||
185 | #define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000 | ||
186 | #define NDIS_MINIPORT_64BITS_DMA 0x01000000 | ||
187 | |||
188 | #define NDIS_MEDIUM_802_3 0x00000000 | ||
189 | #define NDIS_MEDIUM_802_5 0x00000001 | ||
190 | #define NDIS_MEDIUM_FDDI 0x00000002 | ||
191 | #define NDIS_MEDIUM_WAN 0x00000003 | ||
192 | #define NDIS_MEDIUM_LOCAL_TALK 0x00000004 | ||
193 | #define NDIS_MEDIUM_DIX 0x00000005 | ||
194 | #define NDIS_MEDIUM_ARCENT_RAW 0x00000006 | ||
195 | #define NDIS_MEDIUM_ARCENT_878_2 0x00000007 | ||
196 | #define NDIS_MEDIUM_ATM 0x00000008 | ||
197 | #define NDIS_MEDIUM_WIRELESS_LAN 0x00000009 | ||
198 | #define NDIS_MEDIUM_IRDA 0x0000000A | ||
199 | #define NDIS_MEDIUM_BPC 0x0000000B | ||
200 | #define NDIS_MEDIUM_CO_WAN 0x0000000C | ||
201 | #define NDIS_MEDIUM_1394 0x0000000D | ||
202 | |||
203 | #define NDIS_PACKET_TYPE_DIRECTED 0x00000001 | ||
204 | #define NDIS_PACKET_TYPE_MULTICAST 0x00000002 | ||
205 | #define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004 | ||
206 | #define NDIS_PACKET_TYPE_BROADCAST 0x00000008 | ||
207 | #define NDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010 | ||
208 | #define NDIS_PACKET_TYPE_PROMISCUOUS 0x00000020 | ||
209 | #define NDIS_PACKET_TYPE_SMT 0x00000040 | ||
210 | #define NDIS_PACKET_TYPE_ALL_LOCAL 0x00000080 | ||
211 | #define NDIS_PACKET_TYPE_GROUP 0x00000100 | ||
212 | #define NDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00000200 | ||
213 | #define NDIS_PACKET_TYPE_FUNCTIONAL 0x00000400 | ||
214 | #define NDIS_PACKET_TYPE_MAC_FRAME 0x00000800 | ||
215 | |||
216 | #define NDIS_MEDIA_STATE_CONNECTED 0x00000000 | ||
217 | #define NDIS_MEDIA_STATE_DISCONNECTED 0x00000001 | ||
218 | |||
219 | #define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001 | ||
220 | #define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002 | ||
221 | #define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004 | ||
222 | #define NDIS_MAC_OPTION_NO_LOOPBACK 0x00000008 | ||
223 | #define NDIS_MAC_OPTION_FULL_DUPLEX 0x00000010 | ||
224 | #define NDIS_MAC_OPTION_EOTX_INDICATION 0x00000020 | ||
225 | #define NDIS_MAC_OPTION_8021P_PRIORITY 0x00000040 | ||
226 | #define NDIS_MAC_OPTION_RESERVED 0x80000000 | ||
227 | |||
228 | /* From drivers/usb/gadget/rndis.h */ | ||
229 | |||
230 | /* Remote NDIS Versions */ | ||
231 | #define RNDIS_MAJOR_VERSION 0x00000001 | ||
232 | #define RNDIS_MINOR_VERSION 0x00000000 | ||
233 | |||
234 | /* For all not specified status messages: | ||
235 | * RNDIS_STATUS_Xxx -> NDIS_STATUS_Xxx | ||
236 | */ | ||
237 | |||
238 | /* Message Set for Connectionless (802.3) Devices */ | ||
239 | #define REMOTE_NDIS_PACKET_MSG 0x00000001U | ||
240 | #define REMOTE_NDIS_INITIALIZE_MSG 0x00000002U /* Initialize device */ | ||
241 | #define REMOTE_NDIS_HALT_MSG 0x00000003U | ||
242 | #define REMOTE_NDIS_QUERY_MSG 0x00000004U | ||
243 | #define REMOTE_NDIS_SET_MSG 0x00000005U | ||
244 | #define REMOTE_NDIS_RESET_MSG 0x00000006U | ||
245 | #define REMOTE_NDIS_INDICATE_STATUS_MSG 0x00000007U | ||
246 | #define REMOTE_NDIS_KEEPALIVE_MSG 0x00000008U | ||
247 | |||
248 | /* Message completion */ | ||
249 | #define REMOTE_NDIS_INITIALIZE_CMPLT 0x80000002U | ||
250 | #define REMOTE_NDIS_QUERY_CMPLT 0x80000004U | ||
251 | #define REMOTE_NDIS_SET_CMPLT 0x80000005U | ||
252 | #define REMOTE_NDIS_RESET_CMPLT 0x80000006U | ||
253 | #define REMOTE_NDIS_KEEPALIVE_CMPLT 0x80000008U | ||
254 | |||
255 | /* Device Flags */ | ||
256 | #define RNDIS_DF_CONNECTIONLESS 0x00000001U | ||
257 | #define RNDIS_DF_CONNECTION_ORIENTED 0x00000002U | ||
258 | #define RNDIS_DF_RAW_DATA 0x00000004U | ||
259 | |||
260 | /* from drivers/net/sk98lin/h/skgepnmi.h */ | ||
261 | #define OID_PNP_CAPABILITIES 0xFD010100 | ||
262 | #define OID_PNP_SET_POWER 0xFD010101 | ||
263 | #define OID_PNP_QUERY_POWER 0xFD010102 | ||
264 | #define OID_PNP_ADD_WAKE_UP_PATTERN 0xFD010103 | ||
265 | #define OID_PNP_REMOVE_WAKE_UP_PATTERN 0xFD010104 | ||
266 | #define OID_PNP_ENABLE_WAKE_UP 0xFD010106 | ||
267 | |||
268 | /* From drivers/net/hyperv/hyperv_net.h */ | ||
269 | |||
270 | /* Status codes */ | ||
271 | |||
272 | #ifndef STATUS_SUCCESS | ||
273 | #define STATUS_SUCCESS (0x00000000L) | ||
274 | #endif | ||
275 | |||
276 | #ifndef STATUS_UNSUCCESSFUL | ||
277 | #define STATUS_UNSUCCESSFUL (0xC0000001L) | ||
278 | #endif | ||
279 | |||
280 | #ifndef STATUS_PENDING | ||
281 | #define STATUS_PENDING (0x00000103L) | ||
282 | #endif | ||
283 | |||
284 | #ifndef STATUS_INSUFFICIENT_RESOURCES | ||
285 | #define STATUS_INSUFFICIENT_RESOURCES (0xC000009AL) | ||
286 | #endif | ||
287 | |||
288 | #ifndef STATUS_BUFFER_OVERFLOW | ||
289 | #define STATUS_BUFFER_OVERFLOW (0x80000005L) | ||
290 | #endif | ||
291 | |||
292 | #ifndef STATUS_NOT_SUPPORTED | ||
293 | #define STATUS_NOT_SUPPORTED (0xC00000BBL) | ||
294 | #endif | ||
295 | |||
296 | #define RNDIS_STATUS_PENDING (STATUS_PENDING) | ||
297 | #define RNDIS_STATUS_NOT_RECOGNIZED (0x00010001L) | ||
298 | #define RNDIS_STATUS_NOT_COPIED (0x00010002L) | ||
299 | #define RNDIS_STATUS_NOT_ACCEPTED (0x00010003L) | ||
300 | #define RNDIS_STATUS_CALL_ACTIVE (0x00010007L) | ||
301 | |||
302 | #define RNDIS_STATUS_ONLINE (0x40010003L) | ||
303 | #define RNDIS_STATUS_RESET_START (0x40010004L) | ||
304 | #define RNDIS_STATUS_RESET_END (0x40010005L) | ||
305 | #define RNDIS_STATUS_RING_STATUS (0x40010006L) | ||
306 | #define RNDIS_STATUS_CLOSED (0x40010007L) | ||
307 | #define RNDIS_STATUS_WAN_LINE_UP (0x40010008L) | ||
308 | #define RNDIS_STATUS_WAN_LINE_DOWN (0x40010009L) | ||
309 | #define RNDIS_STATUS_WAN_FRAGMENT (0x4001000AL) | ||
310 | #define RNDIS_STATUS_HARDWARE_LINE_UP (0x4001000DL) | ||
311 | #define RNDIS_STATUS_HARDWARE_LINE_DOWN (0x4001000EL) | ||
312 | #define RNDIS_STATUS_INTERFACE_UP (0x4001000FL) | ||
313 | #define RNDIS_STATUS_INTERFACE_DOWN (0x40010010L) | ||
314 | #define RNDIS_STATUS_MEDIA_BUSY (0x40010011L) | ||
315 | #define RNDIS_STATUS_WW_INDICATION RDIA_SPECIFIC_INDICATION | ||
316 | #define RNDIS_STATUS_LINK_SPEED_CHANGE (0x40010013L) | ||
317 | |||
318 | #define RNDIS_STATUS_NOT_RESETTABLE (0x80010001L) | ||
319 | #define RNDIS_STATUS_SOFT_ERRORS (0x80010003L) | ||
320 | #define RNDIS_STATUS_HARD_ERRORS (0x80010004L) | ||
321 | #define RNDIS_STATUS_BUFFER_OVERFLOW (STATUS_BUFFER_OVERFLOW) | ||
322 | |||
323 | #define RNDIS_STATUS_RESOURCES (STATUS_INSUFFICIENT_RESOURCES) | ||
324 | #define RNDIS_STATUS_CLOSING (0xC0010002L) | ||
325 | #define RNDIS_STATUS_BAD_VERSION (0xC0010004L) | ||
326 | #define RNDIS_STATUS_BAD_CHARACTERISTICS (0xC0010005L) | ||
327 | #define RNDIS_STATUS_ADAPTER_NOT_FOUND (0xC0010006L) | ||
328 | #define RNDIS_STATUS_OPEN_FAILED (0xC0010007L) | ||
329 | #define RNDIS_STATUS_DEVICE_FAILED (0xC0010008L) | ||
330 | #define RNDIS_STATUS_MULTICAST_FULL (0xC0010009L) | ||
331 | #define RNDIS_STATUS_MULTICAST_EXISTS (0xC001000AL) | ||
332 | #define RNDIS_STATUS_MULTICAST_NOT_FOUND (0xC001000BL) | ||
333 | #define RNDIS_STATUS_REQUEST_ABORTED (0xC001000CL) | ||
334 | #define RNDIS_STATUS_RESET_IN_PROGRESS (0xC001000DL) | ||
335 | #define RNDIS_STATUS_CLOSING_INDICATING (0xC001000EL) | ||
336 | #define RNDIS_STATUS_INVALID_PACKET (0xC001000FL) | ||
337 | #define RNDIS_STATUS_OPEN_LIST_FULL (0xC0010010L) | ||
338 | #define RNDIS_STATUS_ADAPTER_NOT_READY (0xC0010011L) | ||
339 | #define RNDIS_STATUS_ADAPTER_NOT_OPEN (0xC0010012L) | ||
340 | #define RNDIS_STATUS_NOT_INDICATING (0xC0010013L) | ||
341 | #define RNDIS_STATUS_INVALID_LENGTH (0xC0010014L) | ||
342 | #define RNDIS_STATUS_BUFFER_TOO_SHORT (0xC0010016L) | ||
343 | #define RNDIS_STATUS_INVALID_OID (0xC0010017L) | ||
344 | #define RNDIS_STATUS_ADAPTER_REMOVED (0xC0010018L) | ||
345 | #define RNDIS_STATUS_UNSUPPORTED_MEDIA (0xC0010019L) | ||
346 | #define RNDIS_STATUS_GROUP_ADDRESS_IN_USE (0xC001001AL) | ||
347 | #define RNDIS_STATUS_FILE_NOT_FOUND (0xC001001BL) | ||
348 | #define RNDIS_STATUS_ERROR_READING_FILE (0xC001001CL) | ||
349 | #define RNDIS_STATUS_ALREADY_MAPPED (0xC001001DL) | ||
350 | #define RNDIS_STATUS_RESOURCE_CONFLICT (0xC001001EL) | ||
351 | #define RNDIS_STATUS_NO_CABLE (0xC001001FL) | ||
352 | |||
353 | #define RNDIS_STATUS_INVALID_SAP (0xC0010020L) | ||
354 | #define RNDIS_STATUS_SAP_IN_USE (0xC0010021L) | ||
355 | #define RNDIS_STATUS_INVALID_ADDRESS (0xC0010022L) | ||
356 | #define RNDIS_STATUS_VC_NOT_ACTIVATED (0xC0010023L) | ||
357 | #define RNDIS_STATUS_DEST_OUT_OF_ORDER (0xC0010024L) | ||
358 | #define RNDIS_STATUS_VC_NOT_AVAILABLE (0xC0010025L) | ||
359 | #define RNDIS_STATUS_CELLRATE_NOT_AVAILABLE (0xC0010026L) | ||
360 | #define RNDIS_STATUS_INCOMPATABLE_QOS (0xC0010027L) | ||
361 | #define RNDIS_STATUS_AAL_PARAMS_UNSUPPORTED (0xC0010028L) | ||
362 | #define RNDIS_STATUS_NO_ROUTE_TO_DESTINATION (0xC0010029L) | ||
363 | |||
364 | #define RNDIS_STATUS_TOKEN_RING_OPEN_ERROR (0xC0011000L) | ||
365 | |||
366 | /* Object Identifiers used by NdisRequest Query/Set Information */ | ||
367 | /* General Objects */ | ||
368 | #define RNDIS_OID_GEN_SUPPORTED_LIST 0x00010101 | ||
369 | #define RNDIS_OID_GEN_HARDWARE_STATUS 0x00010102 | ||
370 | #define RNDIS_OID_GEN_MEDIA_SUPPORTED 0x00010103 | ||
371 | #define RNDIS_OID_GEN_MEDIA_IN_USE 0x00010104 | ||
372 | #define RNDIS_OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105 | ||
373 | #define RNDIS_OID_GEN_LINK_SPEED 0x00010107 | ||
374 | #define RNDIS_OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108 | ||
375 | #define RNDIS_OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109 | ||
376 | #define RNDIS_OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A | ||
377 | #define RNDIS_OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B | ||
378 | #define RNDIS_OID_GEN_VENDOR_ID 0x0001010C | ||
379 | #define RNDIS_OID_GEN_VENDOR_DESCRIPTION 0x0001010D | ||
380 | #define RNDIS_OID_GEN_CURRENT_PACKET_FILTER 0x0001010E | ||
381 | #define RNDIS_OID_GEN_CURRENT_LOOKAHEAD 0x0001010F | ||
382 | #define RNDIS_OID_GEN_DRIVER_VERSION 0x00010110 | ||
383 | #define RNDIS_OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111 | ||
384 | #define RNDIS_OID_GEN_PROTOCOL_OPTIONS 0x00010112 | ||
385 | #define RNDIS_OID_GEN_MAC_OPTIONS 0x00010113 | ||
386 | #define RNDIS_OID_GEN_MEDIA_CONNECT_STATUS 0x00010114 | ||
387 | #define RNDIS_OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115 | ||
388 | #define RNDIS_OID_GEN_VENDOR_DRIVER_VERSION 0x00010116 | ||
389 | #define RNDIS_OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118 | ||
390 | #define RNDIS_OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119 | ||
391 | #define RNDIS_OID_GEN_MACHINE_NAME 0x0001021A | ||
392 | |||
393 | #define RNDIS_OID_GEN_XMIT_OK 0x00020101 | ||
394 | #define RNDIS_OID_GEN_RCV_OK 0x00020102 | ||
395 | #define RNDIS_OID_GEN_XMIT_ERROR 0x00020103 | ||
396 | #define RNDIS_OID_GEN_RCV_ERROR 0x00020104 | ||
397 | #define RNDIS_OID_GEN_RCV_NO_BUFFER 0x00020105 | ||
398 | |||
399 | #define RNDIS_OID_GEN_DIRECTED_BYTES_XMIT 0x00020201 | ||
400 | #define RNDIS_OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202 | ||
401 | #define RNDIS_OID_GEN_MULTICAST_BYTES_XMIT 0x00020203 | ||
402 | #define RNDIS_OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204 | ||
403 | #define RNDIS_OID_GEN_BROADCAST_BYTES_XMIT 0x00020205 | ||
404 | #define RNDIS_OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206 | ||
405 | #define RNDIS_OID_GEN_DIRECTED_BYTES_RCV 0x00020207 | ||
406 | #define RNDIS_OID_GEN_DIRECTED_FRAMES_RCV 0x00020208 | ||
407 | #define RNDIS_OID_GEN_MULTICAST_BYTES_RCV 0x00020209 | ||
408 | #define RNDIS_OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A | ||
409 | #define RNDIS_OID_GEN_BROADCAST_BYTES_RCV 0x0002020B | ||
410 | #define RNDIS_OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C | ||
411 | |||
412 | #define RNDIS_OID_GEN_RCV_CRC_ERROR 0x0002020D | ||
413 | #define RNDIS_OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E | ||
414 | |||
415 | #define RNDIS_OID_GEN_GET_TIME_CAPS 0x0002020F | ||
416 | #define RNDIS_OID_GEN_GET_NETCARD_TIME 0x00020210 | ||
417 | |||
418 | /* These are connection-oriented general OIDs. */ | ||
419 | /* These replace the above OIDs for connection-oriented media. */ | ||
420 | #define RNDIS_OID_GEN_CO_SUPPORTED_LIST 0x00010101 | ||
421 | #define RNDIS_OID_GEN_CO_HARDWARE_STATUS 0x00010102 | ||
422 | #define RNDIS_OID_GEN_CO_MEDIA_SUPPORTED 0x00010103 | ||
423 | #define RNDIS_OID_GEN_CO_MEDIA_IN_USE 0x00010104 | ||
424 | #define RNDIS_OID_GEN_CO_LINK_SPEED 0x00010105 | ||
425 | #define RNDIS_OID_GEN_CO_VENDOR_ID 0x00010106 | ||
426 | #define RNDIS_OID_GEN_CO_VENDOR_DESCRIPTION 0x00010107 | ||
427 | #define RNDIS_OID_GEN_CO_DRIVER_VERSION 0x00010108 | ||
428 | #define RNDIS_OID_GEN_CO_PROTOCOL_OPTIONS 0x00010109 | ||
429 | #define RNDIS_OID_GEN_CO_MAC_OPTIONS 0x0001010A | ||
430 | #define RNDIS_OID_GEN_CO_MEDIA_CONNECT_STATUS 0x0001010B | ||
431 | #define RNDIS_OID_GEN_CO_VENDOR_DRIVER_VERSION 0x0001010C | ||
432 | #define RNDIS_OID_GEN_CO_MINIMUM_LINK_SPEED 0x0001010D | ||
433 | |||
434 | #define RNDIS_OID_GEN_CO_GET_TIME_CAPS 0x00010201 | ||
435 | #define RNDIS_OID_GEN_CO_GET_NETCARD_TIME 0x00010202 | ||
436 | |||
437 | /* These are connection-oriented statistics OIDs. */ | ||
438 | #define RNDIS_OID_GEN_CO_XMIT_PDUS_OK 0x00020101 | ||
439 | #define RNDIS_OID_GEN_CO_RCV_PDUS_OK 0x00020102 | ||
440 | #define RNDIS_OID_GEN_CO_XMIT_PDUS_ERROR 0x00020103 | ||
441 | #define RNDIS_OID_GEN_CO_RCV_PDUS_ERROR 0x00020104 | ||
442 | #define RNDIS_OID_GEN_CO_RCV_PDUS_NO_BUFFER 0x00020105 | ||
443 | |||
444 | |||
445 | #define RNDIS_OID_GEN_CO_RCV_CRC_ERROR 0x00020201 | ||
446 | #define RNDIS_OID_GEN_CO_TRANSMIT_QUEUE_LENGTH 0x00020202 | ||
447 | #define RNDIS_OID_GEN_CO_BYTES_XMIT 0x00020203 | ||
448 | #define RNDIS_OID_GEN_CO_BYTES_RCV 0x00020204 | ||
449 | #define RNDIS_OID_GEN_CO_BYTES_XMIT_OUTSTANDING 0x00020205 | ||
450 | #define RNDIS_OID_GEN_CO_NETCARD_LOAD 0x00020206 | ||
451 | |||
452 | /* These are objects for Connection-oriented media call-managers. */ | ||
453 | #define RNDIS_OID_CO_ADD_PVC 0xFF000001 | ||
454 | #define RNDIS_OID_CO_DELETE_PVC 0xFF000002 | ||
455 | #define RNDIS_OID_CO_GET_CALL_INFORMATION 0xFF000003 | ||
456 | #define RNDIS_OID_CO_ADD_ADDRESS 0xFF000004 | ||
457 | #define RNDIS_OID_CO_DELETE_ADDRESS 0xFF000005 | ||
458 | #define RNDIS_OID_CO_GET_ADDRESSES 0xFF000006 | ||
459 | #define RNDIS_OID_CO_ADDRESS_CHANGE 0xFF000007 | ||
460 | #define RNDIS_OID_CO_SIGNALING_ENABLED 0xFF000008 | ||
461 | #define RNDIS_OID_CO_SIGNALING_DISABLED 0xFF000009 | ||
462 | |||
463 | /* 802.3 Objects (Ethernet) */ | ||
464 | #define RNDIS_OID_802_3_PERMANENT_ADDRESS 0x01010101 | ||
465 | #define RNDIS_OID_802_3_CURRENT_ADDRESS 0x01010102 | ||
466 | #define RNDIS_OID_802_3_MULTICAST_LIST 0x01010103 | ||
467 | #define RNDIS_OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 | ||
468 | #define RNDIS_OID_802_3_MAC_OPTIONS 0x01010105 | ||
469 | |||
470 | #define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001 | ||
471 | |||
472 | #define RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101 | ||
473 | #define RNDIS_OID_802_3_XMIT_ONE_COLLISION 0x01020102 | ||
474 | #define RNDIS_OID_802_3_XMIT_MORE_COLLISIONS 0x01020103 | ||
475 | |||
476 | #define RNDIS_OID_802_3_XMIT_DEFERRED 0x01020201 | ||
477 | #define RNDIS_OID_802_3_XMIT_MAX_COLLISIONS 0x01020202 | ||
478 | #define RNDIS_OID_802_3_RCV_OVERRUN 0x01020203 | ||
479 | #define RNDIS_OID_802_3_XMIT_UNDERRUN 0x01020204 | ||
480 | #define RNDIS_OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205 | ||
481 | #define RNDIS_OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206 | ||
482 | #define RNDIS_OID_802_3_XMIT_LATE_COLLISIONS 0x01020207 | ||
483 | |||
484 | #define REMOTE_CONDIS_MP_CREATE_VC_MSG 0x00008001 | ||
485 | #define REMOTE_CONDIS_MP_DELETE_VC_MSG 0x00008002 | ||
486 | #define REMOTE_CONDIS_MP_ACTIVATE_VC_MSG 0x00008005 | ||
487 | #define REMOTE_CONDIS_MP_DEACTIVATE_VC_MSG 0x00008006 | ||
488 | #define REMOTE_CONDIS_INDICATE_STATUS_MSG 0x00008007 | ||
489 | |||
490 | #define REMOTE_CONDIS_MP_CREATE_VC_CMPLT 0x80008001 | ||
491 | #define REMOTE_CONDIS_MP_DELETE_VC_CMPLT 0x80008002 | ||
492 | #define REMOTE_CONDIS_MP_ACTIVATE_VC_CMPLT 0x80008005 | ||
493 | #define REMOTE_CONDIS_MP_DEACTIVATE_VC_CMPLT 0x80008006 | ||
494 | |||
495 | /* | ||
496 | * Reserved message type for private communication between lower-layer host | ||
497 | * driver and remote device, if necessary. | ||
498 | */ | ||
499 | #define REMOTE_NDIS_BUS_MSG 0xff000001 | ||
500 | |||
501 | /* Remote NDIS medium types. */ | ||
502 | #define RNDIS_MEDIUM_802_3 0x00000000 | ||
503 | #define RNDIS_MEDIUM_802_5 0x00000001 | ||
504 | #define RNDIS_MEDIUM_FDDI 0x00000002 | ||
505 | #define RNDIS_MEDIUM_WAN 0x00000003 | ||
506 | #define RNDIS_MEDIUM_LOCAL_TALK 0x00000004 | ||
507 | #define RNDIS_MEDIUM_ARCNET_RAW 0x00000006 | ||
508 | #define RNDIS_MEDIUM_ARCNET_878_2 0x00000007 | ||
509 | #define RNDIS_MEDIUM_ATM 0x00000008 | ||
510 | #define RNDIS_MEDIUM_WIRELESS_WAN 0x00000009 | ||
511 | #define RNDIS_MEDIUM_IRDA 0x0000000a | ||
512 | #define RNDIS_MEDIUM_CO_WAN 0x0000000b | ||
513 | /* Not a real medium, defined as an upper-bound */ | ||
514 | #define RNDIS_MEDIUM_MAX 0x0000000d | ||
515 | |||
516 | |||
517 | /* Remote NDIS medium connection states. */ | ||
518 | #define RNDIS_MEDIA_STATE_CONNECTED 0x00000000 | ||
519 | #define RNDIS_MEDIA_STATE_DISCONNECTED 0x00000001 | ||
520 | |||
521 | /* From drivers/net/wireless/rndis_wlan.c */ | ||
522 | |||
523 | /* various RNDIS OID defs */ | ||
524 | #define OID_GEN_LINK_SPEED 0x00010107 | ||
525 | |||
526 | #define OID_GEN_XMIT_OK 0x00020101 | ||
527 | #define OID_GEN_RCV_OK 0x00020102 | ||
528 | #define OID_GEN_XMIT_ERROR 0x00020103 | ||
529 | #define OID_GEN_RCV_ERROR 0x00020104 | ||
530 | #define OID_GEN_RCV_NO_BUFFER 0x00020105 | ||
531 | |||
532 | #define OID_802_3_CURRENT_ADDRESS 0x01010102 | ||
533 | #define OID_802_3_MULTICAST_LIST 0x01010103 | ||
534 | #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 | ||
535 | |||
536 | #define OID_802_11_BSSID 0x0d010101 | ||
537 | #define OID_802_11_SSID 0x0d010102 | ||
538 | #define OID_802_11_INFRASTRUCTURE_MODE 0x0d010108 | ||
539 | #define OID_802_11_ADD_WEP 0x0d010113 | ||
540 | #define OID_802_11_REMOVE_WEP 0x0d010114 | ||
541 | #define OID_802_11_DISASSOCIATE 0x0d010115 | ||
542 | #define OID_802_11_AUTHENTICATION_MODE 0x0d010118 | ||
543 | #define OID_802_11_PRIVACY_FILTER 0x0d010119 | ||
544 | #define OID_802_11_BSSID_LIST_SCAN 0x0d01011a | ||
545 | #define OID_802_11_ENCRYPTION_STATUS 0x0d01011b | ||
546 | #define OID_802_11_ADD_KEY 0x0d01011d | ||
547 | #define OID_802_11_REMOVE_KEY 0x0d01011e | ||
548 | #define OID_802_11_ASSOCIATION_INFORMATION 0x0d01011f | ||
549 | #define OID_802_11_CAPABILITY 0x0d010122 | ||
550 | #define OID_802_11_PMKID 0x0d010123 | ||
551 | #define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0d010203 | ||
552 | #define OID_802_11_NETWORK_TYPE_IN_USE 0x0d010204 | ||
553 | #define OID_802_11_TX_POWER_LEVEL 0x0d010205 | ||
554 | #define OID_802_11_RSSI 0x0d010206 | ||
555 | #define OID_802_11_RSSI_TRIGGER 0x0d010207 | ||
556 | #define OID_802_11_FRAGMENTATION_THRESHOLD 0x0d010209 | ||
557 | #define OID_802_11_RTS_THRESHOLD 0x0d01020a | ||
558 | #define OID_802_11_SUPPORTED_RATES 0x0d01020e | ||
559 | #define OID_802_11_CONFIGURATION 0x0d010211 | ||
560 | #define OID_802_11_POWER_MODE 0x0d010216 | ||
561 | #define OID_802_11_BSSID_LIST 0x0d010217 | ||
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index 9a005b627eb2..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 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 0x00000001 /* 1-N packets */ | ||
59 | #define RNDIS_MSG_INIT 0x00000002 | ||
60 | #define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) | ||
61 | #define RNDIS_MSG_HALT 0x00000003 | ||
62 | #define RNDIS_MSG_QUERY 0x00000004 | ||
63 | #define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION) | ||
64 | #define RNDIS_MSG_SET 0x00000005 | ||
65 | #define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION) | ||
66 | #define RNDIS_MSG_RESET 0x00000006 | ||
67 | #define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION) | ||
68 | #define RNDIS_MSG_INDICATE 0x00000007 | ||
69 | #define RNDIS_MSG_KEEPALIVE 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 0x00000000 | ||
74 | #define RNDIS_STATUS_FAILURE 0xc0000001 | ||
75 | #define RNDIS_STATUS_INVALID_DATA 0xc0010015 | ||
76 | #define RNDIS_STATUS_NOT_SUPPORTED 0xc00000bb | ||
77 | #define RNDIS_STATUS_MEDIA_CONNECT 0x4001000b | ||
78 | #define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000c | ||
79 | #define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION 0x40010012 | ||
80 | |||
81 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ | ||
82 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED 0x00000000 | ||
83 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN 0x00000001 | ||
84 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM 0x00000002 | ||
85 | #define RNDIS_PHYSICAL_MEDIUM_PHONE_LINE 0x00000003 | ||
86 | #define RNDIS_PHYSICAL_MEDIUM_POWER_LINE 0x00000004 | ||
87 | #define RNDIS_PHYSICAL_MEDIUM_DSL 0x00000005 | ||
88 | #define RNDIS_PHYSICAL_MEDIUM_FIBRE_CHANNEL 0x00000006 | ||
89 | #define RNDIS_PHYSICAL_MEDIUM_1394 0x00000007 | ||
90 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN 0x00000008 | ||
91 | #define RNDIS_PHYSICAL_MEDIUM_MAX 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 0x01010101 | ||
230 | #define OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106 | ||
231 | #define OID_GEN_CURRENT_PACKET_FILTER 0x0001010e | ||
232 | #define OID_GEN_PHYSICAL_MEDIUM 0x00010202 | ||
233 | |||
234 | /* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */ | ||
235 | #define RNDIS_PACKET_TYPE_DIRECTED 0x00000001 | ||
236 | #define RNDIS_PACKET_TYPE_MULTICAST 0x00000002 | ||
237 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004 | ||
238 | #define RNDIS_PACKET_TYPE_BROADCAST 0x00000008 | ||
239 | #define RNDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010 | ||
240 | #define RNDIS_PACKET_TYPE_PROMISCUOUS 0x00000020 | ||
241 | #define RNDIS_PACKET_TYPE_SMT 0x00000040 | ||
242 | #define RNDIS_PACKET_TYPE_ALL_LOCAL 0x00000080 | ||
243 | #define RNDIS_PACKET_TYPE_GROUP 0x00001000 | ||
244 | #define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00002000 | ||
245 | #define RNDIS_PACKET_TYPE_FUNCTIONAL 0x00004000 | ||
246 | #define RNDIS_PACKET_TYPE_MAC_FRAME 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 | \ |