aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee802154/nl-mac.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-11-05 14:51:18 -0500
committerMarcel Holtmann <marcel@holtmann.org>2014-11-05 15:53:04 -0500
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,
94 goto out; 94 goto out;
95 95
96 ops = ieee802154_mlme_ops(dev); 96 ops = ieee802154_mlme_ops(dev);
97 phy = ops->get_phy(dev); 97 phy = dev->ieee802154_ptr->wpan_phy;
98 BUG_ON(!phy); 98 BUG_ON(!phy);
99 get_device(&phy->dev);
99 100
100 short_addr = ops->get_short_addr(dev); 101 short_addr = ops->get_short_addr(dev);
101 pan_id = ops->get_pan_id(dev); 102 pan_id = ops->get_pan_id(dev);
@@ -493,7 +494,8 @@ int ieee802154_set_macparams(struct sk_buff *skb, struct genl_info *info)
493 !info->attrs[IEEE802154_ATTR_FRAME_RETRIES]) 494 !info->attrs[IEEE802154_ATTR_FRAME_RETRIES])
494 goto out; 495 goto out;
495 496
496 phy = ops->get_phy(dev); 497 phy = dev->ieee802154_ptr->wpan_phy;
498 get_device(&phy->dev);
497 499
498 ops->get_mac_params(dev, &params); 500 ops->get_mac_params(dev, &params);
499 501