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
A commit references this bug:
Date: Tue May 19 01:40:46 UTC 2020
New revision: 361235
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.