diff mbox series

[Bluez,01/62] lib: Inclusive language in HCI commands and events

Message ID 20210813201256.Bluez.1.I3be2e373e96293524fa38328ebac177eddc71938@changeid
State New
Headers show
Series Inclusive language changes | expand

Commit Message

Archie Pusaka Aug. 13, 2021, 12:17 p.m. UTC
From: Archie Pusaka <apusaka@chromium.org>

"central" and "peripheral" are preferred, as reflected in the BT
core spec 5.3.

Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
---

 lib/hci.h          | 14 +++++++-------
 tools/parser/hci.c |  8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)

Comments

Marcel Holtmann Aug. 16, 2021, 3:59 p.m. UTC | #1
Hi Luiz,

>>> "central" and "peripheral" are preferred, as reflected in the BT

>>> core spec 5.3.

>>> 

>>> Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

>>> ---

>>> 

>>> lib/hci.h          | 14 +++++++-------

>> 

>> until we deprecate libbluetooth and no longer give an option to install it, you can not do this. It is part of libbluetooth and this would break API.

> 

> Couldn't we perhaps bump the major version so we could move on with

> these changes, or would you like to deprecate the libbluetooth before

> we move to e.g. BlueZ 6.0? Since we have done these changes on the

> kernel size I wonder also if it shouldn't reflect into userspace

> though, we could perhaps keep the old definition alongside with the

> new though so we don't break userspace tools/apps which may still be

> using the old definitions.


I think we need to get rid of libbluetooth really fast. In addition we also should remove the Android code. Both seems to be not really needed anymore.

Regards

Marcel
diff mbox series

Patch

diff --git a/lib/hci.h b/lib/hci.h
index 3382b87bf3..9d3cdfd06b 100644
--- a/lib/hci.h
+++ b/lib/hci.h
@@ -421,11 +421,11 @@  typedef struct {
 } __attribute__ ((packed)) change_conn_link_key_cp;
 #define CHANGE_CONN_LINK_KEY_CP_SIZE 2
 
-#define OCF_MASTER_LINK_KEY		0x0017
+#define OCF_CENTRAL_LINK_KEY		0x0017
 typedef struct {
 	uint8_t		key_flag;
-} __attribute__ ((packed)) master_link_key_cp;
-#define MASTER_LINK_KEY_CP_SIZE 1
+} __attribute__ ((packed)) central_link_key_cp;
+#define CENTRAL_LINK_KEY_CP_SIZE 1
 
 #define OCF_REMOTE_NAME_REQ		0x0019
 typedef struct {
@@ -1804,13 +1804,13 @@  typedef struct {
 }  __attribute__ ((packed)) evt_change_conn_link_key_complete;
 #define EVT_CHANGE_CONN_LINK_KEY_COMPLETE_SIZE 3
 
-#define EVT_MASTER_LINK_KEY_COMPLETE		0x0A
+#define EVT_CENTRAL_LINK_KEY_COMPLETE		0x0A
 typedef struct {
 	uint8_t		status;
 	uint16_t	handle;
 	uint8_t		key_flag;
-} __attribute__ ((packed)) evt_master_link_key_complete;
-#define EVT_MASTER_LINK_KEY_COMPLETE_SIZE 4
+} __attribute__ ((packed)) evt_central_link_key_complete;
+#define EVT_CENTRAL_LINK_KEY_COMPLETE_SIZE 4
 
 #define EVT_READ_REMOTE_FEATURES_COMPLETE	0x0B
 typedef struct {
@@ -2149,7 +2149,7 @@  typedef struct {
 	uint16_t	interval;
 	uint16_t	latency;
 	uint16_t	supervision_timeout;
-	uint8_t		master_clock_accuracy;
+	uint8_t		central_clock_accuracy;
 } __attribute__ ((packed)) evt_le_connection_complete;
 #define EVT_LE_CONN_COMPLETE_SIZE 18
 
diff --git a/tools/parser/hci.c b/tools/parser/hci.c
index d395e37f54..a1253acdf7 100644
--- a/tools/parser/hci.c
+++ b/tools/parser/hci.c
@@ -1084,7 +1084,7 @@  static inline void remote_name_req_dump(int level, struct frame *frm)
 
 static inline void master_link_key_dump(int level, struct frame *frm)
 {
-	master_link_key_cp *cp = frm->ptr;
+	central_link_key_cp *cp = frm->ptr;
 
 	p_indent(level, frm);
 	printf("flag %d\n", cp->key_flag);
@@ -1771,7 +1771,7 @@  static inline void command_dump(int level, struct frame *frm)
 		case OCF_DISCONNECT_LOGICAL_LINK:
 			generic_command_dump(level + 1, frm);
 			return;
-		case OCF_MASTER_LINK_KEY:
+		case OCF_CENTRAL_LINK_KEY:
 			master_link_key_dump(level + 1, frm);
 			return;
 		case OCF_READ_REMOTE_EXT_FEATURES:
@@ -3116,7 +3116,7 @@  static inline void remote_name_req_complete_dump(int level, struct frame *frm)
 
 static inline void master_link_key_complete_dump(int level, struct frame *frm)
 {
-	evt_master_link_key_complete *evt = frm->ptr;
+	evt_central_link_key_complete *evt = frm->ptr;
 
 	p_indent(level, frm);
 	printf("status 0x%2.2x handle %d flag %d\n",
@@ -3874,7 +3874,7 @@  static inline void event_dump(int level, struct frame *frm)
 	case EVT_CHANGE_CONN_LINK_KEY_COMPLETE:
 		generic_response_dump(level + 1, frm);
 		break;
-	case EVT_MASTER_LINK_KEY_COMPLETE:
+	case EVT_CENTRAL_LINK_KEY_COMPLETE:
 		master_link_key_complete_dump(level + 1, frm);
 		break;
 	case EVT_REMOTE_NAME_REQ_COMPLETE: