From: Luiz Augusto von Dentz Date: Mon, 28 Oct 2013 12:09:03 +0000 (+0200) Subject: android/hal-pan: Add implementation of .enable X-Git-Tag: android-x86-4.4-r3~7138 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ab2a0efba8f5b2c909dced31e2d2e78b7a15b522;p=android-x86%2Fexternal-bluetooth-bluez.git android/hal-pan: Add implementation of .enable --- diff --git a/android/hal-msg.h b/android/hal-msg.h index a0a83904d..0987eec48 100644 --- a/android/hal-msg.h +++ b/android/hal-msg.h @@ -290,6 +290,13 @@ struct hal_cmd_av_disconnect { uint8_t bdaddr[6]; } __attribute__((packed)); +/* PAN HAL API */ + +#define HAL_OP_PAN_ENABLE 0x01 +struct hal_cmd_pan_enable { + uint8_t local_role; +} __attribute__((packed)); + /* Notifications and confirmations */ diff --git a/android/hal-pan.c b/android/hal-pan.c index 62fec0020..8fb2563cd 100644 --- a/android/hal-pan.c +++ b/android/hal-pan.c @@ -32,12 +32,17 @@ static bool interface_ready(void) static bt_status_t pan_enable(int local_role) { + struct hal_cmd_pan_enable cmd; + DBG(""); if (!interface_ready()) return BT_STATUS_NOT_READY; - return BT_STATUS_UNSUPPORTED; + cmd.local_role = local_role; + + return hal_ipc_cmd(HAL_SERVICE_ID_PAN, HAL_OP_PAN_ENABLE, + sizeof(cmd), &cmd, 0, NULL, NULL); } static int pan_get_local_role(void)