Commit 1b4531f
committed
wifi: mt76: mt7925: re-arm monitor sniffer on chip_reset recovery
mt7925_mac_reset_work()'s recovery path reconnects STATION and AP
vifs via mt7925_vif_connect_iter(), but that function has no handling
at all for NL80211_IFTYPE_MONITOR: it never calls
mt7925_mcu_set_sniffer()/mt7925_mcu_config_sniffer() for a monitor
vif. mac80211's own logical state (interface up, channel) survives
the reset, but the firmware's sniffer state does not, and nothing in
this recovery path puts it back -- a monitor vif goes silently deaf
after a chip reset regardless of which band it was on.
This is a distinct bug from the one PR #66 fixes: mac80211's
ieee80211_reconfig() is not involved here at all.
mt7925_mac_reset_work() never calls ieee80211_restart_hw(), so
reconfig() is never reached; this is the driver's own
firmware-recovery path silently dropping monitor state on its way
back up, independent of anything mac80211 does.
The first version of this patch reused mt7925_sniffer_interface_iter()
directly, applying it to every active interface via a hw-level
monitor flag rather than per-vif type. That is the same pattern
mt7925_config()/mt7925_configure_filter() already use, but reusing it
unscoped in the reset-recovery path means it would call
mt7925_mcu_set_sniffer(dev, vif, true) against STATION/AP vifs too
whenever a monitor vif happens to coexist, and none of the underlying
MCU calls had their return values checked.
Fixed properly instead: add a struct mt7925_sniffer_iter_data (dev,
error, monitor_only) so the iterator can restrict itself to actual
monitor vifs, check and propagate every MCU call's return value, and
expose a dedicated mt7925_sniffer_rearm() entry point (monitor_only
set) for the reset path to call under dev->mt76.mutex, with the
failure logged and queues woken only after the re-arm attempt
completes. mt7925_config()/mt7925_configure_filter() now use the same
struct (monitor_only left unset, preserving their existing behavior)
and also check/log the iterator's error instead of ignoring it.
Signed-off-by: Ashcal9669 <ashcalili@gmail.com>1 parent e071d81 commit 1b4531f
3 files changed
Lines changed: 81 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1568 | 1568 | | |
1569 | 1569 | | |
1570 | 1570 | | |
1571 | | - | |
1572 | 1571 | | |
1573 | 1572 | | |
1574 | 1573 | | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
1575 | 1589 | | |
1576 | 1590 | | |
1577 | 1591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
796 | 802 | | |
797 | 803 | | |
798 | 804 | | |
799 | | - | |
| 805 | + | |
| 806 | + | |
800 | 807 | | |
801 | 808 | | |
802 | 809 | | |
803 | 810 | | |
804 | 811 | | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
805 | 820 | | |
806 | 821 | | |
807 | 822 | | |
808 | 823 | | |
809 | 824 | | |
810 | 825 | | |
811 | 826 | | |
812 | | - | |
813 | | - | |
814 | | - | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
815 | 837 | | |
816 | 838 | | |
817 | 839 | | |
818 | | - | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
819 | 843 | | |
820 | | - | |
821 | | - | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
822 | 868 | | |
823 | 869 | | |
824 | 870 | | |
| |||
843 | 889 | | |
844 | 890 | | |
845 | 891 | | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
846 | 895 | | |
847 | 896 | | |
848 | 897 | | |
| |||
856 | 905 | | |
857 | 906 | | |
858 | 907 | | |
859 | | - | |
| 908 | + | |
| 909 | + | |
860 | 910 | | |
861 | 911 | | |
862 | 912 | | |
| |||
875 | 925 | | |
876 | 926 | | |
877 | 927 | | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
878 | 931 | | |
879 | 932 | | |
880 | 933 | | |
| |||
892 | 945 | | |
893 | 946 | | |
894 | 947 | | |
895 | | - | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
896 | 952 | | |
897 | 953 | | |
898 | 954 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
| |||
0 commit comments