Browse Source

Bluetooth: mgmt: multi adv for get_current_adv_instance()

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 <fgrandel@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Florian Grandel 10 năm trước cách đây
mục cha
commit
3ff37e6b8c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      net/bluetooth/mgmt.c

+ 1 - 1
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;
 }