mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
6lowpan: add lowpan dev register helpers
This patch introduces register and unregister functionality for lowpan interfaces. While register a lowpan interface there are several things which need to be initialize by the 6lowpan subsystem. Upcoming functionality need to register/unregister per interface components e.g. debugfs entry. Reviewed-by: Stefan Schmidt <[email protected]> Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
43f26e17d0
commit
00f5931411
4 changed files with 42 additions and 12 deletions
|
|
@ -161,9 +161,7 @@ static int lowpan_newlink(struct net *src_net, struct net_device *ldev,
|
|||
wdev->needed_headroom;
|
||||
ldev->needed_tailroom = wdev->needed_tailroom;
|
||||
|
||||
lowpan_netdev_setup(ldev, LOWPAN_LLTYPE_IEEE802154);
|
||||
|
||||
ret = register_netdevice(ldev);
|
||||
ret = lowpan_register_netdevice(ldev, LOWPAN_LLTYPE_IEEE802154);
|
||||
if (ret < 0) {
|
||||
dev_put(wdev);
|
||||
return ret;
|
||||
|
|
@ -180,7 +178,7 @@ static void lowpan_dellink(struct net_device *ldev, struct list_head *head)
|
|||
ASSERT_RTNL();
|
||||
|
||||
wdev->ieee802154_ptr->lowpan_dev = NULL;
|
||||
unregister_netdevice(ldev);
|
||||
lowpan_unregister_netdevice(ldev);
|
||||
dev_put(wdev);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue