From 59d19cd70cd38afd2d9bf2e3b48c3a5bbb630b5a Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Sat, 25 Oct 2014 17:16:40 +0200 Subject: 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 Signed-off-by: Marcel Holtmann --- net/mac802154/ieee802154_i.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'net/mac802154/ieee802154_i.h') diff --git a/net/mac802154/ieee802154_i.h b/net/mac802154/ieee802154_i.h index 41e29b00e7a0..61885aaea6b6 100644 --- a/net/mac802154/ieee802154_i.h +++ b/net/mac802154/ieee802154_i.h @@ -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; -- cgit