From f9a7a2f7dbc238c17fd5feb7948de1fd9ca1f717 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 14 Jul 2020 18:09:31 +0200 Subject: [PATCH] testmode: fix setting tx_power Signed-off-by: Felix Fietkau --- tools/fields.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/fields.c b/tools/fields.c index 8f7f7997..71fc44fe 100644 --- a/tools/fields.c +++ b/tools/fields.c @@ -231,10 +231,10 @@ static void print_extra_stats(const struct tm_field *field, struct nlattr **tb) ##__VA_ARGS__ \ ) -#define FIELD_ARRAY(_field, _name, ...) \ - FIELD_ARRAY(_type, _field, _name, \ - .parse2 = parse_##_type, \ - ##__VA_ARGS__ \ +#define FIELD_ARRAY(_type, _field, _name, ...) \ + FIELD_ARRAY_RO(_type, _field, _name, \ + .parse2 = parse_##_type, \ + ##__VA_ARGS__ \ ) #define FIELD_NESTED_RO(_field, _data, _prefix, ...) \ @@ -293,7 +293,7 @@ static const struct tm_field testdata_fields[NUM_MT76_TM_ATTRS] = { FIELD(u8, TX_RATE_SGI, "tx_rate_sgi"), FIELD(u8, TX_RATE_LDPC, "tx_rate_ldpc"), FIELD(u8, TX_POWER_CONTROL, "tx_power_control"), - FIELD(u8, TX_POWER, "tx_power"), + FIELD_ARRAY(u8, TX_POWER, "tx_power"), FIELD(u8, TX_ANTENNA, "tx_antenna"), FIELD(u32, FREQ_OFFSET, "freq_offset"), FIELD_NESTED_RO(STATS, stats, "",