dect: add crc error statistic
Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
598dcf6c52
commit
d9cf87a0bc
|
@ -59,6 +59,7 @@ enum dect_slot_attrs {
|
|||
DECTA_SLOT_RSSI,
|
||||
DECTA_SLOT_RX_PACKETS,
|
||||
DECTA_SLOT_RX_BYTES,
|
||||
DECTA_SLOT_RX_A_CRC_ERRORS,
|
||||
DECTA_SLOT_TX_PACKETS,
|
||||
DECTA_SLOT_TX_BYTES,
|
||||
__DECTA_SLOT_MAX
|
||||
|
|
|
@ -808,6 +808,7 @@ struct nl_dect_transceiver_slot {
|
|||
int32_t dts_phaseoff;
|
||||
uint32_t dts_rx_bytes;
|
||||
uint32_t dts_rx_packets;
|
||||
uint32_t dts_rx_a_crc_errors;
|
||||
uint32_t dts_tx_bytes;
|
||||
uint32_t dts_tx_packets;
|
||||
};
|
||||
|
|
|
@ -50,6 +50,7 @@ static struct nla_policy slot_policy[DECTA_SLOT_MAX + 1] = {
|
|||
[DECTA_SLOT_RSSI] = { .type = NLA_U8 },
|
||||
[DECTA_SLOT_RX_BYTES] = { .type = NLA_U32 },
|
||||
[DECTA_SLOT_RX_PACKETS] = { .type = NLA_U32 },
|
||||
[DECTA_SLOT_RX_A_CRC_ERRORS] = { .type = NLA_U32 },
|
||||
[DECTA_SLOT_TX_BYTES] = { .type = NLA_U32 },
|
||||
[DECTA_SLOT_TX_PACKETS] = { .type = NLA_U32 },
|
||||
};
|
||||
|
@ -85,6 +86,8 @@ static int slot_parser(struct nl_dect_transceiver *trx, struct nlattr *nla)
|
|||
dts->dts_rx_bytes = nla_get_u32(tb[DECTA_SLOT_RX_BYTES]);
|
||||
if (tb[DECTA_SLOT_RX_PACKETS] != NULL)
|
||||
dts->dts_rx_packets = nla_get_u32(tb[DECTA_SLOT_RX_PACKETS]);
|
||||
if (tb[DECTA_SLOT_RX_A_CRC_ERRORS] != NULL)
|
||||
dts->dts_rx_a_crc_errors = nla_get_u32(tb[DECTA_SLOT_RX_A_CRC_ERRORS]);
|
||||
if (tb[DECTA_SLOT_TX_BYTES] != NULL)
|
||||
dts->dts_tx_bytes = nla_get_u32(tb[DECTA_SLOT_TX_BYTES]);
|
||||
if (tb[DECTA_SLOT_TX_PACKETS] != NULL)
|
||||
|
|
|
@ -60,8 +60,8 @@ static void slot_dump(struct nl_dect_transceiver_slot *dts, unsigned int n,
|
|||
nl_dect_rssi_to_dbm(dts->dts_rssi));
|
||||
nl_dump(p, "\n");
|
||||
|
||||
nl_dump(p, "\t RX: bytes %u packets %u\n",
|
||||
dts->dts_rx_bytes, dts->dts_rx_packets);
|
||||
nl_dump(p, "\t RX: bytes %u packets %u crc-errors %u\n",
|
||||
dts->dts_rx_bytes, dts->dts_rx_packets, dts->dts_rx_a_crc_errors);
|
||||
nl_dump(p, "\t TX: bytes %u packets %u\n",
|
||||
dts->dts_tx_bytes, dts->dts_tx_packets);
|
||||
}
|
||||
|
@ -91,10 +91,9 @@ static void transceiver_dump(struct nl_object *obj, struct nl_dump_params *p)
|
|||
nl_dump(p, ":\n");
|
||||
if (trx->trx_type != NULL)
|
||||
nl_dump_line(p, "\tType: %s\n", trx->trx_type);
|
||||
|
||||
nl_dump(p, "\tRF-band: %u\n", trx->trx_band);
|
||||
nl_dump(p, "\tEvents: busy: %u late: %u\n",
|
||||
stats->trx_event_busy, stats->trx_event_late);
|
||||
nl_dump(p, "\tRF-band: %u\n", trx->trx_band);
|
||||
|
||||
nl_dump(p, "\n");
|
||||
for (n = 0; n < 24; n++) {
|
||||
|
|
Reference in New Issue