Skip to content

Commit 81cf3ee

Browse files
LingaoMm-alperen-sener
authored andcommitted
[nrf fromtree] Bluetooth: Mesh: Remove ADV_FLAG_PROXY_START, due to meanless
The first why introduce ADV_FLAG_PROXY_START see here(zephyrproject-rtos/zephyr#58826) The main core change is to mark ADV_FLAG_PROXY as moving to the last enabled proxy instead of before. But introducing the ADV_FLAG_PROXY_START flag seems meaningless. Signed-off-by: Lingao Meng <[email protected]> (cherry picked from commit bcac572)
1 parent 33cb335 commit 81cf3ee

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

subsys/bluetooth/mesh/adv_ext.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ enum {
5151
ADV_FLAG_SENT,
5252
/** Currently performing proxy advertising */
5353
ADV_FLAG_PROXY,
54-
/** The proxy has been start, but maybe pending. */
55-
ADV_FLAG_PROXY_START,
5654
/** The send-call has been pending. */
5755
ADV_FLAG_SCHEDULE_PENDING,
5856
/** Custom adv params have been set, we need to update the parameters on
@@ -286,7 +284,6 @@ static const char * const adv_tag_to_str[] = {
286284
static bool schedule_send_with_mask(struct bt_mesh_ext_adv *ext_adv, int ignore_mask)
287285
{
288286
if (atomic_test_and_clear_bit(ext_adv->flags, ADV_FLAG_PROXY)) {
289-
atomic_clear_bit(ext_adv->flags, ADV_FLAG_PROXY_START);
290287
(void)bt_le_ext_adv_stop(ext_adv->instance);
291288

292289
atomic_clear_bit(ext_adv->flags, ADV_FLAG_ACTIVE);
@@ -326,7 +323,6 @@ static void send_pending_adv(struct k_work *work)
326323

327324
atomic_clear_bit(ext_adv->flags, ADV_FLAG_ACTIVE);
328325
atomic_clear_bit(ext_adv->flags, ADV_FLAG_PROXY);
329-
atomic_clear_bit(ext_adv->flags, ADV_FLAG_PROXY_START);
330326

331327
if (ext_adv->adv) {
332328
struct bt_mesh_adv_ctx ctx = ext_adv->adv->ctx;
@@ -371,8 +367,6 @@ static void send_pending_adv(struct k_work *work)
371367
return;
372368
}
373369

374-
atomic_set_bit(ext_adv->flags, ADV_FLAG_PROXY_START);
375-
376370
if (!bt_mesh_adv_gatt_send()) {
377371
atomic_set_bit(ext_adv->flags, ADV_FLAG_PROXY);
378372
}
@@ -528,7 +522,7 @@ static void connected(struct bt_le_ext_adv *instance,
528522
{
529523
struct bt_mesh_ext_adv *ext_adv = gatt_adv_get();
530524

531-
if (atomic_test_and_clear_bit(ext_adv->flags, ADV_FLAG_PROXY_START)) {
525+
if (atomic_test_and_clear_bit(ext_adv->flags, ADV_FLAG_PROXY)) {
532526
atomic_clear_bit(ext_adv->flags, ADV_FLAG_ACTIVE);
533527
(void)schedule_send(ext_adv);
534528
}

0 commit comments

Comments
 (0)