Bluetooth: Mesh: Modularizing the proxy

The Bluetooth proxy feature includes proxy client
and proxy server. In addition to the proxy pdu
message used above, pb-gatt also uses the same
proxy pdu message.

Currently zephyr bluetooth mesh couples them in one file.

A file at the separation is called gatt_services.c,
which is used to contain Mesh Provisioning Service
and Mesh Proxy Service.
Another file in the separation is called proxy_msg.c,
which is used to process Proxy pdu messages.

Also according to Trond's suggestion:

Rename `CONFIG_BT_MESH_PROXY` to `CONFIG_BT_MESH_GATT`.
Create an additional promptless entry
`CONFIG_BT_MESH_GATT_SERVER` that selects
`CONFIG_BT_MESH_GATT` and is selected by
`CONFIG_BT_MESH_GATT_PROXY` or `CONFIG_BT_MESH_PB_GATT`.

Create additional `CONFIG_BT_MESH_PROXY` used to represent
proxy feature (also include proxy client).

see #36343

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
Lingao Meng 2021-06-25 00:12:38 -07:00 committed by Johan Hedberg
commit 3a559e972a
11 changed files with 1339 additions and 1242 deletions

View file

@ -174,7 +174,7 @@ static void send_pending_adv(struct k_work *work)
}
/* No more pending buffers */
if (IS_ENABLED(CONFIG_BT_MESH_PROXY)) {
if (IS_ENABLED(CONFIG_BT_MESH_GATT_SERVER)) {
BT_DBG("Proxy Advertising");
err = bt_mesh_proxy_adv_start();
if (!err) {