Skip to content

Fix obtention of rx_bitrate and tx_bitrate.#3

Open
Property404 wants to merge 1 commit into
Eonm:masterfrom
StarryInternet:dmartinez/upstream-patch-fix-bitrate-obtainment
Open

Fix obtention of rx_bitrate and tx_bitrate.#3
Property404 wants to merge 1 commit into
Eonm:masterfrom
StarryInternet:dmartinez/upstream-patch-fix-bitrate-obtainment

Conversation

@Property404

Copy link
Copy Markdown

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
Copy Markdown

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