mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2026-11-10 19:34 Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2026-11-10 19:34 UTC (permalink / raw)
  To: Johannes Berg, Wireless
  Cc: Johannes Berg, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 25837 bytes --]

Hi all,

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

  net/wireless/nl80211.c

between commit:

  5e25f6b1b18d5 ("wifi: nl80211: fix ERR_PTR use on wdev disappearance")

from the wireless tree and commit:

  a357675fd7406 ("wifi: cfg80211: enable context analysis")

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 --combined net/wireless/nl80211.c
index e7dd32880598f,d28eb9baa1b32..0000000000000
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@@ -230,11 -230,12 +230,12 @@@ cfg80211_get_dev_from_info(struct net *
   *
   * Returns with wiphy mutex held unless there was an error.
   */
- static struct wireless_dev *
- nl80211_lock_and_recheck(struct cfg80211_registered_device *rdev,
- 			 struct net *netns, u32 wdev_id)
+ static int nl80211_lock_and_recheck(struct cfg80211_registered_device *rdev,
+ 				    struct net *netns, u32 wdev_id,
+ 				    struct wireless_dev **wdev)
+ 	__cond_acquires(0, &rdev->wiphy.mtx)
  {
- 	struct wireless_dev *wdev;
+ 	struct wireless_dev *tmp;
  
  	wiphy_lock(&rdev->wiphy);
  
@@@ -242,7 -243,7 +243,7 @@@
  	    !net_eq(wiphy_net(&rdev->wiphy), netns)) {
  		wiphy_unlock(&rdev->wiphy);
  		put_device(&rdev->wiphy.dev);
- 		return ERR_PTR(-ENODEV);
+ 		return -ENODEV;
  	}
  
  	/*
@@@ -251,19 -252,22 +252,22 @@@
  	 */
  	put_device(&rdev->wiphy.dev);
  
- 	if (!wdev_id)
- 		return NULL;
+ 	if (!wdev_id) {
+ 		*wdev = NULL;
+ 		return 0;
+ 	}
  
- 	list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
- 		if (wdev->identifier != wdev_id)
+ 	list_for_each_entry(tmp, &rdev->wiphy.wdev_list, list) {
+ 		if (tmp->identifier != wdev_id)
  			continue;
- 		if (wdev->netdev && !net_eq(dev_net(wdev->netdev), netns))
+ 		if (tmp->netdev && !net_eq(dev_net(tmp->netdev), netns))
  			break;
- 		return wdev;
+ 		*wdev = tmp;
+ 		return 0;
  	}
  	wiphy_unlock(&rdev->wiphy);
  
- 	return ERR_PTR(-ENODEV);
+ 	return -ENODEV;
  }
  
  /* like nl80211_lock_and_recheck() but under RCU, for wdev_hold() */
@@@ -290,36 -294,51 +294,51 @@@ nl80211_wdev_by_id_rcu(struct cfg80211_
  /*
   * Must have wdev_hold(), acquire the wiphy mutex. This has to
   * look up the wdev again (otherwise it could deadlock against
-  * wdev removal), so it can return an error pointer.
+  * wdev removal), so it can return NULL.
   */
- static struct wireless_dev *
- __nl80211_lock_held_wdev(struct cfg80211_registered_device *rdev,
- 			 struct net *netns, struct wireless_dev *wdev)
+ static int __nl80211_lock_held_wdev(struct cfg80211_registered_device *rdev,
+ 				    struct net *netns,
+ 				    struct wireless_dev *wdev)
+ 	__cond_acquires(0, &rdev->wiphy.mtx)
  {
  	u32 wdev_id = wdev->identifier;
+ 	struct wireless_dev *tmp;
+ 	int err;
  
  	/* the wdev reference was keeping the wiphy alive */
  	get_device(&rdev->wiphy.dev);
  	wdev_put(wdev);
  
- 	return nl80211_lock_and_recheck(rdev, netns, wdev_id);
+ 	err = nl80211_lock_and_recheck(rdev, netns, wdev_id, &tmp);
+ 	if (err)
+ 		return err;
+ 
+ 	if (WARN_ON(!tmp || tmp != wdev)) {
+ 		wiphy_unlock(&rdev->wiphy);
+ 		return -EINVAL;
+ 	}
+ 
+ 	return 0;
  }
  
- static struct wireless_dev *
- nl80211_lock_held_wdev(struct cfg80211_registered_device *rdev,
- 		       struct genl_info *info, struct wireless_dev *wdev)
+ static int nl80211_lock_held_wdev(struct cfg80211_registered_device *rdev,
+ 				  struct genl_info *info,
+ 				  struct wireless_dev *wdev)
+ 	__cond_acquires(0, &rdev->wiphy.mtx)
  {
+ 	int err;
+ 
  	info->user_ptr[1] = NULL;
- 	wdev = __nl80211_lock_held_wdev(rdev, genl_info_net(info), wdev);
- 	if (IS_ERR(wdev))
- 		return wdev;
+ 	err = __nl80211_lock_held_wdev(rdev, genl_info_net(info), wdev);
+ 	if (err)
+ 		return err;
  
  	if (!wdev_running(wdev)) {
  		wiphy_unlock(&rdev->wiphy);
- 		return ERR_PTR(-ENETDOWN);
+ 		return -ENETDOWN;
  	}
  
- 	return wdev;
+ 	return 0;
  }
  
  static int validate_beacon_head(const struct nlattr *attr,
@@@ -1358,6 -1377,7 +1377,7 @@@ static int __nl80211_prepare_wdev_dump(
  				       struct cfg80211_registered_device **rdev,
  				       struct wireless_dev **wdev,
  				       struct nlattr **attrbuf, bool lock)
+ 	__cond_acquires(0, &(*rdev)->wiphy.mtx)
  {
  	struct net *netns = sock_net(cb->skb->sk);
  	u32 wdev_id;
@@@ -1410,13 -1430,15 +1430,15 @@@
  		if (!*wdev)
  			return -ENODEV;
  	} else {
+ 		int ret;
+ 
  		get_device(&(*rdev)->wiphy.dev);
  		rcu_read_unlock();
  
  		/* things may have changed since the lookup or last dumpit */
- 		*wdev = nl80211_lock_and_recheck(*rdev, netns, wdev_id);
- 		if (IS_ERR(*wdev))
- 			return PTR_ERR(*wdev);
+ 		ret = nl80211_lock_and_recheck(*rdev, netns, wdev_id, wdev);
+ 		if (ret)
+ 			return ret;
  	}
  
  	/* 0 is the first index - add 1 to parse only once */
@@@ -1430,6 -1452,7 +1452,7 @@@ static int nl80211_prepare_wdev_dump(st
  				     struct cfg80211_registered_device **rdev,
  				     struct wireless_dev **wdev,
  				     struct nlattr **attrbuf)
+ 	__cond_acquires(0, &(*rdev)->wiphy.mtx)
  {
  	return __nl80211_prepare_wdev_dump(cb, rdev, wdev, attrbuf, true);
  }
@@@ -3415,6 -3438,9 +3438,9 @@@ static int nl80211_send_wiphy(struct cf
  			if (rdev->wiphy.sar_capa)
  				CMD(set_sar_specs, SET_SAR_SPECS);
  			CMD(assoc_ml_reconf, ASSOC_MLO_RECONF);
+ 
+ 			if (rdev->wiphy.flags & WIPHY_FLAG_SMD_TRANSITION_CLIENT)
+ 				CMD(execute_st, EXECUTE_SMD_TRANSITION);
  		}
  #undef CMD
  
@@@ -4679,8 -4705,9 +4705,8 @@@ static int nl80211_set_wiphy(struct sk_
  			return -EOPNOTSUPP;
  
  		if (rdev->wiphy.n_radio) {
 -			old_radio_rts_threshold = kcalloc(rdev->wiphy.n_radio,
 -							  sizeof(u32),
 -							  GFP_KERNEL);
 +			old_radio_rts_threshold = kzalloc_objs(u32,
 +							       rdev->wiphy.n_radio);
  			if (!old_radio_rts_threshold)
  				return -ENOMEM;
  		}
@@@ -5380,6 -5407,8 +5406,8 @@@ static int nl80211_new_interface(struc
  }
  
  static int nl80211_del_interface(struct sk_buff *skb, struct genl_info *info)
+ 	/* clang cannot see pre_doit acquiring it for us */
+ 	__must_hold(&((struct cfg80211_registered_device *)info->user_ptr[0])->wiphy.mtx)
  {
  	struct cfg80211_registered_device *rdev = info->user_ptr[0];
  	struct wireless_dev *wdev = info->user_ptr[1];
@@@ -5438,6 -5467,8 +5466,8 @@@ static int nl80211_validate_key_link_id
  					struct wireless_dev *wdev,
  					int link_id, bool pairwise)
  {
+ 	struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ 
  	if (pairwise) {
  		if (link_id != -1) {
  			GENL_SET_ERR_MSG(info,
@@@ -5454,7 -5485,9 +5484,9 @@@
  					 "link ID must be set for MLO group key");
  			return -EINVAL;
  		}
- 		if (!(wdev->valid_links & BIT(link_id))) {
+ 		/* for SMD transition support the driver must check itself */
+ 		if (!(wdev->valid_links & BIT(link_id)) &&
+ 		    !(rdev->wiphy.flags & WIPHY_FLAG_SMD_TRANSITION_CLIENT)) {
  			GENL_SET_ERR_MSG(info, "invalid link ID for MLO group key");
  			return -EINVAL;
  		}
@@@ -5564,6 -5597,8 +5596,8 @@@ static int nl80211_get_key(struct sk_bu
  	if (!rdev->ops->get_key)
  		return -EOPNOTSUPP;
  
+ 	mac_addr = cfg80211_get_key_mac_addr(wdev, 0, pairwise, mac_addr);
+ 
  	if (!cfg80211_valid_key_idx(wdev, key_idx, type, mac_addr))
  		return -ENOENT;
  
@@@ -5765,6 -5800,10 +5799,10 @@@ static int nl80211_new_key(struct sk_bu
  	if (!rdev->ops->add_key)
  		return -EOPNOTSUPP;
  
+ 	mac_addr = cfg80211_get_key_mac_addr(wdev, key.p.cipher,
+ 					     key.type == NL80211_KEYTYPE_PAIRWISE,
+ 					     mac_addr);
+ 
  	if (cfg80211_validate_key_settings(rdev, wdev, &key.p, key.idx,
  					   key.type, mac_addr)) {
  		GENL_SET_ERR_MSG(info, "key setting validation failed");
@@@ -5794,7 -5833,7 +5832,7 @@@ static int nl80211_del_key(struct sk_bu
  	struct cfg80211_registered_device *rdev = info->user_ptr[0];
  	int err;
  	struct wireless_dev *wdev = info->user_ptr[1];
- 	u8 *mac_addr = NULL;
+ 	const u8 *mac_addr = NULL;
  	struct key_parse key;
  	int link_id = nl80211_link_id_or_invalid(info->attrs);
  
@@@ -5820,6 -5859,10 +5858,10 @@@
  		return -EINVAL;
  	}
  
+ 	mac_addr = cfg80211_get_key_mac_addr(wdev, 0,
+ 					     key.type == NL80211_KEYTYPE_PAIRWISE,
+ 					     mac_addr);
+ 
  	if (!cfg80211_valid_key_idx(wdev, key.idx, key.type, mac_addr))
  		return -EINVAL;
  
@@@ -7707,6 -7750,13 +7749,13 @@@ static int nl80211_parse_ap_update(stru
  			return err;
  	}
  
+ 	attr = attrs[NL80211_ATTR_HE_OBSS_PD];
+ 	if (attr) {
+ 		err = nl80211_parse_he_obss_pd(attr, &params->he_obss_pd);
+ 		if (err)
+ 			return err;
+ 	}
+ 
  	return 0;
  }
  
@@@ -8940,6 -8990,7 +8989,7 @@@ static int nl80211_fill_station_info(st
  
  static int nl80211_dump_station(struct sk_buff *skb,
  				struct netlink_callback *cb)
+ 	__context_unsafe("can't cope with the locked variable")
  {
  	struct cfg80211_registered_device *rdev;
  	struct wireless_dev *wdev;
@@@ -9026,10 -9077,10 +9076,10 @@@
  				memset(&ctx->sinfo, 0, sizeof(ctx->sinfo));
  
  				/* this fails if the wdev is being removed */
- 				wdev = __nl80211_lock_held_wdev(rdev, netns,
- 								wdev);
- 				if (IS_ERR(wdev))
- 					return PTR_ERR(wdev);
+ 				err = __nl80211_lock_held_wdev(rdev, netns,
+ 							       wdev);
+ 				if (err)
+ 					goto out_err;
  
  				/* try again locked now */
  				locked = true;
@@@ -9148,6 -9199,7 +9198,7 @@@ static int nl80211_dump_station_done(st
  }
  
  static int nl80211_get_station(struct sk_buff *skb, struct genl_info *info)
+ 	__context_unsafe("can't cope with the locked variable")
  {
  	struct cfg80211_registered_device *rdev = info->user_ptr[0];
  	struct wireless_dev *wdev = info->user_ptr[1];
@@@ -9198,11 -9250,8 +9249,8 @@@
  		/* the wdev pointer is only valid until unlocking after this */
  		info->user_ptr[1] = NULL;
  		/* can fail if the wdev is being removed */
- 		wdev = __nl80211_lock_held_wdev(rdev, genl_info_net(info),
- 						wdev);
- 		if (IS_ERR(wdev)) {
- 			err = PTR_ERR(wdev);
- 		} else {
+ 		err = __nl80211_lock_held_wdev(rdev, genl_info_net(info), wdev);
+ 		if (!err) {
  			locked = true;
  			err = rdev_get_station(rdev, wdev, mac_addr, &sinfo);
  		}
@@@ -10320,8 -10369,6 +10368,6 @@@ static int nl80211_dump_mpath(struct sk
  	err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev, NULL);
  	if (err)
  		return err;
- 	/* nl80211_prepare_wdev_dump acquired it in the successful case */
- 	__acquire(&rdev->wiphy.mtx);
  
  	if (!rdev->ops->dump_mpath) {
  		err = -EOPNOTSUPP;
@@@ -10520,8 -10567,6 +10566,6 @@@ static int nl80211_dump_mpp(struct sk_b
  	err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev, NULL);
  	if (err)
  		return err;
- 	/* nl80211_prepare_wdev_dump acquired it in the successful case */
- 	__acquire(&rdev->wiphy.mtx);
  
  	if (!rdev->ops->dump_mpp) {
  		err = -EOPNOTSUPP;
@@@ -11993,7 -12038,7 +12037,7 @@@ static int nl80211_trigger_scan(struct 
  
   out_free:
  	rdev->scan_req = NULL;
- 	kfree(request);
+ 	kfree_rcu(request, rcu_head);
  
  	return err;
  }
@@@ -13076,8 -13121,6 +13120,6 @@@ static int nl80211_dump_scan(struct sk_
  		kfree(attrbuf);
  		return err;
  	}
- 	/* nl80211_prepare_wdev_dump acquired it in the successful case */
- 	__acquire(&rdev->wiphy.mtx);
  
  	dump_include_use_data =
  		attrbuf[NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA];
@@@ -13216,8 -13259,6 +13258,6 @@@ static int nl80211_dump_survey(struct s
  		kfree(attrbuf);
  		return res;
  	}
- 	/* nl80211_prepare_wdev_dump acquired it in the successful case */
- 	__acquire(&rdev->wiphy.mtx);
  
  	/* prepare_wdev_dump parsed the attributes */
  	radio_stats = attrbuf[NL80211_ATTR_SURVEY_RADIO_STATS];
@@@ -15420,10 -15461,8 +15460,8 @@@ static int nl80211_tx_mgmt(struct sk_bu
  	/* pre_doit didn't lock the wiphy mutex, try without */
  	err = cfg80211_mlme_mgmt_tx_unlocked(rdev, wdev, &params, cookie);
  	if (err == -EAGAIN) {
- 		wdev = nl80211_lock_held_wdev(rdev, info, wdev);
- 		if (IS_ERR(wdev)) {
- 			err = PTR_ERR(wdev);
- 		} else {
+ 		err = nl80211_lock_held_wdev(rdev, info, wdev);
+ 		if (!err) {
  			err = nl80211_tx_mgmt_locked(rdev, wdev, &params,
  						     cookie);
  			wiphy_unlock(&rdev->wiphy);
@@@ -18294,7 -18333,8 +18332,7 @@@ nl80211_parse_non_evac_channel(struct c
  			       struct cfg80211_chan_def *chandef)
  {
  	struct nlattr **channel_parsed __free(kfree) =
 -		kcalloc(NL80211_ATTR_MAX + 1, sizeof(*channel_parsed),
 -			GFP_KERNEL);
 +		kzalloc_objs(*channel_parsed, NL80211_ATTR_MAX + 1);
  	int ret;
  
  	if (!channel_parsed)
@@@ -18329,7 -18369,8 +18367,7 @@@ static int nl80211_nan_set_non_evac_cha
  		n_channels++;
  
  	struct cfg80211_nan_non_evac_channels *channels __free(kfree) =
 -		kzalloc(struct_size(channels, chandefs, n_channels),
 -			GFP_KERNEL);
 +		kzalloc_flex(*channels, chandefs, n_channels);
  	if (!channels)
  		return -ENOMEM;
  
@@@ -19996,6 -20037,148 +20034,148 @@@ nl80211_epcs_cfg(struct sk_buff *skb, s
  	return rdev_set_epcs(rdev, dev, val);
  }
  
+ static int nl80211_prepare_st(struct sk_buff *skb, struct genl_info *info)
+ {
+ 	struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ 	struct net_device *dev = info->user_ptr[1];
+ 	struct wireless_dev *wdev = dev->ieee80211_ptr;
+ 	struct cfg80211_st_prep_request req = {};
+ 	bool have_link = false;
+ 	int err;
+ 
+ 	if (!wdev->valid_links)
+ 		return -EINVAL;
+ 
+ 	if (!(rdev->wiphy.flags & WIPHY_FLAG_SMD_TRANSITION_CLIENT))
+ 		return -EOPNOTSUPP;
+ 
+ 	if (dev->ieee80211_ptr->conn_owner_nlportid &&
+ 	    dev->ieee80211_ptr->conn_owner_nlportid != info->snd_portid)
+ 		return -EPERM;
+ 
+ 	if (wdev->iftype != NL80211_IFTYPE_STATION &&
+ 	    wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
+ 		return -EOPNOTSUPP;
+ 
+ 	if (!info->attrs[NL80211_ATTR_MLD_ADDR] ||
+ 	    !info->attrs[NL80211_ATTR_MLO_LINKS])
+ 		return -EINVAL;
+ 
+ 	req.ap_mld_addr = nla_data(info->attrs[NL80211_ATTR_MLD_ADDR]);
+ 
+ 	if (ether_addr_equal(req.ap_mld_addr, wdev->u.client.connected_addr))
+ 		return -EINVAL;
+ 
+ 	if (info->attrs[NL80211_ATTR_IE]) {
+ 		req.elems = nla_data(info->attrs[NL80211_ATTR_IE]);
+ 		req.elems_len = nla_len(info->attrs[NL80211_ATTR_IE]);
+ 	}
+ 
+ 	if (info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS])
+ 		req.ext_mld_capa_ops =
+ 			nla_get_u16(info->attrs[NL80211_ATTR_EXT_MLD_CAPA_AND_OPS]);
+ 
+ 	err = nl80211_process_links(rdev, req.links,
+ 				    IEEE80211_MLD_MAX_NUM_LINKS,
+ 				    NULL, 0, info);
+ 	if (err)
+ 		goto free;
+ 
+ 	for (int link_id = 0; link_id < ARRAY_SIZE(req.links); link_id++) {
+ 		if (req.links[link_id].bss) {
+ 			have_link = true;
+ 			break;
+ 		}
+ 	}
+ 
+ 	if (!have_link) {
+ 		err = -EINVAL;
+ 		goto free;
+ 	}
+ 
+ 	return cfg80211_prepare_st(rdev, dev, &req);
+ free:
+ 	for (int link_id = 0; link_id < ARRAY_SIZE(req.links); link_id++)
+ 		cfg80211_put_bss(&rdev->wiphy, req.links[link_id].bss);
+ 	return err;
+ }
+ 
+ static int nl80211_execute_st(struct sk_buff *skb, struct genl_info *info)
+ {
+ 	struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ 	struct net_device *dev = info->user_ptr[1];
+ 	struct wireless_dev *wdev = dev->ieee80211_ptr;
+ 	struct cfg80211_st_exec_request req = {
+ 		.drain_tids = 0xFF, /* only 8 TIDs in ST preparation */
+ 	};
+ 
+ 	if (!wdev->valid_links)
+ 		return -EINVAL;
+ 
+ 	if (!(rdev->wiphy.flags & WIPHY_FLAG_SMD_TRANSITION_CLIENT))
+ 		return -EOPNOTSUPP;
+ 
+ 	if (dev->ieee80211_ptr->conn_owner_nlportid &&
+ 	    dev->ieee80211_ptr->conn_owner_nlportid != info->snd_portid)
+ 		return -EPERM;
+ 
+ 	if (wdev->iftype != NL80211_IFTYPE_STATION &&
+ 	    wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
+ 		return -EOPNOTSUPP;
+ 
+ 	if (!info->attrs[NL80211_ATTR_MLD_ADDR])
+ 		return -EINVAL;
+ 
+ 	req.ap_mld_addr = nla_data(info->attrs[NL80211_ATTR_MLD_ADDR]);
+ 
+ 	if (info->attrs[NL80211_ATTR_TID_BITMAP]) {
+ 		u16 drain_tids =
+ 			nla_get_u16(info->attrs[NL80211_ATTR_TID_BITMAP]);
+ 
+ 		if (drain_tids > 0xFF)
+ 			return -EINVAL;
+ 
+ 		req.drain_tids = drain_tids;
+ 	}
+ 
+ 	if (info->attrs[NL80211_ATTR_IE]) {
+ 		req.elems = nla_data(info->attrs[NL80211_ATTR_IE]);
+ 		req.elems_len = nla_len(info->attrs[NL80211_ATTR_IE]);
+ 	}
+ 
+ 	return rdev_execute_st(rdev, dev, &req);
+ }
+ 
+ static int nl80211_abandon_st(struct sk_buff *skb, struct genl_info *info)
+ {
+ 	struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ 	struct net_device *dev = info->user_ptr[1];
+ 	struct wireless_dev *wdev = dev->ieee80211_ptr;
+ 	const u8 *ap_mld_addr;
+ 
+ 	if (!wdev->valid_links)
+ 		return -EINVAL;
+ 
+ 	if (dev->ieee80211_ptr->conn_owner_nlportid &&
+ 	    dev->ieee80211_ptr->conn_owner_nlportid != info->snd_portid)
+ 		return -EPERM;
+ 
+ 	if (!(rdev->wiphy.flags & WIPHY_FLAG_SMD_TRANSITION_CLIENT))
+ 		return -EOPNOTSUPP;
+ 
+ 	if (wdev->iftype != NL80211_IFTYPE_STATION &&
+ 	    wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
+ 		return -EOPNOTSUPP;
+ 
+ 	if (!info->attrs[NL80211_ATTR_MLD_ADDR])
+ 		return -EINVAL;
+ 
+ 	ap_mld_addr = nla_data(info->attrs[NL80211_ATTR_MLD_ADDR]);
+ 
+ 	return rdev_abandon_st(rdev, dev, ap_mld_addr,
+ 			       info->attrs[NL80211_ATTR_LOCAL_STATE_CHANGE]);
+ }
+ 
  #define NL80211_FLAG_NEED_WIPHY		0x01
  #define NL80211_FLAG_NEED_NETDEV	0x02
  #define NL80211_FLAG_NEED_RTNL		0x04
@@@ -20115,6 -20298,7 +20295,7 @@@ static bool nl80211_need_wdev_ref(u32 i
  static int nl80211_pre_doit(const struct genl_split_ops *ops,
  			    struct sk_buff *skb,
  			    struct genl_info *info)
+ 	__context_unsafe("can't cope with the need_rtnl variable")
  {
  	struct cfg80211_registered_device *rdev = NULL;
  	struct net *netns = genl_info_net(info);
@@@ -20184,11 -20368,9 +20365,9 @@@
  			wiphy_lock(&rdev->wiphy);
  		} else {
  			/* without rtnl, things may have changed since lookup */
- 			wdev = nl80211_lock_and_recheck(rdev, netns, wdev_id);
- 			if (IS_ERR(wdev)) {
- 				err = PTR_ERR(wdev);
+ 			err = nl80211_lock_and_recheck(rdev, netns, wdev_id, &wdev);
+ 			if (err)
  				goto out;
- 			}
  		}
  		locked = true;
  	} else if (rdev && !need_rtnl) {
@@@ -21345,6 -21527,24 +21524,24 @@@ static const struct genl_small_ops nl80
  		.internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP |
  					 NL80211_FLAG_NO_WIPHY_MTX),
  	},
+ 	{
+ 		.cmd = NL80211_CMD_PREPARE_SMD_TRANSITION,
+ 		.doit = nl80211_prepare_st,
+ 		.flags = GENL_UNS_ADMIN_PERM,
+ 		.internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
+ 	},
+ 	{
+ 		.cmd = NL80211_CMD_EXECUTE_SMD_TRANSITION,
+ 		.doit = nl80211_execute_st,
+ 		.flags = GENL_UNS_ADMIN_PERM,
+ 		.internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
+ 	},
+ 	{
+ 		.cmd = NL80211_CMD_ABANDON_SMD_TRANSITION,
+ 		.doit = nl80211_abandon_st,
+ 		.flags = GENL_UNS_ADMIN_PERM,
+ 		.internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
+ 	},
  };
  
  static struct genl_family nl80211_fam __ro_after_init = {
@@@ -21687,6 -21887,7 +21884,7 @@@ struct nl80211_mlme_event 
  	const u8 *req_ies;
  	size_t req_ies_len;
  	bool reconnect;
+ 	const u8 *mld_addr;
  };
  
  static void nl80211_send_mlme_event(struct cfg80211_registered_device *rdev,
@@@ -21709,12 -21910,17 +21907,17 @@@
  
  	if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
  	    nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) ||
- 	    nla_put(msg, NL80211_ATTR_FRAME, event->buf_len, event->buf) ||
+ 	    (event->buf_len &&
+ 	     nla_put(msg, NL80211_ATTR_FRAME, event->buf_len, event->buf)) ||
  	    (event->req_ies &&
  	     nla_put(msg, NL80211_ATTR_REQ_IE, event->req_ies_len,
  		     event->req_ies)))
  		goto nla_put_failure;
  
+ 	if (event->mld_addr &&
+ 	    nla_put(msg, NL80211_ATTR_MLD_ADDR, ETH_ALEN, event->mld_addr))
+ 		goto nla_put_failure;
+ 
  	if (event->reconnect &&
  	    nla_put_flag(msg, NL80211_ATTR_RECONNECT_REQUESTED))
  		goto nla_put_failure;
@@@ -22202,7 -22408,6 +22405,6 @@@ void cfg80211_links_removed(struct net_
  		return;
  
  	cfg80211_wdev_release_link_bsses(wdev, link_mask);
- 	wdev->valid_links &= ~link_mask;
  
  	msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
  	if (!msg)
@@@ -22266,6 -22471,169 +22468,169 @@@ void nl80211_mlo_reconf_add_done(struc
  	nl80211_send_mlme_event(rdev, dev, &event, GFP_KERNEL);
  }
  
+ void nl80211_st_preparation_response(struct cfg80211_registered_device *rdev,
+ 				     struct net_device *dev,
+ 				     struct cfg80211_st_preparation_resp_data *data)
+ {
+ 	struct nl80211_mlme_event event = {
+ 		.cmd = NL80211_CMD_PREPARE_SMD_TRANSITION,
+ 		.buf = data->buf,
+ 		.buf_len = data->len,
+ 		.req_ies = data->req_elems,
+ 		.req_ies_len = data->req_elems_len,
+ 		.mld_addr = data->ap_mld_addr,
+ 	};
+ 
+ 	nl80211_send_mlme_event(rdev, dev, &event, GFP_KERNEL);
+ }
+ 
+ void nl80211_st_execution_response(struct cfg80211_registered_device *rdev,
+ 				   struct net_device *dev,
+ 				   struct cfg80211_st_execution_resp_data *data)
+ {
+ 	size_t link_info_size = NLA_HDRLEN +
+ 				nla_total_size(sizeof(u8)) +
+ 				nla_total_size(ETH_ALEN) +
+ 				nla_total_size(ETH_ALEN);
+ 	struct nlattr *nested;
+ 	struct sk_buff *msg;
+ 	int link_count = 0;
+ 	void *hdr;
+ 	int i = 1;
+ 
+ 	for (unsigned int link = 0; link < IEEE80211_MLD_MAX_NUM_LINKS; link++) {
+ 		if (!data->links[link].bssid ||
+ 		    WARN_ON(!data->links[link].local_addr))
+ 			continue;
+ 
+ 		link_count++;
+ 	}
+ 
+ 	msg = nlmsg_new(100 + data->len + link_info_size * link_count,
+ 			GFP_KERNEL);
+ 	if (!msg)
+ 		return;
+ 
+ 	hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_EXECUTE_SMD_TRANSITION);
+ 	if (!hdr) {
+ 		nlmsg_free(msg);
+ 		return;
+ 	}
+ 
+ 	if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
+ 	    nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) ||
+ 	    nla_put(msg, NL80211_ATTR_MLD_ADDR, ETH_ALEN, data->ap_mld_addr))
+ 		goto nla_put_failure;
+ 
+ 	if (!data->len)
+ 		goto send;
+ 
+ 	if (nla_put(msg, NL80211_ATTR_FRAME, data->len, data->buf))
+ 		goto nla_put_failure;
+ 
+ 	nested = nla_nest_start(msg, NL80211_ATTR_MLO_LINKS);
+ 	if (!nested)
+ 		goto nla_put_failure;
+ 
+ 	for (unsigned int link = 0; link < IEEE80211_MLD_MAX_NUM_LINKS; link++) {
+ 		const u8 *bssid = data->links[link].bssid;
+ 		const u8 *local_addr = data->links[link].local_addr;
+ 		struct nlattr *nested_mlo_links;
+ 
+ 		if (!bssid || !local_addr)
+ 			continue;
+ 
+ 		nested_mlo_links = nla_nest_start(msg, i);
+ 		if (!nested_mlo_links)
+ 			goto nla_put_failure;
+ 
+ 		if (nla_put_u8(msg, NL80211_ATTR_MLO_LINK_ID, link) ||
+ 		    nla_put(msg, NL80211_ATTR_BSSID, ETH_ALEN, bssid) ||
+ 		    nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, local_addr))
+ 			goto nla_put_failure;
+ 
+ 		nla_nest_end(msg, nested_mlo_links);
+ 		i++;
+ 	}
+ 	nla_nest_end(msg, nested);
+ 
+ send:
+ 	genlmsg_end(msg, hdr);
+ 
+ 	genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
+ 				NL80211_MCGRP_MLME, GFP_KERNEL);
+ 	return;
+ 
+  nla_put_failure:
+ 	nlmsg_free(msg);
+ }
+ 
+ void nl80211_st_done(struct cfg80211_registered_device *rdev,
+ 		     struct net_device *dev)
+ {
+ 	struct wireless_dev *wdev = dev->ieee80211_ptr;
+ 	struct nlattr *nested;
+ 	struct sk_buff *msg;
+ 	void *hdr;
+ 	int i = 1;
+ 
+ 	msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
+ 	if (!msg)
+ 		return;
+ 
+ 	hdr = nl80211hdr_put(msg, 0, 0, 0,
+ 			     NL80211_CMD_COMPLETED_SMD_TRANSITION);
+ 	if (!hdr) {
+ 		nlmsg_free(msg);
+ 		return;
+ 	}
+ 
+ 	if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
+ 	    nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) ||
+ 	    nla_put(msg, NL80211_ATTR_MLD_ADDR, ETH_ALEN,
+ 		    wdev->u.client.connected_addr))
+ 		goto nla_put_failure;
+ 
+ 	nested = nla_nest_start(msg, NL80211_ATTR_MLO_LINKS);
+ 	if (!nested)
+ 		goto nla_put_failure;
+ 
+ 	for (unsigned int link = 0; link < IEEE80211_MLD_MAX_NUM_LINKS; link++) {
+ 		struct cfg80211_internal_bss *bss;
+ 		struct nlattr *nested_mlo_links;
+ 
+ 		if (!(wdev->valid_links & BIT(link)))
+ 			continue;
+ 
+ 		bss = wdev->links[link].client.current_bss;
+ 		if (WARN_ON(!bss))
+ 			continue;
+ 
+ 		nested_mlo_links = nla_nest_start(msg, i);
+ 		if (!nested_mlo_links)
+ 			goto nla_put_failure;
+ 
+ 		if (nla_put_u8(msg, NL80211_ATTR_MLO_LINK_ID, link) ||
+ 		    nla_put(msg, NL80211_ATTR_BSSID, ETH_ALEN, bss->pub.bssid) ||
+ 		    nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN,
+ 			    wdev->links[link].addr))
+ 			goto nla_put_failure;
+ 
+ 		nla_nest_end(msg, nested_mlo_links);
+ 		i++;
+ 	}
+ 	nla_nest_end(msg, nested);
+ 
+ 	genlmsg_end(msg, hdr);
+ 
+ 	genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
+ 				NL80211_MCGRP_MLME, GFP_KERNEL);
+ 	return;
+ 
+  nla_put_failure:
+ 	nlmsg_free(msg);
+ }
+ 
  void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
  			     struct net_device *netdev, const u8 *bssid,
  			     gfp_t gfp)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2026-11-10 18:38 Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2026-11-10 18:38 UTC (permalink / raw)
  To: Johannes Berg, Wireless
  Cc: Johannes Berg, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]

Hi all,

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

  net/mac80211/mlme.c

between commit:

  4af2b71495a3f ("wifi: mac80211: fix use-after-free on TTLM disconnect")

from the wireless tree and commit:

  1d8b10787a3d3 ("wifi: mac80211: mlme: partially handle UHR updates")

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 net/mac80211/mlme.c
index b5efc6ccc9853,456b289bb072b..0000000000000
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@@ -8488,9 -8983,12 +8985,13 @@@ static void ieee80211_rx_mgmt_beacon(st
  					       elems->cisco_dtpc_elem);
  
  	ieee80211_ml_reconfiguration(sdata, elems);
 -	ieee80211_process_adv_ttlm(sdata, elems,
 -				      le64_to_cpu(mgmt->u.beacon.timestamp));
 +	if (!ieee80211_process_adv_ttlm(sdata, elems,
 +					le64_to_cpu(mgmt->u.beacon.timestamp)))
 +		goto free;
+ 	if (!ieee80211_rx_mgmt_beacon_uhr_param_upd(local, link, link_sta, elems,
+ 						    config_bw_out.ap_non_dbe_width,
+ 						    dbe_enabled_before))
+ 		goto free;
  
  apply:
  	ieee80211_link_info_change_notify(sdata, link, changed);

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2026-11-10 18:38 Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2026-11-10 18:38 UTC (permalink / raw)
  To: Johannes Berg, Wireless
  Cc: Johannes Berg, Linux Kernel Mailing List,
	Linux Next Mailing List, Zhao Li

[-- Attachment #1: Type: text/plain, Size: 2816 bytes --]

Hi all,

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

  net/mac80211/link.c

between commits:

  a155ef2ef7953 ("wifi: mac80211: fix use-after-free when MLO link setup is rolled back")
  745f5d04395df ("wifi: mac80211: drain link readers before stopping removed links")
  bb22f3b2d8f8a ("wifi: mac80211: restore dormant links when link updates fail")

from the wireless tree and commit:

  89e2600dc1f29 ("wifi: mac80211: refactor link handling")

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 net/mac80211/link.c
index f43c0dec8cc9f,428759f8dec30..0000000000000
--- a/net/mac80211/link.c
+++ b/net/mac80211/link.c
@@@ -206,17 -255,13 +256,18 @@@ static void ieee80211_tear_down_links(s
  		if (WARN_ON(!link))
  			continue;
  		ieee80211_remove_link_keys(link, &keys);
- 		ieee80211_link_debugfs_remove(link);
 -		ieee80211_link_stop(link);
 +		stop[link_id] = link;
+ 		if (link == &sdata->deflink)
+ 			ieee80211_link_debugfs_remove(link);
  	}
  
 +	/* drain RCU readers before cancelling work they may queue */
  	synchronize_rcu();
  
 +	for (link_id = 0; link_id < IEEE80211_MLD_MAX_NUM_LINKS; link_id++)
 +		if (stop[link_id])
 +			ieee80211_link_stop(stop[link_id]);
 +
  	ieee80211_free_key_list(sdata->local, &keys);
  }
  
@@@ -404,16 -440,14 +447,15 @@@ static int ieee80211_vif_update_links(s
  		ret = 0;
  
  	if (ret) {
- 		/* restore config */
- 		memcpy(sdata->link, old_data, sizeof(old_data));
- 		memcpy(sdata->vif.link_conf, old, sizeof(old));
+ 		/* restore config; add/rem can overlap on link 0, so detach first */
+ 		for_each_set_bit(link_id, &add, IEEE80211_MLD_MAX_NUM_LINKS)
+ 			ieee80211_link_detach(&links[link_id]->data);
+ 		for_each_set_bit(link_id, &rem, IEEE80211_MLD_MAX_NUM_LINKS)
+ 			ieee80211_link_attach(old_data[link_id]);
 -		ieee80211_set_vif_links_bitmaps(sdata, old_links, dormant_links);
 +		ieee80211_set_vif_links_bitmaps(sdata, old_links, old_dormant);
- 		/* drain RCU readers before cancelling work they may queue */
++
+ 		/* the new links were published, wait before freeing them */
  		synchronize_rcu();
- 		for_each_set_bit(link_id, &add, IEEE80211_MLD_MAX_NUM_LINKS) {
- 			ieee80211_link_debugfs_remove(&links[link_id]->data);
- 			ieee80211_link_stop(&links[link_id]->data);
- 		}
  		/* and free (only) the newly allocated links */
  		memset(to_free, 0, sizeof(links));
  		goto free;

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2026-09-15 14:20 Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2026-09-15 14:20 UTC (permalink / raw)
  To: Johannes Berg, Wireless
  Cc: Johannes Berg, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2929 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2026-09-09 12:12 Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2026-09-09 12:12 UTC (permalink / raw)
  To: Johannes Berg, Wireless
  Cc: Johannes Berg, Linux Kernel Mailing List,
	Linux Next Mailing List, Mariano Baragiola

[-- Attachment #1: Type: text/plain, Size: 5202 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2025-07-16  3:52 Stephen Rothwell
  2025-07-16  8:59 ` Johannes Berg
  0 siblings, 1 reply; 54+ messages in thread
From: Stephen Rothwell @ 2025-07-16  3:52 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg
  Cc: Wireless, Linux Kernel Mailing List, Linux Next Mailing List,
	Miri Korenblit, Pagadala Yesu Anjaneyulu

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

Hi all,

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

  drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
  drivers/net/wireless/intel/iwlwifi/mld/regulatory.c

between commit:

  5fde0fcbd760 ("wifi: iwlwifi: mask reserved bits in chan_state_active_bitmap")

from the wireless tree and commit:

  ea045a0de3b9 ("wifi: iwlwifi: add support for accepting raw DSM tables by firmware")

from the wireless-next tree.

I fixed it up (I just used the latter) 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.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2024-10-28  1:36 Stephen Rothwell
  2024-10-28  6:51 ` Johannes Berg
  2024-10-31  2:20 ` Stephen Rothwell
  0 siblings, 2 replies; 54+ messages in thread
From: Stephen Rothwell @ 2024-10-28  1:36 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg
  Cc: Wireless, Aditya Kumar Singh, Johannes Berg,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Miri Korenblit

[-- Attachment #1: Type: text/plain, Size: 910 bytes --]

Hi all,

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

  drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c

between commit:

  cbe84e9ad5e2 ("wifi: iwlwifi: mvm: really send iwl_txpower_constraints_cmd")

from the wireless tree and commit:

  188a1bf89432 ("wifi: mac80211: re-order assigning channel in activate links")

from the wireless-next tree.

I fixed it up (the latter removed some code that the former moved some
other cde around - so I effectively just used the latter) 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.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2024-10-24  0:55 Stephen Rothwell
  2024-10-24  6:58 ` Johannes Berg
  2024-10-31  2:24 ` Stephen Rothwell
  0 siblings, 2 replies; 54+ messages in thread
From: Stephen Rothwell @ 2024-10-24  0:55 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg
  Cc: Ben Greear, Emmanuel Grumbach, Johannes Berg, Wireless,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Miri Korenblit

[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]

Hi all,

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

  net/mac80211/cfg.c

between commit:

  8dd0498983ee ("wifi: mac80211: Fix setting txpower with emulate_chanctx")

from the wireless tree and commit:

  c4382d5ca1af ("wifi: mac80211: update the right link for tx power")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc net/mac80211/cfg.c
index 6dfc61a9acd4,6c0b228523cb..000000000000
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@@ -3046,7 -3070,7 +3070,8 @@@ static int ieee80211_set_tx_power(struc
  	enum nl80211_tx_power_setting txp_type = type;
  	bool update_txp_type = false;
  	bool has_monitor = false;
 +	int old_power = local->user_power_level;
+ 	int user_power_level;
  
  	lockdep_assert_wiphy(local->hw.wiphy);
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2024-06-03  1:01 Stephen Rothwell
  2024-06-03 10:01 ` Kalle Valo
  0 siblings, 1 reply; 54+ messages in thread
From: Stephen Rothwell @ 2024-06-03  1:01 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg, Wireless
  Cc: Alexis Lothoré, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3143 bytes --]

Hi all,

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

  drivers/net/wireless/microchip/wilc1000/netdev.c

between commit:

  ebfb5e8fc8b4 ("Revert "wifi: wilc1000: convert list management to RCU"")

from the wireless tree and commit:

  6fe46d5c0a84 ("wifi: wilc1000: set net device registration as last step during interface creation")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/wireless/microchip/wilc1000/netdev.c
index 710e29bea560,4e2698528a49..000000000000
--- a/drivers/net/wireless/microchip/wilc1000/netdev.c
+++ b/drivers/net/wireless/microchip/wilc1000/netdev.c
@@@ -679,9 -669,9 +672,9 @@@ static int wilc_set_mac_addr(struct net
  			return 0;
  		}
  	}
 -	rcu_read_unlock();
 +	srcu_read_unlock(&wilc->srcu, srcu_idx);
  
- 	result = wilc_set_mac_address(vif, (u8 *)addr->sa_data);
+ 	result = wilc_set_mac_address(vif, addr->sa_data);
  	if (result)
  		return result;
  
@@@ -972,6 -959,28 +966,28 @@@ struct wilc_vif *wilc_netdev_ifc_init(s
  	vif->priv.wdev.iftype = type;
  	vif->priv.dev = ndev;
  
+ 	ndev->needs_free_netdev = true;
+ 	vif->iftype = vif_type;
+ 	vif->idx = wilc_get_available_idx(wl);
+ 	vif->mac_opened = 0;
+ 
+ 	memcpy(mac_address, wl->nv_mac_address, ETH_ALEN);
+ 	/* WILC firmware uses locally administered MAC address for the
+ 	 * second virtual interface (bit 1 of first byte set), but
+ 	 * since it is possibly not loaded/running yet, reproduce this behavior
+ 	 * in the driver during interface creation.
+ 	 */
+ 	if (vif->idx)
+ 		mac_address[0] |= 0x2;
+ 
+ 	eth_hw_addr_set(vif->ndev, mac_address);
+ 
+ 	mutex_lock(&wl->vif_mutex);
+ 	list_add_tail_rcu(&vif->list, &wl->vif_list);
+ 	wl->vif_num += 1;
+ 	mutex_unlock(&wl->vif_mutex);
 -	synchronize_rcu();
++	synchronize_srcu(&wl->srcu);
+ 
  	if (rtnl_locked)
  		ret = cfg80211_register_netdevice(ndev);
  	else
@@@ -979,26 -988,17 +995,17 @@@
  
  	if (ret) {
  		ret = -EFAULT;
- 		goto error;
+ 		goto error_remove_vif;
  	}
  
- 	ndev->needs_free_netdev = true;
- 	vif->iftype = vif_type;
- 	vif->idx = wilc_get_available_idx(wl);
- 	vif->mac_opened = 0;
- 	mutex_lock(&wl->vif_mutex);
- 	list_add_tail_rcu(&vif->list, &wl->vif_list);
- 	wl->vif_num += 1;
- 	mutex_unlock(&wl->vif_mutex);
- 	synchronize_srcu(&wl->srcu);
- 
  	return vif;
  
- error:
- 	if (rtnl_locked)
- 		cfg80211_unregister_netdevice(ndev);
- 	else
- 		unregister_netdev(ndev);
+ error_remove_vif:
+ 	mutex_lock(&wl->vif_mutex);
+ 	list_del_rcu(&vif->list);
+ 	wl->vif_num -= 1;
+ 	mutex_unlock(&wl->vif_mutex);
 -	synchronize_rcu();
++	synchronize_srcu(&wl->srcu);
  	free_netdev(ndev);
  	return ERR_PTR(ret);
  }

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2024-05-31  2:44 Stephen Rothwell
  0 siblings, 0 replies; 54+ messages in thread
From: Stephen Rothwell @ 2024-05-31  2:44 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg
  Cc: Wireless, Aditya Kumar Singh, Johannes Berg,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

Hi all,

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

  net/mac80211/cfg.c

between commit:

  8ecc4d7a7cd3 ("wifi: mac80211: pass proper link id for channel switch started notification")

from the wireless tree and commit:

  344d18cec231 ("wifi: mac80211: collect some CSA data into sub-structs")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc net/mac80211/cfg.c
index 83ad6c9709fe,62119e957cd8..000000000000
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@@ -4028,7 -4028,7 +4029,7 @@@ __ieee80211_channel_switch(struct wiph
  	}
  
  	cfg80211_ch_switch_started_notify(sdata->dev,
- 					  &link_data->csa_chanreq.oper, link_id,
 -					  &link_data->csa.chanreq.oper, 0,
++					  &link_data->csa.chanreq.oper, link_id,
  					  params->count, params->block_tx);
  
  	if (changed) {

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2024-04-22  0:56 Stephen Rothwell
  0 siblings, 0 replies; 54+ messages in thread
From: Stephen Rothwell @ 2024-04-22  0:56 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg
  Cc: Wireless, Johannes Berg, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2214 bytes --]

Hi all,

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

  net/mac80211/chan.c

between commit:

  89884459a0b9 ("wifi: mac80211: fix idle calculation with multi-link")

from the wireless tree and commit:

  87f5500285fb ("wifi: mac80211: simplify ieee80211_assign_link_chanctx()")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc net/mac80211/chan.c
index 4e0c1a6e509f,dedf11eeb43c..380695fdc32f
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@@ -800,8 -819,7 +819,8 @@@ static int ieee80211_assign_link_chanct
  	struct ieee80211_local *local = sdata->local;
  	struct ieee80211_chanctx_conf *conf;
  	struct ieee80211_chanctx *curr_ctx = NULL;
 +	bool new_idle;
- 	int ret = 0;
+ 	int ret;
  
  	if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_NAN))
  		return -EOPNOTSUPP;
@@@ -822,17 -840,24 +841,22 @@@
  		ieee80211_recalc_chanctx_min_def(local, new_ctx, link);
  
  		ret = drv_assign_vif_chanctx(local, sdata, link->conf, new_ctx);
- 		if (ret)
- 			goto out;
- 
- 		conf = &new_ctx->conf;
- 		list_add(&link->assigned_chanctx_list,
- 			 &new_ctx->assigned_links);
+ 		if (assign_on_failure || !ret) {
+ 			/* Need to continue, see _ieee80211_set_active_links */
+ 			WARN_ON_ONCE(ret && !local->in_reconfig);
+ 			ret = 0;
+ 
+ 			/* succeeded, so commit it to the data structures */
+ 			conf = &new_ctx->conf;
+ 			list_add(&link->assigned_chanctx_list,
+ 				 &new_ctx->assigned_links);
+ 		}
+ 	} else {
+ 		ret = 0;
  	}
  
- out:
  	rcu_assign_pointer(link->conf->chanctx_conf, conf);
  
 -	sdata->vif.cfg.idle = !conf;
 -
  	if (curr_ctx && ieee80211_chanctx_num_assigned(local, curr_ctx) > 0) {
  		ieee80211_recalc_chanctx_chantype(local, curr_ctx);
  		ieee80211_recalc_smps_chanctx(local, curr_ctx);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2024-03-25 23:09 Stephen Rothwell
  2024-03-26  7:58 ` Johannes Berg
  0 siblings, 1 reply; 54+ messages in thread
From: Stephen Rothwell @ 2024-03-25 23:09 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg
  Cc: Wireless, Johannes Berg, Linux Kernel Mailing List,
	Linux Next Mailing List, Miri Korenblit

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

Hi all,

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

  drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

between commit:

  5f4040050553 ("wifi: iwlwifi: mvm: disable MLO for the time being")

from the wireless tree and commit:

  bbd6d0f8bc51 ("wifi: iwlwifi: mvm: advertise IEEE80211_HW_HANDLES_QUIET_CSA")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 8f4b063d6243,6b8f18b3e280..000000000000
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@@ -359,8 -359,11 +359,11 @@@ int iwl_mvm_mac_setup_register(struct i
  	/* Set this early since we need to have it for the check below */
  	if (mvm->mld_api_is_used && mvm->nvm_data->sku_cap_11be_enable &&
  	    !iwlwifi_mod_params.disable_11ax &&
- 	    !iwlwifi_mod_params.disable_11be)
+ 	    !iwlwifi_mod_params.disable_11be) {
 -		hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_MLO;
 +		hw->wiphy->flags |= WIPHY_FLAG_DISABLE_WEXT;
+ 		/* we handle this already earlier, but need it for MLO */
+ 		ieee80211_hw_set(hw, HANDLES_QUIET_CSA);
+ 	}
  
  	/* With MLD FW API, it tracks timing by itself,
  	 * no need for any timing from the host

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2024-02-08 23:56 Stephen Rothwell
  2024-02-09  7:03 ` Johannes Berg
  0 siblings, 1 reply; 54+ messages in thread
From: Stephen Rothwell @ 2024-02-08 23:56 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg
  Cc: Wireless, Daniel Gabay, Johannes Berg, Linux Kernel Mailing List,
	Linux Next Mailing List, Miri Korenblit

[-- Attachment #1: Type: text/plain, Size: 2282 bytes --]

Hi all,

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

  drivers/net/wireless/intel/iwlwifi/mvm/tx.c

between commit:

  2e57b77583ca ("wifi: iwlwifi: mvm: use correct address 3 in A-MSDU")

from the wireless tree and commit:

  3d869feacb74 ("wifi: iwlwifi: mvm: use FW rate for non-data only on new devices")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 461f26d9214e,4981bb1f0251..000000000000
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@@ -520,16 -520,31 +520,41 @@@ static void iwl_mvm_set_tx_cmd_crypto(s
  	}
  }
  
 +static void iwl_mvm_copy_hdr(void *cmd, const void *hdr, int hdrlen,
 +			     const u8 *addr3_override)
 +{
 +	struct ieee80211_hdr *out_hdr = cmd;
 +
 +	memcpy(cmd, hdr, hdrlen);
 +	if (addr3_override)
 +		memcpy(out_hdr->addr3, addr3_override, ETH_ALEN);
 +}
 +
+ static bool iwl_mvm_use_host_rate(struct iwl_mvm *mvm,
+ 				  struct iwl_mvm_sta *mvmsta,
+ 				  struct ieee80211_hdr *hdr,
+ 				  struct ieee80211_tx_info *info)
+ {
+ 	if (unlikely(!mvmsta))
+ 		return true;
+ 
+ 	if (unlikely(info->control.flags & IEEE80211_TX_CTRL_RATE_INJECT))
+ 		return true;
+ 
+ 	if (likely(ieee80211_is_data(hdr->frame_control) &&
+ 		   mvmsta->sta_state >= IEEE80211_STA_AUTHORIZED))
+ 		return false;
+ 
+ 	/*
+ 	 * Not a data frame, use host rate if on an old device that
+ 	 * can't possibly be doing MLO (firmware may be selecting a
+ 	 * bad rate), if we might be doing MLO we need to let FW pick
+ 	 * (since we don't necesarily know the link), but FW rate
+ 	 * selection was fixed.
+ 	 */
+ 	return mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_BZ;
+ }
+ 
  /*
   * Allocates and sets the Tx cmd the driver data pointers in the skb
   */

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2023-09-26  2:20 Stephen Rothwell
  0 siblings, 0 replies; 54+ messages in thread
From: Stephen Rothwell @ 2023-09-26  2:20 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg, Wireless
  Cc: Johannes Berg, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2695 bytes --]

Hi all,

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

  net/mac80211/key.c

between commits:

  31db78a4923e ("wifi: mac80211: fix potential key use-after-free")
  d097ae01ebd4 ("wifi: mac80211: fix potential key leak")

from the wireless tree and commit:

  2a8b665e6bcc ("wifi: mac80211: remove key_mtx")

from the wireless-next tree.

I fixed it up (I think - 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.

-- 
Cheers,
Stephen Rothwell

diff --cc net/mac80211/key.c
index 0665ff5e456e,ac410f6632b5..000000000000
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@@ -881,21 -875,20 +880,22 @@@ int ieee80211_key_link(struct ieee80211
  
  		if (link_id >= 0) {
  			link_sta = rcu_dereference_protected(sta->link[link_id],
- 							     lockdep_is_held(&sta->local->sta_mtx));
+ 							     lockdep_is_held(&sta->local->hw.wiphy->mtx));
 -			if (!link_sta)
 -				return -ENOLINK;
 +			if (!link_sta) {
 +				ret = -ENOLINK;
 +				goto out;
 +			}
  		}
  
- 		old_key = key_mtx_dereference(sdata->local, link_sta->gtk[idx]);
+ 		old_key = wiphy_dereference(sdata->local->hw.wiphy,
+ 					    link_sta->gtk[idx]);
  	} else {
  		if (idx < NUM_DEFAULT_KEYS)
- 			old_key = key_mtx_dereference(sdata->local,
- 						      sdata->keys[idx]);
+ 			old_key = wiphy_dereference(sdata->local->hw.wiphy,
+ 						    sdata->keys[idx]);
  		if (!old_key)
- 			old_key = key_mtx_dereference(sdata->local,
- 						      link->gtk[idx]);
+ 			old_key = wiphy_dereference(sdata->local->hw.wiphy,
+ 						    link->gtk[idx]);
  	}
  
  	/* Non-pairwise keys must also not switch the cipher on rekey */
@@@ -910,10 -901,10 +910,8 @@@
  	 * Silently accept key re-installation without really installing the
  	 * new version of the key to avoid nonce reuse or replay issues.
  	 */
--	if (ieee80211_key_identical(sdata, old_key, key)) {
- 		ret = -EALREADY;
- 		goto unlock;
 -		ieee80211_key_free_unused(key);
 -		return 0;
--	}
++	if (ieee80211_key_identical(sdata, old_key, key))
++		return -EALREADY;
  
  	key->local = sdata->local;
  	key->sdata = sdata;
@@@ -936,13 -927,6 +934,10 @@@
  		ieee80211_key_free(key, delay_tailroom);
  	}
  
 +	key = NULL;
 +
 + out:
 +	ieee80211_key_free_unused(key);
-  unlock:
- 	mutex_unlock(&sdata->local->key_mtx);
- 
  	return ret;
  }
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2023-09-26  2:02 Stephen Rothwell
  2023-09-26  2:41 ` Stephen Rothwell
  0 siblings, 1 reply; 54+ messages in thread
From: Stephen Rothwell @ 2023-09-26  2:02 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg, Wireless
  Cc: Johannes Berg, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]

Hi all,

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

  net/mac80211/cfg.c

between commit:

  31db78a4923e ("wifi: mac80211: fix potential key use-after-free")

from the wireless tree and commit:

  4d3acf4311a0 ("wifi: mac80211: remove sta_mtx")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc net/mac80211/cfg.c
index 0e3a1753a51c,5bc6b1329465..000000000000
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@@ -565,15 -561,7 +561,11 @@@ static int ieee80211_add_key(struct wip
  		break;
  	}
  
 -	return ieee80211_key_link(key, link, sta);
 +	err = ieee80211_key_link(key, link, sta);
 +	/* KRACK protection, shouldn't happen but just silently accept key */
 +	if (err == -EALREADY)
 +		err = 0;
- 
-  out_unlock:
- 	mutex_unlock(&local->sta_mtx);
- 
 +	return err;
  }
  
  static struct ieee80211_key *

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2023-09-12  2:46 Stephen Rothwell
  0 siblings, 0 replies; 54+ messages in thread
From: Stephen Rothwell @ 2023-09-12  2:46 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg, Wireless
  Cc: Johannes Berg, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 5267 bytes --]

Hi all,

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

  net/wireless/nl80211.c

between commit:

  37c20b2effe9 ("wifi: cfg80211: fix cqm_config access race")

from the wireless tree and commit:

  076fc8775daf ("wifi: cfg80211: remove wdev mutex")

from the wireless-next tree.

I fixed it up (I used a supplied resolution from Johannes - 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.

-- 
Cheers,
Stephen Rothwell

diff --cc net/wireless/nl80211.c
index 7a88361b3414,ab0aea7dca7d..fe06c238d4ef
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@@ -6191,12 -6135,8 +6150,12 @@@ static int nl80211_start_ap(struct sk_b
  
  	err = nl80211_calculate_ap_params(params);
  	if (err)
- 		goto out_unlock;
+ 		goto out;
  
 +	err = nl80211_validate_ap_phy_operation(params);
 +	if (err)
- 		goto out_unlock;
++		goto out;
 +
  	if (info->attrs[NL80211_ATTR_AP_SETTINGS_FLAGS])
  		params->flags = nla_get_u32(
  			info->attrs[NL80211_ATTR_AP_SETTINGS_FLAGS]);
@@@ -12884,11 -12747,10 +12767,11 @@@ static int nl80211_set_cqm_rssi(struct 
  				u32 hysteresis)
  {
  	struct cfg80211_registered_device *rdev = info->user_ptr[0];
 +	struct cfg80211_cqm_config *cqm_config = NULL, *old;
  	struct net_device *dev = info->user_ptr[1];
  	struct wireless_dev *wdev = dev->ieee80211_ptr;
- 	int i, err;
  	s32 prev = S32_MIN;
 -	int i;
++	int i, err;
  
  	/* Check all values negative and sorted */
  	for (i = 0; i < n_thresholds; i++) {
@@@ -12917,11 -12781,9 +12800,9 @@@
  	if (n_thresholds == 1 && thresholds[0] == 0) /* Disabling */
  		n_thresholds = 0;
  
- 	wdev_lock(wdev);
- 	old = rcu_dereference_protected(wdev->cqm_config,
- 					lockdep_is_held(&wdev->mtx));
 -	if (n_thresholds) {
 -		struct cfg80211_cqm_config *cqm_config;
++	old = wiphy_dereference(wdev->wiphy, wdev->cqm_config);
  
 +	if (n_thresholds) {
  		cqm_config = kzalloc(struct_size(cqm_config, rssi_thresholds,
  						 n_thresholds),
  				     GFP_KERNEL);
@@@ -12936,22 -12796,10 +12815,20 @@@
  		       flex_array_size(cqm_config, rssi_thresholds,
  				       n_thresholds));
  
 -		wdev->cqm_config = cqm_config;
 +		rcu_assign_pointer(wdev->cqm_config, cqm_config);
 +	} else {
 +		RCU_INIT_POINTER(wdev->cqm_config, NULL);
  	}
  
 -	return cfg80211_cqm_rssi_update(rdev, dev);
 +	err = cfg80211_cqm_rssi_update(rdev, dev, cqm_config);
 +	if (err) {
 +		rcu_assign_pointer(wdev->cqm_config, old);
 +		kfree_rcu(cqm_config, rcu_head);
 +	} else {
 +		kfree_rcu(old, rcu_head);
 +	}
- unlock:
- 	wdev_unlock(wdev);
 +
 +	return err;
  }
  
  static int nl80211_set_cqm(struct sk_buff *skb, struct genl_info *info)
@@@ -19107,41 -18879,18 +18907,39 @@@ void cfg80211_cqm_rssi_notify(struct ne
  		    rssi_event != NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH))
  		return;
  
 -	if (wdev->cqm_config) {
 -		wdev->cqm_config->last_rssi_event_value = rssi_level;
 +	rcu_read_lock();
 +	cqm_config = rcu_dereference(wdev->cqm_config);
 +	if (cqm_config) {
 +		cqm_config->last_rssi_event_value = rssi_level;
 +		cqm_config->last_rssi_event_type = rssi_event;
 +		wiphy_work_queue(wdev->wiphy, &wdev->cqm_rssi_work);
 +	}
 +	rcu_read_unlock();
 +}
 +EXPORT_SYMBOL(cfg80211_cqm_rssi_notify);
 +
 +void cfg80211_cqm_rssi_notify_work(struct wiphy *wiphy, struct wiphy_work *work)
 +{
 +	struct wireless_dev *wdev = container_of(work, struct wireless_dev,
 +						 cqm_rssi_work);
 +	struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
 +	enum nl80211_cqm_rssi_threshold_event rssi_event;
 +	struct cfg80211_cqm_config *cqm_config;
 +	struct sk_buff *msg;
 +	s32 rssi_level;
 +
- 	wdev_lock(wdev);
- 	cqm_config = rcu_dereference_protected(wdev->cqm_config,
- 					       lockdep_is_held(&wdev->mtx));
++	cqm_config = wiphy_dereference(wdev->wiphy, wdev->cqm_config);
 +	if (!wdev->cqm_config)
- 		goto unlock;
++		return;
  
 -		cfg80211_cqm_rssi_update(rdev, dev);
 +	cfg80211_cqm_rssi_update(rdev, wdev->netdev, cqm_config);
  
 -		if (rssi_level == 0)
 -			rssi_level = wdev->cqm_config->last_rssi_event_value;
 -	}
 +	rssi_level = cqm_config->last_rssi_event_value;
 +	rssi_event = cqm_config->last_rssi_event_type;
  
 -	msg = cfg80211_prepare_cqm(dev, NULL, gfp);
 +	msg = cfg80211_prepare_cqm(wdev->netdev, NULL, GFP_KERNEL);
  	if (!msg)
- 		goto unlock;
+ 		return;
  
  	if (nla_put_u32(msg, NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT,
  			rssi_event))
@@@ -19151,15 -18900,14 +18949,13 @@@
  				      rssi_level))
  		goto nla_put_failure;
  
 -	cfg80211_send_cqm(msg, gfp);
 +	cfg80211_send_cqm(msg, GFP_KERNEL);
  
- 	goto unlock;
+ 	return;
  
   nla_put_failure:
  	nlmsg_free(msg);
-  unlock:
- 	wdev_unlock(wdev);
  }
 -EXPORT_SYMBOL(cfg80211_cqm_rssi_notify);
  
  void cfg80211_cqm_txe_notify(struct net_device *dev,
  			     const u8 *peer, u32 num_packets,

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2023-03-30 23:49 Stephen Rothwell
  2023-03-31  9:17 ` Johannes Berg
  2023-04-03  2:23 ` Stephen Rothwell
  0 siblings, 2 replies; 54+ messages in thread
From: Stephen Rothwell @ 2023-03-30 23:49 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg
  Cc: Wireless, Felix Fietkau, Johannes Berg,
	Linux Kernel Mailing List, Linux Next Mailing List, Ryder Lee

[-- Attachment #1: Type: text/plain, Size: 2700 bytes --]

Hi all,

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

  net/mac80211/rx.c

between commit:

  a16fc38315f2 ("wifi: mac80211: fix potential null pointer dereference")

from the wireless tree and commit:

  fe4a6d2db3ba ("wifi: mac80211: implement support for yet another mesh A-MSDU format")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc net/mac80211/rx.c
index 3e2176a730e6,1c957194554b..000000000000
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@@ -2776,27 -2862,12 +2843,31 @@@ ieee80211_rx_mesh_data(struct ieee80211
  		rcu_read_unlock();
  	}
  
 +	/* Frame has reached destination.  Don't forward */
 +	if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
 +		goto rx_accept;
 +
 +	if (!--mesh_hdr->ttl) {
 +		if (multicast)
 +			goto rx_accept;
 +
 +		IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
 +		return RX_DROP_MONITOR;
 +	}
 +
 +	if (!ifmsh->mshcfg.dot11MeshForwarding) {
 +		if (is_multicast_ether_addr(eth->h_dest))
 +			goto rx_accept;
 +
 +		return RX_DROP_MONITOR;
 +	}
 +
  	skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]);
  
+ 	if (!multicast &&
+ 	    ieee80211_rx_mesh_fast_forward(sdata, skb, mesh_hdrlen))
+ 		return RX_QUEUED;
+ 
  	ieee80211_fill_mesh_addresses(&hdr, &hdr.frame_control,
  				      eth->h_dest, eth->h_source);
  	hdrlen = ieee80211_hdrlen(hdr.frame_control);
@@@ -2914,14 -2982,24 +2985,24 @@@ __ieee80211_rx_h_amsdu(struct ieee80211
  					  data_offset, true))
  		return RX_DROP_UNUSABLE;
  
 -	if (rx->sta && rx->sta->amsdu_mesh_control < 0) {
 +	if (rx->sta->amsdu_mesh_control < 0) {
- 		bool valid_std = ieee80211_is_valid_amsdu(skb, true);
- 		bool valid_nonstd = ieee80211_is_valid_amsdu(skb, false);
+ 		s8 valid = -1;
+ 		int i;
+ 
+ 		for (i = 0; i <= 2; i++) {
+ 			if (!ieee80211_is_valid_amsdu(skb, i))
+ 				continue;
+ 
+ 			if (valid >= 0) {
+ 				/* ambiguous */
+ 				valid = -1;
+ 				break;
+ 			}
  
- 		if (valid_std && !valid_nonstd)
- 			rx->sta->amsdu_mesh_control = 1;
- 		else if (valid_nonstd && !valid_std)
- 			rx->sta->amsdu_mesh_control = 0;
+ 			valid = i;
+ 		}
+ 
+ 		rx->sta->amsdu_mesh_control = valid;
  	}
  
  	ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr,

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2014-11-25  3:36 Stephen Rothwell
  0 siblings, 0 replies; 54+ messages in thread
From: Stephen Rothwell @ 2014-11-25  3:36 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-next, linux-kernel, Luciano Coelho, Emmanuel Grumbach,
	Arik Nemtsov

[-- Attachment #1: Type: text/plain, Size: 1611 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
drivers/net/wireless/iwlwifi/iwl-fw.h between commit 5ac6c72e5944
("iwlwifi: mvm: check TLV flag before trying to use hotspot firmware
commands") from the wireless tree and commit 77c5d7eff790 ("iwlwifi:
mvm: add TDLS channel switch FW APIs") from the wireless-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/net/wireless/iwlwifi/iwl-fw.h
index 649fdae77383,a94d244459d7..000000000000
--- a/drivers/net/wireless/iwlwifi/iwl-fw.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fw.h
@@@ -155,7 -157,7 +157,8 @@@ enum iwl_ucode_tlv_api 
   * @IWL_UCODE_TLV_CAPA_QUIET_PERIOD_SUPPORT: supports Quiet Period requests
   * @IWL_UCODE_TLV_CAPA_DQA_SUPPORT: supports dynamic queue allocation (DQA),
   *	which also implies support for the scheduler configuration command
+  * @IWL_UCODE_TLV_CAPA_TDLS_CHANNEL_SWITCH: supports TDLS channel switching
 + * @IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT: supports Hot Spot Command
   */
  enum iwl_ucode_tlv_capa {
  	IWL_UCODE_TLV_CAPA_D0I3_SUPPORT			= BIT(0),
@@@ -164,7 -168,7 +169,8 @@@
  	IWL_UCODE_TLV_CAPA_WFA_TPC_REP_IE_SUPPORT	= BIT(10),
  	IWL_UCODE_TLV_CAPA_QUIET_PERIOD_SUPPORT		= BIT(11),
  	IWL_UCODE_TLV_CAPA_DQA_SUPPORT			= BIT(12),
+ 	IWL_UCODE_TLV_CAPA_TDLS_CHANNEL_SWITCH		= BIT(13),
 +	IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT		= BIT(18),
  };
  
  /* The default calibrate table size if not specified by firmware file */

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2013-12-03  0:20 Stephen Rothwell
  2013-12-03 15:52 ` John W. Linville
  0 siblings, 1 reply; 54+ messages in thread
From: Stephen Rothwell @ 2013-12-03  0:20 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-next, linux-kernel, Chun-Yeow Yeoh

[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
net/mac80211/util.c between commit 3f718fd8401d ("mac80211: fix the mesh
channel switch support") from the wireless tree and commit ca91dc97b8a0
("mac80211: use put_unaligned_le16 for precedence value in mesh") from
the wireless-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc net/mac80211/util.c
index 9f9b9bd3fd44,06265d7f8cc3..000000000000
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@@ -2457,9 -2481,13 +2479,8 @@@ int ieee80211_send_action_csa(struct ie
  			  WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT : 0x00;
  		put_unaligned_le16(WLAN_REASON_MESH_CHAN, pos); /* Reason Cd */
  		pos += 2;
- 		pre_value = cpu_to_le16(ifmsh->pre_value);
- 		memcpy(pos, &pre_value, 2);		/* Precedence Value */
 -		if (!ifmsh->pre_value)
 -			ifmsh->pre_value = 1;
 -		else
 -			ifmsh->pre_value++;
+ 		put_unaligned_le16(ifmsh->pre_value, pos);/* Precedence Value */
  		pos += 2;
 -		ifmsh->chsw_init = true;
  	}
  
  	ieee80211_tx_skb(sdata, skb);

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2013-08-19  2:41 Stephen Rothwell
  0 siblings, 0 replies; 54+ messages in thread
From: Stephen Rothwell @ 2013-08-19  2:41 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-next, linux-kernel, Emmanuel Grumbach, Johannes Berg,
	Luciano Coelho

[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in drivers/net/wireless/iwlwifi/pcie/trans.c between commit eabc4ac5d760 ("iwlwifi: pcie: disable L1 Active after pci_enable_device") from the wireless tree and commit 6965a3540a4b ("iwlwifi: pcie: don't swallow error codes in iwl_trans_pcie_alloc()") from the wireless-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/net/wireless/iwlwifi/pcie/trans.c
index 8c6c405,bad95d2..0000000
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@@ -1400,11 -1401,6 +1401,10 @@@ struct iwl_trans *iwl_trans_pcie_alloc(
  	spin_lock_init(&trans_pcie->reg_lock);
  	init_waitqueue_head(&trans_pcie->ucode_write_waitq);
  
- 	if (pci_enable_device(pdev)) {
- 		err = -ENODEV;
++	err = pci_enable_device(pdev);
++	if (err)
 +		goto out_no_pci;
- 	}
 +
  	if (!cfg->base_params->pcie_l1_allowed) {
  		/*
  		 * W/A - seems to solve weird behavior. We need to remove this

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2013-08-12  1:53 Stephen Rothwell
  2013-08-12 15:15 ` John W. Linville
  0 siblings, 1 reply; 54+ messages in thread
From: Stephen Rothwell @ 2013-08-12  1:53 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-next, linux-kernel, Emmanuel Grumbach

[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
drivers/net/wireless/iwlwifi/pcie/trans.c between commit eabc4ac5d760
("iwlwifi: pcie: disable L1 Active after pci_enable_device") from
thewireless tree and commit f2532b04b2ec ("iwlwifi: pcie: don't disable
L1 for newest NICs") from the wireless-next tree.

I fixed it up (maybe - see below) and can carry the fix as necessary (no
action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/net/wireless/iwlwifi/pcie/trans.c
index 390e2f0,e52d1ce..0000000
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@@ -1502,16 -1400,22 +1400,22 @@@ struct iwl_trans *iwl_trans_pcie_alloc(
  	spin_lock_init(&trans_pcie->reg_lock);
  	init_waitqueue_head(&trans_pcie->ucode_write_waitq);
  
 +	if (pci_enable_device(pdev)) {
 +		err = -ENODEV;
 +		goto out_no_pci;
 +	}
 +
- 	/* W/A - seems to solve weird behavior. We need to remove this if we
- 	 * don't want to stay in L1 all the time. This wastes a lot of power */
- 	pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
- 			       PCIE_LINK_STATE_CLKPM);
+ 	if (!cfg->base_params->pcie_l1_allowed) {
+ 		/*
+ 		 * W/A - seems to solve weird behavior. We need to remove this
+ 		 * if we don't want to stay in L1 all the time. This wastes a
+ 		 * lot of power.
+ 		 */
+ 		pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S |
+ 				       PCIE_LINK_STATE_L1 |
+ 				       PCIE_LINK_STATE_CLKPM);
+ 	}
  
 -	if (pci_enable_device(pdev)) {
 -		err = -ENODEV;
 -		goto out_no_pci;
 -	}
 -
  	pci_set_master(pdev);
  
  	err = pci_set_dma_mask(pdev, DMA_BIT_MASK(36));

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2013-06-07  2:56 Stephen Rothwell
  2013-06-07  6:21 ` Sujith Manoharan
  0 siblings, 1 reply; 54+ messages in thread
From: Stephen Rothwell @ 2013-06-07  2:56 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-next, linux-kernel, Sujith Manoharan

[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
drivers/net/wireless/ath/ath9k/Kconfig between commit 8bb7f167a12a
("ath9k: Use minstrel rate control by default") from the wireless tree
and commit cf657a2bc50d ("ath9k: Remove MAC_DEBUG") from the
wireless-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/net/wireless/ath/ath9k/Kconfig
index 3c2cbc9,ec33c80..0000000
--- a/drivers/net/wireless/ath/ath9k/Kconfig
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
@@@ -84,25 -84,13 +84,17 @@@ config ATH9K_DFS_CERTIFIE
  	  developed. At this point enabling this option won't do anything
  	  except increase code size.
  
- config ATH9K_MAC_DEBUG
- 	bool "Atheros MAC statistics"
- 	depends on ATH9K_DEBUGFS
- 	default y
- 	---help---
- 	  This option enables collection of statistics for Rx/Tx status
- 	  data and some other MAC related statistics
- 
 -config ATH9K_RATE_CONTROL
 +config ATH9K_LEGACY_RATE_CONTROL
  	bool "Atheros ath9k rate control"
  	depends on ATH9K
 -	default y
 +	default n
  	---help---
  	  Say Y, if you want to use the ath9k specific rate control
 -	  module instead of minstrel_ht.
 +	  module instead of minstrel_ht. Be warned that there are various
 +	  issues with the ath9k RC and minstrel is a more robust algorithm.
 +	  Note that even if this option is selected, "ath9k_rate_control"
 +	  has to be passed to mac80211 using the module parameter,
 +	  ieee80211_default_rc_algo.
  
  config ATH9K_HTC
         tristate "Atheros HTC based wireless cards support"

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2013-03-26  1:18 Stephen Rothwell
  0 siblings, 0 replies; 54+ messages in thread
From: Stephen Rothwell @ 2013-03-26  1:18 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-next, linux-kernel, Johannes Berg, John W. Linville

[-- Attachment #1: Type: text/plain, Size: 605 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
net/mac80211/sta_info.c between commit 27a737ff7cb0 ("mac80211: always
synchronize_net() during station removal") from the wireless tree and
commits 3b8d9c290364 ("mac80211: remove underscores from some key
functions") and 6d10e46be5ac ("mac80211: batch key free synchronize_net()")
from the wireless-next tree.

The latter seems to supercede the former, so I just used the latter and
can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2013-03-12  1:00 Stephen Rothwell
  0 siblings, 0 replies; 54+ messages in thread
From: Stephen Rothwell @ 2013-03-12  1:00 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-next, linux-kernel, Samuel Ortiz, Thierry Escande

[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
net/nfc/llcp/llcp.c between commit 3536da06db0b ("NFC: llcp: Clean local
timers and works when removing a device") from the wireless tree and
commits d9b8d8e19b07 ("NFC: llcp: Service Name Lookup netlink interface")
and 40213fa8513c ("NFC: llcp: Add cleanup support for unreplied SNL
requests") from the wireless-next tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc net/nfc/llcp/llcp.c
index b530afa,3361170..0000000
--- a/net/nfc/llcp/llcp.c
+++ b/net/nfc/llcp/llcp.c
@@@ -188,16 -156,9 +188,19 @@@ static void local_cleanup(struct nfc_ll
  	cancel_work_sync(&local->rx_work);
  	cancel_work_sync(&local->timeout_work);
  	kfree_skb(local->rx_pending);
 +}
 +
 +static void local_release(struct kref *ref)
 +{
 +	struct nfc_llcp_local *local;
 +
 +	local = container_of(ref, struct nfc_llcp_local, ref);
 +
 +	list_del(&local->list);
 +	local_cleanup(local, false);
+ 	del_timer_sync(&local->sdreq_timer);
+ 	cancel_work_sync(&local->sdreq_timeout_work);
+ 	nfc_llcp_free_sdp_tlv_list(&local->pending_sdreqs);
  	kfree(local);
  }
  

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2012-11-15  2:17 Stephen Rothwell
  2012-11-15  8:06 ` Arend van Spriel
  0 siblings, 1 reply; 54+ messages in thread
From: Stephen Rothwell @ 2012-11-15  2:17 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-next, linux-kernel, Hauke Mehrtens

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c between commit
d61f978b8f26 ("brcmfmac: fix typo in CONFIG_BRCMISCAN") from the  tree
and commit f07998959d57 ("brcmfmac: remove obsolete i-scan and clean up
related code") from the wireless-next tree.

I used the latter (which removed the line that was fixed in the former)
and can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2012-10-22  0:46 Stephen Rothwell
  0 siblings, 0 replies; 54+ messages in thread
From: Stephen Rothwell @ 2012-10-22  0:46 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-next, linux-kernel, Johannes Berg

[-- Attachment #1: Type: text/plain, Size: 3241 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
net/mac80211/mlme.c between commit 3a40414f826a ("mac80211: connect with
HT20 if HT40 is not permitted") from the wireless tree and commit
04ecd2578e71 ("mac80211: track needed RX chains for channel contexts")
from the wireless-next tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc net/mac80211/mlme.c
index 1b7eed2,469d864..0000000
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@@ -3104,44 -3181,43 +3183,51 @@@ static int ieee80211_prep_channel(struc
  		}
  	}
  
 -	if (ht_oper) {
 +	if (ht_oper && sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) {
+ 		const u8 *ht_cap_ie;
+ 		const struct ieee80211_ht_cap *ht_cap;
+ 		u8 chains = 1;
+ 
 -		channel_type = NL80211_CHAN_HT20;
 +		/*
 +		 * cfg80211 already verified that the channel itself can
 +		 * be used, but it didn't check that we can do the right
 +		 * HT type, so do that here as well. If HT40 isn't allowed
 +		 * on this channel, disable 40 MHz operation.
 +		 */
  
 -		if (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) {
 -			switch (ht_oper->ht_param &
 -					IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
 -			case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
 +		switch (ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
 +		case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
 +			if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40PLUS)
 +				ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ;
 +			else
  				channel_type = NL80211_CHAN_HT40PLUS;
 -				break;
 -			case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
 +			break;
 +		case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
 +			if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40MINUS)
 +				ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ;
 +			else
  				channel_type = NL80211_CHAN_HT40MINUS;
 -				break;
 -			}
 +			break;
  		}
- 	}
  
- 	if (!ieee80211_set_channel_type(local, sdata, channel_type)) {
- 		/* can only fail due to HT40+/- mismatch */
- 		channel_type = NL80211_CHAN_HT20;
- 		sdata_info(sdata,
- 			   "disabling 40 MHz due to multi-vif mismatch\n");
- 		ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ;
- 		WARN_ON(!ieee80211_set_channel_type(local, sdata,
- 						    channel_type));
+ 		ht_cap_ie = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
+ 					     cbss->information_elements,
+ 					     cbss->len_information_elements);
+ 		if (ht_cap_ie && ht_cap_ie[1] >= sizeof(*ht_cap)) {
+ 			ht_cap = (void *)(ht_cap_ie + 2);
+ 			chains = ieee80211_mcs_to_chains(&ht_cap->mcs);
+ 		}
+ 		sdata->needed_rx_chains = min(chains, local->rx_chains);
+ 	} else {
+ 		sdata->needed_rx_chains = 1;
  	}
  
- 	local->oper_channel = cbss->channel;
- 	ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
+ 	/* will change later if needed */
+ 	sdata->smps_mode = IEEE80211_SMPS_OFF;
  
- 	return 0;
+ 	ieee80211_vif_release_channel(sdata);
+ 	return ieee80211_vif_use_channel(sdata, cbss->channel, channel_type,
+ 					 IEEE80211_CHANCTX_SHARED);
  }
  
  static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2012-10-22  0:13 Stephen Rothwell
  0 siblings, 0 replies; 54+ messages in thread
From: Stephen Rothwell @ 2012-10-22  0:13 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-next, linux-kernel, Dan Carpenter, Franky Lin

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c between commit
3e4f319dacc6 ("brcmfmac: fix end of loop check (signedness bug)") from
the wireless tree and commit 81118d165811 ("brcmfmac: Using zero instead
of NULL") from the wireless-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 411dfe7,b27e245..0000000
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@@ -3972,8 -3972,8 +3972,8 @@@ brcmf_set_management_ie(struct brcmf_cf
  	u8  *iovar_ie_buf;
  	u8  *curr_ie_buf;
  	u8  *mgmt_ie_buf = NULL;
 -	u32 mgmt_ie_buf_len;
 +	int mgmt_ie_buf_len;
- 	u32 *mgmt_ie_len = 0;
+ 	u32 *mgmt_ie_len;
  	u32 del_add_ie_buf_len = 0;
  	u32 total_ie_buf_len = 0;
  	u32 parsed_ie_buf_len = 0;

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread
* linux-next: manual merge of the wireless-next tree with the wireless tree
@ 2011-11-14  0:53 Stephen Rothwell
  0 siblings, 0 replies; 54+ messages in thread
From: Stephen Rothwell @ 2011-11-14  0:53 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-next, linux-kernel, Steven Miao

[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
drivers/net/wireless/libertas/cfg.c between commit d929bbc63069
("wireless: libertas: fix unaligned le64 accesses") from the wireless
tree and commit 731f8e1c41a4 ("libertas: release bss references and avoid
warning from cfg80211_inform_bss") from the wireless-next tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/net/wireless/libertas/cfg.c
index a7f1ab2,89f34ad..0000000
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@@ -632,9 -633,9 +633,9 @@@ static int lbs_ret_scan(struct lbs_priv
  				     LBS_SCAN_RSSI_TO_MBM(rssi)/100);
  
  			if (channel &&
- 			    !(channel->flags & IEEE80211_CHAN_DISABLED))
- 				cfg80211_inform_bss(wiphy, channel,
+ 			    !(channel->flags & IEEE80211_CHAN_DISABLED)) {
+ 				bss = cfg80211_inform_bss(wiphy, channel,
 -					bssid, le64_to_cpu(*(__le64 *)tsfdesc),
 +					bssid, get_unaligned_le64(tsfdesc),
  					capa, intvl, ie, ielen,
  					LBS_SCAN_RSSI_TO_MBM(rssi),
  					GFP_KERNEL);

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2026-11-10 19:34 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 19:34 linux-next: manual merge of the wireless-next tree with the wireless tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2026-11-10 18:38 Mark Brown
2026-11-10 18:38 Mark Brown
2026-09-15 14:20 Mark Brown
2026-09-09 12:12 Mark Brown
2025-07-16  3:52 Stephen Rothwell
2025-07-16  8:59 ` Johannes Berg
2025-07-16 11:54   ` Stephen Rothwell
2025-07-16 17:18   ` Jeff Johnson
2024-10-28  1:36 Stephen Rothwell
2024-10-28  6:51 ` Johannes Berg
2024-10-31  2:20 ` Stephen Rothwell
2024-10-24  0:55 Stephen Rothwell
2024-10-24  6:58 ` Johannes Berg
2024-10-31  2:24 ` Stephen Rothwell
2024-06-03  1:01 Stephen Rothwell
2024-06-03 10:01 ` Kalle Valo
2024-06-06 10:09   ` Kalle Valo
2024-06-07  9:44     ` Alexis Lothoré
2024-06-07 10:29       ` Kalle Valo
2024-05-31  2:44 Stephen Rothwell
2024-04-22  0:56 Stephen Rothwell
2024-03-25 23:09 Stephen Rothwell
2024-03-26  7:58 ` Johannes Berg
2024-02-08 23:56 Stephen Rothwell
2024-02-09  7:03 ` Johannes Berg
2023-09-26  2:20 Stephen Rothwell
2023-09-26  2:02 Stephen Rothwell
2023-09-26  2:41 ` Stephen Rothwell
2023-09-26  6:21   ` Johannes Berg
2023-09-12  2:46 Stephen Rothwell
2023-03-30 23:49 Stephen Rothwell
2023-03-31  9:17 ` Johannes Berg
2023-04-03  2:23 ` Stephen Rothwell
2023-04-03  8:43   ` Kalle Valo
2014-11-25  3:36 Stephen Rothwell
2013-12-03  0:20 Stephen Rothwell
2013-12-03 15:52 ` John W. Linville
2013-12-03 16:09   ` Johannes Berg
2013-12-03 18:12     ` Bob Copeland
2013-12-04  1:21       ` Yeoh Chun-Yeow
2013-08-19  2:41 Stephen Rothwell
2013-08-12  1:53 Stephen Rothwell
2013-08-12 15:15 ` John W. Linville
2013-08-12 15:34   ` Berg, Johannes
2013-06-07  2:56 Stephen Rothwell
2013-06-07  6:21 ` Sujith Manoharan
2013-03-26  1:18 Stephen Rothwell
2013-03-12  1:00 Stephen Rothwell
2012-11-15  2:17 Stephen Rothwell
2012-11-15  8:06 ` Arend van Spriel
2012-10-22  0:46 Stephen Rothwell
2012-10-22  0:13 Stephen Rothwell
2011-11-14  0:53 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®