Re: [PATCH v3 1/2] Bluetooth: hci_core: Introduce multi-adv inst list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux