Return-Path: From: Florian Grandel To: linux-bluetooth@vger.kernel.org Subject: [PATCH v5 04/16] Bluetooth: mgmt: multi adv for get_current_adv_instance() Date: Mon, 25 May 2015 00:39:02 +0200 Message-Id: <1432507154-22925-5-git-send-email-fgrandel@gmail.com> In-Reply-To: <1432507154-22925-1-git-send-email-fgrandel@gmail.com> References: <1432507154-22925-1-git-send-email-fgrandel@gmail.com> In-Reply-To: <1430408000-17785-1-git-send-email-fgrandel@gmail.com> References: <1430408000-17785-1-git-send-email-fgrandel@gmail.com> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Replaces the hard coded instance identifier in get_current_adv_instance() with the actual current instance identifier so that this method is prepared to work with more than one advertising instance. Signed-off-by: Florian Grandel --- net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 9f5ac26..c28bb2d 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -841,7 +841,7 @@ static u8 get_current_adv_instance(struct hci_dev *hdev) */ if (hci_dev_test_flag(hdev, HCI_ADVERTISING_INSTANCE) && !hci_dev_test_flag(hdev, HCI_ADVERTISING)) - return 0x01; + return hdev->cur_adv_instance; return 0x00; } -- 1.9.1