summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-02-22 17:19:09 (GMT)
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-23 11:07:00 (GMT)
commit490c5baba7a5ad80782d5eb778638d1cfc8d70ce (patch)
treee1963394e3f36165db4ce71fcd768f3b792c8495 /net/bluetooth
parent7f9a903c57bb42b9f7ad8fb7867859d3252229ab (diff)
downloadlinux-fsl-qoriq-490c5baba7a5ad80782d5eb778638d1cfc8d70ce.tar.xz
Bluetooth: Add hdev->short_name for EIR generation
It's possible to provide a short name through the mgmt interface and this name can be used for EIR generation when the full name doesn't fit there. This patch adds the preliminary tracking of the provided short name. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 16bddd2..3f6a2df 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2273,6 +2273,9 @@ static int set_local_name(struct sock *sk, u16 index, void *data,
goto failed;
}
+ memcpy(hdev->short_name, mgmt_cp->short_name,
+ sizeof(hdev->short_name));
+
memcpy(hci_cp.name, mgmt_cp->name, sizeof(hci_cp.name));
err = hci_send_cmd(hdev, HCI_OP_WRITE_LOCAL_NAME, sizeof(hci_cp),
&hci_cp);