diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-10-24 17:09:54 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-11-01 18:27:00 -0400 |
commit | 1225a6bdf87446134789f3fc70ca75a056bbb1ed (patch) | |
tree | 44c6788c2f0405ee1083f8c4f9c697ea0df997e8 /net/bluetooth/mgmt.c | |
parent | 6b4b73ee75bd65c4a47b1a323cb7c5180a6d2ea7 (diff) |
Bluetooth: Fix unnecessary EIR update during powering on
When powered on the EIR data gets updated as the last step by mgmt.
Therefore avoid an update when getting a local name update as that's
part of the normal HCI init sequence.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 9017287224d3..bcf7690a23cb 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -3516,7 +3516,12 @@ send_event: | |||
3516 | err = mgmt_event(MGMT_EV_LOCAL_NAME_CHANGED, hdev, &ev, | 3516 | err = mgmt_event(MGMT_EV_LOCAL_NAME_CHANGED, hdev, &ev, |
3517 | sizeof(ev), cmd ? cmd->sk : NULL); | 3517 | sizeof(ev), cmd ? cmd->sk : NULL); |
3518 | 3518 | ||
3519 | update_eir(hdev); | 3519 | /* EIR is taken care of separately when powering on the |
3520 | * adapter so only update them here if this is a name change | ||
3521 | * unrelated to power on. | ||
3522 | */ | ||
3523 | if (!test_bit(HCI_INIT, &hdev->flags)) | ||
3524 | update_eir(hdev); | ||
3520 | 3525 | ||
3521 | failed: | 3526 | failed: |
3522 | if (cmd) | 3527 | if (cmd) |