Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says: ==================== pull request: bluetooth-next 2015-06-18 Here's the final bluetooth-next pull request for 4.2. - Cleanups & fixes to 802.15.4 code and related drivers - Fix btusb driver memory leak - New USB IDs for Atheros controllers - Support for BCM4324B3 UART based Broadcom controller - Fix for Bluetooth encryption key size handling - Broadcom controller initialization fixes - Support for Intel controller DDC parameters - Support for multiple Bluetooth LE advertising instances - Fix for HCI user channel cleanup path 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
bfdc8dbdf8
48 changed files with 2326 additions and 550 deletions
|
|
@ -225,15 +225,13 @@ static inline bool ieee802154_is_valid_psdu_len(const u8 len)
|
|||
* ieee802154_is_valid_psdu_len - check if extended addr is valid
|
||||
* @addr: extended addr to check
|
||||
*/
|
||||
static inline bool ieee802154_is_valid_extended_addr(const __le64 addr)
|
||||
static inline bool ieee802154_is_valid_extended_unicast_addr(const __le64 addr)
|
||||
{
|
||||
/* These EUI-64 addresses are reserved by IEEE. 0xffffffffffffffff
|
||||
* is used internally as extended to short address broadcast mapping.
|
||||
* This is currently a workaround because neighbor discovery can't
|
||||
* deal with short addresses types right now.
|
||||
/* Bail out if the address is all zero, or if the group
|
||||
* address bit is set.
|
||||
*/
|
||||
return ((addr != cpu_to_le64(0x0000000000000000ULL)) &&
|
||||
(addr != cpu_to_le64(0xffffffffffffffffULL)));
|
||||
!(addr & cpu_to_le64(0x0100000000000000ULL)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -244,9 +242,9 @@ static inline void ieee802154_random_extended_addr(__le64 *addr)
|
|||
{
|
||||
get_random_bytes(addr, IEEE802154_EXTENDED_ADDR_LEN);
|
||||
|
||||
/* toggle some bit if we hit an invalid extended addr */
|
||||
if (!ieee802154_is_valid_extended_addr(*addr))
|
||||
((u8 *)addr)[IEEE802154_EXTENDED_ADDR_LEN - 1] ^= 0x01;
|
||||
/* clear the group bit, and set the locally administered bit */
|
||||
((u8 *)addr)[IEEE802154_EXTENDED_ADDR_LEN - 1] &= ~0x01;
|
||||
((u8 *)addr)[IEEE802154_EXTENDED_ADDR_LEN - 1] |= 0x02;
|
||||
}
|
||||
|
||||
#endif /* LINUX_IEEE802154_H */
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ struct cc2520_platform_data {
|
|||
int sfd;
|
||||
int reset;
|
||||
int vreg;
|
||||
bool amplified;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue