I made this small script to try to get the 5ghz wifi back into sense whenever it goes down
Save as /root/wlan_watchdog, chmod +x /root/wlan_watchdog and put "/root/wlan_watchdog &" into /etc/rc.local . Unfortunately the problem with this is that it takes out other wifi as well and in my testing it still typically takes 10-30 minutes of network restarts until things start working again. Single reboot of the router would probably work but is very risky to even try because if the script malfunctions it can lead to a reboot loop. I do not if this calls mt76x2_reset_wlan(and I doubt it will work) but I'll email Felix Fietkau and John Crispin perhaps they can propose stronger measures to reset the wifi without rebooting.
WIFI="wlan1"
LOG=/tmp/wlan_watchdog
fail_count=0
echo "wlan watchdog started " > $LOG
date >> $LOG
while true; do
quality=`iwinfo $WIFI info | grep "Quality" | awk '{print $6}' | sed -e "s/\/.*//g"`
# echo "$quality"
if [ $quality == "unknown" ]; then
fail_count=$(( fail_count + 1 ))
fi
# echo "fail count $fail_count" >> $LOG
if [ $fail_count -ge 20 ]; then
date >> $LOG
echo "commencing network restart" >> $LOG
/etc/init.d/network restart
fail_count=0
fi
sleep 5s
done