Page MenuHomeFreeBSD

iwm: add phy/mac context tasks; clean up task stop; add net80211 MAC methods
Needs ReviewPublic

Authored by adrian on Sun, Oct 11, 4:21 AM.
Referenced Files
F175777381: D60607.diff
Tue, Oct 13, 6:53 AM
Unknown Object (File)
Mon, Oct 12, 1:17 PM
Unknown Object (File)
Mon, Oct 12, 3:39 AM
Unknown Object (File)
Mon, Oct 12, 12:25 AM
Unknown Object (File)
Mon, Oct 12, 12:24 AM
Unknown Object (File)
Sun, Oct 11, 11:22 PM
Unknown Object (File)
Sun, Oct 11, 6:10 PM
Unknown Object (File)
Sun, Oct 11, 6:12 AM
Subscribers

Details

Reviewers
None
Group Reviewers
wireless
Summary
  • Add phy/mac tasks, the phy task is currently a placeholder
  • Add in the MAC methods from net80211 that are called whenever the VAP mode needs updating
  • Mark the hardware as STOPPED during shutdown so scheduled tasks don't run

The fun side of this work:

  • detaching net80211 causes the parent method to be called which leads to iwm_stop() being called, and at least one of the entry paths into iwm_stop() has IWM_LOCK held, and we can't do a taskqueue_drain() or taskqueue_drain_all() call with any lock held as it will sleep.
  • the net80211 detach path is calling at least one of the MAC methods during detach, and since the taskqueue is being deleted /before/ the net80211 detach path, we have to make sure nothing is actually going to do taskqueue work after that!
  • STOPPED in FreeBSD is MOSTLY doing the same as SHUTDOWN in OpenBSD. It should be fine enough for this.

Locally tested:

  • 7260 STA mode - create, ctrl-C wpa_supplicant; create, destroy; create, unload; create, destroy, unload. The create+unload paths generate interesting net80211 tear down states which were causing issues here.

Diff Detail

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