Page MenuHomeFreeBSD

if_iwx: use net80211 suspend and resume methods
ClosedPublic

Authored by thj on May 22 2025, 2:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 3, 5:32 PM
Unknown Object (File)
Fri, Oct 3, 8:21 AM
Unknown Object (File)
Wed, Oct 1, 11:25 PM
Unknown Object (File)
Wed, Oct 1, 10:43 AM
Unknown Object (File)
Tue, Sep 30, 8:06 AM
Unknown Object (File)
Sun, Sep 21, 2:14 AM
Unknown Object (File)
Wed, Sep 17, 7:27 AM
Unknown Object (File)
Sep 9 2025, 7:38 AM

Details

Summary

Use net80211 suspend and resume methods when entering and leaving
suspend. Move the resume action outside of the IWX_LOCK.

Re-assert disabling the PCI timeout, this is copied from OpenBSD, but it
doesn't seem to hurt.

Test Plan

This lets me suspend and resume successfully many times. On resume I have to
kick iwx sometimes and trick it into letting traffic through, but I see this
pre-suspend on the same hardware so it is probably a different issue.

Diff Detail

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

Event Timeline

thj requested review of this revision.May 22 2025, 2:32 PM
adrian added a subscriber: adrian.
adrian added inline comments.
sys/dev/iwx/if_iwx.c
10679

I love how this keeps being copy/pasted from if_ath_pci.c :-)

This revision is now accepted and ready to land.May 22 2025, 2:36 PM
bz added inline comments.
sys/dev/iwx/if_iwx.c
10692

I wonder if you just want to call iwx_init here and also reset the watchdog?
I also wonder if you should, in suspend, disable it as it'll likely fire as you come back?

I'm finally updating my GE76 w/ AX210 to test iwx and iwlwifi in -head out, so I'll have to apply this to actually get it to pass a suspend/resume pass. stay tuned!

  • Use iwx_init on resume
This revision now requires review to proceed.May 26 2025, 1:12 PM
thj marked 2 inline comments as done.May 26 2025, 1:13 PM
thj added inline comments.
sys/dev/iwx/if_iwx.c
10679

I found one instance where the value was 0x40 rather than 0x41 in the comment. I'm happy to carry this incantation if someone else was.

This doesn't apply cleanly on -head, it requires D49827 first

sys/dev/iwx/if_iwx.c
10689–10690

You're missing an IWX_UNLOCK() here in the error path (after iwx_stop_device())

thj marked an inline comment as done.
  • iwx: unlock on error path
  • create a diff that can be applied on main (sorry)

It's better than the status quo in -HEAD, so let's get it in and then churn some more on making it recover better!

This revision is now accepted and ready to land.May 28 2025, 3:29 AM
This revision was automatically updated to reflect the committed changes.