Page MenuHomeFreeBSD

iwm: update if_iwmreg.h to the latest (as of today) openbsd changes
ClosedPublic

Authored by adrian on Oct 24 2021, 3:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 27, 7:40 PM
Unknown Object (File)
Mon, Jun 24, 10:26 AM
Unknown Object (File)
Fri, Jun 21, 4:51 AM
Unknown Object (File)
May 26 2024, 3:36 PM
Unknown Object (File)
May 26 2024, 3:36 PM
Unknown Object (File)
May 26 2024, 3:36 PM
Unknown Object (File)
May 26 2024, 3:35 PM
Unknown Object (File)
May 13 2024, 3:50 PM
Subscribers

Details

Summary

This updates the if_iwmreg.h definitions to;

OpenBSD: if_iwmreg.h,v 1.65 2021/10/11 09:03:22 stsp Exp

A few things haven't been fully converted, namely:

  • I left a couple things as enums for now just to reduce the other diffs needed; but they're the same values
  • The IWM_SCD_QUEUE_* macros have different offsets which I didn't update in case they broke things / changed based on later firmware. But they also may be real bugfixes which are needed for later chips. It'll need more testing before flipping this on.

The c file updates are:

  • Use the newer names for things if the name changed but the semantics didn't
  • Explicitly use the earlier firmware structs which maintain compat with the current firmware and code. The newer ones are in here and they'll get converted when more openbsd code is merged into this tree.
  • Use the older iwm rate table for now, which has entries for legacy rates, HT and VHT. Our code works with that right now, updating it to openbsd's err, "different" version can be done at a later date when HT/VHT support is added.

Notably, a bunch of definitions were deleted that weren't used.
They're not used either in the openbsd/dfbsd drivers so I think it's
safe to delete them in the long run.

Test Plan
  • 7260 hw 0x140

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

adrian added inline comments.
sys/amd64/conf/GENERIC
331 ↗(On Diff #97361)

... i'll remove this in the next commit wtf

From waddlespl today:

12:52 <waddlespl> actually, how much of this changes generated asm? because if it generates identical binaries minus symbols, should be ok to just merge

So that's actually a pretty good signal about it not breaking things.

Undo my whitespace changes to reduce diff to upstream

  • iwm: Update SCD register accesses

Reviewed by: md5

Used to be not uncommon

Note - do look at the if_iwmreg.h diff. It's not shown by default.

The second commit in the stack fixes some register access bits, so that changes the output binary a little. But it still works for me.

Updating commit message, comments

This revision was not accepted when it landed; it landed in state Needs Review.Oct 27 2021, 3:30 AM
This revision was automatically updated to reflect the committed changes.