Lines Matching defs:p_dev
2225 BOOLEAN gatt_is_bg_dev_for_app(tGATT_BG_CONN_DEV *p_dev, tGATT_IF gatt_if)
2231 if (p_dev->in_use && (p_dev->gatt_if[i] == gatt_if))
2300 tGATT_BG_CONN_DEV *p_dev = NULL;
2304 if ((p_dev = gatt_find_bg_dev(bd_addr)) == NULL)
2306 p_dev = gatt_alloc_bg_dev(bd_addr);
2309 if (p_dev)
2315 if (p_dev->gatt_if[i] == gatt_if)
2320 else if (p_dev->gatt_if[i] == 0)
2322 p_dev->gatt_if[i] = gatt_if;
2330 if (p_dev->listen_gif[i] == gatt_if)
2335 else if (p_dev->listen_gif[i] == 0)
2341 p_dev->listen_gif[i] = gatt_if;
2390 tGATT_BG_CONN_DEV *p_dev = NULL;
2394 if ((p_dev = gatt_find_bg_dev(bd_addr)) != NULL)
2398 if (p_dev->gatt_if[i])
2416 tGATT_BG_CONN_DEV *p_dev = NULL;
2420 if ((p_dev = gatt_find_bg_dev(bd_addr)) == NULL)
2427 if (p_dev->gatt_if[i] != 0 )
2429 *p_gatt_if = p_dev->gatt_if[i];
2451 tGATT_BG_CONN_DEV *p_dev = NULL;
2455 if ((p_dev = gatt_find_bg_dev(bd_addr)) == NULL)
2460 for (i = 0; i < GATT_MAX_APPS && (p_dev->gatt_if[i] > 0 || p_dev->listen_gif[i]); i ++)
2464 if (p_dev->gatt_if[i] == gatt_if)
2466 p_dev->gatt_if[i] = 0;
2469 p_dev->gatt_if[j - 1] = p_dev->gatt_if[j];
2471 if (p_dev->gatt_if[0] == 0)
2472 ret = BTM_BleUpdateBgConnDev(FALSE, p_dev->remote_bda);
2481 if (p_dev->listen_gif[i] == gatt_if)
2483 p_dev->listen_gif[i] = 0;
2487 p_dev->listen_gif[j - 1] = p_dev->listen_gif[j];
2489 if (p_dev->listen_gif[0] == 0)
2490 ret = BTM_BleUpdateAdvWhitelist(FALSE, p_dev->remote_bda);
2498 if (i != GATT_MAX_APPS && p_dev->gatt_if[0] == 0 && p_dev->listen_gif[0] == 0)
2500 memset(p_dev, 0, sizeof(tGATT_BG_CONN_DEV));