Context |
Check |
Description |
tedd_an/checkpatch |
success
|
Checkpatch PASS
|
tedd_an/gitlint |
fail
|
[v3,1/2] Bluetooth: Ignore HCI_ERROR_CANCELLED_BY_HOST on adv set terminated event
1: T1 Title exceeds max length (82>80): "[v3,1/2] Bluetooth: Ignore HCI_ERROR_CANCELLED_BY_HOST on adv set terminated event"
|
tedd_an/buildkernel |
success
|
Build Kernel PASS
|
tedd_an/testrunnersetup |
success
|
Test Runner Setup PASS
|
tedd_an/testrunnerl2cap-tester |
success
|
Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunnerbnep-tester |
success
|
Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunnermgmt-tester |
success
|
Total: 493, Passed: 492 (99.8%), Failed: 0, Not Run: 1
|
tedd_an/testrunnerrfcomm-tester |
success
|
Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunnersco-tester |
success
|
Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunnersmp-tester |
success
|
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
|
tedd_an/testrunneruserchan-tester |
success
|
Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0
|
@@ -566,6 +566,7 @@ enum {
#define HCI_ERROR_INVALID_LL_PARAMS 0x1e
#define HCI_ERROR_UNSPECIFIED 0x1f
#define HCI_ERROR_ADVERTISING_TIMEOUT 0x3c
+#define HCI_ERROR_CANCELLED_BY_HOST 0x44
/* Flow control modes */
#define HCI_FLOW_CTL_MODE_PACKET_BASED 0x00
@@ -5538,6 +5538,18 @@ static void hci_le_ext_adv_term_evt(struct hci_dev *hdev, struct sk_buff *skb)
adv = hci_find_adv_instance(hdev, ev->handle);
+ /* The Bluetooth Core 5.3 specification clearly states that this event
+ * shall not be sent when the Host disables the advertising set. So in
+ * case of HCI_ERROR_CANCELLED_BY_HOST, just ignore the event.
+ *
+ * When the Host disables an advertising set, all cleanup is done via
+ * its command callback and not needed to be duplicated here.
+ */
+ if (ev->status == HCI_ERROR_CANCELLED_BY_HOST) {
+ bt_dev_warn_ratelimited(hdev, "Unexpected advertising set terminated event");
+ return;
+ }
+
if (ev->status) {
if (!adv)
return;