Bluetooth: Fix append max 11 bytes of name to scan rsp data
authorMichał Narajowski <michal.narajowski@codecoup.pl>
Wed, 19 Oct 2016 08:20:27 +0000 (10:20 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 19 Oct 2016 16:42:37 +0000 (18:42 +0200)
commitf61851f64b171a684f5a1fa78325756dbbaadadc
treea6296b4aecf3903a33de96608eef7c27bcbd1663
parent5e2bd93b8fcac8c0cf83f189d996831fb21f2db3
Bluetooth: Fix append max 11 bytes of name to scan rsp data

Append maximum of 10 + 1 bytes of name to scan response data.
Complete name is appended only if exists and is <= 10 characters.
Else append short name if exists or shorten complete name if not.
This makes sure name is consistent across multiple advertising
instances.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_request.c
net/bluetooth/hci_request.h
net/bluetooth/mgmt.c