aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index c79ffb955554..9917fe3d1d18 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -227,7 +227,8 @@ static void hci_cc_read_local_name(struct hci_dev *hdev, struct sk_buff *skb)
227 if (rp->status) 227 if (rp->status)
228 return; 228 return;
229 229
230 memcpy(hdev->dev_name, rp->name, HCI_MAX_NAME_LENGTH); 230 if (test_bit(HCI_SETUP, &hdev->dev_flags))
231 memcpy(hdev->dev_name, rp->name, HCI_MAX_NAME_LENGTH);
231} 232}
232 233
233static void hci_cc_write_auth_enable(struct hci_dev *hdev, struct sk_buff *skb) 234static void hci_cc_write_auth_enable(struct hci_dev *hdev, struct sk_buff *skb)