Lines Matching full:connection

50  * 1) I think if we are initiating and we already have a connection with
53 * i) When a connection create is issued, if we already are connected
54 * deny it. BLE ERROR = 0x0B (ACL connection exists).
59 * request because I am advertising? What happens to connection? Deal
66 * and master. We should just set this to the end of the connection event.
72 * connection to extend past the end of the allocated connection end
73 * time. That is not good. Need to deal with that. Need to extend connection
76 * 6) Use error code 0x3E correctly! Connection failed to establish. If you
77 * read the LE connection complete event, it says that if the connection
78 * fails to be established that the connection complete event gets sent to
79 * the host that issued the create connection. Need to resolve this.
86 * 10) See what connection state machine elements are purely master and
89 * 11) Not sure I am dealing with the connection terminate timeout perfectly.
90 * I may extend a connection event too long although if it is always in terms
91 * of connection events I am probably fine. Checking at end that the next
92 * connection event will occur past terminate timeould would be fine.
94 * 12) When a slave receives a data packet in a connection it has to send a
115 * XXX: How should we deal with a late connection event? We need to determine
117 * 1) The current connection event has not ended but a schedule item starts
139 /* Global connection complete event. Used when initiating */
142 /* Global LL connection parameters */
145 /* Pointer to connection state machine we are trying to create */
148 /* Pointer to current connection */
151 /* Connection state machine array */
265 * the connection interval in ble_ll_conn_calc_itvl_ticks()
279 * Get the event buffer allocated to send the connection complete event
317 * Called to return the currently running connection state machine end time.
338 * Called to return the currently running connection state machine end time.
357 * Called when the current connection state machine is no longer being used.
361 * -> Remove the connection state machine from the scheduler.
381 /* Set current LL connection to NULL */ in ble_ll_conn_current_sm_over()
385 * NOTE: the connection state machine may be NULL if we are calling in ble_ll_conn_current_sm_over()
386 * this when we are ending the connection. In that case, there is no in ble_ll_conn_current_sm_over()
387 * need to post to the LL the connection event end event in ble_ll_conn_current_sm_over()
395 * Given a handle, find an active connection matching the handle
417 * Get a connection state machine.
435 * Calculate the amount of window widening for a given connection event. This
437 * the start of a connection event.
439 * @param connsm Pointer to connection state machine.
745 * connection event
774 * Called when we are in the connection state and the wait for response timer
857 * Callback for slave when it transmits a data pdu and the connection event
931 * when the current connection will start its next interval (whichever is
933 * the current connection event. The current connection event must end before
934 * the next scheduled item. However, the current connection itself is not
936 * next connection will start (the schedule start time; not the anchor point)
955 /* Calculate time at which next connection event will start */ in ble_ll_conn_get_next_sched_time()
974 * Called to check if certain connection state machine flags have been
1000 * 1) A connection update procedure was started and the event counter in ble_ll_conn_chk_csm_flags()
1030 * Called when we want to send a data channel pdu inside a connection event.
1114 * the connection transmit queue in ble_ll_conn_tx_data_pdu()
1295 * connection event. We will end the connection event if we have in ble_ll_conn_tx_data_pdu()
1311 /* We will end the connection event */ in ble_ll_conn_tx_data_pdu()
1403 /* Log transmit on connection state */ in ble_ll_conn_tx_data_pdu()
1426 * Schedule callback for start of connection event.
1444 /* Set current connection state machine */ in ble_ll_conn_event_start_cb()
1449 /* Log connection event start */ in ble_ll_conn_event_start_cb()
1485 /* Inform LL task of connection event end */ in ble_ll_conn_event_start_cb()
1513 /* End the connection event as we have no more buffers */ in ble_ll_conn_event_start_cb()
1550 /* Set next wakeup time to connection event end time */ in ble_ll_conn_event_start_cb()
1569 * connection event. This will always return 'true' if we are a slave. If we
1728 * Called when a create connection command has been received. This initializes
1729 * a connection state machine in the master role.
1754 /* XXX: for now, just make connection interval equal to max */ in ble_ll_conn_master_init()
1757 /* Check the min/max CE lengths are less than connection interval */ in ble_ll_conn_master_init()
1868 /* XXX: for now, just make connection interval equal to max */ in ble_ll_conn_ext_set_params()
1872 /* Check the min/max CE lengths are less than connection interval */ in ble_ll_conn_ext_set_params()
1917 * Create a new connection state machine. This is done once per
1918 * connection when the HCI command "create connection" is issued to the
1944 /* XXX: TODO set these based on PHY that started connection */ in ble_ll_conn_sm_new()
1963 * Set handle in connection update procedure to 0. If the handle in ble_ll_conn_sm_new()
1964 * is non-zero it means that the host initiated the connection in ble_ll_conn_sm_new()
1969 /* Connection end event */ in ble_ll_conn_sm_new()
2074 * Called when a connection is terminated
2100 /* Remove from the active connection list */ in ble_ll_conn_end()
2135 /* Connection state machine is now idle */ in ble_ll_conn_end()
2158 * We need to send a disconnection complete event. Connection Complete for in ble_ll_conn_end()
2159 * canceling connection creation is sent from LE Create Connection Cancel in ble_ll_conn_end()
2170 /* Put connection state machine back on free list */ in ble_ll_conn_end()
2173 /* Log connection end */ in ble_ll_conn_end()
2179 * Called to move to the next connection event.
2198 /* XXX: deal with connection request procedure here as well */ in ble_ll_conn_next_event()
2207 /* Some of the devices waits whole connection interval to ACK our in ble_ll_conn_next_event()
2209 * Make sure we catch it in next connection event. in ble_ll_conn_next_event()
2226 /* Set event counter to the next connection event that we will tx/rx in */ in ble_ll_conn_next_event()
2240 /* Set next connection event start time */ in ble_ll_conn_next_event()
2257 * If a connection update has been scheduled and the event counter in ble_ll_conn_next_event()
2259 * connection by the the transmit window offset. We also copy in the in ble_ll_conn_next_event()
2265 /* Set flag so we send connection update event */ in ble_ll_conn_next_event()
2296 /* Reset the starting point of the connection supervision timeout */ in ble_ll_conn_next_event()
2317 * transmitted update request. Would end up killing connection in ble_ll_conn_next_event()
2358 /* Calculate data channel index of next connection event */ in ble_ll_conn_next_event()
2362 * If we are trying to terminate connection, check if next wake time is in ble_ll_conn_next_event()
2364 * connection as we will time out anyway. in ble_ll_conn_next_event()
2398 * Called when a connection has been created. This function will
2399 * -> Set the connection state to created.
2400 * -> Start the connection supervision timer
2401 * -> Set the Link Layer state to connection.
2402 * -> Send a connection complete event.
2410 * @ return 0: connection NOT created. 1: connection created
2438 * Set first connection event time. If slave the endtime is the receive end in ble_ll_conn_created()
2439 * time of the connect request. The actual connection starts 1.25 msecs plus in ble_ll_conn_created()
2440 * the transmit window offset from the end of the connection request. in ble_ll_conn_created()
2495 /* Start the scheduler for the first connection event */ in ble_ll_conn_created()
2505 /* Send connection complete event to inform host of connection */ in ble_ll_conn_created()
2533 * LL_SLAVE_FEATURE_REQ after connection breaks some recent iPhone in ble_ll_conn_created()
2545 * Called upon end of connection event
2549 * @param void *arg Pointer to connection state machine
2559 /* Better be a connection state machine! */ in ble_ll_conn_event_end()
2590 /* Remove any connection end events that might be enqueued */ in ble_ll_conn_event_end()
2605 * need one of these per connection and we have to set this timer in ble_ll_conn_event_end()
2606 * fairly accurately. So we need to another event in the connection. in ble_ll_conn_event_end()
2616 /* Move to next connection event */ in ble_ll_conn_event_end()
2622 /* Reset "per connection event" variables */ in ble_ll_conn_event_end()
2632 /* XXX: I think all this fine for when we do connection updates, but in ble_ll_conn_event_end()
2634 /* Schedule the next connection event */ in ble_ll_conn_event_end()
2644 * the specification. We check the supervision timer at connection event in ble_ll_conn_event_end()
2645 * end. If the next connection event is going to start past the supervision in ble_ll_conn_event_end()
2646 * timeout we end the connection here. I guess this goes against the spec in ble_ll_conn_event_end()
2653 * the connection event longer than the supervision timeout. Given that two in ble_ll_conn_event_end()
2654 * bad CRC's consecutively ends the connection event, I dont regard this as in ble_ll_conn_event_end()
2683 * Update the connection request PDU with the address type and address of
2692 * @param txoffset The tx window offset for this connection
2779 /* Returns true if the address matches the connection peer address having in
2884 * Send a connection requestion to an advertiser
2914 * Called when a schedule item overlaps the currently running connection
2916 * current connection event to let the schedule item run.
2966 /* Get the connection state machine we are trying to create */ in ble_ll_init_rx_pkt_in()
2994 /* Wait for connection response */ in ble_ll_init_rx_pkt_in()
3001 /* If we have sent a connect request, we need to enter CONNECTION state */ in ble_ll_init_rx_pkt_in()
3044 /* Connection has been created. Stop scanning */ in ble_ll_init_rx_pkt_in()
3210 /* Get connection state machine to use if connection to be established */ in ble_ll_init_rx_isr_end()
3414 /* Must match the connection address */ in ble_ll_init_rx_isr_end()
3433 /* Update connection state machine with appropriate parameters for in ble_ll_init_rx_isr_end()
3443 /* Create the connection request */ in ble_ll_init_rx_isr_end()
3496 * to hand up to the LL, we need to remove the connection we just in ble_ll_init_rx_isr_end()
3497 * scheduled since the connection state machine will not get processed in ble_ll_init_rx_isr_end()
3520 * Function called when a timeout has occurred for a connection. There are
3521 * two types of timeouts: a connection supervision timeout and control
3553 * address of the current connection. Note that the CRC of the PDU has not
3568 * called at receive end will deal with ending the connection event in ble_ll_conn_rx_isr_start()
3574 /* Double check access address. Better match connection state machine */ in ble_ll_conn_rx_isr_start()
3583 /* Set connection handle in mbuf header */ in ble_ll_conn_rx_isr_start()
3586 /* Set flag denoting we have received a packet in connection event */ in ble_ll_conn_rx_isr_start()
3589 /* Connection is established */ in ble_ll_conn_rx_isr_start()
3592 /* Set anchor point (and last) if 1st rxd frame in connection event */ in ble_ll_conn_rx_isr_start()
3623 /* XXX: there is a chance that the connection was thrown away and in ble_ll_conn_rx_data_pdu()
3625 /* We better have a connection state machine */ in ble_ll_conn_rx_data_pdu()
3649 * terminate connection. in ble_ll_conn_rx_data_pdu()
3664 * connection in ble_ll_conn_rx_data_pdu()
3749 * Called when a packet has been received while in the connection state.
3797 * We should have a current connection state machine. If we dont, we just in ble_ll_conn_rx_isr_end()
3822 * Check the packet CRC. A connection event can continue even if the in ble_ll_conn_rx_isr_end()
3829 * one we will end the connection event. in ble_ll_conn_rx_isr_end()
3870 * If SN bit from header does not match NESN in connection, this is in ble_ll_conn_rx_isr_end()
3967 /* Should we continue connection event? */ in ble_ll_conn_rx_isr_end()
3990 /* If reply flag set, send data pdu and continue connection event */ in ble_ll_conn_rx_isr_end()
4006 /* Send link layer a connection end event if over */ in ble_ll_conn_rx_isr_end()
4019 * Called to enqueue a packet on the transmit queue of a connection. Should
4094 /* Add to transmit queue for the connection */ in ble_ll_conn_enqueue_pkt()
4124 /* See if we have an active matching connection handle */ in ble_ll_conn_tx_pkt_in()
4142 /* No connection found! */ in ble_ll_conn_tx_pkt_in()
4181 * us. This will start a connection in the slave role assuming that we dont
4182 * already have a connection with this device and that the connect request
4189 * @return 0: connection not started; 1 connecton started
4202 /* Ignore the connection request if we are already connected*/ in ble_ll_conn_slave_start()
4218 /* Allocate a connection. If none available, dont do anything */ in ble_ll_conn_slave_start()
4224 /* Set the pointer at the start of the connection data */ in ble_ll_conn_slave_start()
4227 /* Set connection state machine information */ in ble_ll_conn_slave_start()
4260 * msecs or the connection interval minus 1.25 msecs. in ble_ll_conn_slave_start()
4280 /* Start the connection state machine */ in ble_ll_conn_slave_start()
4315 * Called to reset the connection module. When this function is called the
4336 /* Free the global connection complete event if there is one */ in ble_ll_conn_module_reset()
4342 /* Reset connection we are attempting to create */ in ble_ll_conn_module_reset()
4394 /* Initialize the connection module */
4408 * the free connection list, assigning handles in linear order. Note: in ble_ll_conn_module_init()
4424 /* Register connection statistics */ in ble_ll_conn_module_init()