mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-23 20:24:21 +08:00
android/hal-pan: Add implementation of .disconnect
This commit is contained in:
parent
ca999716d9
commit
3c10d4e015
@ -309,6 +309,11 @@ struct hal_cmd_pan_connect {
|
||||
uint8_t remote_role;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define HAL_OP_PAN_DISCONNECT 0x04
|
||||
struct hal_cmd_pan_disconnect {
|
||||
uint8_t bdaddr[6];
|
||||
} __attribute__((packed));
|
||||
|
||||
/* Notifications and confirmations */
|
||||
|
||||
|
||||
|
@ -85,15 +85,17 @@ static bt_status_t pan_connect(const bt_bdaddr_t *bd_addr, int local_role,
|
||||
|
||||
static bt_status_t pan_disconnect(const bt_bdaddr_t *bd_addr)
|
||||
{
|
||||
struct hal_cmd_pan_disconnect cmd;
|
||||
|
||||
DBG("");
|
||||
|
||||
if (!interface_ready())
|
||||
return BT_STATUS_NOT_READY;
|
||||
|
||||
if (!bd_addr)
|
||||
return BT_STATUS_PARM_INVALID;
|
||||
memcpy(cmd.bdaddr, bd_addr, sizeof(cmd.bdaddr));
|
||||
|
||||
return BT_STATUS_UNSUPPORTED;
|
||||
return hal_ipc_cmd(HAL_SERVICE_ID_PAN, HAL_OP_PAN_DISCONNECT,
|
||||
sizeof(cmd), &cmd, 0, NULL, NULL);
|
||||
}
|
||||
|
||||
static bt_status_t pan_init(const btpan_callbacks_t *callbacks)
|
||||
|
Loading…
Reference in New Issue
Block a user