From: Johan Hedberg Date: Wed, 24 Oct 2012 21:09:54 +0000 (+0300) Subject: Bluetooth: Fix unnecessary EIR update during powering on X-Git-Tag: v3.8-rc1~139^2~17^2~247^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1225a6bdf87446134789f3fc70ca75a056bbb1ed;p=platform%2Fkernel%2Flinux-exynos.git 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 Acked-by: Marcel Holtmann Signed-off-by: Gustavo Padovan --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 9017287..bcf7690 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -3516,7 +3516,12 @@ send_event: err = mgmt_event(MGMT_EV_LOCAL_NAME_CHANGED, hdev, &ev, sizeof(ev), cmd ? cmd->sk : NULL); - update_eir(hdev); + /* EIR is taken care of separately when powering on the + * adapter so only update them here if this is a name change + * unrelated to power on. + */ + if (!test_bit(HCI_INIT, &hdev->flags)) + update_eir(hdev); failed: if (cmd)