Changes in 4.9.213 ALSA: pcm: Add missing copy ops check before clearing buffer orinoco_usb: fix interface sanity check rsi_91x_usb: fix interface sanity check USB: serial: ir-usb: add missing endpoint sanity check USB: serial: ir-usb: fix link-speed handling USB: serial: ir-usb: fix IrLAP framing staging: most: net: fix buffer overflow staging: wlan-ng: ensure error return is actually returned staging: vt6656: correct packet types for CTS protect, mode. staging: vt6656: use NULLFUCTION stack on mac80211 staging: vt6656: Fix false Tx excessive retries reporting. serial: 8250_bcm2835aux: Fix line mismatch on driver unbind ath9k: fix storage endpoint lookup brcmfmac: fix interface sanity check rtl8xxxu: fix interface sanity check zd1211rw: fix storage endpoint lookup arc: eznps: fix allmodconfig kconfig warning watchdog: rn5t618_wdt: fix module aliases drivers/net/b44: Change to non-atomic bit operations on pwol_mask net: wan: sdla: Fix cast from pointer to integer of different size gpio: max77620: Add missing dependency on GPIOLIB_IRQCHIP atm: eni: fix uninitialized variable warning usb-storage: Disable UAS on JMicron SATA enclosure net_sched: ematch: reject invalid TCF_EM_SIMPLE crypto: af_alg - Use bh_lock_sock in sk_destruct vfs: fix do_last() regression crypto: pcrypt - Fix user-after-free on module unload iio: gyro: st_gyro: inline per-sensor data iio: gyro: st_gyro: fix L3GD20H support tools lib: Fix builds when glibc contains strlcpy() arm64: kbuild: remove compressed images on 'make ARCH=arm64 (dist)clean' mm/mempolicy.c: fix out of bounds write in mpol_parse_str() reiserfs: Fix memory leak of journal device string media: digitv: don't continue if remote control state can't be read media: af9005: uninitialized variable printked media: gspca: zero usb_buf media: dvb-usb/dvb-usb-urb.c: initialize actlen to 0 ttyprintk: fix a potential deadlock in interrupt context issue Bluetooth: Fix race condition in hci_release_sock() usb: dwc3: turn off VBUS when leaving host mode media: si470x-i2c: Move free() past last use of 'radio' ARM: dts: beagle-x15-common: Model 5V0 regulator soc: ti: wkup_m3_ipc: Fix race condition with rproc_boot mac80211: mesh: restrict airtime metric to peered established plinks clk: mmp2: Fix the order of timer mux parents ixgbevf: Remove limit of 10 entries for unicast filter list ixgbe: Fix calculation of queue with VFs and flow director on interface flap wireless: fix enabling channel 12 for custom regulatory domain mac80211: Fix TKIP replay protection immediately after key setup wireless: wext: avoid gcc -O3 warning vti[6]: fix packet tx through bpf_redirect() scsi: fnic: do not queue commands during fwreset airo: Fix possible info leak in AIROOLDIOCTL/SIOCDEVPRIVATE airo: Add missing CAP_NET_ADMIN check in AIROOLDIOCTL/SIOCDEVPRIVATE r8152: get default setting of WOL before initializing qlcnic: Fix CPU soft lockup while collecting firmware dump powerpc/fsl/dts: add fsl,erratum-a011043 net/fsl: treat fsl,erratum-a011043 net: fsl/fman: rename IF_MODE_XGMII to IF_MODE_10G net/sonic: Add mutual exclusion for accessing shared state net/sonic: Use MMIO accessors net/sonic: Fix receive buffer handling net/sonic: Quiesce SONIC before re-initializing descriptor memory seq_tab_next() should increase position index l2t_seq_next should increase position index net: Fix skb->csum update in inet_proto_csum_replace16(). btrfs: do not zero f_bavail if we have available space Linux 4.9.213 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ia11340061ca1d357e98f09bf64ea5d0856e4a5b2
163 lines
3.7 KiB
C
163 lines
3.7 KiB
C
/*
|
|
* USB IrDA Bridge Device Definition
|
|
*/
|
|
|
|
#ifndef __LINUX_USB_IRDA_H
|
|
#define __LINUX_USB_IRDA_H
|
|
|
|
/* This device should use Application-specific class */
|
|
|
|
#define USB_SUBCLASS_IRDA 0x02
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
/* Class-Specific requests (bRequest field) */
|
|
|
|
#define USB_REQ_CS_IRDA_RECEIVING 1
|
|
#define USB_REQ_CS_IRDA_CHECK_MEDIA_BUSY 3
|
|
#define USB_REQ_CS_IRDA_RATE_SNIFF 4
|
|
#define USB_REQ_CS_IRDA_UNICAST_LIST 5
|
|
#define USB_REQ_CS_IRDA_GET_CLASS_DESC 6
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
/* Class-Specific descriptor */
|
|
|
|
#define USB_DT_CS_IRDA 0x21
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
/* Data sizes */
|
|
|
|
#define USB_IRDA_DS_2048 (1 << 5)
|
|
#define USB_IRDA_DS_1024 (1 << 4)
|
|
#define USB_IRDA_DS_512 (1 << 3)
|
|
#define USB_IRDA_DS_256 (1 << 2)
|
|
#define USB_IRDA_DS_128 (1 << 1)
|
|
#define USB_IRDA_DS_64 (1 << 0)
|
|
|
|
/* Window sizes */
|
|
|
|
#define USB_IRDA_WS_7 (1 << 6)
|
|
#define USB_IRDA_WS_6 (1 << 5)
|
|
#define USB_IRDA_WS_5 (1 << 4)
|
|
#define USB_IRDA_WS_4 (1 << 3)
|
|
#define USB_IRDA_WS_3 (1 << 2)
|
|
#define USB_IRDA_WS_2 (1 << 1)
|
|
#define USB_IRDA_WS_1 (1 << 0)
|
|
|
|
/* Min turnaround times in usecs */
|
|
|
|
#define USB_IRDA_MTT_0 (1 << 7)
|
|
#define USB_IRDA_MTT_10 (1 << 6)
|
|
#define USB_IRDA_MTT_50 (1 << 5)
|
|
#define USB_IRDA_MTT_100 (1 << 4)
|
|
#define USB_IRDA_MTT_500 (1 << 3)
|
|
#define USB_IRDA_MTT_1000 (1 << 2)
|
|
#define USB_IRDA_MTT_5000 (1 << 1)
|
|
#define USB_IRDA_MTT_10000 (1 << 0)
|
|
|
|
/* Baud rates */
|
|
|
|
#define USB_IRDA_BR_4000000 (1 << 8)
|
|
#define USB_IRDA_BR_1152000 (1 << 7)
|
|
#define USB_IRDA_BR_576000 (1 << 6)
|
|
#define USB_IRDA_BR_115200 (1 << 5)
|
|
#define USB_IRDA_BR_57600 (1 << 4)
|
|
#define USB_IRDA_BR_38400 (1 << 3)
|
|
#define USB_IRDA_BR_19200 (1 << 2)
|
|
#define USB_IRDA_BR_9600 (1 << 1)
|
|
#define USB_IRDA_BR_2400 (1 << 0)
|
|
|
|
/* Additional BOFs */
|
|
|
|
#define USB_IRDA_AB_0 (1 << 7)
|
|
#define USB_IRDA_AB_1 (1 << 6)
|
|
#define USB_IRDA_AB_2 (1 << 5)
|
|
#define USB_IRDA_AB_3 (1 << 4)
|
|
#define USB_IRDA_AB_6 (1 << 3)
|
|
#define USB_IRDA_AB_12 (1 << 2)
|
|
#define USB_IRDA_AB_24 (1 << 1)
|
|
#define USB_IRDA_AB_48 (1 << 0)
|
|
|
|
/* IRDA Rate Sniff */
|
|
|
|
#define USB_IRDA_RATE_SNIFF 1
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
struct usb_irda_cs_descriptor {
|
|
__u8 bLength;
|
|
__u8 bDescriptorType;
|
|
|
|
__le16 bcdSpecRevision;
|
|
__u8 bmDataSize;
|
|
__u8 bmWindowSize;
|
|
__u8 bmMinTurnaroundTime;
|
|
__le16 wBaudRate;
|
|
__u8 bmAdditionalBOFs;
|
|
__u8 bIrdaRateSniff;
|
|
__u8 bMaxUnicastList;
|
|
} __attribute__ ((packed));
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
/* Data Format */
|
|
|
|
#define USB_IRDA_STATUS_MEDIA_BUSY (1 << 7)
|
|
|
|
/* The following is a 4-bit value used for both
|
|
* inbound and outbound headers:
|
|
*
|
|
* 0 - speed ignored
|
|
* 1 - 2400 bps
|
|
* 2 - 9600 bps
|
|
* 3 - 19200 bps
|
|
* 4 - 38400 bps
|
|
* 5 - 57600 bps
|
|
* 6 - 115200 bps
|
|
* 7 - 576000 bps
|
|
* 8 - 1.152 Mbps
|
|
* 9 - 4 Mbps
|
|
* 10..15 - Reserved
|
|
*/
|
|
#define USB_IRDA_STATUS_LINK_SPEED 0x0f
|
|
|
|
#define USB_IRDA_LS_NO_CHANGE 0
|
|
#define USB_IRDA_LS_2400 1
|
|
#define USB_IRDA_LS_9600 2
|
|
#define USB_IRDA_LS_19200 3
|
|
#define USB_IRDA_LS_38400 4
|
|
#define USB_IRDA_LS_57600 5
|
|
#define USB_IRDA_LS_115200 6
|
|
#define USB_IRDA_LS_576000 7
|
|
#define USB_IRDA_LS_1152000 8
|
|
#define USB_IRDA_LS_4000000 9
|
|
|
|
/* The following is a 4-bit value used only for
|
|
* outbound header:
|
|
*
|
|
* 0 - No change (BOF ignored)
|
|
* 1 - 48 BOFs
|
|
* 2 - 24 BOFs
|
|
* 3 - 12 BOFs
|
|
* 4 - 6 BOFs
|
|
* 5 - 3 BOFs
|
|
* 6 - 2 BOFs
|
|
* 7 - 1 BOFs
|
|
* 8 - 0 BOFs
|
|
* 9..15 - Reserved
|
|
*/
|
|
#define USB_IRDA_EXTRA_BOFS 0xf0
|
|
|
|
struct usb_irda_inbound_header {
|
|
__u8 bmStatus;
|
|
};
|
|
|
|
struct usb_irda_outbound_header {
|
|
__u8 bmChange;
|
|
};
|
|
|
|
#endif /* __LINUX_USB_IRDA_H */
|
|
|