summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/hciops.c5
-rw-r--r--src/adapter.c20
-rw-r--r--src/adapter.h4
-rw-r--r--src/hcid.h5
-rw-r--r--src/manager.c2
5 files changed, 8 insertions, 28 deletions
diff --git a/plugins/hciops.c b/plugins/hciops.c
index 8a790108..73a74556 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -62,6 +62,11 @@ static struct dev_info {
int sk;
} *devs = NULL;
+static int ignore_device(struct hci_dev_info *di)
+{
+ return hci_test_bit(HCI_RAW, &di->flags) || di->type >> 4 != HCI_BREDR;
+}
+
static void init_dev_info(int index, int sk)
{
memset(&devs[index], 0, sizeof(struct dev_info));
diff --git a/src/adapter.c b/src/adapter.c
index e12d9e50..d0238011 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -285,8 +285,7 @@ static void update_ext_inquiry_response(struct btd_adapter *adapter)
strerror(-ret), -ret);
}
-static int adapter_set_service_classes(struct btd_adapter *adapter,
- uint8_t value)
+int adapter_set_service_classes(struct btd_adapter *adapter, uint8_t value)
{
int err;
@@ -2481,11 +2480,6 @@ int adapter_start(struct btd_adapter *adapter)
if (hci_devinfo(adapter->dev_id, &di) < 0)
return -errno;
- if (ignore_device(&di)) {
- dev->ignore = 1;
- return -1;
- }
-
if (!bacmp(&di.bdaddr, BDADDR_ANY)) {
int err;
@@ -2685,18 +2679,6 @@ int adapter_stop(struct btd_adapter *adapter)
return 0;
}
-int adapter_update(struct btd_adapter *adapter, uint8_t new_svc)
-{
- struct hci_dev *dev = &adapter->dev;
-
- if (dev->ignore)
- return 0;
-
- adapter_set_service_classes(adapter, new_svc);
-
- return 0;
-}
-
int adapter_update_ssp_mode(struct btd_adapter *adapter, uint8_t mode)
{
struct hci_dev *dev = &adapter->dev;
diff --git a/src/adapter.h b/src/adapter.h
index aa4d6867..8019cfc2 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -72,8 +72,6 @@ struct remote_dev_info {
};
struct hci_dev {
- int ignore;
-
uint8_t features[8];
uint8_t extfeatures[8];
uint8_t lmp_ver;
@@ -89,7 +87,7 @@ int adapter_start(struct btd_adapter *adapter);
int adapter_stop(struct btd_adapter *adapter);
-int adapter_update(struct btd_adapter *adapter, uint8_t cls);
+int adapter_set_service_classes(struct btd_adapter *adapter, uint8_t value);
int adapter_update_ssp_mode(struct btd_adapter *adapter, uint8_t mode);
diff --git a/src/hcid.h b/src/hcid.h
index c73fe80c..caa1d624 100644
--- a/src/hcid.h
+++ b/src/hcid.h
@@ -85,8 +85,3 @@ void plugin_cleanup(void);
void rfkill_init(void);
void rfkill_exit(void);
-
-static inline int ignore_device(struct hci_dev_info *di)
-{
- return hci_test_bit(HCI_RAW, &di->flags) || di->type >> 4 != HCI_BREDR;
-}
diff --git a/src/manager.c b/src/manager.c
index dd9560f2..3fad9e69 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -63,7 +63,7 @@ const char *manager_get_base_path(void)
void manager_update_svc(struct btd_adapter* adapter, uint8_t svc)
{
- adapter_update(adapter, svc);
+ adapter_set_service_classes(adapter, svc);
}
static inline DBusMessage *invalid_args(DBusMessage *msg)