mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-16 17:09:24 +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:
parent
5c22ab6621
commit
acc5daf0e2
@ -602,7 +602,7 @@ static bool netdev_parse_sta_info(struct l_genl_attr *attr,
|
|||||||
if (!netdev_parse_bitrate(&nested, &info->rx_mcs_type,
|
if (!netdev_parse_bitrate(&nested, &info->rx_mcs_type,
|
||||||
&info->rx_bitrate,
|
&info->rx_bitrate,
|
||||||
&info->rx_mcs))
|
&info->rx_mcs))
|
||||||
return false;
|
continue;
|
||||||
|
|
||||||
info->have_rx_bitrate = true;
|
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,
|
if (!netdev_parse_bitrate(&nested, &info->tx_mcs_type,
|
||||||
&info->tx_bitrate,
|
&info->tx_bitrate,
|
||||||
&info->tx_mcs))
|
&info->tx_mcs))
|
||||||
return false;
|
continue;
|
||||||
|
|
||||||
info->have_tx_bitrate = true;
|
info->have_tx_bitrate = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user