From 3c6856c212c6696eee02deae50788b102db8cf4d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 11 Jun 2008 03:59:47 +0000 Subject: Use auth requirement proposed by kernel if available --- hcid/dbus-hci.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c index 2bd32c23..94cbd18a 100644 --- a/hcid/dbus-hci.c +++ b/hcid/dbus-hci.c @@ -2454,19 +2454,16 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote, debug("kernel authentication requirement = 0x%02x", type); + *auth = (type == 0xff) ? 0x00 : type; + ba2str(remote, addr); device = adapter_find_device(adapter, addr); if (device && device->agent) { agent = device->agent; *auth = 0x03; - } else { + } else agent = adapter->agent; - *auth = 0x00; - } - - if (type != 0xff && type & 0x01) - *auth |= 0x01; if (!agent) { if (!(type & 0x01)) { -- cgit