OSDN Git Service

emulator/btdev: Add dummy support for clearing the LE white list
authorAnderson Lizardo <anderson.lizardo@openbossa.org>
Sat, 1 Mar 2014 14:25:25 +0000 (10:25 -0400)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 7 Mar 2014 09:25:03 +0000 (11:25 +0200)
Add just enough support for being able to bring up LE capable virtual
controllers using "btvirt".

Fixes this error on "btvirt -l2":

Unsupported command 0x2010

And on "hciconfig hci0 up":

Can't init device hci0: Invalid request code (56)

emulator/btdev.c

index 4a54a23..b54f91e 100644 (file)
@@ -2353,6 +2353,13 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
                cmd_complete(btdev, opcode, &lrwls, sizeof(lrwls));
                break;
 
+       case BT_HCI_CMD_LE_CLEAR_WHITE_LIST:
+               if (btdev->type == BTDEV_TYPE_BREDR)
+                       goto unsupported;
+               status = BT_HCI_ERR_SUCCESS;
+               cmd_complete(btdev, opcode, &status, sizeof(status));
+               break;
+
        case BT_HCI_CMD_LE_READ_SUPPORTED_STATES:
                if (btdev->type == BTDEV_TYPE_BREDR)
                        goto unsupported;