mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
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: Patrik Flykt <[email protected]> Reviewed-by: Stefan Schmidt <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
committed by
Marcel Holtmann
parent
c259d1413b
commit
be054fc830
+10
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user