linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event
@ 2021-06-23  3:59 Luiz Augusto von Dentz
  2021-06-23  5:17 ` bluez.test.bot
  2021-06-25 21:44 ` [PATCH] " Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2021-06-23  3:59 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Error status of this event means that it has ended due reasons other
than a connection:

 'If advertising has terminated as a result of the advertising duration
 elapsing, the Status parameter shall be set to the error code
 Advertising Timeout (0x3C).'

 'If advertising has terminated because the
 Max_Extended_Advertising_Events was reached, the Status parameter
 shall be set to the error code Limit Reached (0x43).'

Fixes: acf0aeae431a0 ("Bluetooth: Handle ADv set terminated event")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/hci_event.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 1a4279dfb93e..9c18129e4dbc 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -5319,8 +5319,19 @@ static void hci_le_ext_adv_term_evt(struct hci_dev *hdev, struct sk_buff *skb)
 
 	BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
 
-	if (ev->status)
+	if (ev->status) {
+		struct adv_info *adv;
+
+		adv = hci_find_adv_instance(hdev, ev->handle);
+		if (!adv)
+			return;
+
+		/* Remove advertising as it has been terminated */
+		hci_remove_adv_instance(hdev, ev->handle);
+		mgmt_advertising_removed(NULL, hdev, ev->handle);
+
 		return;
+	}
 
 	conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->conn_handle));
 	if (conn) {
-- 
2.31.1


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

* RE: Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event
  2021-06-23  3:59 [PATCH] Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event Luiz Augusto von Dentz
@ 2021-06-23  5:17 ` bluez.test.bot
  2021-06-25 21:44 ` [PATCH] " Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2021-06-23  5:17 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 3277 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=505485

---Test result---

Test Summary:
CheckPatch                    FAIL      0.82 seconds
GitLint                       PASS      0.13 seconds
BuildKernel                   PASS      696.68 seconds
TestRunner: Setup             PASS      450.52 seconds
TestRunner: l2cap-tester      PASS      3.24 seconds
TestRunner: bnep-tester       PASS      2.16 seconds
TestRunner: mgmt-tester       PASS      32.95 seconds
TestRunner: rfcomm-tester     PASS      2.48 seconds
TestRunner: sco-tester        PASS      2.40 seconds
TestRunner: smp-tester        PASS      2.41 seconds
TestRunner: userchan-tester   PASS      2.22 seconds

Details
##############################
Test: CheckPatch - FAIL - 0.82 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event
WARNING: Unknown commit id 'acf0aeae431a0', maybe rebased or not pulled?
#18: 
Fixes: acf0aeae431a0 ("Bluetooth: Handle ADv set terminated event")

total: 0 errors, 1 warnings, 0 checks, 20 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated" has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - PASS - 0.13 seconds
Run gitlint with rule in .gitlint


##############################
Test: BuildKernel - PASS - 696.68 seconds
Build Kernel with minimal configuration supports Bluetooth


##############################
Test: TestRunner: Setup - PASS - 450.52 seconds
Setup environment for running Test Runner


##############################
Test: TestRunner: l2cap-tester - PASS - 3.24 seconds
Run test-runner with l2cap-tester
Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0

##############################
Test: TestRunner: bnep-tester - PASS - 2.16 seconds
Run test-runner with bnep-tester
Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0

##############################
Test: TestRunner: mgmt-tester - PASS - 32.95 seconds
Run test-runner with mgmt-tester
Total: 446, Passed: 433 (97.1%), Failed: 0, Not Run: 13

##############################
Test: TestRunner: rfcomm-tester - PASS - 2.48 seconds
Run test-runner with rfcomm-tester
Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0

##############################
Test: TestRunner: sco-tester - PASS - 2.40 seconds
Run test-runner with sco-tester
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0

##############################
Test: TestRunner: smp-tester - PASS - 2.41 seconds
Run test-runner with smp-tester
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0

##############################
Test: TestRunner: userchan-tester - PASS - 2.22 seconds
Run test-runner with userchan-tester
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0



---
Regards,
Linux Bluetooth


[-- Attachment #2: l2cap-tester.log --]
[-- Type: application/octet-stream, Size: 44349 bytes --]

[-- Attachment #3: bnep-tester.log --]
[-- Type: application/octet-stream, Size: 3557 bytes --]

[-- Attachment #4: mgmt-tester.log --]
[-- Type: application/octet-stream, Size: 608513 bytes --]

[-- Attachment #5: rfcomm-tester.log --]
[-- Type: application/octet-stream, Size: 11677 bytes --]

[-- Attachment #6: sco-tester.log --]
[-- Type: application/octet-stream, Size: 9912 bytes --]

[-- Attachment #7: smp-tester.log --]
[-- Type: application/octet-stream, Size: 11823 bytes --]

[-- Attachment #8: userchan-tester.log --]
[-- Type: application/octet-stream, Size: 5452 bytes --]

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

* Re: [PATCH] Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event
  2021-06-23  3:59 [PATCH] Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event Luiz Augusto von Dentz
  2021-06-23  5:17 ` bluez.test.bot
@ 2021-06-25 21:44 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2021-06-25 21:44 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

> Error status of this event means that it has ended due reasons other
> than a connection:
> 
> 'If advertising has terminated as a result of the advertising duration
> elapsing, the Status parameter shall be set to the error code
> Advertising Timeout (0x3C).'
> 
> 'If advertising has terminated because the
> Max_Extended_Advertising_Events was reached, the Status parameter
> shall be set to the error code Limit Reached (0x43).'
> 
> Fixes: acf0aeae431a0 ("Bluetooth: Handle ADv set terminated event")
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> ---
> net/bluetooth/hci_event.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


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

end of thread, other threads:[~2021-06-25 21:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23  3:59 [PATCH] Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event Luiz Augusto von Dentz
2021-06-23  5:17 ` bluez.test.bot
2021-06-25 21:44 ` [PATCH] " Marcel Holtmann

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).