@@ -348,15 +348,16 @@ static void ctrl_tx_enqueue(struct connection *conn,
348348 struct radio_pdu_node_tx * node_tx );
349349static void connection_release (struct connection * conn );
350350static void terminate_ind_rx_enqueue (struct connection * conn , u8_t reason );
351- static u8_t conn_update (struct connection * conn , struct pdu_data * pdu_data_rx );
352-
353351#if defined(CONFIG_BT_CTLR_XTAL_ADVANCED ) && \
354352 defined(CONFIG_BT_CTLR_SCHED_ADVANCED )
355353static u32_t conn_update_req (struct connection * conn );
356354#endif /* CONFIG_BT_CTLR_XTAL_ADVANCED && CONFIG_BT_CTLR_SCHED_ADVANCED */
357355
356+ #if defined(CONFIG_BT_PERIPHERAL )
357+ static u8_t conn_update (struct connection * conn , struct pdu_data * pdu_data_rx );
358358static u8_t chan_map_update (struct connection * conn ,
359359 struct pdu_data * pdu_data_rx );
360+ #endif /* CONFIG_BT_PERIPHERAL */
360361
361362#if defined(CONFIG_BT_CTLR_PHY )
362363static inline u8_t phy_upd_ind_recv (struct radio_pdu_node_rx * node_rx ,
@@ -1916,6 +1917,7 @@ static inline u32_t isr_rx_conn_pkt_ack(struct pdu_data *pdu_data_tx,
19161917 break ;
19171918
19181919#if defined(CONFIG_BT_CTLR_LE_ENC )
1920+ #if defined(CONFIG_BT_CENTRAL )
19191921 case PDU_DATA_LLCTRL_TYPE_ENC_REQ :
19201922 /* things from master stored for session key calculation */
19211923 memcpy (& _radio .conn_curr -> llcp .encryption .skd [0 ],
@@ -1936,7 +1938,9 @@ static inline u32_t isr_rx_conn_pkt_ack(struct pdu_data *pdu_data_tx,
19361938 /* Reset enc req queued state */
19371939 _radio .conn_curr -> llcp_enc .ack = _radio .conn_curr -> llcp_enc .req ;
19381940 break ;
1941+ #endif /* CONFIG_BT_CENTRAL */
19391942
1943+ #if defined(CONFIG_BT_PERIPHERAL )
19401944 case PDU_DATA_LLCTRL_TYPE_ENC_RSP :
19411945 /* pause data packet tx */
19421946 _radio .conn_curr -> pause_tx = 1U ;
@@ -1948,7 +1952,9 @@ static inline u32_t isr_rx_conn_pkt_ack(struct pdu_data *pdu_data_tx,
19481952 * alongwith this tx ack at this point in time.
19491953 */
19501954 break ;
1955+ #endif /* CONFIG_BT_PERIPHERAL */
19511956
1957+ #if defined(CONFIG_BT_CENTRAL )
19521958 case PDU_DATA_LLCTRL_TYPE_PAUSE_ENC_REQ :
19531959 /* pause data packet tx */
19541960 _radio .conn_curr -> pause_tx = 1U ;
@@ -1966,6 +1972,7 @@ static inline u32_t isr_rx_conn_pkt_ack(struct pdu_data *pdu_data_tx,
19661972 /* Reset enc req queued state */
19671973 _radio .conn_curr -> llcp_enc .ack = _radio .conn_curr -> llcp_enc .req ;
19681974 break ;
1975+ #endif /* CONFIG_BT_CENTRAL */
19691976
19701977 case PDU_DATA_LLCTRL_TYPE_PAUSE_ENC_RSP :
19711978 if (_radio .role == ROLE_MASTER ) {
@@ -2064,16 +2071,20 @@ static inline u32_t isr_rx_conn_pkt_ack(struct pdu_data *pdu_data_tx,
20642071 _radio .conn_curr -> llcp_phy .state = LLCP_PHY_STATE_RSP_WAIT ;
20652072 /* fall through */
20662073
2074+ #if defined(CONFIG_BT_PERIPHERAL )
20672075 case PDU_DATA_LLCTRL_TYPE_PHY_RSP :
20682076 if (_radio .role == ROLE_SLAVE ) {
20692077 isr_rx_conn_phy_tx_time_set ();
20702078 }
2079+ #endif /* CONFIG_BT_PERIPHERAL */
20712080 break ;
20722081
2082+ #if defined(CONFIG_BT_CENTRAL )
20732083 case PDU_DATA_LLCTRL_TYPE_PHY_UPD_IND :
20742084 _radio .conn_curr -> phy_tx_time =
20752085 _radio .conn_curr -> llcp .phy_upd_ind .tx ;
20762086 break ;
2087+ #endif /* CONFIG_BT_CENTRAL */
20772088#endif /* CONFIG_BT_CTLR_PHY */
20782089
20792090 default :
@@ -2324,7 +2335,7 @@ isr_rx_conn_pkt_ctrl_rej(struct radio_pdu_node_rx *node_rx, u8_t *rx_enqueue)
23242335 rej_ext_ind = (void * )& pdu_rx -> llctrl .reject_ext_ind ;
23252336
23262337 switch (rej_ext_ind -> reject_opcode ) {
2327- #if defined(CONFIG_BT_CTLR_LE_ENC )
2338+ #if defined(CONFIG_BT_CENTRAL ) && defined( CONFIG_BT_CTLR_LE_ENC )
23282339 case PDU_DATA_LLCTRL_TYPE_ENC_REQ :
23292340 if (_radio .conn_curr -> llcp_ack != _radio .conn_curr -> llcp_req &&
23302341 _radio .conn_curr -> llcp_type == LLCP_ENCRYPTION ) {
@@ -2336,7 +2347,7 @@ isr_rx_conn_pkt_ctrl_rej(struct radio_pdu_node_rx *node_rx, u8_t *rx_enqueue)
23362347 isr_rx_conn_pkt_ctrl_rej_enc (node_rx , rx_enqueue );
23372348 }
23382349 break ;
2339- #endif /* CONFIG_BT_CTLR_LE_ENC */
2350+ #endif /* CONFIG_BT_CENTRAL && CONFIG_BT_CTLR_LE_ENC */
23402351
23412352#if defined(CONFIG_BT_CTLR_PHY )
23422353 case PDU_DATA_LLCTRL_TYPE_PHY_REQ :
@@ -2707,6 +2718,7 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
27072718 pdu_data_rx = (void * )node_rx -> pdu_data ;
27082719
27092720 switch (pdu_data_rx -> llctrl .opcode ) {
2721+ #if defined(CONFIG_BT_PERIPHERAL )
27102722 case PDU_DATA_LLCTRL_TYPE_CONN_UPDATE_IND :
27112723 {
27122724 u8_t err ;
@@ -2743,6 +2755,7 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
27432755 }
27442756 }
27452757 break ;
2758+ #endif /* CONFIG_BT_PERIPHERAL */
27462759
27472760 case PDU_DATA_LLCTRL_TYPE_TERMINATE_IND :
27482761 if (!pdu_len_cmp (PDU_DATA_LLCTRL_TYPE_TERMINATE_IND ,
@@ -2756,6 +2769,7 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
27562769 break ;
27572770
27582771#if defined(CONFIG_BT_CTLR_LE_ENC )
2772+ #if defined(CONFIG_BT_PERIPHERAL )
27592773 case PDU_DATA_LLCTRL_TYPE_ENC_REQ :
27602774 if (!_radio .conn_curr -> role ||
27612775 !pdu_len_cmp (PDU_DATA_LLCTRL_TYPE_ENC_REQ ,
@@ -2822,7 +2836,9 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
28222836 _radio .conn_curr -> procedure_expire =
28232837 _radio .conn_curr -> procedure_reload ;
28242838 break ;
2839+ #endif /* CONFIG_BT_PERIPHERAL */
28252840
2841+ #if defined(CONFIG_BT_CENTRAL )
28262842 case PDU_DATA_LLCTRL_TYPE_ENC_RSP :
28272843 if (_radio .conn_curr -> role ||
28282844 !pdu_len_cmp (PDU_DATA_LLCTRL_TYPE_ENC_RSP ,
@@ -2853,6 +2869,7 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
28532869 /* start enc rsp to be scheduled in master prepare */
28542870 _radio .conn_curr -> llcp .encryption .state = LLCP_ENC_STATE_INPROG ;
28552871 break ;
2872+ #endif /* CONFIG_BT_CENTRAL */
28562873
28572874 case PDU_DATA_LLCTRL_TYPE_START_ENC_RSP :
28582875 if (!pdu_len_cmp (PDU_DATA_LLCTRL_TYPE_START_ENC_RSP ,
@@ -2904,6 +2921,7 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
29042921 break ;
29052922#endif /* CONFIG_BT_CTLR_LE_ENC */
29062923
2924+ #if defined(CONFIG_BT_PERIPHERAL )
29072925 case PDU_DATA_LLCTRL_TYPE_FEATURE_REQ :
29082926 if (!_radio .conn_curr -> role ||
29092927 !pdu_len_cmp (PDU_DATA_LLCTRL_TYPE_FEATURE_REQ ,
@@ -2913,7 +2931,9 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
29132931
29142932 nack = feature_rsp_send (_radio .conn_curr , pdu_data_rx );
29152933 break ;
2934+ #endif /* CONFIG_BT_PERIPHERAL */
29162935
2936+ #if defined(CONFIG_BT_CENTRAL )
29172937 case PDU_DATA_LLCTRL_TYPE_SLAVE_FEATURE_REQ :
29182938 if (_radio .conn_curr -> role ||
29192939 !pdu_len_cmp (PDU_DATA_LLCTRL_TYPE_SLAVE_FEATURE_REQ ,
@@ -2923,6 +2943,7 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
29232943
29242944 nack = feature_rsp_send (_radio .conn_curr , pdu_data_rx );
29252945 break ;
2946+ #endif /* CONFIG_BT_CENTRAL */
29262947
29272948 case PDU_DATA_LLCTRL_TYPE_FEATURE_RSP :
29282949 {
@@ -2953,6 +2974,7 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
29532974 break ;
29542975
29552976#if defined(CONFIG_BT_CTLR_LE_ENC )
2977+ #if defined(CONFIG_BT_PERIPHERAL )
29562978 case PDU_DATA_LLCTRL_TYPE_PAUSE_ENC_REQ :
29572979 if (!_radio .conn_curr -> role ||
29582980 !pdu_len_cmp (PDU_DATA_LLCTRL_TYPE_PAUSE_ENC_REQ ,
@@ -2962,6 +2984,7 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
29622984
29632985 nack = pause_enc_rsp_send (_radio .conn_curr , 1 );
29642986 break ;
2987+ #endif /* CONFIG_BT_PERIPHERAL */
29652988
29662989 case PDU_DATA_LLCTRL_TYPE_PAUSE_ENC_RSP :
29672990 if (!pdu_len_cmp (PDU_DATA_LLCTRL_TYPE_PAUSE_ENC_RSP ,
@@ -3519,6 +3542,7 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
35193542 }
35203543 break ;
35213544
3545+ #if defined(CONFIG_BT_CENTRAL )
35223546 case PDU_DATA_LLCTRL_TYPE_PHY_RSP :
35233547 if (_radio .conn_curr -> role ||
35243548 !pdu_len_cmp (PDU_DATA_LLCTRL_TYPE_PHY_RSP ,
@@ -3549,7 +3573,9 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
35493573 _radio .conn_curr -> procedure_expire = 0U ;
35503574 }
35513575 break ;
3576+ #endif /* CONFIG_BT_CENTRAL */
35523577
3578+ #if defined(CONFIG_BT_PERIPHERAL )
35533579 case PDU_DATA_LLCTRL_TYPE_PHY_UPD_IND :
35543580 {
35553581 u8_t err ;
@@ -3566,6 +3592,7 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
35663592 }
35673593 }
35683594 break ;
3595+ #endif /* CONFIG_BT_PERIPHERAL */
35693596#endif /* CONFIG_BT_CTLR_PHY */
35703597
35713598#if defined(CONFIG_BT_CTLR_MIN_USED_CHAN )
@@ -10462,6 +10489,7 @@ static void terminate_ind_rx_enqueue(struct connection *conn, u8_t reason)
1046210489 packet_rx_callback ();
1046310490}
1046410491
10492+ #if defined(CONFIG_BT_PERIPHERAL )
1046510493static u8_t conn_update (struct connection * conn , struct pdu_data * pdu_data_rx )
1046610494{
1046710495 if (((pdu_data_rx -> llctrl .conn_update_ind .instant -
@@ -10504,6 +10532,7 @@ static u8_t conn_update(struct connection *conn, struct pdu_data *pdu_data_rx)
1050410532
1050510533 return 0 ;
1050610534}
10535+ #endif /* CONFIG_BT_PERIPHERAL */
1050710536
1050810537#if defined (CONFIG_BT_CTLR_XTAL_ADVANCED ) && \
1050910538 defined(CONFIG_BT_CTLR_SCHED_ADVANCED )
@@ -10558,6 +10587,7 @@ static u32_t conn_update_req(struct connection *conn)
1055810587}
1055910588#endif /* CONFIG_BT_CTLR_XTAL_ADVANCED && CONFIG_BT_CTLR_SCHED_ADVANCED */
1056010589
10590+ #if defined(CONFIG_BT_PERIPHERAL )
1056110591static u8_t chan_map_update (struct connection * conn ,
1056210592 struct pdu_data * pdu_data_rx )
1056310593{
@@ -10584,6 +10614,7 @@ static u8_t chan_map_update(struct connection *conn,
1058410614
1058510615 return 0 ;
1058610616}
10617+ #endif /* CONFIG_BT_PERIPHERAL */
1058710618
1058810619#if defined(CONFIG_BT_CTLR_PHY )
1058910620static inline u8_t phy_upd_ind_recv (struct radio_pdu_node_rx * node_rx ,
0 commit comments