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
F102978834: D32627.id97383.diff
Tue, Nov 19, 10:29 AM
Unknown Object (File)
Mon, Nov 18, 6:11 AM
Unknown Object (File)
Wed, Nov 13, 8:18 PM
Unknown Object (File)
Tue, Nov 12, 2:14 AM
Unknown Object (File)
Tue, Nov 12, 2:07 AM
Unknown Object (File)
Tue, Nov 12, 2:03 AM
Unknown Object (File)
Tue, Nov 12, 1:44 AM
Unknown Object (File)
Oct 18 2024, 8:35 AM
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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 42337
Build 39225: arc lint + arc unit

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.