lkml.org 
[lkml]   [2021]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH v2 2/2] Bluetooth: Attempt to clear HCI_LE_ADV on adv set terminated error event
From
From: Archie Pusaka <apusaka@chromium.org>

We should clear the flag if the adv instance removed due to receiving
this error status is the last one we have.

Signed-off-by: Archie Pusaka <apusaka@chromium.org>
---

(no changes since v1)

net/bluetooth/hci_event.c | 4 ++++
1 file changed, 4 insertions(+)

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;
}

--
2.33.1.1089.g2158813163f-goog
\
 
 \ /
  Last update: 2021-11-03 06:34    [W:0.072 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site