Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mac80211: restore monitor for outgoing frames

This code was accidentally dropped during the cooked
monitor removal, but really should've been simplified
instead. Add the simple version back.

Fixes: 286e69677065 ("wifi: mac80211: Drop cooked monitor support")
Link: https://patch.msgid.link/20250422213251.b3d65fd0f323.Id2a6901583f7af86bbe94deb355968b238f350c6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+7 -1
+7 -1
net/mac80211/status.c
··· 1085 1085 1086 1086 ieee80211_report_used_skb(local, skb, false, status->ack_hwtstamp); 1087 1087 1088 - if (status->free_list) 1088 + /* 1089 + * This is a bit racy but we can avoid a lot of work 1090 + * with this test... 1091 + */ 1092 + if (local->tx_mntrs) 1093 + ieee80211_tx_monitor(local, skb, retry_count, status); 1094 + else if (status->free_list) 1089 1095 list_add_tail(&skb->list, status->free_list); 1090 1096 else 1091 1097 dev_kfree_skb(skb);