From d5ae67bacd9654b0e26b9f248249e9ee1b6e338b Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Wed, 5 Nov 2014 20:51:17 +0100 Subject: ieee802154: rework interface registration This patch meld mac802154_netdev_register into ieee802154_if_add function. Also we have now only one alloc_netdev call with one interface setup routine "ieee802154_if_setup" instead two different one for each interface type. This patch checks via runtime the interface type and do different handling now. Additional we add the wpan_dev struct in ieee802154_sub_if_data and set the new ieee802154_ptr while netdev registration. This behaviour is very similar the mac80211 netdev registration functionality. Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- include/net/cfg802154.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/net/cfg802154.h') diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h index 29c6de5a426c..57333f1ee75c 100644 --- a/include/net/cfg802154.h +++ b/include/net/cfg802154.h @@ -65,6 +65,10 @@ struct wpan_phy { char priv[0] __aligned(NETDEV_ALIGN); }; +struct wpan_dev { + struct wpan_phy *wpan_phy; +}; + #define to_phy(_dev) container_of(_dev, struct wpan_phy, dev) struct wpan_phy * -- cgit v1.2.3