patacongo edited a comment on pull request #1661:
URL: https://github.com/apache/incubator-nuttx/pull/1661#issuecomment-695826718


   > Right now it is calling `bt_hci_recieve` which I think needs to be changed 
to input the data to the networking layer and let the network driver figure how 
to process this, right? What is the interface I should use for this? Is it 
`bluetooth_input`? I'm guessing `bt_netdev.c` should be extended to be able to 
directly receive HCI packets and not only L2CAP packets via 
`btnet_l2cap_receive`.
   
   Isn't this a problem similar to the Ethernet raw packet input?  In that 
case, the driver does not call any of the *_input() functions, instead is calls 
a packet tap function (pkt_input()).  The raw packet logic then decides of the 
packet is one that it should pick off or not.  It returns an indication if the 
packet was consumed or not.  If it was not consumed, then the network driver 
dispatches to a protocol-specific network stack input function.  For i.MXRT:
   
        681 static inline void imxrt_dispatch(FAR struct imxrt_driver_s *priv)
        682 {
        687 #ifdef CONFIG_NET_PKT
        688   /* When packet sockets are enabled, feed the frame into the tap */
        689
        690   pkt_input(&priv->dev);
        691 #endif
        692
        693 #ifdef CONFIG_NET_IPv4
        694   /* Check for an IPv4 packet */
        695
        696   if (BUF->type == HTONS(ETHTYPE_IP))
        697     {
   
   Can the network decide if the packet is an HCI packet based on the 
addressing in the packet and on some configured socket address?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to