g_free(alias);
}
+void hcid_dbus_set_legacy_pairing(bdaddr_t *local, bdaddr_t *peer,
+ gboolean legacy)
+{
+ struct btd_adapter *adapter;
+ struct btd_device *device;
+ struct remote_dev_info *dev, match;
+
+ if (!get_adapter_and_device(local, peer, &adapter, &device, FALSE)) {
+ error("No matching adapter found");
+ return;
+ }
+
+ memset(&match, 0, sizeof(struct remote_dev_info));
+ bacpy(&match.bdaddr, peer);
+ match.name_status = NAME_ANY;
+
+ dev = adapter_search_found_devices(adapter, &match);
+ if (dev)
+ dev->legacy = legacy;
+}
+
void hcid_dbus_remote_class(bdaddr_t *local, bdaddr_t *peer, uint32_t class)
{
uint32_t old_class = 0;
int hcid_dbus_request_pin(int dev, bdaddr_t *sba, struct hci_conn_info *ci);
void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class, int8_t rssi, uint8_t *data);
+void hcid_dbus_set_legacy_pairing(bdaddr_t *local, bdaddr_t *peer, gboolean legacy);
void hcid_dbus_remote_class(bdaddr_t *local, bdaddr_t *peer, uint32_t class);
void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status, char *name);
void hcid_dbus_conn_complete(bdaddr_t *local, uint8_t status, uint16_t handle, bdaddr_t *peer);
adapter_set_state(adapter, state);
}
+static inline void remote_features_notify(int dev, bdaddr_t *sba, void *ptr)
+{
+ evt_remote_host_features_notify *evt = ptr;
+
+ if (evt->features[0] & 0x01)
+ hcid_dbus_set_legacy_pairing(sba, &evt->bdaddr, FALSE);
+ else
+ hcid_dbus_set_legacy_pairing(sba, &evt->bdaddr, TRUE);
+}
+
static inline void cmd_status(int dev, bdaddr_t *sba, void *ptr)
{
evt_cmd_status *evt = ptr;
remote_features_information(dev, &di->bdaddr, ptr);
break;
+ case EVT_REMOTE_HOST_FEATURES_NOTIFY:
+ remote_features_notify(dev, &di->bdaddr, ptr);
+ break;
+
case EVT_INQUIRY_COMPLETE:
evt = (evt_cmd_status *) ptr;
inquiry_complete(&di->bdaddr, evt->status, FALSE);