Page MenuHomeFreeBSD

if_iwx: use net80211 suspend and resume methods
ClosedPublic

Authored by thj on Thu, May 22, 2:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 28, 1:10 PM
Unknown Object (File)
Wed, May 28, 9:50 AM
Unknown Object (File)
Wed, May 28, 8:56 AM
Unknown Object (File)
Mon, May 26, 11:47 PM
Unknown Object (File)
Mon, May 26, 3:18 PM
Unknown Object (File)
Sat, May 24, 11:14 AM
Unknown Object (File)
Sat, May 24, 8:39 AM
Unknown Object (File)
Sat, May 24, 6:42 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.Thu, May 22, 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.Thu, May 22, 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.Mon, May 26, 1:12 PM
thj marked 2 inline comments as done.Mon, May 26, 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.Wed, May 28, 3:29 AM
This revision was automatically updated to reflect the committed changes.