• Home
  • Raw
  • Download

Lines Matching refs:local_channel_id

37   uint16_t local_channel_id;  member
45 static void connect_completed_cb(uint16_t local_channel_id,
47 static void config_request_cb(uint16_t local_channel_id,
49 static void config_completed_cb(uint16_t local_channel_id,
51 static void disconnect_request_cb(uint16_t local_channel_id, bool ack_required);
52 static void disconnect_completed_cb(uint16_t local_channel_id,
54 static void congestion_cb(uint16_t local_channel_id, bool is_congested);
55 static void read_ready_cb(uint16_t local_channel_id, BT_HDR* packet);
56 static void write_completed_cb(uint16_t local_channel_id,
61 static l2cap_client_t* find(uint16_t local_channel_id);
133 CHECK(client->local_channel_id == 0); in l2cap_client_connect()
138 client->local_channel_id = L2CA_ConnectReq(psm, remote_bdaddr); in l2cap_client_connect()
139 if (!client->local_channel_id) { in l2cap_client_connect()
144 L2CA_SetConnectionCallbacks(client->local_channel_id, &l2cap_callbacks); in l2cap_client_connect()
151 if (client->local_channel_id && !L2CA_DisconnectReq(client->local_channel_id)) in l2cap_client_disconnect()
153 __func__, client->local_channel_id); in l2cap_client_disconnect()
155 client->local_channel_id = 0; in l2cap_client_disconnect()
171 return client->local_channel_id != 0 && client->configured_self && in l2cap_client_is_connected()
187 static void connect_completed_cb(uint16_t local_channel_id, in connect_completed_cb() argument
189 CHECK(local_channel_id != 0); in connect_completed_cb()
191 l2cap_client_t* client = find(local_channel_id); in connect_completed_cb()
194 __func__, local_channel_id); in connect_completed_cb()
208 if (!L2CA_ConfigReq(local_channel_id, &desired_parameters)) { in connect_completed_cb()
214 static void config_request_cb(uint16_t local_channel_id, in config_request_cb() argument
217 l2cap_client_t* client = find(local_channel_id); in config_request_cb()
221 __func__, local_channel_id); in config_request_cb()
249 if (!L2CA_ConfigRsp(local_channel_id, &response)) { in config_request_cb()
251 __func__, local_channel_id); in config_request_cb()
262 static void config_completed_cb(uint16_t local_channel_id, in config_completed_cb() argument
264 l2cap_client_t* client = find(local_channel_id); in config_completed_cb()
268 __func__, local_channel_id); in config_completed_cb()
305 static void disconnect_request_cb(uint16_t local_channel_id, in disconnect_request_cb() argument
307 l2cap_client_t* client = find(local_channel_id); in disconnect_request_cb()
310 __func__, local_channel_id); in disconnect_request_cb()
314 if (ack_required) L2CA_DisconnectRsp(local_channel_id); in disconnect_request_cb()
317 client->local_channel_id = 0; in disconnect_request_cb()
323 static void disconnect_completed_cb(uint16_t local_channel_id, in disconnect_completed_cb() argument
325 CHECK(local_channel_id != 0); in disconnect_completed_cb()
327 l2cap_client_t* client = find(local_channel_id); in disconnect_completed_cb()
330 __func__, local_channel_id); in disconnect_completed_cb()
334 client->local_channel_id = 0; in disconnect_completed_cb()
340 static void congestion_cb(uint16_t local_channel_id, bool is_congested) { in congestion_cb() argument
341 CHECK(local_channel_id != 0); in congestion_cb()
343 l2cap_client_t* client = find(local_channel_id); in congestion_cb()
346 __func__, local_channel_id); in congestion_cb()
362 static void read_ready_cb(uint16_t local_channel_id, BT_HDR* packet) { in read_ready_cb() argument
363 CHECK(local_channel_id != 0); in read_ready_cb()
365 l2cap_client_t* client = find(local_channel_id); in read_ready_cb()
368 __func__, local_channel_id); in read_ready_cb()
381 static void write_completed_cb(UNUSED_ATTR uint16_t local_channel_id, in write_completed_cb() argument
431 switch (L2CA_DataWrite(client->local_channel_id, packet)) { in dispatch_fragments()
440 __func__, client->local_channel_id); in dispatch_fragments()
450 static l2cap_client_t* find(uint16_t local_channel_id) { in find() argument
451 CHECK(local_channel_id != 0); in find()
456 if (client->local_channel_id == local_channel_id) return client; in find()