Bluetooth: mesh: Do not set RFU bits in Heartbeat Publication Features
Features received in Config Heartbeat Publication Set message can have Feature bits set to RFU values. This patch fixes setting this RFU bits in Heartbeat Publication Features, so that those are not indicated in Config Heartbeat Publication Status message. Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
parent
0f91f635ac
commit
253e40ad0e
2 changed files with 5 additions and 1 deletions
|
@ -218,6 +218,10 @@ int bt_mesh_prov_disable(bt_mesh_prov_bearer_t bearers);
|
|||
#define BT_MESH_FEAT_PROXY BIT(1)
|
||||
#define BT_MESH_FEAT_FRIEND BIT(2)
|
||||
#define BT_MESH_FEAT_LOW_POWER BIT(3)
|
||||
#define BT_MESH_FEAT_SUPPORTED (BT_MESH_FEAT_RELAY | \
|
||||
BT_MESH_FEAT_PROXY | \
|
||||
BT_MESH_FEAT_FRIEND | \
|
||||
BT_MESH_FEAT_LOW_POWER)
|
||||
|
||||
/** @brief Initialize Mesh support
|
||||
*
|
||||
|
|
|
@ -2797,7 +2797,7 @@ static void heartbeat_pub_set(struct bt_mesh_model *model,
|
|||
|
||||
cfg->hb_pub.dst = dst;
|
||||
cfg->hb_pub.period = param->period_log;
|
||||
cfg->hb_pub.feat = feat;
|
||||
cfg->hb_pub.feat = feat & BT_MESH_FEAT_SUPPORTED;
|
||||
cfg->hb_pub.net_idx = idx;
|
||||
|
||||
if (dst == BT_MESH_ADDR_UNASSIGNED) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue