Bug 241253 - if_rtwn_usb module leaves device loaded on system shutdown
Summary: if_rtwn_usb module leaves device loaded on system shutdown
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: 12.1-RELEASE
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-wireless (Nobody)
Depends on:
Reported: 2019-10-15 03:11 UTC by rocky
Modified: 2019-10-18 00:51 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description rocky 2019-10-15 03:11:27 UTC
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).
Comment 1 rocky 2019-10-16 04:32:45 UTC
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?
Comment 2 rocky 2019-10-16 07:21:44 UTC
(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.
Comment 3 rocky 2019-10-18 00:51:44 UTC
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