summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-09-12 00:16:53 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-09-12 00:16:53 +0200
commit11cf1d6a0dbc66d0177852c514bad3737e1ee036 (patch)
tree5fc5c6765d46f3ed74099ccc620636c707a6594e /src/main.c
parent60b5ff13e64bb82436517b317056c184545c4fd0 (diff)
Write the default link policy to ensure it is set
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 692bdfbd..057634a4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -329,6 +329,7 @@ static void at_child_exit(void)
static void configure_device(int dev_id)
{
struct hci_dev_info di;
+ uint16_t policy;
int dd;
if (hci_devinfo(dev_id, &di) < 0)
@@ -344,6 +345,11 @@ static void configure_device(int dev_id)
return;
}
+ /* Set default link policy */
+ policy = htobs(main_opts.link_policy);
+ hci_send_cmd(dd, OGF_LINK_POLICY,
+ OCF_WRITE_DEFAULT_LINK_POLICY, 2, &policy);
+
/* Set device name */
if ((main_opts.flags & (1 << HCID_SET_NAME)) && main_opts.name) {
change_local_name_cp cp;