0
点赞
收藏
分享

微信扫一扫

btmon获取hci数据流程


btmon获取hci数据流程
背景
最近在看蓝牙相关的驱动代码,追到hci接收数据处理函数hci_rx_work()(net/bluetooth/hci_core.c),
瞄到下面一段代码:

C

...
 while ((skb = skb_dequeue(&hdev->rx_q))) {
     /* Send copy to monitor */
     hci_send_to_monitor(hdev, skb);
     ...
 }


在hci发送数据的处理函数hci_send_frame()中也有类似的代码片段:

C

...
     /* Time stamp */
     __net_timestamp(skb);    /* Send copy to monitor */
     hci_send_to_monitor(hdev, skb);    if (atomic_read(&hdev->promisc)) {
         /* Send copy to the sockets */
         hci_send_to_sock(hdev, skb);
     }
 ...

举报

相关推荐

0 条评论