The devmatch rc.d script now automatically loads kernel modules -- thank you Warner! -- which makes configuring wifi adapters much easier. However: The devmatch rc.d script runs very late in the boot process, which makes it incompatible with using lagg to switch automatically between wired and wireless networks (https://www.freebsd.org/doc/handbook/network-aggregation.html#networking-lagg-wired-and-wireless) -- if you try, you find that when lagg is created by /etc/rc.d/netif, it can't attach the wifi adapter because said adapter doesn't have a driver loaded yet. A workaround for this is "load the kernel modules via loader.conf and don't rely on devmatch", but that's not the most user-friendly option. A better fix might be to have lagg interfaces get created later in the boot process; that might be problematic if devmatch needs a working network for some reason. I'm not sure why devmatch runs so late.
Likely just needs a BEFORE: netif. All it REQUIRES is that / be mounted and kldxref has run.
Indeed, adding "BEFORE: netif" does the trick. Thanks!
Fixed in r361114, will MFC in 3 days.
^Triage: Assign to committer resolving Thanks Colin!
A commit references this bug: Author: cperciva Date: Tue May 19 01:40:46 UTC 2020 New revision: 361235 URL: https://svnweb.freebsd.org/changeset/base/361235 Log: MFC r361114: Move the devmatch rc.d script before netif in the boot process. Prior to this change, using lagg to aggregate wired and wireless networks was broken in the (relatively common) case where wifi drivers + firmware are loaded by devmatch, since the interface didn't exist at the time when the lagg interface was being created. PR: 246506 Changes: _U stable/12/ stable/12/libexec/rc/rc.d/devmatch
A commit references this bug: Author: bcr Date: Thu Jul 30 15:39:50 UTC 2020 New revision: 54386 URL: https://svnweb.freebsd.org/changeset/doc/54386 Log: Update the instructions for loading wifi drivers on FreeBSD versions with or without devmatch. Mention that loading of drivers in loader.conf or via rc.conf may be required for certain versions. It should be done in order to have the lagg interface properly set up at boot time. Thanks to Pau Amma for providing the patch. While here, fix some overly long lines in the note above. PR: 246506 (documentation part) Submitted by: pauamma_gundo.com Requested by: cperciva (on IRC) Reviewed by: cperciva, bcr Approved by: bcr Differential Revision: https://reviews.freebsd.org/D25881 Changes: head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml