I'm currently working on an 802.15.4 driver, and trying to use all the fancy new boilerplate functionality which was merged recently. I'm using the at86rf2xx driver as inspiration, but the way it sets some options (e.g. the long and short addresses) confuses me a bit.
The at86rf2xx's netdev set() function, when called with NETOPT_ADDRESS, will call at86rf2xx_set_addr_short() which sets the short_addr of the device struct along with some other at86rf2xx-specific stuff. At the end of the case statement, however, it then calls netdev2_ieee802154_set() *as well*, which appears to do the same thing again (minus the chip-specific stuff).
Perhaps I'm getting lost in a forest of extended structs, but is this intentional? It seems like at86rf2xx_set_addr_short() should *only* be doing the chip-specific stuff, and leaving the rest up to netdev2_ieee802154_set()? I hope my description's not too hard to follow.