summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2008-08-28 13:49:18 -0300
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2008-08-28 19:06:20 -0300
commitfe8e6804983fd09a3293c5d7ae9a64e03cbc80e0 (patch)
tree06bcb27ed8316d4630ad971964734683b72d60f8
parent60377c2d855083c412adf4943225f0abf96ddddd (diff)
Cleanup: Removed set packet type ad voice settings
-rw-r--r--src/hcid.h12
-rw-r--r--src/main.c29
2 files changed, 10 insertions, 31 deletions
diff --git a/src/hcid.h b/src/hcid.h
index 088b0712..16f5dc93 100644
--- a/src/hcid.h
+++ b/src/hcid.h
@@ -28,18 +28,6 @@
/* When all services should trust a remote device */
#define GLOBAL_TRUST "[all]"
-enum {
- HCID_SET_NAME,
- HCID_SET_CLASS,
- HCID_SET_VOICE,
- HCID_SET_INQMODE,
- HCID_SET_PAGETO,
- HCID_SET_DISCOVTO,
- HCID_SET_PTYPE,
- HCID_SET_LM,
- HCID_SET_LP,
-};
-
/*
* Scanning modes, used by DEV_SET_MODE
* off: remote devices are not allowed to find or connect to this device
diff --git a/src/main.c b/src/main.c
index 2e180542..64f91870 100644
--- a/src/main.c
+++ b/src/main.c
@@ -59,6 +59,15 @@
#include "manager.h"
#include "storage.h"
+enum {
+ HCID_SET_NAME,
+ HCID_SET_CLASS,
+ HCID_SET_PAGETO,
+ HCID_SET_DISCOVTO,
+ HCID_SET_LM,
+ HCID_SET_LP,
+};
+
struct hcid_opts hcid;
struct device_opts default_device;
static struct device_list *device_list = NULL;
@@ -325,7 +334,7 @@ no_address:
return device_opts->discovto;
}
-void update_service_classes(const bdaddr_t *bdaddr, uint8_t value)
+static void update_service_classes(const bdaddr_t *bdaddr, uint8_t value)
{
struct hci_dev_list_req *dl;
struct hci_dev_req *dr;
@@ -536,15 +545,6 @@ static void configure_device(int dev_id)
memset(&dr, 0, sizeof(dr));
dr.dev_id = dev_id;
- /* Set packet type */
- if ((device_opts->flags & (1 << HCID_SET_PTYPE))) {
- dr.dev_opt = device_opts->pkt_type;
- if (ioctl(dd, HCISETPTYPE, (unsigned long) &dr) < 0) {
- error("Can't set packet type on hci%d: %s (%d)",
- dev_id, strerror(errno), errno);
- }
- }
-
/* Set link mode */
if ((device_opts->flags & (1 << HCID_SET_LM))) {
dr.dev_opt = device_opts->link_mode;
@@ -605,15 +605,6 @@ static void configure_device(int dev_id)
WRITE_PAGE_TIMEOUT_CP_SIZE, &cp);
}
- /* Set voice setting */
- if ((device_opts->flags & (1 << HCID_SET_VOICE))) {
- write_voice_setting_cp cp;
-
- cp.voice_setting = htobl(device_opts->voice);
- hci_send_cmd(dd, OGF_HOST_CTL, OCF_WRITE_VOICE_SETTING,
- WRITE_VOICE_SETTING_CP_SIZE, &cp);
- }
-
exit(0);
}