@@ -333,7 +333,7 @@ uint8_t ll_conn_update(uint16_t handle, uint8_t cmd, uint8_t status, uint16_t in
333333 if (!conn -> llcp_conn_param .disabled &&
334334 (!conn -> common .fex_valid ||
335335 (conn -> llcp_feature .features_conn &
336- BIT (BT_LE_FEAT_BIT_CONN_PARAM_REQ )))) {
336+ BIT64 (BT_LE_FEAT_BIT_CONN_PARAM_REQ )))) {
337337 cmd ++ ;
338338 } else if (conn -> lll .role ) {
339339 return BT_HCI_ERR_UNSUPP_REMOTE_FEATURE ;
@@ -523,7 +523,7 @@ uint32_t ll_length_req_send(uint16_t handle, uint16_t tx_octets, uint16_t tx_tim
523523
524524 if (conn -> llcp_length .disabled ||
525525 (conn -> common .fex_valid &&
526- !(conn -> llcp_feature .features_conn & BIT (BT_LE_FEAT_BIT_DLE )))) {
526+ !(conn -> llcp_feature .features_conn & BIT64 (BT_LE_FEAT_BIT_DLE )))) {
527527 return BT_HCI_ERR_UNSUPP_REMOTE_FEATURE ;
528528 }
529529
@@ -634,9 +634,9 @@ uint8_t ll_phy_req_send(uint16_t handle, uint8_t tx, uint8_t flags, uint8_t rx)
634634
635635 if (conn -> llcp_phy .disabled ||
636636 (conn -> common .fex_valid &&
637- !(conn -> llcp_feature .features_conn & BIT (BT_LE_FEAT_BIT_PHY_2M )) &&
637+ !(conn -> llcp_feature .features_conn & BIT64 (BT_LE_FEAT_BIT_PHY_2M )) &&
638638 !(conn -> llcp_feature .features_conn &
639- BIT (BT_LE_FEAT_BIT_PHY_CODED )))) {
639+ BIT64 (BT_LE_FEAT_BIT_PHY_CODED )))) {
640640 return BT_HCI_ERR_UNSUPP_REMOTE_FEATURE ;
641641 }
642642
@@ -2709,7 +2709,7 @@ static inline void event_enc_reject_prep(struct ll_conn *conn,
27092709
27102710 if (conn -> common .fex_valid &&
27112711 (conn -> llcp_feature .features_conn &
2712- BIT (BT_LE_FEAT_BIT_EXT_REJ_IND ))) {
2712+ BIT64 (BT_LE_FEAT_BIT_EXT_REJ_IND ))) {
27132713 struct pdu_data_llctrl_reject_ext_ind * p ;
27142714
27152715 pdu -> llctrl .opcode = PDU_DATA_LLCTRL_TYPE_REJECT_EXT_IND ;
@@ -2937,7 +2937,7 @@ static inline void event_fex_prep(struct ll_conn *conn)
29372937 pdu -> llctrl .opcode = PDU_DATA_LLCTRL_TYPE_FEATURE_RSP ;
29382938 (void )memset (& pdu -> llctrl .feature_rsp .features [0 ], 0x00 ,
29392939 sizeof (pdu -> llctrl .feature_rsp .features ));
2940- sys_put_le24 (conn -> llcp_feature .features_peer ,
2940+ sys_put_le64 (conn -> llcp_feature .features_peer ,
29412941 pdu -> llctrl .feature_req .features );
29422942
29432943 /* enqueue feature rsp structure into rx queue */
@@ -2967,7 +2967,7 @@ static inline void event_fex_prep(struct ll_conn *conn)
29672967 (void )memset (& pdu -> llctrl .feature_req .features [0 ],
29682968 0x00 ,
29692969 sizeof (pdu -> llctrl .feature_req .features ));
2970- sys_put_le24 (conn -> llcp_feature .features_conn ,
2970+ sys_put_le64 (conn -> llcp_feature .features_conn ,
29712971 pdu -> llctrl .feature_req .features );
29722972
29732973 ctrl_tx_enqueue (conn , tx );
@@ -3395,22 +3395,22 @@ static inline void event_ping_prep(struct ll_conn *conn)
33953395static inline void dle_max_time_get (const struct ll_conn * conn ,
33963396 uint16_t * max_rx_time , uint16_t * max_tx_time )
33973397{
3398- uint32_t feature_coded_phy = 0 ;
3399- uint32_t feature_phy_2m = 0 ;
3398+ uint64_t feature_coded_phy = 0 ;
3399+ uint64_t feature_phy_2m = 0 ;
34003400 uint16_t rx_time = 0 ;
34013401 uint16_t tx_time = 0 ;
34023402
34033403#if defined(CONFIG_BT_CTLR_PHY )
34043404#if defined(CONFIG_BT_CTLR_PHY_CODED )
34053405 feature_coded_phy = (conn -> llcp_feature .features_conn &
3406- BIT (BT_LE_FEAT_BIT_PHY_CODED ));
3406+ BIT64 (BT_LE_FEAT_BIT_PHY_CODED ));
34073407#else
34083408 feature_coded_phy = 0 ;
34093409#endif
34103410
34113411#if defined(CONFIG_BT_CTLR_PHY_2M )
34123412 feature_phy_2m = (conn -> llcp_feature .features_conn &
3413- BIT (BT_LE_FEAT_BIT_PHY_2M ));
3413+ BIT64 (BT_LE_FEAT_BIT_PHY_2M ));
34143414#else
34153415 feature_phy_2m = 0 ;
34163416#endif
@@ -4252,12 +4252,11 @@ static int unknown_rsp_send(struct ll_conn *conn, struct node_rx_pdu *rx,
42524252 return 0 ;
42534253}
42544254
4255- static inline uint32_t feat_get (uint8_t * features )
4255+ static inline uint64_t feat_get (uint8_t * features )
42564256{
4257- uint32_t feat ;
4257+ uint64_t feat ;
42584258
4259- feat = ~LL_FEAT_BIT_MASK_VALID | features [0 ] |
4260- (features [1 ] << 8 ) | (features [2 ] << 16 );
4259+ feat = ~LL_FEAT_BIT_MASK_VALID | sys_get_le64 (features );
42614260 feat &= LL_FEAT_BIT_MASK ;
42624261
42634262 return feat ;
@@ -4267,9 +4266,9 @@ static inline uint32_t feat_get(uint8_t *features)
42674266 * Perform a logical and on octet0 and keep the remaining bits of the
42684267 * first input parameter
42694268 */
4270- static inline uint32_t feat_land_octet0 (uint32_t feat_to_keep , uint32_t feat_octet0 )
4269+ static inline uint64_t feat_land_octet0 (uint64_t feat_to_keep , uint64_t feat_octet0 )
42714270{
4272- uint32_t feat_result ;
4271+ uint64_t feat_result ;
42734272
42744273 feat_result = feat_to_keep & feat_octet0 ;
42754274 feat_result &= 0xFF ;
@@ -4284,7 +4283,7 @@ static int feature_rsp_send(struct ll_conn *conn, struct node_rx_pdu *rx,
42844283 struct pdu_data_llctrl_feature_req * req ;
42854284 struct node_tx * tx ;
42864285 struct pdu_data * pdu_tx ;
4287- uint32_t feat ;
4286+ uint64_t feat ;
42884287
42894288 /* acquire tx mem */
42904289 tx = mem_acquire (& mem_conn_tx_ctrl .free );
@@ -4319,7 +4318,7 @@ static int feature_rsp_send(struct ll_conn *conn, struct node_rx_pdu *rx,
43194318 * See BTCore V5.2 VOl 6 Part B, chapter 5.1.4
43204319 */
43214320 feat = feat_land_octet0 (LL_FEAT , conn -> llcp_feature .features_conn );
4322- sys_put_le24 (feat , pdu_tx -> llctrl .feature_rsp .features );
4321+ sys_put_le64 (feat , pdu_tx -> llctrl .feature_rsp .features );
43234322
43244323 ctrl_tx_sec_enqueue (conn , tx );
43254324
0 commit comments