mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-25 13:14:14 +08:00
mgmt: Add adapter name to read_info response
This commit is contained in:
parent
2854ecff1f
commit
1c16543345
@ -80,6 +80,7 @@ Read Controller Information Command
|
||||
Manufacturer (2 Octets)
|
||||
HCI_Version (1 Octet)
|
||||
HCI_Revision (2 Octets)
|
||||
Name (249 Octets)
|
||||
|
||||
Controller_Type:0x00 Reserved
|
||||
0x01 Bluetooth (BR/EDR)
|
||||
|
@ -65,6 +65,7 @@ struct mgmt_rp_read_info {
|
||||
uint16_t manufacturer;
|
||||
uint8_t hci_ver;
|
||||
uint16_t hci_rev;
|
||||
uint8_t name[249];
|
||||
} __packed;
|
||||
|
||||
struct mgmt_mode {
|
||||
|
@ -780,6 +780,7 @@ static void read_info_complete(int sk, uint16_t index, void *buf, size_t len)
|
||||
DBG("hci%u enabled %u discoverable %u pairable %u sec_mode %u", index,
|
||||
info->enabled, info->discoverable,
|
||||
info->pairable, info->sec_mode);
|
||||
DBG("hci%u name %s", index, (char *) rp->name);
|
||||
|
||||
adapter = btd_manager_register_adapter(index);
|
||||
if (adapter == NULL) {
|
||||
@ -798,6 +799,8 @@ static void read_info_complete(int sk, uint16_t index, void *buf, size_t len)
|
||||
else
|
||||
mgmt_set_powered(index, TRUE);
|
||||
|
||||
adapter_update_local_name(adapter, (char *) rp->name);
|
||||
|
||||
btd_adapter_unref(adapter);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user