aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_request.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-11-25 16:15:41 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-12-10 00:51:48 +0100
commit00cf5040b39638588cd10ae4ffcc76a1be6ecf2c (patch)
treedb7e41e180723991cd833c3407ef54356f945b8f /net/bluetooth/hci_request.c
parentBluetooth: Move discoverable timeout behind hdev->req_workqueue (diff)
downloadlinux-dev-00cf5040b39638588cd10ae4ffcc76a1be6ecf2c.tar.xz
linux-dev-00cf5040b39638588cd10ae4ffcc76a1be6ecf2c.zip
Bluetooth: HCI name update to hci_request.c
We'll soon need this both from hci_request.c and mgmt.c so move it as a request helper function to hci_request.c. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_request.c')
-rw-r--r--net/bluetooth/hci_request.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index fe14fd121d36..3150461c52a4 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -420,6 +420,16 @@ static void __hci_update_background_scan(struct hci_request *req)
}
}
+void __hci_req_update_name(struct hci_request *req)
+{
+ struct hci_dev *hdev = req->hdev;
+ struct hci_cp_write_local_name cp;
+
+ memcpy(cp.name, hdev->dev_name, sizeof(cp.name));
+
+ hci_req_add(req, HCI_OP_WRITE_LOCAL_NAME, sizeof(cp), &cp);
+}
+
void hci_req_add_le_scan_disable(struct hci_request *req)
{
struct hci_cp_le_set_scan_enable cp;