Bluetooth: Clean up current advertising instance tracking
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 30 Nov 2015 09:21:45 +0000 (11:21 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 9 Dec 2015 23:51:50 +0000 (00:51 +0100)
commitcab054ab47fa3fdf1c597a9874363680bfdab33e
tree66de00bdcdbf62da735338ae63cd340d60035cc1
parentd6b7e2cddb72a87c2597af43ba9f5f2b03a2208b
Bluetooth: Clean up current advertising instance tracking

We can simplify a lot of code by making sure hdev->cur_adv_instance is
always up-to-date. This allows e.g. the removal of the
get_current_adv_instance() helper function and the special
HCI_ADV_CURRENT value. This patch also makes selecting instance 0x00
explicit in the various calls where advertising instances aren't
enabled, e.g. when HCI_ADVERTISING is set or we've just finished
enabling LE.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_core.c
net/bluetooth/hci_request.c
net/bluetooth/hci_request.h
net/bluetooth/mgmt.c