Add handling to retrieve the id assigned by the stack

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24037 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Ruiz Dorantes 2008-02-20 21:05:59 +00:00
parent db55a020e6
commit 32d855f756
1 changed files with 7 additions and 0 deletions

View File

@ -494,6 +494,7 @@ device_open(const char *name, uint32 flags, void **cookie)
*cookie = bdev;
release_sem(bdev->lock);
flowf(" successful\n");
return B_OK;
unrun:
@ -624,6 +625,12 @@ device_control(void *cookie, uint32 msg, void *params, size_t size)
memcpy(params, &bdev->stat, sizeof(bt_hci_statistics));
err = B_OK;
break;
case GET_HCI_ID:
*(hci_id*)params = bdev->hdev;
err = bdev->hdev + 15;
break;
default:
debugf("Invalid opcode %ld.\n", msg);