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:

committed by
Marcel Holtmann

parent
60741361c3
commit
59d19cd70c
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user