mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says: ==================== pull request: bluetooth-next 2017-04-14 Here's the main batch of Bluetooth & 802.15.4 patches for the 4.12 kernel. - Many fixes to 6LoWPAN, in particular for BLE - New CA8210 IEEE 802.15.4 device driver (accounting for most of the lines of code added in this pull request) - Added Nokia Bluetooth (UART) HCI driver - Some serdev & TTY changes that are dependencies for the Nokia driver (with acks from relevant maintainers and an agreement that these come through the bluetooth tree) - Support for new Intel Bluetooth device - Various other minor cleanups/fixes here and there Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
450cc8cce2
39 changed files with 5308 additions and 265 deletions
|
@ -2073,12 +2073,23 @@ static void addrconf_leave_anycast(struct inet6_ifaddr *ifp)
|
|||
__ipv6_dev_ac_dec(ifp->idev, &addr);
|
||||
}
|
||||
|
||||
static int addrconf_ifid_eui64(u8 *eui, struct net_device *dev)
|
||||
static int addrconf_ifid_6lowpan(u8 *eui, struct net_device *dev)
|
||||
{
|
||||
if (dev->addr_len != EUI64_ADDR_LEN)
|
||||
switch (dev->addr_len) {
|
||||
case ETH_ALEN:
|
||||
memcpy(eui, dev->dev_addr, 3);
|
||||
eui[3] = 0xFF;
|
||||
eui[4] = 0xFE;
|
||||
memcpy(eui + 5, dev->dev_addr + 3, 3);
|
||||
break;
|
||||
case EUI64_ADDR_LEN:
|
||||
memcpy(eui, dev->dev_addr, EUI64_ADDR_LEN);
|
||||
eui[0] ^= 2;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
memcpy(eui, dev->dev_addr, EUI64_ADDR_LEN);
|
||||
eui[0] ^= 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2170,7 +2181,7 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
|
|||
case ARPHRD_TUNNEL:
|
||||
return addrconf_ifid_gre(eui, dev);
|
||||
case ARPHRD_6LOWPAN:
|
||||
return addrconf_ifid_eui64(eui, dev);
|
||||
return addrconf_ifid_6lowpan(eui, dev);
|
||||
case ARPHRD_IEEE1394:
|
||||
return addrconf_ifid_ieee1394(eui, dev);
|
||||
case ARPHRD_TUNNEL6:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue