blob: 83b19e072224b031403d5904f1d9a8de7eb05ee2 [file] [log] [blame]
Alexander Aringb72f6f52015-08-11 21:44:08 +02001/* This program is free software; you can redistribute it and/or modify
2 * it under the terms of the GNU General Public License version 2
3 * as published by the Free Software Foundation.
4 *
5 * This program is distributed in the hope that it will be useful,
6 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8 * GNU General Public License for more details.
9 *
10 * Authors:
11 * (C) 2015 Pengutronix, Alexander Aring <aar@pengutronix.de>
12 */
13
Alexander Aring4ae935c2015-08-11 21:44:09 +020014#include <linux/module.h>
15
Alexander Aringb72f6f52015-08-11 21:44:08 +020016#include <net/6lowpan.h>
17
18void lowpan_netdev_setup(struct net_device *dev, enum lowpan_lltypes lltype)
19{
Alexander Aring4d6a6ae2015-10-02 20:28:04 +020020 dev->addr_len = EUI64_ADDR_LEN;
21 dev->type = ARPHRD_6LOWPAN;
22 dev->mtu = IPV6_MIN_MTU;
23 dev->priv_flags |= IFF_NO_QUEUE;
24
Alexander Aringb72f6f52015-08-11 21:44:08 +020025 lowpan_priv(dev)->lltype = lltype;
26}
27EXPORT_SYMBOL(lowpan_netdev_setup);
Alexander Aring4ae935c2015-08-11 21:44:09 +020028
29static int __init lowpan_module_init(void)
30{
31 request_module_nowait("ipv6");
32
33 request_module_nowait("nhc_dest");
34 request_module_nowait("nhc_fragment");
35 request_module_nowait("nhc_hop");
36 request_module_nowait("nhc_ipv6");
37 request_module_nowait("nhc_mobility");
38 request_module_nowait("nhc_routing");
39 request_module_nowait("nhc_udp");
40
41 return 0;
42}
43module_init(lowpan_module_init);
44
45MODULE_LICENSE("GPL");