Returns local role of the device (NONE, PANU or NAP). --- android/pan.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/android/pan.c b/android/pan.c index 7524dae..ede9d4a 100644 --- a/android/pan.c +++ b/android/pan.c @@ -276,11 +276,17 @@ static uint8_t bt_pan_enable(struct hal_cmd_pan_enable *cmd, uint16_t len) return HAL_STATUS_FAILED; } -static uint8_t bt_pan_get_role(void *cmd, uint16_t len) +static uint8_t bt_pan_get_role(int sk, void *cmd, uint16_t len) { - DBG("Not Implemented"); + struct hal_rsp_pan_get_role rsp; - return HAL_STATUS_FAILED; + DBG(""); + + rsp.local_role = local_role; + ipc_send(sk, HAL_SERVICE_ID_PAN, HAL_OP_PAN_GET_ROLE, sizeof(rsp), + &rsp, -1); + + return HAL_STATUS_SUCCESS; } void bt_pan_handle_cmd(int sk, uint8_t opcode, void *buf, uint16_t len) @@ -292,7 +298,7 @@ void bt_pan_handle_cmd(int sk, uint8_t opcode, void *buf, uint16_t len) status = bt_pan_enable(buf, len); break; case HAL_OP_PAN_GET_ROLE: - status = bt_pan_get_role(buf, len); + status = bt_pan_get_role(sk, buf, len); break; case HAL_OP_PAN_CONNECT: status = bt_pan_connect(buf, len); -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html