Print this page
5832 EOF wireless usb (aka UWB)
Reviewed by: TBD
Reviewed by: TBD
Approved by: TBD

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/usb/usbai.h
          +++ new/usr/src/uts/common/sys/usb/usbai.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  24   26   */
  25   27  
  26   28  #ifndef _SYS_USB_USBAI_H
  27   29  #define _SYS_USB_USBAI_H
  28   30  
  29   31  
  30   32  #ifdef  __cplusplus
  31   33  extern "C" {
  32   34  #endif
  33   35  
↓ open down ↓ 404 lines elided ↑ open up ↑
 438  440   */
 439  441  typedef struct usb_string_descr {
 440  442          uint8_t         bLength;                /* descr size */
 441  443          uint8_t         bDescriptorType;        /* set to STRING */
 442  444          uint8_t         bString[1];             /* variable length unicode */
 443  445                                                  /* encoded string       */
 444  446  } usb_string_descr_t;
 445  447  
 446  448  #define USB_MAXSTRINGLEN        255             /* max string descr length */
 447  449  
 448      -
 449  450  /*
 450      - * usb_bos_descr:
 451      - *      usb BOS descriptor, refer to WUSB 1.0/7.4.1
 452      - */
 453      -typedef struct usb_bos_descr {
 454      -        uint8_t         bLength;
 455      -        uint8_t         bDescriptorType;
 456      -        uint16_t        wTotalLength;
 457      -        uint8_t         bNumDeviceCaps;
 458      -} usb_bos_descr_t;
 459      -
 460      -/*
 461      - * usb_dev_cap_header:
 462      - *      usb device capability descriptor header, refer to WUSB 1.0/7.4.1
 463      - */
 464      -typedef struct usb_cap_descr_header {
 465      -        uint8_t         bLength;
 466      -        uint8_t         bDescriptorType;
 467      -        uint8_t         bDevCapabilityType;
 468      -} usb_cap_descr_header_t;
 469      -
 470      -typedef struct usb_cap_descr {
 471      -        uint8_t         bLength;
 472      -        uint8_t         bDescriptorType;        /* set to DEVICE CAPABILITY */
 473      -        uint8_t         bDevCapabilityType;
 474      -        uint8_t         bCapValue[1];           /* variable length data */
 475      -} usb_cap_descr_t;
 476      -
 477      -#define USB_CAP_TYPE_WUSB       1
 478      -
 479      -/* Wireless USB device capability descriptor - UWB descriptor */
 480      -typedef struct usb_uwb_cap_descr {
 481      -        uint8_t         bLength;
 482      -        uint8_t         bDescriptorType;
 483      -        uint8_t         bDevCapabilityType;
 484      -        uint8_t         bmAttributes;
 485      -        uint16_t        wPHYRates;
 486      -        uint8_t         bmTFITXPowerInfo;
 487      -        uint8_t         bmFFITXPowerInfo;
 488      -        uint16_t        bmBandGroup;
 489      -        uint8_t         bReserved;
 490      -} usb_uwb_cap_descr_t;
 491      -
 492      -/*
 493      - * usb_ep_comp_descr:
 494      - *      usb endpoint companion descriptor, refer to WUSB 1.0/7.4.4
 495      - */
 496      -typedef struct usb_ep_comp_descr {
 497      -        uint8_t         bLength;
 498      -        uint8_t         bDescriptorType;
 499      -        uint8_t         bMaxBurst;
 500      -        uint8_t         bMaxSequence;
 501      -        uint16_t        wMaxStreamDelay;
 502      -        uint16_t        wOverTheAirPacketSize;
 503      -        uint8_t         bOverTheAirInterval;
 504      -        uint8_t         bmCompAttributes;
 505      -} usb_ep_comp_descr_t;
 506      -
 507      -/*
 508      - * usb_security_descr:
 509      - *      usb security descriptor, refer to WUSB 1.0/7.4.5
 510      - */
 511      -typedef struct usb_security_descr {
 512      -        uint8_t         bLength;
 513      -        uint8_t         bDescriptorType;
 514      -        uint16_t        wTotalLength;
 515      -        uint8_t         bNumEncryptionTypes;
 516      -} usb_security_descr_t;
 517      -
 518      -/*
 519      - * usb_encryption_descr:
 520      - *      usb encryption descriptor, refer to WUSB 1.0/7.4.5
 521      - */
 522      -typedef struct usb_encryption_descr {
 523      -        uint8_t         bLength;
 524      -        uint8_t         bDescriptorType;
 525      -        uint8_t         bEncryptionType;
 526      -        uint8_t         bEncryptionValue;
 527      -        uint8_t         bAuthKeyIndex;
 528      -} usb_encryption_descr_t;
 529      -
 530      -#define USB_ENC_TYPE_UNSECURE           0x00
 531      -#define USB_ENC_TYPE_WIRED              0x01
 532      -#define USB_ENC_TYPE_CCM_1              0x02
 533      -#define USB_ENC_TYPE_RSA_1              0x03
 534      -
 535      -/*
 536      - * usb_key_descr:
 537      - *      usb key descriptor, refer to WUSB 1.0/7.4.5
 538      - */
 539      -typedef struct usb_key_descr {
 540      -        uint8_t         bLength;
 541      -        uint8_t         bDescriptorType;
 542      -        uint8_t         tTKID[3];
 543      -        uint8_t         bReserved;
 544      -        uint8_t         KeyData[1];     /* variable length */
 545      -} usb_key_descr_t;
 546      -
 547      -#define USB_EP_COMP_DESCR_SIZE          10
 548      -#define USB_BOS_DESCR_SIZE              5
 549      -#define USB_CAP_DESCR_HEADER_SIZE       3
 550      -#define USB_UWB_CAP_DESCR_SIZE          11
 551      -#define USB_SECURITY_DESCR_SIZE         5
 552      -#define USB_ENCRYPTION_DESCR_SIZE       5
 553      -
 554      -
 555      -/*
 556  451   * ***************************************************************************
 557  452   * Client driver registration with USBA
 558  453   * ***************************************************************************
 559  454   *
 560  455   *      The client registers with USBA during attach in two steps
 561  456   *      using usb_client_attach() and usb_get_dev_data(). On completion, the
 562  457   *      registration data has been initialized.  Most data items are
 563  458   *      straightforward.  Among the items returned in the data is the tree of
 564  459   *      parsed descriptors, in dev_cfg;  the number of configurations parsed,
 565  460   *      in dev_n_cfg; a pointer to the current configuration in the tree,
↓ open down ↓ 49 lines elided ↑ open up ↑
 615  510          uint_t                  altif_n_cvs;    /* #elements in  altif_cvs[] */
 616  511          uint_t                  altif_strsize;  /* size of string descr */
 617  512  } usb_alt_if_data_t;
 618  513  
 619  514  
 620  515  /*
 621  516   * Tree data structure for each endpoint of each alternate
 622  517   */
 623  518  typedef struct usb_ep_data {
 624  519          usb_ep_descr_t          ep_descr;       /* endpoint descriptor */
 625      -        usb_ep_comp_descr_t     ep_comp_descr;  /* endpoint companion descr */
 626  520          struct usb_cvs_data     *ep_cvs;        /* cv mod/extending this ep */
 627  521          uint_t                  ep_n_cvs;       /* #elements in ep_cvs[] */
 628  522  } usb_ep_data_t;
 629  523  
 630  524  
 631  525  /*
 632  526   * Tree data structure for each class/vendor specific descriptor
 633  527   */
 634  528  typedef struct usb_cvs_data {
 635  529          uchar_t                 *cvs_buf;       /* raw data of cvs descr */
 636  530          uint_t                  cvs_buf_len;    /* cvs_buf size */
 637  531  } usb_cvs_data_t;
 638  532  
 639  533  
 640  534  /*
 641      - * Data structure for wireless USB specific descriptor
 642      - */
 643      -typedef struct usb_bos_data {
 644      -        usb_bos_descr_t         bos_descr;      /* parsed bos descr */
 645      -        usb_uwb_cap_descr_t     bos_uwb_cap;    /* uwb cap descr */
 646      -} usb_bos_data_t;
 647      -
 648      -
 649      -/*
 650  535   *      Parse_level determines the extent to which the tree is built, the amount
 651  536   *      of parsing usb_client_attach() is to do.  It has the following values:
 652  537   *
 653  538   *      USB_PARSE_LVL_NONE - Build no tree.  dev_n_cfg will return 0, dev_cfg
 654  539   *                           will return NULL, the dev_curr_xxx fields will be
 655  540   *                           invalid.
 656  541   *      USB_PARSE_LVL_IF   - Parse configured interface only, if configuration#
 657  542   *                           and interface properties are set (as when different
 658  543   *                           interfaces are viewed by the OS as different device
 659  544   *                           instances). If an OS device instance is set up to
↓ open down ↓ 24 lines elided ↑ open up ↑
 684  569          struct usb_dev_descr    *dev_descr;     /* cooked device descriptor */
 685  570          char                    *dev_mfg;       /* manufacturing ID */
 686  571          char                    *dev_product;   /* product ID */
 687  572          char                    *dev_serial;    /* serial number */
 688  573          usb_reg_parse_lvl_t     dev_parse_level; /* USB_PARSE_LVL_* flag */
 689  574          struct usb_cfg_data     *dev_cfg;       /* configs for this device */
 690  575                                                  /* indexed by config index */
 691  576          uint_t                  dev_n_cfg;      /* #elements in dev_cfg[] */
 692  577          struct usb_cfg_data     *dev_curr_cfg;  /* current cfg */
 693  578          int                     dev_curr_if;    /* current interface number */
 694      -        struct usb_bos_data     *dev_bos;       /* bos for this device */
 695  579  } usb_client_dev_data_t;
 696  580  
 697  581  
 698  582  /*
 699  583   * ***************************************************************************
 700  584   * Device configuration descriptor tree functions
 701  585   * ***************************************************************************
 702  586   */
 703  587  
 704  588  /*
↓ open down ↓ 2013 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX