From acc5daf0e21c4683fe8c68c739e138cd0fdde27c Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 20 Sep 2024 06:55:36 -0700 Subject: [PATCH] netdev: allow empty TX/RX bitrate attributes The TX or RX bitrate attributes can contain zero nested attributes. This causes netdev_parse_bitrate() to fail, but this shouldn't then cause the overall parsing to fail (we just don't have those values). Fix this by continuing to parse attributes if either the TX/RX bitrates fail to parse. --- src/netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netdev.c b/src/netdev.c index d95a2a1e..1e923805 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -602,7 +602,7 @@ static bool netdev_parse_sta_info(struct l_genl_attr *attr, if (!netdev_parse_bitrate(&nested, &info->rx_mcs_type, &info->rx_bitrate, &info->rx_mcs)) - return false; + continue; info->have_rx_bitrate = true; @@ -618,7 +618,7 @@ static bool netdev_parse_sta_info(struct l_genl_attr *attr, if (!netdev_parse_bitrate(&nested, &info->tx_mcs_type, &info->tx_bitrate, &info->tx_mcs)) - return false; + continue; info->have_tx_bitrate = true;