Inclusive language changes
Subsystems (2)
cover Inclusive language changes
From: Archie Pusaka <[email protected]>
Hi BlueZ maintainers,
This series of patches promotes the usage of the more inclusive terms such as central/peripheral, accept list/reject list, or their equivalent where appropriate.
This is also reflected on the changes to Core spec v5.3 and the appropriate language mapping table by Bluetooth SIG
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
I tried to make the changes for each patch as local as possible, hopefully this could ease the adoption for downstream. As a side effect, I ended up with more patches than I had hoped before.
Do take note that some patches, most notably the ones ending with "* storing LTK", will break the stored data, thus perhaps are not suitable to be merged as is. I don't have the plan to write patch to support both the old and the replacement version since that would still left us the less inclusive terms on the code base, but with additional complexity.
Some other patches, mainly those on tools/* change the output or input parameter to tools, this might come as a surprise for users who uses another program that depends on the i/o parameter of those tools.
I leave the discretion of choosing which patches are better to be left out to you.
Thanks,
Archie
Archie Pusaka (62):
lib: Inclusive language in HCI commands and events
lib: Inclusive language in consts and strings tools/hciconfig: Inclusive language update
core: Inclusive language for l2cap
core: Inclusive language for rfcomm
lib: Inclusive language for filtering devices lib/mgmt: Inclusive language for LTK
doc/mgmt: Inclusive language update
btio: Inclusive language changes
shared/ad: Inclusive language changes
shared/hfp: Inclusive language changes
monitor: Inclusive language in struct member
monitor: Inclusive language in SMP related things
monitor: Inclusive language in LE states
monitor: Inclusive language in LL feature
monitor: Inclusive language in link key transaction
monitor: Inclusive language in peripheral broadcast
monitor: Inclusive language in peripheral page response timeout
monitor: Inclusive language in consts and strings
monitor: Inclusive language in filtering devices
emulator: Inclusive language in naming
emulator: Inclusive language in strings
emulator: Inclusive language in filtering device
tools: Inclusive language in referring the central address tools/parser/hci: Inclusive language changes tools/parser/smp: Inclusive language changes tools/3dsp: Inclusive language changes tools/mgmt-tester: Inclusive language changes tools/bdaddr: Inclusive language changes tools/hciconfig: Inclusive language changes tools/meshctl: Inclusive language changes tools/mgmt-tester: Inclusive language changes tools/parser: Inclusive language in struct member tools/parser/lmp: Inclusive language changes tools/parser/avdtp: Inclusive language changes tools/parser/csr: Inclusive language changes tools/btpclientctl: Inclusive language changes tools/l2cap-tester: Inclusive language changes tools/hci-tester: Inclusive language changes tools/btiotest: Inclusive language changes tools/hcitool: Inclusive language changes, central peripheral tools/hcitool: Inclusive language changes, accept list tools/l2test: Inclusive language changes tools/rctest: Inclusive language changes tools/rfcomm: Inclusive language changes plugins/sixaxis: Inclusive language changes profiles/audio: Inclusive language changes profiles/health: Inclusive language changes
sdp: Inclusive language changes
adapter: Inclusive language for central and peripheral
adapter: Inclusive language for storing LTK
adapter: Inclusive language for device filtering
client: Inclusive language changes
mesh: Inclusive language changes
tools/mesh: Inclusive language changes tools/mesh-gatt: Inclusive language changes unit/mesh: Inclusive language changes
doc/mesh: Inclusive language changes
android: Inclusive language for volume control
android: Inclusive language for describing relation
android: Inclusive language for filtering devices
android: Inclusive language in storing LTK
android/a2dp.c | 2 +- android/bluetooth.c | 62 ++--- android/client/if-hf-client.c | 2 +- android/hal-audio.c | 12 +- android/hal-ipc-api.txt | 2 +- android/hal-sco.c | 12 +- android/handsfree-client.c | 2 +- android/hardware/audio.h | 20 +- android/hardware/bt_hf_client.h | 2 +- android/tester-main.c | 8 +- btio/btio.c | 62 ++--- btio/btio.h | 2 +- client/main.c | 6 +- doc/mesh-api.txt | 2 +- doc/mgmt-api.txt | 6 +- doc/settings-storage.txt | 4 +- emulator/btdev.c | 198 ++++++++-------- emulator/hciemu.c | 21 +- emulator/hciemu.h | 12 +- emulator/le.c | 116 ++++----- emulator/serial.c | 6 +- emulator/smp.c | 8 +- lib/hci.c | 52 ++-- lib/hci.h | 44 ++-- lib/hci_lib.h | 8 +- lib/l2cap.h | 2 +- lib/mgmt.h | 2 +- lib/rfcomm.h | 2 +- mesh/net-keys.c | 38 +-- mesh/net-keys.h | 8 +- mesh/net.h | 4 +- monitor/broadcom.c | 8 +- monitor/bt.h | 150 ++++++------ monitor/control.c | 14 +- monitor/l2cap.c | 10 +- monitor/ll.c | 60 ++--- monitor/lmp.c | 2 +- monitor/packet.c | 407 ++++++++++++++++---------------- plugins/sixaxis.c | 44 ++-- profiles/audio/a2dp.c | 2 +- profiles/audio/avctp.c | 10 +- profiles/audio/avctp.h | 2 +- profiles/health/mcap.c | 22 +- profiles/health/mcap.h | 2 +- profiles/sap/server.c | 2 +- src/adapter.c | 117 ++++----- src/adapter.h | 4 +- src/device.c | 6 +- src/sdpd-server.c | 10 +- src/sdpd.h | 2 +- src/shared/ad.c | 8 +- src/shared/ad.h | 2 +- src/shared/hfp.c | 4 +- src/shared/hfp.h | 2 +- tools/3dsp.c | 62 ++--- tools/bdaddr.rst | 2 +- tools/btiotest.c | 22 +- tools/btpclientctl.c | 2 +- tools/hci-tester.c | 16 +- tools/hciconfig.c | 26 +- tools/hciconfig.rst | 24 +- tools/hcitool.c | 110 ++++----- tools/hcitool.rst | 30 +-- tools/l2cap-tester.c | 36 +-- tools/l2test.c | 22 +- tools/mesh-cfgclient.c | 4 +- tools/mesh-gatt/mesh-net.h | 4 +- tools/mesh-gatt/net.c | 60 ++--- tools/mesh/mesh-db.c | 28 +-- tools/mesh/mesh-db.h | 4 +- tools/mesh/remote.c | 53 ++--- tools/mesh/remote.h | 5 +- tools/meshctl.c | 6 +- tools/mgmt-tester.c | 138 +++++------ tools/oobtest.c | 12 +- tools/parser/avdtp.c | 4 +- tools/parser/csr.c | 17 +- tools/parser/ericsson.c | 2 +- tools/parser/hci.c | 49 ++-- tools/parser/lmp.c | 112 ++++----- tools/parser/parser.h | 2 +- tools/parser/smp.c | 12 +- tools/rctest.c | 22 +- tools/rctest.rst | 4 +- tools/rfcomm-tester.c | 14 +- tools/rfcomm.c | 16 +- tools/rfcomm.rst | 2 +- tools/sco-tester.c | 10 +- tools/smp-tester.c | 16 +- unit/test-mesh-crypto.c | 4 +- 90 files changed, 1293 insertions(+), 1276 deletions(-)
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 1/62 lib: Inclusive language in HCI commands and events
From: Archie Pusaka <[email protected]>
"central" and "peripheral" are preferred, as reflected in the BT core spec 5.3.
---
lib/hci.h | 14 +++++++------- tools/parser/hci.c | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-)
lib/hci.h +7 -7
@@ -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 0x0017typedef 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 0x0Atypedef 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
tools/parser/hci.c +4 -4
@@ -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 :
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=531151
---Test result---
Test Summary:
CheckPatch FAIL 12.00 seconds GitLint FAIL 6.07 seconds Prep - Setup ELL PASS 39.11 seconds Build - Prep PASS 0.09 seconds Build - Configure PASS 6.90 seconds Build - Make PASS 165.81 seconds Make Check PASS 9.01 seconds Make Distcheck PASS 201.08 seconds Build w/ext ELL - Configure PASS 6.92 seconds Build w/ext ELL - Make PASS 155.03 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Output:
lib: Inclusive language in HCI commands and events WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #25: FILE: lib/hci.h:427:
+} __attribute__ ((packed)) central_link_key_cp;
WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #42: FILE: lib/hci.h:1812:
+} __attribute__ ((packed)) evt_central_link_key_complete;
- total: 0 errors, 2 warnings, 70 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] lib: Inclusive language in HCI commands and events" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
lib: Inclusive language in consts and strings ERROR:SPACING: space required after that ',' (ctx:VxV) #49: FILE: lib/hci.c:739:
+ { "<AFH class. perip.>",LMP_AFH_CLS_PRP }, /* Bit 4 */
^
- total: 1 errors, 0 warnings, 74 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] lib: Inclusive language in consts and strings" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
lib: Inclusive language for filtering devices WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #133: FILE: lib/hci.h:1568:
+} __attribute__ ((packed)) le_read_accept_list_size_rp;
WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #146: FILE: lib/hci.h:1577:
+} __attribute__ ((packed)) le_add_device_to_accept_list_cp;
WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #156: FILE: lib/hci.h:1584:
+} __attribute__ ((packed)) le_remove_device_from_accept_list_cp;
WARNING:LONG_LINE: line length of 81 exceeds 80 columns
#173: FILE: lib/hci_lib.h:120:
+int hci_le_add_accept_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to);
- total: 0 errors, 4 warnings, 195 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] lib: Inclusive language for filtering devices" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
shared/ad: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #8:
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
- total: 0 errors, 1 warnings, 34 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] shared/ad: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
shared/hfp: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #7:
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
- total: 0 errors, 1 warnings, 32 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] shared/hfp: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
monitor: Inclusive language in peripheral broadcast WARNING:LONG_LINE: line length of 84 exceeds 80 columns #284: FILE: monitor/packet.c:10248:
+ const struct bt_hci_evt_peripheral_broadcast_channel_map_change *evt = data;
- total: 0 errors, 1 warnings, 378 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] monitor: Inclusive language in peripheral broadcast" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
monitor: Inclusive language in consts and strings WARNING:LONG_LINE_STRING: line length of 83 exceeds 80 columns #302: FILE: monitor/packet.c:3674:
+ print_field("Peripheral Conn. Interval: 0x%4.4x - 0x%4.4x",
- total: 0 errors, 1 warnings, 408 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] monitor: Inclusive language in consts and strings" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
emulator: Inclusive language in strings WARNING:LONG_LINE_COMMENT: line length of 84 exceeds 80 columns #90: FILE: emulator/btdev.c:6130:
+ btdev->le_features[0] |= 0x08; /* Peripheral-initiated Features Exchange */
WARNING:LONG_LINE_COMMENT: line length of 84 exceeds 80 columns #103: FILE: emulator/le.c:346:
+ //hci->le_features[0] |= 0x08; /* Peripheral-initiated Features Exchange */
WARNING:LONG_LINE_COMMENT: line length of 84 exceeds 80 columns #113: FILE: emulator/le.c:402:
+ hci->le_states[0] |= 0x40; /* Initiating + Connection (Central Role) */
- total: 0 errors, 3 warnings, 116 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] emulator: Inclusive language in strings" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
emulator: Inclusive language in filtering device WARNING:LONG_LINE_COMMENT: line length of 81 exceeds 80 columns #115: FILE: emulator/btdev.c:3553:
+ * • any advertising filter policy uses the Accept List and advertising
WARNING:LONG_LINE_COMMENT: line length of 81 exceeds 80 columns #162: FILE: emulator/btdev.c:3590:
+ * • any advertising filter policy uses the Accept List and advertising
WARNING:LONG_LINE_COMMENT: line length of 81 exceeds 80 columns #217: FILE: emulator/btdev.c:3641:
+ * • any advertising filter policy uses the Accept List and advertising
- total: 0 errors, 3 warnings, 468 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] emulator: Inclusive language in filtering device" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
tools/parser/hci: Inclusive language changes WARNING:LONG_LINE: line length of 81 exceeds 80 columns #87: FILE: tools/parser/hci.c:1643:
+ (cp->filter == 0x01 ? "accept list only" : "reserved")));
- total: 0 errors, 1 warnings, 104 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] tools/parser/hci: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
tools/mgmt-tester: Inclusive language changes WARNING:LONG_LINE_STRING: line length of 86 exceeds 80 columns #194: FILE: tools/mgmt-tester.c:11551:
+ test_bredrle50_full("Ext Adv. connectable & connected (peripheral) - Success",
WARNING:LONG_LINE_STRING: line length of 90 exceeds 80 columns #201: FILE: tools/mgmt-tester.c:11556:
+ test_bredrle50_full("Ext Adv. non-connectable & connected (peripheral) - Success",
WARNING:LONG_LINE_STRING: line length of 83 exceeds 80 columns #208: FILE: tools/mgmt-tester.c:11561:
+ test_bredrle50_full("Ext Adv. connectable & connected (central) - Success",
WARNING:LONG_LINE_STRING: line length of 87 exceeds 80 columns #215: FILE: tools/mgmt-tester.c:11566:
+ test_bredrle50_full("Ext Adv. non-connectable & connected (central) - Success",
- total: 0 errors, 4 warnings, 197 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] tools/mgmt-tester: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
tools/hciconfig: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #8:
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
WARNING:LONG_LINE: line length of 92 exceeds 80 columns #58: FILE: tools/hciconfig.c:1925:
+ { "block", cmd_block, "<bdaddr>", "Add a device to the reject list" },
WARNING:LONG_LINE: line length of 97 exceeds 80 columns #59: FILE: tools/hciconfig.c:1926:
+ { "unblock", cmd_unblock, "<bdaddr>", "Remove a device from the reject list" },
- total: 0 errors, 3 warnings, 58 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] tools/hciconfig: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
tools/parser/avdtp: Inclusive language changes WARNING:LONG_LINE_STRING: line length of 86 exceeds 80 columns #27: FILE: tools/parser/avdtp.c:662:
+ printf("AVDTP(c): ver %d %s%scc %d %spt %d seqn %d time %d ssrc %d\n",
- total: 0 errors, 1 warnings, 16 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] tools/parser/avdtp: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
tools/l2test: Inclusive language changes ERROR:INITIALISED_STATIC: do not initialise statics to 0 #17: FILE: tools/l2test.c:113:
+static int central = 0;
WARNING:MISSING_SPACE: break quoted strings at a space character #62: FILE: tools/l2test.c:1340:
while ((opt = getopt(argc, argv, "a:b:cde:g:i:mnpqrstuwxyz"
+ "AB:CD:EF:GH:I:J:K:L:M:N:O:P:Q:RSTUV:W:X:Y:Z:")) != EOF) {
- total: 1 errors, 1 warnings, 66 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] tools/l2test: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
tools/rctest: Inclusive language changes ERROR:INITIALISED_STATIC: do not initialise statics to 0 #17: FILE: tools/rctest.c:79:
+static int central = 0;
WARNING:LONG_LINE: line length of 90 exceeds 80 columns #60: FILE: tools/rctest.c:700:
+ while ((opt=getopt(argc,argv,"rdscuwmna:b:i:P:U:B:O:N:CAESL:W:M:D:Y:T")) != EOF) {
ERROR:SPACING: spaces required around that '=' (ctx:VxV) #60: FILE: tools/rctest.c:700:
+ while ((opt=getopt(argc,argv,"rdscuwmna:b:i:P:U:B:O:N:CAESL:W:M:D:Y:T")) != EOF) {
^
ERROR:SPACING: space required after that ',' (ctx:VxV) #60: FILE: tools/rctest.c:700:
+ while ((opt=getopt(argc,argv,"rdscuwmna:b:i:P:U:B:O:N:CAESL:W:M:D:Y:T")) != EOF) {
^
ERROR:SPACING: space required after that ',' (ctx:VxV) #60: FILE: tools/rctest.c:700:
+ while ((opt=getopt(argc,argv,"rdscuwmna:b:i:P:U:B:O:N:CAESL:W:M:D:Y:T")) != EOF) {
^
- total: 4 errors, 1 warnings, 81 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] tools/rctest: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
tools/rfcomm: Inclusive language changes ERROR:INITIALISED_STATIC: do not initialise statics to 0 #17: FILE: tools/rfcomm.c:40:
+static int central = 0;
WARNING:LONG_LINE: line length of 91 exceeds 80 columns #53: FILE: tools/rfcomm.c:683:
+ while ((opt = getopt_long(argc, argv, "+i:rahAESCL:", main_options, NULL)) != -1) {
- total: 1 errors, 1 warnings, 58 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] tools/rfcomm: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
profiles/health: Inclusive language changes WARNING:LONG_LINE_COMMENT: line length of 85 exceeds 80 columns #27: FILE: profiles/health/mcap.c:56:
+ guint remote_caps; /* CSP-Peripheral: remote central got caps */
WARNING:LONG_LINE_COMMENT: line length of 90 exceeds 80 columns #28: FILE: profiles/health/mcap.c:57:
+ guint rem_req_acc; /* CSP-Peripheral: accuracy required by central */
WARNING:LONG_LINE_COMMENT: line length of 81 exceeds 80 columns #34: FILE: profiles/health/mcap.c:63:
+ void *csp_priv_data; /* CSP-Central: In-flight request data */
WARNING:LONG_LINE_COMMENT: line length of 100 exceeds 80 columns #56: FILE: profiles/health/mcap.h:273:
+ mcap_info_ind_event_cb mcl_sync_infoind_cb; /* (CSP Central) Received info indication */
- total: 0 errors, 4 warnings, 40 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] profiles/health: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
adapter: Inclusive language for central and peripheral ERROR:INITIALISED_STATIC: do not initialise statics to NULL #19: FILE: src/adapter.c:115:
+static struct mgmt *mgmt_primary = NULL;
- total: 1 errors, 0 warnings, 285 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] adapter: Inclusive language for central and peripheral" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
adapter: Inclusive language for device filtering
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #8:
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
- total: 0 errors, 1 warnings, 89 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] adapter: Inclusive language for device filtering" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
mesh: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #8:
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
ERROR:INITIALISED_STATIC: do not initialise statics to 0 #28: FILE: mesh/net-keys.c:56:
+static uint32_t last_flooding_id = 0;
- total: 1 errors, 1 warnings, 146 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] mesh: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
tools/mesh: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #7:
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
- total: 0 errors, 1 warnings, 239 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] tools/mesh: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
tools/mesh-gatt: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #7:
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
ERROR:FUNCTION_WITHOUT_ARGS: Bad function definition - void setup_accept_list() should probably be void setup_accept_list(void) #90: FILE: tools/mesh-gatt/net.c:944:
+static void setup_accept_list()
- total: 1 errors, 1 warnings, 127 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] tools/mesh-gatt: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
unit/mesh: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #7:
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
- total: 0 errors, 1 warnings, 16 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] unit/mesh: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
doc/mesh: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #7:
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
- total: 0 errors, 1 warnings, 8 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] doc/mesh: Inclusive language changes" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
android: Inclusive language for volume control WARNING:LEADING_SPACE: please, no spaces at the start of a line #115: FILE: android/hardware/audio.h:517:
+ int (*set_main_volume)(struct audio_hw_device *dev, float volume);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line #128: FILE: android/hardware/audio.h:526:
+ int (*get_main_volume)(struct audio_hw_device *dev, float *volume);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line #137: FILE: android/hardware/audio.h:595:
+ int (*set_main_mute)(struct audio_hw_device *dev, bool mute);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line #150: FILE: android/hardware/audio.h:604:
+ int (*get_main_mute)(struct audio_hw_device *dev, bool *mute);$
- total: 0 errors, 4 warnings, 124 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] android: Inclusive language for volume control" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
android: Inclusive language for filtering devices WARNING:LEADING_SPACE: please, no spaces at the start of a line #108: FILE: android/hardware/bt_hf_client.h:101:
+ BTHF_CLIENT_CMD_COMPLETE_ERROR_BLOCKED,$
- total: 0 errors, 1 warnings, 78 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH] android: Inclusive language for filtering devices" has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: GitLint - FAIL
Desc: Run gitlint with rule in .gitlint
Output:
shared/ad: Inclusive language changes
5: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"
shared/hfp: Inclusive language changes
4: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"
tools/hciconfig: Inclusive language changes
5: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"
adapter: Inclusive language for device filtering
5: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"
mesh: Inclusive language changes
5: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"
tools/mesh: Inclusive language changes
4: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"
tools/mesh-gatt: Inclusive language changes
4: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"
unit/mesh: Inclusive language changes
4: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"
doc/mesh: Inclusive language changes
4: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"
##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL
##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build
##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree
##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree
##############################
Test: Make Check - PASS
Desc: Run 'make check'
##############################
Test: Make Distcheck - PASS
Desc: Run distcheck to check the distribution
##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration
##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration
---
Regards,
Linux Bluetooth
Marcel Holtmann
maintainerRe: [Bluez PATCH 01/62] lib: Inclusive language in HCI commands and events
In reply to Archie PusakaHi Archie,
Quoted 7 lines
"central" and "peripheral" are preferred, as reflected in the BT core spec 5.3.
Reviewed-by Miao-chen Chou <[email protected]>---
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.
Regards
Marcel
Luiz Augusto von Dentz
maintainerRe: [Bluez PATCH 01/62] lib: Inclusive language in HCI commands and events
Hi Marcel,
Quoted 6 lines · Marcel Holtmann
Hi Archie,
Quoted 3 lines
"central" and "peripheral" are preferred, as reflected in the BT core spec 5.3.
Quoted 6 lines
Quoted 4 lines
Reviewed-by Miao-chen Chou <[email protected]>---
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.
Quoted 4 lines
Regards
Marcel
Signature · 1 line
Luiz Augusto von Dentz
Marcel Holtmann
maintainerRe: [Bluez PATCH 01/62] lib: Inclusive language in HCI commands and events
Hi Luiz,
Quoted 10 lines
Quoted 9 lines
Quoted 7 lines
"central" and "peripheral" are preferred, as reflected in the BT core spec 5.3.
Reviewed-by Miao-chen Chou <[email protected]>---
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.
Quoted 7 lines
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/appswhich 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
PATCH 2/62 lib: Inclusive language in consts and strings
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are preferred, as reflected in the BT core spec 5.3
---
lib/hci.c | 16 ++++++++-------- lib/hci.h | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-)
lib/hci.c +8 -8
@@ -288,7 +288,7 @@ int hci_strtolp(char *str, unsigned int *val)static hci_map link_mode_map[] = { {"NONE" ,0 }, {"ACCEPT" ,HCI_LM_ACCEPT }, - {"MASTER" ,HCI_LM_MASTER }, + {"CENTRAL" ,HCI_LM_CENTRAL }, {"AUTH" ,HCI_LM_AUTH }, {"ENCRYPT" ,HCI_LM_ENCRYPT }, {"TRUSTED" ,HCI_LM_TRUSTED },
@@ -304,8 +304,8 @@ char *hci_lmtostr(unsigned int lm)return NULL ; *str =0 ; -if (!(lm &HCI_LM_MASTER )) -strcpy (str,"SLAVE " ); +if (!(lm &HCI_LM_CENTRAL )) +strcpy (str,"PERIPHERAL " ); s =hci_bit2str (link_mode_map, lm);if (!s) {
@@ -345,7 +345,7 @@ static hci_map commands_map[] = { { "Set Connection Encryption", 16 }, { "Change Connection Link Key", 17 }, - { "Master Link Key", 18 }, + { "Temporary Link Key", 18 }, { "Remote Name Request", 19 }, { "Cancel Remote Name Request", 20 }, { "Read Remote Supported Features", 21 },
@@ -735,8 +735,8 @@ static hci_map lmp_features_map[8][9] = { { "<EV4 packets>", LMP_EV4 }, /* Bit 0 */ { "<EV5 packets>", LMP_EV5 }, /* Bit 1 */ { "<no. 34>", 0x04 }, /* Bit 2 */ - { "<AFH cap. slave>", LMP_AFH_CAP_SLV }, /* Bit 3 */ - { "<AFH class. slave>", LMP_AFH_CLS_SLV }, /* Bit 4 */ + { "<AFH cap. perip.>", LMP_AFH_CAP_PRP }, /* Bit 3 */ + { "<AFH class. perip.>",LMP_AFH_CLS_PRP }, /* Bit 4 */ { "<BR/EDR not supp.>", LMP_NO_BREDR }, /* Bit 5 */ { "<LE support>", LMP_LE }, /* Bit 6 */ { "<3-slot EDR ACL>", LMP_EDR_3SLOT }, /* Bit 7 */
@@ -746,8 +746,8 @@ static hci_map lmp_features_map[8][9] = { { "<5-slot EDR ACL>", LMP_EDR_5SLOT }, /* Bit 0 */ { "<sniff subrating>", LMP_SNIFF_SUBR }, /* Bit 1 */ { "<pause encryption>", LMP_PAUSE_ENC }, /* Bit 2 */ - { "<AFH cap. master>", LMP_AFH_CAP_MST }, /* Bit 3 */ - { "<AFH class. master>",LMP_AFH_CLS_MST }, /* Bit 4 */ + { "<AFH cap. central>", LMP_AFH_CAP_CEN }, /* Bit 3 */ + { "<AFH class. cent.>", LMP_AFH_CLS_CEN }, /* Bit 4 */ { "<EDR eSCO 2 Mbps>", LMP_EDR_ESCO_2M }, /* Bit 5 */ { "<EDR eSCO 3 Mbps>", LMP_EDR_ESCO_3M }, /* Bit 6 */ { "<3-slot EDR eSCO>", LMP_EDR_3S_ESCO }, /* Bit 7 */
lib/hci.h +5 -5
@@ -241,8 +241,8 @@ enum {#define LMP_EV4 0x01#define LMP_EV5 0x02 -#define LMP_AFH_CAP_SLV 0x08 -#define LMP_AFH_CLS_SLV 0x10 +#define LMP_AFH_CAP_PRP 0x08 +#define LMP_AFH_CLS_PRP 0x10#define LMP_NO_BREDR 0x20#define LMP_LE 0x40#define LMP_EDR_3SLOT 0x80
@@ -250,8 +250,8 @@ enum {#define LMP_EDR_5SLOT 0x01#define LMP_SNIFF_SUBR 0x02#define LMP_PAUSE_ENC 0x04 -#define LMP_AFH_CAP_MST 0x08 -#define LMP_AFH_CLS_MST 0x10 +#define LMP_AFH_CAP_CEN 0x08 +#define LMP_AFH_CLS_CEN 0x10#define LMP_EDR_ESCO_2M 0x20#define LMP_EDR_ESCO_3M 0x40#define LMP_EDR_3S_ESCO 0x80
@@ -281,7 +281,7 @@ enum {/* Link mode */ #define HCI_LM_ACCEPT 0x8000 -#define HCI_LM_MASTER 0x0001 +#define HCI_LM_CENTRAL 0x0001#define HCI_LM_AUTH 0x0002#define HCI_LM_ENCRYPT 0x0004#define HCI_LM_TRUSTED 0x0008
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 3/62 tools/hciconfig: Inclusive language update
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
Update the docs to reflect the changes in lib/hci.c
---
tools/hciconfig.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
tools/hciconfig.rst +10 -10
@@ -216,16 +216,16 @@ revision Display revision information. lm [*mode*] - With no *mode*, prints link mode. **MASTER** or **SLAVE** mean, - respectively, to ask to become master or to remain slave when a connection - request comes in. The additional keyword **ACCEPT** means that baseband - connections will be accepted even if there are no listening *AF_BLUETOOTH* - sockets. *mode* is **NONE** or a comma-separated list of keywords, where - possible keywords are **MASTER** and **ACCEPT**. **NONE** sets link policy - to the default behaviour of remaining slave and not accepting baseband - connections when there are no listening *AF_BLUETOOTH* sockets. If - **MASTER** is present, the device will ask to become master if a - connection request comes in. If **ACCEPT** is present, the device will + With no *mode*, prints link mode. **CENTRAL** or **PERIPHERAL** mean, + respectively, to ask to become central or to remain peripheral when a + connection request comes in. The additional keyword **ACCEPT** means that + baseband connections will be accepted even if there are no listening + *AF_BLUETOOTH* sockets. *mode* is **NONE** or a comma-separated list of + keywords, where possible keywords are **CENTRAL** and **ACCEPT**. **NONE** + sets link policy to the default behaviour of remaining peripheral and not + accepting baseband connections when there are no listening *AF_BLUETOOTH* + sockets. If **CENTRAL** is present, the device will ask to become central + if a connection request comes in. If **ACCEPT** is present, the device will accept baseband connections even when there are no listening *AF_BLUETOOTH* sockets.
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 4/62 core: Inclusive language for l2cap
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected on the BT core spec 5.3.
---
btio/btio.c | 10 +++++----- lib/l2cap.h | 2 +- profiles/health/mcap.c | 2 +- src/sdpd-server.c | 2 +- tools/l2test.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)
btio/btio.c +5 -5
@@ -369,13 +369,13 @@ static int l2cap_set_master(int sock, int master)return -errno;if (master) { -if (flags &L2CAP_LM_MASTER ) +if (flags &L2CAP_LM_CENTRAL )return 0 ; - flags |=L2CAP_LM_MASTER ; + flags |=L2CAP_LM_CENTRAL ; }else { -if (!(flags &L2CAP_LM_MASTER )) +if (!(flags &L2CAP_LM_CENTRAL ))return 0 ; - flags &= ~L2CAP_LM_MASTER ; + flags &= ~L2CAP_LM_CENTRAL ; }if (setsockopt (sock,SOL_L2CAP ,L2CAP_LM , &flags,sizeof (flags)) <0 )
@@ -1180,7 +1180,7 @@ parse_opts:return FALSE; } *(va_arg(args, gboolean *)) = - (flags &L2CAP_LM_MASTER ) ? TRUE : FALSE; + (flags &L2CAP_LM_CENTRAL ) ? TRUE : FALSE;break ;case BT_IO_OPT_HANDLE :if (l2cap_get_info (sock, &handle, dev_class) <0 ) {
lib/l2cap.h +1 -1
@@ -52,7 +52,7 @@ struct l2cap_conninfo { };#define L2CAP_LM 0x03 -#define L2CAP_LM_MASTER 0x0001 +#define L2CAP_LM_CENTRAL 0x0001#define L2CAP_LM_AUTH 0x0002#define L2CAP_LM_ENCRYPT 0x0004#define L2CAP_LM_TRUSTED 0x0008
profiles/health/mcap.c +1 -1
@@ -2426,7 +2426,7 @@ static gboolean get_btrole(struct mcap_mcl *mcl)if (getsockopt (sock,SOL_L2CAP ,L2CAP_LM , &flags, &len))DBG ("CSP: could not read role" ); -return flags &L2CAP_LM_MASTER ; +return flags &L2CAP_LM_CENTRAL ; } uint64_t mcap_get_timestamp(struct mcap_mcl *mcl,
src/sdpd-server.c +1 -1
@@ -72,7 +72,7 @@ static int init_server(uint16_t mtu, int master, int compat) }if (master) { -int opt =L2CAP_LM_MASTER ; +int opt =L2CAP_LM_CENTRAL ;if (setsockopt (l2cap_sock,SOL_L2CAP ,L2CAP_LM , &opt,sizeof (opt)) <0 ) {error ("setsockopt: %s" ,strerror (errno));return -1 ;
tools/l2test.c +2 -2
@@ -484,7 +484,7 @@ static int do_connect(char *svr)if (reliable) opt |=L2CAP_LM_RELIABLE ;if (master) - opt |=L2CAP_LM_MASTER ; + opt |=L2CAP_LM_CENTRAL ;if (auth) opt |=L2CAP_LM_AUTH ;if (encr)
@@ -587,7 +587,7 @@ static void do_listen(void (*handler)(int sk))if (reliable) opt |=L2CAP_LM_RELIABLE ;if (master) - opt |=L2CAP_LM_MASTER ; + opt |=L2CAP_LM_CENTRAL ;if (auth) opt |=L2CAP_LM_AUTH ;if (encr)
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 5/62 core: Inclusive language for rfcomm
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
btio/btio.c | 10 +++++----- lib/rfcomm.h | 2 +- tools/rctest.c | 4 ++-- tools/rfcomm.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-)
btio/btio.c +5 -5
@@ -394,13 +394,13 @@ static int rfcomm_set_master(int sock, int master)return -errno;if (master) { -if (flags &RFCOMM_LM_MASTER ) +if (flags &RFCOMM_LM_CENTRAL )return 0 ; - flags |=RFCOMM_LM_MASTER ; + flags |=RFCOMM_LM_CENTRAL ; }else { -if (!(flags &RFCOMM_LM_MASTER )) +if (!(flags &RFCOMM_LM_CENTRAL ))return 0 ; - flags &= ~RFCOMM_LM_MASTER ; + flags &= ~RFCOMM_LM_CENTRAL ; }if (setsockopt (sock,SOL_RFCOMM ,RFCOMM_LM , &flags,sizeof (flags)) <0 )
@@ -1345,7 +1345,7 @@ static gboolean rfcomm_get(int sock, GError **err, BtIOOption opt1,return FALSE; } *(va_arg(args, gboolean *)) = - (flags &RFCOMM_LM_MASTER ) ? TRUE : FALSE; + (flags &RFCOMM_LM_CENTRAL ) ? TRUE : FALSE;break ;case BT_IO_OPT_HANDLE :if (rfcomm_get_info (sock, &handle, dev_class) <0 ) {
lib/rfcomm.h +1 -1
@@ -38,7 +38,7 @@ struct rfcomm_conninfo { };#define RFCOMM_LM 0x03 -#define RFCOMM_LM_MASTER 0x0001 +#define RFCOMM_LM_CENTRAL 0x0001#define RFCOMM_LM_AUTH 0x0002#define RFCOMM_LM_ENCRYPT 0x0004#define RFCOMM_LM_TRUSTED 0x0008
tools/rctest.c +2 -2
@@ -203,7 +203,7 @@ static int do_connect(const char *svr)/* Set link mode */ opt =0 ;if (master) - opt |=RFCOMM_LM_MASTER ; + opt |=RFCOMM_LM_CENTRAL ;if (auth) opt |=RFCOMM_LM_AUTH ;if (encr)
@@ -294,7 +294,7 @@ static void do_listen(void (*handler)(int sk))/* Set link mode */ opt =0 ;if (master) - opt |=RFCOMM_LM_MASTER ; + opt |=RFCOMM_LM_CENTRAL ;if (auth) opt |=RFCOMM_LM_AUTH ;if (encr)
tools/rfcomm.c +1 -1
@@ -435,7 +435,7 @@ static void cmd_listen(int ctl, int dev, bdaddr_t *bdaddr, int argc, char **argv lm =0 ;if (master) - lm |=RFCOMM_LM_MASTER ; + lm |=RFCOMM_LM_CENTRAL ;if (auth) lm |=RFCOMM_LM_AUTH ;if (encryption)
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 6/62 lib: Inclusive language for filtering devices
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"accept list" is preferred, as reflected in the BT core spec 5.3.
---
lib/hci.c | 36 ++++++++++++++++++------------------ lib/hci.h | 20 ++++++++++---------- lib/hci_lib.h | 8 ++++---- tools/hcitool.c | 8 ++++---- tools/parser/hci.c | 6 +++--- 5 files changed, 39 insertions(+), 39 deletions(-)
lib/hci.c +18 -18
@@ -565,11 +565,11 @@ static hci_map commands_map[] = { { "LE Set Scan Enable", 211 }, { "LE Create Connection", 212 }, { "LE Create Connection Cancel", 213 }, - { "LE Read White List Size", 214 }, - { "LE Clear White List", 215 }, + { "LE Read Accept List Size", 214 }, + { "LE Clear Accept List", 215 }, - { "LE Add Device To White List", 216 }, - { "LE Remove Device From White List", 217 }, + { "LE Add Device To Accept List", 216 }, + { "LE Remove Device From Accept List", 217 }, { "LE Connection Update", 218 }, { "LE Set Host Channel Classification", 219 }, { "LE Read Channel Map", 220 },
@@ -1322,10 +1322,10 @@ int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to)return 0 ; } -int hci_le_add_white_list (int dd,const bdaddr_t *bdaddr,uint8_t type,int to) +int hci_le_add_accept_list (int dd,const bdaddr_t *bdaddr,uint8_t type,int to) {struct hci_request rq; -le_add_device_to_white_list_cp cp; +le_add_device_to_accept_list_cp cp;uint8_t status;memset (&cp,0 ,sizeof (cp));
@@ -1334,9 +1334,9 @@ int hci_le_add_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)memset (&rq,0 ,sizeof (rq)); rq.ogf =OGF_LE_CTL ; - rq.ocf =OCF_LE_ADD_DEVICE_TO_WHITE_LIST ; + rq.ocf =OCF_LE_ADD_DEVICE_TO_ACCEPT_LIST ; rq.cparam = &cp; - rq.clen =LE_ADD_DEVICE_TO_WHITE_LIST_CP_SIZE ; + rq.clen =LE_ADD_DEVICE_TO_ACCEPT_LIST_CP_SIZE ; rq.rparam = &status; rq.rlen =1 ;
@@ -1351,10 +1351,10 @@ int hci_le_add_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)return 0 ; } -int hci_le_rm_white_list (int dd,const bdaddr_t *bdaddr,uint8_t type,int to) +int hci_le_rm_accept_list (int dd,const bdaddr_t *bdaddr,uint8_t type,int to) {struct hci_request rq; -le_remove_device_from_white_list_cp cp; +le_remove_device_from_accept_list_cp cp;uint8_t status;memset (&cp,0 ,sizeof (cp));
@@ -1363,9 +1363,9 @@ int hci_le_rm_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)memset (&rq,0 ,sizeof (rq)); rq.ogf =OGF_LE_CTL ; - rq.ocf =OCF_LE_REMOVE_DEVICE_FROM_WHITE_LIST ; + rq.ocf =OCF_LE_REMOVE_DEVICE_FROM_ACCEPT_LIST ; rq.cparam = &cp; - rq.clen =LE_REMOVE_DEVICE_FROM_WHITE_LIST_CP_SIZE ; + rq.clen =LE_REMOVE_DEVICE_FROM_ACCEPT_LIST_CP_SIZE ; rq.rparam = &status; rq.rlen =1 ;
@@ -1380,18 +1380,18 @@ int hci_le_rm_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)return 0 ; } -int hci_le_read_white_list_size (int dd,uint8_t *size,int to) +int hci_le_read_accept_list_size (int dd,uint8_t *size,int to) {struct hci_request rq; -le_read_white_list_size_rp rp; +le_read_accept_list_size_rp rp;memset (&rp,0 ,sizeof (rp));memset (&rq,0 ,sizeof (rq)); rq.ogf =OGF_LE_CTL ; - rq.ocf =OCF_LE_READ_WHITE_LIST_SIZE ; + rq.ocf =OCF_LE_READ_ACCEPT_LIST_SIZE ; rq.rparam = &rp; - rq.rlen =LE_READ_WHITE_LIST_SIZE_RP_SIZE ; + rq.rlen =LE_READ_ACCEPT_LIST_SIZE_RP_SIZE ;if (hci_send_req (dd, &rq, to) <0 )return -1 ;
@@ -1407,14 +1407,14 @@ int hci_le_read_white_list_size(int dd, uint8_t *size, int to)return 0 ; } -int hci_le_clear_white_list (int dd,int to) +int hci_le_clear_accept_list (int dd,int to) {struct hci_request rq;uint8_t status;memset (&rq,0 ,sizeof (rq)); rq.ogf =OGF_LE_CTL ; - rq.ocf =OCF_LE_CLEAR_WHITE_LIST ; + rq.ocf =OCF_LE_CLEAR_ACCEPT_LIST ; rq.rparam = &status; rq.rlen =1 ;
lib/hci.h +10 -10
@@ -1561,28 +1561,28 @@ typedef struct {#define OCF_LE_CREATE_CONN_CANCEL 0x000E -#define OCF_LE_READ_WHITE_LIST_SIZE 0x000F +#define OCF_LE_READ_ACCEPT_LIST_SIZE 0x000Ftypedef struct {uint8_t status;uint8_t size; -} __attribute__ ((packed))le_read_white_list_size_rp ; -#define LE_READ_WHITE_LIST_SIZE_RP_SIZE 2 +} __attribute__ ((packed))le_read_accept_list_size_rp ; +#define LE_READ_ACCEPT_LIST_SIZE_RP_SIZE 2 -#define OCF_LE_CLEAR_WHITE_LIST 0x0010 +#define OCF_LE_CLEAR_ACCEPT_LIST 0x0010 -#define OCF_LE_ADD_DEVICE_TO_WHITE_LIST 0x0011 +#define OCF_LE_ADD_DEVICE_TO_ACCEPT_LIST 0x0011typedef struct {uint8_t bdaddr_type;bdaddr_t bdaddr; -} __attribute__ ((packed))le_add_device_to_white_list_cp ; -#define LE_ADD_DEVICE_TO_WHITE_LIST_CP_SIZE 7 +} __attribute__ ((packed))le_add_device_to_accept_list_cp ; +#define LE_ADD_DEVICE_TO_ACCEPT_LIST_CP_SIZE 7 -#define OCF_LE_REMOVE_DEVICE_FROM_WHITE_LIST 0x0012 +#define OCF_LE_REMOVE_DEVICE_FROM_ACCEPT_LIST 0x0012typedef struct {uint8_t bdaddr_type;bdaddr_t bdaddr; -} __attribute__ ((packed))le_remove_device_from_white_list_cp ; -#define LE_REMOVE_DEVICE_FROM_WHITE_LIST_CP_SIZE 7 +} __attribute__ ((packed))le_remove_device_from_accept_list_cp ; +#define LE_REMOVE_DEVICE_FROM_ACCEPT_LIST_CP_SIZE 7#define OCF_LE_CONN_UPDATE 0x0013 typedef struct {
lib/hci_lib.h +4 -4
@@ -117,10 +117,10 @@ int hci_le_create_conn(int dd, uint16_t interval, uint16_t window,int hci_le_conn_update (int dd,uint16_t handle,uint16_t min_interval,uint16_t max_interval,uint16_t latency,uint16_t supervision_timeout,int to); -int hci_le_add_white_list (int dd,const bdaddr_t *bdaddr,uint8_t type,int to); -int hci_le_rm_white_list (int dd,const bdaddr_t *bdaddr,uint8_t type,int to); -int hci_le_read_white_list_size (int dd,uint8_t *size,int to); -int hci_le_clear_white_list (int dd,int to); +int hci_le_add_accept_list (int dd,const bdaddr_t *bdaddr,uint8_t type,int to); +int hci_le_rm_accept_list (int dd,const bdaddr_t *bdaddr,uint8_t type,int to); +int hci_le_read_accept_list_size (int dd,uint8_t *size,int to); +int hci_le_clear_accept_list (int dd,int to);int hci_le_add_resolving_list (int dd,const bdaddr_t *bdaddr,uint8_t type,uint8_t *peer_irk,uint8_t *local_irk,int to);int hci_le_rm_resolving_list (int dd,const bdaddr_t *bdaddr,uint8_t type,int to);
tools/hcitool.c +4 -4
@@ -2793,7 +2793,7 @@ static void cmd_lewladd(int dev_id, int argc, char **argv)str2ba (argv[0 ], &bdaddr); - err =hci_le_add_white_list (dd, &bdaddr, bdaddr_type,1000 ); + err =hci_le_add_accept_list (dd, &bdaddr, bdaddr_type,1000 );hci_close_dev (dd);if (err <0 ) {
@@ -2839,7 +2839,7 @@ static void cmd_lewlrm(int dev_id, int argc, char **argv)str2ba (argv[0 ], &bdaddr); - err =hci_le_rm_white_list (dd, &bdaddr,LE_PUBLIC_ADDRESS ,1000 ); + err =hci_le_rm_accept_list (dd, &bdaddr,LE_PUBLIC_ADDRESS ,1000 );hci_close_dev (dd);if (err <0 ) {
@@ -2883,7 +2883,7 @@ static void cmd_lewlsz(int dev_id, int argc, char **argv)exit (1 ); } - err =hci_le_read_white_list_size (dd, &size,1000 ); + err =hci_le_read_accept_list_size (dd, &size,1000 );hci_close_dev (dd);if (err <0 ) {
@@ -2928,7 +2928,7 @@ static void cmd_lewlclr(int dev_id, int argc, char **argv)exit (1 ); } - err =hci_le_clear_white_list (dd,1000 ); + err =hci_le_clear_accept_list (dd,1000 );hci_close_dev (dd);if (err <0 ) {
tools/parser/hci.c +3 -3
@@ -2969,9 +2969,9 @@ static inline void cmd_complete_dump(int level, struct frame *frm)case OCF_LE_SET_SCAN_PARAMETERS :case OCF_LE_SET_SCAN_ENABLE :case OCF_LE_CREATE_CONN : -case OCF_LE_CLEAR_WHITE_LIST : -case OCF_LE_ADD_DEVICE_TO_WHITE_LIST : -case OCF_LE_REMOVE_DEVICE_FROM_WHITE_LIST : +case OCF_LE_CLEAR_ACCEPT_LIST : +case OCF_LE_ADD_DEVICE_TO_ACCEPT_LIST : +case OCF_LE_REMOVE_DEVICE_FROM_ACCEPT_LIST :case OCF_LE_SET_HOST_CHANNEL_CLASSIFICATION :case OCF_LE_RECEIVER_TEST :case OCF_LE_TRANSMITTER_TEST :
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 7/62 lib/mgmt: Inclusive language for LTK
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
android/bluetooth.c | 4 ++-- lib/mgmt.h | 2 +- monitor/control.c | 4 ++-- src/adapter.c | 4 ++-- tools/oobtest.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-)
android/bluetooth.c +2 -2
@@ -2276,7 +2276,7 @@ static void new_long_term_key_event(uint16_t index, uint16_t length, ediv =le16_to_cpu (key->ediv); rand =le64_to_cpu (key->rand); -store_ltk (&key->addr.bdaddr, key->addr.type, key->master, +store_ltk (&key->addr.bdaddr, key->addr.type, key->central, key->val, key->type, key->enc_size, ediv, rand); }
@@ -3097,7 +3097,7 @@ static struct mgmt_ltk_info *get_ltk_info(GKeyFile *key_file, const char *peer, info->ediv =g_key_file_get_integer (key_file, peer, ediv_s,NULL ); info->ediv =cpu_to_le16 (info->ediv); - info->master = master; + info->central = master; failed:g_free (key);
lib/mgmt.h +1 -1
@@ -179,7 +179,7 @@ struct mgmt_cp_load_link_keys {struct mgmt_ltk_info {struct mgmt_addr_info addr;uint8_t type; -uint8_t master; +uint8_t central;uint8_t enc_size;uint16_t ediv;uint64_t rand;
monitor/control.c +2 -2
@@ -308,13 +308,13 @@ static void mgmt_new_long_term_key(uint16_t len, const void *buf)/* LE SC keys are both for master and slave */ switch (ev->key.type) {case 0x00 : -if (ev->key.master) +if (ev->key.central) type ="Master (Unauthenticated)" ;else type ="Slave (Unauthenticated)" ;break ;case 0x01 : -if (ev->key.master) +if (ev->key.central) type ="Master (Authenticated)" ;else type ="Slave (Authenticated)" ;
src/adapter.c +2 -2
@@ -4028,7 +4028,7 @@ static void load_ltks(struct btd_adapter *adapter, GSList *keys) key->rand =cpu_to_le64 (info->rand); key->ediv =cpu_to_le16 (info->ediv); key->type = info->authenticated; - key->master = info->master; + key->central = info->master; key->enc_size = info->enc_size; }
@@ -8145,7 +8145,7 @@ static void new_long_term_key_callback(uint16_t index, uint16_t length, rand =le64_to_cpu (key->rand);store_longtermkey (adapter, &key->addr.bdaddr, - key->addr.type, key->val, key->master, + key->addr.type, key->val, key->central, key->type, key->enc_size, ediv, rand);device_set_bonded (device, addr->type);
tools/oobtest.c +2 -2
@@ -133,13 +133,13 @@ static void new_long_term_key_event(uint16_t index, uint16_t len,switch (ev->key.type) {case 0x00 : -if (ev->key.master) +if (ev->key.central) type ="Unauthenticated, Master" ;else type ="Unauthenticated, Slave" ;break ;case 0x01 : -if (ev->key.master) +if (ev->key.central) type ="Authenticated, Master" ;else type ="Authenticated, Slave" ;
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 8/62 doc/mgmt: Inclusive language update
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
Update the docs to reflect the changes in lib/mgmt.c.
---
doc/mgmt-api.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
doc/mgmt-api.txt +3 -3
@@ -855,7 +855,7 @@ Load Long Term Keys Command Address (6 Octets) Address_Type (1 Octet) Key_Type (1 Octet) - Master (1 Octet) + Central (1 Octet) Encryption_Size (1 Octet) Encryption_Diversifier (2 Octets) Random_Number (8 Octets)
@@ -4019,7 +4019,7 @@ New Long Term Key Event Address (6 Octets) Address_Type (1 Octet) Key_Type (1 Octet) - Master (1 Octet) + Central (1 Octet) Encryption Size (1 Octet) Enc. Diversifier (2 Octets) Random Number (8 Octets)
@@ -4459,7 +4459,7 @@ New Signature Resolving Key Event } This event indicates that a new signature resolving key has been - generated for either the master or slave device. + generated for either the central or peripheral device. The Store_Hint parameter indicates whether the host is expected to store the key persistently or not.
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 9/62 btio: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as is reflected in the BT core spec 5.3.
---
android/a2dp.c | 2 +- btio/btio.c | 42 +++++++++++++++++++++--------------------- btio/btio.h | 2 +- profiles/audio/a2dp.c | 2 +- profiles/audio/avctp.c | 2 +- profiles/sap/server.c | 2 +- tools/btiotest.c | 8 ++++---- 7 files changed, 30 insertions(+), 30 deletions(-)
android/a2dp.c +1 -1
@@ -1692,7 +1692,7 @@ bool bt_a2dp_register(struct ipc *ipc, const bdaddr_t *addr, uint8_t mode)BT_IO_OPT_SOURCE_BDADDR , &adapter_addr,BT_IO_OPT_PSM ,AVDTP_PSM ,BT_IO_OPT_SEC_LEVEL ,BT_IO_SEC_MEDIUM , -BT_IO_OPT_MASTER , true, +BT_IO_OPT_CENTRAL , true, BT_IO_OPT_INVALID);if (!server) {error ("Failed to listen on AVDTP channel: %s" , err->message);
btio/btio.c +21 -21
144 lines not on this page · raw message
btio/btio.h +1 -1
@@ -36,7 +36,7 @@ typedef enum {BT_IO_OPT_MTU ,BT_IO_OPT_OMTU ,BT_IO_OPT_IMTU , -BT_IO_OPT_MASTER , +BT_IO_OPT_CENTRAL ,BT_IO_OPT_HANDLE ,BT_IO_OPT_CLASS , BT_IO_OPT_MODE,
profiles/audio/a2dp.c +1 -1
@@ -2418,7 +2418,7 @@ static bool a2dp_server_listen(struct a2dp_server *server)BT_IO_OPT_PSM ,AVDTP_PSM ,BT_IO_OPT_MODE , mode,BT_IO_OPT_SEC_LEVEL ,BT_IO_SEC_MEDIUM , -BT_IO_OPT_MASTER , true, +BT_IO_OPT_CENTRAL , true, BT_IO_OPT_INVALID);if (server->io)return true;
profiles/audio/avctp.c +1 -1
@@ -1625,7 +1625,7 @@ static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean master,BT_IO_OPT_SOURCE_BDADDR , src,BT_IO_OPT_PSM , psm,BT_IO_OPT_SEC_LEVEL ,BT_IO_SEC_MEDIUM , -BT_IO_OPT_MASTER , master, +BT_IO_OPT_CENTRAL , master,BT_IO_OPT_MODE , mode, BT_IO_OPT_INVALID);if (!io) {
profiles/sap/server.c +1 -1
@@ -1369,7 +1369,7 @@ int sap_server_register(struct btd_adapter *adapter)btd_adapter_get_address (adapter),BT_IO_OPT_CHANNEL ,SAP_SERVER_CHANNEL ,BT_IO_OPT_SEC_LEVEL ,BT_IO_SEC_HIGH , -BT_IO_OPT_MASTER , TRUE, +BT_IO_OPT_CENTRAL , TRUE, BT_IO_OPT_INVALID);if (!io) {error ("Can't listen at channel %d." ,SAP_SERVER_CHANNEL );
tools/btiotest.c +4 -4
@@ -343,7 +343,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm,BT_IO_OPT_PSM , psm,BT_IO_OPT_CID , cid,BT_IO_OPT_SEC_LEVEL , sec, -BT_IO_OPT_MASTER , master, +BT_IO_OPT_CENTRAL , master, BT_IO_OPT_INVALID); else l2_srv = bt_io_listen(conn, cfm, data,
@@ -353,7 +353,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm,BT_IO_OPT_PSM , psm,BT_IO_OPT_CID , cid,BT_IO_OPT_SEC_LEVEL , sec, -BT_IO_OPT_MASTER , master, +BT_IO_OPT_CENTRAL , master, BT_IO_OPT_INVALID);if (!l2_srv) {
@@ -427,7 +427,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer,BT_IO_OPT_SOURCE , src,BT_IO_OPT_CHANNEL , ch,BT_IO_OPT_SEC_LEVEL , sec, -BT_IO_OPT_MASTER , master, +BT_IO_OPT_CENTRAL , master, BT_IO_OPT_INVALID); else rc_srv = bt_io_listen(conn, cfm,
@@ -435,7 +435,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer, &err,BT_IO_OPT_CHANNEL , ch,BT_IO_OPT_SEC_LEVEL , sec, -BT_IO_OPT_MASTER , master, +BT_IO_OPT_CENTRAL , master, BT_IO_OPT_INVALID);if (!rc_srv) {
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 10/62 shared/ad: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"peripheral" is preferred, as reflected in the BT core spec 5.3. Also prefer to use "reject list", as reflected in
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
---
src/shared/ad.c | 8 ++++---- src/shared/ad.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
src/shared/ad.c +4 -4
@@ -959,7 +959,7 @@ void bt_ad_clear_flags(struct bt_ad *ad) data_destroy); } -static uint8_t type_blacklist[] = { +static uint8_t type_reject_list[] = {BT_AD_FLAGS ,BT_AD_UUID16_SOME ,BT_AD_UUID16_ALL ,
@@ -976,7 +976,7 @@ static uint8_t type_blacklist[] = {BT_AD_DEVICE_ID ,BT_AD_SMP_TK ,BT_AD_SMP_OOB_FLAGS , -BT_AD_SLAVE_CONN_INTERVAL , +BT_AD_PERIPHERAL_CONN_INTERVAL ,BT_AD_SOLICIT16 ,BT_AD_SOLICIT128 , BT_AD_SERVICE_DATA16,
@@ -1012,8 +1012,8 @@ bool bt_ad_add_data(struct bt_ad *ad, uint8_t type, void *data, size_t len)if (len > (BT_AD_MAX_DATA_LEN -2 ))return false; -for (i =0 ; i <sizeof (type_blacklist); i++) { -if (type == type_blacklist[i]) +for (i =0 ; i <sizeof (type_reject_list); i++) { +if (type == type_reject_list[i])return false; }
src/shared/ad.h +1 -1
@@ -32,7 +32,7 @@#define BT_AD_DEVICE_ID 0x10#define BT_AD_SMP_TK 0x10#define BT_AD_SMP_OOB_FLAGS 0x11 -#define BT_AD_SLAVE_CONN_INTERVAL 0x12 +#define BT_AD_PERIPHERAL_CONN_INTERVAL 0x12#define BT_AD_SOLICIT16 0x14#define BT_AD_SOLICIT128 0x15#define BT_AD_SERVICE_DATA16 0x16
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 11/62 shared/hfp: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
Prefer to use "rejected", as reflected in
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
---
android/handsfree-client.c | 2 +- src/shared/hfp.c | 4 ++-- src/shared/hfp.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
android/handsfree-client.c +1 -1
@@ -405,7 +405,7 @@ static void cmd_complete_cb(enum hfp_result result, enum hfp_error cme_err,case HFP_RESULT_DELAYED : ev.type =HAL_HF_CLIENT_CMD_COMP_ERR_DELAYED ;break ; -case HFP_RESULT_BLACKLISTED : +case HFP_RESULT_REJECTED : ev.type =HAL_HF_CLIENT_CMD_COMP_ERR_BACKLISTED ;break ;case HFP_RESULT_CME_ERROR :
src/shared/hfp.c +2 -2
@@ -721,7 +721,7 @@ bool hfp_gw_send_result(struct hfp_gw *hfp, enum hfp_result result)case HFP_RESULT_BUSY :case HFP_RESULT_NO_ANSWER :case HFP_RESULT_DELAYED : -case HFP_RESULT_BLACKLISTED : +case HFP_RESULT_REJECTED :case HFP_RESULT_CME_ERROR :case HFP_RESULT_NO_DIALTONE :case HFP_RESULT_CONNECT :
@@ -1018,7 +1018,7 @@ static bool is_response(const char *prefix, enum hfp_result *result, }if (strcmp (prefix,"BLACKLISTED" ) ==0 ) { - *result =HFP_RESULT_BLACKLISTED ; + *result =HFP_RESULT_REJECTED ; *cme_err =0 ;return true; }
src/shared/hfp.h +1 -1
@@ -20,7 +20,7 @@ enum hfp_result {HFP_RESULT_BUSY =7 ,HFP_RESULT_NO_ANSWER =8 ,HFP_RESULT_DELAYED =9 , -HFP_RESULT_BLACKLISTED =10 , +HFP_RESULT_REJECTED =10 , HFP_RESULT_CME_ERROR = 11, };
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 12/62 monitor: Inclusive language in struct member
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are preferred, as reflected in the BT core spec 5.3.
---
emulator/btdev.c | 34 +++++++++---------- monitor/bt.h | 88 ++++++++++++++++++++++++------------------------ monitor/ll.c | 32 +++++++++--------- monitor/packet.c | 64 +++++++++++++++++------------------ 4 files changed, 109 insertions(+), 109 deletions(-)
emulator/btdev.c +17 -17
@@ -5280,24 +5280,24 @@ static void le_cis_estabilished(struct btdev *dev, struct btdev_conn *conn,struct btdev *remote = conn->link->dev;/* TODO: Figure out if these values makes sense */ -memcpy (evt.cig_sync_delay, remote->le_cig.params.m_interval, -sizeof (remote->le_cig.params.m_interval)); -memcpy (evt.cis_sync_delay, remote->le_cig.params.s_interval, -sizeof (remote->le_cig.params.s_interval)); -memcpy (evt.m_latency, &remote->le_cig.params.m_latency, -sizeof (remote->le_cig.params.m_latency)); -memcpy (evt.s_latency, &remote->le_cig.params.s_latency, -sizeof (remote->le_cig.params.s_latency)); - evt.m_phy = remote->le_cig.cis[0 ].m_phy; - evt.s_phy = remote->le_cig.cis[0 ].s_phy; +memcpy (evt.cig_sync_delay, remote->le_cig.params.c_interval, +sizeof (remote->le_cig.params.c_interval)); +memcpy (evt.cis_sync_delay, remote->le_cig.params.p_interval, +sizeof (remote->le_cig.params.p_interval)); +memcpy (evt.c_latency, &remote->le_cig.params.c_latency, +sizeof (remote->le_cig.params.c_latency)); +memcpy (evt.p_latency, &remote->le_cig.params.p_latency, +sizeof (remote->le_cig.params.p_latency)); + evt.c_phy = remote->le_cig.cis[0 ].c_phy; + evt.p_phy = remote->le_cig.cis[0 ].p_phy; evt.nse =0x01 ; - evt.m_bn =0x01 ; - evt.s_bn =0x01 ; - evt.m_ft =0x01 ; - evt.s_ft =0x01 ; - evt.m_mtu = remote->le_cig.cis[0 ].m_sdu; - evt.s_mtu = remote->le_cig.cis[0 ].s_sdu; - evt.interval = remote->le_cig.params.m_latency; + evt.c_bn =0x01 ; + evt.p_bn =0x01 ; + evt.c_ft =0x01 ; + evt.p_ft =0x01 ; + evt.c_mtu = remote->le_cig.cis[0 ].c_sdu; + evt.p_mtu = remote->le_cig.cis[0 ].p_sdu; + evt.interval = remote->le_cig.params.c_latency; }le_meta_event (dev,BT_HCI_EVT_LE_CIS_ESTABLISHED , &evt,sizeof (evt));
monitor/bt.h +44 -44
133 lines not on this page · raw message
monitor/ll.c +16 -16
@@ -505,16 +505,16 @@ static void phy_update_ind(const void *data, uint8_t size)const struct bt_ll_phy_update_ind *pdu = data;uint8_t mask; -print_field ("M_TO_S_PHY: 0x%2.2x" , pdu->m_phy); +print_field ("M_TO_S_PHY: 0x%2.2x" , pdu->c_phy); - mask =print_bitfield (2 , pdu->m_phy, le_phys); + mask =print_bitfield (2 , pdu->c_phy, le_phys);if (mask)print_text (COLOR_UNKNOWN_OPTIONS_BIT ," Reserved" " (0x%2.2x)" , mask); -print_field ("S_TO_M_PHY: 0x%2.2x" , pdu->s_phy); +print_field ("S_TO_M_PHY: 0x%2.2x" , pdu->p_phy); - mask =print_bitfield (2 , pdu->s_phy, le_phys); + mask =print_bitfield (2 , pdu->p_phy, le_phys);if (mask)print_text (COLOR_UNKNOWN_OPTIONS_BIT ," Reserved" " (0x%2.2x)" , mask);
@@ -596,38 +596,38 @@ static void cis_req(const void *data, uint8_t size)print_field ("CIG ID: 0x%2.2x" , cmd->cig);print_field ("CIS ID: 0x%2.2x" , cmd->cis); -print_field ("Master to Slave PHY: 0x%2.2x" , cmd->m_phy); +print_field ("Master to Slave PHY: 0x%2.2x" , cmd->c_phy); - mask =print_bitfield (2 , cmd->m_phy, le_phys); + mask =print_bitfield (2 , cmd->c_phy, le_phys);if (mask)print_text (COLOR_UNKNOWN_OPTIONS_BIT ," Reserved" " (0x%2.2x)" , mask); -print_field ("Slave To Master PHY: 0x%2.2x" , cmd->s_phy); +print_field ("Slave To Master PHY: 0x%2.2x" , cmd->p_phy); - mask =print_bitfield (2 , cmd->s_phy, le_phys); + mask =print_bitfield (2 , cmd->p_phy, le_phys);if (mask)print_text (COLOR_UNKNOWN_OPTIONS_BIT ," Reserved" " (0x%2.2x)" , mask); -print_field ("Master to Slave Maximum SDU: %u" , cmd->m_sdu); -print_field ("Slave to Master Maximum SDU: %u" , cmd->s_sdu); +print_field ("Master to Slave Maximum SDU: %u" , cmd->c_sdu); +print_field ("Slave to Master Maximum SDU: %u" , cmd->p_sdu); -memcpy (&interval, cmd->m_interval,sizeof (cmd->m_interval)); +memcpy (&interval, cmd->c_interval,sizeof (cmd->c_interval));print_field ("Master to Slave Interval: 0x%6.6x" ,le32_to_cpu (interval)); -memcpy (&interval, cmd->s_interval,sizeof (cmd->s_interval)); +memcpy (&interval, cmd->p_interval,sizeof (cmd->p_interval));print_field ("Slave to Master Interval: 0x%6.6x" ,le32_to_cpu (interval)); -print_field ("Master to Slave Maximum PDU: %u" , cmd->m_pdu); -print_field ("Slave to Master Maximum PDU: %u" , cmd->s_pdu); +print_field ("Master to Slave Maximum PDU: %u" , cmd->c_pdu); +print_field ("Slave to Master Maximum PDU: %u" , cmd->p_pdu);print_field ("Burst Number: %u us" , cmd->bn);memcpy (&interval, cmd->sub_interval,sizeof (cmd->sub_interval));print_field ("Sub-Interval: 0x%6.6x" ,le32_to_cpu (interval)); -print_field ("Master to Slave Flush Timeout: %u" , cmd->m_ft); -print_field ("Slave to Master Flush Timeout: %u" , cmd->s_ft); +print_field ("Master to Slave Flush Timeout: %u" , cmd->c_ft); +print_field ("Slave to Master Flush Timeout: %u" , cmd->p_ft);print_field ("ISO Interval: 0x%4.4x" ,le16_to_cpu (cmd->iso_interval));
monitor/packet.c +32 -32
105 lines not on this page · raw message
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 13/62 monitor: Inclusive language in SMP related things
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
emulator/smp.c | 8 ++++---- monitor/bt.h | 4 ++-- monitor/l2cap.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-)
emulator/smp.c +4 -4
@@ -382,7 +382,7 @@ static void distribute_keys(struct smp_conn *conn)if (conn->local_key_dist &DIST_ENC_KEY ) {memset (buf,0 ,sizeof (buf));smp_send (conn,BT_L2CAP_SMP_ENCRYPT_INFO , buf,sizeof (buf)); -smp_send (conn,BT_L2CAP_SMP_MASTER_IDENT , buf,10 ); +smp_send (conn,BT_L2CAP_SMP_CENTRAL_IDENT , buf,10 ); }if (conn->local_key_dist &DIST_ID_KEY ) {
@@ -570,7 +570,7 @@ static void encrypt_info(struct smp_conn *conn, const void *data, uint16_t len) { } -static void master_ident (struct smp_conn *conn,const void *data,uint16_t len) +static void central_ident (struct smp_conn *conn,const void *data,uint16_t len) { conn->remote_key_dist &= ~DIST_ENC_KEY ;
@@ -725,8 +725,8 @@ void smp_data(void *conn_data, const void *data, uint16_t len)case BT_L2CAP_SMP_ENCRYPT_INFO :encrypt_info (conn, data, len);break ; -case BT_L2CAP_SMP_MASTER_IDENT : -master_ident (conn, data, len); +case BT_L2CAP_SMP_CENTRAL_IDENT : +central_ident (conn, data, len);break ;case BT_L2CAP_SMP_IDENT_ADDR_INFO :ident_addr_info (conn, data, len);
monitor/bt.h +2 -2
@@ -4026,8 +4026,8 @@ struct bt_l2cap_smp_encrypt_info {uint8_t ltk[16 ]; } __attribute__ ((packed)); -#define BT_L2CAP_SMP_MASTER_IDENT 0x07 -struct bt_l2cap_smp_master_ident { +#define BT_L2CAP_SMP_CENTRAL_IDENT 0x07 +struct bt_l2cap_smp_central_ident {uint16_t ediv;uint64_t rand; } __attribute__ ((packed));
monitor/l2cap.c +4 -4
@@ -3017,9 +3017,9 @@ static void smp_encrypt_info(const struct l2cap_frame *frame)print_hex_field ("Long term key" , pdu->ltk,16 ); } -static void smp_master_ident (const struct l2cap_frame *frame) +static void smp_central_ident (const struct l2cap_frame *frame) { -const struct bt_l2cap_smp_master_ident *pdu = frame->data; +const struct bt_l2cap_smp_central_ident *pdu = frame->data;print_field ("EDIV: 0x%4.4x" ,le16_to_cpu (pdu->ediv));print_field ("Rand: 0x%16.16" PRIx64,le64_to_cpu (pdu->rand));
@@ -3123,8 +3123,8 @@ static const struct smp_opcode_data smp_opcode_table[] = { smp_pairing_failed, 1, true }, {0x06 ,"Encryption Information" , smp_encrypt_info, 16, true }, - { 0x07, "Master Identification", - smp_master_ident, 10, true }, + { 0x07, "Central Identification", + smp_central_ident, 10, true }, { 0x08, "Identity Information", smp_ident_info, 16, true }, { 0x09, "Identity Address Information",
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 14/62 monitor: Inclusive language in LE states
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are preferred, as reflected in the BT core spec 5.3.
---
monitor/packet.c | 110 +++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 55 deletions(-)
monitor/packet.c +55 -55
@@ -2722,11 +2722,11 @@ void packet_print_features_msft(const uint8_t *features)#define LE_STATE_ACTIVE_SCAN 0x0020#define LE_STATE_PASSIVE_SCAN 0x0040#define LE_STATE_INITIATING 0x0080 -#define LE_STATE_CONN_MASTER 0x0100 -#define LE_STATE_CONN_SLAVE 0x0200 -#define LE_STATE_MASTER_MASTER 0x0400 -#define LE_STATE_SLAVE_SLAVE 0x0800 -#define LE_STATE_MASTER_SLAVE 0x1000 +#define LE_STATE_CONN_CENTRAL 0x0100 +#define LE_STATE_CONN_PERIPHERAL 0x0200 +#define LE_STATE_CENTRAL_CENTRAL 0x0400 +#define LE_STATE_PERIPHERAL_PERIPHERAL 0x0800 +#define LE_STATE_CENTRAL_PERIPHERAL 0x1000static const struct bitfield_data le_states_desc_table[] = { {0 ,"Scannable Advertising State" },
@@ -2749,59 +2749,59 @@ static const struct {uint8_t bit;uint16_t states; } le_states_comb_table[] = { - { 0, LE_STATE_NONCONN_ADV }, - { 1, LE_STATE_SCAN_ADV }, - { 2, LE_STATE_CONN_ADV }, - { 3, LE_STATE_HIGH_DIRECT_ADV }, - { 4, LE_STATE_PASSIVE_SCAN }, - { 5, LE_STATE_ACTIVE_SCAN }, - { 6, LE_STATE_INITIATING | LE_STATE_CONN_MASTER }, - { 7, LE_STATE_CONN_SLAVE }, - { 8, LE_STATE_PASSIVE_SCAN | LE_STATE_NONCONN_ADV }, - { 9, LE_STATE_PASSIVE_SCAN | LE_STATE_SCAN_ADV }, - { 10, LE_STATE_PASSIVE_SCAN | LE_STATE_CONN_ADV }, - { 11, LE_STATE_PASSIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, - { 12, LE_STATE_ACTIVE_SCAN | LE_STATE_NONCONN_ADV }, - { 13, LE_STATE_ACTIVE_SCAN | LE_STATE_SCAN_ADV }, - { 14, LE_STATE_ACTIVE_SCAN | LE_STATE_CONN_ADV }, - { 15, LE_STATE_ACTIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, - { 16, LE_STATE_INITIATING | LE_STATE_NONCONN_ADV }, - { 17, LE_STATE_INITIATING | LE_STATE_SCAN_ADV }, - { 18, LE_STATE_CONN_MASTER | LE_STATE_NONCONN_ADV }, - { 19, LE_STATE_CONN_MASTER | LE_STATE_SCAN_ADV }, - { 20, LE_STATE_CONN_SLAVE | LE_STATE_NONCONN_ADV }, - { 21, LE_STATE_CONN_SLAVE | LE_STATE_SCAN_ADV }, - { 22, LE_STATE_INITIATING | LE_STATE_PASSIVE_SCAN }, - { 23, LE_STATE_INITIATING | LE_STATE_ACTIVE_SCAN }, - { 24, LE_STATE_CONN_MASTER | LE_STATE_PASSIVE_SCAN }, - { 25, LE_STATE_CONN_MASTER | LE_STATE_ACTIVE_SCAN }, - { 26, LE_STATE_CONN_SLAVE | LE_STATE_PASSIVE_SCAN }, - { 27, LE_STATE_CONN_SLAVE | LE_STATE_ACTIVE_SCAN }, - { 28, LE_STATE_INITIATING | LE_STATE_CONN_MASTER | - LE_STATE_MASTER_MASTER }, - { 29, LE_STATE_LOW_DIRECT_ADV }, - { 30, LE_STATE_LOW_DIRECT_ADV | LE_STATE_PASSIVE_SCAN }, - { 31, LE_STATE_LOW_DIRECT_ADV | LE_STATE_ACTIVE_SCAN }, + { 0, LE_STATE_NONCONN_ADV }, + { 1, LE_STATE_SCAN_ADV }, + { 2, LE_STATE_CONN_ADV }, + { 3, LE_STATE_HIGH_DIRECT_ADV }, + { 4, LE_STATE_PASSIVE_SCAN }, + { 5, LE_STATE_ACTIVE_SCAN }, + { 6, LE_STATE_INITIATING | LE_STATE_CONN_CENTRAL }, + { 7, LE_STATE_CONN_PERIPHERAL }, + { 8, LE_STATE_PASSIVE_SCAN | LE_STATE_NONCONN_ADV }, + { 9, LE_STATE_PASSIVE_SCAN | LE_STATE_SCAN_ADV }, + { 10, LE_STATE_PASSIVE_SCAN | LE_STATE_CONN_ADV }, + { 11, LE_STATE_PASSIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, + { 12, LE_STATE_ACTIVE_SCAN | LE_STATE_NONCONN_ADV }, + { 13, LE_STATE_ACTIVE_SCAN | LE_STATE_SCAN_ADV }, + { 14, LE_STATE_ACTIVE_SCAN | LE_STATE_CONN_ADV }, + { 15, LE_STATE_ACTIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, + { 16, LE_STATE_INITIATING | LE_STATE_NONCONN_ADV }, + { 17, LE_STATE_INITIATING | LE_STATE_SCAN_ADV }, + { 18, LE_STATE_CONN_CENTRAL | LE_STATE_NONCONN_ADV }, + { 19, LE_STATE_CONN_CENTRAL | LE_STATE_SCAN_ADV }, + { 20, LE_STATE_CONN_PERIPHERAL | LE_STATE_NONCONN_ADV }, + { 21, LE_STATE_CONN_PERIPHERAL | LE_STATE_SCAN_ADV }, + { 22, LE_STATE_INITIATING | LE_STATE_PASSIVE_SCAN }, + { 23, LE_STATE_INITIATING | LE_STATE_ACTIVE_SCAN }, + { 24, LE_STATE_CONN_CENTRAL | LE_STATE_PASSIVE_SCAN }, + { 25, LE_STATE_CONN_CENTRAL | LE_STATE_ACTIVE_SCAN }, + { 26, LE_STATE_CONN_PERIPHERAL | LE_STATE_PASSIVE_SCAN }, + { 27, LE_STATE_CONN_PERIPHERAL | LE_STATE_ACTIVE_SCAN }, + { 28, LE_STATE_INITIATING | LE_STATE_CONN_CENTRAL | + LE_STATE_CENTRAL_CENTRAL }, + { 29, LE_STATE_LOW_DIRECT_ADV }, + { 30, LE_STATE_LOW_DIRECT_ADV | LE_STATE_PASSIVE_SCAN }, + { 31, LE_STATE_LOW_DIRECT_ADV | LE_STATE_ACTIVE_SCAN }, { 32, LE_STATE_INITIATING | LE_STATE_CONN_ADV | - LE_STATE_MASTER_SLAVE }, + LE_STATE_CENTRAL_PERIPHERAL }, { 33, LE_STATE_INITIATING | LE_STATE_HIGH_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, + LE_STATE_CENTRAL_PERIPHERAL }, { 34, LE_STATE_INITIATING | LE_STATE_LOW_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, - { 35, LE_STATE_CONN_MASTER | LE_STATE_CONN_ADV | - LE_STATE_MASTER_SLAVE }, - { 36, LE_STATE_CONN_MASTER | LE_STATE_HIGH_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, - { 37, LE_STATE_CONN_MASTER | LE_STATE_LOW_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, - { 38, LE_STATE_CONN_SLAVE | LE_STATE_CONN_ADV | - LE_STATE_MASTER_SLAVE }, - { 39, LE_STATE_CONN_SLAVE | LE_STATE_HIGH_DIRECT_ADV | - LE_STATE_SLAVE_SLAVE }, - { 40, LE_STATE_CONN_SLAVE | LE_STATE_LOW_DIRECT_ADV | - LE_STATE_SLAVE_SLAVE }, - { 41, LE_STATE_INITIATING | LE_STATE_CONN_SLAVE | - LE_STATE_MASTER_SLAVE }, + LE_STATE_CENTRAL_PERIPHERAL }, + { 35, LE_STATE_CONN_CENTRAL | LE_STATE_CONN_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 36, LE_STATE_CONN_CENTRAL | LE_STATE_HIGH_DIRECT_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 37, LE_STATE_CONN_CENTRAL | LE_STATE_LOW_DIRECT_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 38, LE_STATE_CONN_PERIPHERAL | LE_STATE_CONN_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 39, LE_STATE_CONN_PERIPHERAL | LE_STATE_HIGH_DIRECT_ADV | + LE_STATE_PERIPHERAL_PERIPHERAL }, + { 40, LE_STATE_CONN_PERIPHERAL | LE_STATE_LOW_DIRECT_ADV | + LE_STATE_PERIPHERAL_PERIPHERAL }, + { 41, LE_STATE_INITIATING | LE_STATE_CONN_PERIPHERAL | + LE_STATE_CENTRAL_PERIPHERAL }, { } };
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 15/62 monitor: Inclusive language in LL feature
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"peripheral" is preferred, as reflected in the BT core spec 5.3.
---
monitor/bt.h | 4 ++-- monitor/ll.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
monitor/bt.h +2 -2
@@ -88,8 +88,8 @@ struct bt_ll_reject_ind {uint8_t error; } __attribute__ ((packed)); -#define BT_LL_SLAVE_FEATURE_REQ 0x0e -struct bt_ll_slave_feature_req { +#define BT_LL_PERIPHERAL_FEATURE_REQ 0x0e +struct bt_ll_peripheral_feature_req {uint8_t features[8 ]; } __attribute__ ((packed));
monitor/ll.c +3 -3
@@ -449,9 +449,9 @@ static void reject_ind(const void *data, uint8_t size)packet_print_error ("Error code" , pdu->error); } -static void slave_feature_req (const void *data,uint8_t size) +static void peripheral_feature_req (const void *data,uint8_t size) { -const struct bt_ll_slave_feature_req *pdu = data; +const struct bt_ll_peripheral_feature_req *pdu = data;packet_print_features_ll (pdu->features); }
@@ -702,7 +702,7 @@ static const struct llcp_data llcp_table[] = { { 0x0b, "LL_PAUSE_ENC_RSP", null_pdu, 0, true }, { 0x0c, "LL_VERSION_IND", version_ind, 5, true }, { 0x0d, "LL_REJECT_IND", reject_ind, 1, true }, - { 0x0e, "LL_SLAVE_FEATURE_REQ", slave_feature_req, 8, true }, + { 0x0e, "LL_PERIPHERAL_FEATURE_REQ", peripheral_feature_req, 8, true }, { 0x0f, "LL_CONNECTION_PARAM_REQ", NULL, 23, true }, { 0x10, "LL_CONNECTION_PARAM_RSP", NULL, 23, true }, { 0x11, "LL_REJECT_IND_EXT", reject_ind_ext, 2, true },
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 16/62 monitor: Inclusive language in link key transaction
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"link key" or "temporary link key" are preferred, as reflected in the BT core spec 5.3.
---
monitor/bt.h | 8 ++++---- monitor/packet.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-)
monitor/bt.h +4 -4
@@ -628,8 +628,8 @@ struct bt_hci_cmd_change_conn_link_key {uint16_t handle; } __attribute__ ((packed)); -#define BT_HCI_CMD_MASTER_LINK_KEY 0x0417 -struct bt_hci_cmd_master_link_key { +#define BT_HCI_CMD_LINK_KEY_SELECTION 0x0417 +struct bt_hci_cmd_link_key_selection {uint8_t key_flag; } __attribute__ ((packed));
@@ -2931,8 +2931,8 @@ struct bt_hci_evt_change_conn_link_key_complete {uint16_t handle; } __attribute__ ((packed)); -#define BT_HCI_EVT_MASTER_LINK_KEY_COMPLETE 0x0a -struct bt_hci_evt_master_link_key_complete { +#define BT_HCI_EVT_LINK_KEY_TYPE_CHANGED 0x0a +struct bt_hci_evt_link_key_type_changed {uint8_t status;uint16_t handle;uint8_t key_flag;
monitor/packet.c +9 -9
@@ -2901,7 +2901,7 @@ static const struct bitfield_data events_table[] = { { 6, "Remote Name Request Complete" }, { 7, "Encryption Change" }, { 8, "Change Connection Link Key Complete" }, - { 9, "Master Link Key Complete" }, + { 9, "Link Key Type Changed" }, { 10, "Read Remote Supported Features Complete" }, { 11, "Read Remote Version Information Complete" }, { 12, "QoS Setup Complete" },
@@ -4253,9 +4253,9 @@ static void change_conn_link_key_cmd(const void *data, uint8_t size)print_handle (cmd->handle); } -static void master_link_key_cmd (const void *data,uint8_t size) +static void link_key_selection_cmd (const void *data,uint8_t size) { -const struct bt_hci_cmd_master_link_key *cmd = data; +const struct bt_hci_cmd_link_key_selection *cmd = data;print_key_flag (cmd->key_flag); }
@@ -8416,8 +8416,8 @@ static const struct opcode_data opcode_table[] = { set_conn_encrypt_cmd, 3, true }, {0x0415 ,17 ,"Change Connection Link Key" , change_conn_link_key_cmd, 2, true }, - { 0x0417, 18, "Master Link Key", - master_link_key_cmd, 1, true }, + { 0x0417, 18, "Temporary Link Key", + link_key_selection_cmd, 1, true }, { 0x0419, 19, "Remote Name Request", remote_name_request_cmd, 10, true }, { 0x041a, 20, "Remote Name Request Cancel",
@@ -9493,9 +9493,9 @@ static void change_conn_link_key_complete_evt(const void *data, uint8_t size)print_handle (evt->handle); } -static void master_link_key_complete_evt (const void *data,uint8_t size) +static void link_key_type_changed_evt (const void *data,uint8_t size) { -const struct bt_hci_evt_master_link_key_complete *evt = data; +const struct bt_hci_evt_link_key_type_changed *evt = data;print_status (evt->status);print_handle (evt->handle);
@@ -11073,8 +11073,8 @@ static const struct event_data event_table[] = { encrypt_change_evt, 4, true }, {0x09 ,"Change Connection Link Key Complete" , change_conn_link_key_complete_evt, 3, true }, - { 0x0a, "Master Link Key Complete", - master_link_key_complete_evt, 4, true }, + { 0x0a, "Link Key Type Changed", + link_key_type_changed_evt, 4, true }, { 0x0b, "Read Remote Supported Features", remote_features_complete_evt, 11, true }, { 0x0c, "Read Remote Version Complete",
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 17/62 monitor: Inclusive language in peripheral broadcast
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"peripheral" is preferred, as reflected in the BT core spec 5.3.
---
monitor/bt.h | 30 +++++++-------- monitor/packet.c | 95 ++++++++++++++++++++++++------------------------ tools/3dsp.c | 31 ++++++++-------- 3 files changed, 79 insertions(+), 77 deletions(-)
monitor/bt.h +15 -15
@@ -898,8 +898,8 @@ struct bt_hci_cmd_truncated_page_cancel {uint8_t bdaddr[6 ]; } __attribute__ ((packed)); -#define BT_HCI_CMD_SET_SLAVE_BROADCAST 0x0441 -struct bt_hci_cmd_set_slave_broadcast { +#define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST 0x0441 +struct bt_hci_cmd_set_peripheral_broadcast {uint8_t enable;uint8_t lt_addr;uint8_t lpo_allowed;
@@ -908,14 +908,14 @@ struct bt_hci_cmd_set_slave_broadcast {uint16_t max_interval;uint16_t timeout; } __attribute__ ((packed)); -struct bt_hci_rsp_set_slave_broadcast { +struct bt_hci_rsp_set_peripheral_broadcast {uint8_t status;uint8_t lt_addr;uint16_t interval; } __attribute__ ((packed)); -#define BT_HCI_CMD_SET_SLAVE_BROADCAST_RECEIVE 0x0442 -struct bt_hci_cmd_set_slave_broadcast_receive { +#define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE 0x0442 +struct bt_hci_cmd_set_peripheral_broadcast_receive {uint8_t enable;uint8_t bdaddr[6 ];uint8_t lt_addr;
@@ -928,7 +928,7 @@ struct bt_hci_cmd_set_slave_broadcast_receive {uint16_t pkt_type;uint8_t map[10 ]; } __attribute__ ((packed)); -struct bt_hci_rsp_set_slave_broadcast_receive { +struct bt_hci_rsp_set_peripheral_broadcast_receive {uint8_t status;uint8_t bdaddr[6 ];uint8_t lt_addr;
@@ -1599,13 +1599,13 @@ struct bt_hci_rsp_delete_reserved_lt_addr {uint8_t lt_addr; } __attribute__ ((packed)); -#define BT_HCI_CMD_SET_SLAVE_BROADCAST_DATA 0x0c76 -struct bt_hci_cmd_set_slave_broadcast_data { +#define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_DATA 0x0c76 +struct bt_hci_cmd_set_peripheral_broadcast_data {uint8_t lt_addr;uint8_t fragment;uint8_t length; } __attribute__ ((packed)); -struct bt_hci_rsp_set_slave_broadcast_data { +struct bt_hci_rsp_set_peripheral_broadcast_data {uint8_t status;uint8_t lt_addr; } __attribute__ ((packed));
@@ -3325,8 +3325,8 @@ struct bt_hci_evt_sync_train_received {uint8_t service_data; } __attribute__ ((packed)); -#define BT_HCI_EVT_SLAVE_BROADCAST_RECEIVE 0x51 -struct bt_hci_evt_slave_broadcast_receive { +#define BT_HCI_EVT_PERIPHERAL_BROADCAST_RECEIVE 0x51 +struct bt_hci_evt_peripheral_broadcast_receive {uint8_t bdaddr[6 ];uint8_t lt_addr;uint32_t clock;
@@ -3336,8 +3336,8 @@ struct bt_hci_evt_slave_broadcast_receive {uint8_t length; } __attribute__ ((packed)); -#define BT_HCI_EVT_SLAVE_BROADCAST_TIMEOUT 0x52 -struct bt_hci_evt_slave_broadcast_timeout { +#define BT_HCI_EVT_PERIPHERAL_BROADCAST_TIMEOUT 0x52 +struct bt_hci_evt_peripheral_broadcast_timeout {uint8_t bdaddr[6 ];uint8_t lt_addr; } __attribute__ ((packed));
@@ -3350,8 +3350,8 @@ struct bt_hci_evt_truncated_page_complete {#define BT_HCI_EVT_SLAVE_PAGE_RESPONSE_TIMEOUT 0x54 -#define BT_HCI_EVT_SLAVE_BROADCAST_CHANNEL_MAP_CHANGE 0x55 -struct bt_hci_evt_slave_broadcast_channel_map_change { +#define BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE 0x55 +struct bt_hci_evt_peripheral_broadcast_channel_map_change {uint8_t map[10 ]; } __attribute__ ((packed));
monitor/packet.c +48 -47
194 lines not on this page · raw message
tools/3dsp.c +16 -15
@@ -122,7 +122,7 @@ static void sync_train_received(const void *data, uint8_t size, void *user_data) {const struct bt_hci_evt_sync_train_received *evt = data; -struct bt_hci_cmd_set_slave_broadcast_receive cmd; +struct bt_hci_cmd_set_peripheral_broadcast_receive cmd;if (evt->status) {printf ("Failed to synchronize with 3D display\n" );
@@ -147,7 +147,7 @@ static void sync_train_received(const void *data, uint8_t size, cmd.pkt_type =cpu_to_le16 (PKT_TYPE );memcpy (cmd.map, evt->map,10 ); -bt_hci_send (hci_dev,BT_HCI_CMD_SET_SLAVE_BROADCAST_RECEIVE , +bt_hci_send (hci_dev,BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE , &cmd,sizeof (cmd), set_slave_broadcast_receive,NULL ,NULL ); }
@@ -156,7 +156,7 @@ static void brcm_sync_train_received(const void *data, uint8_t size, void *user_data) {const struct brcm_evt_sync_train_received *evt = data; -struct bt_hci_cmd_set_slave_broadcast_receive cmd; +struct bt_hci_cmd_set_peripheral_broadcast_receive cmd;if (evt->status) {printf ("Failed to synchronize with 3D display\n" );
@@ -181,7 +181,7 @@ static void brcm_sync_train_received(const void *data, uint8_t size, cmd.pkt_type =cpu_to_le16 (PKT_TYPE );memcpy (cmd.map, evt->map,10 ); -bt_hci_send (hci_dev,BT_HCI_CMD_SET_SLAVE_BROADCAST_RECEIVE , +bt_hci_send (hci_dev,BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE , &cmd,sizeof (cmd), set_slave_broadcast_receive,NULL ,NULL ); }
@@ -212,7 +212,7 @@ static void truncated_page_complete(const void *data, uint8_t size,static void slave_broadcast_timeout (const void *data,uint8_t size,void *user_data) { -const struct bt_hci_evt_slave_broadcast_timeout *evt = data; +const struct bt_hci_evt_peripheral_broadcast_timeout *evt = data;struct bt_hci_cmd_receive_sync_train cmd;printf ("Re-synchronizing with 3D display\n" );
@@ -229,7 +229,7 @@ static void slave_broadcast_timeout(const void *data, uint8_t size,static void slave_broadcast_receive (const void *data,uint8_t size,void *user_data) { -const struct bt_hci_evt_slave_broadcast_receive *evt = data; +const struct bt_hci_evt_peripheral_broadcast_receive *evt = data;struct bt_hci_cmd_read_clock cmd;if (evt->status !=0x00 )
@@ -326,9 +326,9 @@ static void start_glasses(void)bt_hci_register (hci_dev,BT_HCI_EVT_TRUNCATED_PAGE_COMPLETE , truncated_page_complete,NULL ,NULL ); -bt_hci_register (hci_dev,BT_HCI_EVT_SLAVE_BROADCAST_TIMEOUT , +bt_hci_register (hci_dev,BT_HCI_EVT_PERIPHERAL_BROADCAST_TIMEOUT , slave_broadcast_timeout,NULL ,NULL ); -bt_hci_register (hci_dev,BT_HCI_EVT_SLAVE_BROADCAST_RECEIVE , +bt_hci_register (hci_dev,BT_HCI_EVT_PERIPHERAL_BROADCAST_RECEIVE , slave_broadcast_receive,NULL ,NULL );start_inquiry ();
@@ -443,13 +443,13 @@ static void read_clock(const void *data, uint8_t size, void *user_data) msg.frame_sync_period_fraction =0 ;memcpy (bcastdata +3 , &msg,sizeof (msg)); -bt_hci_send (hci_dev,BT_HCI_CMD_SET_SLAVE_BROADCAST_DATA , +bt_hci_send (hci_dev,BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_DATA , bcastdata,sizeof (bcastdata),NULL ,NULL ,NULL ); }static void set_slave_broadcast (const void *data,uint8_t size,void *user_data) { -const struct bt_hci_rsp_set_slave_broadcast *rsp = data; +const struct bt_hci_rsp_set_peripheral_broadcast *rsp = data;struct bt_hci_cmd_read_clock cmd;if (rsp->status) {
@@ -467,7 +467,7 @@ static void set_slave_broadcast(const void *data, uint8_t size, void *user_data)static void start_display (void ) { -struct bt_hci_cmd_set_slave_broadcast cmd; +struct bt_hci_cmd_set_peripheral_broadcast cmd;uint8_t evtmask1[] = {0x1c ,0xe0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 };uint8_t evtmask2[] = {0x00 ,0xc0 ,0x74 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 };uint8_t sspmode =0x01 ;
@@ -494,8 +494,9 @@ static void start_display(void)bt_hci_register (hci_dev,BT_HCI_EVT_SLAVE_PAGE_RESPONSE_TIMEOUT , slave_page_response_timeout,NULL ,NULL ); -bt_hci_register (hci_dev,BT_HCI_EVT_SLAVE_BROADCAST_CHANNEL_MAP_CHANGE , - slave_broadcast_channel_map_change,NULL ,NULL ); +bt_hci_register (hci_dev, +BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE , + slave_broadcast_channel_map_change,NULL ,NULL );bt_hci_register (hci_dev,BT_HCI_EVT_SYNC_TRAIN_COMPLETE , sync_train_complete,NULL ,NULL );
@@ -510,8 +511,8 @@ static void start_display(void) cmd.max_interval =cpu_to_le16 (0x00a0 );/* 100 ms */ cmd.timeout =cpu_to_le16 (0xfffe ); -bt_hci_send (hci_dev,BT_HCI_CMD_SET_SLAVE_BROADCAST , &cmd,sizeof (cmd), - set_slave_broadcast,NULL ,NULL ); +bt_hci_send (hci_dev,BT_HCI_CMD_SET_PERIPHERAL_BROADCAST , &cmd, +sizeof (cmd), set_slave_broadcast,NULL ,NULL ); }static void signal_callback (int signum,void *user_data)
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 18/62 monitor: Inclusive language in peripheral page response timeout
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"peripheral" is preferred, as reflected in the BT core spec 5.3.
---
monitor/bt.h | 2 +- monitor/packet.c | 8 ++++---- tools/3dsp.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
monitor/bt.h +1 -1
@@ -3348,7 +3348,7 @@ struct bt_hci_evt_truncated_page_complete {uint8_t bdaddr[6 ]; } __attribute__ ((packed)); -#define BT_HCI_EVT_SLAVE_PAGE_RESPONSE_TIMEOUT 0x54 +#define BT_HCI_EVT_PERIPHERAL_PAGE_RESPONSE_TIMEOUT 0x54#define BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE 0x55struct bt_hci_evt_peripheral_broadcast_channel_map_change {
monitor/packet.c +4 -4
@@ -2985,7 +2985,7 @@ static const struct bitfield_data events_page2_table[] = { { 17, "Connectionless Peripheral Broadcast Receive" }, { 18, "Connectionless Peripheral Broadcast Timeout" }, { 19, "Truncated Page Complete" }, - { 20, "Slave Page Response Timeout" }, + { 20, "Peripheral Page Response Timeout" }, { 21, "Connectionless Peripheral Broadcast Channel Map Change" }, { 22, "Inquiry Response Notification" }, { 23, "Authenticated Payload Timeout Expired" },
@@ -10238,7 +10238,7 @@ static void truncated_page_complete_evt(const void *data, uint8_t size)print_bdaddr (evt->bdaddr); } -static void slave_page_response_timeout_evt (const void *data,uint8_t size) +static void peripheral_page_response_timeout_evt (const void *data,uint8_t size) { }
@@ -11197,8 +11197,8 @@ static const struct event_data event_table[] = { peripheral_broadcast_timeout_evt, 7, true }, {0x53 ,"Truncated Page Complete" , truncated_page_complete_evt, 7, true }, - { 0x54, "Slave Page Response Timeout", - slave_page_response_timeout_evt, 0, true }, + { 0x54, "Peripheral Page Response Timeout", + peripheral_page_response_timeout_evt, 0, true }, { 0x55, "Connectionless Peripheral Broadcast Channel Map Change", peripheral_broadcast_channel_map_change_evt, 10, true }, { 0x56, "Inquiry Response Notification",
tools/3dsp.c +1 -1
@@ -492,7 +492,7 @@ static void start_display(void)bt_hci_register (hci_dev,BT_HCI_EVT_CONN_REQUEST , conn_request,NULL ,NULL ); -bt_hci_register (hci_dev,BT_HCI_EVT_SLAVE_PAGE_RESPONSE_TIMEOUT , +bt_hci_register (hci_dev,BT_HCI_EVT_PERIPHERAL_PAGE_RESPONSE_TIMEOUT , slave_page_response_timeout,NULL ,NULL ); bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE,
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 19/62 monitor: Inclusive language in consts and strings
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are preferred, as reflected in the BT core spec 5.3.
---
monitor/broadcom.c | 8 ++-- monitor/control.c | 10 ++-- monitor/l2cap.c | 2 +- monitor/ll.c | 42 +++++++++-------- monitor/lmp.c | 2 +- monitor/packet.c | 114 +++++++++++++++++++++++---------------------- 6 files changed, 93 insertions(+), 85 deletions(-)
monitor/broadcom.c +4 -4
@@ -120,10 +120,10 @@ static void print_sync_mode(uint8_t mode)switch (mode) {case 0x00 : - str ="Slave" ; + str ="Peripheral" ;break ;case 0x01 : - str ="Master" ; + str ="Central" ;break ;default : str ="Reserved" ;
@@ -139,10 +139,10 @@ static void print_clock_mode(uint8_t mode)switch (mode) {case 0x00 : - str ="Slave" ; + str ="Peripheral" ;break ;case 0x01 : - str ="Master" ; + str ="Central" ;break ;default : str ="Reserved" ;
monitor/control.c +5 -5
@@ -305,19 +305,19 @@ static void mgmt_new_long_term_key(uint16_t len, const void *buf)return ; } -/* LE SC keys are both for master and slave */ +/* LE SC keys are both for central and peripheral */ switch (ev->key.type) {case 0x00 :if (ev->key.central) - type ="Master (Unauthenticated)" ; + type ="Central (Unauthenticated)" ;else - type ="Slave (Unauthenticated)" ; + type ="Peripheral (Unauthenticated)" ;break ;case 0x01 :if (ev->key.central) - type ="Master (Authenticated)" ; + type ="Central (Authenticated)" ;else - type ="Slave (Authenticated)" ; + type ="Peripheral (Authenticated)" ;break ;case 0x02 : type ="SC (Unauthenticated)" ;
monitor/l2cap.c +1 -1
@@ -1280,7 +1280,7 @@ static void sig_conn_param_req(const struct l2cap_frame *frame)print_field ("Min interval: %d" ,le16_to_cpu (pdu->min_interval));print_field ("Max interval: %d" ,le16_to_cpu (pdu->max_interval)); -print_field ("Slave latency: %d" ,le16_to_cpu (pdu->latency)); +print_field ("Peripheral latency: %d" ,le16_to_cpu (pdu->latency));print_field ("Timeout multiplier: %d" ,le16_to_cpu (pdu->timeout)); }
monitor/ll.c +23 -19
106 lines not on this page · raw message
monitor/lmp.c +1 -1
@@ -839,7 +839,7 @@ void lmp_packet(const void *data, uint8_t size, bool padded) tid = ((const uint8_t *) data)[0 ] &0x01 ; opcode = (((const uint8_t *) data)[0 ] &0xfe ) >>1 ; - tid_str = tid ==0x00 ?"Master" :"Slave" ; + tid_str = tid ==0x00 ?"Central" :"Peripheral" ;switch (opcode) {case 127 :
monitor/packet.c +59 -55
238 lines not on this page · raw message
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 20/62 monitor: Inclusive language in filtering devices
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"accept list" is preferred, as reflected in the BT core spec 5.3.
---
emulator/btdev.c | 24 +++++++++++------------ emulator/le.c | 32 +++++++++++++++---------------- monitor/bt.h | 14 +++++++------- monitor/packet.c | 46 ++++++++++++++++++++++----------------------- tools/hci-tester.c | 4 ++-- tools/mgmt-tester.c | 4 ++-- 6 files changed, 62 insertions(+), 62 deletions(-)
emulator/btdev.c +12 -12
@@ -3492,11 +3492,11 @@ static int cmd_le_create_conn_complete(struct btdev *dev, const void *data,static int cmd_read_wl_size (struct btdev *dev,const void *data,uint8_t len) { -struct bt_hci_rsp_le_read_white_list_size rsp; +struct bt_hci_rsp_le_read_accept_list_size rsp; rsp.status =BT_HCI_ERR_SUCCESS ; rsp.size =WL_SIZE ; -cmd_complete (dev,BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE , &rsp, +cmd_complete (dev,BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE , &rsp,sizeof (rsp));return 0 ;
@@ -3544,7 +3544,7 @@ static int cmd_wl_clear(struct btdev *dev, const void *data, uint8_t len)wl_clear (dev); status =BT_HCI_ERR_SUCCESS ; -cmd_complete (dev,BT_HCI_CMD_LE_CLEAR_WHITE_LIST , &status, +cmd_complete (dev,BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST , &status,sizeof (status));return 0 ;
@@ -3561,7 +3561,7 @@ static void wl_add(struct btdev_wl *wl, uint8_t type, bdaddr_t *addr)static int cmd_add_wl (struct btdev *dev,const void *data,uint8_t len) { -const struct bt_hci_cmd_le_add_to_white_list *cmd = data; +const struct bt_hci_cmd_le_add_to_accept_list *cmd = data;uint8_t status;bool exists = false;int i, pos =-1 ;
@@ -3597,14 +3597,14 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len)if (pos <0 ) {cmd_status (dev,BT_HCI_ERR_MEM_CAPACITY_EXCEEDED , -BT_HCI_CMD_LE_ADD_TO_WHITE_LIST ); +BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST );return 0 ; }wl_add (&dev->le_wl[pos], cmd->addr_type, (bdaddr_t *)&cmd->addr); status =BT_HCI_ERR_SUCCESS ; -cmd_complete (dev,BT_HCI_CMD_LE_ADD_TO_WHITE_LIST , +cmd_complete (dev,BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST , &status,sizeof (status));return 0 ;
@@ -3612,7 +3612,7 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len)static int cmd_remove_wl (struct btdev *dev,const void *data,uint8_t len) { -const struct bt_hci_cmd_le_remove_from_white_list *cmd = data; +const struct bt_hci_cmd_le_remove_from_accept_list *cmd = data;uint8_t status;int i;char addr[18 ];
@@ -3652,7 +3652,7 @@ static int cmd_remove_wl(struct btdev *dev, const void *data, uint8_t len)return -EINVAL ; status =BT_HCI_ERR_SUCCESS ; -cmd_complete (dev,BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST , +cmd_complete (dev,BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST , &status,sizeof (status));return 0 ;
@@ -4237,10 +4237,10 @@ static int cmd_gen_dhkey(struct btdev *dev, const void *data, uint8_t len) cmd_set_scan_enable_complete), \CMD (BT_HCI_CMD_LE_CREATE_CONN , cmd_le_create_conn, \ cmd_le_create_conn_complete), \ -CMD (BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE , cmd_read_wl_size,NULL ), \ -CMD (BT_HCI_CMD_LE_CLEAR_WHITE_LIST , cmd_wl_clear,NULL ), \ -CMD (BT_HCI_CMD_LE_ADD_TO_WHITE_LIST , cmd_add_wl,NULL ), \ -CMD (BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST , cmd_remove_wl,NULL ), \ +CMD (BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE , cmd_read_wl_size,NULL ), \ +CMD (BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST , cmd_wl_clear,NULL ), \ +CMD (BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST , cmd_add_wl,NULL ), \ +CMD (BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST , cmd_remove_wl,NULL ), \CMD (BT_HCI_CMD_LE_CONN_UPDATE , cmd_conn_update, \ cmd_conn_update_complete), \ CMD(BT_HCI_CMD_LE_READ_REMOTE_FEATURES, cmd_le_read_remote_features, \
emulator/le.c +16 -16
@@ -1211,12 +1211,12 @@ static void cmd_le_create_conn_cancel(struct bt_le *hci,static void cmd_le_read_white_list_size (struct bt_le *hci,const void *data,uint8_t size) { -struct bt_hci_rsp_le_read_white_list_size rsp; +struct bt_hci_rsp_le_read_accept_list_size rsp; rsp.status =BT_HCI_ERR_SUCCESS ; rsp.size = hci->le_white_list_size; -cmd_complete (hci,BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE , +cmd_complete (hci,BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE , &rsp,sizeof (rsp)); }
@@ -1228,14 +1228,14 @@ static void cmd_le_clear_white_list(struct bt_le *hci,clear_white_list (hci); status =BT_HCI_ERR_SUCCESS ; -cmd_complete (hci,BT_HCI_CMD_LE_CLEAR_WHITE_LIST , +cmd_complete (hci,BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST , &status,sizeof (status)); }static void cmd_le_add_to_white_list (struct bt_le *hci,const void *data,uint8_t size) { -const struct bt_hci_cmd_le_add_to_white_list *cmd = data; +const struct bt_hci_cmd_le_add_to_accept_list *cmd = data;uint8_t status;bool exists = false;int i, pos =-1 ;
@@ -1243,7 +1243,7 @@ static void cmd_le_add_to_white_list(struct bt_le *hci,/* Valid range for address type is 0x00 to 0x01 */ if (cmd->addr_type >0x01 ) {cmd_status (hci,BT_HCI_ERR_INVALID_PARAMETERS , -BT_HCI_CMD_LE_ADD_TO_WHITE_LIST ); +BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST );return ; }
@@ -1259,13 +1259,13 @@ static void cmd_le_add_to_white_list(struct bt_le *hci,if (exists) {cmd_status (hci,BT_HCI_ERR_UNSPECIFIED_ERROR , -BT_HCI_CMD_LE_ADD_TO_WHITE_LIST ); +BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST );return ; }if (pos <0 ) {cmd_status (hci,BT_HCI_ERR_MEM_CAPACITY_EXCEEDED , -BT_HCI_CMD_LE_ADD_TO_WHITE_LIST ); +BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST );return ; }
@@ -1273,21 +1273,21 @@ static void cmd_le_add_to_white_list(struct bt_le *hci,memcpy (&hci->le_white_list[pos][1 ], cmd->addr,6 ); status =BT_HCI_ERR_SUCCESS ; -cmd_complete (hci,BT_HCI_CMD_LE_ADD_TO_WHITE_LIST , +cmd_complete (hci,BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST , &status,sizeof (status)); }static void cmd_le_remove_from_white_list (struct bt_le *hci,const void *data,uint8_t size) { -const struct bt_hci_cmd_le_remove_from_white_list *cmd = data; +const struct bt_hci_cmd_le_remove_from_accept_list *cmd = data;uint8_t status;int i, pos =-1 ;/* Valid range for address type is 0x00 to 0x01 */ if (cmd->addr_type >0x01 ) {cmd_status (hci,BT_HCI_ERR_INVALID_PARAMETERS , -BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST ); +BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST );return ; }
@@ -1302,7 +1302,7 @@ static void cmd_le_remove_from_white_list(struct bt_le *hci,if (pos <0 ) {cmd_status (hci,BT_HCI_ERR_INVALID_PARAMETERS , -BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST ); +BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST );return ; }
@@ -1310,7 +1310,7 @@ static void cmd_le_remove_from_white_list(struct bt_le *hci,memset (&hci->le_white_list[pos][1 ],0 ,6 ); status =BT_HCI_ERR_SUCCESS ; -cmd_complete (hci,BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST , +cmd_complete (hci,BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST , &status,sizeof (status)); }
@@ -1830,13 +1830,13 @@ static const struct { cmd_le_create_conn, 25, true }, {BT_HCI_CMD_LE_CREATE_CONN_CANCEL , cmd_le_create_conn_cancel, 0, true }, - { BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE, + { BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE, cmd_le_read_white_list_size, 0, true }, - { BT_HCI_CMD_LE_CLEAR_WHITE_LIST, + { BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST, cmd_le_clear_white_list, 0, true }, - { BT_HCI_CMD_LE_ADD_TO_WHITE_LIST, + { BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, cmd_le_add_to_white_list, 7, true }, - { BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST, + { BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, cmd_le_remove_from_white_list, 7, true }, { BT_HCI_CMD_LE_ENCRYPT, cmd_le_encrypt, 32, true },
monitor/bt.h +7 -7
@@ -2072,22 +2072,22 @@ struct bt_hci_cmd_le_create_conn {#define BT_HCI_CMD_LE_CREATE_CONN_CANCEL 0x200e -#define BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE 0x200f -struct bt_hci_rsp_le_read_white_list_size { +#define BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE 0x200f +struct bt_hci_rsp_le_read_accept_list_size {uint8_t status;uint8_t size; } __attribute__ ((packed)); -#define BT_HCI_CMD_LE_CLEAR_WHITE_LIST 0x2010 +#define BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST 0x2010 -#define BT_HCI_CMD_LE_ADD_TO_WHITE_LIST 0x2011 -struct bt_hci_cmd_le_add_to_white_list { +#define BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST 0x2011 +struct bt_hci_cmd_le_add_to_accept_list {uint8_t addr_type;uint8_t addr[6 ]; } __attribute__ ((packed)); -#define BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST 0x2012 -struct bt_hci_cmd_le_remove_from_white_list { +#define BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST 0x2012 +struct bt_hci_cmd_le_remove_from_accept_list {uint8_t addr_type;uint8_t addr[6 ]; } __attribute__ ((packed));
monitor/packet.c +23 -23
114 lines not on this page · raw message
tools/hci-tester.c +2 -2
@@ -337,12 +337,12 @@ static void test_read_local_supported_codecs(const void *test_data)static void test_le_read_white_list_size (const void *test_data) { -test_command (BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE ); +test_command (BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE ); }static void test_le_clear_white_list (const void *test_data) { -test_command (BT_HCI_CMD_LE_CLEAR_WHITE_LIST ); +test_command (BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST ); } static void test_le_encrypt_complete(const void *data, uint8_t size,
tools/mgmt-tester.c +2 -2
@@ -4248,7 +4248,7 @@ static const struct generic_data add_device_success_6 = { .expect_alt_ev = MGMT_EV_DEVICE_ADDED, .expect_alt_ev_param = add_device_success_param_6, .expect_alt_ev_len = sizeof(add_device_success_param_6), - .expect_hci_command = BT_HCI_CMD_LE_ADD_TO_WHITE_LIST, + .expect_hci_command = BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, .expect_hci_param = le_add_to_white_list_param, .expect_hci_len = sizeof(le_add_to_white_list_param), };
@@ -4418,7 +4418,7 @@ static const struct generic_data remove_device_success_7 = { .expect_param = remove_device_param_2, .expect_len = sizeof(remove_device_param_2), .expect_status = MGMT_STATUS_SUCCESS, - .expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST, + .expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, .expect_hci_param = le_add_to_white_list_param, .expect_hci_len = sizeof(le_add_to_white_list_param), .expect_alt_ev = MGMT_EV_DEVICE_REMOVED,
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 21/62 emulator: Inclusive language in naming
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
android/tester-main.c | 2 +- emulator/hciemu.c | 21 +++++++++++---------- emulator/hciemu.h | 12 ++++++------ tools/l2cap-tester.c | 16 ++++++++-------- tools/mgmt-tester.c | 20 ++++++++++---------- tools/rfcomm-tester.c | 4 ++-- tools/sco-tester.c | 2 +- tools/smp-tester.c | 6 +++--- 8 files changed, 42 insertions(+), 41 deletions(-)
android/tester-main.c +1 -1
@@ -2786,7 +2786,7 @@ void emu_remote_connect_hci_action(void) struct step *step = g_new0(struct step, 1);const uint8_t *master_addr; - master_addr =hciemu_get_master_bdaddr (data->hciemu); + master_addr =hciemu_get_central_bdaddr (data->hciemu);tester_print ("Trying to connect hci" );
emulator/hciemu.c +11 -10
@@ -84,7 +84,7 @@ static void run_command_hook(void *data, void *user_data) run_data->len, hook->user_data); } -static void master_command_callback (uint16_t opcode, +static void central_command_callback (uint16_t opcode,const void *data,uint8_t len,btdev_callback callback,void *user_data) {
@@ -230,7 +230,7 @@ static bool create_vhci(struct hciemu *hciemu)if (!btdev)return false; -btdev_set_command_handler (btdev, master_command_callback, hciemu); +btdev_set_command_handler (btdev, central_command_callback, hciemu); fd =open ("/dev/vhci" ,O_RDWR |O_NONBLOCK |O_CLOEXEC );if (fd <0 ) {
@@ -462,7 +462,7 @@ static void bthost_debug(const char *str, void *user_data) "bthost: %s", str); } -static void btdev_master_debug (const char *str,void *user_data) +static void btdev_central_debug (const char *str,void *user_data) {struct hciemu *hciemu = user_data;
@@ -500,7 +500,7 @@ bool hciemu_set_debug(struct hciemu *hciemu, hciemu_debug_func_t callback, hciemu->debug_destroy = destroy; hciemu->debug_data = user_data; -btdev_set_debug (hciemu->dev, btdev_master_debug, hciemu,NULL ); +btdev_set_debug (hciemu->dev, btdev_central_debug, hciemu,NULL );queue_foreach (hciemu->clients, hciemu_client_set_debug, hciemu);
@@ -528,7 +528,7 @@ uint8_t *hciemu_get_features(struct hciemu *hciemu)return btdev_get_features (hciemu->dev); } -const uint8_t *hciemu_get_master_bdaddr (struct hciemu *hciemu) +const uint8_t *hciemu_get_central_bdaddr (struct hciemu *hciemu) {if (!hciemu || !hciemu->dev)return NULL ;
@@ -556,7 +556,7 @@ const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu)return hciemu_client_bdaddr (client); } -uint8_t hciemu_get_master_scan_enable (struct hciemu *hciemu) +uint8_t hciemu_get_central_scan_enable (struct hciemu *hciemu) {if (!hciemu || !hciemu->dev)return 0 ;
@@ -564,7 +564,7 @@ uint8_t hciemu_get_master_scan_enable(struct hciemu *hciemu)return btdev_get_scan_enable (hciemu->dev); } -uint8_t hciemu_get_master_le_scan_enable (struct hciemu *hciemu) +uint8_t hciemu_get_central_le_scan_enable (struct hciemu *hciemu) {if (!hciemu || !hciemu->dev)return 0 ;
@@ -572,7 +572,8 @@ uint8_t hciemu_get_master_le_scan_enable(struct hciemu *hciemu)return btdev_get_le_scan_enable (hciemu->dev); } -void hciemu_set_master_le_states (struct hciemu *hciemu,const uint8_t *le_states) +void hciemu_set_central_le_states (struct hciemu *hciemu, +const uint8_t *le_states) {if (!hciemu || !hciemu->dev)return ;
@@ -580,7 +581,7 @@ void hciemu_set_master_le_states(struct hciemu *hciemu, const uint8_t *le_statesbtdev_set_le_states (hciemu->dev, le_states); } -bool hciemu_add_master_post_command_hook (struct hciemu *hciemu, +bool hciemu_add_central_post_command_hook (struct hciemu *hciemu,hciemu_command_func_t function,void *user_data) {struct hciemu_command_hook *hook;
@@ -603,7 +604,7 @@ bool hciemu_add_master_post_command_hook(struct hciemu *hciemu,return true; } -bool hciemu_clear_master_post_command_hooks (struct hciemu *hciemu) +bool hciemu_clear_central_post_command_hooks (struct hciemu *hciemu) {if (!hciemu)return false;
emulator/hciemu.h +6 -6
@@ -50,14 +50,14 @@ struct bthost *hciemu_client_get_host(struct hciemu *hciemu);const char *hciemu_get_address (struct hciemu *hciemu);uint8_t *hciemu_get_features (struct hciemu *hciemu); -const uint8_t *hciemu_get_master_bdaddr (struct hciemu *hciemu); +const uint8_t *hciemu_get_central_bdaddr (struct hciemu *hciemu);const uint8_t *hciemu_get_client_bdaddr (struct hciemu *hciemu); -uint8_t hciemu_get_master_scan_enable (struct hciemu *hciemu); +uint8_t hciemu_get_central_scan_enable (struct hciemu *hciemu); -uint8_t hciemu_get_master_le_scan_enable (struct hciemu *hciemu); +uint8_t hciemu_get_central_le_scan_enable (struct hciemu *hciemu); -void hciemu_set_master_le_states (struct hciemu *hciemu, +void hciemu_set_central_le_states (struct hciemu *hciemu,const uint8_t *le_states); typedef void (*hciemu_command_func_t)(uint16_t opcode, const void *data,
@@ -66,10 +66,10 @@ typedef void (*hciemu_command_func_t)(uint16_t opcode, const void *data,typedef bool (*hciemu_hook_func_t )(const void *data,uint16_t len,void *user_data); -bool hciemu_add_master_post_command_hook (struct hciemu *hciemu, +bool hciemu_add_central_post_command_hook (struct hciemu *hciemu,hciemu_command_func_t function,void *user_data); -bool hciemu_clear_master_post_command_hooks (struct hciemu *hciemu); +bool hciemu_clear_central_post_command_hooks (struct hciemu *hciemu); int hciemu_add_hook(struct hciemu *hciemu, enum hciemu_hook_type type, uint16_t opcode, hciemu_hook_func_t function,
tools/l2cap-tester.c +8 -8
@@ -1116,7 +1116,7 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm,return err; } - master_bdaddr =hciemu_get_master_bdaddr (data->hciemu); + master_bdaddr =hciemu_get_central_bdaddr (data->hciemu);if (!master_bdaddr) {tester_warn ("No master bdaddr" );close (sk);
@@ -1301,7 +1301,7 @@ static void test_connect(const void *test_data) }if (l2data->direct_advertising) -hciemu_add_master_post_command_hook (data->hciemu, +hciemu_add_central_post_command_hook (data->hciemu, direct_adv_cmd_complete,NULL ); sk = create_l2cap_sock(data, 0, l2data->cid, l2data->sec_level,
@@ -1419,7 +1419,7 @@ static gboolean test_close_socket_1_part_3(gpointer arg)return FALSE; } -if (hciemu_get_master_le_scan_enable (data->hciemu)) { +if (hciemu_get_central_le_scan_enable (data->hciemu)) {tester_print ("Delayed check whether scann is off failed" );tester_test_failed ();return FALSE;
@@ -1440,7 +1440,7 @@ static gboolean test_close_socket_1_part_2(gpointer args)* was added to kernel whitelist, and scan was started. We * should be still scanning. */ -if (!hciemu_get_master_le_scan_enable (data->hciemu)) { +if (!hciemu_get_central_le_scan_enable (data->hciemu)) {tester_print ("Error - should be still scanning" );tester_test_failed ();return FALSE;
@@ -1467,7 +1467,7 @@ static gboolean test_close_socket_2_part_3(gpointer arg)int err;/* Scan should be already over, we're trying to create connection */ -if (hciemu_get_master_le_scan_enable (data->hciemu)) { +if (hciemu_get_central_le_scan_enable (data->hciemu)) {tester_print ("Error - should no longer scan" );tester_test_failed ();return FALSE;
@@ -1563,7 +1563,7 @@ static void test_close_socket(const void *test_data)const struct l2cap_data *l2data = data->test_data;const uint8_t *client_bdaddr; -hciemu_add_master_post_command_hook (data->hciemu, +hciemu_add_central_post_command_hook (data->hciemu, test_close_socket_router, data);if (l2data->client_bdaddr !=NULL )
@@ -1668,7 +1668,7 @@ static void test_connect_2(const void *test_data) test_2_connect_cb_cnt =0 ; test_scan_enable_counter =0 ; -hciemu_add_master_post_command_hook (data->hciemu, +hciemu_add_central_post_command_hook (data->hciemu, test_connect_2_router, data);if (l2data->server_psm) {
@@ -1869,7 +1869,7 @@ static void test_server(const void *test_data)tester_print ("Listening for connections" ); } - master_bdaddr =hciemu_get_master_bdaddr (data->hciemu); + master_bdaddr =hciemu_get_central_bdaddr (data->hciemu);if (!master_bdaddr) {tester_warn ("No master bdaddr" );tester_test_failed ();
tools/mgmt-tester.c +10 -10
@@ -365,7 +365,7 @@ static void read_index_list_callback(uint8_t status, uint16_t length,hciemu_set_debug (data->hciemu, print_debug,"hciemu: " ,NULL );if (test && test->setup_le_states) -hciemu_set_master_le_states (data->hciemu, test->le_states); +hciemu_set_central_le_states (data->hciemu, test->le_states); }static void test_pre_setup (const void *test_data)
@@ -7098,7 +7098,7 @@ static void command_setup_hci_callback(uint16_t opcode, const void *param,return ; } -hciemu_clear_master_post_command_hooks (data->hciemu); +hciemu_clear_central_post_command_hooks (data->hciemu);test_setup_condition_complete (data); }
@@ -7164,7 +7164,7 @@ static void setup_command_generic(const void *test_data)tester_print ("Registering setup expected HCI command callback" );tester_print ("Setup expected HCI command 0x%04x" , test->setup_expect_hci_command); -hciemu_add_master_post_command_hook (data->hciemu, +hciemu_add_central_post_command_hook (data->hciemu, command_setup_hci_callback, data);test_add_setup_condition (data); }
@@ -9487,7 +9487,7 @@ static void setup_ll_privacy_device(const void *test_data)tester_print ("Setup expected HCI command 0x%04x" , test->setup_expect_hci_command); -hciemu_add_master_post_command_hook (data->hciemu, +hciemu_add_central_post_command_hook (data->hciemu, command_setup_hci_callback, data);test_add_setup_condition (data);
@@ -9644,7 +9644,7 @@ static void test_command_generic(const void *test_data)if (test->expect_hci_command) {tester_print ("Registering HCI command callback" ); -hciemu_add_master_post_command_hook (data->hciemu, +hciemu_add_central_post_command_hook (data->hciemu, command_hci_callback, data);test_add_condition (data); }
@@ -9678,13 +9678,13 @@ static void check_scan(void *user_data) {struct test_data *data =tester_get_data (); -if (hciemu_get_master_le_scan_enable (data->hciemu)) { +if (hciemu_get_central_le_scan_enable (data->hciemu)) {tester_warn ("LE scan still enabled" );tester_test_failed ();return ; } -if (hciemu_get_master_scan_enable (data->hciemu)) { +if (hciemu_get_central_scan_enable (data->hciemu)) {tester_warn ("BR/EDR scan still enabled" );tester_test_failed ();return ;
@@ -9775,7 +9775,7 @@ static void test_pairing_acceptor(const void *test_data)test_add_condition (data); } - master_bdaddr =hciemu_get_master_bdaddr (data->hciemu); + master_bdaddr =hciemu_get_central_bdaddr (data->hciemu);if (!master_bdaddr) {tester_warn ("No master bdaddr" );tester_test_failed ();
@@ -9840,7 +9840,7 @@ static void test_command_generic_connect(const void *test_data) data->mgmt_alt_ev_id = id;test_add_condition (data); - master_bdaddr =hciemu_get_master_bdaddr (data->hciemu); + master_bdaddr =hciemu_get_central_bdaddr (data->hciemu);if (!master_bdaddr) {tester_warn ("No master bdaddr" );tester_test_failed ();
@@ -9919,7 +9919,7 @@ static void add_device_callback(uint8_t status, uint16_t len, const void *param,if (test->client_enable_adv)return ; - master_bdaddr =hciemu_get_master_bdaddr (data->hciemu); + master_bdaddr =hciemu_get_central_bdaddr (data->hciemu);if (!master_bdaddr) {tester_warn ("No master bdaddr" );tester_test_failed ();
tools/rfcomm-tester.c +2 -2
@@ -542,7 +542,7 @@ static void test_connect(const void *test_data)bthost_add_rfcomm_server (bthost, cli->server_channel, rfcomm_connect_cb,NULL ); - master_addr =hciemu_get_master_bdaddr (data->hciemu); + master_addr =hciemu_get_central_bdaddr (data->hciemu); client_addr =hciemu_get_client_bdaddr (data->hciemu); sk =create_rfcomm_sock ((bdaddr_t *) master_addr,0 );
@@ -680,7 +680,7 @@ static void test_server(const void *test_data)GIOChannel *io;int sk; - master_addr =hciemu_get_master_bdaddr (data->hciemu); + master_addr =hciemu_get_central_bdaddr (data->hciemu); sk =create_rfcomm_sock ((bdaddr_t *) master_addr, srv->server_channel);if (sk <0 ) {
tools/sco-tester.c +1 -1
@@ -426,7 +426,7 @@ static int create_sco_sock(struct test_data *data)return err; } - master_bdaddr =hciemu_get_master_bdaddr (data->hciemu); + master_bdaddr =hciemu_get_central_bdaddr (data->hciemu);if (!master_bdaddr) {tester_warn ("No master bdaddr" );return -ENODEV ;
tools/smp-tester.c +3 -3
@@ -767,7 +767,7 @@ static void init_bdaddr(struct test_data *data) {const uint8_t *master_bdaddr, *client_bdaddr; - master_bdaddr =hciemu_get_master_bdaddr (data->hciemu); + master_bdaddr =hciemu_get_central_bdaddr (data->hciemu);if (!master_bdaddr) {tester_warn ("No master bdaddr" );tester_test_failed ();
@@ -808,7 +808,7 @@ static void test_client(const void *test_data)if (smp->expect_hci_command) {tester_print ("Registering HCI command callback" ); -hciemu_add_master_post_command_hook (data->hciemu, +hciemu_add_central_post_command_hook (data->hciemu, command_hci_callback, data);test_add_condition (data); }
@@ -889,7 +889,7 @@ static void test_server(const void *test_data)if (smp->expect_hci_command) {tester_print ("Registering HCI command callback" ); -hciemu_add_master_post_command_hook (data->hciemu, +hciemu_add_central_post_command_hook (data->hciemu, command_hci_callback, data);test_add_condition (data); }
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 22/62 emulator: Inclusive language in strings
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are preferred, as reflected in the BT core spec 5.3.
---
emulator/btdev.c | 34 +++++++++++++++++----------------- emulator/le.c | 6 +++--- emulator/serial.c | 6 +++--- 3 files changed, 23 insertions(+), 23 deletions(-)
emulator/btdev.c +17 -17
@@ -5949,13 +5949,13 @@ static void set_bredrle_features(struct btdev *btdev) btdev->features[2 ] |=0x08 ;/* Transparent SCO */ btdev->features[3 ] |=0x40 ;/* RSSI with inquiry results */ btdev->features[3 ] |=0x80 ;/* Extended SCO link */ - btdev->features[4 ] |=0x08 ;/* AFH capable slave */ - btdev->features[4 ] |=0x10 ;/* AFH classification slave */ + btdev->features[4 ] |=0x08 ;/* AFH capable peripheral */ + btdev->features[4 ] |=0x10 ;/* AFH classification peripheral */ btdev->features[4 ] |=0x40 ;/* LE Supported */ btdev->features[5 ] |=0x02 ;/* Sniff subrating */ btdev->features[5 ] |=0x04 ;/* Pause encryption */ - btdev->features[5 ] |=0x08 ;/* AFH capable master */ - btdev->features[5 ] |=0x10 ;/* AFH classification master */ + btdev->features[5 ] |=0x08 ;/* AFH capable central */ + btdev->features[5 ] |=0x10 ;/* AFH classification central */ btdev->features[6 ] |=0x01 ;/* Extended Inquiry Response */ btdev->features[6 ] |=0x02 ;/* Simultaneous LE and BR/EDR */ btdev->features[6 ] |=0x08 ;/* Secure Simple Pairing */
@@ -5985,15 +5985,15 @@ static void set_bredrle_features(struct btdev *btdev)if (btdev->type >=BTDEV_TYPE_BREDRLE52 ) { btdev->le_features[1 ] |=0x20 ;/* LE PER ADV */ - btdev->le_features[3 ] |=0x10 ;/* LE CIS Master */ - btdev->le_features[3 ] |=0x20 ;/* LE CIS Slave */ + btdev->le_features[3 ] |=0x10 ;/* LE CIS Central */ + btdev->le_features[3 ] |=0x20 ;/* LE CIS Peripheral */ btdev->le_features[3 ] |=0x40 ;/* LE ISO Broadcaster */ btdev->le_features[3 ] |=0x80 ;/* LE Synchronized Receiver */ btdev->le_features[4 ] |=0x01 ;/* LE ISO channels */ } - btdev->feat_page_2[0 ] |=0x01 ;/* CSB - Master Operation */ - btdev->feat_page_2[0 ] |=0x02 ;/* CSB - Slave Operation */ + btdev->feat_page_2[0 ] |=0x01 ;/* CPB - Central Operation */ + btdev->feat_page_2[0 ] |=0x02 ;/* CPB - Peripheral Operation */ btdev->feat_page_2[0 ] |=0x04 ;/* Synchronization Train */ btdev->feat_page_2[0 ] |=0x08 ;/* Synchronization Scan */ btdev->feat_page_2[0 ] |=0x10 ;/* Inquiry Response Notification */
@@ -6011,12 +6011,12 @@ static void set_bredr_features(struct btdev *btdev) btdev->features[1 ] |=0x08 ;/* SCO link */ btdev->features[3 ] |=0x40 ;/* RSSI with inquiry results */ btdev->features[3 ] |=0x80 ;/* Extended SCO link */ - btdev->features[4 ] |=0x08 ;/* AFH capable slave */ - btdev->features[4 ] |=0x10 ;/* AFH classification slave */ + btdev->features[4 ] |=0x08 ;/* AFH capable peripheral */ + btdev->features[4 ] |=0x10 ;/* AFH classification peripheral */ btdev->features[5 ] |=0x02 ;/* Sniff subrating */ btdev->features[5 ] |=0x04 ;/* Pause encryption */ - btdev->features[5 ] |=0x08 ;/* AFH capable master */ - btdev->features[5 ] |=0x10 ;/* AFH classification master */ + btdev->features[5 ] |=0x08 ;/* AFH capable central */ + btdev->features[5 ] |=0x10 ;/* AFH classification central */ btdev->features[6 ] |=0x01 ;/* Extended Inquiry Response */ btdev->features[6 ] |=0x08 ;/* Secure Simple Pairing */ btdev->features[6 ] |=0x10 ;/* Encapsulated PDU */
@@ -6037,12 +6037,12 @@ static void set_bredr20_features(struct btdev *btdev) btdev->features[1 ] |=0x08 ;/* SCO link */ btdev->features[3 ] |=0x40 ;/* RSSI with inquiry results */ btdev->features[3 ] |=0x80 ;/* Extended SCO link */ - btdev->features[4 ] |=0x08 ;/* AFH capable slave */ - btdev->features[4 ] |=0x10 ;/* AFH classification slave */ + btdev->features[4 ] |=0x08 ;/* AFH capable peripheral */ + btdev->features[4 ] |=0x10 ;/* AFH classification peripheral */ btdev->features[5 ] |=0x02 ;/* Sniff subrating */ btdev->features[5 ] |=0x04 ;/* Pause encryption */ - btdev->features[5 ] |=0x08 ;/* AFH capable master */ - btdev->features[5 ] |=0x10 ;/* AFH classification master */ + btdev->features[5 ] |=0x08 ;/* AFH capable central */ + btdev->features[5 ] |=0x10 ;/* AFH classification central */ btdev->features[7 ] |=0x80 ;/* Extended features */ btdev->max_page =1 ;
@@ -6057,7 +6057,7 @@ static void set_le_features(struct btdev *btdev) btdev->le_features[0 ] |=0x01 ;/* LE Encryption */ btdev->le_features[0 ] |=0x02 ;/* Connection Parameters Request */ - btdev->le_features[0 ] |=0x08 ;/* Slave-initiated Features Exchange */ + btdev->le_features[0 ] |=0x08 ;/* Peripheral-initiated Features Exchange */ }static void set_le_states (struct btdev *btdev)
emulator/le.c +3 -3
@@ -343,7 +343,7 @@ static void reset_defaults(struct bt_le *hci) hci->le_features[0 ] |=0x01 ;/* LE Encryption */ //hci->le_features[0] |= 0x02; /* Connection Parameter Request Procedure */ //hci->le_features[0] |= 0x04; /* Extended Reject Indication */ -//hci->le_features[0] |= 0x08; /* Slave-initiated Features Exchange */ +//hci->le_features[0] |= 0x08; /* Peripheral-initiated Features Exchange */ hci->le_features[0 ] |=0x10 ;/* LE Ping */ hci->le_features[0 ] |=0x20 ;/* LE Data Packet Length Extension */ hci->le_features[0 ] |=0x40 ;/* LL Privacy */
@@ -399,8 +399,8 @@ static void reset_defaults(struct bt_le *hci) hci->le_states[0 ] |=0x08 ;/* High Duty Cycle Directed Advertising */ hci->le_states[0 ] |=0x10 ;/* Passive Scanning */ hci->le_states[0 ] |=0x20 ;/* Active Scanning */ - hci->le_states[0 ] |=0x40 ;/* Initiating + Connection (Master Role) */ - hci->le_states[0 ] |=0x80 ;/* Connection (Slave Role) */ + hci->le_states[0 ] |=0x40 ;/* Initiating + Connection (Central Role) */ + hci->le_states[0 ] |=0x80 ;/* Connection (Peripheral Role) */ hci->le_states[1 ] |=0x01 ;/* Passive Scanning + * Non-connectable Advertising */
emulator/serial.c +3 -3
@@ -151,19 +151,19 @@ static void open_pty(struct serial *serial) serial->fd =posix_openpt (O_RDWR |O_NOCTTY );if (serial->fd <0 ) { -perror ("Failed to get master pseudo terminal" ); +perror ("Failed to get central pseudo terminal" );return ; }if (grantpt (serial->fd) <0 ) { -perror ("Failed to grant slave pseudo terminal" ); +perror ("Failed to grant peripheral pseudo terminal" );close (serial->fd); serial->fd =-1 ;return ; }if (unlockpt (serial->fd) <0 ) { -perror ("Failed to unlock slave pseudo terminal" ); +perror ("Failed to unlock peripheral pseudo terminal" );close (serial->fd); serial->fd =-1 ;return ;
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 23/62 emulator: Inclusive language in filtering device
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"accept list" is preferred, as reflected in the BT core spec 5.3.
---
emulator/btdev.c | 114 +++++++++++++++++++++++------------------------ emulator/le.c | 78 ++++++++++++++++---------------- 2 files changed, 96 insertions(+), 96 deletions(-)
emulator/btdev.c +57 -57
@@ -33,7 +33,7 @@#include "monitor/bt.h" #include "btdev.h" -#define WL_SIZE 16 +#define AL_SIZE 16#define RL_SIZE 16#define CIS_SIZE 3
@@ -61,7 +61,7 @@ struct btdev_conn {struct btdev_conn *link; }; -struct btdev_wl { +struct btdev_al {uint8_t type;bdaddr_t addr; };
@@ -190,7 +190,7 @@ struct btdev { } __attribute__ ((packed)) le_cig;uint8_t le_iso_path[2 ]; -struct btdev_wl le_wl[WL_SIZE ]; +struct btdev_al le_al[AL_SIZE ];struct btdev_rl le_rl[RL_SIZE ];uint8_t le_rl_enable;uint16_t le_rl_timeout;
@@ -426,18 +426,18 @@ static int cmd_set_event_mask(struct btdev *dev, const void *data, uint8_t len)return 0 ; } -static void wl_reset (struct btdev_wl *wl) +static void al_reset (struct btdev_al *al) { - wl->type =0xff ; -bacpy (&wl->addr,BDADDR_ANY ); + al->type =0xff ; +bacpy (&al->addr,BDADDR_ANY ); } -static void wl_clear (struct btdev *dev) +static void al_clear (struct btdev *dev) {int i; -for (i =0 ; i <WL_SIZE ; i++) -wl_reset (&dev->le_wl[i]); +for (i =0 ; i <AL_SIZE ; i++) +al_reset (&dev->le_al[i]); }static void rl_reset (struct btdev_rl *rl)
@@ -465,7 +465,7 @@ static void btdev_reset(struct btdev *btdev) btdev->le_scan_enable =0x00 ; btdev->le_adv_enable =0x00 ; -wl_clear (btdev); +al_clear (btdev);rl_clear (btdev); }
@@ -3490,25 +3490,25 @@ static int cmd_le_create_conn_complete(struct btdev *dev, const void *data,return 0 ; } -static int cmd_read_wl_size (struct btdev *dev,const void *data,uint8_t len) +static int cmd_read_al_size (struct btdev *dev,const void *data,uint8_t len) {struct bt_hci_rsp_le_read_accept_list_size rsp; rsp.status =BT_HCI_ERR_SUCCESS ; - rsp.size =WL_SIZE ; + rsp.size =AL_SIZE ;cmd_complete (dev,BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE , &rsp,sizeof (rsp));return 0 ; } -static bool wl_can_change (struct btdev *dev) +static bool al_can_change (struct btdev *dev) { -/* filter policy uses the White List and advertising is enable. */ +/* filter policy uses the Accept List and advertising is enable. */ if (dev->le_adv_enable && dev->le_adv_filter_policy)return false; -/* scanning filter policy uses the White List and scanning is enabled */ +/* scan filter policy uses the Accept List and scanning is enabled */ if (dev->le_scan_enable) {switch (dev->le_scan_filter_policy) {case 0x00 :
@@ -3525,23 +3525,23 @@ static bool wl_can_change(struct btdev *dev)return true; } -static int cmd_wl_clear (struct btdev *dev,const void *data,uint8_t len) +static int cmd_al_clear (struct btdev *dev,const void *data,uint8_t len) {uint8_t status;/* This command shall not be used when: -* • any advertising filter policy uses the White List and advertising +* • any advertising filter policy uses the Accept List and advertising * is enabled, -* • the scanning filter policy uses the White List and scanning is +* • the scanning filter policy uses the Accept List and scanning is * enabled, or -* • the initiator filter policy uses the White List and an +* • the initiator filter policy uses the Accept List and an * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection * command is outstanding. */ -if (!wl_can_change (dev)) +if (!al_can_change (dev))return -EPERM ; -wl_clear (dev); +al_clear (dev); status =BT_HCI_ERR_SUCCESS ; cmd_complete(dev, BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST, &status,
@@ -3550,16 +3550,16 @@ static int cmd_wl_clear(struct btdev *dev, const void *data, uint8_t len)return 0 ; } -#define WL_ADDR_EQUAL (_wl, _type, _addr) \ - (_wl->type == _type && !bacmp(&_wl->addr, (bdaddr_t *)_addr)) +#define AL_ADDR_EQUAL (_al, _type, _addr) \ + (_al->type == _type && !bacmp(&_al->addr, (bdaddr_t *)_addr)) -static void wl_add (struct btdev_wl *wl,uint8_t type,bdaddr_t *addr) +static void al_add (struct btdev_al *al,uint8_t type,bdaddr_t *addr) { - wl->type = type; -bacpy (&wl->addr, addr); + al->type = type; +bacpy (&al->addr, addr); } -static int cmd_add_wl (struct btdev *dev,const void *data,uint8_t len) +static int cmd_add_al (struct btdev *dev,const void *data,uint8_t len) {const struct bt_hci_cmd_le_add_to_accept_list *cmd = data;uint8_t status;
@@ -3567,28 +3567,28 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len)int i, pos =-1 ;/* This command shall not be used when: -* • any advertising filter policy uses the White List and advertising +* • any advertising filter policy uses the Accept List and advertising * is enabled, -* • the scanning filter policy uses the White List and scanning is +* • the scanning filter policy uses the Accept List and scanning is * enabled, or -* • the initiator filter policy uses the White List and an +* • the initiator filter policy uses the Accept List and an * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection * command is outstanding. */ -if (!wl_can_change (dev)) +if (!al_can_change (dev))return -EPERM ;/* Valid range for address type is 0x00 to 0x01 */ if (cmd->addr_type >0x01 )return -EINVAL ; -for (i =0 ; i <WL_SIZE ; i++) { -struct btdev_wl *wl = &dev->le_wl[i]; +for (i =0 ; i <AL_SIZE ; i++) { +struct btdev_al *al = &dev->le_al[i]; -if (WL_ADDR_EQUAL (wl, cmd->addr_type, &cmd->addr)) { +if (AL_ADDR_EQUAL (al, cmd->addr_type, &cmd->addr)) { exists = true;break ; - }else if (pos <0 && wl->type ==0xff ) + }else if (pos <0 && al->type ==0xff ) pos = i; }
@@ -3601,7 +3601,7 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len)return 0 ; } -wl_add (&dev->le_wl[pos], cmd->addr_type, (bdaddr_t *)&cmd->addr); +al_add (&dev->le_al[pos], cmd->addr_type, (bdaddr_t *)&cmd->addr); status =BT_HCI_ERR_SUCCESS ; cmd_complete(dev, BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST,
@@ -3610,7 +3610,7 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len)return 0 ; } -static int cmd_remove_wl (struct btdev *dev,const void *data,uint8_t len) +static int cmd_remove_al (struct btdev *dev,const void *data,uint8_t len) {const struct bt_hci_cmd_le_remove_from_accept_list *cmd = data;uint8_t status;
@@ -3618,37 +3618,37 @@ static int cmd_remove_wl(struct btdev *dev, const void *data, uint8_t len)char addr[18 ];/* This command shall not be used when: -* • any advertising filter policy uses the White List and advertising +* • any advertising filter policy uses the Accept List and advertising * is enabled, -* • the scanning filter policy uses the White List and scanning is +* • the scanning filter policy uses the Accept List and scanning is * enabled, or -* • the initiator filter policy uses the White List and an +* • the initiator filter policy uses the Accept List and an * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection * command is outstanding. */ -if (!wl_can_change (dev)) +if (!al_can_change (dev))return -EPERM ;/* Valid range for address type is 0x00 to 0x01 */ if (cmd->addr_type >0x01 )return -EINVAL ; -for (i =0 ; i <WL_SIZE ; i++) { -struct btdev_wl *wl = &dev->le_wl[i]; +for (i =0 ; i <AL_SIZE ; i++) { +struct btdev_al *al = &dev->le_al[i]; -ba2str (&wl->addr, addr); +ba2str (&al->addr, addr);util_debug (dev->debug_callback, dev->debug_data, -"type 0x%02x addr %s" , dev->le_wl[i].type, +"type 0x%02x addr %s" , dev->le_al[i].type, addr); -if (WL_ADDR_EQUAL (wl, cmd->addr_type, &cmd->addr)) { -wl_reset (wl); +if (AL_ADDR_EQUAL (al, cmd->addr_type, &cmd->addr)) { +al_reset (al);break ; } } -if (i ==WL_SIZE ) +if (i ==AL_SIZE )return -EINVAL ; status =BT_HCI_ERR_SUCCESS ;
@@ -4237,10 +4237,10 @@ static int cmd_gen_dhkey(struct btdev *dev, const void *data, uint8_t len) cmd_set_scan_enable_complete), \CMD (BT_HCI_CMD_LE_CREATE_CONN , cmd_le_create_conn, \ cmd_le_create_conn_complete), \ -CMD (BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE , cmd_read_wl_size,NULL ), \ -CMD (BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST , cmd_wl_clear,NULL ), \ -CMD (BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST , cmd_add_wl,NULL ), \ -CMD (BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST , cmd_remove_wl,NULL ), \ +CMD (BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE , cmd_read_al_size,NULL ), \ +CMD (BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST , cmd_al_clear,NULL ), \ +CMD (BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST , cmd_add_al,NULL ), \ +CMD (BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST , cmd_remove_al,NULL ), \CMD (BT_HCI_CMD_LE_CONN_UPDATE , cmd_conn_update, \ cmd_conn_update_complete), \ CMD(BT_HCI_CMD_LE_READ_REMOTE_FEATURES, cmd_le_read_remote_features, \
@@ -5759,10 +5759,10 @@ static void set_le_commands(struct btdev *btdev) btdev->commands[26 ] |=0x04 ;/* LE Set Scan Parameters */ btdev->commands[26 ] |=0x08 ;/* LE Set Scan Enable */ btdev->commands[26 ] |=0x10 ;/* LE Create Connection */ - btdev->commands[26 ] |=0x40 ;/* LE Read White List Size */ - btdev->commands[26 ] |=0x80 ;/* LE Clear White List */ - btdev->commands[27 ] |=0x01 ;/* LE Add Device to White List */ - btdev->commands[27 ] |=0x02 ;/* LE Remove Device from White List */ + btdev->commands[26 ] |=0x40 ;/* LE Read Accept List Size */ + btdev->commands[26 ] |=0x80 ;/* LE Clear Accept List */ + btdev->commands[27 ] |=0x01 ;/* LE Add Device to Accept List */ + btdev->commands[27 ] |=0x02 ;/* LE Remove Device from Accept List */ btdev->commands[27 ] |=0x04 ;/* LE Connection Update */ btdev->commands[27 ] |=0x20 ;/* LE Read Remote Used Features */ btdev->commands[27 ] |=0x40 ;/* LE Encrypt */
@@ -6070,7 +6070,7 @@ static void set_le_states(struct btdev *btdev) btdev->le_states[4 ] =0xff ; btdev->le_states[5 ] =0x03 ; -wl_clear (btdev); +al_clear (btdev);rl_clear (btdev); btdev->le_rl_enable =0x00 ; btdev->le_rl_timeout =0x0384 ;/* 900 secs or 15 minutes */
emulator/le.c +39 -39
195 lines not on this page · raw message
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 24/62 tools: Inclusive language in referring the central address
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
tools/l2cap-tester.c | 20 ++++++++++---------- tools/mgmt-tester.c | 33 +++++++++++++++++---------------- tools/rfcomm-tester.c | 14 +++++++------- tools/sco-tester.c | 10 +++++----- tools/smp-tester.c | 12 ++++++------ 5 files changed, 45 insertions(+), 44 deletions(-)
tools/l2cap-tester.c +10 -10
@@ -1103,7 +1103,7 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm, uint16_t cid, int sec_level, uint8_t mode) { const struct l2cap_data *l2data = data->test_data; -const uint8_t *master_bdaddr; +const uint8_t *central_bdaddr;struct sockaddr_l2 addr;int sk, err;
@@ -1116,9 +1116,9 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm,return err; } - master_bdaddr =hciemu_get_central_bdaddr (data->hciemu); -if (!master_bdaddr) { -tester_warn ("No master bdaddr" ); + central_bdaddr =hciemu_get_central_bdaddr (data->hciemu); +if (!central_bdaddr) { +tester_warn ("No central bdaddr" );close (sk);return -ENODEV ; }
@@ -1127,7 +1127,7 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm, addr.l2_family =AF_BLUETOOTH ; addr.l2_psm =htobs (psm); addr.l2_cid =htobs (cid); -bacpy (&addr.l2_bdaddr, (void *) master_bdaddr); +bacpy (&addr.l2_bdaddr, (void *) central_bdaddr);if (l2data && l2data->addr_type_avail) addr.l2_bdaddr_type = l2data->addr_type;
@@ -1836,7 +1836,7 @@ static void test_server(const void *test_data) {struct test_data *data =tester_get_data ();const struct l2cap_data *l2data = data->test_data; -const uint8_t *master_bdaddr; +const uint8_t *central_bdaddr;uint8_t addr_type;struct bthost *bthost;GIOChannel *io;
@@ -1869,9 +1869,9 @@ static void test_server(const void *test_data)tester_print ("Listening for connections" ); } - master_bdaddr =hciemu_get_central_bdaddr (data->hciemu); -if (!master_bdaddr) { -tester_warn ("No master bdaddr" ); + central_bdaddr =hciemu_get_central_bdaddr (data->hciemu); +if (!central_bdaddr) { +tester_warn ("No central bdaddr" );tester_test_failed ();return ; }
@@ -1884,7 +1884,7 @@ static void test_server(const void *test_data)else addr_type =BDADDR_LE_PUBLIC ; -bthost_hci_connect (bthost, master_bdaddr, addr_type); +bthost_hci_connect (bthost, central_bdaddr, addr_type); }static void test_getpeername_not_connected (const void *test_data)
tools/mgmt-tester.c +17 -16
@@ -9759,7 +9759,7 @@ static void test_pairing_acceptor(const void *test_data) {struct test_data *data =tester_get_data ();const struct generic_data *test = data->test_data; -const uint8_t *master_bdaddr; +const uint8_t *central_bdaddr;struct bthost *bthost;uint8_t addr_type;
@@ -9775,9 +9775,9 @@ static void test_pairing_acceptor(const void *test_data)test_add_condition (data); } - master_bdaddr =hciemu_get_central_bdaddr (data->hciemu); -if (!master_bdaddr) { -tester_warn ("No master bdaddr" ); + central_bdaddr =hciemu_get_central_bdaddr (data->hciemu); +if (!central_bdaddr) { +tester_warn ("No central bdaddr" );tester_test_failed ();return ; }
@@ -9790,7 +9790,7 @@ static void test_pairing_acceptor(const void *test_data)else addr_type =BDADDR_LE_PUBLIC ; -bthost_hci_connect (bthost, master_bdaddr, addr_type); +bthost_hci_connect (bthost, central_bdaddr, addr_type); } static void connected_event(uint16_t index, uint16_t length, const void *param,
@@ -9828,7 +9828,7 @@ static void test_command_generic_connect(const void *test_data) {struct test_data *data =tester_get_data ();unsigned int id; -const uint8_t *master_bdaddr; +const uint8_t *central_bdaddr;uint8_t addr_type;struct bthost *bthost;
@@ -9840,9 +9840,9 @@ static void test_command_generic_connect(const void *test_data) data->mgmt_alt_ev_id = id;test_add_condition (data); - master_bdaddr =hciemu_get_central_bdaddr (data->hciemu); -if (!master_bdaddr) { -tester_warn ("No master bdaddr" ); + central_bdaddr =hciemu_get_central_bdaddr (data->hciemu); +if (!central_bdaddr) { +tester_warn ("No central bdaddr" );tester_test_failed ();return ; }
@@ -9851,7 +9851,7 @@ static void test_command_generic_connect(const void *test_data)BDADDR_LE_PUBLIC ;tester_print ("ADDR TYPE: %d" , addr_type); bthost =hciemu_client_get_host (data->hciemu); -bthost_hci_connect (bthost, master_bdaddr, addr_type); +bthost_hci_connect (bthost, central_bdaddr, addr_type); } static bool test_adv_enable_hook(const void *data, uint16_t len,
@@ -9904,7 +9904,7 @@ static void add_device_callback(uint8_t status, uint16_t len, const void *param,struct test_data *data = user_data;const struct generic_data *test = data->test_data;struct bthost *bthost; -const uint8_t *master_bdaddr; +const uint8_t *central_bdaddr;if (status !=0 ) {tester_test_failed ();
@@ -9919,18 +9919,19 @@ static void add_device_callback(uint8_t status, uint16_t len, const void *param,if (test->client_enable_adv)return ; - master_bdaddr =hciemu_get_central_bdaddr (data->hciemu); -if (!master_bdaddr) { -tester_warn ("No master bdaddr" ); + central_bdaddr =hciemu_get_central_bdaddr (data->hciemu); +if (!central_bdaddr) { +tester_warn ("No central bdaddr" );tester_test_failed ();return ; } bthost =hciemu_client_get_host (data->hciemu);if (data->hciemu_type >=HCIEMU_TYPE_BREDRLE50 ) -bthost_hci_ext_connect (bthost, master_bdaddr,BDADDR_LE_PUBLIC ); +bthost_hci_ext_connect (bthost, central_bdaddr, +BDADDR_LE_PUBLIC );else -bthost_hci_connect (bthost, master_bdaddr,BDADDR_LE_PUBLIC ); +bthost_hci_connect (bthost, central_bdaddr,BDADDR_LE_PUBLIC ); }static void test_connected_and_advertising (const void *test_data)
tools/rfcomm-tester.c +7 -7
@@ -534,7 +534,7 @@ static void test_connect(const void *test_data)struct test_data *data =tester_get_data ();struct bthost *bthost =hciemu_client_get_host (data->hciemu);const struct rfcomm_client_data *cli = data->test_data; -const uint8_t *client_addr, *master_addr; +const uint8_t *client_addr, *central_addr;GIOChannel *io;int sk;
@@ -542,10 +542,10 @@ static void test_connect(const void *test_data)bthost_add_rfcomm_server (bthost, cli->server_channel, rfcomm_connect_cb,NULL ); - master_addr =hciemu_get_central_bdaddr (data->hciemu); + central_addr =hciemu_get_central_bdaddr (data->hciemu); client_addr =hciemu_get_client_bdaddr (data->hciemu); - sk =create_rfcomm_sock ((bdaddr_t *) master_addr,0 ); + sk =create_rfcomm_sock ((bdaddr_t *) central_addr,0 );if (connect_rfcomm_sock (sk, (const bdaddr_t *) client_addr, cli->client_channel) <0 ) {
@@ -675,14 +675,14 @@ static void test_server(const void *test_data) {struct test_data *data =tester_get_data ();const struct rfcomm_server_data *srv = data->test_data; -const uint8_t *master_addr; +const uint8_t *central_addr;struct bthost *bthost;GIOChannel *io;int sk; - master_addr =hciemu_get_central_bdaddr (data->hciemu); + central_addr =hciemu_get_central_bdaddr (data->hciemu); - sk =create_rfcomm_sock ((bdaddr_t *) master_addr, srv->server_channel); + sk =create_rfcomm_sock ((bdaddr_t *) central_addr, srv->server_channel);if (sk <0 ) {tester_test_failed ();return ;
@@ -707,7 +707,7 @@ static void test_server(const void *test_data) bthost =hciemu_client_get_host (data->hciemu);bthost_set_connect_cb (bthost, client_new_conn, data); -bthost_hci_connect (bthost, master_addr,BDADDR_BREDR ); +bthost_hci_connect (bthost, central_addr,BDADDR_BREDR ); }#define test_rfcomm (name, data, setup, func) \
tools/sco-tester.c +5 -5
@@ -413,7 +413,7 @@ end:static int create_sco_sock (struct test_data *data) { -const uint8_t *master_bdaddr; +const uint8_t *central_bdaddr;struct sockaddr_sco addr;int sk, err;
@@ -426,15 +426,15 @@ static int create_sco_sock(struct test_data *data)return err; } - master_bdaddr =hciemu_get_central_bdaddr (data->hciemu); -if (!master_bdaddr) { -tester_warn ("No master bdaddr" ); + central_bdaddr =hciemu_get_central_bdaddr (data->hciemu); +if (!central_bdaddr) { +tester_warn ("No central bdaddr" );return -ENODEV ; }memset (&addr,0 ,sizeof (addr)); addr.sco_family =AF_BLUETOOTH ; -bacpy (&addr.sco_bdaddr, (void *) master_bdaddr); +bacpy (&addr.sco_bdaddr, (void *) central_bdaddr);if (bind (sk, (struct sockaddr *) &addr,sizeof (addr)) <0 ) { err = -errno;
tools/smp-tester.c +6 -6
@@ -765,11 +765,11 @@ static void smp_new_conn(uint16_t handle, void *user_data)static void init_bdaddr (struct test_data *data) { -const uint8_t *master_bdaddr, *client_bdaddr; +const uint8_t *central_bdaddr, *client_bdaddr; - master_bdaddr =hciemu_get_central_bdaddr (data->hciemu); -if (!master_bdaddr) { -tester_warn ("No master bdaddr" ); + central_bdaddr =hciemu_get_central_bdaddr (data->hciemu); +if (!central_bdaddr) { +tester_warn ("No central bdaddr" );tester_test_failed ();return ; }
@@ -786,9 +786,9 @@ static void init_bdaddr(struct test_data *data)if (data->out) {memcpy (data->ia, client_bdaddr,sizeof (data->ia)); -memcpy (data->ra, master_bdaddr,sizeof (data->ra)); +memcpy (data->ra, central_bdaddr,sizeof (data->ra)); }else { -memcpy (data->ia, master_bdaddr,sizeof (data->ia)); +memcpy (data->ia, central_bdaddr,sizeof (data->ia));memcpy (data->ra, client_bdaddr,sizeof (data->ra)); } }
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 25/62 tools/parser/hci: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central", "peripheral", "accept list", and "temporary link key", are the preferred terms, as reflected in the BT core spec 5.3.
---
tools/parser/hci.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-)
tools/parser/hci.c +18 -17
@@ -45,7 +45,7 @@ static char *event_str[EVENT_NUM + 1] = {"Remote Name Req Complete" ,"Encrypt Change" ,"Change Connection Link Key Complete" , -"Master Link Key Complete" , +"Temporary Link Key Complete" ,"Read Remote Supported Features" ,"Read Remote Ver Info Complete" , "QoS Setup Complete",
@@ -150,7 +150,7 @@ static char *cmd_linkctl_str[CMD_LINKCTL_NUM + 1] = {"Unknown" ,"Change Connection Link Key" ,"Unknown" , -"Master Link Key" , +"Temporary Link Key" ,"Unknown" ,"Remote Name Request" , "Remote Name Request Cancel",
@@ -383,10 +383,10 @@ static char *cmd_le_str[CMD_LE_NUM + 1] = {"LE Set Scan Enable" ,"LE Create Connection" ,"LE Create Connection Cancel" , -"LE Read White List Size" , -"LE Clear White List" , -"LE Add Device To White List" , -"LE Remove Device From White List" , +"LE Read Accept List Size" , +"LE Clear Accept List" , +"LE Add Device To Accept List" , +"LE Remove Device From Accept List" ,"LE Connection Update" ,"LE Set Host Channel Classification" , "LE Read Channel Map",
@@ -568,9 +568,9 @@ static char *role2str(uint8_t role) {switch (role) {case 0x00 : -return "Master" ; +return "Central" ;case 0x01 : -return "Slave" ; +return "Peripheral" ;default :return "Unknown" ; }
@@ -739,11 +739,11 @@ static char *filterpolicy2str(uint8_t policy)case 0x00 :return "Allow scan from any, connection from any" ;case 0x01 : -return "Allow scan from white list, connection from any" ; +return "Allow scan from accept list, connection from any" ;case 0x02 : -return "Allow scan from any, connection from white list" ; +return "Allow scan from any, connection from accept list" ;case 0x03 : -return "Allow scan and connection from white list" ; +return "Allow scan and connection from accept list" ;default :return "Reserved" ; }
@@ -1082,7 +1082,7 @@ static inline void remote_name_req_dump(int level, struct frame *frm) clkoffset & 0x7fff, clkoffset & 0x8000 ? " (valid)" : ""); } -static inline void master_link_key_dump (int level,struct frame *frm) +static inline void temporary_link_key_dump (int level,struct frame *frm) {central_link_key_cp *cp = frm->ptr;
@@ -1640,7 +1640,7 @@ static inline void le_set_scan_parameters_dump(int level, struct frame *frm)printf ("own address: 0x%02x (%s) policy: %s\n" , cp->own_bdaddr_type,bdaddrtype2str (cp->own_bdaddr_type), (cp->filter ==0x00 ?"All" : - (cp->filter ==0x01 ?"white list only" :"reserved" ))); + (cp->filter ==0x01 ?"accept list only" :"reserved" ))); }static inline void le_set_scan_enable_dump (int level,struct frame *frm)
@@ -1772,7 +1772,7 @@ static inline void command_dump(int level, struct frame *frm)generic_command_dump (level +1 , frm);return ;case OCF_CENTRAL_LINK_KEY : -master_link_key_dump (level +1 , frm); +temporary_link_key_dump (level +1 , frm);return ;case OCF_READ_REMOTE_EXT_FEATURES :read_remote_ext_features_dump (level +1 , frm);
@@ -3114,7 +3114,8 @@ 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) +static inline void temporary_link_key_complete_dump (int level, +struct frame *frm) {evt_central_link_key_complete *evt = frm->ptr;
@@ -3565,7 +3566,7 @@ static inline void evt_le_conn_complete_dump(int level, struct frame *frm)p_indent (level, frm);printf ("status 0x%2.2x handle %d, role %s\n" , evt->status,btohs (evt->handle), - evt->role ?"slave" :"master" ); + evt->role ?"peripheral" :"central" );p_indent (level, frm);p_ba2str (&evt->peer_bdaddr, addr);
@@ -3875,7 +3876,7 @@ static inline void event_dump(int level, struct frame *frm)generic_response_dump (level +1 , frm);break ;case EVT_CENTRAL_LINK_KEY_COMPLETE : -master_link_key_complete_dump (level +1 , frm); +temporary_link_key_complete_dump (level +1 , frm);break ;case EVT_REMOTE_NAME_REQ_COMPLETE :remote_name_req_complete_dump (level +1 , frm);
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 26/62 tools/parser/smp: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
tools/parser/smp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
tools/parser/smp.c +6 -6
@@ -28,7 +28,7 @@#define SMP_CMD_PAIRING_RANDOM 0x04#define SMP_CMD_PAIRING_FAILED 0x05#define SMP_CMD_ENCRYPT_INFO 0x06 -#define SMP_CMD_MASTER_IDENT 0x07 +#define SMP_CMD_CENTRAL_IDENT 0x07#define SMP_CMD_IDENT_INFO 0X08#define SMP_CMD_IDENT_ADDR_INFO 0x09#define SMP_CMD_SIGN_INFO 0x0a
@@ -78,8 +78,8 @@ static const char *smpcmd2str(uint8_t cmd)return "Pairing Failed" ;case SMP_CMD_ENCRYPT_INFO :return "Encryption Information" ; -case SMP_CMD_MASTER_IDENT : -return "Master Identification" ; +case SMP_CMD_CENTRAL_IDENT : +return "Central Identification" ;case SMP_CMD_IDENT_INFO :return "Identity Information" ;case SMP_CMD_IDENT_ADDR_INFO :
@@ -221,7 +221,7 @@ static void smp_cmd_encrypt_info_dump(int level, struct frame *frm)printf ("\n" ); } -static void smp_cmd_master_ident_dump (int level,struct frame *frm) +static void smp_cmd_central_ident_dump (int level,struct frame *frm) {uint16_t ediv =btohs (htons (p_get_u16 (frm)));int i;
@@ -303,8 +303,8 @@ void smp_dump(int level, struct frame *frm)case SMP_CMD_ENCRYPT_INFO :smp_cmd_encrypt_info_dump (level +1 , frm);break ; -case SMP_CMD_MASTER_IDENT : -smp_cmd_master_ident_dump (level +1 , frm); +case SMP_CMD_CENTRAL_IDENT : +smp_cmd_central_ident_dump (level +1 , frm);break ;case SMP_CMD_IDENT_INFO :smp_cmd_ident_info_dump (level +1 , frm);
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 27/62 tools/3dsp: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"peripheral" is preferred, as reflected in the BT core spec 5.3.
---
tools/3dsp.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-)
tools/3dsp.c +17 -16
@@ -112,10 +112,10 @@ static void start_inquiry(void) inquiry_started, NULL, NULL); } -static void set_slave_broadcast_receive (const void *data,uint8_t size, +static void set_peripheral_broadcast_receive (const void *data,uint8_t size,void *user_data) { -printf ("Slave broadcast receiption enabled\n" ); +printf ("Peripheral broadcast reception enabled\n" ); } static void sync_train_received(const void *data, uint8_t size,
@@ -149,7 +149,7 @@ static void sync_train_received(const void *data, uint8_t size,bt_hci_send (hci_dev,BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE , &cmd,sizeof (cmd), - set_slave_broadcast_receive,NULL ,NULL ); + set_peripheral_broadcast_receive,NULL ,NULL ); } static void brcm_sync_train_received(const void *data, uint8_t size,
@@ -183,7 +183,7 @@ static void brcm_sync_train_received(const void *data, uint8_t size,bt_hci_send (hci_dev,BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE , &cmd,sizeof (cmd), - set_slave_broadcast_receive,NULL ,NULL ); + set_peripheral_broadcast_receive,NULL ,NULL ); } static void truncated_page_complete(const void *data, uint8_t size,
@@ -209,7 +209,7 @@ static void truncated_page_complete(const void *data, uint8_t size, NULL, NULL, NULL); } -static void slave_broadcast_timeout (const void *data,uint8_t size, +static void peripheral_broadcast_timeout (const void *data,uint8_t size,void *user_data) {const struct bt_hci_evt_peripheral_broadcast_timeout *evt = data;
@@ -226,7 +226,7 @@ static void slave_broadcast_timeout(const void *data, uint8_t size, NULL, NULL, NULL); } -static void slave_broadcast_receive (const void *data,uint8_t size, +static void peripheral_broadcast_receive (const void *data,uint8_t size,void *user_data) {const struct bt_hci_evt_peripheral_broadcast_receive *evt = data;
@@ -327,9 +327,9 @@ static void start_glasses(void)bt_hci_register (hci_dev,BT_HCI_EVT_TRUNCATED_PAGE_COMPLETE , truncated_page_complete,NULL ,NULL );bt_hci_register (hci_dev,BT_HCI_EVT_PERIPHERAL_BROADCAST_TIMEOUT , - slave_broadcast_timeout,NULL ,NULL ); + peripheral_broadcast_timeout,NULL ,NULL );bt_hci_register (hci_dev,BT_HCI_EVT_PERIPHERAL_BROADCAST_RECEIVE , - slave_broadcast_receive,NULL ,NULL ); + peripheral_broadcast_receive,NULL ,NULL );start_inquiry (); }
@@ -381,7 +381,7 @@ static void conn_request(const void *data, uint8_t size, void *user_data)start_sync_train (); } -static void slave_page_response_timeout (const void *data,uint8_t size, +static void peripheral_page_response_timeout (const void *data,uint8_t size,void *user_data) {printf ("Incoming truncated page received\n" );
@@ -389,8 +389,8 @@ static void slave_page_response_timeout(const void *data, uint8_t size,start_sync_train (); } -static void slave_broadcast_channel_map_change (const void *data,uint8_t size, -void *user_data) +static void peripheral_broadcast_channel_map_change (const void *data, +uint8_t size,void *user_data) {printf ("Broadcast channel map changed\n" );
@@ -447,13 +447,14 @@ static void read_clock(const void *data, uint8_t size, void *user_data) bcastdata, sizeof(bcastdata), NULL, NULL, NULL); } -static void set_slave_broadcast (const void *data,uint8_t size,void *user_data) +static void set_peripheral_broadcast (const void *data,uint8_t size, +void *user_data) {const struct bt_hci_rsp_set_peripheral_broadcast *rsp = data;struct bt_hci_cmd_read_clock cmd;if (rsp->status) { -printf ("Failed to set slave broadcast transmission\n" ); +printf ("Failed to set peripheral broadcast transmission\n" );shutdown_device ();return ; }
@@ -493,10 +494,10 @@ static void start_display(void) conn_request, NULL, NULL);bt_hci_register (hci_dev,BT_HCI_EVT_PERIPHERAL_PAGE_RESPONSE_TIMEOUT , - slave_page_response_timeout,NULL ,NULL ); + peripheral_page_response_timeout,NULL ,NULL );bt_hci_register (hci_dev,BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE , - slave_broadcast_channel_map_change,NULL ,NULL ); + peripheral_broadcast_channel_map_change,NULL ,NULL );bt_hci_register (hci_dev,BT_HCI_EVT_SYNC_TRAIN_COMPLETE , sync_train_complete,NULL ,NULL );
@@ -512,7 +513,7 @@ static void start_display(void) cmd.timeout =cpu_to_le16 (0xfffe );bt_hci_send (hci_dev,BT_HCI_CMD_SET_PERIPHERAL_BROADCAST , &cmd, -sizeof (cmd), set_slave_broadcast,NULL ,NULL ); +sizeof (cmd), set_peripheral_broadcast,NULL ,NULL ); }static void signal_callback (int signum,void *user_data)
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 28/62 tools/mgmt-tester: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central", "peripheral", and "accept list" are the preferred terms, as reflected in the BT core spec 5.3.
---
tools/mgmt-tester.c | 87 +++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 43 deletions(-)
tools/mgmt-tester.c +44 -43
@@ -2698,20 +2698,20 @@ static const char load_ltks_invalid_param_2[] = {0x00 ,0x01 ,0x02 ,0x03 ,0x04 ,0x05 ,/* bdaddr */ 0x00 ,/* addr type */ 0x00 ,/* authenticated */ -0x00 ,/* master */ +0x00 ,/* central */ 0x00 ,/* encryption size */ 0x00 ,0x00 ,/* diversifier */ 0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,/* rand */ 0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,/* value (1/2) */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* value (2/2) */ }; -/* Invalid master value */ +/* Invalid central value */ static const char load_ltks_invalid_param_3[] = {0x01 ,0x00 ,/* count */ 0x00 ,0x01 ,0x02 ,0x03 ,0x04 ,0x05 ,/* bdaddr */ 0x01 ,/* addr type */ 0x00 ,/* authenticated */ -0x02 ,/* master */ +0x02 ,/* central */ 0x00 ,/* encryption size */ 0x00 ,0x00 ,/* diversifier */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* rand */
@@ -4233,7 +4233,7 @@ static const uint8_t add_device_success_param_6[] = { 0x02, }; -static const uint8_t le_add_to_white_list_param[] = { +static const uint8_t le_add_to_accept_list_param[] = {0x00 ,/* Type */ 0x12 ,0x34 ,0x56 ,0x78 ,0x9a ,0xbc ,/* Address */ };
@@ -4249,8 +4249,8 @@ static const struct generic_data add_device_success_6 = { .expect_alt_ev_param = add_device_success_param_6, .expect_alt_ev_len = sizeof(add_device_success_param_6), .expect_hci_command = BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, - .expect_hci_param = le_add_to_white_list_param, - .expect_hci_len = sizeof(le_add_to_white_list_param), + .expect_hci_param = le_add_to_accept_list_param, + .expect_hci_len = sizeof(le_add_to_accept_list_param), };static const uint8_t le_add_to_resolv_list_param[] = {
@@ -4419,8 +4419,8 @@ static const struct generic_data remove_device_success_7 = { .expect_len = sizeof(remove_device_param_2), .expect_status = MGMT_STATUS_SUCCESS, .expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, - .expect_hci_param = le_add_to_white_list_param, - .expect_hci_len = sizeof(le_add_to_white_list_param), + .expect_hci_param = le_add_to_accept_list_param, + .expect_hci_len = sizeof(le_add_to_accept_list_param), .expect_alt_ev = MGMT_EV_DEVICE_REMOVED, .expect_alt_ev_param = remove_device_param_2, .expect_alt_ev_len = sizeof(remove_device_param_2),
@@ -4434,8 +4434,8 @@ static const struct generic_data remove_device_success_8 = { .expect_len = sizeof(remove_device_param_2), .expect_status = MGMT_STATUS_SUCCESS, .expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_RESOLV_LIST, - .expect_hci_param = le_add_to_white_list_param, - .expect_hci_len = sizeof(le_add_to_white_list_param), + .expect_hci_param = le_add_to_accept_list_param, + .expect_hci_len = sizeof(le_add_to_accept_list_param), .expect_alt_ev = MGMT_EV_DEVICE_REMOVED, .expect_alt_ev_param = remove_device_param_2, .expect_alt_ev_len = sizeof(remove_device_param_2),
@@ -5336,40 +5336,40 @@ static const struct generic_data read_local_oob_success_sc_test = { .expect_hci_command = BT_HCI_CMD_READ_LOCAL_OOB_EXT_DATA, }; -static const uint8_t le_states_conn_slave_adv_connectable[] = { +static const uint8_t le_states_conn_peripheral_adv_connectable[] = {0x00 ,0x00 ,0x20 ,0x00 ,0x40 ,0x00 ,0x00 ,0x00 }; -static const uint8_t le_states_conn_slave_adv_non_connectable[] = { +static const uint8_t le_states_conn_peripheral_adv_non_connectable[] = {0x00 ,0x00 ,0x10 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 }; -static const uint8_t le_states_conn_master_adv_connectable[] = { +static const uint8_t le_states_conn_central_adv_connectable[] = {0x00 ,0x00 ,0x08 ,0x00 ,0x08 ,0x00 ,0x00 ,0x00 }; -static const uint8_t le_states_conn_master_adv_non_connectable[] = { +static const uint8_t le_states_conn_central_adv_non_connectable[] = {0x00 ,0x00 ,0x02 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 }; -static const struct generic_data conn_slave_adv_conneactable_test = { +static const struct generic_data conn_peripheral_adv_connectable_test = { .setup_le_states = true, - .le_states = le_states_conn_slave_adv_connectable, + .le_states = le_states_conn_peripheral_adv_connectable, .setup_settings = settings_powered_le, .client_enable_le = true }; -static const struct generic_data conn_slave_adv_non_conneactable_test = { +static const struct generic_data conn_peripheral_adv_non_connectable_test = { .setup_le_states = true, - .le_states = le_states_conn_slave_adv_non_connectable, + .le_states = le_states_conn_peripheral_adv_non_connectable, .setup_settings = settings_powered_le, .client_enable_le = true }; -static const struct generic_data conn_master_adv_conneactable_test = { +static const struct generic_data conn_central_adv_connectable_test = { .setup_le_states = true, - .le_states = le_states_conn_master_adv_connectable, + .le_states = le_states_conn_central_adv_connectable, .setup_settings = settings_powered_le, .client_enable_le = true, .client_enable_adv =1 }; -static const struct generic_data conn_master_adv_non_conneactable_test = { +static const struct generic_data conn_central_adv_non_connectable_test = { .setup_le_states = true, - .le_states = le_states_conn_master_adv_non_connectable, + .le_states = le_states_conn_central_adv_non_connectable, .setup_settings = settings_powered_le, .client_enable_le = true, .client_enable_adv =1
@@ -10874,9 +10874,9 @@ int main(int argc, char *argv[]) &add_device_success_5, NULL, test_command_generic);/* MGMT_OP_ADD_DEVICE -* Add device and check the device is added to the whitelist +* Add device and check the device is added to the accept list */ -test_bredrle50 ("Add Device - Success 6 - Add to whitelist" , +test_bredrle50 ("Add Device - Success 6 - Add to accept list" , &add_device_success_6,NULL , test_command_generic);/* MGMT_OP_ADD_DEVICE
@@ -10928,7 +10928,7 @@ int main(int argc, char *argv[])* Remove the device and check the device is removed from the whilte * list as well. */ -test_bredrle50 ("Remove Device - Success 7 - Remove from whitelist" , +test_bredrle50 ("Remove Device - Success 7 - Remove from accept list" , &remove_device_success_7, setup_ll_privacy_device2, test_command_generic);/* MGMT_OP_REMOVE_DEVICE
@@ -11135,23 +11135,24 @@ int main(int argc, char *argv[]) &add_advertising_name_data_appear, setup_command_generic, test_command_generic); -test_le_full ("Adv. connectable & connected (slave) - Success" , - &conn_slave_adv_conneactable_test, - setup_advertise_while_connected, - test_connected_and_advertising,10 ); -test_le_full ("Adv. non-connectable & connected (slave) - Success" , - &conn_slave_adv_non_conneactable_test, +test_le_full ("Adv. connectable & connected (peripheral) - Success" , + &conn_peripheral_adv_connectable_test, setup_advertise_while_connected, test_connected_and_advertising,10 ); -test_le_full ("Adv. connectable & connected (master) - Success" , - &conn_master_adv_conneactable_test, +test_le_full ("Adv. non-connectable & connected (peripheral) - Success" , + &conn_peripheral_adv_non_connectable_test, + setup_advertise_while_connected, + test_connected_and_advertising,10 ); + +test_le_full ("Adv. connectable & connected (central) - Success" , + &conn_central_adv_connectable_test, setup_advertise_while_connected, test_connected_and_advertising,10 ); -test_le_full ("Adv. non-connectable & connected (master) - Success" , - &conn_master_adv_non_conneactable_test, +test_le_full ("Adv. non-connectable & connected (central) - Success" , + &conn_central_adv_non_connectable_test, setup_advertise_while_connected, test_connected_and_advertising,10 );
@@ -11547,23 +11548,23 @@ int main(int argc, char *argv[]) &device_found_invalid_field, NULL, test_device_found); -test_bredrle50_full ("Ext Adv. connectable & connected (slave) - Success" , - &conn_slave_adv_conneactable_test, +test_bredrle50_full ("Ext Adv. connectable & connected (peripheral) - Success" , + &conn_peripheral_adv_connectable_test, setup_advertise_while_connected, test_connected_and_advertising,10 ); -test_bredrle50_full ("Ext Adv. non-connectable & connected (slave) - Success" , - &conn_slave_adv_non_conneactable_test, +test_bredrle50_full ("Ext Adv. non-connectable & connected (peripheral) - Success" , + &conn_peripheral_adv_non_connectable_test, setup_advertise_while_connected, test_connected_and_advertising,10 ); -test_bredrle50_full ("Ext Adv. connectable & connected (master) - Success" , - &conn_master_adv_conneactable_test, +test_bredrle50_full ("Ext Adv. connectable & connected (central) - Success" , + &conn_central_adv_connectable_test, setup_advertise_while_connected, test_connected_and_advertising,10 ); -test_bredrle50_full ("Ext Adv. non-connectable & connected (master) - Success" , - &conn_master_adv_non_conneactable_test, +test_bredrle50_full ("Ext Adv. non-connectable & connected (central) - Success" , + &conn_central_adv_non_connectable_test, setup_advertise_while_connected, test_connected_and_advertising,10 );
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 29/62 tools/bdaddr: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
Use "consolidated file", to follow the usage of "consolidated table" in BT core spec 5.3.
---
tools/bdaddr.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/bdaddr.rst +1 -1
@@ -61,7 +61,7 @@ FILES ===== /usr/share/misc/oui.txt - IEEE Organizationally Unique Identifier master file. + IEEE Organizationally Unique Identifier consolidated file. Manually update from: http://standards.ieee.org/regauth/oui/oui.txt
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 30/62 tools/hciconfig: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central", "peripheral", and "reject list" are the preferred terms, as reflected in the BT core spec 5.3 and
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
---
tools/hciconfig.c | 26 +++++++++++++------------- tools/hciconfig.rst | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-)
tools/hciconfig.c +13 -13
@@ -116,8 +116,8 @@ static void print_le_states(uint64_t states)"Directed Advertising State" ,"Passive Scanning State" ,"Active Scanning State" , -"Initiating State/Connection State in Master Role" , -"Connection State in the Slave Role" , +"Initiating State/Connection State in Central Role" , +"Connection State in the Peripheral Role" ,"Non-connectable Advertising State and Passive Scanning State combination" ,"Scannable Advertising State and Passive Scanning State combination" , "Connectable Advertising State and Passive Scanning State combination",
@@ -128,17 +128,17 @@ static void print_le_states(uint64_t states)"Directed Advertising State and Active Scanning State combination" ,"Non-connectable Advertising State and Initiating State combination" ,"Scannable Advertising State and Initiating State combination" , -"Non-connectable Advertising State and Master Role combination" , -"Scannable Advertising State and Master Role combination" , -"Non-connectable Advertising State and Slave Role combination" , -"Scannable Advertising State and Slave Role combination" , +"Non-connectable Advertising State and Central Role combination" , +"Scannable Advertising State and Central Role combination" , +"Non-connectable Advertising State and Peripheral Role combination" , +"Scannable Advertising State and Peripheral Role combination" ,"Passive Scanning State and Initiating State combination" ,"Active Scanning State and Initiating State combination" , -"Passive Scanning State and Master Role combination" , -"Active Scanning State and Master Role combination" , -"Passive Scanning State and Slave Role combination" , -"Active Scanning State and Slave Role combination" , -"Initiating State and Master Role combination/Master Role and Master Role combination" , +"Passive Scanning State and Central Role combination" , +"Active Scanning State and Central Role combination" , +"Passive Scanning State and Peripheral Role combination" , +"Active Scanning State and Peripheral Role combination" , +"Initiating State and Central Role combination/Central Role and Central Role combination" ,NULL };
@@ -1922,8 +1922,8 @@ static struct { { "features", cmd_features, 0, "Display device features" }, { "version", cmd_version, 0, "Display version information" }, { "revision", cmd_revision, 0, "Display revision information" }, - { "block", cmd_block, "<bdaddr>", "Add a device to the blacklist" }, - { "unblock", cmd_unblock, "<bdaddr>", "Remove a device from the blacklist" }, + { "block", cmd_block, "<bdaddr>", "Add a device to the reject list" }, + { "unblock", cmd_unblock, "<bdaddr>", "Remove a device from the reject list" }, { "lerandaddr", cmd_le_addr, "<bdaddr>", "Set LE Random Address" }, { "leadv", cmd_le_adv, "[type]", "Enable LE advertising""\n\t\t\t0 - Connectable undirected advertising (default)"
tools/hciconfig.rst +2 -2
@@ -230,10 +230,10 @@ lm [*mode*] sockets. block <*bdaddr*> - Add a device to the blacklist + Add a device to the reject list unblock <*bdaddr*> - Remove a device from the blacklist + Remove a device from the reject list lerandaddr <*bdaddr*> Set LE Random Address
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 31/62 tools/meshctl: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
Use "parent" to describe the hierarchy.
---
tools/meshctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/meshctl.c +3 -3
@@ -541,19 +541,19 @@ static void print_uuids(GDBusProxy *proxy) } } -static gboolean device_is_child (GDBusProxy *device,GDBusProxy *master) +static gboolean device_is_child (GDBusProxy *device,GDBusProxy *parent) {DBusMessageIter iter;const char *adapter, *path; -if (!master) +if (!parent)return FALSE;if (g_dbus_proxy_get_property (device,"Adapter" , &iter) == FALSE)return FALSE;dbus_message_iter_get_basic (&iter, &adapter); - path =g_dbus_proxy_get_path (master); + path =g_dbus_proxy_get_path (parent);if (!strcmp (path, adapter))return TRUE;
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 32/62 tools/mgmt-tester: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3.
---
tools/oobtest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tools/oobtest.c +4 -4
@@ -134,15 +134,15 @@ static void new_long_term_key_event(uint16_t index, uint16_t len,switch (ev->key.type) {case 0x00 :if (ev->key.central) - type ="Unauthenticated, Master" ; + type ="Unauthenticated, Central" ;else - type ="Unauthenticated, Slave" ; + type ="Unauthenticated, Peripheral" ;break ;case 0x01 :if (ev->key.central) - type ="Authenticated, Master" ; + type ="Authenticated, Central" ;else - type ="Authenticated, Slave" ; + type ="Authenticated, Peripheral" ;break ;case 0x02 : type ="Unauthenticated, P-256" ;
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 33/62 tools/parser: Inclusive language in struct member
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
tools/parser/csr.c | 4 ++-- tools/parser/ericsson.c | 2 +- tools/parser/lmp.c | 2 +- tools/parser/parser.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
tools/parser/csr.c +2 -2
@@ -564,13 +564,13 @@ void csr_dump(int level, struct frame *frm)switch (type) {case 0x0f : frm->handle = ((uint8_t *) frm->ptr)[17 ]; - frm->master =0 ; + frm->central =0 ; frm->len--;lmp_dump (level, frm);return ;case 0x10 : frm->handle = ((uint8_t *) frm->ptr)[17 ]; - frm->master =1 ; + frm->central =1 ; frm->len--;lmp_dump (level, frm);return ;
tools/parser/ericsson.c +1 -1
@@ -29,7 +29,7 @@ void ericsson_dump(int level, struct frame *frm)raw_dump (level, frm); } - frm->master = !(buf[0 ] &0x01 ); + frm->central = !(buf[0 ] &0x01 ); frm->handle = buf[1 ] | (buf[2 ] <<8 ); buf[5 ] = (buf[5 ] <<1 ) | (buf[3 ] &0x01 );
tools/parser/lmp.c +1 -1
@@ -1141,7 +1141,7 @@ void lmp_dump(int level, struct frame *frm) opcode += tmp <<7 ; } -printf ("LMP(%c): %s(%c): " , frm->master ?'s' :'r' , +printf ("LMP(%c): %s(%c): " , frm->central ?'s' :'r' ,opcode2str (opcode), tid ?'s' :'m' );if (opcode >123 )
tools/parser/parser.h +1 -1
@@ -26,7 +26,7 @@ struct frame {uint32_t len;uint16_t dev_id;uint8_t in; -uint8_t master; +uint8_t central;uint16_t handle;uint16_t cid;uint16_t num;
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 34/62 tools/parser/lmp: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3.
---
tools/parser/lmp.c | 110 ++++++++++++++++++++++----------------------- 1 file changed, 55 insertions(+), 55 deletions(-)
tools/parser/lmp.c +55 -55
@@ -28,22 +28,22 @@static enum {IN_RAND , -COMB_KEY_M , -COMB_KEY_S , -AU_RAND_M , -AU_RAND_S , -SRES_M , -SRES_S , +COMB_KEY_C , +COMB_KEY_P , +AU_RAND_C , +AU_RAND_P , +SRES_C , +SRES_P , } pairing_state =IN_RAND ;static struct {uint8_t in_rand[16 ]; -uint8_t comb_key_m[16 ]; -uint8_t comb_key_s[16 ]; -uint8_t au_rand_m[16 ]; -uint8_t au_rand_s[16 ]; -uint8_t sres_m[4 ]; -uint8_t sres_s[4 ]; +uint8_t comb_key_c[16 ]; +uint8_t comb_key_p[16 ]; +uint8_t au_rand_c[16 ]; +uint8_t au_rand_p[16 ]; +uint8_t sres_c[4 ]; +uint8_t sres_p[4 ]; } pairing_data;static inline void pairing_data_dump (void )
@@ -59,31 +59,31 @@ static inline void pairing_data_dump(void)p_indent (6 ,NULL );printf ("COMB_KEY " );for (i =0 ; i <16 ; i++) -printf ("%2.2x" , pairing_data.comb_key_m[i]); +printf ("%2.2x" , pairing_data.comb_key_c[i]);printf (" (M)\n" );p_indent (6 ,NULL );printf ("COMB_KEY " );for (i =0 ; i <16 ; i++) -printf ("%2.2x" , pairing_data.comb_key_s[i]); +printf ("%2.2x" , pairing_data.comb_key_p[i]);printf (" (S)\n" );p_indent (6 ,NULL );printf ("AU_RAND " );for (i =0 ; i <16 ; i++) -printf ("%2.2x" , pairing_data.au_rand_m[i]); +printf ("%2.2x" , pairing_data.au_rand_c[i]);printf (" SRES " );for (i =0 ; i <4 ; i++) -printf ("%2.2x" , pairing_data.sres_m[i]); +printf ("%2.2x" , pairing_data.sres_c[i]);printf (" (M)\n" );p_indent (6 ,NULL );printf ("AU_RAND " );for (i =0 ; i <16 ; i++) -printf ("%2.2x" , pairing_data.au_rand_s[i]); +printf ("%2.2x" , pairing_data.au_rand_p[i]);printf (" SRES " );for (i =0 ; i <4 ; i++) -printf ("%2.2x" , pairing_data.sres_s[i]); +printf ("%2.2x" , pairing_data.sres_p[i]);printf (" (S)\n" ); }
@@ -92,7 +92,7 @@ static inline void in_rand(struct frame *frm)uint8_t *val = frm->ptr;memcpy (pairing_data.in_rand, val,16 ); - pairing_state =COMB_KEY_M ; + pairing_state =COMB_KEY_C ; }static inline void comb_key (struct frame *frm)
@@ -100,19 +100,19 @@ static inline void comb_key(struct frame *frm)uint8_t *val = frm->ptr;switch (pairing_state) { -case COMB_KEY_M : -memcpy (pairing_data.comb_key_m, val,16 ); - pairing_state =COMB_KEY_S ; +case COMB_KEY_C : +memcpy (pairing_data.comb_key_c, val,16 ); + pairing_state =COMB_KEY_P ;break ; -case COMB_KEY_S : -memcpy (pairing_data.comb_key_s, val,16 ); - pairing_state =AU_RAND_M ; +case COMB_KEY_P : +memcpy (pairing_data.comb_key_p, val,16 ); + pairing_state =AU_RAND_C ;break ;case IN_RAND : -case AU_RAND_M : -case AU_RAND_S : -case SRES_M : -case SRES_S : +case AU_RAND_C : +case AU_RAND_P : +case SRES_C : +case SRES_P :default : pairing_state =IN_RAND ;break ;
@@ -124,19 +124,19 @@ static inline void au_rand(struct frame *frm)uint8_t *val = frm->ptr;switch (pairing_state) { -case AU_RAND_M : -memcpy (pairing_data.au_rand_m, val,16 ); - pairing_state =SRES_M ; +case AU_RAND_C : +memcpy (pairing_data.au_rand_c, val,16 ); + pairing_state =SRES_C ;break ; -case AU_RAND_S : -memcpy (pairing_data.au_rand_s, val,16 ); - pairing_state =SRES_S ; +case AU_RAND_P : +memcpy (pairing_data.au_rand_p, val,16 ); + pairing_state =SRES_P ;break ; -case COMB_KEY_M : -case COMB_KEY_S : +case COMB_KEY_C : +case COMB_KEY_P :case IN_RAND : -case SRES_M : -case SRES_S : +case SRES_C : +case SRES_P :default : pairing_state =IN_RAND ;break ;
@@ -148,20 +148,20 @@ static inline void sres(struct frame *frm)uint8_t *val = frm->ptr;switch (pairing_state) { -case SRES_M : -memcpy (pairing_data.sres_m, val,4 ); - pairing_state =AU_RAND_S ; +case SRES_C : +memcpy (pairing_data.sres_c, val,4 ); + pairing_state =AU_RAND_P ;break ; -case SRES_S : -memcpy (pairing_data.sres_s, val,4 ); +case SRES_P : +memcpy (pairing_data.sres_p, val,4 ); pairing_state =IN_RAND ;pairing_data_dump ();break ; -case COMB_KEY_M : -case COMB_KEY_S : +case COMB_KEY_C : +case COMB_KEY_P :case IN_RAND : -case AU_RAND_M : -case AU_RAND_S : +case AU_RAND_C : +case AU_RAND_P :default : pairing_state =IN_RAND ;break ;
@@ -1016,10 +1016,10 @@ static inline void esco_link_req_dump(int level, struct frame *frm)uint8_t desco =LMP_U8 (frm);uint8_t tesco =LMP_U8 (frm);uint8_t wesco =LMP_U8 (frm); -uint8_t mspkt =LMP_U8 (frm); -uint8_t smpkt =LMP_U8 (frm); -uint16_t mslen =LMP_U16 (frm); -uint16_t smlen =LMP_U16 (frm); +uint8_t cppkt =LMP_U8 (frm); +uint8_t pcpkt =LMP_U8 (frm); +uint16_t cplen =LMP_U16 (frm); +uint16_t pclen =LMP_U16 (frm);uint8_t airmode =LMP_U8 (frm);uint8_t negstate =LMP_U8 (frm);
@@ -1036,10 +1036,10 @@ static inline void esco_link_req_dump(int level, struct frame *frm)printf ("D_eSCO %d T_eSCO %d W_eSCO %d\n" , desco, tesco, wesco);p_indent (level, frm); -printf ("eSCO M->S packet type 0x%2.2x length %d\n" , mspkt, mslen); +printf ("eSCO C->P packet type 0x%2.2x length %d\n" , cppkt, cplen);p_indent (level, frm); -printf ("eSCO S->M packet type 0x%2.2x length %d\n" , smpkt, smlen); +printf ("eSCO P->C packet type 0x%2.2x length %d\n" , pcpkt, pclen);p_indent (level, frm);printf ("air mode 0x%2.2x\n" , airmode);
@@ -1142,7 +1142,7 @@ void lmp_dump(int level, struct frame *frm) }printf ("LMP(%c): %s(%c): " , frm->central ?'s' :'r' , -opcode2str (opcode), tid ?'s' :'m' ); +opcode2str (opcode), tid ?'p' :'c' );if (opcode >123 )printf ("op code %d/%d" , opcode &0x7f , opcode >>7 );
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 35/62 tools/parser/avdtp: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3.
---
tools/parser/avdtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/parser/avdtp.c +2 -2
@@ -605,7 +605,7 @@ void avdtp_dump(int level, struct frame *frm) nsp = (hdr &0x0c ) ==0x04 ?p_get_u8 (frm) :0 ; sid = hdr &0x08 ?0x00 :p_get_u8 (frm); -printf ("AVDTP(s): %s %s: transaction %d nsp 0x%02x\n" , +printf ("AVDTP(p): %s %s: transaction %d nsp 0x%02x\n" , hdr &0x08 ?pt2str (hdr) :si2str (sid),mt2str (hdr), hdr >>4 , nsp);
@@ -659,7 +659,7 @@ void avdtp_dump(int level, struct frame *frm) time =p_get_u32 (frm); ssrc =p_get_u32 (frm); -printf ("AVDTP(m): ver %d %s%scc %d %spt %d seqn %d time %d ssrc %d\n" , +printf ("AVDTP(c): ver %d %s%scc %d %spt %d seqn %d time %d ssrc %d\n" , hdr >>6 , hdr &0x20 ?"pad " :"" , hdr &0x10 ?"ext " :"" , hdr &0xf , type &0x80 ?"mark " :"" , type &0x7f , seqn, time, ssrc);break ;
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 36/62 tools/parser/csr: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3.
---
tools/parser/csr.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
tools/parser/csr.c +7 -6
@@ -257,7 +257,7 @@ static inline void pskey_dump(int level, struct frame *frm)uint16_dump (level +1 ,"MAX_SCOS" , frm);break ;case 0x000f : -uint16_dump (level +1 ,"MAX_REMOTE_MASTERS" , frm); +uint16_dump (level +1 ,"MAX_REMOTE_CENTRALS" , frm);break ;case 0x00da :uint16_dump (level +1 ,"ENC_KEY_LMIN" , frm);
@@ -546,7 +546,7 @@ static char *frag2str(uint8_t frag)void csr_dump (int level,struct frame *frm) {uint8_t desc, cid, type; -uint16_t handle, master, addr; +uint16_t handle, central, addr; desc =CSR_U8 (frm);
@@ -576,12 +576,13 @@ void csr_dump(int level, struct frame *frm)return ;case 0x12 : handle =CSR_U16 (frm); - master =CSR_U16 (frm); + central =CSR_U16 (frm); addr =CSR_U16 (frm);p_indent (level, frm); -printf ("FHS: handle %d addr %d (%s)\n" , handle, - addr, master ?"master" :"slave" ); -if (!master) { +printf ("FHS: handle %d addr %d (%s)\n" , + handle, addr, + central ?"central" :"peripheral" ); +if (!central) {char addr[18 ];p_ba2str ((bdaddr_t *) frm->ptr, addr);p_indent (level +1 , frm);
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 37/62 tools/btpclientctl: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"peripheral" is preferred, as reflected in the BT core spec 5.3.
---
tools/btpclientctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/btpclientctl.c +1 -1
@@ -676,7 +676,7 @@ const struct indexstr_data ad_type_table[] = { { 0x10, "BT_AD_DEVICE_ID" }, { 0x10, "BT_AD_SMP_TK" }, { 0x11, "BT_AD_SMP_OOB_FLAGS" }, - { 0x12, "BT_AD_SLAVE_CONN_INTERVAL" }, + { 0x12, "BT_AD_PERIPHERAL_CONN_INTERVAL" }, { 0x14, "BT_AD_SOLICIT16" }, { 0x15, "BT_AD_SOLICIT128" }, { 0x16, "BT_AD_SERVICE_DATA16" },
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 38/62 tools/l2cap-tester: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"accept list" is preferred, as reflected in the BT core spec 5.3.
---
tools/l2cap-tester.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/l2cap-tester.c +2 -2
@@ -1437,7 +1437,7 @@ static gboolean test_close_socket_1_part_2(gpointer args)tester_print ("Will close socket during scan phase..." );/* We tried to conect to LE device that is not advertising. It -* was added to kernel whitelist, and scan was started. We +* was added to kernel accept list, and scan was started. We * should be still scanning. */ if (!hciemu_get_central_le_scan_enable (data->hciemu)) {
@@ -1446,7 +1446,7 @@ static gboolean test_close_socket_1_part_2(gpointer args)return FALSE; } -/* Calling close() should remove device from whitelist, and stop +/* Calling close() should remove device from accept list, and stop * the scan. */ if (close (sk) <0 ) {
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 39/62 tools/hci-tester: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"accept list" is preferred, as reflected in the BT core spec 5.3.
---
tools/hci-tester.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
tools/hci-tester.c +6 -6
@@ -335,12 +335,12 @@ static void test_read_local_supported_codecs(const void *test_data)test_command (BT_HCI_CMD_READ_LOCAL_CODECS ); } -static void test_le_read_white_list_size (const void *test_data) +static void test_le_read_accept_list_size (const void *test_data) {test_command (BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE ); } -static void test_le_clear_white_list (const void *test_data) +static void test_le_clear_accept_list (const void *test_data) {test_command (BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST ); }
@@ -944,10 +944,10 @@ int main(int argc, char *argv[])test_hci_local ("Read Local Supported Codecs" ,NULL ,NULL , test_read_local_supported_codecs); -test_hci_local ("LE Read White List Size" ,NULL ,NULL , - test_le_read_white_list_size); -test_hci_local ("LE Clear White List" ,NULL ,NULL , - test_le_clear_white_list); +test_hci_local ("LE Read Accept List Size" ,NULL ,NULL , + test_le_read_accept_list_size); +test_hci_local ("LE Clear Accept List" ,NULL ,NULL , + test_le_clear_accept_list);test_hci_local ("LE Encrypt" ,NULL ,NULL , test_le_encrypt); test_hci_local("LE Rand", NULL, NULL,
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 40/62 tools/btiotest: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
tools/btiotest.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
tools/btiotest.c +11 -11
@@ -310,7 +310,7 @@ static void l2cap_connect(const char *src, const char *dst, uint8_t addr_type,static void l2cap_listen (const char *src,uint8_t addr_type,uint16_t psm,uint16_t cid,int defer,int reject,int disconn,int accept,int sec, -gboolean master) +gboolean central) {struct io_data *data;BtIOConnect conn;
@@ -343,7 +343,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm,BT_IO_OPT_PSM , psm,BT_IO_OPT_CID , cid,BT_IO_OPT_SEC_LEVEL , sec, -BT_IO_OPT_CENTRAL , master, +BT_IO_OPT_CENTRAL , central, BT_IO_OPT_INVALID); else l2_srv = bt_io_listen(conn, cfm, data,
@@ -353,7 +353,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm,BT_IO_OPT_PSM , psm,BT_IO_OPT_CID , cid,BT_IO_OPT_SEC_LEVEL , sec, -BT_IO_OPT_CENTRAL , master, +BT_IO_OPT_CENTRAL , central, BT_IO_OPT_INVALID);if (!l2_srv) {
@@ -402,7 +402,7 @@ static void rfcomm_connect(const char *src, const char *dst, uint8_t ch,static void rfcomm_listen (const char *src,uint8_t ch,gboolean defer,int reject,int disconn,int accept, -int sec,gboolean master) +int sec,gboolean central) {struct io_data *data;BtIOConnect conn;
@@ -427,7 +427,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer,BT_IO_OPT_SOURCE , src,BT_IO_OPT_CHANNEL , ch,BT_IO_OPT_SEC_LEVEL , sec, -BT_IO_OPT_CENTRAL , master, +BT_IO_OPT_CENTRAL , central, BT_IO_OPT_INVALID); else rc_srv = bt_io_listen(conn, cfm,
@@ -435,7 +435,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer, &err,BT_IO_OPT_CHANNEL , ch,BT_IO_OPT_SEC_LEVEL , sec, -BT_IO_OPT_CENTRAL , master, +BT_IO_OPT_CENTRAL , central, BT_IO_OPT_INVALID);if (!rc_srv) {
@@ -540,7 +540,7 @@ static int opt_reject = -1;static int opt_disconn =-1 ;static int opt_accept =DEFAULT_ACCEPT_TIMEOUT ;static int opt_sec =0 ; -static gboolean opt_master = FALSE; +static gboolean opt_central = FALSE;static int opt_priority =0 ;static int opt_cid =0 ;static guint8 opt_addr_type =0 ;
@@ -576,8 +576,8 @@ static GOptionEntry options[] = { "Disconnect connection after N seconds" }, {"accept" ,'a' ,0 ,G_OPTION_ARG_INT , &opt_accept, "Accept connection after N seconds" }, - { "master", 'm', 0, G_OPTION_ARG_NONE, &opt_master, - "Master role switch (incoming connections)" }, + { "central", 'C', 0, G_OPTION_ARG_NONE, &opt_central, + "Central role switch (incoming connections)" }, { "priority", 'P', 0, G_OPTION_ARG_INT, &opt_priority,"Transmission priority: Setting a priority " "outside the range 0 to 6 requires the"
@@ -614,7 +614,7 @@ int main(int argc, char *argv[])else l2cap_listen (opt_dev, opt_addr_type, opt_psm, opt_cid, opt_defer, opt_reject, opt_disconn, - opt_accept, opt_sec, opt_master); + opt_accept, opt_sec, opt_central); }if (opt_channel !=-1 ) {
@@ -624,7 +624,7 @@ int main(int argc, char *argv[])else rfcomm_listen (opt_dev, opt_channel, opt_defer, opt_reject, opt_disconn, opt_accept, - opt_sec, opt_master); + opt_sec, opt_central); }if (opt_sco) {
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 41/62 tools/hcitool: Inclusive language changes, central peripheral
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3.
---
tools/hcitool.c | 12 ++++++------ tools/hcitool.rst | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-)
tools/hcitool.c +6 -6
@@ -1210,10 +1210,10 @@ static struct option cc_options[] = {static const char *cc_help ="Usage:\n" -"\tcc [--role=m|s] [--ptype=pkt_types] <bdaddr>\n" +"\tcc [--role=c|p] [--ptype=pkt_types] <bdaddr>\n" "Example:\n" "\tcc --ptype=dm1,dh3,dh5 01:02:03:04:05:06\n" -"\tcc --role=m 01:02:03:04:05:06\n" ; +"\tcc --role=c 01:02:03:04:05:06\n" ;static void cmd_cc (int dev_id,int argc,char **argv) {
@@ -1360,10 +1360,10 @@ static void cmd_sr(int dev_id, int argc, char **argv)str2ba (argv[0 ], &bdaddr);switch (argv[1 ][0 ]) { -case 'm' : +case 'c' : role =0 ;break ; -case 's' : +case 'p' : role =1 ;break ;default :
@@ -3287,7 +3287,7 @@ static const char *lecup_help ="\t --handle=<0xXXXX> LE connection handle\n" "\t --min=<interval> Range: 0x0006 to 0x0C80\n" "\t --max=<interval> Range: 0x0006 to 0x0C80\n" -"\t --latency=<range> Slave latency. Range: 0x0000 to 0x03E8\n" +"\t --latency=<range> Peripheral latency. Range: 0x0000 to 0x03E8\n" "\t --timeout=<time> N * 10ms. Range: 0x000A to 0x0C80\n" "\n\t min/max range: 7.5ms to 4s. Multiply factor: 1.25ms" "\n\t timeout range: 100ms to 32.0s. Larger than max interval\n" ;
@@ -3379,7 +3379,7 @@ static struct { { "con", cmd_con, "Display active connections" }, { "cc", cmd_cc, "Create connection to remote device" }, { "dc", cmd_dc, "Disconnect from remote device" }, - { "sr", cmd_sr, "Switch master/slave role" }, + { "sr", cmd_sr, "Switch central/peripheral role" }, { "cpt", cmd_cpt, "Change connection packet type" }, { "rssi", cmd_rssi, "Display connection RSSI" }, { "lq", cmd_lq, "Display link quality" },
tools/hcitool.rst +5 -5
@@ -74,7 +74,7 @@ cmd <*ogf*> <*ocf*> [*parameters*] con Display active baseband connections -cc [--*role*\=m|s] [--*pkt-type*\=<*ptype*>] <*bdaddr*> +cc [--*role*\=c|p] [--*pkt-type*\=<*ptype*>] <*bdaddr*> Create baseband connection to remote device with Bluetooth address *bdaddr*. Option **--pkt-type** specifies a list of allowed packet types.
@@ -82,9 +82,9 @@ cc [--*role*\=m|s] [--*pkt-type*\=<*ptype*>] <*bdaddr*> packet types are **DM1**, **DM3**, **DM5**, **DH1**, **DH3**, **DH5**, **HV1**, **HV2**, **HV3**. Default is to allow all packet types. - Option **--role** can have value **m** (do not allow role switch, stay - master) or **s** (allow role switch, become slave if the peer asks to become - master). Default is **m**. + Option **--role** can have value **c** (do not allow role switch, stay + central) or **p** (allow role switch, become peripheral if the peer asks to + become central). Default is **c**. dc <*bdaddr*> [*reason*] Delete baseband connection from remote device with Bluetooth address
@@ -96,7 +96,7 @@ dc <*bdaddr*> [*reason*] sr <*bdaddr*> <*role*> Switch role for the baseband connection from the remote device to - **master** or **slave**. + **central** or **peripheral**. cpt <*bdaddr*> <*ptypes*> Change packet types for baseband connection to device with Bluetooth
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 42/62 tools/hcitool: Inclusive language changes, accept list
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"accept list" is preferred, as reflected in the BT core spec 5.3.
---
tools/hcitool.c | 90 +++++++++++++++++++++++------------------------ tools/hcitool.rst | 20 +++++------ 2 files changed, 55 insertions(+), 55 deletions(-)
tools/hcitool.c +45 -45
@@ -2474,7 +2474,7 @@ static struct option lescan_options[] = { { "static", 0, 0, 's' }, { "privacy", 0, 0, 'p' }, { "passive", 0, 0, 'P' }, - { "whitelist", 0, 0, 'w' }, + { "acceptlist", 0, 0, 'a' }, { "discovery", 1, 0, 'd' }, { "duplicates", 0, 0, 'D' }, { 0, 0, 0, 0 }
@@ -2484,7 +2484,7 @@ static const char *lescan_help ="Usage:\n" "\tlescan [--privacy] enable privacy\n" "\tlescan [--passive] set scan type passive (default active)\n" -"\tlescan [--whitelist] scan for address in the whitelist only\n" +"\tlescan [--acceptlist] scan for address in the accept list only\n" "\tlescan [--discovery=g|l] enable general or limited discovery" "procedure\n" "\tlescan [--duplicates] don't filter duplicates\n" ;
@@ -2511,8 +2511,8 @@ static void cmd_lescan(int dev_id, int argc, char **argv)case 'P' : scan_type =0x00 ;/* Passive */ break ; -case 'w' : - filter_policy =0x01 ;/* Whitelist */ +case 'a' : + filter_policy =0x01 ;/* Accept list */ break ;case 'd' : filter_type = optarg[0 ];
@@ -2678,14 +2678,14 @@ static struct option lecc_options[] = { { "help", 0, 0, 'h' }, { "static", 0, 0, 's' }, { "random", 0, 0, 'r' }, - { "whitelist", 0, 0, 'w' }, + { "acceptlist", 0, 0, 'a' }, { 0, 0, 0, 0 } };static const char *lecc_help ="Usage:\n" "\tlecc [--static] [--random] <bdaddr>\n" -"\tlecc --whitelist\n" ; +"\tlecc --acceptlist\n" ;static void cmd_lecc (int dev_id,int argc,char **argv) {
@@ -2707,8 +2707,8 @@ static void cmd_lecc(int dev_id, int argc, char **argv)case 'r' : peer_bdaddr_type =LE_RANDOM_ADDRESS ;break ; -case 'w' : - initiator_filter =0x01 ;/* Use white list */ +case 'a' : + initiator_filter =0x01 ;/* Use accept list */ break ;default :printf ("%s" , lecc_help);
@@ -2753,34 +2753,34 @@ static void cmd_lecc(int dev_id, int argc, char **argv)hci_close_dev (dd); } -static struct option lewladd_options[] = { +static struct option lealall_options[] = { {"help" ,0 ,0 ,'h' }, {"random" ,0 ,0 ,'r' }, {0 ,0 ,0 ,0 } }; -static const char *lewladd_help = +static const char *lealall_help ="Usage:\n" -"\tlewladd [--random] <bdaddr>\n" ; +"\tlealall [--random] <bdaddr>\n" ; -static void cmd_lewladd (int dev_id,int argc,char **argv) +static void cmd_lealall (int dev_id,int argc,char **argv) {int err, opt, dd;bdaddr_t bdaddr;uint8_t bdaddr_type =LE_PUBLIC_ADDRESS ; -for_each_opt (opt, lewladd_options,NULL ) { +for_each_opt (opt, lealall_options,NULL ) {switch (opt) {case 'r' : bdaddr_type =LE_RANDOM_ADDRESS ;break ;default : -printf ("%s" , lewladd_help); +printf ("%s" , lealall_help);return ; } } -helper_arg (1 ,1 , &argc, &argv, lewladd_help); +helper_arg (1 ,1 , &argc, &argv, lealall_help);if (dev_id <0 ) dev_id =hci_get_route (NULL );
@@ -2798,35 +2798,35 @@ static void cmd_lewladd(int dev_id, int argc, char **argv)if (err <0 ) { err = -errno; -fprintf (stderr,"Can't add to white list: %s(%d)\n" , +fprintf (stderr,"Can't add to accept list: %s(%d)\n" ,strerror (-err), -err);exit (1 ); } } -static struct option lewlrm_options[] = { +static struct option lealrm_options[] = { {"help" ,0 ,0 ,'h' }, {0 ,0 ,0 ,0 } }; -static const char *lewlrm_help = +static const char *lealrm_help ="Usage:\n" -"\tlewlrm <bdaddr>\n" ; +"\tlealrm <bdaddr>\n" ; -static void cmd_lewlrm (int dev_id,int argc,char **argv) +static void cmd_lealrm (int dev_id,int argc,char **argv) {int err, opt, dd;bdaddr_t bdaddr; -for_each_opt (opt, lewlrm_options,NULL ) { +for_each_opt (opt, lealrm_options,NULL ) {switch (opt) {default : -printf ("%s" , lewlrm_help); +printf ("%s" , lealrm_help);return ; } } -helper_arg (1 ,1 , &argc, &argv, lewlrm_help); +helper_arg (1 ,1 , &argc, &argv, lealrm_help);if (dev_id <0 ) dev_id =hci_get_route (NULL );
@@ -2844,35 +2844,35 @@ static void cmd_lewlrm(int dev_id, int argc, char **argv)if (err <0 ) { err = errno; -fprintf (stderr,"Can't remove from white list: %s(%d)\n" , +fprintf (stderr,"Can't remove from accept list: %s(%d)\n" ,strerror (err), err);exit (1 ); } } -static struct option lewlsz_options[] = { +static struct option lealsz_options[] = { {"help" ,0 ,0 ,'h' }, {0 ,0 ,0 ,0 } }; -static const char *lewlsz_help = +static const char *lealsz_help ="Usage:\n" -"\tlewlsz\n" ; +"\tlealsz\n" ; -static void cmd_lewlsz (int dev_id,int argc,char **argv) +static void cmd_lealsz (int dev_id,int argc,char **argv) {int err, dd, opt;uint8_t size; -for_each_opt (opt, lewlsz_options,NULL ) { +for_each_opt (opt, lealsz_options,NULL ) {switch (opt) {default : -printf ("%s" , lewlsz_help); +printf ("%s" , lealsz_help);return ; } } -helper_arg (0 ,0 , &argc, &argv, lewlsz_help); +helper_arg (0 ,0 , &argc, &argv, lealsz_help);if (dev_id <0 ) dev_id =hci_get_route (NULL );
@@ -2888,36 +2888,36 @@ static void cmd_lewlsz(int dev_id, int argc, char **argv)if (err <0 ) { err = -errno; -fprintf (stderr,"Can't read white list size: %s(%d)\n" , +fprintf (stderr,"Can't read accept list size: %s(%d)\n" ,strerror (-err), -err);exit (1 ); } -printf ("White list size: %d\n" , size); +printf ("Accept list size: %d\n" , size); } -static struct option lewlclr_options[] = { +static struct option lealclr_options[] = { {"help" ,0 ,0 ,'h' }, {0 ,0 ,0 ,0 } }; -static const char *lewlclr_help = +static const char *lealclr_help ="Usage:\n" -"\tlewlclr\n" ; +"\tlealclr\n" ; -static void cmd_lewlclr (int dev_id,int argc,char **argv) +static void cmd_lealclr (int dev_id,int argc,char **argv) {int err, dd, opt; -for_each_opt (opt, lewlclr_options,NULL ) { +for_each_opt (opt, lealclr_options,NULL ) {switch (opt) {default : -printf ("%s" , lewlclr_help); +printf ("%s" , lealclr_help);return ; } } -helper_arg (0 ,0 , &argc, &argv, lewlclr_help); +helper_arg (0 ,0 , &argc, &argv, lealclr_help);if (dev_id <0 ) dev_id =hci_get_route (NULL );
@@ -2933,7 +2933,7 @@ static void cmd_lewlclr(int dev_id, int argc, char **argv)if (err <0 ) { err = -errno; -fprintf (stderr,"Can't clear white list: %s(%d)\n" , +fprintf (stderr,"Can't clear accept list: %s(%d)\n" ,strerror (-err), -err);exit (1 ); }
@@ -3394,10 +3394,10 @@ static struct { { "clock", cmd_clock, "Read local or remote clock" }, { "lescan", cmd_lescan, "Start LE scan" }, { "leinfo", cmd_leinfo, "Get LE remote information" }, - { "lewladd", cmd_lewladd, "Add device to LE White List" }, - { "lewlrm", cmd_lewlrm, "Remove device from LE White List" }, - { "lewlsz", cmd_lewlsz, "Read size of LE White List" }, - { "lewlclr", cmd_lewlclr, "Clear LE White List" }, + { "lealall", cmd_lealall, "Add device to LE Accept List" }, + { "lealrm", cmd_lealrm, "Remove device from LE Accept List" }, + { "lealsz", cmd_lealsz, "Read size of LE Accept List" }, + { "lealclr", cmd_lealclr, "Clear LE Accept List" }, { "lerladd", cmd_lerladd, "Add device to LE Resolving List" }, { "lerlrm", cmd_lerlrm, "Remove device from LE Resolving List" }, { "lerlclr", cmd_lerlclr, "Clear LE Resolving List" },
tools/hcitool.rst +10 -10
@@ -157,23 +157,23 @@ clock [*bdaddr*] [*clock*] The *clock* can be **0** for the local clock or **1** for the piconet clock (which is default). -lescan [--*privacy*] [--*passive*] [--*whitelist*] [--*discovery*\=g|l] [--*duplicates*] +lescan [--*privacy*] [--*passive*] [--*acceptlist*] [--*discovery*\=g|l] [--*duplicates*] Start LE scan leinfo [--*static*] [--*random*] <*bdaddr*> Get LE remote information -lewladd [--*random*] <*bdaddr*> - Add device to LE White List +lealall [--*random*] <*bdaddr*> + Add device to LE Accept List -lewlrm <*bdaddr*> - Remove device from LE White List +lealrm <*bdaddr*> + Remove device from LE Accept List -lewlsz - Read size of LE White List +lealsz + Read size of LE Accept List -lewlclr - Clear LE White List +lealclr + Clear LE Accept List lerladd [--*local_irk*] [--*peer_irk*] [--*random*] <*bdaddr*> Add device to LE Resolving List
@@ -193,7 +193,7 @@ lerlon lerloff Disable LE Address Resolution -lecc [--*static*] [--*random*] <*bdaddr*> | [--*whitelist*] +lecc [--*static*] [--*random*] <*bdaddr*> | [--*acceptlist*] Create a LE Connection ledc <*handle*> [*reason*]
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 43/62 tools/l2test: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
tools/l2test.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
tools/l2test.c +9 -9
@@ -110,7 +110,7 @@ static int seq_start = 0;static const char *filename =NULL ;static int rfcmode =0 ; -static int master =0 ; +static int central =0 ;static int auth =0 ;static int encr =0 ;static int secure =0 ;
@@ -483,7 +483,7 @@ static int do_connect(char *svr) opt =0 ;if (reliable) opt |=L2CAP_LM_RELIABLE ; -if (master) +if (central) opt |=L2CAP_LM_CENTRAL ;if (auth) opt |=L2CAP_LM_AUTH ;
@@ -586,7 +586,7 @@ static void do_listen(void (*handler)(int sk)) opt =0 ;if (reliable) opt |=L2CAP_LM_RELIABLE ; -if (master) +if (central) opt |=L2CAP_LM_CENTRAL ;if (auth) opt |=L2CAP_LM_AUTH ;
@@ -1306,7 +1306,7 @@ static void usage(void)"\t[-W seconds] enable deferred setup\n" "\t[-B filename] use data packets from file\n" "\t[-N num] send num frames (default = infinite)\n" -"\t[-C num] send num frames before delay (default = 1)\n" +"\t[-M num] send num frames before delay (default = 1)\n" "\t[-D milliseconds] delay after sending num frames (default = 0)\n" "\t[-K milliseconds] delay before receiving (default = 0)\n" "\t[-g milliseconds] delay before disconnecting (default = 0)\n"
@@ -1323,7 +1323,7 @@ static void usage(void)"\t[-A] request authentication\n" "\t[-E] request encryption\n" "\t[-S] secure connection\n" -"\t[-M] become master\n" +"\t[-C] become central\n" "\t[-T] enable timestamps\n" "\t[-V type] address type (help for list, default = bredr)\n" "\t[-e seq] initial sequence value (default = 0)\n");
@@ -1337,7 +1337,7 @@ int main(int argc, char *argv[])bacpy (&bdaddr,BDADDR_ANY );while ((opt =getopt (argc, argv,"a:b:cde:g:i:mnpqrstuwxyz" -"AB:C:D:EF:GH:I:J:K:L:MN:O:P:Q:RSTUV:W:X:Y:Z:" )) !=EOF ) { +"AB:CD:EF:GH:I:J:K:L:M:N:O:P:Q:RSTUV:W:X:Y:Z:" )) !=EOF ) {switch (opt) {case 'r' : mode =RECV ;
@@ -1442,7 +1442,7 @@ int main(int argc, char *argv[]) num_frames =atoi (optarg);break ; -case 'C' : +case 'M' : count =atoi (optarg);break ;
@@ -1488,8 +1488,8 @@ int main(int argc, char *argv[]) reliable =1 ;break ; -case 'M' : - master =1 ; +case 'C' : + central =1 ;break ;case 'A' :
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 44/62 tools/rctest: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
tools/rctest.c | 18 +++++++++--------- tools/rctest.rst | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-)
tools/rctest.c +9 -9
@@ -76,7 +76,7 @@ static const char *filename = NULL;static const char *savefile =NULL ;static int save_fd =-1 ; -static int master =0 ; +static int central =0 ;static int auth =0 ;static int encr =0 ;static int secure =0 ;
@@ -202,7 +202,7 @@ static int do_connect(const char *svr)/* Set link mode */ opt =0 ; -if (master) +if (central) opt |=RFCOMM_LM_CENTRAL ;if (auth) opt |=RFCOMM_LM_AUTH ;
@@ -293,7 +293,7 @@ static void do_listen(void (*handler)(int sk))/* Set link mode */ opt =0 ; -if (master) +if (central) opt |=RFCOMM_LM_CENTRAL ;if (auth) opt |=RFCOMM_LM_AUTH ;
@@ -679,13 +679,13 @@ static void usage(void)"\t[-B filename] use data packets from file\n" "\t[-O filename] save received data to file\n" "\t[-N num] number of frames to send\n" -"\t[-C num] send num frames before delay (default = 1)\n" +"\t[-M num] send num frames before delay (default = 1)\n" "\t[-D milliseconds] delay after sending num frames (default = 0)\n" "\t[-Y priority] socket priority\n" "\t[-A] request authentication\n" "\t[-E] request encryption\n" "\t[-S] secure connection\n" -"\t[-M] become master\n" +"\t[-C] become central\n" "\t[-T] enable timestamps\n"); }
@@ -697,7 +697,7 @@ int main(int argc, char *argv[])bacpy (&bdaddr,BDADDR_ANY );bacpy (&auto_bdaddr,BDADDR_ANY ); -while ((opt=getopt (argc,argv,"rdscuwmna:b:i:P:U:B:O:N:MAESL:W:C:D:Y:T" )) !=EOF ) { +while ((opt=getopt (argc,argv,"rdscuwmna:b:i:P:U:B:O:N:CAESL:W:M:D:Y:T" )) !=EOF ) {switch (opt) {case 'r' : mode =RECV ;
@@ -769,8 +769,8 @@ int main(int argc, char *argv[]) uuid =atoi (optarg);break ; -case 'M' : - master =1 ; +case 'C' : + central =1 ;break ;case 'A' :
@@ -805,7 +805,7 @@ int main(int argc, char *argv[]) num_frames =atoi (optarg);break ; -case 'C' : +case 'M' : count =atoi (optarg);break ;
tools/rctest.rst +2 -2
@@ -56,7 +56,7 @@ OPTIONS -N num send num frames --C num send num frames before delay (default: 1) +-M num send num frames before delay (default: 1) -D milliseconds delay milliseconds after sending num frames (default: 0)
@@ -66,7 +66,7 @@ OPTIONS -S secure connection --M become master +-C become central -T enable timestamps
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 45/62 tools/rfcomm: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
tools/rfcomm.c | 14 +++++++------- tools/rfcomm.rst | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-)
tools/rfcomm.c +7 -7
@@ -37,7 +37,7 @@ static int rfcomm_raw_tty = 0;static int auth =0 ;static int encryption =0 ;static int secure =0 ; -static int master =0 ; +static int central =0 ;static int linger =0 ;static char *rfcomm_state[] = {
@@ -434,7 +434,7 @@ static void cmd_listen(int ctl, int dev, bdaddr_t *bdaddr, int argc, char **argv } lm =0 ; -if (master) +if (central) lm |=RFCOMM_LM_CENTRAL ;if (auth) lm |=RFCOMM_LM_AUTH ;
@@ -646,7 +646,7 @@ static void usage(void)"\t-A, --auth Enable authentication\n" "\t-E, --encrypt Enable encryption\n" "\t-S, --secure Secure connection\n" -"\t-M, --master Become the master of a piconet\n" +"\t-C, --central Become the central of a piconet\n" "\t-L, --linger [seconds] Set linger timeout\n" "\t-a Show all devices (default)\n" "\n");
@@ -668,7 +668,7 @@ static struct option main_options[] = { { "auth", 0, 0, 'A' }, { "encrypt", 0, 0, 'E' }, { "secure", 0, 0, 'S' }, - { "master", 0, 0, 'M' }, + { "central", 0, 0, 'C' }, { "linger", 1, 0, 'L' }, { 0, 0, 0, 0 } };
@@ -680,7 +680,7 @@ int main(int argc, char *argv[])bacpy (&bdaddr,BDADDR_ANY ); -while ((opt =getopt_long (argc, argv,"+i:rahAESML:" , main_options,NULL )) !=-1 ) { +while ((opt =getopt_long (argc, argv,"+i:rahAESCL:" , main_options,NULL )) !=-1 ) {switch (opt) {case 'i' :if (strncmp (optarg,"hci" ,3 ) ==0 )
@@ -713,8 +713,8 @@ int main(int argc, char *argv[]) secure =1 ;break ; -case 'M' : - master =1 ; +case 'C' : + central =1 ;break ;case 'L' :
tools/rfcomm.rst +1 -1
@@ -47,7 +47,7 @@ OPTIONS -S Secure connection --M Become the master of a piconet +-C Become the central of a piconet -L <seconds> Set linger timeout
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 46/62 plugins/sixaxis: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
plugins/sixaxis.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-)
plugins/sixaxis.c +22 -22
@@ -139,7 +139,7 @@ static int get_device_bdaddr(int fd, bdaddr_t *bdaddr, CablePairingType type)return -1 ; } -static int sixaxis_get_master_bdaddr (int fd,bdaddr_t *bdaddr) +static int sixaxis_get_central_bdaddr (int fd,bdaddr_t *bdaddr) {uint8_t buf[8 ];int ret;
@@ -150,7 +150,7 @@ static int sixaxis_get_master_bdaddr(int fd, bdaddr_t *bdaddr) ret =ioctl (fd,HIDIOCGFEATURE (sizeof (buf)), buf);if (ret <0 ) { -error ("sixaxis: failed to read master address (%s)" , +error ("sixaxis: failed to read central address (%s)" ,strerror (errno));return ret; }
@@ -160,7 +160,7 @@ static int sixaxis_get_master_bdaddr(int fd, bdaddr_t *bdaddr)return 0 ; } -static int ds4_get_master_bdaddr (int fd,bdaddr_t *bdaddr) +static int ds4_get_central_bdaddr (int fd,bdaddr_t *bdaddr) {uint8_t buf[16 ];int ret;
@@ -171,7 +171,7 @@ static int ds4_get_master_bdaddr(int fd, bdaddr_t *bdaddr) ret =ioctl (fd,HIDIOCGFEATURE (sizeof (buf)), buf);if (ret <0 ) { -error ("sixaxis: failed to read DS4 master address (%s)" , +error ("sixaxis: failed to read DS4 central address (%s)" ,strerror (errno));return ret; }
@@ -182,16 +182,16 @@ static int ds4_get_master_bdaddr(int fd, bdaddr_t *bdaddr)return 0 ; } -static int get_master_bdaddr (int fd,bdaddr_t *bdaddr,CablePairingType type) +static int get_central_bdaddr (int fd,bdaddr_t *bdaddr,CablePairingType type) {if (type ==CABLE_PAIRING_SIXAXIS ) -return sixaxis_get_master_bdaddr (fd, bdaddr); +return sixaxis_get_central_bdaddr (fd, bdaddr);else if (type ==CABLE_PAIRING_DS4 ) -return ds4_get_master_bdaddr (fd, bdaddr); +return ds4_get_central_bdaddr (fd, bdaddr);return -1 ; } -static int sixaxis_set_master_bdaddr (int fd,const bdaddr_t *bdaddr) +static int sixaxis_set_central_bdaddr (int fd,const bdaddr_t *bdaddr) {uint8_t buf[8 ];int ret;
@@ -203,13 +203,13 @@ static int sixaxis_set_master_bdaddr(int fd, const bdaddr_t *bdaddr) ret =ioctl (fd,HIDIOCSFEATURE (sizeof (buf)), buf);if (ret <0 ) -error ("sixaxis: failed to write master address (%s)" , +error ("sixaxis: failed to write central address (%s)" ,strerror (errno));return ret; } -static int ds4_set_master_bdaddr (int fd,const bdaddr_t *bdaddr) +static int ds4_set_central_bdaddr (int fd,const bdaddr_t *bdaddr) {uint8_t buf[23 ];int ret;
@@ -223,19 +223,19 @@ static int ds4_set_master_bdaddr(int fd, const bdaddr_t *bdaddr) ret =ioctl (fd,HIDIOCSFEATURE (sizeof (buf)), buf);if (ret <0 ) -error ("sixaxis: failed to write DS4 master address (%s)" , +error ("sixaxis: failed to write DS4 central address (%s)" ,strerror (errno));return ret; } -static int set_master_bdaddr (int fd,const bdaddr_t *bdaddr, +static int set_central_bdaddr (int fd,const bdaddr_t *bdaddr,CablePairingType type) {if (type ==CABLE_PAIRING_SIXAXIS ) -return sixaxis_set_master_bdaddr (fd, bdaddr); +return sixaxis_set_central_bdaddr (fd, bdaddr);else if (type ==CABLE_PAIRING_DS4 ) -return ds4_set_master_bdaddr (fd, bdaddr); +return ds4_set_central_bdaddr (fd, bdaddr);return -1 ; }
@@ -267,8 +267,8 @@ static void agent_auth_cb(DBusError *derr, void *user_data) {struct authentication_closure *closure = user_data;struct authentication_destroy_closure *destroy; -char master_addr[18 ], adapter_addr[18 ], device_addr[18 ]; -bdaddr_t master_bdaddr; +char central_addr[18 ], adapter_addr[18 ], device_addr[18 ]; +bdaddr_t central_bdaddr;const bdaddr_t *adapter_bdaddr;bool remove_device = true;
@@ -283,12 +283,12 @@ static void agent_auth_cb(DBusError *derr, void *user_data) goto out; } -if (get_master_bdaddr (closure->fd, &master_bdaddr, closure->type) <0 ) +if (get_central_bdaddr (closure->fd, ¢ral_bdaddr, closure->type) <0 ) goto out; adapter_bdaddr =btd_adapter_get_address (closure->adapter); -if (bacmp (adapter_bdaddr, &master_bdaddr)) { -if (set_master_bdaddr (closure->fd, adapter_bdaddr, +if (bacmp (adapter_bdaddr, ¢ral_bdaddr)) { +if (set_central_bdaddr (closure->fd, adapter_bdaddr, closure->type) <0 ) goto out; }
@@ -302,10 +302,10 @@ static void agent_auth_cb(DBusError *derr, void *user_data) SIXAXIS_HID_SDP_RECORD);ba2str (&closure->bdaddr, device_addr); -ba2str (&master_bdaddr, master_addr); +ba2str (¢ral_bdaddr, central_addr);ba2str (adapter_bdaddr, adapter_addr); -DBG ("remote %s old_master %s new_master %s" , - device_addr, master_addr, adapter_addr); +DBG ("remote %s old_central %s new_central %s" , + device_addr, central_addr, adapter_addr); out:g_hash_table_steal (pending_auths, closure->sysfs_path);
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 47/62 profiles/audio: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
profiles/audio/avctp.c | 10 +++++----- profiles/audio/avctp.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
profiles/audio/avctp.c +5 -5
@@ -1614,7 +1614,7 @@ static void avctp_confirm_cb(GIOChannel *chan, gpointer data)return ; } -static GIOChannel *avctp_server_socket (const bdaddr_t *src,gboolean master, +static GIOChannel *avctp_server_socket (const bdaddr_t *src,gboolean central,uint8_t mode,uint16_t psm) {GError *err =NULL ;
@@ -1625,7 +1625,7 @@ static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean master,BT_IO_OPT_SOURCE_BDADDR , src,BT_IO_OPT_PSM , psm,BT_IO_OPT_SEC_LEVEL ,BT_IO_SEC_MEDIUM , -BT_IO_OPT_CENTRAL , master, +BT_IO_OPT_CENTRAL , central,BT_IO_OPT_MODE , mode, BT_IO_OPT_INVALID);if (!io) {
@@ -1636,20 +1636,20 @@ static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean master,return io; } -int avctp_register (struct btd_adapter *adapter,gboolean master) +int avctp_register (struct btd_adapter *adapter,gboolean central) {struct avctp_server *server;const bdaddr_t *src =btd_adapter_get_address (adapter); server = g_new0(struct avctp_server, 1); - server->control_io =avctp_server_socket (src, master,BT_IO_MODE_BASIC , + server->control_io =avctp_server_socket (src, central,BT_IO_MODE_BASIC ,AVCTP_CONTROL_PSM );if (!server->control_io) {g_free (server);return -1 ; } - server->browsing_io =avctp_server_socket (src, master,BT_IO_MODE_ERTM , + server->browsing_io =avctp_server_socket (src, central,BT_IO_MODE_ERTM ,AVCTP_BROWSING_PSM );if (!server->browsing_io) {if (server->control_io) {
profiles/audio/avctp.h +1 -1
@@ -145,7 +145,7 @@ unsigned int avctp_add_state_cb(struct btd_device *dev, avctp_state_cb cb, void *user_data);gboolean avctp_remove_state_cb (unsigned int id); -int avctp_register (struct btd_adapter *adapter,gboolean master); +int avctp_register (struct btd_adapter *adapter,gboolean central);void avctp_unregister (struct btd_adapter *adapter);struct avctp *avctp_connect (struct btd_device *device);
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 48/62 profiles/health: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3.
---
profiles/health/mcap.c | 20 ++++++++++---------- profiles/health/mcap.h | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-)
profiles/health/mcap.c +10 -10
@@ -52,15 +52,15 @@struct mcap_csp {uint64_t base_tmstamp;/* CSP base timestamp */ struct timespec base_time;/* CSP base time when timestamp set */ -guint local_caps;/* CSP-Master: have got remote caps */ -guint remote_caps;/* CSP-Slave: remote master got caps */ -guint rem_req_acc;/* CSP-Slave: accuracy required by master */ -guint ind_expected;/* CSP-Master: indication expected */ -uint8_t csp_req;/* CSP-Master: Request control flag */ -guint ind_timer;/* CSP-Slave: indication timer */ -guint set_timer;/* CSP-Slave: delayed set timer */ -void *set_data;/* CSP-Slave: delayed set data */ -void *csp_priv_data;/* CSP-Master: In-flight request data */ +guint local_caps;/* CSP-Central: have got remote caps */ +guint remote_caps;/* CSP-Peripheral: remote central got caps */ +guint rem_req_acc;/* CSP-Peripheral: accuracy required by central */ +guint ind_expected;/* CSP-Central: indication expected */ +uint8_t csp_req;/* CSP-Central: Request control flag */ +guint ind_timer;/* CSP-Peripheral: indication timer */ +guint set_timer;/* CSP-Peripheral: delayed set timer */ +void *set_data;/* CSP-Peripheral: delayed set data */ +void *csp_priv_data;/* CSP-Central: In-flight request data */ };struct mcap_sync_cap_cbdata {
@@ -3139,7 +3139,7 @@ void mcap_sync_set_req(struct mcap_mcl *mcl, uint8_t update, uint32_t btclock,g_set_error (err,MCAP_CSP_ERROR ,MCAP_ERROR_RESOURCE_UNAVAILABLE , -"Did not get CSP caps from slave yet" ); +"Did not get CSP caps from peripheral yet" );return ; }
profiles/health/mcap.h +1 -1
@@ -270,7 +270,7 @@ struct mcap_instance {mcap_mcl_event_cb mcl_reconnected_cb;/* Old MCL has been reconnected */ mcap_mcl_event_cb mcl_disconnected_cb;/* MCL disconnected */ mcap_mcl_event_cb mcl_uncached_cb;/* MCL has been removed from MCAP cache */ -mcap_info_ind_event_cb mcl_sync_infoind_cb;/* (CSP Master) Received info indication */ +mcap_info_ind_event_cb mcl_sync_infoind_cb;/* (CSP Central) Received info indication */ gpointer user_data;/* Data to be provided in callbacks */ int ref;/* Reference counter */
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 49/62 sdp: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" is preferred, as reflected in the BT core spec 5.3.
---
src/sdpd-server.c | 8 ++++---- src/sdpd.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
src/sdpd-server.c +4 -4
@@ -41,7 +41,7 @@ static int l2cap_sock = -1, unix_sock = -1;* l2cap and unix sockets over which discovery and registration clients * access us respectively */ -static int init_server (uint16_t mtu,int master,int compat) +static int init_server (uint16_t mtu,int central,int compat) {struct l2cap_options opts;struct sockaddr_l2 l2addr;
@@ -71,7 +71,7 @@ static int init_server(uint16_t mtu, int master, int compat)return -1 ; } -if (master) { +if (central) {int opt =L2CAP_LM_CENTRAL ;if (setsockopt (l2cap_sock,SOL_L2CAP ,L2CAP_LM , &opt,sizeof (opt)) <0 ) {error ("setsockopt: %s" ,strerror (errno));
@@ -218,12 +218,12 @@ static gboolean io_accept_event(GIOChannel *chan, GIOCondition cond, gpointer daint start_sdp_server (uint16_t mtu,uint32_t flags) {int compat = flags &SDP_SERVER_COMPAT ; -int master = flags &SDP_SERVER_MASTER ; +int central = flags &SDP_SERVER_CENTRAL ;GIOChannel *io;info ("Starting SDP server" ); -if (init_server (mtu, master, compat) <0 ) { +if (init_server (mtu, central, compat) <0 ) {error ("Server initialization failed" );return -1 ; }
src/sdpd.h +1 -1
@@ -59,7 +59,7 @@ uint32_t sdp_next_handle(void);uint32_t sdp_get_time (void );#define SDP_SERVER_COMPAT (1 << 0) -#define SDP_SERVER_MASTER (1 << 1) +#define SDP_SERVER_CENTRAL (1 << 1)int start_sdp_server (uint16_t mtu,uint32_t flags);void stop_sdp_server (void );
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 50/62 adapter: Inclusive language for central and peripheral
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3.
Also use "primary" to refer the global mgmt struct.
---
src/adapter.c | 93 ++++++++++++++++++++++++++------------------------- 1 file changed, 47 insertions(+), 46 deletions(-)
src/adapter.c +47 -46
@@ -112,7 +112,7 @@ static bool powering_down = false;static GSList *adapters =NULL ; -static struct mgmt *mgmt_master =NULL ; +static struct mgmt *mgmt_primary =NULL ;static uint8_t mgmt_version =0 ;static uint8_t mgmt_revision =0 ;
@@ -134,7 +134,7 @@ struct smp_ltk_info {bdaddr_t bdaddr;uint8_t bdaddr_type;uint8_t authenticated; -bool master; +bool central;uint8_t enc_size;uint16_t ediv;uint64_t rand;
@@ -3595,7 +3595,7 @@ static struct smp_ltk_info *get_ltk(GKeyFile *key_file, const char *peer, {struct smp_ltk_info *ltk =NULL ;GError *gerr =NULL ; -bool master; +bool central;char *key;char *rand =NULL ;
@@ -3609,8 +3609,8 @@ static struct smp_ltk_info *get_ltk(GKeyFile *key_file, const char *peer, ltk = g_new0(struct smp_ltk_info, 1); -/* Default to assuming a master key */ - ltk->master = true; +/* Default to assuming a central key */ + ltk->central = true;str2ba (peer, <k->bdaddr); ltk->bdaddr_type = peer_type;
@@ -3651,11 +3651,11 @@ static struct smp_ltk_info *get_ltk(GKeyFile *key_file, const char *peer, NULL); ltk->ediv =g_key_file_get_integer (key_file, group,"EDiv" ,NULL ); - master =g_key_file_get_boolean (key_file, group,"Master" , &gerr); + central =g_key_file_get_boolean (key_file, group,"Master" , &gerr);if (gerr)g_error_free (gerr);else - ltk->master = master; + ltk->central = central; ltk->is_blocked =is_blocked_key (HCI_BLOCKED_KEY_TYPE_LTK , ltk->val);
@@ -3675,7 +3675,7 @@ static struct smp_ltk_info *get_ltk_info(GKeyFile *key_file, const char *peer,return get_ltk (key_file, peer, bdaddr_type,"LongTermKey" ); } -static struct smp_ltk_info *get_slave_ltk_info (GKeyFile *key_file, +static struct smp_ltk_info *get_peripheral_ltk_info (GKeyFile *key_file,const char *peer,uint8_t bdaddr_type) {
@@ -3685,7 +3685,7 @@ static struct smp_ltk_info *get_slave_ltk_info(GKeyFile *key_file, ltk =get_ltk (key_file, peer, bdaddr_type,"SlaveLongTermKey" );if (ltk) - ltk->master = false; + ltk->central = false;return ltk; }
@@ -4028,7 +4028,7 @@ static void load_ltks(struct btd_adapter *adapter, GSList *keys) key->rand =cpu_to_le64 (info->rand); key->ediv =cpu_to_le16 (info->ediv); key->type = info->authenticated; - key->central = info->master; + key->central = info->central; key->enc_size = info->enc_size; }
@@ -4487,7 +4487,7 @@ static void load_devices(struct btd_adapter *adapter)GKeyFile *key_file;struct link_key_info *key_info;struct smp_ltk_info *ltk_info; -struct smp_ltk_info *slave_ltk_info; +struct smp_ltk_info *peripheral_ltk_info;GSList *list;struct irk_info *irk_info;struct conn_param *param;
@@ -4512,16 +4512,16 @@ static void load_devices(struct btd_adapter *adapter) ltk_info =get_ltk_info (key_file, entry->d_name, bdaddr_type); - slave_ltk_info =get_slave_ltk_info (key_file, entry->d_name, - bdaddr_type); + peripheral_ltk_info =get_peripheral_ltk_info (key_file, + entry->d_name, bdaddr_type); irk_info =get_irk_info (key_file, entry->d_name, bdaddr_type);// If any key for the device is blocked, we discard all. if ((key_info && key_info->is_blocked) || (ltk_info && ltk_info->is_blocked) || - (slave_ltk_info && - slave_ltk_info->is_blocked) || + (peripheral_ltk_info && + peripheral_ltk_info->is_blocked) || (irk_info && irk_info->is_blocked)) {if (key_info) {
@@ -4534,9 +4534,9 @@ static void load_devices(struct btd_adapter *adapter) ltk_info =NULL ; } -if (slave_ltk_info) { -g_free (slave_ltk_info); - slave_ltk_info =NULL ; +if (peripheral_ltk_info) { +g_free (peripheral_ltk_info); + peripheral_ltk_info =NULL ; }if (irk_info) {
@@ -4553,8 +4553,8 @@ static void load_devices(struct btd_adapter *adapter)if (ltk_info) ltks =g_slist_append (ltks, ltk_info); -if (slave_ltk_info) - ltks =g_slist_append (ltks, slave_ltk_info); +if (peripheral_ltk_info) + ltks =g_slist_append (ltks, peripheral_ltk_info);if (irk_info) irks =g_slist_append (irks, irk_info);
@@ -4588,16 +4588,16 @@ device_exist:device_set_bonded (device,BDADDR_BREDR ); } -if (ltk_info || slave_ltk_info) { +if (ltk_info || peripheral_ltk_info) {device_set_paired (device, bdaddr_type);device_set_bonded (device, bdaddr_type);if (ltk_info)device_set_ltk_enc_size (device, ltk_info->enc_size); -else if (slave_ltk_info) +else if (peripheral_ltk_info)device_set_ltk_enc_size (device, - slave_ltk_info->enc_size); + peripheral_ltk_info->enc_size); } free:
@@ -5596,7 +5596,7 @@ static void convert_ltk_entry(GKeyFile *key_file, void *value) {char *auth_str, *rand_str, *str;int i, ret; -unsigned char auth, master, enc_size; +unsigned char auth, central, enc_size;unsigned short ediv; auth_str =strchr (value,' ' );
@@ -5613,7 +5613,7 @@ static void convert_ltk_entry(GKeyFile *key_file, void *value) rand_str++; } - ret =sscanf (auth_str," %hhd %hhd %hhd %hd" , &auth, &master, + ret =sscanf (auth_str," %hhd %hhd %hhd %hd" , &auth, ¢ral, &enc_size, &ediv);if (ret <4 )return ;
@@ -5623,7 +5623,7 @@ static void convert_ltk_entry(GKeyFile *key_file, void *value)g_free (str);g_key_file_set_integer (key_file,"LongTermKey" ,"Authenticated" , auth); -g_key_file_set_integer (key_file,"LongTermKey" ,"Master" , master); +g_key_file_set_integer (key_file,"LongTermKey" ,"Master" , central);g_key_file_set_integer (key_file,"LongTermKey" ,"EncSize" , enc_size);g_key_file_set_integer (key_file,"LongTermKey" ,"EDiv" , ediv);
@@ -6312,7 +6312,7 @@ static struct btd_adapter *btd_adapter_new(uint16_t index)return NULL ; adapter->dev_id = index; - adapter->mgmt =mgmt_ref (mgmt_master); + adapter->mgmt =mgmt_ref (mgmt_primary); adapter->pincode_requested = false;/*
@@ -8043,11 +8043,11 @@ static void new_link_key_callback(uint16_t index, uint16_t length,static void store_longtermkey (struct btd_adapter *adapter,const bdaddr_t *peer,uint8_t bdaddr_type,const unsigned char *key, -uint8_t master,uint8_t authenticated, +uint8_t central,uint8_t authenticated,uint8_t enc_size,uint16_t ediv,uint64_t rand) { -const char *group = master ?"LongTermKey" :"SlaveLongTermKey" ; +const char *group = central ?"LongTermKey" :"SlaveLongTermKey" ;char device_addr[18 ];char filename[PATH_MAX ];GKeyFile *key_file;
@@ -8056,8 +8056,8 @@ static void store_longtermkey(struct btd_adapter *adapter, const bdaddr_t *peer,char *str;int i; -if (master !=0x00 && master !=0x01 ) { -error ("Unsupported LTK type %u" , master); +if (central !=0x00 && central !=0x01 ) { +error ("Unsupported LTK type %u" , central);return ; }
@@ -9220,7 +9220,8 @@ static bool set_blocked_keys(struct btd_adapter *adapter) sizeof(cp->keys[i].val)); } -return mgmt_send (mgmt_master,MGMT_OP_SET_BLOCKED_KEYS , adapter->dev_id, +return mgmt_send (mgmt_primary,MGMT_OP_SET_BLOCKED_KEYS , + adapter->dev_id,sizeof (buffer), buffer, set_blocked_keys_complete, adapter,NULL );
@@ -9698,7 +9699,7 @@ static void reset_adv_monitors(uint16_t index)/* Handle 0 indicates to remove all */ cp.monitor_handle =0 ; -if (mgmt_send (mgmt_master,MGMT_OP_REMOVE_ADV_MONITOR , index, +if (mgmt_send (mgmt_primary,MGMT_OP_REMOVE_ADV_MONITOR , index,sizeof (cp), &cp, reset_adv_monitors_complete,NULL ,NULL ) >0 ) {return ;
@@ -9748,7 +9749,7 @@ static void index_added(uint16_t index, uint16_t length, const void *param,DBG ("sending read info command for index %u" , index); -if (mgmt_send (mgmt_master,MGMT_OP_READ_INFO , index,0 ,NULL , +if (mgmt_send (mgmt_primary,MGMT_OP_READ_INFO , index,0 ,NULL , read_info_complete, adapter,NULL ) >0 )return ;
@@ -9932,18 +9933,18 @@ static void read_version_complete(uint8_t status, uint16_t length,* It is irrelevant if this command succeeds or fails. In case of * failure safe settings are assumed. */ -mgmt_send (mgmt_master,MGMT_OP_READ_COMMANDS , +mgmt_send (mgmt_primary,MGMT_OP_READ_COMMANDS ,MGMT_INDEX_NONE ,0 ,NULL , read_commands_complete,NULL ,NULL ); -mgmt_register (mgmt_master,MGMT_EV_INDEX_ADDED ,MGMT_INDEX_NONE , +mgmt_register (mgmt_primary,MGMT_EV_INDEX_ADDED ,MGMT_INDEX_NONE , index_added,NULL ,NULL ); -mgmt_register (mgmt_master,MGMT_EV_INDEX_REMOVED ,MGMT_INDEX_NONE , +mgmt_register (mgmt_primary,MGMT_EV_INDEX_REMOVED ,MGMT_INDEX_NONE , index_removed,NULL ,NULL );DBG ("sending read index list command" ); -if (mgmt_send (mgmt_master,MGMT_OP_READ_INDEX_LIST , +if (mgmt_send (mgmt_primary,MGMT_OP_READ_INDEX_LIST ,MGMT_INDEX_NONE ,0 ,NULL , read_index_list_complete,NULL ,NULL ) >0 )return ;
@@ -9962,18 +9963,18 @@ int adapter_init(void) { dbus_conn =btd_get_dbus_connection (); - mgmt_master =mgmt_new_default (); -if (!mgmt_master) { + mgmt_primary =mgmt_new_default (); +if (!mgmt_primary) {error ("Failed to access management interface" );return -EIO ; }if (getenv ("MGMT_DEBUG" )) -mgmt_set_debug (mgmt_master, mgmt_debug,"mgmt: " ,NULL ); +mgmt_set_debug (mgmt_primary, mgmt_debug,"mgmt: " ,NULL );DBG ("sending read version command" ); -if (mgmt_send (mgmt_master,MGMT_OP_READ_VERSION , +if (mgmt_send (mgmt_primary,MGMT_OP_READ_VERSION ,MGMT_INDEX_NONE ,0 ,NULL , read_version_complete,NULL ,NULL ) >0 )return 0 ;
@@ -10002,7 +10003,7 @@ void adapter_cleanup(void)* This is just an extra precaution to be safe, and in * reality should not make a difference. */ -mgmt_unregister_index (mgmt_master,MGMT_INDEX_NONE ); +mgmt_unregister_index (mgmt_primary,MGMT_INDEX_NONE );/* * In case there is another reference active, cancel
@@ -10012,10 +10013,10 @@ void adapter_cleanup(void)* that potentially then could leak memory or access * an invalid structure. */ -mgmt_cancel_index (mgmt_master,MGMT_INDEX_NONE ); +mgmt_cancel_index (mgmt_primary,MGMT_INDEX_NONE ); -mgmt_unref (mgmt_master); - mgmt_master =NULL ; +mgmt_unref (mgmt_primary); + mgmt_primary =NULL ; dbus_conn =NULL ; }
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 51/62 adapter: Inclusive language for storing LTK
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3.
---
doc/settings-storage.txt | 4 ++-- src/adapter.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-)
doc/settings-storage.txt +2 -2
@@ -294,9 +294,9 @@ Long term key) related to a remote device. Rand Integer Randomizer -[SlaveLongTermKey] group contains: +[PeripheralLongTermKey] group contains: - Same as the [LongTermKey] group, except for slave keys. + Same as the [LongTermKey] group, except for peripheral keys. [ConnectionParameters] group contains:
src/adapter.c +5 -5
@@ -3651,7 +3651,7 @@ static struct smp_ltk_info *get_ltk(GKeyFile *key_file, const char *peer, NULL); ltk->ediv =g_key_file_get_integer (key_file, group,"EDiv" ,NULL ); - central =g_key_file_get_boolean (key_file, group,"Master" , &gerr); + central =g_key_file_get_boolean (key_file, group,"Central" , &gerr);if (gerr)g_error_free (gerr);else
@@ -3683,7 +3683,7 @@ static struct smp_ltk_info *get_peripheral_ltk_info(GKeyFile *key_file,DBG ("%s" , peer); - ltk =get_ltk (key_file, peer, bdaddr_type,"SlaveLongTermKey" ); + ltk =get_ltk (key_file, peer, bdaddr_type,"PeripheralLongTermKey" );if (ltk) ltk->central = false;
@@ -5623,7 +5623,7 @@ static void convert_ltk_entry(GKeyFile *key_file, void *value)g_free (str);g_key_file_set_integer (key_file,"LongTermKey" ,"Authenticated" , auth); -g_key_file_set_integer (key_file,"LongTermKey" ,"Master" , central); +g_key_file_set_integer (key_file,"LongTermKey" ,"Central" , central);g_key_file_set_integer (key_file,"LongTermKey" ,"EncSize" , enc_size);g_key_file_set_integer (key_file,"LongTermKey" ,"EDiv" , ediv);
@@ -8047,7 +8047,7 @@ static void store_longtermkey(struct btd_adapter *adapter, const bdaddr_t *peer, uint8_t enc_size, uint16_t ediv, uint64_t rand) { - const char *group = central ? "LongTermKey" : "SlaveLongTermKey"; + const char *group = central ? "LongTermKey" : "PeripheralLongTermKey";char device_addr[18 ];char filename[PATH_MAX ];GKeyFile *key_file;
@@ -8069,7 +8069,7 @@ static void store_longtermkey(struct btd_adapter *adapter, const bdaddr_t *peer,g_key_file_load_from_file (key_file, filename,0 ,NULL );/* Old files may contain this so remove it in case it exists */ -g_key_file_remove_key (key_file,"LongTermKey" ,"Master" ,NULL ); +g_key_file_remove_key (key_file,"LongTermKey" ,"Central" ,NULL );for (i =0 ; i <16 ; i++)sprintf (key_str + (i *2 ),"%2.2X" , key[i]);
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 52/62 adapter: Inclusive language for device filtering
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"accept list" and "reject list" are the preferred terms, as reflected in the BT core spec 5.3, also in
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
---
src/adapter.c | 18 ++++++++++-------- src/adapter.h | 4 ++-- src/device.c | 6 +++--- 3 files changed, 15 insertions(+), 13 deletions(-)
src/adapter.c +10 -8
@@ -4957,7 +4957,7 @@ void adapter_connect_list_remove(struct btd_adapter *adapter,trigger_passive_scanning (adapter); } -static void add_whitelist_complete (uint8_t status,uint16_t length, +static void add_accept_list_complete (uint8_t status,uint16_t length,const void *param,void *user_data) {const struct mgmt_rp_add_device *rp = param;
@@ -4988,10 +4988,11 @@ static void add_whitelist_complete(uint8_t status, uint16_t length,return ; } -DBG ("%s added to kernel whitelist" , addr); +DBG ("%s added to kernel accept list" , addr); } -void adapter_whitelist_add (struct btd_adapter *adapter,struct btd_device *dev) +void adapter_accept_list_add (struct btd_adapter *adapter, +struct btd_device *dev) {struct mgmt_cp_add_device cp;
@@ -5005,10 +5006,10 @@ void adapter_whitelist_add(struct btd_adapter *adapter, struct btd_device *dev)mgmt_send (adapter->mgmt,MGMT_OP_ADD_DEVICE , adapter->dev_id,sizeof (cp), &cp, - add_whitelist_complete, adapter,NULL ); + add_accept_list_complete, adapter,NULL ); } -static void remove_whitelist_complete (uint8_t status,uint16_t length, +static void remove_accept_list_complete (uint8_t status,uint16_t length,const void *param,void *user_data) {const struct mgmt_rp_remove_device *rp = param;
@@ -5027,10 +5028,11 @@ static void remove_whitelist_complete(uint8_t status, uint16_t length,return ; } -DBG ("%s removed from kernel whitelist" , addr); +DBG ("%s removed from kernel accept list" , addr); } -void adapter_whitelist_remove (struct btd_adapter *adapter,struct btd_device *dev) +void adapter_accept_list_remove (struct btd_adapter *adapter, +struct btd_device *dev) {struct mgmt_cp_remove_device cp;
@@ -5043,7 +5045,7 @@ void adapter_whitelist_remove(struct btd_adapter *adapter, struct btd_device *demgmt_send (adapter->mgmt,MGMT_OP_REMOVE_DEVICE , adapter->dev_id,sizeof (cp), &cp, - remove_whitelist_complete, adapter,NULL ); + remove_accept_list_complete, adapter,NULL ); } static void add_device_complete(uint8_t status, uint16_t length,
src/adapter.h +2 -2
@@ -214,9 +214,9 @@ void adapter_auto_connect_add(struct btd_adapter *adapter, struct btd_device *device);void adapter_auto_connect_remove (struct btd_adapter *adapter,struct btd_device *device); -void adapter_whitelist_add (struct btd_adapter *adapter, +void adapter_accept_list_add (struct btd_adapter *adapter,struct btd_device *dev); -void adapter_whitelist_remove (struct btd_adapter *adapter, +void adapter_accept_list_remove (struct btd_adapter *adapter,struct btd_device *dev); void btd_adapter_set_oob_handler(struct btd_adapter *adapter,
src/device.c +3 -3
@@ -1122,7 +1122,7 @@ static void set_blocked(GDBusPendingPropertySet id, gboolean value, void *data)break ;case EINVAL :g_dbus_pending_property_error (id,ERROR_INTERFACE ".Failed" , -"Kernel lacks blacklist support" ); +"Kernel lacks reject list support" );break ;default : g_dbus_pending_property_error(id, ERROR_INTERFACE ".Failed",
@@ -5714,7 +5714,7 @@ void btd_device_set_temporary(struct btd_device *device, bool temporary)if (temporary) {if (device->bredr) -adapter_whitelist_remove (device->adapter, device); +adapter_accept_list_remove (device->adapter, device);adapter_connect_list_remove (device->adapter, device);if (device->auto_connect) { device->disable_auto_connect = TRUE;
@@ -5726,7 +5726,7 @@ void btd_device_set_temporary(struct btd_device *device, bool temporary)clear_temporary_timer (device);if (device->bredr) -adapter_whitelist_add (device->adapter, device); +adapter_accept_list_add (device->adapter, device);store_device_info (device);
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 53/62 client: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
Use "parent" to describe dbus hierarchy.
---
client/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
client/main.c +3 -3
@@ -363,19 +363,19 @@ static void print_uuids(GDBusProxy *proxy) } } -static gboolean device_is_child (GDBusProxy *device,GDBusProxy *master) +static gboolean device_is_child (GDBusProxy *device,GDBusProxy *parent) {DBusMessageIter iter;const char *adapter, *path; -if (!master) +if (!parent)return FALSE;if (g_dbus_proxy_get_property (device,"Adapter" , &iter) == FALSE)return FALSE;dbus_message_iter_get_basic (&iter, &adapter); - path =g_dbus_proxy_get_path (master); + path =g_dbus_proxy_get_path (parent);if (!strcmp (path, adapter))return TRUE;
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 54/62 mesh: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"flooding", "accept list", and "reject list" are the preferred terms, as reflected in
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
---
mesh/net-keys.c | 38 +++++++++++++++++++------------------- mesh/net-keys.h | 8 ++++---- mesh/net.h | 4 ++-- 3 files changed, 25 insertions(+), 25 deletions(-)
mesh/net-keys.c +19 -19
@@ -45,7 +45,7 @@ struct net_key {uint16_t beacon_enables;uint8_t friend_key;uint8_t nid; -uint8_t master[16 ]; +uint8_t flooding[16 ];uint8_t encrypt[16 ];uint8_t privacy[16 ];uint8_t beacon[16 ];
@@ -53,7 +53,7 @@ struct net_key { };static struct l_queue *keys =NULL ; -static uint32_t last_master_id =0 ; +static uint32_t last_flooding_id =0 ;/* To avoid re-decrypting same packet for multiple nodes, cache and check */ static uint8_t cache_pkt[29 ];
@@ -63,11 +63,11 @@ static size_t cache_plainlen;static uint32_t cache_id;static uint32_t cache_iv_index; -static bool match_master (const void *a,const void *b) +static bool match_flooding (const void *a,const void *b) {const struct net_key *key = a; -return (memcmp (key->master, b,sizeof (key->master)) ==0 ); +return (memcmp (key->flooding, b,sizeof (key->flooding)) ==0 ); }static bool match_id (const void *a,const void *b)
@@ -87,9 +87,9 @@ static bool match_network(const void *a, const void *b) }/* Key added from Provisioning, NetKey Add or NetKey update */ -uint32_t net_key_add (const uint8_t master[16 ]) +uint32_t net_key_add (const uint8_t flooding[16 ]) { -struct net_key *key =l_queue_find (keys, match_master, master); +struct net_key *key =l_queue_find (keys, match_flooding, flooding);uint8_t p[] = {0 };bool result;
@@ -102,22 +102,22 @@ uint32_t net_key_add(const uint8_t master[16]) keys =l_queue_new (); key = l_new(struct net_key, 1); -memcpy (key->master, master,16 ); +memcpy (key->flooding, flooding,16 ); key->ref_cnt++; - result =mesh_crypto_k2 (master, p,sizeof (p), &key->nid, key->encrypt, + result =mesh_crypto_k2 (flooding, p,sizeof (p), &key->nid, key->encrypt, key->privacy);if (!result) goto fail; - result =mesh_crypto_k3 (master, key->network); + result =mesh_crypto_k3 (flooding, key->network);if (!result) goto fail; - result =mesh_crypto_nkbk (master, key->beacon); + result =mesh_crypto_nkbk (flooding, key->beacon);if (!result) goto fail; - key->id = ++last_master_id; + key->id = ++last_flooding_id;l_queue_push_tail (keys, key);return key->id;
@@ -126,11 +126,11 @@ fail:return 0 ; } -uint32_t net_key_frnd_add (uint32_t master_id,uint16_t lpn,uint16_t frnd, +uint32_t net_key_frnd_add (uint32_t flooding_id,uint16_t lpn,uint16_t frnd,uint16_t lp_cnt,uint16_t fn_cnt) {const struct net_key *key =l_queue_find (keys, match_id, -L_UINT_TO_PTR (master_id)); +L_UINT_TO_PTR (flooding_id));struct net_key *frnd_key;uint8_t p[9 ] = {0x01 };bool result;
@@ -145,7 +145,7 @@ uint32_t net_key_frnd_add(uint32_t master_id, uint16_t lpn, uint16_t frnd,l_put_be16 (lp_cnt, p +5 );l_put_be16 (fn_cnt, p +7 ); - result =mesh_crypto_k2 (key->master, p,sizeof (p), &frnd_key->nid, + result =mesh_crypto_k2 (key->flooding, p,sizeof (p), &frnd_key->nid, frnd_key->encrypt, frnd_key->privacy);if (!result) {
@@ -155,7 +155,7 @@ uint32_t net_key_frnd_add(uint32_t master_id, uint16_t lpn, uint16_t frnd, frnd_key->friend_key = true; frnd_key->ref_cnt++; - frnd_key->id = ++last_master_id; + frnd_key->id = ++last_flooding_id;l_queue_push_head (keys, frnd_key);return frnd_key->id;
@@ -174,22 +174,22 @@ void net_key_unref(uint32_t id) } } -bool net_key_confirm (uint32_t id,const uint8_t master[16 ]) +bool net_key_confirm (uint32_t id,const uint8_t flooding[16 ]) {struct net_key *key =l_queue_find (keys, match_id,L_UINT_TO_PTR (id));if (key) -return memcmp (key->master, master,sizeof (key->master)) ==0 ; +return !memcmp (key->flooding, flooding,sizeof (key->flooding));return false; } -bool net_key_retrieve (uint32_t id,uint8_t *master) +bool net_key_retrieve (uint32_t id,uint8_t *flooding) {struct net_key *key =l_queue_find (keys, match_id,L_UINT_TO_PTR (id));if (key) { -memcpy (master, key->master,sizeof (key->master)); +memcpy (flooding, key->flooding,sizeof (key->flooding));return true; }
mesh/net-keys.h +4 -4
@@ -13,10 +13,10 @@#define IV_INDEX_UPDATE 0x02void net_key_cleanup (void ); -bool net_key_confirm (uint32_t id,const uint8_t master[16 ]); -bool net_key_retrieve (uint32_t id,uint8_t *master); -uint32_t net_key_add (const uint8_t master[16 ]); -uint32_t net_key_frnd_add (uint32_t master_id,uint16_t lpn,uint16_t frnd, +bool net_key_confirm (uint32_t id,const uint8_t flooding[16 ]); +bool net_key_retrieve (uint32_t id,uint8_t *flooding); +uint32_t net_key_add (const uint8_t flooding[16 ]); +uint32_t net_key_frnd_add (uint32_t flooding_id,uint16_t lpn,uint16_t frnd,uint16_t lp_cnt,uint16_t fn_cnt);void net_key_unref (uint32_t id); uint32_t net_key_decrypt(uint32_t iv_index, const uint8_t *pkt, size_t len,
mesh/net.h +2 -2
@@ -86,8 +86,8 @@ struct mesh_node;#define PROXY_OP_FILTER_STATUS 0x03/* Proxy Filter Defines */ -#define PROXY_FILTER_WHITELIST 0x00 -#define PROXY_FILTER_BLACKLIST 0x01 +#define PROXY_FILTER_ACCEPT_LIST 0x00 +#define PROXY_FILTER_REJECT_LIST 0x01/* Network Tranport Opcodes */ #define NET_OP_SEG_ACKNOWLEDGE 0x00
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 55/62 tools/mesh: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"reject list" is preferred, as reflected in
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
---
tools/mesh-cfgclient.c | 4 ++-- tools/mesh/mesh-db.c | 28 +++++++++++----------- tools/mesh/mesh-db.h | 4 ++-- tools/mesh/remote.c | 53 +++++++++++++++++++++--------------------- tools/mesh/remote.h | 5 ++-- 5 files changed, 45 insertions(+), 49 deletions(-)
tools/mesh-cfgclient.c +2 -2
@@ -720,7 +720,7 @@ static void attach_node_reply(struct l_dbus_proxy *proxy, ivi != iv_index) { iv_index = ivi;mesh_db_set_iv_index (ivi); -remote_clear_blacklisted_addresses (ivi); +remote_clear_rejected_addresses (ivi); }return ;
@@ -1858,7 +1858,7 @@ static void property_changed(struct l_dbus_proxy *proxy, const char *name, iv_index = ivi;mesh_db_set_iv_index (ivi); -remote_clear_blacklisted_addresses (ivi); +remote_clear_rejected_addresses (ivi); } } }
tools/mesh/mesh-db.c +13 -15
@@ -1246,7 +1246,7 @@ bool mesh_db_set_iv_index(uint32_t ivi)return save_config (); } -static int get_blacklisted_by_iv_index (json_object *jarray,uint32_t iv_index) +static int get_rejected_by_iv_index (json_object *jarray,uint32_t iv_index) {int i, cnt;
@@ -1268,12 +1268,12 @@ static int get_blacklisted_by_iv_index(json_object *jarray, uint32_t iv_index)return -1 ; } -static bool load_blacklisted (json_object *jobj) +static bool load_rejected_addresses (json_object *jobj) {json_object *jarray;int i, cnt; -json_object_object_get_ex (jobj,"blacklistedAddresses" , &jarray); +json_object_object_get_ex (jobj,"rejectedAddresses" , &jarray);if (!jarray ||json_object_get_type (jarray) != json_type_array)return true;
@@ -1304,15 +1304,14 @@ static bool load_blacklisted(json_object *jobj)if (sscanf (str,"%04hx" , &unicast) !=1 )return false; -remote_add_blacklisted_address (unicast, iv_index, - false); +remote_add_rejected_address (unicast, iv_index, false); } }return true; } -bool mesh_db_add_blacklisted_addr (uint16_t unicast,uint32_t iv_index) +bool mesh_db_add_rejected_addr (uint16_t unicast,uint32_t iv_index) {json_object *jarray, *jobj, *jaddrs, *jstring;int idx;
@@ -1321,14 +1320,13 @@ bool mesh_db_add_blacklisted_addr(uint16_t unicast, uint32_t iv_index)if (!cfg || !cfg->jcfg)return false; -json_object_object_get_ex (cfg->jcfg,"blacklistedAddresses" , &jarray); +json_object_object_get_ex (cfg->jcfg,"rejectedAddresses" , &jarray);if (!jarray) { jarray =json_object_new_array (); -json_object_object_add (cfg->jcfg,"blacklistedAddresses" , - jarray); +json_object_object_add (cfg->jcfg,"rejectedAddresses" , jarray); } - idx =get_blacklisted_by_iv_index (jarray, iv_index); + idx =get_rejected_by_iv_index (jarray, iv_index);if (idx <0 ) { jobj =json_object_new_object ();
@@ -1362,7 +1360,7 @@ fail:return false; } -bool mesh_db_clear_blacklisted (uint32_t iv_index) +bool mesh_db_clear_rejected (uint32_t iv_index) {json_object *jarray;int idx;
@@ -1370,11 +1368,11 @@ bool mesh_db_clear_blacklisted(uint32_t iv_index)if (!cfg || !cfg->jcfg)return false; -json_object_object_get_ex (cfg->jcfg,"blacklistedAddresses" , &jarray); +json_object_object_get_ex (cfg->jcfg,"rejectedAddresses" , &jarray);if (!jarray ||json_object_get_type (jarray) != json_type_array)return false; - idx =get_blacklisted_by_iv_index (jarray, iv_index); + idx =get_rejected_by_iv_index (jarray, iv_index);if (idx <0 )return true;
@@ -1437,7 +1435,7 @@ bool mesh_db_create(const char *fname, const uint8_t token[8],if (!jarray) goto fail; -json_object_object_add (jcfg,"blacklistedAddresses" , jarray); +json_object_object_add (jcfg,"rejectedAddresses" , jarray);write_int (jcfg,"ivIndex" ,0 );
@@ -1504,7 +1502,7 @@ bool mesh_db_load(const char *fname)load_remotes (jcfg); -load_blacklisted (jcfg); +load_rejected_addresses (jcfg);return true; fail:
tools/mesh/mesh-db.h +2 -2
@@ -49,5 +49,5 @@ bool mesh_db_node_model_binding_del(uint16_t unicast, uint8_t ele, bool vendor, uint32_t mod_id, uint16_t app_idx);struct l_queue *mesh_db_load_groups (void );bool mesh_db_add_group (struct mesh_group *grp); -bool mesh_db_add_blacklisted_addr (uint16_t unicast,uint32_t iv_index); -bool mesh_db_clear_blacklisted (uint32_t iv_index); +bool mesh_db_add_rejected_addr (uint16_t unicast,uint32_t iv_index); +bool mesh_db_clear_rejected (uint32_t iv_index);
tools/mesh/remote.c +26 -27
112 lines not on this page · raw message
tools/mesh/remote.h +2 -3
@@ -13,9 +13,8 @@ bool remote_add_node(const uint8_t uuid[16], uint16_t unicast,uint8_t remote_del_node (uint16_t unicast);bool remote_set_model (uint16_t unicast,uint8_t ele_idx,uint32_t mod_id,bool vendor); -void remote_add_blacklisted_address (uint16_t addr,uint32_t iv_index, -bool save); -void remote_clear_blacklisted_addresses (uint32_t iv_index); +void remote_add_rejected_address (uint16_t addr,uint32_t iv_index,bool save); +void remote_clear_rejected_addresses (uint32_t iv_index);uint16_t remote_get_next_unicast (uint16_t low,uint16_t high,uint8_t ele_cnt);bool remote_add_net_key (uint16_t addr,uint16_t net_idx);bool remote_del_net_key (uint16_t addr,uint16_t net_idx);
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 56/62 tools/mesh-gatt: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"accept" and "reject list" are the preferred terms, as reflected in
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
---
tools/mesh-gatt/mesh-net.h | 4 +-- tools/mesh-gatt/net.c | 60 +++++++++++++++++++------------------- 2 files changed, 32 insertions(+), 32 deletions(-)
tools/mesh-gatt/mesh-net.h +2 -2
@@ -97,8 +97,8 @@#define PROXY_OP_FILTER_STATUS 0x03/* Proxy Filter Defines */ -#define PROXY_FILTER_WHITELIST 0x00 -#define PROXY_FILTER_BLACKLIST 0x01 +#define PROXY_FILTER_ACCEPT_LIST 0x00 +#define PROXY_FILTER_REJECT_LIST 0x01/* Network Tranport Opcodes */ #define NET_OP_SEG_ACKNOWLEDGE 0x00
tools/mesh-gatt/net.c +30 -30
117 lines not on this page · raw message
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 57/62 unit/mesh: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"flooding" is preferred, as reflected in
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
---
unit/test-mesh-crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
unit/test-mesh-crypto.c +2 -2
@@ -111,7 +111,7 @@ static const struct mesh_crypto_test s8_1_2 = { };static const struct mesh_crypto_test s8_1_3 = { - .name ="8.1.3 k2 function (master)" , + .name ="8.1.3 k2 function (flooding)" , .net_key ="f7a2a44f8e8a8029064f173ddc1e2b00" , .p ="00" , .nid ="7f" ,
@@ -159,7 +159,7 @@ static const struct mesh_crypto_test s8_2_1 = { };static const struct mesh_crypto_test s8_2_2 = { - .name ="8.2.2 Encryption and privacy keys (Master)" , + .name ="8.2.2 Encryption and privacy keys (flooding)" , .net_key ="7dd7364cd842ad18c17c2b820c84c3d6" , .p ="00" , .nid ="68" ,
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 58/62 doc/mesh: Inclusive language changes
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"flooding" is preferred, as reflected in
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
---
doc/mesh-api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
doc/mesh-api.txt +1 -1
@@ -585,7 +585,7 @@ Methods: org.bluez.mesh.Error.InvalidArguments void SetKeyPhase(uint16 net_index, uint8 phase) - This method is used to set the master key update phase of the + This method is used to set the flooding key update phase of the given subnet. When finalizing the procedure, it is important to CompleteAppKeyUpdate() on all app keys that have been updated during the procedure prior to setting phase 3.
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 59/62 android: Inclusive language for volume control
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
Use "main volume" and "main mute".
---
android/hal-audio.c | 12 ++++++------ android/hal-sco.c | 12 ++++++------ android/hardware/audio.h | 20 ++++++++++---------- 3 files changed, 22 insertions(+), 22 deletions(-)
android/hal-audio.c +6 -6
@@ -1237,7 +1237,7 @@ static int audio_set_voice_volume(struct audio_hw_device *dev, float volume)return -ENOSYS ; } -static int audio_set_master_volume (struct audio_hw_device *dev,float volume) +static int audio_set_main_volume (struct audio_hw_device *dev,float volume) {DBG ("" );return -ENOSYS ;
@@ -1346,13 +1346,13 @@ static int audio_dump(const audio_hw_device_t *device, int fd) }#if ANDROID_VERSION >=PLATFORM_VER (5 ,0 ,0 ) -static int set_master_mute (struct audio_hw_device *dev,bool mute) +static int set_main_mute (struct audio_hw_device *dev,bool mute) {DBG ("" );return -ENOSYS ; } -static int get_master_mute (struct audio_hw_device *dev,bool *mute) +static int get_main_mute (struct audio_hw_device *dev,bool *mute) {DBG ("" );return -ENOSYS ;
@@ -1574,7 +1574,7 @@ static int audio_open(const hw_module_t *module, const char *name, a2dp_dev->dev.init_check = audio_init_check; a2dp_dev->dev.set_voice_volume = audio_set_voice_volume; - a2dp_dev->dev.set_master_volume = audio_set_master_volume; + a2dp_dev->dev.set_main_volume = audio_set_main_volume; a2dp_dev->dev.set_mode = audio_set_mode; a2dp_dev->dev.set_mic_mute = audio_set_mic_mute; a2dp_dev->dev.get_mic_mute = audio_get_mic_mute;
@@ -1587,8 +1587,8 @@ static int audio_open(const hw_module_t *module, const char *name, a2dp_dev->dev.close_input_stream = audio_close_input_stream; a2dp_dev->dev.dump = audio_dump;#if ANDROID_VERSION >=PLATFORM_VER (5 ,0 ,0 ) - a2dp_dev->dev.set_master_mute = set_master_mute; - a2dp_dev->dev.get_master_mute = get_master_mute; + a2dp_dev->dev.set_main_mute = set_main_mute; + a2dp_dev->dev.get_main_mute = get_main_mute; a2dp_dev->dev.create_audio_patch = create_audio_patch; a2dp_dev->dev.release_audio_patch = release_audio_patch; a2dp_dev->dev.get_audio_port = get_audio_port;
android/hal-sco.c +6 -6
@@ -840,7 +840,7 @@ static int sco_set_voice_volume(struct audio_hw_device *dev, float volume)return 0 ; } -static int sco_set_master_volume (struct audio_hw_device *dev,float volume) +static int sco_set_main_volume (struct audio_hw_device *dev,float volume) {DBG ("%f" , volume);
@@ -1292,13 +1292,13 @@ static int sco_dump(const audio_hw_device_t *device, int fd) }#if ANDROID_VERSION >=PLATFORM_VER (5 ,0 ,0 ) -static int set_master_mute (struct audio_hw_device *dev,bool mute) +static int set_main_mute (struct audio_hw_device *dev,bool mute) {DBG ("" );return -ENOSYS ; } -static int get_master_mute (struct audio_hw_device *dev,bool *mute) +static int get_main_mute (struct audio_hw_device *dev,bool *mute) {DBG ("" );return -ENOSYS ;
@@ -1477,7 +1477,7 @@ static int sco_open(const hw_module_t *module, const char *name, dev->dev.init_check = sco_init_check; dev->dev.set_voice_volume = sco_set_voice_volume; - dev->dev.set_master_volume = sco_set_master_volume; + dev->dev.set_main_volume = sco_set_main_volume; dev->dev.set_mode = sco_set_mode; dev->dev.set_mic_mute = sco_set_mic_mute; dev->dev.get_mic_mute = sco_get_mic_mute;
@@ -1490,8 +1490,8 @@ static int sco_open(const hw_module_t *module, const char *name, dev->dev.close_input_stream = sco_close_input_stream; dev->dev.dump = sco_dump;#if ANDROID_VERSION >=PLATFORM_VER (5 ,0 ,0 ) - dev->dev.set_master_mute = set_master_mute; - dev->dev.get_master_mute = get_master_mute; + dev->dev.set_main_mute = set_main_mute; + dev->dev.get_main_mute = get_main_mute; dev->dev.create_audio_patch = create_audio_patch; dev->dev.release_audio_patch = release_audio_patch; dev->dev.get_audio_port = get_audio_port;
android/hardware/audio.h +10 -10
@@ -514,16 +514,16 @@ struct audio_hw_device {* Range between 0.0 and 1.0. If any value other than 0 is returned, * the software mixer will emulate this capability. */ -int (*set_master_volume)(struct audio_hw_device *dev,float volume); +int (*set_main_volume)(struct audio_hw_device *dev,float volume);/** -* Get the current master volume value for the HAL, if the HAL supports -* master volume control. AudioFlinger will query this value from the +* Get the current main volume value for the HAL, if the HAL supports +* main volume control. AudioFlinger will query this value from the * primary audio HAL when the service starts and use the value for setting -* the initial master volume across all HALs. HALs which do not support +* the initial main volume across all HALs. HALs which do not support * this method may leave it set to NULL. */ -int (*get_master_volume)(struct audio_hw_device *dev,float *volume); +int (*get_main_volume)(struct audio_hw_device *dev,float *volume);/** * set_mode is called when the audio mode changes. AUDIO_MODE_NORMAL mode
@@ -592,16 +592,16 @@ struct audio_hw_device {* set the audio mute status for all audio activities. If any value other * than 0 is returned, the software mixer will emulate this capability. */ -int (*set_master_mute)(struct audio_hw_device *dev,bool mute); +int (*set_main_mute)(struct audio_hw_device *dev,bool mute);/** -* Get the current master mute status for the HAL, if the HAL supports -* master mute control. AudioFlinger will query this value from the primary +* Get the current main mute status for the HAL, if the HAL supports +* main mute control. AudioFlinger will query this value from the primary * audio HAL when the service starts and use the value for setting the -* initial master mute across all HALs. HALs which do not support this +* initial main mute across all HALs. HALs which do not support this * method may leave it set to NULL. */ -int (*get_master_mute)(struct audio_hw_device *dev,bool *mute); +int (*get_main_mute)(struct audio_hw_device *dev,bool *mute);/** * Routing control
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 60/62 android: Inclusive language for describing relation
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3.
---
android/bluetooth.c | 40 ++++++++++++++++++++-------------------- android/tester-main.c | 8 ++++---- 2 files changed, 24 insertions(+), 24 deletions(-)
android/bluetooth.c +20 -20
@@ -2198,7 +2198,7 @@ static void mgmt_device_unpaired_event(uint16_t index, uint16_t length, dev->in_white_list = false; } -static void store_ltk (const bdaddr_t *dst,uint8_t bdaddr_type,bool master, +static void store_ltk (const bdaddr_t *dst,uint8_t bdaddr_type,bool central,const uint8_t *key,uint8_t key_type,uint8_t enc_size,uint16_t ediv,uint64_t rand) {
@@ -2218,11 +2218,11 @@ static void store_ltk(const bdaddr_t *dst, uint8_t bdaddr_type, bool master,ba2str (dst, addr); - key_s = master ?"LongTermKey" :"SlaveLongTermKey" ; - keytype_s = master ?"LongTermKeyType" :"SlaveLongTermKeyType" ; - encsize_s = master ?"LongTermKeyEncSize" :"SlaveLongTermKeyEncSize" ; - ediv_s = master ?"LongTermKeyEDiv" :"SlaveLongTermKeyEDiv" ; - rand_s = master ?"LongTermKeyRand" :"SlaveLongTermKeyRand" ; + key_s = central ?"LongTermKey" :"SlaveLongTermKey" ; + keytype_s = central ?"LongTermKeyType" :"SlaveLongTermKeyType" ; + encsize_s = central ?"LongTermKeyEncSize" :"SlaveLongTermKeyEncSize" ; + ediv_s = central ?"LongTermKeyEDiv" :"SlaveLongTermKeyEDiv" ; + rand_s = central ?"LongTermKeyRand" :"SlaveLongTermKeyRand" ;for (i =0 ; i <16 ; i++)sprintf (key_str + (i *2 ),"%2.2X" , key[i]);
@@ -3059,18 +3059,18 @@ failed: }static struct mgmt_ltk_info *get_ltk_info (GKeyFile *key_file,const char *peer, -bool master) +bool central) {const char *key_s, *keytype_s, *encsize_s, *ediv_s, *rand_s;struct mgmt_ltk_info *info =NULL ;char *key;unsigned int i; - key_s = master ?"LongTermKey" :"SlaveLongTermKey" ; - keytype_s = master ?"LongTermKeyType" :"SlaveLongTermKeyType" ; - encsize_s = master ?"LongTermKeyEncSize" :"SlaveLongTermKeyEncSize" ; - ediv_s = master ?"LongTermKeyEDiv" :"SlaveLongTermKeyEDiv" ; - rand_s = master ?"LongTermKeyRand" :"SlaveLongTermKeyRand" ; + key_s = central ?"LongTermKey" :"SlaveLongTermKey" ; + keytype_s = central ?"LongTermKeyType" :"SlaveLongTermKeyType" ; + encsize_s = central ?"LongTermKeyEncSize" :"SlaveLongTermKeyEncSize" ; + ediv_s = central ?"LongTermKeyEDiv" :"SlaveLongTermKeyEDiv" ; + rand_s = central ?"LongTermKeyRand" :"SlaveLongTermKeyRand" ; key =g_key_file_get_string (key_file, peer, key_s,NULL );if (!key ||strlen (key) !=32 )
@@ -3097,7 +3097,7 @@ static struct mgmt_ltk_info *get_ltk_info(GKeyFile *key_file, const char *peer, info->ediv =g_key_file_get_integer (key_file, peer, ediv_s,NULL ); info->ediv =cpu_to_le16 (info->ediv); - info->central = master; + info->central = central; failed:g_free (key);
@@ -3201,7 +3201,7 @@ static void load_devices_info(bt_bluetooth_ready cb)struct mgmt_link_key_info *key_info;struct mgmt_ltk_info *ltk_info;struct mgmt_irk_info *irk_info; -struct mgmt_ltk_info *slave_ltk_info; +struct mgmt_ltk_info *peripheral_ltk_info;struct device *dev; dev =create_device_from_info (key_file, devs[i]);
@@ -3209,15 +3209,15 @@ static void load_devices_info(bt_bluetooth_ready cb) key_info =get_key_info (key_file, devs[i]); irk_info =get_irk_info (key_file, devs[i]); ltk_info =get_ltk_info (key_file, devs[i], true); - slave_ltk_info =get_ltk_info (key_file, devs[i], false); + peripheral_ltk_info =get_ltk_info (key_file, devs[i], false);/* * Skip devices that have no permanent keys * (CSRKs are loaded by create_device_from_info()) */ if (!dev->valid_local_csrk && !dev->valid_remote_csrk && - !key_info && !ltk_info && - !slave_ltk_info && !irk_info) { + !key_info && !ltk_info && + !peripheral_ltk_info && !irk_info) {error ("Failed to load keys for %s, skipping" , devs[i]);free_device (dev);continue ;
@@ -3235,11 +3235,11 @@ static void load_devices_info(bt_bluetooth_ready cb)if (ltk_info) ltks =g_slist_prepend (ltks, ltk_info); -if (slave_ltk_info) - ltks =g_slist_prepend (ltks, slave_ltk_info); +if (peripheral_ltk_info) + ltks =g_slist_prepend (ltks, peripheral_ltk_info);if (dev->valid_local_csrk || dev->valid_remote_csrk || - irk_info || ltk_info || slave_ltk_info) { + irk_info || ltk_info || peripheral_ltk_info) { dev->le_paired = true; dev->le_bonded = true; }
android/tester-main.c +4 -4
@@ -2784,17 +2784,17 @@ void emu_remote_connect_hci_action(void)struct step *current_data_step =queue_peek_head (data->steps);struct bt_action_data *action_data = current_data_step->set_data; struct step *step = g_new0(struct step, 1); -const uint8_t *master_addr; +const uint8_t *central_addr; - master_addr =hciemu_get_central_bdaddr (data->hciemu); + central_addr =hciemu_get_central_bdaddr (data->hciemu);tester_print ("Trying to connect hci" );if (action_data) -bthost_hci_connect (bthost, master_addr, +bthost_hci_connect (bthost, central_addr, action_data->bearer_type);else -bthost_hci_connect (bthost, master_addr,BDADDR_BREDR ); +bthost_hci_connect (bthost, central_addr,BDADDR_BREDR ); step->action_status =BT_STATUS_SUCCESS ;
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 61/62 android: Inclusive language for filtering devices
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"accept list" is preferred, as reflected in the BT core spec v5.3. Also prefer to use "blocked".
---
android/bluetooth.c | 18 +++++++++--------- android/client/if-hf-client.c | 2 +- android/hal-ipc-api.txt | 2 +- android/hardware/bt_hf_client.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-)
android/bluetooth.c +9 -9
@@ -89,7 +89,7 @@ struct device {bool le_paired;bool le_bonded; -bool in_white_list; +bool in_accept_list;bool connected;
@@ -1649,8 +1649,8 @@ bool bt_auto_connect_add(const bdaddr_t *addr)return false; } -if (dev->in_white_list) { -DBG ("Device already in white list" ); +if (dev->in_accept_list) { +DBG ("Device already in accept list" );return true; }
@@ -1661,7 +1661,7 @@ bool bt_auto_connect_add(const bdaddr_t *addr)if (mgmt_send (mgmt_if,MGMT_OP_ADD_DEVICE , adapter.index,sizeof (cp), &cp,NULL ,NULL ,NULL ) >0 ) { - dev->in_white_list = true; + dev->in_accept_list = true;return true; }
@@ -1687,8 +1687,8 @@ void bt_auto_connect_remove(const bdaddr_t *addr)return ; } -if (!dev->in_white_list) { -DBG ("Device already removed from white list" ); +if (!dev->in_accept_list) { +DBG ("Device already removed from accept list" );return ; }
@@ -1698,7 +1698,7 @@ void bt_auto_connect_remove(const bdaddr_t *addr)if (mgmt_send (mgmt_if,MGMT_OP_REMOVE_DEVICE , adapter.index,sizeof (cp), &cp,NULL ,NULL ,NULL ) >0 ) { - dev->in_white_list = false; + dev->in_accept_list = false;return ; }
@@ -2194,8 +2194,8 @@ static void mgmt_device_unpaired_event(uint16_t index, uint16_t length,update_device_state (dev, ev->addr.type,HAL_STATUS_SUCCESS , false, false, false); -/* Unpaired device is removed from the white list */ - dev->in_white_list = false; +/* Unpaired device is removed from the accept list */ + dev->in_accept_list = false; } static void store_ltk(const bdaddr_t *dst, uint8_t bdaddr_type, bool central,
android/client/if-hf-client.c +1 -1
@@ -98,7 +98,7 @@ SINTMAP(bthf_client_cmd_complete_t, -1, "(unknown)")DELEMENT (BTHF_CLIENT_CMD_COMPLETE_ERROR_BUSY ),DELEMENT (BTHF_CLIENT_CMD_COMPLETE_ERROR_NO_ANSWER ),DELEMENT (BTHF_CLIENT_CMD_COMPLETE_ERROR_DELAYED ), -DELEMENT (BTHF_CLIENT_CMD_COMPLETE_ERROR_BLACKLISTED ), +DELEMENT (BTHF_CLIENT_CMD_COMPLETE_ERROR_BLOCKED ),DELEMENT (BTHF_CLIENT_CMD_COMPLETE_ERROR_CME ),ENDMAP
android/hal-ipc-api.txt +1 -1
@@ -2649,7 +2649,7 @@ Notifications: 0x03 = Error busy 0x04 = Error no answer 0x05 = Error delayed - 0x06 = Error blacklisted + 0x06 = Error blocked 0x07 = Error CME Note: CME parameter is valid only for Error CME type
android/hardware/bt_hf_client.h +1 -1
@@ -98,7 +98,7 @@ typedef enum {BTHF_CLIENT_CMD_COMPLETE_ERROR_BUSY ,BTHF_CLIENT_CMD_COMPLETE_ERROR_NO_ANSWER ,BTHF_CLIENT_CMD_COMPLETE_ERROR_DELAYED , -BTHF_CLIENT_CMD_COMPLETE_ERROR_BLACKLISTED , +BTHF_CLIENT_CMD_COMPLETE_ERROR_BLOCKED , BTHF_CLIENT_CMD_COMPLETE_ERROR_CME } bthf_client_cmd_complete_t;
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
PATCH 62/62 android: Inclusive language in storing LTK
In reply to Archie PusakaFrom: Archie Pusaka <[email protected]>
"peripheral" is preferred, as reflected in the BT core spec v5.3.
---
android/bluetooth.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
android/bluetooth.c +12 -10
@@ -2218,11 +2218,12 @@ static void store_ltk(const bdaddr_t *dst, uint8_t bdaddr_type, bool central,ba2str (dst, addr); - key_s = central ?"LongTermKey" :"SlaveLongTermKey" ; - keytype_s = central ?"LongTermKeyType" :"SlaveLongTermKeyType" ; - encsize_s = central ?"LongTermKeyEncSize" :"SlaveLongTermKeyEncSize" ; - ediv_s = central ?"LongTermKeyEDiv" :"SlaveLongTermKeyEDiv" ; - rand_s = central ?"LongTermKeyRand" :"SlaveLongTermKeyRand" ; + key_s = central ?"LongTermKey" :"PeripheralLongTermKey" ; + keytype_s = central ?"LongTermKeyType" :"PeripheralLongTermKeyType" ; + encsize_s = central ? +"LongTermKeyEncSize" :"PeripheralLongTermKeyEncSize" ; + ediv_s = central ?"LongTermKeyEDiv" :"PeripheralLongTermKeyEDiv" ; + rand_s = central ?"LongTermKeyRand" :"PeripheralLongTermKeyRand" ;for (i =0 ; i <16 ; i++)sprintf (key_str + (i *2 ),"%2.2X" , key[i]);
@@ -3066,11 +3067,12 @@ static struct mgmt_ltk_info *get_ltk_info(GKeyFile *key_file, const char *peer,char *key;unsigned int i; - key_s = central ?"LongTermKey" :"SlaveLongTermKey" ; - keytype_s = central ?"LongTermKeyType" :"SlaveLongTermKeyType" ; - encsize_s = central ?"LongTermKeyEncSize" :"SlaveLongTermKeyEncSize" ; - ediv_s = central ?"LongTermKeyEDiv" :"SlaveLongTermKeyEDiv" ; - rand_s = central ?"LongTermKeyRand" :"SlaveLongTermKeyRand" ; + key_s = central ?"LongTermKey" :"PeripheralLongTermKey" ; + keytype_s = central ?"LongTermKeyType" :"PeripheralLongTermKeyType" ; + encsize_s = central ? +"LongTermKeyEncSize" :"PeripheralLongTermKeyEncSize" ; + ediv_s = central ?"LongTermKeyEDiv" :"PeripheralLongTermKeyEDiv" ; + rand_s = central ?"LongTermKeyRand" :"PeripheralLongTermKeyRand" ; key =g_key_file_get_string (key_file, peer, key_s,NULL );if (!key ||strlen (key) !=32 )
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
Luiz Augusto von Dentz
maintainerHi Archie,
Quoted 91 lines · Archie Pusaka
From: Archie Pusaka <[email protected]>
Hi BlueZ maintainers,
This series of patches promotes the usage of the more inclusive terms such as central/peripheral, accept list/reject list, or their equivalent where appropriate.
This is also reflected on the changes to Core spec v5.3 and the appropriate language mapping table by Bluetooth SIG
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdfI tried to make the changes for each patch as local as possible, hopefully this could ease the adoption for downstream. As a side effect, I ended up with more patches than I had hoped before.
Do take note that some patches, most notably the ones ending with "* storing LTK", will break the stored data, thus perhaps are not suitable to be merged as is. I don't have the plan to write patch to support both the old and the replacement version since that would still left us the less inclusive terms on the code base, but with additional complexity.
Some other patches, mainly those on
tools/*change the output or input parameter to tools, this might come as a surprise for users who uses another program that depends on the i/o parameter of those tools.I leave the discretion of choosing which patches are better to be left out to you.
Thanks,
ArchieArchie Pusaka (62):
lib: Inclusive language in HCI commands and events
lib: Inclusive language in consts and stringstools/hciconfig: Inclusive language update
core: Inclusive language for l2cap
core: Inclusive language for rfcomm
lib: Inclusive language for filtering devices lib/mgmt: Inclusive language for LTK
doc/mgmt: Inclusive language update
btio: Inclusive language changes
shared/ad: Inclusive language changes
shared/hfp: Inclusive language changes
monitor: Inclusive language in struct member
monitor: Inclusive language in SMP related things
monitor: Inclusive language in LE states
monitor: Inclusive language in LL feature
monitor: Inclusive language in link key transaction
monitor: Inclusive language in peripheral broadcast
monitor: Inclusive language in peripheral page response timeout
monitor: Inclusive language in consts and strings
monitor: Inclusive language in filtering devices
emulator: Inclusive language in naming
emulator: Inclusive language in strings
emulator: Inclusive language in filtering device
tools: Inclusive language in referring the central addresstools/parser/hci: Inclusive language changestools/parser/smp: Inclusive language changestools/3dsp: Inclusive language changestools/mgmt-tester: Inclusive language changestools/bdaddr: Inclusive language changestools/hciconfig: Inclusive language changestools/meshctl: Inclusive language changestools/mgmt-tester: Inclusive language changestools/parser: Inclusive language in struct membertools/parser/lmp: Inclusive language changestools/parser/avdtp: Inclusive language changestools/parser/csr: Inclusive language changestools/btpclientctl: Inclusive language changestools/l2cap-tester: Inclusive language changestools/hci-tester: Inclusive language changestools/btiotest: Inclusive language changestools/hcitool: Inclusive language changes, central peripheraltools/hcitool: Inclusive language changes, accept listtools/l2test: Inclusive language changestools/rctest: Inclusive language changestools/rfcomm: Inclusive language changes plugins/sixaxis: Inclusive language changes profiles/audio: Inclusive language changes profiles/health: Inclusive language changes
sdp: Inclusive language changes
adapter: Inclusive language for central and peripheral
adapter: Inclusive language for storing LTK
adapter: Inclusive language for device filtering
client: Inclusive language changes
mesh: Inclusive language changes
Quoted 8 lines
tools/mesh: Inclusive language changestools/mesh-gatt: Inclusive language changes unit/mesh: Inclusive language changes doc/mesh: Inclusive language changes
android: Inclusive language for volume control
android: Inclusive language for describing relation
android: Inclusive language for filtering devices
android: Inclusive language in storing LTK
Can we perhaps group these changes on a one per directory? Also I wouldn't bother with Android it already considered deprecated and should be removed at some point, so only change things if it no longer builds but otherwise leave it alone.
Quoted 95 lines
android/a2dp.c | 2 +- android/bluetooth.c | 62 ++--- android/client/if-hf-client.c | 2 +- android/hal-audio.c | 12 +- android/hal-ipc-api.txt | 2 +- android/hal-sco.c | 12 +- android/handsfree-client.c | 2 +- android/hardware/audio.h | 20 +- android/hardware/bt_hf_client.h | 2 +- android/tester-main.c | 8 +- btio/btio.c | 62 ++--- btio/btio.h | 2 +- client/main.c | 6 +- doc/mesh-api.txt | 2 +- doc/mgmt-api.txt | 6 +- doc/settings-storage.txt | 4 +- emulator/btdev.c | 198 ++++++++-------- emulator/hciemu.c | 21 +- emulator/hciemu.h | 12 +- emulator/le.c | 116 ++++----- emulator/serial.c | 6 +- emulator/smp.c | 8 +- lib/hci.c | 52 ++-- lib/hci.h | 44 ++-- lib/hci_lib.h | 8 +- lib/l2cap.h | 2 +- lib/mgmt.h | 2 +- lib/rfcomm.h | 2 +- mesh/net-keys.c | 38 +-- mesh/net-keys.h | 8 +- mesh/net.h | 4 +- monitor/broadcom.c | 8 +- monitor/bt.h | 150 ++++++------ monitor/control.c | 14 +- monitor/l2cap.c | 10 +- monitor/ll.c | 60 ++--- monitor/lmp.c | 2 +- monitor/packet.c | 407 ++++++++++++++++---------------- plugins/sixaxis.c | 44 ++-- profiles/audio/a2dp.c | 2 +- profiles/audio/avctp.c | 10 +- profiles/audio/avctp.h | 2 +- profiles/health/mcap.c | 22 +- profiles/health/mcap.h | 2 +- profiles/sap/server.c | 2 +- src/adapter.c | 117 ++++----- src/adapter.h | 4 +- src/device.c | 6 +- src/sdpd-server.c | 10 +- src/sdpd.h | 2 +- src/shared/ad.c | 8 +- src/shared/ad.h | 2 +- src/shared/hfp.c | 4 +- src/shared/hfp.h | 2 +- tools/3dsp.c | 62 ++--- tools/bdaddr.rst | 2 +- tools/btiotest.c | 22 +- tools/btpclientctl.c | 2 +- tools/hci-tester.c | 16 +- tools/hciconfig.c | 26 +- tools/hciconfig.rst | 24 +- tools/hcitool.c | 110 ++++----- tools/hcitool.rst | 30 +-- tools/l2cap-tester.c | 36 +-- tools/l2test.c | 22 +- tools/mesh-cfgclient.c | 4 +- tools/mesh-gatt/mesh-net.h | 4 +- tools/mesh-gatt/net.c | 60 ++--- tools/mesh/mesh-db.c | 28 +-- tools/mesh/mesh-db.h | 4 +- tools/mesh/remote.c | 53 ++--- tools/mesh/remote.h | 5 +- tools/meshctl.c | 6 +- tools/mgmt-tester.c | 138 +++++------ tools/oobtest.c | 12 +- tools/parser/avdtp.c | 4 +- tools/parser/csr.c | 17 +- tools/parser/ericsson.c | 2 +- tools/parser/hci.c | 49 ++-- tools/parser/lmp.c | 112 ++++----- tools/parser/parser.h | 2 +- tools/parser/smp.c | 12 +- tools/rctest.c | 22 +- tools/rctest.rst | 4 +- tools/rfcomm-tester.c | 14 +- tools/rfcomm.c | 16 +- tools/rfcomm.rst | 2 +- tools/sco-tester.c | 10 +- tools/smp-tester.c | 16 +- unit/test-mesh-crypto.c | 4 +- 90 files changed, 1293 insertions(+), 1276 deletions(-)--
2.33.0.rc1.237.g0d66db33f3-goog
Signature · 1 line
Luiz Augusto von Dentz
Hi Luiz,
Quoted 104 lines · Luiz Augusto von Dentz
Hi Archie,
Quoted 91 lines · Archie Pusaka
From: Archie Pusaka <[email protected]>
Hi BlueZ maintainers,
This series of patches promotes the usage of the more inclusive terms such as central/peripheral, accept list/reject list, or their equivalent where appropriate.
This is also reflected on the changes to Core spec v5.3 and the appropriate language mapping table by Bluetooth SIG
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdfI tried to make the changes for each patch as local as possible, hopefully this could ease the adoption for downstream. As a side effect, I ended up with more patches than I had hoped before.
Do take note that some patches, most notably the ones ending with "* storing LTK", will break the stored data, thus perhaps are not suitable to be merged as is. I don't have the plan to write patch to support both the old and the replacement version since that would still left us the less inclusive terms on the code base, but with additional complexity.
Some other patches, mainly those on
tools/*change the output or input parameter to tools, this might come as a surprise for users who uses another program that depends on the i/o parameter of those tools.I leave the discretion of choosing which patches are better to be left out to you.
Thanks,
ArchieArchie Pusaka (62):
lib: Inclusive language in HCI commands and events
lib: Inclusive language in consts and stringstools/hciconfig: Inclusive language update
core: Inclusive language for l2cap
core: Inclusive language for rfcomm
lib: Inclusive language for filtering devices lib/mgmt: Inclusive language for LTK
doc/mgmt: Inclusive language update
btio: Inclusive language changes
shared/ad: Inclusive language changes
shared/hfp: Inclusive language changes
monitor: Inclusive language in struct member
monitor: Inclusive language in SMP related things
monitor: Inclusive language in LE states
monitor: Inclusive language in LL feature
monitor: Inclusive language in link key transaction
monitor: Inclusive language in peripheral broadcast
monitor: Inclusive language in peripheral page response timeout
monitor: Inclusive language in consts and strings
monitor: Inclusive language in filtering devices
emulator: Inclusive language in naming
emulator: Inclusive language in strings
emulator: Inclusive language in filtering device
tools: Inclusive language in referring the central addresstools/parser/hci: Inclusive language changestools/parser/smp: Inclusive language changestools/3dsp: Inclusive language changestools/mgmt-tester: Inclusive language changestools/bdaddr: Inclusive language changestools/hciconfig: Inclusive language changestools/meshctl: Inclusive language changestools/mgmt-tester: Inclusive language changestools/parser: Inclusive language in struct membertools/parser/lmp: Inclusive language changestools/parser/avdtp: Inclusive language changestools/parser/csr: Inclusive language changestools/btpclientctl: Inclusive language changestools/l2cap-tester: Inclusive language changestools/hci-tester: Inclusive language changestools/btiotest: Inclusive language changestools/hcitool: Inclusive language changes, central peripheraltools/hcitool: Inclusive language changes, accept listtools/l2test: Inclusive language changestools/rctest: Inclusive language changestools/rfcomm: Inclusive language changes plugins/sixaxis: Inclusive language changes profiles/audio: Inclusive language changes profiles/health: Inclusive language changes
sdp: Inclusive language changes
adapter: Inclusive language for central and peripheral
adapter: Inclusive language for storing LTK
adapter: Inclusive language for device filtering
client: Inclusive language changes
mesh: Inclusive language changesQuoted 8 lines
tools/mesh: Inclusive language changestools/mesh-gatt: Inclusive language changes unit/mesh: Inclusive language changes doc/mesh: Inclusive language changes
android: Inclusive language for volume control
android: Inclusive language for describing relation
android: Inclusive language for filtering devices
android: Inclusive language in storing LTK
Quoted 1 line
Can we perhaps group these changes on a one per directory? Also I
I can try to group these to one per directory, but some changes are cross-directory, therefore it will be unavoidable in some cases.
Quoted 3 lines
wouldn't bother with Android it already considered deprecated and should be removed at some point, so only change things if it no longer builds but otherwise leave it alone.
Got it, I will leave the Android changes out next time.
Btw do you have an opinion on whether the "* storing LTK" changes should be included or not?
Quoted 93 lines
Quoted 93 lines
android/a2dp.c | 2 +- android/bluetooth.c | 62 ++--- android/client/if-hf-client.c | 2 +- android/hal-audio.c | 12 +- android/hal-ipc-api.txt | 2 +- android/hal-sco.c | 12 +- android/handsfree-client.c | 2 +- android/hardware/audio.h | 20 +- android/hardware/bt_hf_client.h | 2 +- android/tester-main.c | 8 +- btio/btio.c | 62 ++--- btio/btio.h | 2 +- client/main.c | 6 +- doc/mesh-api.txt | 2 +- doc/mgmt-api.txt | 6 +- doc/settings-storage.txt | 4 +- emulator/btdev.c | 198 ++++++++-------- emulator/hciemu.c | 21 +- emulator/hciemu.h | 12 +- emulator/le.c | 116 ++++----- emulator/serial.c | 6 +- emulator/smp.c | 8 +- lib/hci.c | 52 ++-- lib/hci.h | 44 ++-- lib/hci_lib.h | 8 +- lib/l2cap.h | 2 +- lib/mgmt.h | 2 +- lib/rfcomm.h | 2 +- mesh/net-keys.c | 38 +-- mesh/net-keys.h | 8 +- mesh/net.h | 4 +- monitor/broadcom.c | 8 +- monitor/bt.h | 150 ++++++------ monitor/control.c | 14 +- monitor/l2cap.c | 10 +- monitor/ll.c | 60 ++--- monitor/lmp.c | 2 +- monitor/packet.c | 407 ++++++++++++++++---------------- plugins/sixaxis.c | 44 ++-- profiles/audio/a2dp.c | 2 +- profiles/audio/avctp.c | 10 +- profiles/audio/avctp.h | 2 +- profiles/health/mcap.c | 22 +- profiles/health/mcap.h | 2 +- profiles/sap/server.c | 2 +- src/adapter.c | 117 ++++----- src/adapter.h | 4 +- src/device.c | 6 +- src/sdpd-server.c | 10 +- src/sdpd.h | 2 +- src/shared/ad.c | 8 +- src/shared/ad.h | 2 +- src/shared/hfp.c | 4 +- src/shared/hfp.h | 2 +- tools/3dsp.c | 62 ++--- tools/bdaddr.rst | 2 +- tools/btiotest.c | 22 +- tools/btpclientctl.c | 2 +- tools/hci-tester.c | 16 +- tools/hciconfig.c | 26 +- tools/hciconfig.rst | 24 +- tools/hcitool.c | 110 ++++----- tools/hcitool.rst | 30 +-- tools/l2cap-tester.c | 36 +-- tools/l2test.c | 22 +- tools/mesh-cfgclient.c | 4 +- tools/mesh-gatt/mesh-net.h | 4 +- tools/mesh-gatt/net.c | 60 ++--- tools/mesh/mesh-db.c | 28 +-- tools/mesh/mesh-db.h | 4 +- tools/mesh/remote.c | 53 ++--- tools/mesh/remote.h | 5 +- tools/meshctl.c | 6 +- tools/mgmt-tester.c | 138 +++++------ tools/oobtest.c | 12 +- tools/parser/avdtp.c | 4 +- tools/parser/csr.c | 17 +- tools/parser/ericsson.c | 2 +- tools/parser/hci.c | 49 ++-- tools/parser/lmp.c | 112 ++++----- tools/parser/parser.h | 2 +- tools/parser/smp.c | 12 +- tools/rctest.c | 22 +- tools/rctest.rst | 4 +- tools/rfcomm-tester.c | 14 +- tools/rfcomm.c | 16 +- tools/rfcomm.rst | 2 +- tools/sco-tester.c | 10 +- tools/smp-tester.c | 16 +- unit/test-mesh-crypto.c | 4 +- 90 files changed, 1293 insertions(+), 1276 deletions(-)
Quoted 7 lines
Quoted 3 lines
--
2.33.0.rc1.237.g0d66db33f3-goog--
Luiz Augusto von Dentz
Thanks,
Archie