From: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Subject: [PATCH_v2 6/7] android/pan: Implement the get local role method in daemon
Date: Thu, 28 Nov 2013 16:45:54 +0200 [thread overview]
Message-ID: <1385649955-29276-7-git-send-email-ravikumar.veeramally@linux.intel.com> (raw)
In-Reply-To: <1385649955-29276-1-git-send-email-ravikumar.veeramally@linux.intel.com>
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
next prev parent reply other threads:[~2013-11-28 14:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 14:45 [PATCH_v2 0/7] Refactor bnep code and implement pan methods Ravi kumar Veeramally
2013-11-28 14:45 ` [PATCH_v2 1/7] profiles/network: Remove redundant code for bnep interface name Ravi kumar Veeramally
2013-11-28 15:52 ` Anderson Lizardo
2013-11-28 16:12 ` Luiz Augusto von Dentz
2013-11-28 19:55 ` Ravi kumar Veeramally
2013-11-28 14:45 ` [PATCH_v2 2/7] profiles/network: Refactor bnep connection setup functionality Ravi kumar Veeramally
2013-11-28 14:45 ` [PATCH_v2 3/7] profiles/network: Rename common.c|h to bnep.c|h Ravi kumar Veeramally
2013-11-28 16:19 ` Luiz Augusto von Dentz
2013-11-28 19:52 ` Ravi kumar Veeramally
2013-11-28 14:45 ` [PATCH_v2 4/7] android/pan: Implement pan connect method in daemon Ravi kumar Veeramally
2013-11-28 14:45 ` [PATCH_v2 5/7] android/pan: Implement pan disconnect " Ravi kumar Veeramally
2013-11-28 14:45 ` Ravi kumar Veeramally [this message]
2013-11-28 14:45 ` [PATCH_v2 7/7] android: Add reasons for adding capabilites to process Ravi kumar Veeramally
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385649955-29276-7-git-send-email-ravikumar.veeramally@linux.intel.com \
--to=ravikumar.veeramally@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.