Lines Matching refs:hu

78 	int			(*rx_func) (struct hci_uart *hu, u8 c);
101 static void h5_link_control(struct hci_uart *hu, const void *data, size_t len) in h5_link_control() argument
103 struct h5 *h5 = hu->priv; in h5_link_control()
131 struct hci_uart *hu = (struct hci_uart *) arg; in h5_timed_event() local
132 struct h5 *h5 = hu->priv; in h5_timed_event()
136 BT_DBG("%s", hu->hdev->name); in h5_timed_event()
139 h5_link_control(hu, sync_req, sizeof(sync_req)); in h5_timed_event()
143 h5_link_control(hu, conf_req, sizeof(conf_req)); in h5_timed_event()
156 BT_DBG("hu %p retransmitting %u pkts", hu, h5->unack.qlen); in h5_timed_event()
168 hci_uart_tx_wakeup(hu); in h5_timed_event()
171 static void h5_peer_reset(struct hci_uart *hu) in h5_peer_reset() argument
173 struct h5 *h5 = hu->priv; in h5_peer_reset()
189 hci_reset_dev(hu->hdev); in h5_peer_reset()
192 static int h5_open(struct hci_uart *hu) in h5_open() argument
197 BT_DBG("hu %p", hu); in h5_open()
203 hu->priv = h5; in h5_open()
213 h5->timer.data = (unsigned long) hu; in h5_open()
217 set_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags); in h5_open()
220 h5_link_control(hu, sync, sizeof(sync)); in h5_open()
226 static int h5_close(struct hci_uart *hu) in h5_close() argument
228 struct h5 *h5 = hu->priv; in h5_close()
283 static void h5_handle_internal_rx(struct hci_uart *hu) in h5_handle_internal_rx() argument
285 struct h5 *h5 = hu->priv; in h5_handle_internal_rx()
296 BT_DBG("%s", hu->hdev->name); in h5_handle_internal_rx()
308 h5_peer_reset(hu); in h5_handle_internal_rx()
309 h5_link_control(hu, sync_rsp, 2); in h5_handle_internal_rx()
312 h5_peer_reset(hu); in h5_handle_internal_rx()
314 h5_link_control(hu, conf_req, 3); in h5_handle_internal_rx()
316 h5_link_control(hu, conf_rsp, 2); in h5_handle_internal_rx()
317 h5_link_control(hu, conf_req, 3); in h5_handle_internal_rx()
323 hci_uart_init_ready(hu); in h5_handle_internal_rx()
334 h5_link_control(hu, woken_req, 2); in h5_handle_internal_rx()
341 hci_uart_tx_wakeup(hu); in h5_handle_internal_rx()
344 static void h5_complete_rx_pkt(struct hci_uart *hu) in h5_complete_rx_pkt() argument
346 struct h5 *h5 = hu->priv; in h5_complete_rx_pkt()
352 hci_uart_tx_wakeup(hu); in h5_complete_rx_pkt()
368 hci_recv_frame(hu->hdev, h5->rx_skb); in h5_complete_rx_pkt()
374 h5_handle_internal_rx(hu); in h5_complete_rx_pkt()
381 static int h5_rx_crc(struct hci_uart *hu, unsigned char c) in h5_rx_crc() argument
383 h5_complete_rx_pkt(hu); in h5_rx_crc()
388 static int h5_rx_payload(struct hci_uart *hu, unsigned char c) in h5_rx_payload() argument
390 struct h5 *h5 = hu->priv; in h5_rx_payload()
397 h5_complete_rx_pkt(hu); in h5_rx_payload()
403 static int h5_rx_3wire_hdr(struct hci_uart *hu, unsigned char c) in h5_rx_3wire_hdr() argument
405 struct h5 *h5 = hu->priv; in h5_rx_3wire_hdr()
409 hu->hdev->name, H5_HDR_SEQ(hdr), H5_HDR_ACK(hdr), in h5_rx_3wire_hdr()
439 static int h5_rx_pkt_start(struct hci_uart *hu, unsigned char c) in h5_rx_pkt_start() argument
441 struct h5 *h5 = hu->priv; in h5_rx_pkt_start()
456 h5->rx_skb->dev = (void *) hu->hdev; in h5_rx_pkt_start()
461 static int h5_rx_delimiter(struct hci_uart *hu, unsigned char c) in h5_rx_delimiter() argument
463 struct h5 *h5 = hu->priv; in h5_rx_delimiter()
514 static int h5_recv(struct hci_uart *hu, const void *data, int count) in h5_recv() argument
516 struct h5 *h5 = hu->priv; in h5_recv()
519 BT_DBG("%s pending %zu count %d", hu->hdev->name, h5->rx_pending, in h5_recv()
538 processed = h5->rx_func(hu, *ptr); in h5_recv()
549 static int h5_enqueue(struct hci_uart *hu, struct sk_buff *skb) in h5_enqueue() argument
551 struct h5 *h5 = hu->priv; in h5_enqueue()
622 static struct sk_buff *h5_prepare_pkt(struct hci_uart *hu, u8 pkt_type, in h5_prepare_pkt() argument
625 struct h5 *h5 = hu->priv; in h5_prepare_pkt()
664 hu->hdev->name, H5_HDR_SEQ(hdr), H5_HDR_ACK(hdr), in h5_prepare_pkt()
679 static struct sk_buff *h5_dequeue(struct hci_uart *hu) in h5_dequeue() argument
681 struct h5 *h5 = hu->priv; in h5_dequeue()
695 return h5_prepare_pkt(hu, HCI_3WIRE_LINK_PKT, wakeup_req, 2); in h5_dequeue()
700 nskb = h5_prepare_pkt(hu, bt_cb(skb)->pkt_type, in h5_dequeue()
718 nskb = h5_prepare_pkt(hu, bt_cb(skb)->pkt_type, in h5_dequeue()
735 return h5_prepare_pkt(hu, HCI_3WIRE_ACK_PKT, NULL, 0); in h5_dequeue()
740 static int h5_flush(struct hci_uart *hu) in h5_flush() argument
742 BT_DBG("hu %p", hu); in h5_flush()