HomeFreeBSD

iwx: rewrite iwx_rs_update() to be VHT aware, refactor it a bit

Description

iwx: rewrite iwx_rs_update() to be VHT aware, refactor it a bit

The current iwx_rs_update() code doesn't handle setting VHT rates
at all.

So:

  • write a routine - iwx_rs_update_node_txrate() - which will update the given node txrate info with the given notification
  • .. which is based on the print_ratenflags() logic and decoding
  • migrate iwx_rs_update() to use this routine, only on the STA BSS node.

This only handles decoding the version 2 rate_n_flags format response -
same as print_ratenflags() - so print if someone somehow sees a version
1 response.

It's shown a few things that deserve some later follow-up work:

  • I really should have net80211 APIs that operate on the txrate struct itself, not on the ieee80211_node, but I'll use what I have. Changing it later is easy.
  • the current net80211 txrate API doesn't include channel width, LDPC/STBC and such. I didn't need it for the earlier tx rate representation migration, but it would be nice to add it. (The reason is that those choices are currently made in the drivers using rate control, rather than the rate control module, which is again what the older code did as well.)

    This means that the displayed rate isn't EXACTLY what the NIC has chosen - eg the NIC could quite happily decide to transmit a 20MHz or 40MHz frame to an 80MHz STA if that actually works out better. So just add TODOs for those.

Locally tested:

  • AX210, STA mode

Differential Revision: https://reviews.freebsd.org/D52767
Reviewed by: thj

Details

Provenance
adrianAuthored on Sun, Sep 28, 3:19 AM
Reviewer
thj
Differential Revision
D52767: iwx: rewrite iwx_rs_update() to be VHT aware, refactor it a bit
Parents
rG88f467bd1a11: iwx: don't log VHT rate lookups in iwx_tx_fill_cmd() for data frames
Branches
Unknown
Tags
Unknown