Page MenuHomeFreeBSD

sys: convert ni->ni_txrate references use to the new net80211 API
ClosedPublic

Authored by adrian on Jan 23 2025, 2:35 AM.
Referenced Files
Unknown Object (File)
Fri, Mar 7, 7:30 AM
Unknown Object (File)
Tue, Mar 4, 6:53 AM
Unknown Object (File)
Sat, Mar 1, 2:35 PM
Unknown Object (File)
Wed, Feb 26, 8:50 PM
Unknown Object (File)
Mon, Feb 24, 9:39 AM
Unknown Object (File)
Sat, Feb 22, 11:33 PM
Unknown Object (File)
Mon, Feb 17, 9:21 AM
Unknown Object (File)
Sat, Feb 15, 3:23 AM

Details

Summary

This just mechanically converts things.

  • For linuxkpi, it was just used for display.
  • For uath, it was just used for display, as firmware doesn't report it up.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62104
Build 58988: arc lint + arc unit

Event Timeline

thj added inline comments.
sys/dev/ath/ath_rate/onoe/onoe.c
394

Shouldn't this be divided by 2 if the rate is returned in 500kbit units?

bz requested changes to this revision.Jan 26 2025, 10:23 PM
bz added a subscriber: bz.
bz added inline comments.
sys/dev/ath/ath_rate/onoe/onoe.c
206

uint8_t

394

This is sorted but nor marked as done?

sys/dev/ipw/if_ipw.c
841

Funny that iwi right below holds the reference over this but ipw did not...

sys/dev/mwl/if_mwl.c
3347

Can this be an uint8_t or does it have to stay int? ( I haven't checked the surrounding code )

sys/dev/wtap/if_wtap.c
620

Is there a leading blank here?

This revision now requires changes to proceed.Jan 26 2025, 10:23 PM
sys/dev/ath/ath_rate/onoe/onoe.c
394

it's really kbit now, not 1/2mbit

sys/dev/ipw/if_ipw.c
841

Yeah this wasn't ever consistent. A lot (and I mean a /lot/) of hilarity in crashes in the past due to the node refcounting/garbage collecting locking changes same did years ago.

It would be great to also clean this stuff up and make it consistent.

sys/dev/mwl/if_mwl.c
3347

I think it's a HW field first, not a dot11rate

gavin added inline comments.
sys/dev/ath/ath_rate/onoe/onoe.c
225–227

Extra trailing brace?

adrian marked 4 inline comments as done.

update, fix things from gavin/bz

fixed, please re-review!

sys/dev/wtap/if_wtap.c
620

nope, just a tab!

add mtw, now that it landed in -head

I think that dot11rate should be a uint8_t, but you can change it on commit if you agree

sys/dev/ath/ath_rate/amrr/amrr.c
248–252
bz requested changes to this revision.Sat, Feb 15, 12:13 PM
bz added inline comments.
sys/dev/ath/ath_rate/amrr/amrr.c
248–252

@adrian this still needs to be addressed?

sys/dev/ath/ath_rate/sample/sample.c
860

Is this actually correct still or does it need to be (pseudo-code)?

if (HT)
   ieee80211_node_set_txrate_ht_mcsrate
else
   ieee80211_node_set_txrate_dot11rate
sys/dev/iwm/if_iwm.c
3454

This could move down to line 3467 (next to tx_resp_rate).

sys/dev/usb/wlan/if_mtw.c
2165 ↗(On Diff #150788)

This is probably wrong and should go under 2212 once rate control is done?

This revision now requires changes to proceed.Sat, Feb 15, 12:13 PM

@adrian did you miss this one? It has some question from thj and me open now. If this gets sorted then the first four of your stack are in :) I'll do the next ones now.

In D48602#1117904, @bz wrote:

@adrian did you miss this one? It has some question from thj and me open now. If this gets sorted then the first four of your stack are in :) I'll do the next ones now.

I'm still getting to em :)

adrian marked an inline comment as done.

address some more comments from thj/bz

sys/dev/ath/ath_rate/sample/sample.c
860

fwiw, dot11rate still works fine for HT and legacy.

bz accepted this revision.
This revision is now accepted and ready to land.Sun, Feb 16, 8:53 PM

There is a way to close this with the commit https://cgit.FreeBSD.org/src/commit/?id=7067450010931479f8dd97e51e4c5bf6a4d34c7e but I never know how; @emaste what is the magic if Phab did not do it automatically from the commit hooks?

Adrian got it: if it's accepted it can be closed, then Edit Related Objects -> Edit Commits.