Skip to content

Commit 07964c2

Browse files
trond-snekviknashif
authored andcommitted
Bluetooth: Mesh: Use define for no prov pdu
Adds a prov PDU type define for cases when no PDU is expected. Signed-off-by: Trond Einar Snekvik <[email protected]>
1 parent 98d3225 commit 07964c2

File tree

1 file changed

+4
-2
lines changed
  • subsys/bluetooth/host/mesh

1 file changed

+4
-2
lines changed

subsys/bluetooth/host/mesh/prov.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
#define PROV_COMPLETE 0x08
7878
#define PROV_FAILED 0x09
7979

80+
#define PROV_NO_PDU 0xff
81+
8082
#define PROV_ALG_P256 0x00
8183

8284
#define GPCF(gpc) (gpc & 0x03)
@@ -895,7 +897,7 @@ static void send_pub_key(const u8_t dhkey[32])
895897
}
896898

897899
if (atomic_test_bit(link.flags, WAIT_NUMBER) || atomic_test_bit(link.flags, WAIT_STRING)) {
898-
link.expect = 0xff; /* Don't expect any packets until after input */
900+
link.expect = PROV_NO_PDU; /* Wait for input */
899901
} else {
900902
link.expect = PROV_CONFIRM;
901903
}
@@ -1081,7 +1083,7 @@ static void prov_data(const u8_t *data)
10811083
}
10821084

10831085
/* Ignore any further PDUs on this link */
1084-
link.expect = 0U;
1086+
link.expect = PROV_NO_PDU;
10851087

10861088
/* Store info, since bt_mesh_provision() will end up clearing it */
10871089
if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {

0 commit comments

Comments
 (0)