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
@@ -75,7 +75,7 @@ static int mac802154_mlme_start_req(struct net_device *dev,
|
||||
|
||||
static struct wpan_phy *mac802154_get_phy(const struct net_device *dev)
|
||||
{
|
||||
struct ieee802154_sub_if_data *sdata = netdev_priv(dev);
|
||||
struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
|
||||
|
||||
BUG_ON(dev->type != ARPHRD_IEEE802154);
|
||||
|
||||
|
Reference in New Issue
Block a user