diff options
Diffstat (limited to 'net/bluetooth/hci_sync.c')
| -rw-r--r-- | net/bluetooth/hci_sync.c | 15 | 
1 files changed, 14 insertions, 1 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 16daa79b7981..eea34e6a236f 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -280,6 +280,19 @@ int __hci_cmd_sync_status(struct hci_dev *hdev, u16 opcode, u32 plen,  }  EXPORT_SYMBOL(__hci_cmd_sync_status); +int hci_cmd_sync_status(struct hci_dev *hdev, u16 opcode, u32 plen, +			const void *param, u32 timeout) +{ +	int err; + +	hci_req_sync_lock(hdev); +	err = __hci_cmd_sync_status(hdev, opcode, plen, param, timeout); +	hci_req_sync_unlock(hdev); + +	return err; +} +EXPORT_SYMBOL(hci_cmd_sync_status); +  static void hci_cmd_sync_work(struct work_struct *work)  {  	struct hci_dev *hdev = container_of(work, struct hci_dev, cmd_sync_work); @@ -1194,7 +1207,7 @@ int hci_setup_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance)  	cp.own_addr_type = own_addr_type;  	cp.channel_map = hdev->le_adv_channel_map; -	cp.handle = instance; +	cp.handle = adv ? adv->handle : instance;  	if (flags & MGMT_ADV_FLAG_SEC_2M) {  		cp.primary_phy = HCI_ADV_PHY_1M;  |