@@ -538,6 +538,112 @@ struct bt_conn_le_cs_config {
538538	uint8_t  channel_map [10 ];
539539};
540540
541+ /** Procedure done status */ 
542+ enum  bt_conn_le_cs_procedure_done_status  {
543+ 	BT_CONN_LE_CS_PROCEDURE_COMPLETE  =  BT_HCI_LE_CS_PROCEDURE_DONE_STATUS_COMPLETE ,
544+ 	BT_CONN_LE_CS_PROCEDURE_INCOMPLETE  =  BT_HCI_LE_CS_PROCEDURE_DONE_STATUS_PARTIAL ,
545+ 	BT_CONN_LE_CS_PROCEDURE_ABORTED  =  BT_HCI_LE_CS_PROCEDURE_DONE_STATUS_ABORTED ,
546+ };
547+ 
548+ /** Subevent done status */ 
549+ enum  bt_conn_le_cs_subevent_done_status  {
550+ 	BT_CONN_LE_CS_SUBEVENT_COMPLETE  =  BT_HCI_LE_CS_SUBEVENT_DONE_STATUS_COMPLETE ,
551+ 	BT_CONN_LE_CS_SUBEVENT_INCOMPLETE  =  BT_HCI_LE_CS_SUBEVENT_DONE_STATUS_PARTIAL ,
552+ 	BT_CONN_LE_CS_SUBEVENT_ABORTED  =  BT_HCI_LE_CS_SUBEVENT_DONE_STATUS_ABORTED ,
553+ };
554+ 
555+ /** Procedure abort reason */ 
556+ enum  bt_conn_le_cs_procedure_abort_reason  {
557+ 	BT_CONN_LE_CS_PROCEDURE_NOT_ABORTED  =  BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_NO_ABORT ,
558+ 	BT_CONN_LE_CS_PROCEDURE_ABORT_REQUESTED  = 
559+ 		BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_LOCAL_HOST_OR_REMOTE_REQUEST ,
560+ 	BT_CONN_LE_CS_PROCEDURE_ABORT_TOO_FEW_CHANNELS  = 
561+ 		BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_TOO_FEW_CHANNELS ,
562+ 	BT_CONN_LE_CS_PROCEDURE_ABORT_CHMAP_INSTANT_PASSED  = 
563+ 		BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_CHMAP_INSTANT_PASSED ,
564+ 	BT_CONN_LE_CS_PROCEDURE_ABORT_UNSPECIFIED  =  BT_HCI_LE_CS_PROCEDURE_ABORT_REASON_UNSPECIFIED ,
565+ };
566+ 
567+ /** Subevent abort reason */ 
568+ enum  bt_conn_le_cs_subevent_abort_reason  {
569+ 	BT_CONN_LE_CS_SUBEVENT_NOT_ABORTED  =  BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_NO_ABORT ,
570+ 	BT_CONN_LE_CS_SUBEVENT_ABORT_REQUESTED  = 
571+ 		BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_LOCAL_HOST_OR_REMOTE_REQUEST ,
572+ 	BT_CONN_LE_CS_SUBEVENT_ABORT_NO_CS_SYNC  = 
573+ 		BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_NO_CS_SYNC_RECEIVED ,
574+ 	BT_CONN_LE_CS_SUBEVENT_ABORT_SCHED_CONFLICT  = 
575+ 		BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_SCHED_CONFLICT ,
576+ 	BT_CONN_LE_CS_SUBEVENT_ABORT_UNSPECIFIED  =  BT_HCI_LE_CS_SUBEVENT_ABORT_REASON_UNSPECIFIED ,
577+ };
578+ 
579+ /** Subevent data for LE connections supporting CS */ 
580+ struct  bt_conn_le_cs_subevent_result  {
581+ 	struct  {
582+ 		/** CS configuration identifier. 
583+ 		 * 
584+ 		 *  Range: 0 to 3 
585+ 		 * 
586+ 		 *  If these results were generated by a CS Test, 
587+ 		 *  this value will be set to 0 and has no meaning. 
588+ 		 */ 
589+ 		uint8_t  config_id ;
590+ 		/** Starting ACL connection event counter. 
591+ 		 * 
592+ 		 *  If these results were generated by a CS Test, 
593+ 		 *  this value will be set to 0 and has no meaning. 
594+ 		 */ 
595+ 		uint16_t  start_acl_conn_event ;
596+ 		/** CS procedure count associated with these results. 
597+ 		 * 
598+ 		 *  This is the CS procedure count since the completion of 
599+ 		 *  the Channel Sounding Security Start procedure. 
600+ 		 */ 
601+ 		uint16_t  procedure_counter ;
602+ 		/** Frequency compensation value in units of 0.01 ppm. 
603+ 		 * 
604+ 		 *  This is a 15-bit signed integer in the range [-100, 100] ppm. 
605+ 		 * 
606+ 		 *  A value of @ref BT_HCI_LE_CS_SUBEVENT_RESULT_FREQ_COMPENSATION_NOT_AVAILABLE 
607+ 		 *  indicates that the role is not the initiator, or that the 
608+ 		 *  frequency compensation value is unavailable. 
609+ 		 */ 
610+ 		uint16_t  frequency_compensation ;
611+ 		/** Reference power level in dBm. 
612+ 		 * 
613+ 		 *  Range: -127 to 20 
614+ 		 * 
615+ 		 *  A value of @ref BT_HCI_LE_CS_REF_POWER_LEVEL_UNAVAILABLE indicates 
616+ 		 *  that the reference power level was not available during a subevent. 
617+ 		 */ 
618+ 		int8_t  reference_power_level ;
619+ 		/** Procedure status. */ 
620+ 		enum  bt_conn_le_cs_procedure_done_status  procedure_done_status ;
621+ 		/** Subevent status. */ 
622+ 		enum  bt_conn_le_cs_subevent_done_status  subevent_done_status ;
623+ 		/** Abort reason. 
624+ 		 * 
625+ 		 *  If the procedure status is 
626+ 		 *  @ref BT_CONN_LE_CS_PROCEDURE_ABORTED, this field will 
627+ 		 *  specify the reason for the abortion. 
628+ 		 */ 
629+ 		enum  bt_conn_le_cs_procedure_abort_reason  procedure_abort_reason ;
630+ 		/** Abort reason. 
631+ 		 * 
632+ 		 *  If the subevent status is 
633+ 		 *  @ref BT_CONN_LE_CS_SUBEVENT_ABORTED, this field will 
634+ 		 *  specify the reason for the abortion. 
635+ 		 */ 
636+ 		enum  bt_conn_le_cs_subevent_abort_reason  subevent_abort_reason ;
637+ 		/** Number of antenna paths used during the phase measurement stage. 
638+ 		 */ 
639+ 		uint8_t  num_antenna_paths ;
640+ 		/** Number of CS steps in the subevent. 
641+ 		 */ 
642+ 		uint8_t  num_steps_reported ;
643+ 	} header ;
644+ 	struct  net_buf_simple  * step_data_buf ;
645+ };
646+ 
541647/** @brief Increment a connection's reference count. 
542648 * 
543649 *  Increment the reference count of a connection object. 
@@ -1677,6 +1783,17 @@ struct bt_conn_cb {
16771783	 *  @param config_id ID of the CS configuration that was removed. 
16781784	 */ 
16791785	void  (* le_cs_config_removed )(struct  bt_conn  * conn , uint8_t  config_id );
1786+ 
1787+ 	/** @brief Subevent Results from a CS procedure are available. 
1788+ 	 * 
1789+ 	 * This callback notifies the user that CS subevent results are 
1790+ 	 * available for the given connection object. 
1791+ 	 * 
1792+ 	 * @param conn Connection objects. 
1793+ 	 * @param result Subevent results 
1794+ 	 */ 
1795+ 	void  (* le_cs_subevent_data_available )(struct  bt_conn  * conn ,
1796+ 					      struct  bt_conn_le_cs_subevent_result  * result );
16801797#endif 
16811798
16821799	/** @internal Internally used field for list handling */ 
0 commit comments