Bluetooth: Clean up advertising initialization in powered_update_hci()
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 30 Nov 2015 09:21:44 +0000 (11:21 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 9 Dec 2015 23:51:50 +0000 (00:51 +0100)
commitd6b7e2cddb72a87c2597af43ba9f5f2b03a2208b
tree32254aefb08fc902d8bf24da0d2876758975c73c
parent550a8ca765a154ca38dcd888b4f12a173e761bdc
Bluetooth: Clean up advertising initialization in powered_update_hci()

The logic in powered_update_hci() to initialize the advertising data &
state is a bit more complicated than it needs to be. It was previously
not doing anything if HCI_LE_ENABLED wasn't set, but this was not
obvious by quickly looking at the code. Now the conditions for the
various actions are more explicit. Another simplification is due to
the fact that __hci_req_schedule_adv_instance() takes care of setting
hdev->cur_adv_instance so there's no need to set it before calling the
function.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_request.c
This page took 0.025473 seconds and 5 git commands to generate.