3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-21 03:32:42 +01:00

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.
This commit is contained in:
James Prestwood 2024-09-20 06:55:36 -07:00 committed by Denis Kenzior
parent 5c22ab6621
commit acc5daf0e2

View File

@ -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;