summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-11-25 15:15:41 +0100
committerMarcel Holtmann <marcel@holtmann.org>2015-12-10 00:51:48 +0100
commit00cf5040b39638588cd10ae4ffcc76a1be6ecf2c (patch)
treedb7e41e180723991cd833c3407ef54356f945b8f /net/bluetooth/mgmt.c
parentBluetooth: Move discoverable timeout behind hdev->req_workqueue (diff)
downloadlinux-00cf5040b39638588cd10ae4ffcc76a1be6ecf2c.tar.xz
linux-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/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 29b3bb70ae9f..001a29a320e6 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -3153,16 +3153,6 @@ static int user_passkey_neg_reply(struct sock *sk, struct hci_dev *hdev,
HCI_OP_USER_PASSKEY_NEG_REPLY, 0);
}
-static void 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);
-}
-
static void set_name_complete(struct hci_dev *hdev, u8 status, u16 opcode)
{
struct mgmt_cp_set_local_name *cp;
@@ -3241,7 +3231,7 @@ static int set_local_name(struct sock *sk, struct hci_dev *hdev, void *data,
hci_req_init(&req, hdev);
if (lmp_bredr_capable(hdev)) {
- update_name(&req);
+ __hci_req_update_name(&req);
update_eir(&req);
}
@@ -6768,7 +6758,7 @@ static int powered_update_hci(struct hci_dev *hdev)
write_fast_connectable(&req, false);
__hci_req_update_scan(&req);
__hci_req_update_class(&req);
- update_name(&req);
+ __hci_req_update_name(&req);
update_eir(&req);
}