123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- #ifndef N_HCI
- #define N_HCI 15
- #endif
- #define HCIUARTSETPROTO _IOW('U', 200, int)
- #define HCIUARTGETPROTO _IOR('U', 201, int)
- #define HCIUARTGETDEVICE _IOR('U', 202, int)
- #define HCIUARTSETFLAGS _IOW('U', 203, int)
- #define HCIUARTGETFLAGS _IOR('U', 204, int)
- #define HCI_UART_MAX_PROTO 6
- #define HCI_UART_H4 0
- #define HCI_UART_BCSP 1
- #define HCI_UART_3WIRE 2
- #define HCI_UART_H4DS 3
- #define HCI_UART_LL 4
- #define HCI_UART_ATH3K 5
- #define HCI_UART_RAW_DEVICE 0
- struct hci_uart;
- struct hci_uart_proto {
- unsigned int id;
- int (*open)(struct hci_uart *hu);
- int (*close)(struct hci_uart *hu);
- int (*flush)(struct hci_uart *hu);
- int (*recv)(struct hci_uart *hu, void *data, int len);
- int (*enqueue)(struct hci_uart *hu, struct sk_buff *skb);
- struct sk_buff *(*dequeue)(struct hci_uart *hu);
- };
- struct hci_uart {
- struct tty_struct *tty;
- struct hci_dev *hdev;
- unsigned long flags;
- unsigned long hdev_flags;
- struct hci_uart_proto *proto;
- void *priv;
- struct sk_buff *tx_skb;
- unsigned long tx_state;
- spinlock_t rx_lock;
- };
- #define HCI_UART_PROTO_SET 0
- #define HCI_UART_SENDING 1
- #define HCI_UART_TX_WAKEUP 2
- int hci_uart_register_proto(struct hci_uart_proto *p);
- int hci_uart_unregister_proto(struct hci_uart_proto *p);
- int hci_uart_tx_wakeup(struct hci_uart *hu);
- #ifdef CONFIG_BT_HCIUART_H4
- int h4_init(void);
- int h4_deinit(void);
- #endif
- #ifdef CONFIG_BT_HCIUART_BCSP
- int bcsp_init(void);
- int bcsp_deinit(void);
- #endif
- #ifdef CONFIG_BT_HCIUART_LL
- int ll_init(void);
- int ll_deinit(void);
- #endif
- #ifdef CONFIG_BT_HCIUART_ATH3K
- int ath_init(void);
- int ath_deinit(void);
- #endif
|