diff options
Diffstat (limited to 'net/ieee802154/nl-phy.c')
| -rw-r--r-- | net/ieee802154/nl-phy.c | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/net/ieee802154/nl-phy.c b/net/ieee802154/nl-phy.c index 22b1a7058fd3..d08c7a43dcd1 100644 --- a/net/ieee802154/nl-phy.c +++ b/net/ieee802154/nl-phy.c | |||
| @@ -77,8 +77,7 @@ out: | |||
| 77 | return -EMSGSIZE; | 77 | return -EMSGSIZE; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | static int ieee802154_list_phy(struct sk_buff *skb, | 80 | int ieee802154_list_phy(struct sk_buff *skb, struct genl_info *info) |
| 81 | struct genl_info *info) | ||
| 82 | { | 81 | { |
| 83 | /* Request for interface name, index, type, IEEE address, | 82 | /* Request for interface name, index, type, IEEE address, |
| 84 | PAN Id, short address */ | 83 | PAN Id, short address */ |
| @@ -151,8 +150,7 @@ static int ieee802154_dump_phy_iter(struct wpan_phy *phy, void *_data) | |||
| 151 | return 0; | 150 | return 0; |
| 152 | } | 151 | } |
| 153 | 152 | ||
| 154 | static int ieee802154_dump_phy(struct sk_buff *skb, | 153 | int ieee802154_dump_phy(struct sk_buff *skb, struct netlink_callback *cb) |
| 155 | struct netlink_callback *cb) | ||
| 156 | { | 154 | { |
| 157 | struct dump_phy_data data = { | 155 | struct dump_phy_data data = { |
| 158 | .cb = cb, | 156 | .cb = cb, |
| @@ -170,8 +168,7 @@ static int ieee802154_dump_phy(struct sk_buff *skb, | |||
| 170 | return skb->len; | 168 | return skb->len; |
| 171 | } | 169 | } |
| 172 | 170 | ||
| 173 | static int ieee802154_add_iface(struct sk_buff *skb, | 171 | int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info) |
| 174 | struct genl_info *info) | ||
| 175 | { | 172 | { |
| 176 | struct sk_buff *msg; | 173 | struct sk_buff *msg; |
| 177 | struct wpan_phy *phy; | 174 | struct wpan_phy *phy; |
| @@ -273,8 +270,7 @@ out_dev: | |||
| 273 | return rc; | 270 | return rc; |
| 274 | } | 271 | } |
| 275 | 272 | ||
| 276 | static int ieee802154_del_iface(struct sk_buff *skb, | 273 | int ieee802154_del_iface(struct sk_buff *skb, struct genl_info *info) |
| 277 | struct genl_info *info) | ||
| 278 | { | 274 | { |
| 279 | struct sk_buff *msg; | 275 | struct sk_buff *msg; |
| 280 | struct wpan_phy *phy; | 276 | struct wpan_phy *phy; |
| @@ -356,28 +352,3 @@ out_dev: | |||
| 356 | 352 | ||
| 357 | return rc; | 353 | return rc; |
| 358 | } | 354 | } |
| 359 | |||
| 360 | static struct genl_ops ieee802154_phy_ops[] = { | ||
| 361 | IEEE802154_DUMP(IEEE802154_LIST_PHY, ieee802154_list_phy, | ||
| 362 | ieee802154_dump_phy), | ||
| 363 | IEEE802154_OP(IEEE802154_ADD_IFACE, ieee802154_add_iface), | ||
| 364 | IEEE802154_OP(IEEE802154_DEL_IFACE, ieee802154_del_iface), | ||
| 365 | }; | ||
| 366 | |||
| 367 | /* | ||
| 368 | * No need to unregister as family unregistration will do it. | ||
| 369 | */ | ||
| 370 | int nl802154_phy_register(void) | ||
| 371 | { | ||
| 372 | int i; | ||
| 373 | int rc; | ||
| 374 | |||
| 375 | for (i = 0; i < ARRAY_SIZE(ieee802154_phy_ops); i++) { | ||
| 376 | rc = genl_register_ops(&nl802154_family, | ||
| 377 | &ieee802154_phy_ops[i]); | ||
| 378 | if (rc) | ||
| 379 | return rc; | ||
| 380 | } | ||
| 381 | |||
| 382 | return 0; | ||
| 383 | } | ||
