summaryrefslogtreecommitdiff
path: root/mesh/mesh-io.c
diff options
context:
space:
mode:
authorBrian Gix <brian.gix@intel.com>2019-07-11 15:59:46 -0700
committerBrian Gix <brian.gix@intel.com>2019-07-14 08:32:18 -0700
commitce29951980a2f7385e5af204348f59c6e335aa4a (patch)
tree3a68f953ca5286a8bf4b702a8407f393f52d852c /mesh/mesh-io.c
parentfea558460f1ad3eafe0107dc3cbcb7e33eeeb48c (diff)
downloadbluez-ce29951980a2f7385e5af204348f59c6e335aa4a.tar.gz
mesh: Add special Beacon handler for Provisioning
Provisioning uses the same AD type for Provisioning that is also used by the Secure Network Beacon, but their usage is distinct from each other. This change allows us to enable/disable Unprovisioned Device Beacon capture without disrupting SNB handling.
Diffstat (limited to 'mesh/mesh-io.c')
-rw-r--r--mesh/mesh-io.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesh/mesh-io.c b/mesh/mesh-io.c
index 62a8c0e2c..94a92e885 100644
--- a/mesh/mesh-io.c
+++ b/mesh/mesh-io.c
@@ -86,12 +86,14 @@ struct mesh_io *mesh_io_new(enum mesh_io_type type, void *opts)
if (api->set) {
uint8_t pkt = MESH_AD_TYPE_NETWORK;
- uint8_t bec = MESH_AD_TYPE_BEACON;
uint8_t prv = MESH_AD_TYPE_PROVISION;
+ uint8_t snb[2] = {MESH_AD_TYPE_BEACON, 0x01};
+ uint8_t prvb[2] = {MESH_AD_TYPE_BEACON, 0x00};
- api->set(io, 1, &bec, 1, NULL, NULL);
+ api->set(io, 1, snb, sizeof(snb), NULL, NULL);
api->set(io, 2, &prv, 1, NULL, NULL);
api->set(io, 3, &pkt, 1, NULL, NULL);
+ api->set(io, 4, prvb, sizeof(prvb), NULL, NULL);
}
if (l_queue_push_head(io_list, io))