Commit 6b6107cc authored by Emil Gydesen's avatar Emil Gydesen Committed by Henrik Brix Andersen
Browse files

Bluetooth: Audio: Rename set_sirk to just sirk



The S in SIRK is for set, so set_sirk was effectively
"set set".

Signed-off-by: default avatarEmil Gydesen <emil.gydesen@nordicsemi.no>
parent 7a2b2d73
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -27,9 +27,9 @@ register callbacks.
                    [rank <int>] [not-lockable] [sirk <data>]
     lock          :Lock the set
     release       :Release the set [force]
     set_sirk      :Set the currently used SIRK <sirk>
     sirk          :Set the currently used SIRK <sirk>
     get_sirk      :Get the currently used SIRK
     set_sirk_rsp  :Set the response used in SIRK requests <accept, accept_enc,
     sirk_rsp      :Set the response used in SIRK requests <accept, accept_enc,
                    reject, oob>

Besides initializing the CAS and the CSIS, there are also commands to lock and release the CSIS
@@ -45,8 +45,8 @@ clients.

.. code-block:: console

   uart:~$ cap_acceptor set_sirk 00112233445566778899aabbccddeeff
   Set SIRK updated
   uart:~$ cap_acceptor sirk 00112233445566778899aabbccddeeff
   SIRK updated

Getting the current SIRK
------------------------
@@ -56,7 +56,7 @@ This command can get the currently used SIRK.
.. code-block:: console

   uart:~$ cap_acceptor get_sirk
   Set SIRK
   SIRK
   36 04 9a dc 66 3a a1 a1 |6...f:..
   1d 9a 2f 41 01 73 3e 01 |../A.s>.

+7 −7
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ Discovering sets on a device:
   <dbg> bt_csip_set_coordinator.discover_func: Setup complete for 1 / 1
   Found 1 sets on device
   uart:~$ csip_set_coordinator discover_sets
   <dbg> bt_csip_set_coordinator.Set SIRK
   <dbg> bt_csip_set_coordinator.SIRK
   36 04 9a dc 66 3a a1 a1 |6...f:..
   1d 9a 2f 41 01 73 3e 01 |../A.s>.
   <dbg> bt_csip_set_coordinator.csip_set_coordinator_discover_sets_read_set_size_cb: 2
@@ -109,7 +109,7 @@ Lock set members:
   <dbg> bt_csip_set_coordinator.csip_set_coordinator_connected: Connected to 34:02:86:03:86:c0 (public)
   <dbg> bt_csip_set_coordinator.discover_func: Setup complete for 1 / 1
   <dbg> bt_csip_set_coordinator.csip_set_coordinator_lock_set_init_cb:
   <dbg> bt_csip_set_coordinator.Set SIRK
   <dbg> bt_csip_set_coordinator.SIRK
   36 04 9a dc 66 3a a1 a1 |6...f:..
   1d 9a 2f 41 01 73 3e 01 |../A.s>.
   <dbg> bt_csip_set_coordinator.csip_set_coordinator_discover_sets_read_set_size_cb: 2
@@ -149,9 +149,9 @@ Using the Set Member
                     [rank <int>] [not-lockable] [sirk <data>]
      lock          :Lock the set
      release       :Release the set [force]
      set_sirk      :Set the currently used SIRK <sirk>
      sirk          :Set the currently used SIRK <sirk>
      get_sirk      :Get the currently used SIRK
      set_sirk_rsp  :Set the response used in SIRK requests <accept, accept_enc,
      sirk_rsp      :Set the response used in SIRK requests <accept, accept_enc,
                     reject, oob>

Example Usage
@@ -176,8 +176,8 @@ clients.

.. code-block:: console

   uart:~$ csip_set_member set_sirk 00112233445566778899aabbccddeeff
   Set SIRK updated
   uart:~$ csip_set_member sirk 00112233445566778899aabbccddeeff
   SIRK updated

Getting the current SIRK
------------------------
@@ -187,6 +187,6 @@ This command can get the currently used SIRK.
.. code-block:: console

   uart:~$ csip_set_member get_sirk
   Set SIRK
   SIRK
   36 04 9a dc 66 3a a1 a1 |6...f:..
   1d 9a 2f 41 01 73 3e 01 |../A.s>.
+3 −0
Original line number Diff line number Diff line
@@ -446,6 +446,9 @@ Bluetooth Audio
  This needs to be added to all instances of CAP discovery callback functions defined.
  (:github:`72797`)

* All occurrences of ``set_sirk`` have been changed to just ``sirk`` as the ``s`` in ``sirk`` stands
  for set. (:github:`73413`)

Bluetooth Classic
=================

+10 −10
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ extern "C" {
#define BT_CSIP_READ_SIRK_REQ_RSP_OOB_ONLY      0x03

/** Size of the Set Identification Resolving Key (SIRK) */
#define BT_CSIP_SET_SIRK_SIZE                   16
#define BT_CSIP_SIRK_SIZE 16

/** Size of the Resolvable Set Identifier (RSI) */
#define BT_CSIP_RSI_SIZE                        6
@@ -123,7 +123,7 @@ struct bt_csip_set_member_register_param {
	 * This shall be unique between different sets, and shall be the same
	 * for each set member for each set.
	 */
	uint8_t set_sirk[BT_CSIP_SET_SIRK_SIZE];
	uint8_t sirk[BT_CSIP_SIRK_SIZE];

	/**
	 * @brief Boolean to set whether the set is lockable by clients
@@ -204,8 +204,8 @@ int bt_csip_set_member_unregister(struct bt_csip_set_member_svc_inst *svc_inst);
 * @param svc_inst  Pointer to the registered Coordinated Set Identification Service.
 * @param sirk      The new SIRK.
 */
int bt_csip_set_member_set_sirk(struct bt_csip_set_member_svc_inst *svc_inst,
				const uint8_t sirk[BT_CSIP_SET_SIRK_SIZE]);
int bt_csip_set_member_sirk(struct bt_csip_set_member_svc_inst *svc_inst,
			    const uint8_t sirk[BT_CSIP_SIRK_SIZE]);

/**
 * @brief Get the SIRK of a service instance
@@ -214,7 +214,7 @@ int bt_csip_set_member_set_sirk(struct bt_csip_set_member_svc_inst *svc_inst,
 * @param[out] sirk      Array to store the SIRK in.
 */
int bt_csip_set_member_get_sirk(struct bt_csip_set_member_svc_inst *svc_inst,
				uint8_t sirk[BT_CSIP_SET_SIRK_SIZE]);
				uint8_t sirk[BT_CSIP_SIRK_SIZE]);

/**
 * @brief Generate the Resolvable Set Identifier (RSI) value.
@@ -248,10 +248,10 @@ struct bt_csip_set_coordinator_set_info {
	/**
	 * @brief The 16 octet set Set Identity Resolving Key (SIRK)
	 *
	 * The Set SIRK may not be exposed by the server over Bluetooth, and
	 * The SIRK may not be exposed by the server over Bluetooth, and
	 * may require an out-of-band solution.
	 */
	uint8_t set_sirk[BT_CSIP_SET_SIRK_SIZE];
	uint8_t sirk[BT_CSIP_SIRK_SIZE];

	/**
	 * @brief The size of the set
@@ -382,12 +382,12 @@ struct bt_csip_set_coordinator_cb {
/**
 * @brief Check if advertising data indicates a set member
 *
 * @param set_sirk The SIRK of the set to check against
 * @param sirk The SIRK of the set to check against
 * @param data The advertising data
 *
 * @return true if the advertising data indicates a set member, false otherwise
 */
bool bt_csip_set_coordinator_is_set_member(const uint8_t set_sirk[BT_CSIP_SET_SIRK_SIZE],
bool bt_csip_set_coordinator_is_set_member(const uint8_t sirk[BT_CSIP_SIRK_SIZE],
					   struct bt_data *data);

/**
+2 −3
Original line number Diff line number Diff line
@@ -4120,12 +4120,11 @@ struct bt_uuid_128 {
/**
 *  @brief Set Identity Resolving Key value
 */
#define BT_UUID_CSIS_SET_SIRK_VAL 0x2b84
#define BT_UUID_CSIS_SIRK_VAL 0x2b84
/**
 *  @brief Set Identity Resolving Key
 */
#define BT_UUID_CSIS_SET_SIRK \
	BT_UUID_DECLARE_16(BT_UUID_CSIS_SET_SIRK_VAL)
#define BT_UUID_CSIS_SIRK         BT_UUID_DECLARE_16(BT_UUID_CSIS_SIRK_VAL)
/**
 *  @brief Set size value
 */
Loading