提交 be054fc8 编写于 作者: P Patrik Flykt 提交者: Marcel Holtmann

6lowpan: Set MAC address length according to LOWPAN_LLTYPE

Set MAC address length according to the 6LoWPAN link layer in use.
Bluetooth Low Energy uses 48 bit addressing while IEEE802.15.4 uses
64 bits.
Signed-off-by: NPatrik Flykt <patrik.flykt@linux.intel.com>
Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 c259d141
......@@ -23,7 +23,16 @@ int lowpan_register_netdevice(struct net_device *dev,
{
int i, ret;
dev->addr_len = EUI64_ADDR_LEN;
switch (lltype) {
case LOWPAN_LLTYPE_IEEE802154:
dev->addr_len = EUI64_ADDR_LEN;
break;
case LOWPAN_LLTYPE_BTLE:
dev->addr_len = ETH_ALEN;
break;
}
dev->type = ARPHRD_6LOWPAN;
dev->mtu = IPV6_MIN_MTU;
dev->priv_flags |= IFF_NO_QUEUE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册