diff --git a/package/kernel/mac80211/patches/subsys/016-wifi-mac80211-fix-monitor-filter-refcount-leak.patch b/package/kernel/mac80211/patches/subsys/016-wifi-mac80211-fix-monitor-filter-refcount-leak.patch new file mode 100644 index 00000000000..c99a3d1d59e --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/016-wifi-mac80211-fix-monitor-filter-refcount-leak.patch @@ -0,0 +1,32 @@ +From feb3a036d1cd7b708969dfc58feed16c51a496dc Mon Sep 17 00:00:00 2001 +From: Devin Wittmayer +Date: Fri, 4 Sep 2026 13:28:17 -0700 +Subject: [PATCH] wifi: mac80211: fix monitor filter refcount leak + +When bringing a monitor interface up and down again, the +refcount is leaked for active monitor interfaces, so the +hardware filter is never reset. + +Move the decrement out so it mirrors the increment. + +Signed-off-by: Devin Wittmayer +Link: https://patch.msgid.link/20260904202817.12564-1-lucid_duck@justthetip.ca +[rewrite commit message better] +Signed-off-by: Johannes Berg +--- + net/mac80211/iface.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -630,8 +630,9 @@ static void ieee80211_do_stop(struct iee + hw_reconf_flags |= IEEE80211_CONF_CHANGE_MONITOR; + } + +- ieee80211_adjust_monitor_flags(sdata, -1); + } ++ ++ ieee80211_adjust_monitor_flags(sdata, -1); + break; + case NL80211_IFTYPE_NAN: + /* Check if any open NAN_DATA interfaces */ diff --git a/package/kernel/mac80211/patches/subsys/393-wifi-mac80211-reset-the-LED-state-when-ifup-fails.patch b/package/kernel/mac80211/patches/subsys/393-wifi-mac80211-reset-the-LED-state-when-ifup-fails.patch index d6a9fad4224..fbe1cf9fa89 100644 --- a/package/kernel/mac80211/patches/subsys/393-wifi-mac80211-reset-the-LED-state-when-ifup-fails.patch +++ b/package/kernel/mac80211/patches/subsys/393-wifi-mac80211-reset-the-LED-state-when-ifup-fails.patch @@ -29,7 +29,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -1610,8 +1610,12 @@ int ieee80211_do_open(struct wireless_de +@@ -1611,8 +1611,12 @@ int ieee80211_do_open(struct wireless_de err_del_interface: drv_remove_interface(local, sdata); err_stop: diff --git a/package/kernel/mac80211/patches/subsys/399-wifi-mac80211-look-up-the-AP-station-by-the-AP-MLD-add.patch b/package/kernel/mac80211/patches/subsys/399-wifi-mac80211-look-up-the-AP-station-by-the-AP-MLD-add.patch index a77d033dd0d..3c3a2d0cb54 100644 --- a/package/kernel/mac80211/patches/subsys/399-wifi-mac80211-look-up-the-AP-station-by-the-AP-MLD-add.patch +++ b/package/kernel/mac80211/patches/subsys/399-wifi-mac80211-look-up-the-AP-station-by-the-AP-MLD-add.patch @@ -53,7 +53,7 @@ Signed-off-by: Felix Fietkau goto do_survey; --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -1035,7 +1035,7 @@ static int ieee80211_netdev_fill_forward +@@ -1036,7 +1036,7 @@ static int ieee80211_netdev_fill_forward } } diff --git a/package/kernel/mac80211/patches/subsys/412-wifi-mac80211-stop-only-the-MBSSID-set-of-the-stopped-AP-link.patch b/package/kernel/mac80211/patches/subsys/412-wifi-mac80211-stop-only-the-MBSSID-set-of-the-stopped-AP-link.patch index 18eb9806b65..cb5843b293d 100644 --- a/package/kernel/mac80211/patches/subsys/412-wifi-mac80211-stop-only-the-MBSSID-set-of-the-stopped-AP-link.patch +++ b/package/kernel/mac80211/patches/subsys/412-wifi-mac80211-stop-only-the-MBSSID-set-of-the-stopped-AP-link.patch @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau ieee80211_uhr_cap_ie_to_sta_uhr_cap(struct ieee80211_sub_if_data *sdata, --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -786,60 +786,68 @@ static void ieee80211_do_stop(struct iee +@@ -787,60 +787,68 @@ static void ieee80211_do_stop(struct iee ieee80211_add_virtual_monitor(local, NULL); } diff --git a/package/kernel/mac80211/patches/subsys/441-wifi-mac80211-learn-MSCS-flows-on-receive.patch b/package/kernel/mac80211/patches/subsys/441-wifi-mac80211-learn-MSCS-flows-on-receive.patch index 8bab6ba2bb4..e3bc7c1e65a 100644 --- a/package/kernel/mac80211/patches/subsys/441-wifi-mac80211-learn-MSCS-flows-on-receive.patch +++ b/package/kernel/mac80211/patches/subsys/441-wifi-mac80211-learn-MSCS-flows-on-receive.patch @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau local->fif_pspoll--; local->fif_probe_req--; } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { -@@ -1422,6 +1424,10 @@ int ieee80211_do_open(struct wireless_de +@@ -1423,6 +1425,10 @@ int ieee80211_do_open(struct wireless_de break; } case NL80211_IFTYPE_AP: @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau case NL80211_IFTYPE_MESH_POINT: case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_MONITOR: -@@ -1456,7 +1462,7 @@ int ieee80211_do_open(struct wireless_de +@@ -1457,7 +1463,7 @@ int ieee80211_do_open(struct wireless_de * no need to worry about AP_VLAN/NAN_DATA cleanup since * in that case we can't have open_count == 0 */ @@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau } ieee80211_led_radio(local, true); ieee80211_mod_tpt_led_trig(local, -@@ -1632,6 +1638,9 @@ int ieee80211_do_open(struct wireless_de +@@ -1633,6 +1639,9 @@ int ieee80211_do_open(struct wireless_de list_del(&sdata->u.vlan.list); /* Might not be initialized yet, but it is harmless */ sdata->bss = NULL; diff --git a/package/kernel/mac80211/patches/subsys/454-wifi-mac80211-remove-AP-VLAN-frames-from-station-TXQ.patch b/package/kernel/mac80211/patches/subsys/454-wifi-mac80211-remove-AP-VLAN-frames-from-station-TXQ.patch index a729ae85457..76b9810a373 100644 --- a/package/kernel/mac80211/patches/subsys/454-wifi-mac80211-remove-AP-VLAN-frames-from-station-TXQ.patch +++ b/package/kernel/mac80211/patches/subsys/454-wifi-mac80211-remove-AP-VLAN-frames-from-station-TXQ.patch @@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -712,8 +712,15 @@ static void ieee80211_do_stop(struct iee +@@ -713,8 +713,15 @@ static void ieee80211_do_stop(struct iee ieee80211_free_txskb(&local->hw, skb); } diff --git a/package/kernel/mac80211/patches/subsys/456-wifi-mac80211-let-a-driver-report-the-expiry-of-an-A.patch b/package/kernel/mac80211/patches/subsys/456-wifi-mac80211-let-a-driver-report-the-expiry-of-an-A.patch index 04a89a0f933..a2d260b8409 100644 --- a/package/kernel/mac80211/patches/subsys/456-wifi-mac80211-let-a-driver-report-the-expiry-of-an-A.patch +++ b/package/kernel/mac80211/patches/subsys/456-wifi-mac80211-let-a-driver-report-the-expiry-of-an-A.patch @@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau #ifdef CPTCFG_MAC80211_DEBUGFS --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -877,6 +877,8 @@ static int ieee80211_stop(struct net_dev +@@ -878,6 +878,8 @@ static int ieee80211_stop(struct net_dev guard(wiphy)(sdata->local->hw.wiphy); wiphy_work_cancel(sdata->local->hw.wiphy, &sdata->activate_links_work); @@ -63,7 +63,7 @@ Signed-off-by: Felix Fietkau /* Close the dependent MBSSID interfaces with wiphy lock as we may be * terminating its partner links too in case of MLD. -@@ -921,6 +923,9 @@ static void ieee80211_teardown_sdata(str +@@ -922,6 +924,9 @@ static void ieee80211_teardown_sdata(str if (WARN_ON(!list_empty(&sdata->work.entry))) wiphy_work_cancel(sdata->local->hw.wiphy, &sdata->work); @@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau /* free extra data */ ieee80211_free_keys(sdata, false); -@@ -1909,6 +1914,35 @@ static void ieee80211_activate_links_wor +@@ -1910,6 +1915,35 @@ static void ieee80211_activate_links_wor sdata->desired_active_links = 0; } @@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau /* * Helper function to initialise an interface to a specific type. */ -@@ -1947,6 +1981,9 @@ static void ieee80211_setup_sdata(struct +@@ -1948,6 +1982,9 @@ static void ieee80211_setup_sdata(struct wiphy_work_init(&sdata->work, ieee80211_iface_work); wiphy_work_init(&sdata->activate_links_work, ieee80211_activate_links_work);