Lines Matching defs:p_dev
2385 BOOLEAN gatt_is_bg_dev_for_app(tGATT_BG_CONN_DEV *p_dev, tGATT_IF gatt_if)
2391 if (p_dev->in_use && (p_dev->gatt_if[i] == gatt_if))
2460 tGATT_BG_CONN_DEV *p_dev = NULL;
2464 if ((p_dev = gatt_find_bg_dev(bd_addr)) == NULL)
2466 p_dev = gatt_alloc_bg_dev(bd_addr);
2469 if (p_dev)
2475 if (p_dev->gatt_if[i] == gatt_if)
2480 else if (p_dev->gatt_if[i] == 0)
2482 p_dev->gatt_if[i] = gatt_if;
2492 if (p_dev->listen_gif[i] == gatt_if)
2497 else if (p_dev->listen_gif[i] == 0)
2503 p_dev->listen_gif[i] = gatt_if;
2554 tGATT_BG_CONN_DEV *p_dev = NULL;
2558 if ((p_dev = gatt_find_bg_dev(bd_addr)) != NULL)
2562 if (p_dev->gatt_if[i])
2580 tGATT_BG_CONN_DEV *p_dev = NULL;
2584 if ((p_dev = gatt_find_bg_dev(bd_addr)) == NULL)
2591 if (p_dev->gatt_if[i] != 0 )
2593 *p_gatt_if = p_dev->gatt_if[i];
2615 tGATT_BG_CONN_DEV *p_dev = NULL;
2619 if ((p_dev = gatt_find_bg_dev(bd_addr)) == NULL)
2624 for (i = 0; i < GATT_MAX_APPS && (p_dev->gatt_if[i] > 0 || p_dev->listen_gif[i]); i ++)
2628 if (p_dev->gatt_if[i] == gatt_if)
2630 p_dev->gatt_if[i] = 0;
2633 p_dev->gatt_if[j - 1] = p_dev->gatt_if[j];
2635 if (p_dev->gatt_if[0] == 0)
2636 ret = BTM_BleUpdateBgConnDev(FALSE, p_dev->remote_bda);
2645 if (p_dev->listen_gif[i] == gatt_if)
2647 p_dev->listen_gif[i] = 0;
2651 p_dev->listen_gif[j - 1] = p_dev->listen_gif[j];
2653 if (p_dev->listen_gif[0] == 0)
2654 ret = BTM_BleUpdateAdvWhitelist(FALSE, p_dev->remote_bda);
2662 if (i != GATT_MAX_APPS && p_dev->gatt_if[0] == 0 && p_dev->listen_gif[0] == 0)
2664 memset(p_dev, 0, sizeof(tGATT_BG_CONN_DEV));