From 11cf1d6a0dbc66d0177852c514bad3737e1ee036 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 12 Sep 2008 00:16:53 +0200 Subject: Write the default link policy to ensure it is set --- src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main.c') 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; -- cgit