Diff between fea558460f1ad3eafe0107dc3cbcb7e33eeeb48c and ce29951980a2f7385e5af204348f59c6e335aa4a

Changed Files

File Additions Deletions Status
mesh/mesh-io-generic.c +1 -1 modified
mesh/mesh-io.c +4 -2 modified
mesh/mesh-io.h +4 -3 modified

Full Patch

diff --git a/mesh/mesh-io-generic.c b/mesh/mesh-io-generic.c
index 42aaa09..576c5df 100644
--- a/mesh/mesh-io-generic.c
+++ b/mesh/mesh-io-generic.c
@@ -40,7 +40,7 @@ struct mesh_io_private {
 	struct l_timeout *tx_timeout;
 	struct l_queue *rx_regs;
 	struct l_queue *tx_pkts;
-	uint8_t filters[3]; /* Simple filtering on AD type only */
+	uint8_t filters[4];
 	bool sending;
 	struct tx_pkt *tx;
 	uint16_t interval;
diff --git a/mesh/mesh-io.c b/mesh/mesh-io.c
index 62a8c0e..94a92e8 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))
diff --git a/mesh/mesh-io.h b/mesh/mesh-io.h
index 6585205..1c10779 100644
--- a/mesh/mesh-io.h
+++ b/mesh/mesh-io.h
@@ -19,9 +19,10 @@
 
 struct mesh_io;
 
-#define MESH_IO_FILTER_BEACON	1
-#define MESH_IO_FILTER_PROV	2
-#define MESH_IO_FILTER_NET	3
+#define MESH_IO_FILTER_BEACON		1
+#define MESH_IO_FILTER_PROV		2
+#define MESH_IO_FILTER_NET		3
+#define MESH_IO_FILTER_PROV_BEACON	4
 
 #define MESH_IO_TX_COUNT_UNLIMITED	0