Bluetooth: Mesh: Inclusive terminology

Implements the Bluetooth appropriate language mapping for the Bluetooth
mesh subsystem.

Changes the following terms:

- Master security credentials -> Flooding security credentials
- Whitelist filter -> Accept filter
- Blacklist filter -> Reject filter
- Removes CDB's NODE_BLACKLISTED, which was not in use.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
This commit is contained in:
Trond Einar Snekvik 2021-09-07 08:58:49 +02:00 committed by Carles Cufí
commit 035d877967
5 changed files with 17 additions and 18 deletions

View file

@ -25,7 +25,6 @@ extern "C" {
enum { enum {
BT_MESH_CDB_NODE_CONFIGURED, BT_MESH_CDB_NODE_CONFIGURED,
BT_MESH_CDB_NODE_BLACKLISTED,
BT_MESH_CDB_NODE_FLAG_COUNT BT_MESH_CDB_NODE_FLAG_COUNT
}; };

View file

@ -461,14 +461,14 @@ static int unseg_app_sdu_prepare(struct bt_mesh_friend *frnd,
} }
static int encrypt_friend_pdu(struct bt_mesh_friend *frnd, struct net_buf *buf, static int encrypt_friend_pdu(struct bt_mesh_friend *frnd, struct net_buf *buf,
bool master_cred) bool flooding_cred)
{ {
const struct bt_mesh_net_cred *cred; const struct bt_mesh_net_cred *cred;
uint32_t iv_index; uint32_t iv_index;
uint16_t src; uint16_t src;
int err; int err;
if (master_cred) { if (flooding_cred) {
cred = &frnd->subnet->keys[SUBNET_KEY_TX_IDX(frnd->subnet)] cred = &frnd->subnet->keys[SUBNET_KEY_TX_IDX(frnd->subnet)]
.msg; .msg;
} else { } else {

View file

@ -88,8 +88,8 @@ static struct bt_mesh_proxy_client {
uint16_t filter[CONFIG_BT_MESH_PROXY_FILTER_SIZE]; uint16_t filter[CONFIG_BT_MESH_PROXY_FILTER_SIZE];
enum __packed { enum __packed {
NONE, NONE,
WHITELIST, ACCEPT,
BLACKLIST, REJECT,
PROV, PROV,
} filter_type; } filter_type;
#if defined(CONFIG_BT_MESH_GATT_PROXY) #if defined(CONFIG_BT_MESH_GATT_PROXY)
@ -180,11 +180,11 @@ static int filter_set(struct bt_mesh_proxy_client *client,
switch (type) { switch (type) {
case 0x00: case 0x00:
(void)memset(client->filter, 0, sizeof(client->filter)); (void)memset(client->filter, 0, sizeof(client->filter));
client->filter_type = WHITELIST; client->filter_type = ACCEPT;
break; break;
case 0x01: case 0x01:
(void)memset(client->filter, 0, sizeof(client->filter)); (void)memset(client->filter, 0, sizeof(client->filter));
client->filter_type = BLACKLIST; client->filter_type = REJECT;
break; break;
default: default:
BT_WARN("Prohibited Filter Type 0x%02x", type); BT_WARN("Prohibited Filter Type 0x%02x", type);
@ -256,7 +256,7 @@ static void send_filter_status(struct bt_mesh_proxy_client *client,
net_buf_simple_add_u8(buf, CFG_FILTER_STATUS); net_buf_simple_add_u8(buf, CFG_FILTER_STATUS);
if (client->filter_type == WHITELIST) { if (client->filter_type == ACCEPT) {
net_buf_simple_add_u8(buf, 0x00); net_buf_simple_add_u8(buf, 0x00);
} else { } else {
net_buf_simple_add_u8(buf, 0x01); net_buf_simple_add_u8(buf, 0x01);
@ -666,7 +666,7 @@ static ssize_t proxy_ccc_write(struct bt_conn *conn,
__ASSERT(client, "No client for connection"); __ASSERT(client, "No client for connection");
if (client->filter_type == NONE) { if (client->filter_type == NONE) {
client->filter_type = WHITELIST; client->filter_type = ACCEPT;
k_work_submit(&client->send_beacons); k_work_submit(&client->send_beacons);
} }
@ -714,7 +714,7 @@ int bt_mesh_proxy_gatt_enable(void)
for (i = 0; i < ARRAY_SIZE(clients); i++) { for (i = 0; i < ARRAY_SIZE(clients); i++) {
if (clients[i].cli.conn) { if (clients[i].cli.conn) {
clients[i].filter_type = WHITELIST; clients[i].filter_type = ACCEPT;
} }
} }
@ -730,8 +730,8 @@ void bt_mesh_proxy_gatt_disconnect(void)
for (i = 0; i < ARRAY_SIZE(clients); i++) { for (i = 0; i < ARRAY_SIZE(clients); i++) {
struct bt_mesh_proxy_client *client = &clients[i]; struct bt_mesh_proxy_client *client = &clients[i];
if (client->cli.conn && (client->filter_type == WHITELIST || if (client->cli.conn && (client->filter_type == ACCEPT ||
client->filter_type == BLACKLIST)) { client->filter_type == REJECT)) {
client->filter_type = NONE; client->filter_type = NONE;
bt_conn_disconnect(client->cli.conn, bt_conn_disconnect(client->cli.conn,
BT_HCI_ERR_REMOTE_USER_TERM_CONN); BT_HCI_ERR_REMOTE_USER_TERM_CONN);
@ -766,9 +766,9 @@ void bt_mesh_proxy_addr_add(struct net_buf_simple *buf, uint16_t addr)
BT_DBG("filter_type %u addr 0x%04x", client->filter_type, addr); BT_DBG("filter_type %u addr 0x%04x", client->filter_type, addr);
if (client->filter_type == WHITELIST) { if (client->filter_type == ACCEPT) {
filter_add(client, addr); filter_add(client, addr);
} else if (client->filter_type == BLACKLIST) { } else if (client->filter_type == REJECT) {
filter_remove(client, addr); filter_remove(client, addr);
} }
} }
@ -780,7 +780,7 @@ static bool client_filter_match(struct bt_mesh_proxy_client *client,
BT_DBG("filter_type %u addr 0x%04x", client->filter_type, addr); BT_DBG("filter_type %u addr 0x%04x", client->filter_type, addr);
if (client->filter_type == BLACKLIST) { if (client->filter_type == REJECT) {
for (i = 0; i < ARRAY_SIZE(client->filter); i++) { for (i = 0; i < ARRAY_SIZE(client->filter); i++) {
if (client->filter[i] == addr) { if (client->filter[i] == addr) {
return false; return false;
@ -794,7 +794,7 @@ static bool client_filter_match(struct bt_mesh_proxy_client *client,
return true; return true;
} }
if (client->filter_type == WHITELIST) { if (client->filter_type == ACCEPT) {
for (i = 0; i < ARRAY_SIZE(client->filter); i++) { for (i = 0; i < ARRAY_SIZE(client->filter); i++) {
if (client->filter[i] == addr) { if (client->filter[i] == addr) {
return true; return true;

View file

@ -992,7 +992,7 @@ int bt_mesh_lpn_friend_update(struct bt_mesh_net_rx *rx,
if (!lpn->established) { if (!lpn->established) {
/* This is normally checked on the transport layer, however /* This is normally checked on the transport layer, however
* in this state we're also still accepting master * in this state we're also still accepting flooding
* credentials so we need to ensure the right ones (Friend * credentials so we need to ensure the right ones (Friend
* Credentials) were used for this message. * Credentials) were used for this message.
*/ */

View file

@ -698,7 +698,7 @@ static void bt_mesh_net_relay(struct net_buf_simple *sbuf,
} }
/* When the Friend node relays message for lpn, the message will be /* When the Friend node relays message for lpn, the message will be
* retransmitted using the managed master security credentials and * retransmitted using the managed flooding security credentials and
* the Network PDU shall be retransmitted to all network interfaces. * the Network PDU shall be retransmitted to all network interfaces.
*/ */
if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) && if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) &&