Move local name reading into hciops
diff --git a/plugins/hciops.c b/plugins/hciops.c
index 37283a2..ac6b533 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -981,7 +981,9 @@
 		btd_event_le_set_scan_enable_complete(&BDADDR(index), status);
 		break;
 	case cmd_opcode_pack(OGF_HOST_CTL, OCF_CHANGE_LOCAL_NAME):
-		adapter_setname_complete(&BDADDR(index), status);
+		if (!status)
+			hci_send_cmd(SK(index), OGF_HOST_CTL,
+						OCF_READ_LOCAL_NAME, 0, 0);
 		break;
 	case cmd_opcode_pack(OGF_HOST_CTL, OCF_WRITE_SCAN_ENABLE):
 		btd_event_setscan_enable_complete(&BDADDR(index));
@@ -2063,15 +2065,6 @@
 	return 0;
 }
 
-static int hciops_read_name(int index)
-{
-	if (hci_send_cmd(SK(index), OGF_HOST_CTL, OCF_READ_LOCAL_NAME,
-								0, 0) < 0)
-		return -errno;
-
-	return 0;
-}
-
 static int hciops_cancel_resolve_name(int index, bdaddr_t *bdaddr)
 {
 	remote_name_req_cancel_cp cp;
@@ -2471,7 +2464,6 @@
 	.resolve_name = hciops_resolve_name,
 	.cancel_resolve_name = hciops_cancel_resolve_name,
 	.set_name = hciops_set_name,
-	.read_name = hciops_read_name,
 	.set_class = hciops_set_class,
 	.set_fast_connectable = hciops_fast_connectable,
 	.read_clock = hciops_read_clock,
diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c
index 8472bd0..3d96638 100644
--- a/plugins/mgmtops.c
+++ b/plugins/mgmtops.c
@@ -563,12 +563,6 @@
 	return -ENOSYS;
 }
 
-static int mgmt_read_name(int index)
-{
-	DBG("index %d", index);
-	return -ENOSYS;
-}
-
 static int mgmt_cancel_resolve_name(int index, bdaddr_t *bdaddr)
 {
 	char addr[18];
@@ -803,7 +797,6 @@
 	.resolve_name = mgmt_resolve_name,
 	.cancel_resolve_name = mgmt_cancel_resolve_name,
 	.set_name = mgmt_set_name,
-	.read_name = mgmt_read_name,
 	.set_class = mgmt_set_class,
 	.set_fast_connectable = mgmt_fast_connectable,
 	.read_clock = mgmt_read_clock,
diff --git a/src/adapter.c b/src/adapter.c
index fc0a8ec..9c1f196 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1056,27 +1056,6 @@
 	update_ext_inquiry_response(adapter);
 }
 
-void adapter_setname_complete(bdaddr_t *local, uint8_t status)
-{
-	struct btd_adapter *adapter;
-	int err;
-
-	if (status)
-		return;
-
-	adapter = manager_find_adapter(local);
-	if (!adapter) {
-		error("No matching adapter found");
-		return;
-	}
-
-	err = adapter_ops->read_name(adapter->dev_id);
-	if (err < 0)
-		error("Sending getting name command failed: %s (%d)",
-						strerror(errno), errno);
-
-}
-
 static DBusMessage *set_name(DBusConnection *conn, DBusMessage *msg,
 					const char *name, void *data)
 {
diff --git a/src/adapter.h b/src/adapter.h
index de7c858..381a3ec 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -196,7 +196,6 @@
 	int (*resolve_name) (int index, bdaddr_t *bdaddr);
 	int (*cancel_resolve_name) (int index, bdaddr_t *bdaddr);
 	int (*set_name) (int index, const char *name);
-	int (*read_name) (int index);
 	int (*set_class) (int index, uint32_t class);
 	int (*set_fast_connectable) (int index, gboolean enable);
 	int (*read_clock) (int index, int handle, int which, int timeout,