Skip to content

Fix obtention of rx_bitrate and tx_bitrate. #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Property404
Copy link

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).

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
maping 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`).
@Property404 Property404 marked this pull request as ready for review September 28, 2021 20:07
@MaxVerevkin
Copy link

FYI I've included this fix in https://github.com/MaxVerevkin/neli-wifi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants