aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee802154/nl-mac.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-11-05 20:51:18 +0100
committerMarcel Holtmann <marcel@holtmann.org>2014-11-05 21:53:04 +0100
commitbd28a11f25f2c2a563620e7be588dc4dd8a91396 (patch)
tree52d9a31150389f22e98774d3b26cec1fe7517608 /net/ieee802154/nl-mac.c
parentd5ae67bacd9654b0e26b9f248249e9ee1b6e338b (diff)
ieee802154: remove mlme get_phy callback
This patch removes the get_phy callback from mlme ops structure. Instead we doing a dereference via ieee802154_ptr dev pointer. For backwards compatibility we need to run get_device after dereference wpan_phy via ieee802154_ptr. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154/nl-mac.c')
-rw-r--r--net/ieee802154/nl-mac.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c
index 91a1855e521c..7127b9d1a684 100644
--- a/net/ieee802154/nl-mac.c
+++ b/net/ieee802154/nl-mac.c
@@ -94,8 +94,9 @@ static int ieee802154_nl_fill_iface(struct sk_buff *msg, u32 portid,
goto out;
ops = ieee802154_mlme_ops(dev);
- phy = ops->get_phy(dev);
+ phy = dev->ieee802154_ptr->wpan_phy;
BUG_ON(!phy);
+ get_device(&phy->dev);
short_addr = ops->get_short_addr(dev);
pan_id = ops->get_pan_id(dev);
@@ -493,7 +494,8 @@ int ieee802154_set_macparams(struct sk_buff *skb, struct genl_info *info)
!info->attrs[IEEE802154_ATTR_FRAME_RETRIES])
goto out;
- phy = ops->get_phy(dev);
+ phy = dev->ieee802154_ptr->wpan_phy;
+ get_device(&phy->dev);
ops->get_mac_params(dev, &params);

Privacy Policy