diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-10-29 09:28:52 -0400 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-11-06 06:32:22 -0500 |
commit | 0a868b26c8ba32f6988f87dd81697917a2f612b6 (patch) | |
tree | 3f491304941c14735bb4a924b282d940e9033ab0 /net/ieee802154 | |
parent | 339b4ca5f68c7fd02eae54e9ce49c4b5f5d8b545 (diff) |
ieee802154: add PHY_NAME to LIST_IFACE command results
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/nl-mac.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c index e8816bf7c31e..135c1678fb11 100644 --- a/net/ieee802154/nl-mac.c +++ b/net/ieee802154/nl-mac.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <net/nl802154.h> | 33 | #include <net/nl802154.h> |
34 | #include <net/ieee802154.h> | 34 | #include <net/ieee802154.h> |
35 | #include <net/ieee802154_netdev.h> | 35 | #include <net/ieee802154_netdev.h> |
36 | #include <net/wpan-phy.h> | ||
36 | 37 | ||
37 | #include "ieee802154.h" | 38 | #include "ieee802154.h" |
38 | 39 | ||
@@ -251,6 +252,7 @@ static int ieee802154_nl_fill_iface(struct sk_buff *msg, u32 pid, | |||
251 | u32 seq, int flags, struct net_device *dev) | 252 | u32 seq, int flags, struct net_device *dev) |
252 | { | 253 | { |
253 | void *hdr; | 254 | void *hdr; |
255 | struct wpan_phy *phy; | ||
254 | 256 | ||
255 | pr_debug("%s\n", __func__); | 257 | pr_debug("%s\n", __func__); |
256 | 258 | ||
@@ -259,7 +261,11 @@ static int ieee802154_nl_fill_iface(struct sk_buff *msg, u32 pid, | |||
259 | if (!hdr) | 261 | if (!hdr) |
260 | goto out; | 262 | goto out; |
261 | 263 | ||
264 | phy = ieee802154_mlme_ops(dev)->get_phy(dev); | ||
265 | BUG_ON(!phy); | ||
266 | |||
262 | NLA_PUT_STRING(msg, IEEE802154_ATTR_DEV_NAME, dev->name); | 267 | NLA_PUT_STRING(msg, IEEE802154_ATTR_DEV_NAME, dev->name); |
268 | NLA_PUT_STRING(msg, IEEE802154_ATTR_PHY_NAME, wpan_phy_name(phy)); | ||
263 | NLA_PUT_U32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex); | 269 | NLA_PUT_U32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex); |
264 | 270 | ||
265 | NLA_PUT(msg, IEEE802154_ATTR_HW_ADDR, IEEE802154_ADDR_LEN, | 271 | NLA_PUT(msg, IEEE802154_ATTR_HW_ADDR, IEEE802154_ADDR_LEN, |
@@ -268,9 +274,11 @@ static int ieee802154_nl_fill_iface(struct sk_buff *msg, u32 pid, | |||
268 | ieee802154_mlme_ops(dev)->get_short_addr(dev)); | 274 | ieee802154_mlme_ops(dev)->get_short_addr(dev)); |
269 | NLA_PUT_U16(msg, IEEE802154_ATTR_PAN_ID, | 275 | NLA_PUT_U16(msg, IEEE802154_ATTR_PAN_ID, |
270 | ieee802154_mlme_ops(dev)->get_pan_id(dev)); | 276 | ieee802154_mlme_ops(dev)->get_pan_id(dev)); |
277 | wpan_phy_put(phy); | ||
271 | return genlmsg_end(msg, hdr); | 278 | return genlmsg_end(msg, hdr); |
272 | 279 | ||
273 | nla_put_failure: | 280 | nla_put_failure: |
281 | wpan_phy_put(phy); | ||
274 | genlmsg_cancel(msg, hdr); | 282 | genlmsg_cancel(msg, hdr); |
275 | out: | 283 | out: |
276 | return -EMSGSIZE; | 284 | return -EMSGSIZE; |