@@ -194,7 +194,7 @@ static k_tid_t att_handle_rsp_thread;
194
194
195
195
static struct bt_att_tx_meta_data tx_meta_data_storage [CONFIG_BT_ATT_TX_COUNT ];
196
196
197
- static struct bt_att_tx_meta_data * bt_att_get_tx_meta_data (const struct net_buf * buf );
197
+ static struct bt_att_tx_meta_data * att_get_tx_meta_data (const struct net_buf * buf );
198
198
static void att_on_sent_cb (struct bt_att_tx_meta_data * meta );
199
199
200
200
#if defined(CONFIG_BT_ATT_ERR_TO_STR )
@@ -255,7 +255,7 @@ const char *bt_att_err_to_str(uint8_t att_err)
255
255
256
256
static void att_tx_destroy (struct net_buf * buf )
257
257
{
258
- struct bt_att_tx_meta_data * p_meta = bt_att_get_tx_meta_data (buf );
258
+ struct bt_att_tx_meta_data * p_meta = att_get_tx_meta_data (buf );
259
259
struct bt_att_tx_meta_data meta ;
260
260
261
261
LOG_DBG ("%p" , buf );
@@ -289,7 +289,7 @@ NET_BUF_POOL_DEFINE(att_pool, CONFIG_BT_ATT_TX_COUNT,
289
289
BT_L2CAP_SDU_BUF_SIZE (BT_ATT_BUF_SIZE ),
290
290
CONFIG_BT_CONN_TX_USER_DATA_SIZE , att_tx_destroy );
291
291
292
- static struct bt_att_tx_meta_data * bt_att_get_tx_meta_data (const struct net_buf * buf )
292
+ static struct bt_att_tx_meta_data * att_get_tx_meta_data (const struct net_buf * buf )
293
293
{
294
294
__ASSERT_NO_MSG (net_buf_pool_get (buf -> pool_id ) == & att_pool );
295
295
@@ -304,7 +304,7 @@ static int bt_att_chan_send(struct bt_att_chan *chan, struct net_buf *buf);
304
304
static void att_chan_mtu_updated (struct bt_att_chan * updated_chan );
305
305
static void bt_att_disconnected (struct bt_l2cap_chan * chan );
306
306
307
- static struct net_buf * bt_att_create_rsp_pdu (struct bt_att_chan * chan , uint8_t op );
307
+ static struct net_buf * att_create_rsp_pdu (struct bt_att_chan * chan , uint8_t op );
308
308
309
309
static void att_disconnect (struct bt_att_chan * chan )
310
310
{
@@ -340,7 +340,7 @@ static int chan_send(struct bt_att_chan *chan, struct net_buf *buf)
340
340
struct bt_att_hdr * hdr ;
341
341
struct net_buf_simple_state state ;
342
342
int err ;
343
- struct bt_att_tx_meta_data * data = bt_att_get_tx_meta_data (buf );
343
+ struct bt_att_tx_meta_data * data = att_get_tx_meta_data (buf );
344
344
struct bt_att_chan * prev_chan = data -> att_chan ;
345
345
346
346
hdr = (void * )buf -> data ;
@@ -461,7 +461,7 @@ static struct net_buf *get_first_buf_matching_chan(struct k_fifo *fifo, struct b
461
461
k_fifo_init (& skipped );
462
462
463
463
while ((buf = k_fifo_get (fifo , K_NO_WAIT ))) {
464
- meta = bt_att_get_tx_meta_data (buf );
464
+ meta = att_get_tx_meta_data (buf );
465
465
if (!ret &&
466
466
att_chan_matches_chan_opt (chan , meta -> chan_opt )) {
467
467
ret = buf ;
@@ -491,7 +491,7 @@ static struct bt_att_req *get_first_req_matching_chan(sys_slist_t *reqs, struct
491
491
struct bt_att_tx_meta_data * meta = NULL ;
492
492
493
493
SYS_SLIST_FOR_EACH_NODE (reqs , curr ) {
494
- meta = bt_att_get_tx_meta_data (ATT_REQ (curr )-> buf );
494
+ meta = att_get_tx_meta_data (ATT_REQ (curr )-> buf );
495
495
if (att_chan_matches_chan_opt (chan , meta -> chan_opt )) {
496
496
break ;
497
497
}
@@ -755,7 +755,7 @@ static struct net_buf *bt_att_chan_create_pdu(struct bt_att_chan *chan, uint8_t
755
755
/* If we got a buf from `att_pool`, then the metadata slot at its index
756
756
* is officially ours to use.
757
757
*/
758
- data = bt_att_get_tx_meta_data (buf );
758
+ data = att_get_tx_meta_data (buf );
759
759
760
760
if (IS_ENABLED (CONFIG_BT_EATT )) {
761
761
net_buf_reserve (buf , BT_L2CAP_SDU_BUF_SIZE (0 ));
@@ -775,7 +775,7 @@ static int bt_att_chan_send(struct bt_att_chan *chan, struct net_buf *buf)
775
775
((struct bt_att_hdr * )buf -> data )-> code );
776
776
777
777
if (IS_ENABLED (CONFIG_BT_EATT ) &&
778
- !att_chan_matches_chan_opt (chan , bt_att_get_tx_meta_data (buf )-> chan_opt )) {
778
+ !att_chan_matches_chan_opt (chan , att_get_tx_meta_data (buf )-> chan_opt )) {
779
779
return - EINVAL ;
780
780
}
781
781
@@ -867,7 +867,7 @@ static uint8_t att_mtu_req(struct bt_att_chan *chan, struct net_buf *buf)
867
867
return BT_ATT_ERR_INVALID_PDU ;
868
868
}
869
869
870
- pdu = bt_att_create_rsp_pdu (chan , BT_ATT_OP_MTU_RSP );
870
+ pdu = att_create_rsp_pdu (chan , BT_ATT_OP_MTU_RSP );
871
871
if (!pdu ) {
872
872
return BT_ATT_ERR_UNLIKELY ;
873
873
}
@@ -1107,7 +1107,7 @@ static uint8_t att_find_info_rsp(struct bt_att_chan *chan, uint16_t start_handle
1107
1107
1108
1108
(void )memset (& data , 0 , sizeof (data ));
1109
1109
1110
- data .buf = bt_att_create_rsp_pdu (chan , BT_ATT_OP_FIND_INFO_RSP );
1110
+ data .buf = att_create_rsp_pdu (chan , BT_ATT_OP_FIND_INFO_RSP );
1111
1111
if (!data .buf ) {
1112
1112
return BT_ATT_ERR_INSUFFICIENT_RESOURCES ;
1113
1113
}
@@ -1261,7 +1261,7 @@ static uint8_t att_find_type_rsp(struct bt_att_chan *chan, uint16_t start_handle
1261
1261
1262
1262
(void )memset (& data , 0 , sizeof (data ));
1263
1263
1264
- data .buf = bt_att_create_rsp_pdu (chan , BT_ATT_OP_FIND_TYPE_RSP );
1264
+ data .buf = att_create_rsp_pdu (chan , BT_ATT_OP_FIND_TYPE_RSP );
1265
1265
if (!data .buf ) {
1266
1266
return BT_ATT_ERR_INSUFFICIENT_RESOURCES ;
1267
1267
}
@@ -1511,7 +1511,7 @@ static uint8_t att_read_type_rsp(struct bt_att_chan *chan, struct bt_uuid *uuid,
1511
1511
1512
1512
(void )memset (& data , 0 , sizeof (data ));
1513
1513
1514
- data .buf = bt_att_create_rsp_pdu (chan , BT_ATT_OP_READ_TYPE_RSP );
1514
+ data .buf = att_create_rsp_pdu (chan , BT_ATT_OP_READ_TYPE_RSP );
1515
1515
if (!data .buf ) {
1516
1516
return BT_ATT_ERR_INSUFFICIENT_RESOURCES ;
1517
1517
}
@@ -1663,7 +1663,7 @@ static uint8_t att_read_rsp(struct bt_att_chan *chan, uint8_t op, uint8_t rsp,
1663
1663
1664
1664
(void )memset (& data , 0 , sizeof (data ));
1665
1665
1666
- data .buf = bt_att_create_rsp_pdu (chan , rsp );
1666
+ data .buf = att_create_rsp_pdu (chan , rsp );
1667
1667
if (!data .buf ) {
1668
1668
return BT_ATT_ERR_INSUFFICIENT_RESOURCES ;
1669
1669
}
@@ -1736,7 +1736,7 @@ static uint8_t att_read_mult_req(struct bt_att_chan *chan, struct net_buf *buf)
1736
1736
1737
1737
(void )memset (& data , 0 , sizeof (data ));
1738
1738
1739
- data .buf = bt_att_create_rsp_pdu (chan , BT_ATT_OP_READ_MULT_RSP );
1739
+ data .buf = att_create_rsp_pdu (chan , BT_ATT_OP_READ_MULT_RSP );
1740
1740
if (!data .buf ) {
1741
1741
return BT_ATT_ERR_INSUFFICIENT_RESOURCES ;
1742
1742
}
@@ -1840,7 +1840,7 @@ static uint8_t att_read_mult_vl_req(struct bt_att_chan *chan, struct net_buf *bu
1840
1840
1841
1841
(void )memset (& data , 0 , sizeof (data ));
1842
1842
1843
- data .buf = bt_att_create_rsp_pdu (chan , BT_ATT_OP_READ_MULT_VL_RSP );
1843
+ data .buf = att_create_rsp_pdu (chan , BT_ATT_OP_READ_MULT_VL_RSP );
1844
1844
if (!data .buf ) {
1845
1845
return BT_ATT_ERR_INSUFFICIENT_RESOURCES ;
1846
1846
}
@@ -1962,7 +1962,7 @@ static uint8_t att_read_group_rsp(struct bt_att_chan *chan, struct bt_uuid *uuid
1962
1962
1963
1963
(void )memset (& data , 0 , sizeof (data ));
1964
1964
1965
- data .buf = bt_att_create_rsp_pdu (chan , BT_ATT_OP_READ_GROUP_RSP );
1965
+ data .buf = att_create_rsp_pdu (chan , BT_ATT_OP_READ_GROUP_RSP );
1966
1966
if (!data .buf ) {
1967
1967
return BT_ATT_ERR_INSUFFICIENT_RESOURCES ;
1968
1968
}
@@ -2276,7 +2276,7 @@ static uint8_t att_prep_write_rsp(struct bt_att_chan *chan, uint16_t handle,
2276
2276
net_buf_slist_put (& chan -> att -> prep_queue , data .buf );
2277
2277
2278
2278
/* Generate response */
2279
- data .buf = bt_att_create_rsp_pdu (chan , BT_ATT_OP_PREPARE_WRITE_RSP );
2279
+ data .buf = att_create_rsp_pdu (chan , BT_ATT_OP_PREPARE_WRITE_RSP );
2280
2280
if (!data .buf ) {
2281
2281
return BT_ATT_ERR_INSUFFICIENT_RESOURCES ;
2282
2282
}
@@ -2423,7 +2423,7 @@ static uint8_t att_exec_write_rsp(struct bt_att_chan *chan, uint8_t flags)
2423
2423
}
2424
2424
2425
2425
/* Generate response */
2426
- buf = bt_att_create_rsp_pdu (chan , BT_ATT_OP_EXEC_WRITE_RSP );
2426
+ buf = att_create_rsp_pdu (chan , BT_ATT_OP_EXEC_WRITE_RSP );
2427
2427
if (!buf ) {
2428
2428
return BT_ATT_ERR_UNLIKELY ;
2429
2429
}
@@ -3064,7 +3064,7 @@ struct net_buf *bt_att_create_pdu(struct bt_conn *conn, uint8_t op, size_t len)
3064
3064
return NULL ;
3065
3065
}
3066
3066
3067
- static struct net_buf * bt_att_create_rsp_pdu (struct bt_att_chan * chan , uint8_t op )
3067
+ static struct net_buf * att_create_rsp_pdu (struct bt_att_chan * chan , uint8_t op )
3068
3068
{
3069
3069
size_t headroom ;
3070
3070
struct bt_att_hdr * hdr ;
@@ -3085,7 +3085,7 @@ static struct net_buf *bt_att_create_rsp_pdu(struct bt_att_chan *chan, uint8_t o
3085
3085
3086
3086
net_buf_reserve (buf , headroom );
3087
3087
3088
- data = bt_att_get_tx_meta_data (buf );
3088
+ data = att_get_tx_meta_data (buf );
3089
3089
data -> att_chan = chan ;
3090
3090
3091
3091
hdr = net_buf_add (buf , sizeof (* hdr ));
@@ -4133,7 +4133,7 @@ bool bt_att_out_of_sync_sent_on_fixed(struct bt_conn *conn)
4133
4133
void bt_att_set_tx_meta_data (struct net_buf * buf , bt_gatt_complete_func_t func , void * user_data ,
4134
4134
enum bt_att_chan_opt chan_opt )
4135
4135
{
4136
- struct bt_att_tx_meta_data * data = bt_att_get_tx_meta_data (buf );
4136
+ struct bt_att_tx_meta_data * data = att_get_tx_meta_data (buf );
4137
4137
4138
4138
data -> func = func ;
4139
4139
data -> user_data = user_data ;
@@ -4143,15 +4143,15 @@ void bt_att_set_tx_meta_data(struct net_buf *buf, bt_gatt_complete_func_t func,
4143
4143
4144
4144
void bt_att_increment_tx_meta_data_attr_count (struct net_buf * buf , uint16_t attr_count )
4145
4145
{
4146
- struct bt_att_tx_meta_data * data = bt_att_get_tx_meta_data (buf );
4146
+ struct bt_att_tx_meta_data * data = att_get_tx_meta_data (buf );
4147
4147
4148
4148
data -> attr_count += attr_count ;
4149
4149
}
4150
4150
4151
4151
bool bt_att_tx_meta_data_match (const struct net_buf * buf , bt_gatt_complete_func_t func ,
4152
4152
const void * user_data , enum bt_att_chan_opt chan_opt )
4153
4153
{
4154
- const struct bt_att_tx_meta_data * meta = bt_att_get_tx_meta_data (buf );
4154
+ const struct bt_att_tx_meta_data * meta = att_get_tx_meta_data (buf );
4155
4155
4156
4156
return ((meta -> func == func ) &&
4157
4157
(meta -> user_data == user_data ) &&
0 commit comments