bonding_complete(dev, conn, HCI_UNSPECIFIED_ERROR);
}
-static int hciops_create_bonding(int index, bdaddr_t *bdaddr, uint8_t io_cap)
+static int hciops_create_bonding(int index, bdaddr_t *bdaddr,
+ uint8_t addr_type, uint8_t io_cap)
{
struct dev_info *dev = &devs[index];
BtIOSecLevel sec_level;
return 0;
}
-static int mgmt_create_bonding(int index, bdaddr_t *bdaddr, uint8_t io_cap)
+static int mgmt_create_bonding(int index, bdaddr_t *bdaddr, uint8_t addr_type, uint8_t io_cap)
{
char buf[MGMT_HDR_SIZE + sizeof(struct mgmt_cp_pair_device)];
struct mgmt_hdr *hdr = (void *) buf;
hdr->index = htobs(index);
bacpy(&cp->addr.bdaddr, bdaddr);
+ cp->addr.type = addr_type;
cp->io_cap = io_cap;
if (write(mgmt_sock, &buf, sizeof(buf)) < 0)
}
int adapter_create_bonding(struct btd_adapter *adapter, bdaddr_t *bdaddr,
- uint8_t io_cap)
+ uint8_t addr_type, uint8_t io_cap)
{
suspend_discovery(adapter);
- return adapter_ops->create_bonding(adapter->dev_id, bdaddr, io_cap);
+ return adapter_ops->create_bonding(adapter->dev_id, bdaddr,
+ addr_type, io_cap);
}
int adapter_cancel_bonding(struct btd_adapter *adapter, bdaddr_t *bdaddr)
int (*restore_powered) (int index);
int (*load_keys) (int index, GSList *keys, gboolean debug_keys);
int (*set_io_capability) (int index, uint8_t io_capability);
- int (*create_bonding) (int index, bdaddr_t *bdaddr, uint8_t io_cap);
+ int (*create_bonding) (int index, bdaddr_t *bdaddr, uint8_t addr_type,
+ uint8_t io_cap);
int (*cancel_bonding) (int index, bdaddr_t *bdaddr);
int (*read_local_oob_data) (int index);
int (*add_remote_oob_data) (int index, bdaddr_t *bdaddr, uint8_t *hash,
uint16_t product, uint16_t version);
int adapter_create_bonding(struct btd_adapter *adapter, bdaddr_t *bdaddr,
- uint8_t io_cap);
+ uint8_t addr_type, uint8_t io_cap);
int adapter_cancel_bonding(struct btd_adapter *adapter, bdaddr_t *bdaddr);
if (device_is_bonded(device))
return btd_error_already_exists(msg);
- err = adapter_create_bonding(adapter, &device->bdaddr, capability);
+ err = adapter_create_bonding(adapter, &device->bdaddr,
+ device->type, capability);
if (err < 0)
return btd_error_failed(msg, strerror(-err));