Skip to content

Commit 6463d15

Browse files
PavelVPVkartben
authored andcommitted
bluetooth: mesh: Remove assertion for Received List message PDU size
According to MshDFUv1.0, section 6.2.3.5, the Firmware Distribution Receivers List message is not limited by the size of the receivers list: ``` The number of selected entries shall be limited by the following: - The number of entries shall not exceed the value of the Entries Limit field from the Firmware Distribution Receivers Get message. - The number of entries shall not cause the message payload to exceed the maximum Access PDU size. ``` Thus, this assertion is incorrect as it doesn't allow to have the receivers list bigger than number of maximal Access PDU size. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
1 parent 9c91b38 commit 6463d15

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

subsys/bluetooth/mesh/dfd_srv.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,8 @@ BUILD_ASSERT((DFD_UPLOAD_START_MSG_MAXLEN + BT_MESH_MODEL_OP_LEN(BT_MESH_DFD_OP_
3535
"The Firmware Distribution Upload Start message does not fit into the maximum "
3636
"incoming SDU size.");
3737

38-
#define DFD_RECEIVERS_LIST_MSG_MAXLEN (4 + CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX * 5)
39-
40-
BUILD_ASSERT((DFD_RECEIVERS_LIST_MSG_MAXLEN + BT_MESH_MODEL_OP_LEN(BT_MESH_DFD_OP_RECEIVERS_LIST) +
41-
BT_MESH_MIC_SHORT) <= BT_MESH_TX_SDU_MAX,
42-
"The Firmware Distribution Receivers List message does not fit into the maximum "
43-
"outgoing SDU size.");
38+
#define DFD_RECEIVERS_LIST_MSG_MAXLEN (BT_MESH_TX_SDU_MAX - BT_MESH_MIC_SHORT - \
39+
BT_MESH_MODEL_OP_LEN(BT_MESH_DFD_OP_RECEIVERS_LIST))
4440

4541
#define DFD_RECEIVERS_ADD_MSG_MAXLEN (CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX * 3)
4642

0 commit comments

Comments
 (0)