This is an automated email from the ASF dual-hosted git repository. janc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 75a3ec3ad2caca69e08788c7a429d2f7d25de6dc Author: Szymon Czapracki <szymon.czapra...@codecoup.pl> AuthorDate: Wed Jan 29 16:59:24 2025 +0100 apps: bttester: Remove set_mult support This command has no corresponding auto-pts procedure. Notify is now utilized via function specially designed for notify purpose. --- apps/bttester/src/btp/btp_gatt.h | 6 ----- apps/bttester/src/btp_gatt.c | 48 ---------------------------------------- 2 files changed, 54 deletions(-) diff --git a/apps/bttester/src/btp/btp_gatt.h b/apps/bttester/src/btp/btp_gatt.h index 7849263de..6c57ade09 100644 --- a/apps/bttester/src/btp/btp_gatt.h +++ b/apps/bttester/src/btp/btp_gatt.h @@ -314,12 +314,6 @@ struct btp_gatt_change_database_cmd { uint8_t visibility; } __packed; -#define BTP_GATT_SET_MULT_VALUE 0x20 -struct btp_gatt_set_mult_val_cmd { - uint16_t count; - uint8_t data[0]; -} __packed; - #define BTP_GATT_NOTIFY_MULTIPLE 0x21 struct btp_gatt_notify_mult_val_cmd { ble_addr_t addr; diff --git a/apps/bttester/src/btp_gatt.c b/apps/bttester/src/btp_gatt.c index cbfe1f8fe..b6ac433c0 100644 --- a/apps/bttester/src/btp_gatt.c +++ b/apps/bttester/src/btp_gatt.c @@ -1907,49 +1907,6 @@ notify_multiple(uint16_t conn_handle, void *arg) return rc; } -static uint8_t -set_mult(const void *cmd, uint16_t cmd_len, - void *rsp, uint16_t *rsp_len) -{ - const struct btp_gatt_set_mult_val_cmd *cp = cmd; - struct ble_gatt_notif tuples[16]; - int i; - int rc = 0; - int data_idx = 0; - uint16_t data_len; - struct notify_mult_cb_data cb_data; - - for (i = 0; i < cp->count; i++) { - tuples[i].handle = get_le16(cp->data + data_idx); - data_idx += 2; - tuples[i].value = ble_hs_mbuf_att_pkt(); - if (tuples[i].value == NULL) { - rc = ENOMEM; - goto done; - } - - data_len = get_le16(cp->data + data_idx); - data_idx += 2; - - os_mbuf_append(tuples[i].value, cp->data + data_idx, data_len); - data_idx += data_len; - } - - for (i = 0; i < cp->count; i++) { - ble_att_svr_write_local(tuples[i].handle, tuples[i].value); - cb_data.handles[i] = tuples[i].handle; - } - - cb_data.tuple_cnt = cp->count; - ble_gap_conn_foreach_handle(notify_multiple, (void *)&cb_data); -done: - if (rc != 0) { - return BTP_STATUS_FAILED; - } - - return BTP_STATUS_SUCCESS; -} - static uint8_t notify_mult(const void *cmd, uint16_t cmd_len, void *rsp, uint16_t *rsp_len) @@ -2164,11 +2121,6 @@ static const struct btp_handler handlers[] = { .expect_len = sizeof(struct btp_gatt_get_attribute_value_cmd), .func = get_attr_val, }, - { - .opcode = BTP_GATT_SET_MULT_VALUE, - .expect_len = BTP_HANDLER_LENGTH_VARIABLE, - .func = set_mult, - }, { .opcode = BTP_GATT_NOTIFY_MULTIPLE, .expect_len = BTP_HANDLER_LENGTH_VARIABLE,