Message ID | 20211103133225.v2.2.I4e34d9e5fdd7515aa15d0ee2ef94d57dcb48a927@changeid (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2,1/2] Bluetooth: Ignore HCI_ERROR_CANCELLED_BY_HOST on adv set terminated event | expand |
Context | Check | Description |
---|---|---|
tedd_an/checkpatch | success | Checkpatch PASS |
tedd_an/gitlint | fail | [v2,2/2] Bluetooth: Attempt to clear HCI_LE_ADV on adv set terminated error event 1: T1 Title exceeds max length (81>80): "[v2,2/2] Bluetooth: Attempt to clear HCI_LE_ADV on adv set terminated error event" |
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 7d875927c48b..d3478cdfd009 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -5558,6 +5558,10 @@ static void hci_le_ext_adv_term_evt(struct hci_dev *hdev, struct sk_buff *skb) hci_remove_adv_instance(hdev, ev->handle); mgmt_advertising_removed(NULL, hdev, ev->handle); + /* If we are no longer advertising, clear HCI_LE_ADV */ + if (list_empty(&hdev->adv_instances)) + hci_dev_clear_flag(hdev, HCI_LE_ADV); + return; }