Skip to content

Commit a88aac2

Browse files
LingaoMcfriedt
authored andcommitted
Bluetooth: Mesh: Remove unnecessary prov buf get function
Remove `bt_mesh_pb_gatt_get_buf`. Signed-off-by: Lingao Meng <[email protected]>
1 parent c057a69 commit a88aac2

File tree

3 files changed

+0
-14
lines changed

3 files changed

+0
-14
lines changed

subsys/bluetooth/mesh/pb_gatt.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ struct prov_link {
2727
const struct prov_bearer_cb *cb;
2828
void *cb_data;
2929
struct prov_bearer_send_cb comp;
30-
struct net_buf_simple *rx_buf;
3130
struct k_work_delayable prot_timer;
3231
};
3332

@@ -42,8 +41,6 @@ static void reset_state(void)
4241

4342
/* If this fails, the protocol timeout handler will exit early. */
4443
(void)k_work_cancel_delayable(&link.prot_timer);
45-
46-
link.rx_buf = bt_mesh_pb_gatt_get_buf();
4744
}
4845

4946
static void link_closed(enum prov_bearer_link_status status)

subsys/bluetooth/mesh/pb_gatt_srv.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,6 @@ static void gatt_disconnected(struct bt_conn *conn, uint8_t reason)
127127
bt_mesh_adv_update();
128128
}
129129

130-
struct net_buf_simple *bt_mesh_pb_gatt_get_buf(void)
131-
{
132-
struct net_buf_simple *buf = &cli.buf;
133-
134-
net_buf_simple_reset(buf);
135-
136-
return buf;
137-
}
138-
139130
static void prov_ccc_changed(const struct bt_gatt_attr *attr, uint16_t value)
140131
{
141132
BT_DBG("value 0x%04x", value);

subsys/bluetooth/mesh/pb_gatt_srv.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ int bt_mesh_pb_gatt_send(struct bt_conn *conn, struct net_buf_simple *buf,
1616
int bt_mesh_pb_gatt_enable(void);
1717
int bt_mesh_pb_gatt_disable(void);
1818

19-
struct net_buf_simple *bt_mesh_pb_gatt_get_buf(void);
20-
2119
int bt_mesh_pb_gatt_adv_start(void);
2220

2321
#endif /* ZEPHYR_SUBSYS_BLUETOOTH_MESH_PB_GATT_SRV_H_ */

0 commit comments

Comments
 (0)