Bluetooth: mgmt: Fix device_found parameters
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 22 Feb 2012 22:00:32 +0000 (00:00 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 23 Feb 2012 11:07:01 +0000 (13:07 +0200)
According to the latest mgmt API there's a flags field instead of a
separate confirm_name paramter.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/mgmt.h
net/bluetooth/mgmt.c

index 495668c77fb656e4339b5ad6c0f728beb4b66986..09646f5ef36a02819bc63847a49d8526cb03fd6f 100644 (file)
@@ -393,11 +393,14 @@ struct mgmt_ev_auth_failed {
        __u8 status;
 } __packed;
 
+#define MGMT_DEV_FOUND_CONFIRM_NAME    0x01
+#define MGMT_DEV_FOUND_LEGACY_PAIRING  0x02
+
 #define MGMT_EV_DEVICE_FOUND           0x0012
 struct mgmt_ev_device_found {
        struct mgmt_addr_info addr;
        __s8 rssi;
-       __u8 confirm_name;
+       __u8 flags[4];
        __le16 eir_len;
        __u8 eir[0];
 } __packed;
index 36bebfb2d8409a2093745ad632bd5d4bdfaf6375..b7b10ca297d5daf52f054fd0f5c81a07e4a28232 100644 (file)
@@ -3745,7 +3745,8 @@ int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
        bacpy(&ev->addr.bdaddr, bdaddr);
        ev->addr.type = link_to_mgmt(link_type, addr_type);
        ev->rssi = rssi;
-       ev->confirm_name = cfm_name;
+       if (cfm_name)
+               ev->flags[0] |= MGMT_DEV_FOUND_CONFIRM_NAME;
 
        if (eir_len > 0)
                memcpy(ev->eir, eir, eir_len);