TP Link wn823n usb wifi adaptor will only work on removal/reinsertion of adaptor. Testing shows that on reboot the adaptor is left in an undesirable state and once system is initialised no longer works.
Cold boot the device will still work.
The only way to keep the device operational across reboot (warm boot) is to stop devd/devfs and kldunload the module (currently using /etc/rc.shutdown.local).
Further investigation shows the device also has difficulties with flag setting under hostapd.
Starting hostapd shows the application requiring a few hours before achieving S+ state, appearing to hang at an uninterruptable D+ state requiring a reboot to break. Once running, ifconfig still shows a status of No Carrier, even though enabling hostap wlanmode via ifconfig showed a status of Running. (TP Link 725n has no problem).
Could it be that the device is unable to change flag settings in time for reboot?
Firmware incompatibility issue?
(In reply to rocky from comment #1)
Correction - not just a reboot: a complete cold boot (shutdown -p) is required, harking back to the difficulties first reported of the device being in an undesirable state once system has shutdown. This even with the workaround (stop devd, unload kernel module) suggested being applied.
The 725n model that also uses the rtl8188eu chipset (1T1R v 2T2R) also has an error on reboot (hostap mode):
rtwn0: rtwn_tx_beacon_check: cannot push beacon into chip, error 60!
rtwn0: unable to push beacon into the chip, error 60
rtwn0: rtwn_newstate: could not move to RUN state