mac802154: introduce IEEE802154_DEV_TO_SUB_IF

This function adds a wrapper to call netdev_priv to getting the sdata
attribute. This is similar like the IEEE80211_DEV_TO_SUB_IF function
inside wireless stack implementation.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Alexander Aring
2014-10-25 17:16:40 +02:00
committed by Marcel Holtmann
parent 60741361c3
commit 59d19cd70c
6 changed files with 47 additions and 43 deletions

View File

@@ -107,6 +107,12 @@ hw_to_local(struct ieee802154_hw *hw)
return container_of(hw, struct ieee802154_local, hw);
}
static inline struct ieee802154_sub_if_data *
IEEE802154_DEV_TO_SUB_IF(const struct net_device *dev)
{
return netdev_priv(dev);
}
extern struct ieee802154_reduced_mlme_ops mac802154_mlme_reduced;
extern struct ieee802154_mlme_ops mac802154_mlme_wpan;