static void bt_att_disconnected(struct bt_l2cap_chan *chan) { struct bt_att *att = CONTAINER_OF(chan, struct bt_att, chan); BT_DBG("chan %p cid 0x%04x", chan, chan->tx.cid); memset(att, 0, sizeof(*att)); bt_gatt_disconnected(chan->conn); }
static void bt_att_disconnected(struct bt_l2cap_chan *chan) { struct bt_att *att = CONTAINER_OF(chan, struct bt_att, chan); BT_DBG("chan %p cid 0x%04x", chan, chan->tx.cid); /* Notify client if request is pending */ att_handle_rsp(att, NULL, 0, BT_ATT_ERR_UNLIKELY); bt_gatt_disconnected(chan->conn); memset(att, 0, sizeof(*att)); }
static void notify_disconnected(struct bt_conn *conn) { struct bt_conn_cb *cb; bt_gatt_disconnected(conn); /* * FIXME: When disconnected NBLE stops advertising, this should * be fixed in the NBLE firmware, use this hack for now */ if (nble.keep_adv) { BT_WARN("Re-enable advertising on disconnect"); nble_gap_start_adv_req(); } for (cb = callback_list; cb; cb = cb->_next) { if (cb->disconnected) { cb->disconnected(conn, 0); } } }
static void notify_disconnected(struct bt_conn *conn) { struct bt_conn_cb *cb; bt_gatt_disconnected(conn); bt_smp_disconnected(conn); /* * FIXME: When disconnected NBLE stops advertising, this should * be fixed in the NBLE firmware, use this hack for now */ if (atomic_test_bit(&nble.flags, NBLE_FLAG_KEEP_ADVERTISING)) { BT_WARN("Re-enable advertising on disconnect"); nble_gap_start_adv_req(); } for (cb = callback_list; cb; cb = cb->_next) { if (cb->disconnected) { cb->disconnected(conn, 0); } } }