@@ -1911,8 +1911,7 @@ static void gatt_indicate_rsp(struct bt_conn *conn, uint8_t err,
19111911}
19121912
19131913static int gatt_send (struct bt_conn * conn , struct net_buf * buf ,
1914- bt_att_func_t func , void * params ,
1915- bt_att_destroy_t destroy )
1914+ bt_att_func_t func , void * params )
19161915{
19171916 int err ;
19181917
@@ -1927,7 +1926,6 @@ static int gatt_send(struct bt_conn *conn, struct net_buf *buf,
19271926
19281927 req -> buf = buf ;
19291928 req -> func = func ;
1930- req -> destroy = destroy ;
19311929 req -> user_data = params ;
19321930
19331931 err = bt_att_req_send (conn , req );
@@ -1979,7 +1977,7 @@ static int gatt_indicate(struct bt_conn *conn, uint16_t handle,
19791977 net_buf_add (buf , params -> len );
19801978 memcpy (ind -> value , params -> data , params -> len );
19811979
1982- return gatt_send (conn , buf , gatt_indicate_rsp , params , NULL );
1980+ return gatt_send (conn , buf , gatt_indicate_rsp , params );
19831981}
19841982
19851983static uint8_t notify_cb (const struct bt_gatt_attr * attr , uint16_t handle ,
@@ -2752,7 +2750,7 @@ int bt_gatt_exchange_mtu(struct bt_conn *conn,
27522750 req = net_buf_add (buf , sizeof (* req ));
27532751 req -> mtu = sys_cpu_to_le16 (mtu );
27542752
2755- return gatt_send (conn , buf , gatt_mtu_rsp , params , NULL );
2753+ return gatt_send (conn , buf , gatt_mtu_rsp , params );
27562754}
27572755
27582756static void gatt_discover_next (struct bt_conn * conn , uint16_t last_handle ,
@@ -2882,7 +2880,7 @@ static int gatt_find_type(struct bt_conn *conn,
28822880 return - EINVAL ;
28832881 }
28842882
2885- return gatt_send (conn , buf , gatt_find_type_rsp , params , NULL );
2883+ return gatt_send (conn , buf , gatt_find_type_rsp , params );
28862884}
28872885
28882886static void read_included_uuid_cb (struct bt_conn * conn , uint8_t err ,
@@ -2947,7 +2945,7 @@ static int read_included_uuid(struct bt_conn *conn,
29472945
29482946 BT_DBG ("handle 0x%04x" , params -> _included .start_handle );
29492947
2950- return gatt_send (conn , buf , read_included_uuid_cb , params , NULL );
2948+ return gatt_send (conn , buf , read_included_uuid_cb , params );
29512949}
29522950
29532951static uint16_t parse_include (struct bt_conn * conn , const void * pdu ,
@@ -3169,7 +3167,7 @@ static int gatt_read_type(struct bt_conn *conn,
31693167 BT_DBG ("start_handle 0x%04x end_handle 0x%04x" , params -> start_handle ,
31703168 params -> end_handle );
31713169
3172- return gatt_send (conn , buf , gatt_read_type_rsp , params , NULL );
3170+ return gatt_send (conn , buf , gatt_read_type_rsp , params );
31733171}
31743172
31753173static uint16_t parse_service (struct bt_conn * conn , const void * pdu ,
@@ -3303,7 +3301,7 @@ static int gatt_read_group(struct bt_conn *conn,
33033301 BT_DBG ("start_handle 0x%04x end_handle 0x%04x" , params -> start_handle ,
33043302 params -> end_handle );
33053303
3306- return gatt_send (conn , buf , gatt_read_group_rsp , params , NULL );
3304+ return gatt_send (conn , buf , gatt_read_group_rsp , params );
33073305}
33083306
33093307static void gatt_find_info_rsp (struct bt_conn * conn , uint8_t err ,
@@ -3437,7 +3435,7 @@ static int gatt_find_info(struct bt_conn *conn,
34373435 BT_DBG ("start_handle 0x%04x end_handle 0x%04x" , params -> start_handle ,
34383436 params -> end_handle );
34393437
3440- return gatt_send (conn , buf , gatt_find_info_rsp , params , NULL );
3438+ return gatt_send (conn , buf , gatt_find_info_rsp , params );
34413439}
34423440
34433441int bt_gatt_discover (struct bt_conn * conn ,
@@ -3594,7 +3592,7 @@ static int gatt_read_blob(struct bt_conn *conn,
35943592 BT_DBG ("handle 0x%04x offset 0x%04x" , params -> single .handle ,
35953593 params -> single .offset );
35963594
3597- return gatt_send (conn , buf , gatt_read_rsp , params , NULL );
3595+ return gatt_send (conn , buf , gatt_read_rsp , params );
35983596}
35993597
36003598static int gatt_read_uuid (struct bt_conn * conn ,
@@ -3622,7 +3620,7 @@ static int gatt_read_uuid(struct bt_conn *conn,
36223620 params -> by_uuid .start_handle , params -> by_uuid .end_handle ,
36233621 bt_uuid_str (params -> by_uuid .uuid ));
36243622
3625- return gatt_send (conn , buf , gatt_read_rsp , params , NULL );
3623+ return gatt_send (conn , buf , gatt_read_rsp , params );
36263624}
36273625
36283626#if defined(CONFIG_BT_GATT_READ_MULTIPLE )
@@ -3660,7 +3658,7 @@ static int gatt_read_mult(struct bt_conn *conn,
36603658 net_buf_add_le16 (buf , params -> handles [i ]);
36613659 }
36623660
3663- return gatt_send (conn , buf , gatt_read_mult_rsp , params , NULL );
3661+ return gatt_send (conn , buf , gatt_read_mult_rsp , params );
36643662}
36653663
36663664#if defined(CONFIG_BT_EATT )
@@ -3723,7 +3721,7 @@ static int gatt_read_mult_vl(struct bt_conn *conn,
37233721 net_buf_add_le16 (buf , params -> handles [i ]);
37243722 }
37253723
3726- return gatt_send (conn , buf , gatt_read_mult_vl_rsp , params , NULL );
3724+ return gatt_send (conn , buf , gatt_read_mult_vl_rsp , params );
37273725}
37283726#endif /* CONFIG_BT_EATT */
37293727
@@ -3779,7 +3777,7 @@ int bt_gatt_read(struct bt_conn *conn, struct bt_gatt_read_params *params)
37793777
37803778 BT_DBG ("handle 0x%04x" , params -> single .handle );
37813779
3782- return gatt_send (conn , buf , gatt_read_rsp , params , NULL );
3780+ return gatt_send (conn , buf , gatt_read_rsp , params );
37833781}
37843782
37853783static void gatt_write_rsp (struct bt_conn * conn , uint8_t err , const void * pdu ,
@@ -3858,7 +3856,7 @@ static int gatt_exec_write(struct bt_conn *conn,
38583856
38593857 BT_DBG ("" );
38603858
3861- return gatt_send (conn , buf , gatt_write_rsp , params , NULL );
3859+ return gatt_send (conn , buf , gatt_write_rsp , params );
38623860}
38633861
38643862static void gatt_prepare_write_rsp (struct bt_conn * conn , uint8_t err ,
@@ -3918,7 +3916,7 @@ static int gatt_prepare_write(struct bt_conn *conn,
39183916 BT_DBG ("handle 0x%04x offset %u len %u" , params -> handle , params -> offset ,
39193917 params -> length );
39203918
3921- return gatt_send (conn , buf , gatt_prepare_write_rsp , params , NULL );
3919+ return gatt_send (conn , buf , gatt_prepare_write_rsp , params );
39223920}
39233921
39243922int bt_gatt_write (struct bt_conn * conn , struct bt_gatt_write_params * params )
@@ -3959,7 +3957,7 @@ int bt_gatt_write(struct bt_conn *conn, struct bt_gatt_write_params *params)
39593957
39603958 BT_DBG ("handle 0x%04x length %u" , params -> handle , params -> length );
39613959
3962- return gatt_send (conn , buf , gatt_write_rsp , params , NULL );
3960+ return gatt_send (conn , buf , gatt_write_rsp , params );
39633961}
39643962
39653963static void gatt_write_ccc_rsp (struct bt_conn * conn , uint8_t err ,
@@ -4021,7 +4019,7 @@ static int gatt_write_ccc(struct bt_conn *conn, uint16_t handle, uint16_t value,
40214019
40224020 atomic_set_bit (params -> flags , BT_GATT_SUBSCRIBE_FLAG_WRITE_PENDING );
40234021
4024- return gatt_send (conn , buf , func , params , NULL );
4022+ return gatt_send (conn , buf , func , params );
40254023}
40264024
40274025#if defined(CONFIG_BT_GATT_AUTO_DISCOVER_CCC )
0 commit comments