@@ -14,7 +14,6 @@ typedef bool (*mesh_io_init_t)(struct mesh_io *io, void *opts,
struct l_dbus *dbus, mesh_io_ready_func_t cb,
void *user_data);
typedef bool (*mesh_io_destroy_t)(struct mesh_io *io);
-typedef bool (*mesh_io_caps_t)(struct mesh_io *io, struct mesh_io_caps *caps);
typedef bool (*mesh_io_send_t)(struct mesh_io *io,
struct mesh_io_send_info *info,
const uint8_t *data, uint16_t len);
@@ -29,7 +28,6 @@ typedef bool (*mesh_io_tx_cancel_t)(struct mesh_io *io, const uint8_t *pattern,
struct mesh_io_api {
mesh_io_init_t init;
mesh_io_destroy_t destroy;
- mesh_io_caps_t caps;
mesh_io_send_t send;
mesh_io_register_t reg;
mesh_io_deregister_t dereg;
@@ -473,19 +473,6 @@ static bool dev_destroy(struct mesh_io *io)
return true;
}
-static bool dev_caps(struct mesh_io *io, struct mesh_io_caps *caps)
-{
- struct mesh_io_private *pvt = io->pvt;
-
- if (!pvt || !caps)
- return false;
-
- caps->max_num_filters = 255;
- caps->window_accuracy = 50;
-
- return true;
-}
-
static void send_cancel_done(const void *buf, uint8_t size,
void *user_data)
{
@@ -893,7 +880,6 @@ static bool recv_deregister(struct mesh_io *io, const uint8_t *filter,
const struct mesh_io_api mesh_io_generic = {
.init = dev_init,
.destroy = dev_destroy,
- .caps = dev_caps,
.send = send_tx,
.reg = recv_register,
.dereg = recv_deregister,
@@ -284,19 +284,6 @@ static bool unit_destroy(struct mesh_io *io)
return true;
}
-static bool unit_caps(struct mesh_io *io, struct mesh_io_caps *caps)
-{
- struct mesh_io_private *pvt = io->pvt;
-
- if (!pvt || !caps)
- return false;
-
- caps->max_num_filters = 255;
- caps->window_accuracy = 50;
-
- return true;
-}
-
static bool simple_match(const void *a, const void *b)
{
return a == b;
@@ -527,7 +514,6 @@ static bool recv_deregister(struct mesh_io *io, const uint8_t *filter,
const struct mesh_io_api mesh_io_unit = {
.init = unit_init,
.destroy = unit_destroy,
- .caps = unit_caps,
.send = send_tx,
.reg = recv_register,
.dereg = recv_deregister,
@@ -102,16 +102,6 @@ void mesh_io_destroy(struct mesh_io *io)
}
}
-bool mesh_io_get_caps(struct mesh_io *io, struct mesh_io_caps *caps)
-{
- io = l_queue_find(io_list, match_by_io, io);
-
- if (io && io->api && io->api->caps)
- return io->api->caps(io, caps);
-
- return false;
-}
-
bool mesh_io_register_recv_cb(struct mesh_io *io, const uint8_t *filter,
uint8_t len, mesh_io_recv_func_t cb,
void *user_data)
@@ -57,11 +57,6 @@ struct mesh_io_send_info {
} u;
};
-struct mesh_io_caps {
- uint8_t max_num_filters;
- uint8_t window_accuracy;
-};
-
typedef void (*mesh_io_recv_func_t)(void *user_data,
struct mesh_io_recv_info *info,
const uint8_t *data, uint16_t len);
@@ -78,8 +73,6 @@ struct mesh_io *mesh_io_new(enum mesh_io_type type, void *opts,
void *user_data);
void mesh_io_destroy(struct mesh_io *io);
-bool mesh_io_get_caps(struct mesh_io *io, struct mesh_io_caps *caps);
-
bool mesh_io_register_recv_cb(struct mesh_io *io, const uint8_t *filter,
uint8_t len, mesh_io_recv_func_t cb,
void *user_data);
@@ -57,7 +57,6 @@ struct bt_mesh {
uint16_t algorithms;
uint16_t req_index;
uint8_t friend_queue_sz;
- uint8_t max_filters;
bool initialized;
};
@@ -254,7 +253,6 @@ bool mesh_init(struct l_dbus *dbus, const char *config_dir,
const char *mesh_conf_fname, enum mesh_io_type type, void *opts,
mesh_ready_func_t cb, void *user_data)
{
- struct mesh_io_caps caps;
struct mesh_init_request *req;
if (mesh.io)
@@ -291,8 +289,6 @@ bool mesh_init(struct l_dbus *dbus, const char *config_dir,
}
l_debug("io %p", mesh.io);
- mesh_io_get_caps(mesh.io, &caps);
- mesh.max_filters = caps.max_num_filters;
pending_queue = l_queue_new();