linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Grandel <fgrandel@gmail.com>
To: Arman Uguray <armansito@chromium.org>
Cc: BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] Bluetooth: hci_core: Introduce multi-adv inst list
Date: Wed, 29 Apr 2015 14:20:55 +0200	[thread overview]
Message-ID: <5540CCA7.2020305@gmail.com> (raw)
In-Reply-To: <CAHrH25S6iCxuThBz0ZtKRu7PpoZkBjTHsFEU+NBozaNFJVyPqA@mail.gmail.com>

Hi Arman,

answers to your questions below:

 >> @@ -374,6 +377,8 @@ struct hci_dev {
>>          __u8                    scan_rsp_data_len;
>>
>>          struct adv_info         adv_instance;
>
> Is this still needed?

I leave this variable in the first patch and remove it in the second to 
get smaller patches without breaking the build. Is this ok?

>> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
>> index 476709b..1859e67 100644
>> --- a/net/bluetooth/hci_core.c
>> +++ b/net/bluetooth/hci_core.c
>> @@ -2613,6 +2613,119 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr,
>>          return 0;
>>   }
>>
>> +struct adv_info *hci_find_adv_instance(struct hci_dev *hdev, u8 instance)
>> +{
>
> Doesn't this require a lock as well?

Good catch, I actually found an instance where I called this method 
before locking hdev. Fixed.

>> +       struct adv_info *adv_instance;
>> +
>> +       list_for_each_entry(adv_instance, &hdev->adv_instances, list) {
>> +               if (adv_instance->instance != instance)
>> +                       continue;
>> +               return adv_instance;
Florian

  reply	other threads:[~2015-04-29 12:20 UTC|newest]

Thread overview: 172+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-04 15:43 [PATCH] Bluetooth: hci_core/mgmt: Change adv inst to list Florian Grandel
2015-04-05 18:21 ` [PATCH v2] " Florian Grandel
2015-04-09  9:49   ` Johan Hedberg
2015-04-09 10:28     ` Florian Grandel
2015-04-10  2:30     ` [PATCH v3 0/2] Bluetooth: Multi-Advertising Infrastructure Florian Grandel
2015-04-21  1:52       ` jerico.dev
2015-04-30 15:33       ` [PATCH v4 00/17] BlueZ/Bluetooth: Multi-advertising infrastructure Florian Grandel
2015-05-06 10:27         ` jerico.dev
2015-05-24 22:38         ` [PATCH v5 00/16] Bluetooth: " Florian Grandel
2015-05-25  0:52           ` Marcel Holtmann
2015-05-25  7:51             ` Florian Grandel
2015-05-26  0:34           ` [PATCH v6 " Florian Grandel
2015-05-27 19:23             ` Marcel Holtmann
2015-05-27 21:04               ` Florian Grandel
2015-05-31  1:20                 ` Johan Hedberg
2015-06-01 12:19                   ` Florian Grandel
2015-06-13  3:40             ` [PATCH v7 00/20] Bluetooth: Multi-advertising Florian Grandel
2015-06-18  1:16               ` [PATCH v8 00/20] Multi-advertising Florian Grandel
2015-06-18 16:58                 ` Marcel Holtmann
2015-06-18  1:16               ` [PATCH v8 01/20] Bluetooth: hci_core/mgmt: Introduce multi-adv list Florian Grandel
2015-06-18  1:16               ` [PATCH v8 02/20] Bluetooth: hci_core/mgmt: move adv timeout to hdev Florian Grandel
2015-06-18  1:16               ` [PATCH v8 03/20] Bluetooth: mgmt: dry update_scan_rsp_data() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 04/20] Bluetooth: mgmt: rename update_*_data_for_instance() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 05/20] Bluetooth: mgmt: multi adv for read_adv_features() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 06/20] Bluetooth: mgmt: multi adv for get_current_adv_instance() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 07/20] Bluetooth: mgmt: multi adv for get_adv_instance_flags() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 08/20] Bluetooth: mgmt: improve get_adv_instance_flags() readability Florian Grandel
2015-06-18  1:16               ` [PATCH v8 09/20] Bluetooth: mgmt: multi adv for enable_advertising() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 10/20] Bluetooth: mgmt: multi adv for create_instance_scan_rsp_data() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 11/20] Bluetooth: mgmt: multi adv for create_instance_adv_data() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 12/20] Bluetooth: mgmt: multi adv for set_advertising*() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 13/20] Bluetooth: mgmt: multi adv for clear_adv_instances() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 14/20] Bluetooth: mgmt/hci_core: multi-adv for add_advertising*() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 15/20] Bluetooth: mgmt: multi adv for remove_advertising*() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 16/20] Bluetooth: mgmt: program multi-adv on power on Florian Grandel
2015-06-18  1:16               ` [PATCH v8 17/20] Bluetooth: mgmt: multi-adv for trigger_le_scan() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 18/20] Bluetooth: mgmt: multi-adv for mgmt_reenable_advertising() Florian Grandel
2015-06-18  1:16               ` [PATCH v8 19/20] Bluetooth: hci_core: remove obsolete adv_instance Florian Grandel
2015-06-18  1:16               ` [PATCH v8 20/20] Bluetooth: hci_core: increase max adv inst Florian Grandel
2015-06-13  3:40             ` [PATCH v7 01/20] Bluetooth: hci_core/mgmt: Introduce multi-adv list Florian Grandel
2015-06-13  3:40             ` [PATCH v7 02/20] Bluetooth: hci_core/mgmt: move adv timeout to hdev Florian Grandel
2015-06-13  3:40             ` [PATCH v7 03/20] Bluetooth: mgmt: dry update_scan_rsp_data() Florian Grandel
2015-06-13  3:40             ` [PATCH v7 04/20] Bluetooth: mgmt: rename update_*_data_for_instance() Florian Grandel
2015-06-13  3:40             ` [PATCH v7 05/20] Bluetooth: mgmt: multi adv for read_adv_features() Florian Grandel
2015-06-13  3:40             ` [PATCH v7 06/20] Bluetooth: mgmt: multi adv for get_current_adv_instance() Florian Grandel
2015-06-13  3:41             ` [PATCH v7 07/20] Bluetooth: mgmt: multi adv for get_adv_instance_flags() Florian Grandel
2015-06-13  3:41             ` [PATCH v7 08/20] Bluetooth: mgmt: improve get_adv_instance_flags() readability Florian Grandel
2015-06-13  3:41             ` [PATCH v7 09/20] Bluetooth: mgmt: multi adv for enable_advertising() Florian Grandel
2015-06-13  3:41             ` [PATCH v7 10/20] Bluetooth: mgmt: multi adv for create_instance_scan_rsp_data() Florian Grandel
2015-06-13  3:41             ` [PATCH v7 11/20] Bluetooth: mgmt: multi adv for create_instance_adv_data() Florian Grandel
2015-06-13  3:41             ` [PATCH v7 12/20] Bluetooth: mgmt: multi adv for set_advertising*() Florian Grandel
2015-06-13  3:41             ` [PATCH v7 13/20] Bluetooth: mgmt: multi adv for clear_adv_instances() Florian Grandel
2015-06-13  3:41             ` [PATCH v7 14/20] Bluetooth: mgmt/hci_core: multi-adv for add_advertising*() Florian Grandel
2015-06-13  3:41             ` [PATCH v7 15/20] Bluetooth: mgmt: multi adv for remove_advertising*() Florian Grandel
2015-06-13  3:41             ` [PATCH v7 16/20] Bluetooth: mgmt: program multi-adv on power on Florian Grandel
2015-06-13  3:41             ` [PATCH v7 17/20] Bluetooth: mgmt: multi-adv for trigger_le_scan() Florian Grandel
2015-06-13  3:41             ` [PATCH v7 18/20] Bluetooth: mgmt: multi-adv for mgmt_reenable_advertising() Florian Grandel
2015-06-13  3:41             ` [PATCH v7 19/20] Bluetooth: hci_core: remove obsolete adv_instance Florian Grandel
2015-06-13  3:41             ` [PATCH v7 20/20] Bluetooth: hci_core: increase max adv inst Florian Grandel
2015-05-26  0:34           ` [PATCH v6 01/16] Bluetooth: hci_core: Introduce multi-adv inst list Florian Grandel
2015-05-26  0:34           ` [PATCH v6 02/16] Bluetooth: mgmt: dry update_scan_rsp_data() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 03/16] Bluetooth: mgmt: multi adv for read_adv_features() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 04/16] Bluetooth: mgmt: multi adv for get_current_adv_instance() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 05/16] Bluetooth: mgmt: multi adv for get_adv_instance_flags() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 06/16] Bluetooth: mgmt: improve get_adv_instance_flags() readability Florian Grandel
2015-05-26  0:34           ` [PATCH v6 07/16] Bluetooth: mgmt: multi adv for enable_advertising() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 08/16] Bluetooth: mgmt: use current adv instance in set_advertising() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 09/16] Bluetooth: mgmt: multi adv for create_instance_scan_rsp_data() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 10/16] Bluetooth: mgmt: multi adv for create_instance_adv_data() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 11/16] Bluetooth: mgmt: refactor update_*_data() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 12/16] Bluetooth: mgmt: multi adv for set_advertising_complete() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 13/16] Bluetooth: mgmt: multi adv for add_advertising() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 14/16] Bluetooth: mgmt: multi adv for clear_adv_instances() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 15/16] Bluetooth: mgmt: multi adv for remove_advertising() Florian Grandel
2015-05-26  0:34           ` [PATCH v6 16/16] Bluetooth: hci_core: remove obsolete adv_instance Florian Grandel
2015-05-24 22:38         ` [PATCH v5 01/16] Bluetooth: hci_core: Introduce multi-adv inst list Florian Grandel
2015-05-24 22:39         ` [PATCH v5 02/16] Bluetooth: mgmt: dry update_scan_rsp_data() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 03/16] Bluetooth: mgmt: multi adv for read_adv_features() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 04/16] Bluetooth: mgmt: multi adv for get_current_adv_instance() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 05/16] Bluetooth: mgmt: multi adv for get_adv_instance_flags() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 06/16] Bluetooth: mgmt: improve get_adv_instance_flags() readability Florian Grandel
2015-05-24 22:39         ` [PATCH v5 07/16] Bluetooth: mgmt: multi adv for enable_advertising() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 08/16] Bluetooth: mgmt: use current adv instance in set_advertising() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 09/16] Bluetooth: mgmt: multi adv for create_instance_scan_rsp_data() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 10/16] Bluetooth: mgmt: multi adv for create_instance_adv_data() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 11/16] Bluetooth: mgmt: refactor update_*_data() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 12/16] Bluetooth: mgmt: multi adv for set_advertising_complete() Florian Grandel
2015-05-25  0:25           ` Marcel Holtmann
2015-05-25  8:03             ` Florian Grandel
2015-05-24 22:39         ` [PATCH v5 13/16] Bluetooth: mgmt: multi adv for add_advertising() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 14/16] Bluetooth: mgmt: multi adv for clear_adv_instances() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 15/16] Bluetooth: mgmt: multi adv for remove_advertising() Florian Grandel
2015-05-24 22:39         ` [PATCH v5 16/16] Bluetooth: hci_core: remove obsolete adv_instance Florian Grandel
2015-05-24 22:40         ` [BlueZ v5] tools/mgmt_tester: expect 0 rp when removing all adv inst Florian Grandel
2015-05-25  0:52           ` Marcel Holtmann
2015-05-25  7:53             ` Florian Grandel
2015-05-26  0:35           ` [BlueZ v6 0/4] tools/mgmt-tester: multi-advertising additions Florian Grandel
2015-05-26  1:22             ` [BlueZ v7 " Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 00/15] doc/tests/btmgmt: multi-advertising Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 00/16] Multi-advertising Florian Grandel
2015-06-18  5:55                   ` Johan Hedberg
2015-06-18  7:11                     ` Johan Hedberg
2015-06-18 10:19                   ` Johan Hedberg
2015-06-18  1:17                 ` [BlueZ v9 01/16] doc/mgmt-api: multi-adv implementation details Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 02/16] doc/mgmt-api: fix typos Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 03/16] tools/btmgmt: make inst duration configurable Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 04/16] tools/mgmt-tester: error message when unexp params Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 05/16] tools/mgmt-tester: expect 0 rp when removing all adv inst Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 06/16] tools/mgmt-tester: comment add adv test setup Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 07/16] tools/mgmt-tester: rename add adv tests Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 08/16] tools/mgmt-tester: increase max adv inst Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 09/16] tools/mgmt-tester: keep instances on power cycle Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 10/16] tools/mgmt-tester: test adv inst override Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 11/16] tools/mgmt-tester: make test timeout configurable Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 12/16] tools/mgmt-tester: allow for event-only tests Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 13/16] tools/mgmt-tester: test advertising timeout Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 14/16] tools/mgmt-tester: test le off Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 15/16] tools/mgmt-tester: fix duplicate code Florian Grandel
2015-06-18  1:17                 ` [BlueZ v9 16/16] tools/mgmt-tester: test multi-adv Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 01/15] doc/mgmt-api: multi-adv implementation details Florian Grandel
2015-06-15 11:33                 ` Marcel Holtmann
2015-06-16  9:59                   ` Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 02/15] doc/mgmt-api: fix typos Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 03/15] tools/btmgmt: make inst duration configurable Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 04/15] tools/mgmt-tester: error message when unexp params Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 05/15] tools/mgmt-tester: expect 0 rp when removing all adv inst Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 06/15] tools/mgmt-tester: comment add adv test setup Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 07/15] tools/mgmt-tester: rename add adv tests Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 08/15] tools/mgmt-tester: increase max adv inst Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 09/15] tools/mgmt-tester: test adv inst override Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 10/15] tools/mgmt-tester: make test timeout configurable Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 11/15] tools/mgmt-tester: allow for event-only tests Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 12/15] tools/mgmt-tester: test advertising timeout Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 13/15] tools/mgmt-tester: test le off Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 14/15] tools/mgmt-tester: fix duplicate code Florian Grandel
2015-06-13  3:42               ` [BlueZ v8 15/15] tools/mgmt-tester: test multi-adv Florian Grandel
2015-05-26  1:22             ` [BlueZ v7 1/4] tools/mgmt_tester: expect 0 rp when removing all adv inst Florian Grandel
2015-05-26  1:22             ` [BlueZ v7 2/4] tools/mgmt-tester: comment add adv test setup Florian Grandel
2015-05-26  1:22             ` [BlueZ v7 3/4] tools/mgmt-tester: rename add adv tests Florian Grandel
2015-05-26  1:22             ` [BlueZ v7 4/4] tools/mgmt-tester: add an additional add adv test Florian Grandel
2015-05-26  0:35           ` [BlueZ v6 1/4] tools/mgmt_tester: expect 0 rp when removing all adv inst Florian Grandel
2015-05-26  0:35           ` [BlueZ v6 2/4] tools/mgmt-tester: comment add adv test setup Florian Grandel
2015-05-26  0:35           ` [BlueZ v6 3/4] tools/mgmt-tester: rename add adv tests Florian Grandel
2015-05-26  0:35           ` [BlueZ v6 4/4] tools/mgmt-tester: add an additional add adv test Florian Grandel
2015-04-30 15:33       ` [BlueZ v4 01/17] tools/mgmt_tester: expect 0 rp when removing all adv inst Florian Grandel
2015-04-30 15:33       ` [PATCH v4 02/17] Bluetooth: hci_core: Introduce multi-adv inst list Florian Grandel
2015-05-23 21:25         ` Marcel Holtmann
2015-05-24 21:50           ` Florian Grandel
2015-04-30 15:33       ` [PATCH v4 03/17] Bluetooth: mgmt: dry update_scan_rsp_data() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 04/17] Bluetooth: mgmt: multi adv for read_adv_features() Florian Grandel
2015-05-23 21:25         ` Marcel Holtmann
2015-05-24 22:41           ` Florian Grandel
2015-04-30 15:33       ` [PATCH v4 05/17] Bluetooth: mgmt: multi adv for get_current_adv_instance() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 06/17] Bluetooth: mgmt: multi adv for get_adv_instance_flags() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 07/17] Bluetooth: mgmt: improve get_adv_instance_flags() readability Florian Grandel
2015-04-30 15:33       ` [PATCH v4 08/17] Bluetooth: mgmt: multi adv for enable_advertising() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 09/17] Bluetooth: mgmt: use current adv instance in set_advertising() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 10/17] Bluetooth: mgmt: multi adv for create_instance_scan_rsp_data() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 11/17] Bluetooth: mgmt: multi adv for create_instance_adv_data() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 12/17] Bluetooth: mgmt: refactor update_*_data() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 13/17] Bluetooth: mgmt: multi adv for set_advertising_complete() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 14/17] Bluetooth: mgmt: multi adv for add_advertising() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 15/17] Bluetooth: mgmt: multi adv for clear_adv_instances() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 16/17] Bluetooth: multi adv for remove_advertising() Florian Grandel
2015-04-30 15:33       ` [PATCH v4 17/17] Bluetooth: hci_core: Remove obsolete adv_instance Florian Grandel
2015-04-10  2:30     ` [PATCH v3 1/2] Bluetooth: hci_core: Introduce multi-adv inst list Florian Grandel
2015-04-24  0:37       ` Arman Uguray
2015-04-29 12:20         ` Florian Grandel [this message]
2015-04-10  2:30     ` [PATCH v3 2/2] Bluetooth: mgmt: Start using " Florian Grandel
2015-04-24  1:33       ` Arman Uguray
2015-04-24 11:43         ` Florian Grandel
2015-04-30 15:46         ` Florian Grandel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5540CCA7.2020305@gmail.com \
    --to=fgrandel@gmail.com \
    --cc=armansito@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).