core.c (51e0e5d8124ece158927a4c2288c0929d3b53aa3) | core.c (b72f6f51dc5abce94c1b5ee0186e9407ea0f919f) |
---|---|
1/* Copyright 2011, Siemens AG 2 * written by Alexander Smirnov <alex.bluesman.smirnov@gmail.com> 3 */ 4 5/* Based on patches from Jon Smirl <jonsmirl@gmail.com> 6 * Copyright (c) 2011 Jon Smirl <jonsmirl@gmail.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 124 unchanged lines hidden (view full) --- 133 dev_put(real_dev); 134 return -EBUSY; 135 } 136 137 lowpan_dev_info(dev)->real_dev = real_dev; 138 /* Set the lowpan hardware address to the wpan hardware address. */ 139 memcpy(dev->dev_addr, real_dev->dev_addr, IEEE802154_ADDR_LEN); 140 | 1/* Copyright 2011, Siemens AG 2 * written by Alexander Smirnov <alex.bluesman.smirnov@gmail.com> 3 */ 4 5/* Based on patches from Jon Smirl <jonsmirl@gmail.com> 6 * Copyright (c) 2011 Jon Smirl <jonsmirl@gmail.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 124 unchanged lines hidden (view full) --- 133 dev_put(real_dev); 134 return -EBUSY; 135 } 136 137 lowpan_dev_info(dev)->real_dev = real_dev; 138 /* Set the lowpan hardware address to the wpan hardware address. */ 139 memcpy(dev->dev_addr, real_dev->dev_addr, IEEE802154_ADDR_LEN); 140 |
141 lowpan_netdev_setup(dev, LOWPAN_LLTYPE_IEEE802154); 142 |
|
141 ret = register_netdevice(dev); 142 if (ret >= 0) { 143 real_dev->ieee802154_ptr->lowpan_dev = dev; 144 lowpan_rx_init(); 145 } 146 147 return ret; 148} --- 8 unchanged lines hidden (view full) --- 157 lowpan_rx_exit(); 158 real_dev->ieee802154_ptr->lowpan_dev = NULL; 159 unregister_netdevice(dev); 160 dev_put(real_dev); 161} 162 163static struct rtnl_link_ops lowpan_link_ops __read_mostly = { 164 .kind = "lowpan", | 143 ret = register_netdevice(dev); 144 if (ret >= 0) { 145 real_dev->ieee802154_ptr->lowpan_dev = dev; 146 lowpan_rx_init(); 147 } 148 149 return ret; 150} --- 8 unchanged lines hidden (view full) --- 159 lowpan_rx_exit(); 160 real_dev->ieee802154_ptr->lowpan_dev = NULL; 161 unregister_netdevice(dev); 162 dev_put(real_dev); 163} 164 165static struct rtnl_link_ops lowpan_link_ops __read_mostly = { 166 .kind = "lowpan", |
165 .priv_size = sizeof(struct lowpan_dev_info), | 167 .priv_size = LOWPAN_PRIV_SIZE(sizeof(struct lowpan_dev_info)), |
166 .setup = lowpan_setup, 167 .newlink = lowpan_newlink, 168 .dellink = lowpan_dellink, 169 .validate = lowpan_validate, 170}; 171 172static inline int __init lowpan_netlink_init(void) 173{ --- 76 unchanged lines hidden --- | 168 .setup = lowpan_setup, 169 .newlink = lowpan_newlink, 170 .dellink = lowpan_dellink, 171 .validate = lowpan_validate, 172}; 173 174static inline int __init lowpan_netlink_init(void) 175{ --- 76 unchanged lines hidden --- |