linux-next: manual merge of the wireless-next tree with the wireless tree
From: Mark Brown
Date: Tue Sep 15 2026 - 10:47:45 EST
Hi all,
Today's linux-next merge of the wireless-next tree got a conflict in:
drivers/net/wireless/virtual/mac80211_hwsim_main.c
between commit:
87840d4a3a21b ("wifi: mac80211_hwsim: don't hand frames to mac80211 while stopping")
from the wireless tree and commit:
41416127e37e4 ("wifi: mac80211_hwsim: overwrite report SKB")
from the wireless-next tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc drivers/net/wireless/virtual/mac80211_hwsim_main.c
index b9446577ff499,9f895ad718e9b..0000000000000
--- a/drivers/net/wireless/virtual/mac80211_hwsim_main.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim_main.c
@@@ -6540,13 -6543,51 +6548,58 @@@ static int hwsim_cloned_frame_received_
goto out;
}
+ /*
+ * Serialise against mac80211_hwsim_stop() - mac80211 doesn't allow
+ * frames reported while the HW is down, hence the ->started check
+ * must be under mutex.
+ */
+ mutex_lock(&data2->mutex);
+
+ /* look for the skb matching the cookie passed back from user */
+ if (info->attrs[HWSIM_ATTR_COOKIE] &&
+ info->attrs[HWSIM_ATTR_ADDR_TRANSMITTER]) {
+ u64 cookie = nla_get_u64(info->attrs[HWSIM_ATTR_COOKIE]);
+ struct sk_buff *orig_skb, *found = NULL;
+ struct mac80211_hwsim_data *txdata;
+ struct ieee80211_tx_info *txi;
+ const u8 *transmitter;
+ unsigned long flags;
+
+ transmitter = nla_data(info->attrs[HWSIM_ATTR_ADDR_TRANSMITTER]);
+ txdata = get_hwsim_data_ref_from_addr(transmitter);
+ if (!txdata || txdata->netgroup != data2->netgroup)
- goto out;
++ goto out_unlock;
+
+ spin_lock_irqsave(&txdata->pending.lock, flags);
+ skb_queue_walk(&txdata->pending, orig_skb) {
+ uintptr_t skb_cookie;
+
+ txi = IEEE80211_SKB_CB(orig_skb);
+ skb_cookie = (uintptr_t)txi->rate_driver_data[0];
+
+ if (skb_cookie == cookie) {
+ found = orig_skb;
+ break;
+ }
+ }
+
+ /* that's weird */
+ if (!found) {
+ spin_unlock_irqrestore(&txdata->pending.lock, flags);
- goto out;
++ goto out_unlock;
+ }
+
+ if (frame_data_len > found->len &&
+ pskb_expand_head(found, 0, frame_data_len - found->len,
+ GFP_ATOMIC)) {
+ spin_unlock_irqrestore(&txdata->pending.lock, flags);
- goto out;
++ goto out_unlock;
+ }
+ skb_trim(found, 0);
+ skb_put_data(found, frame_data, frame_data_len);
+ spin_unlock_irqrestore(&txdata->pending.lock, flags);
+ }
+
/* check if radio is configured properly */
if ((data2->idle && !data2->tmp_chan) || !data2->started)
Attachment:
signature.asc
Description: PGP signature