nl80211
nl80211 copied to clipboard
Fix obtention of rx_bitrate and tx_bitrate.
The obtention of the rx/tx bitrates was implemented incorrectly.
The obtention was searching for a type of Nl80211StaInfo::StaInfoRxBytes, which is of the wrong enum type, and effectively maps to Nl80211RateInfo::RateInfoMcs, when it should be mapping to Nl80211StaInfo::RateInfoBitrate or Nl80211StaInfo::RateInfoBitrate32.
The 32-bit bitrate was introduced almost 10 years ago, so I don't believe it's
necessary to account for the possibility of it not being there, like
iw
does (see parse_bitrate()
in station.c
).