linux-next: manual merge of the wireless-next tree with the wireless tree

From: Mark Brown

Date: Wed Sep 09 2026 - 08:20:17 EST


Hi all,

Today's linux-next merge of the wireless-next tree got conflicts in:

include/net/mac80211.h
net/mac80211/iface.c
net/mac80211/tx.c

between commit:

d4b31f7757d81 ("wifi: mac80211: don't allow injecting frames wider than the chanctx")

from the wireless tree and commits:

9d1365e96a920 ("wifi: mac80211: avoid trimming injected FCS twice")
a64a20fb270f2 ("wifi: mac80211: store the ack skb before building the header")

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 include/net/mac80211.h
index ed6a5874ff965,7bb4618065b67..0000000000000
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@@ -7638,14 -7630,12 +7630,16 @@@ bool ieee80211_tx_prepare_skb(struct ie
*
* @skb: packet injected by userspace
* @dev: the &struct device of this 802.11 device
+ * @chandef: the channel definition the frame will be transmitted on, or
+ * %NULL to skip the bandwidth checks
+ * @trim_fcs: trim the FCS trailer when present; validate it otherwise
*
* Return: %true if the radiotap header was parsed, %false otherwise
*/
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb,
- struct net_device *dev, bool trim_fcs);
+ struct net_device *dev,
- const struct cfg80211_chan_def *chandef);
++ const struct cfg80211_chan_def *chandef,
++ bool trim_fcs);

/**
* struct ieee80211_noa_data - holds temporary data for tracking P2P NoA state
diff --cc net/mac80211/iface.c
index 889c32fd8de19,fdac729ca580d..0000000000000
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@@ -993,7 -964,7 +993,7 @@@ static u16 ieee80211_monitor_select_que
/* reset flags and info before parsing radiotap header */
memset(info, 0, sizeof(*info));

- if (!ieee80211_parse_tx_radiotap(skb, dev, NULL))
- if (!ieee80211_parse_tx_radiotap(skb, dev, false))
++ if (!ieee80211_parse_tx_radiotap(skb, dev, NULL, false))
return 0; /* doesn't matter, frame will be dropped */

len_rthdr = ieee80211_get_radiotap_len(skb->data);
diff --cc net/mac80211/tx.c
index 814399989b5e4,d85c84a738f79..0000000000000
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@@ -2105,29 -2150,8 +2152,30 @@@ static bool ieee80211_validate_radiotap
return true;
}

+static bool ieee80211_rate_bw_usable(u16 rate_flags,
+ const struct cfg80211_chan_def *chandef)
+{
+ int width;
+
+ if (!chandef)
+ return true;
+
+ if (rate_flags & IEEE80211_TX_RC_160_MHZ_WIDTH)
+ width = 160;
+ else if (rate_flags & IEEE80211_TX_RC_80_MHZ_WIDTH)
+ width = 80;
+ else if (rate_flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
+ width = 40;
+ else
+ return true;
+
+ return width <= cfg80211_chandef_get_width(chandef);
+}
+
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb,
- struct net_device *dev, bool trim_fcs)
+ struct net_device *dev,
- const struct cfg80211_chan_def *chandef)
++ const struct cfg80211_chan_def *chandef,
++ bool trim_fcs)
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_radiotap_iterator iterator;
@@@ -2503,7 -2525,7 +2552,7 @@@ netdev_tx_t ieee80211_monitor_start_xmi
* selected chandef above to accurately set injection rates and
* retransmissions.
*/
- if (!ieee80211_parse_tx_radiotap(skb, dev, chandef))
- if (!ieee80211_parse_tx_radiotap(skb, dev, true))
++ if (!ieee80211_parse_tx_radiotap(skb, dev, chandef, true))
goto fail_rcu;

/* remove the injection radiotap header */
@@@ -3064,41 -3050,14 +3077,17 @@@ static struct sk_buff *ieee80211_build_

skb_reset_mac_header(skb);

- if (likely(!cookie)) {
- ctrl_flags |= u32_encode_bits(link_id,
- IEEE80211_TX_CTRL_MLO_LINK);
- } else {
- unsigned int pre_conf_link_id;
-
- /*
- * ctrl_flags already have been set by
- * ieee80211_tx_control_port(), here
- * we just sanity check that
- */
-
- pre_conf_link_id = u32_get_bits(ctrl_flags,
- IEEE80211_TX_CTRL_MLO_LINK);
-
- if (pre_conf_link_id != link_id &&
- link_id != IEEE80211_LINK_UNSPECIFIED) {
- #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
- net_info_ratelimited("%s: dropped frame to %pM with bad link ID request (%d vs. %d)\n",
- sdata->name, hdr.addr1,
- pre_conf_link_id, link_id);
- #endif
- ret = -EINVAL;
- goto free_txskb;
- }
- }
-
- info->control.flags = ctrl_flags;
+ info->band = band;

+ info->control.flags =
+ u32_replace_bits(info->control.flags, link_id,
+ IEEE80211_TX_CTRL_MLO_LINK);
return skb;
+ free_txskb:
+ ieee80211_free_txskb(&local->hw, skb);
+ return ERR_PTR(ret);
free:
- kfree_skb(skb);
+ ieee80211_free_txskb(&local->hw, skb);
return ERR_PTR(ret);
}

Attachment: signature.asc
Description: PGP signature