Lines Matching refs:peer
62 bt_addr_le_t peer; member
271 bt_addr_le_t peer; member
327 bt_addr_le_eq(&sc_cfg[i].peer, addr)) { in find_sc_cfg()
339 err = bt_settings_store_sc(cfg->id, &cfg->peer, &cfg->data, sizeof(cfg->data)); in sc_store()
345 LOG_DBG("stored SC for %s (0x%04x-0x%04x)", bt_addr_le_str(&cfg->peer), cfg->data.start, in sc_store()
367 err = bt_settings_delete_sc(cfg->id, &cfg->peer); in bt_gatt_clear_sc()
371 LOG_DBG("deleted SC for %s", bt_addr_le_str(&cfg->peer)); in bt_gatt_clear_sc()
401 LOG_DBG("peer %s", bt_addr_le_str(&cfg->peer)); in sc_reset()
433 static void sc_save(uint8_t id, bt_addr_le_t *peer, uint16_t start, uint16_t end) in sc_save() argument
438 LOG_DBG("peer %s start 0x%04x end 0x%04x", bt_addr_le_str(peer), start, end); in sc_save()
440 cfg = find_sc_cfg(id, peer); in sc_save()
450 bt_addr_le_copy(&cfg->peer, peer); in sc_save()
465 modified && bt_addr_le_is_bonded(cfg->id, &cfg->peer)) { in sc_save()
515 bt_addr_le_t peer; member
530 bt_addr_le_copy(&cfg->peer, BT_ADDR_LE_ANY); in clear_cf_cfg()
568 gatt_delayed_store_enqueue(cfg->id, &cfg->peer, DELAYED_STORE_CF); in set_change_aware()
575 static int bt_gatt_store_cf(uint8_t id, const bt_addr_le_t *peer);
591 if (!bt_addr_le_eq(&cfg->peer, BT_ADDR_LE_ANY)) { in set_all_change_unaware()
593 bt_gatt_store_cf(cfg->id, &cfg->peer); in set_all_change_unaware()
607 if (bt_addr_le_eq(&cfg->peer, BT_ADDR_LE_ANY)) { in find_cf_cfg()
610 } else if (bt_conn_is_peer_addr_le(conn, cfg->id, &cfg->peer)) { in find_cf_cfg()
690 bt_addr_le_copy(&cfg->peer, &conn->le.dst); in cf_write()
1027 bt_addr_le_copy(&cfg->peer, &conn->le.dst); in remove_cf_cfg()
1049 static int bt_gatt_store_cf(uint8_t id, const bt_addr_le_t *peer) in bt_gatt_store_cf() argument
1058 cfg = find_cf_cfg_by_addr(id, peer); in bt_gatt_store_cf()
1081 err = bt_settings_store_cf(id, peer, str, len); in bt_gatt_store_cf()
1087 LOG_DBG("Stored CF for %s", bt_addr_le_str(peer)); in bt_gatt_store_cf()
1125 if (bt_addr_le_eq(&ccc->cfg[i].peer, match->private_addr)) { in convert_to_id_on_match()
1126 bt_addr_le_copy(&ccc->cfg[i].peer, match->id_addr); in convert_to_id_on_match()
1154 bt_addr_le_copy(&cfg->peer, id_addr); in bt_gatt_identity_resolved()
1366 bt_addr_le_copy(&cfg->peer, BT_ADDR_LE_ANY); in clear_ccc_cfg()
1375 bt_addr_le_t peer; member
1396 bt_addr_le_eq(peer_addr, &el->peer)) { in gatt_delayed_store_find()
1409 memset(&el->peer, 0, sizeof(el->peer)); in gatt_delayed_store_free()
1428 bt_addr_le_copy(&el->peer, peer_addr); in gatt_delayed_store_alloc()
1467 gatt_store_ccc_cf(el->id, &el->peer); in delayed_store()
1615 if (bt_addr_le_eq(&cfg->peer, BT_ADDR_LE_ANY)) { in db_changed()
1625 conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, &cfg->peer); in db_changed()
1645 if (!bt_addr_le_eq(&cfg->peer, BT_ADDR_LE_ANY)) { in gatt_unregister_ccc()
1649 conn = bt_conn_lookup_addr_le(cfg->id, &cfg->peer); in gatt_unregister_ccc()
1664 bt_addr_le_is_bonded(cfg->id, &cfg->peer)) { in gatt_unregister_ccc()
1665 bt_gatt_store_ccc(cfg->id, &cfg->peer); in gatt_unregister_ccc()
2128 &cfg->peer)) { in find_ccc_cfg()
2131 } else if (bt_addr_le_eq(&cfg->peer, BT_ADDR_LE_ANY)) { in find_ccc_cfg()
2169 struct bt_conn *conn = bt_conn_lookup_addr_le(ccc->cfg[i].id, &ccc->cfg[i].peer); in gatt_ccc_changed()
2229 bt_addr_le_copy(&cfg->peer, &conn->le.dst); in bt_gatt_attr_write_ccc()
2741 if (bt_addr_le_eq(&cfg->peer, BT_ADDR_LE_ANY)) { in notify_cb()
2745 conn = bt_conn_lookup_state_le(cfg->id, &cfg->peer, in notify_cb()
2751 sc_save(cfg->id, &cfg->peer, in notify_cb()
2774 conn = bt_conn_lookup_addr_le(cfg->id, &cfg->peer); in notify_cb()
3279 LOG_DBG("peer %s start 0x%04x end 0x%04x", bt_addr_le_str(&cfg->peer), cfg->data.start, in sc_restore()
3322 !bt_conn_is_peer_addr_le(conn, cfg->id, &cfg->peer)) { in update_ccc()
3395 if (!bt_conn_is_peer_addr_le(conn, cfg->id, &cfg->peer)) { in disconnected_cb()
3399 tmp = bt_conn_lookup_addr_le(cfg->id, &cfg->peer); in disconnected_cb()
3417 bt_addr_le_copy(&cfg->peer, &conn->le.dst); in disconnected_cb()
3532 bt_addr_le_copy(&sub->peer, BT_ADDR_LE_ANY); in gatt_sub_free()
3558 if (bt_addr_le_eq(&sub->peer, BT_ADDR_LE_ANY)) { in gatt_sub_find()
3561 } else if (bt_conn_is_peer_addr_le(conn, sub->id, &sub->peer)) { in gatt_sub_find()
3577 bt_addr_le_copy(&sub->peer, &conn->le.dst); in gatt_sub_add()
3591 if (id == sub->id && bt_addr_le_eq(&sub->peer, addr)) { in gatt_sub_find_by_addr()
3608 bt_addr_le_copy(&sub->peer, addr); in gatt_sub_add_by_addr()
3702 if (sub->peer.type == BT_ADDR_LE_PUBLIC) { in gatt_sub_update()
3707 bt_addr_le_copy(&sub->peer, &conn->le.dst); in gatt_sub_update()
5510 int bt_gatt_resubscribe(uint8_t id, const bt_addr_le_t *peer, in bt_gatt_resubscribe() argument
5520 sub = gatt_sub_add_by_addr(id, peer); in bt_gatt_resubscribe()
5709 bt_addr_le_eq(&ccc->cfg[i].peer, addr)) { in ccc_find_cfg()
5788 bt_addr_le_copy(&cfg->peer, load->addr_with_id.addr); in ccc_load()
6063 bt_addr_le_eq(addr, &cf_cfg[i].peer)) { in find_cf_cfg_by_addr()
6202 bt_addr_le_copy(&cfg->peer, &addr); in sc_set()
6287 bt_addr_le_copy(&cfg->peer, &addr); in cf_set()
6426 bt_addr_le_eq(addr, &sub->peer)) { in find_gatt_sub()