On Wed, Sep 20, 2017 at 11:32 AM, Kaspar Schleiser <kas...@schleiser.de> wrote: > Hi Joakim, > > On 09/20/2017 10:11 AM, Joakim Nohlgård wrote: >> I have recently been digging around the gnrc_netdev code as well. I >> think that adding support for other frame types and logic for sending >> these frames will definitely become a mess if the 802.15.4 code is not >> decoupled from the netdev code. > > Could you elaborate why? We should aim to get as much as possible > gnrc-independent code.
I don't have an opinion on whether to depend on gnrc or not, but the current send and recv implementation in gnrc_netdev_ieee802154 acts as a wrapper for the real device driver send/recv functions, so the MAC layer calls the wrapper function which generates the frame header before passing on to the device driver. What I meant was that this header generation/parsing should be its own separate function that the MAC layer explicitly calls, instead of implicitly as a middle layer between the MAC and the network device driver. All of the header generation code is inside gnrc_netdev_ieee802154.c right now. That code is going to be a mess if more frame types are added, or different frame versions and header options should be supported. https://github.com/RIOT-OS/RIOT/blob/master/sys/net/gnrc/link_layer/netdev/gnrc_netdev_ieee802154.c#L154 /Joakim _______________________________________________ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel