Bluetooth: use inclusive language in HCI LE features
This patch replaces some non-inclusive terms based on the appropriate language mapping table compiled by the Bluetooth SIG: https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf Specifically, these terms are replaced: master -> central slave -> peripheral Signed-off-by: Archie Pusaka <apusaka@chromium.org> Reviewed-by: Miao-chen Chou <mcchou@chromium.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
6397729bb7
commit
ef365da180
@ -489,7 +489,7 @@ enum {
|
|||||||
/* LE features */
|
/* LE features */
|
||||||
#define HCI_LE_ENCRYPTION 0x01
|
#define HCI_LE_ENCRYPTION 0x01
|
||||||
#define HCI_LE_CONN_PARAM_REQ_PROC 0x02
|
#define HCI_LE_CONN_PARAM_REQ_PROC 0x02
|
||||||
#define HCI_LE_SLAVE_FEATURES 0x08
|
#define HCI_LE_PERIPHERAL_FEATURES 0x08
|
||||||
#define HCI_LE_PING 0x10
|
#define HCI_LE_PING 0x10
|
||||||
#define HCI_LE_DATA_LEN_EXT 0x20
|
#define HCI_LE_DATA_LEN_EXT 0x20
|
||||||
#define HCI_LE_LL_PRIVACY 0x40
|
#define HCI_LE_LL_PRIVACY 0x40
|
||||||
@ -498,8 +498,8 @@ enum {
|
|||||||
#define HCI_LE_PHY_CODED 0x08
|
#define HCI_LE_PHY_CODED 0x08
|
||||||
#define HCI_LE_EXT_ADV 0x10
|
#define HCI_LE_EXT_ADV 0x10
|
||||||
#define HCI_LE_CHAN_SEL_ALG2 0x40
|
#define HCI_LE_CHAN_SEL_ALG2 0x40
|
||||||
#define HCI_LE_CIS_MASTER 0x10
|
#define HCI_LE_CIS_CENTRAL 0x10
|
||||||
#define HCI_LE_CIS_SLAVE 0x20
|
#define HCI_LE_CIS_PERIPHERAL 0x20
|
||||||
|
|
||||||
/* Connection modes */
|
/* Connection modes */
|
||||||
#define HCI_CM_ACTIVE 0x0000
|
#define HCI_CM_ACTIVE 0x0000
|
||||||
|
@ -5243,17 +5243,17 @@ static void le_conn_complete_evt(struct hci_dev *hdev, u8 status,
|
|||||||
hci_debugfs_create_conn(conn);
|
hci_debugfs_create_conn(conn);
|
||||||
hci_conn_add_sysfs(conn);
|
hci_conn_add_sysfs(conn);
|
||||||
|
|
||||||
/* The remote features procedure is defined for master
|
/* The remote features procedure is defined for central
|
||||||
* role only. So only in case of an initiated connection
|
* role only. So only in case of an initiated connection
|
||||||
* request the remote features.
|
* request the remote features.
|
||||||
*
|
*
|
||||||
* If the local controller supports slave-initiated features
|
* If the local controller supports peripheral-initiated features
|
||||||
* exchange, then requesting the remote features in slave
|
* exchange, then requesting the remote features in peripheral
|
||||||
* role is possible. Otherwise just transition into the
|
* role is possible. Otherwise just transition into the
|
||||||
* connected state without requesting the remote features.
|
* connected state without requesting the remote features.
|
||||||
*/
|
*/
|
||||||
if (conn->out ||
|
if (conn->out ||
|
||||||
(hdev->le_features[0] & HCI_LE_SLAVE_FEATURES)) {
|
(hdev->le_features[0] & HCI_LE_PERIPHERAL_FEATURES)) {
|
||||||
struct hci_cp_le_read_remote_features cp;
|
struct hci_cp_le_read_remote_features cp;
|
||||||
|
|
||||||
cp.handle = __cpu_to_le16(conn->handle);
|
cp.handle = __cpu_to_le16(conn->handle);
|
||||||
@ -5774,7 +5774,7 @@ static void hci_le_remote_feat_complete_evt(struct hci_dev *hdev,
|
|||||||
if (conn->state == BT_CONFIG) {
|
if (conn->state == BT_CONFIG) {
|
||||||
__u8 status;
|
__u8 status;
|
||||||
|
|
||||||
/* If the local controller supports slave-initiated
|
/* If the local controller supports peripheral-initiated
|
||||||
* features exchange, but the remote controller does
|
* features exchange, but the remote controller does
|
||||||
* not, then it is possible that the error code 0x1a
|
* not, then it is possible that the error code 0x1a
|
||||||
* for unsupported remote feature gets returned.
|
* for unsupported remote feature gets returned.
|
||||||
@ -5783,8 +5783,8 @@ static void hci_le_remote_feat_complete_evt(struct hci_dev *hdev,
|
|||||||
* transition into connected state and mark it as
|
* transition into connected state and mark it as
|
||||||
* successful.
|
* successful.
|
||||||
*/
|
*/
|
||||||
if ((hdev->le_features[0] & HCI_LE_SLAVE_FEATURES) &&
|
if (!conn->out && ev->status == 0x1a &&
|
||||||
!conn->out && ev->status == 0x1a)
|
(hdev->le_features[0] & HCI_LE_PERIPHERAL_FEATURES))
|
||||||
status = 0x00;
|
status = 0x00;
|
||||||
else
|
else
|
||||||
status = ev->status;
|
status = ev->status;
|
||||||
|
Loading…
Reference in New Issue
Block a user