mgmt: Add adapter name to read_info response

This commit is contained in:
Johan Hedberg 2011-03-15 19:30:11 +02:00
parent 2854ecff1f
commit 1c16543345
3 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -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 {

View File

@ -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);
}