All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Fix advertising handle is set to 0
@ 2020-05-01  0:22 Tedd Ho-Jeong An
  2020-05-01  5:11 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Tedd Ho-Jeong An @ 2020-05-01  0:22 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Luiz Augusto von Dentz

From: Tedd Ho-Jeong An <tedd.an@intel.com>

This patch fix the advertising handle is set to 0 regardless of actual
instance value. The affected commands are LE Set Advertising Set Random
Address, LE Set Extended Advertising Data, and LE Set Extended Scan
Response Data commands.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>

---
 net/bluetooth/hci_request.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index 9ea40106ef17..3f470f0e432c 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -1447,7 +1447,7 @@ void __hci_req_update_scan_rsp_data(struct hci_request
*req, u8 instance)
 		memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data));
 		hdev->scan_rsp_data_len = len;
 
-		cp.handle = 0;
+		cp.handle = instance;
 		cp.length = len;
 		cp.operation = LE_SET_ADV_DATA_OP_COMPLETE;
 		cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG;
@@ -1591,7 +1591,7 @@ void __hci_req_update_adv_data(struct hci_request *req, u8
instance)
 		hdev->adv_data_len = len;
 
 		cp.length = len;
-		cp.handle = 0;
+		cp.handle = instance;
 		cp.operation = LE_SET_ADV_DATA_OP_COMPLETE;
 		cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG;
 
@@ -1876,7 +1876,7 @@ int __hci_req_setup_ext_adv_instance(struct hci_request
*req, u8 instance)
 
 		memset(&cp, 0, sizeof(cp));
 
-		cp.handle = 0;
+		cp.handle = instance;
 		bacpy(&cp.bdaddr, &random_addr);
 
 		hci_req_add(req,
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: Fix advertising handle is set to 0
  2020-05-01  0:22 [PATCH] Bluetooth: Fix advertising handle is set to 0 Tedd Ho-Jeong An
@ 2020-05-01  5:11 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2020-05-01  5:11 UTC (permalink / raw)
  To: Tedd Ho-Jeong An; +Cc: linux-bluetooth, Luiz Augusto von Dentz

Hi Tedd,

> This patch fix the advertising handle is set to 0 regardless of actual
> instance value. The affected commands are LE Set Advertising Set Random
> Address, LE Set Extended Advertising Data, and LE Set Extended Scan
> Response Data commands.
> 
> Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
> 
> ---
> net/bluetooth/hci_request.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

seems the patch does not cleanly apply to bluetooth-next. Please update as needed.

Regards

Marcel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-01  5:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-01  0:22 [PATCH] Bluetooth: Fix advertising handle is set to 0 Tedd Ho-Jeong An
2020-05-01  5:11 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.