linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the mac80211-next tree with Linus' tree
@ 2016-10-02 23:02 Stephen Rothwell
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2016-10-02 23:02 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linux-next, linux-kernel, Toke Høiland-Jørgensen,
	Felix Fietkau

Hi Johannes,

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

  net/mac80211/sta_info.c

between commit:

  83843c80dcf1 ("mac80211: fix tim recalculation after PS response")

from Linus' tree and commit:

  bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue")

from the mac80211-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/sta_info.c
index 011880d633b4,167bff078bdd..000000000000
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@@ -1638,10 -1647,7 +1636,8 @@@ ieee80211_sta_ps_deliver_response(struc
  			return;
  
  		for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
- 			struct txq_info *txqi = to_txq_info(sta->sta.txq[tid]);
- 
 -			if (!(tids & BIT(tid)) || txq_has_queue(sta->sta.txq[tid]))
 +			if (!(driver_release_tids & BIT(tid)) ||
- 			    txqi->tin.backlog_packets)
++			    txq_has_queue(sta->sta.txq[tid]))
  				continue;
  
  			sta_info_recalc_tim(sta);

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

* linux-next: manual merge of the mac80211-next tree with Linus' tree
@ 2021-12-21  0:19 Stephen Rothwell
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2021-12-21  0:19 UTC (permalink / raw)
  To: Johannes Berg, Wireless
  Cc: Ilan Peer, Johannes Berg, Linux Kernel Mailing List,
	Linux Next Mailing List, Luca Coelho, Sriram R

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

Hi all,

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

  net/wireless/reg.c

between commit:

  e08ebd6d7b90 ("cfg80211: Acquire wiphy mutex on regulatory work")

from Linus' tree and commit:

  701fdfe348f7 ("cfg80211: Enable regulatory enforcement checks for drivers supporting mesh iface")

from the mac80211-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/wireless/reg.c
index f8f01a3e020b,58e4b33aff04..000000000000
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@@ -2409,11 -2388,8 +2410,12 @@@ static bool reg_wdev_chan_valid(struct 
  	case NL80211_IFTYPE_AP:
  	case NL80211_IFTYPE_P2P_GO:
  	case NL80211_IFTYPE_ADHOC:
+ 	case NL80211_IFTYPE_MESH_POINT:
 -		return cfg80211_reg_can_beacon_relax(wiphy, &chandef, iftype);
 +		wiphy_lock(wiphy);
 +		ret = cfg80211_reg_can_beacon_relax(wiphy, &chandef, iftype);
 +		wiphy_unlock(wiphy);
 +
 +		return ret;
  	case NL80211_IFTYPE_STATION:
  	case NL80211_IFTYPE_P2P_CLIENT:
  		return cfg80211_chandef_usable(wiphy, &chandef,

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

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

* Re: linux-next: manual merge of the mac80211-next tree with Linus' tree
  2018-06-18  1:29 Stephen Rothwell
@ 2018-06-18  7:07 ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2018-06-18  7:07 UTC (permalink / raw)
  To: Stephen Rothwell, Wireless
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Kees Cook

On Mon, 2018-06-18 at 11:29 +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the mac80211-next tree got a conflict in:
> 
>   net/mac80211/scan.c
> 
> between commit:
> 
>   6396bb221514 ("treewide: kzalloc() -> kcalloc()")
> 
> from Linus' tree and commit:
> 
>   b9771d41aee7 ("mac80211: support scan features for improved scan privacy")
> 
> from the mac80211-next tree.

Thanks Stephen!

I guess there isn't all that much I can do, unless davem pulls Linus's
tree in and then I can pull his and resolve it. We'll see.

johannes

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

* linux-next: manual merge of the mac80211-next tree with Linus' tree
@ 2018-06-18  1:29 Stephen Rothwell
  2018-06-18  7:07 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2018-06-18  1:29 UTC (permalink / raw)
  To: Johannes Berg, Wireless
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Kees Cook

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

Hi all,

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

  net/mac80211/scan.c

between commit:

  6396bb221514 ("treewide: kzalloc() -> kcalloc()")

from Linus' tree and commit:

  b9771d41aee7 ("mac80211: support scan features for improved scan privacy")

from the mac80211-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/scan.c
index 2e917a6d239d,ae77d1c12856..000000000000
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@@ -1157,7 -1197,10 +1197,10 @@@ int __ieee80211_request_sched_scan_star
  		}
  	}
  
+ 	if (req->flags & NL80211_SCAN_FLAG_MIN_PREQ_CONTENT)
+ 		flags |= IEEE80211_PROBE_FLAG_MIN_CONTENT;
+ 
 -	ie = kzalloc(num_bands * iebufsz, GFP_KERNEL);
 +	ie = kcalloc(iebufsz, num_bands, GFP_KERNEL);
  	if (!ie) {
  		ret = -ENOMEM;
  		goto out;

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

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

* linux-next: manual merge of the mac80211-next tree with Linus' tree
@ 2016-10-02 23:21 Stephen Rothwell
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2016-10-02 23:21 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-next, linux-kernel, Felix Fietkau

Hi Johannes,

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

  net/mac80211/tx.c

between commits:

  df6ef5d8a87a ("mac80211: fix sequence number assignment for PS response frames")
  0b97a484e52c ("mac80211: check skb_linearize() return value")

from Linus' tree and commits:

  e0e2effff5e1 ("mac80211: Move ieee802111_tx_dequeue() to later in tx.c")
  bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue")

from the mac80211-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/tx.c
index 1ff08be90a98,0ea1b0d02186..000000000000
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@@ -3156,8 -3193,71 +3195,73 @@@ out
  	return ret;
  }
  
+ /*
+  * Can be called while the sta lock is held. Anything that can cause packets to
+  * be generated will cause deadlock!
+  */
+ static void ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sdata,
+ 				       struct sta_info *sta, u8 pn_offs,
+ 				       struct ieee80211_key *key,
+ 				       struct sk_buff *skb)
+ {
+ 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
+ 	struct ieee80211_hdr *hdr = (void *)skb->data;
++	struct ieee80211_local *local = sdata->local;
+ 	u8 tid = IEEE80211_NUM_TIDS;
+ 
+ 	if (key)
+ 		info->control.hw_key = &key->conf;
+ 
+ 	ieee80211_tx_stats(skb->dev, skb->len);
+ 
+ 	if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) {
+ 		tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
+ 		*ieee80211_get_qos_ctl(hdr) = tid;
 -		hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid);
++		if (!ieee80211_get_txq(local, &sdata->vif, &sta->sta, skb))
++			hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid);
+ 	} else {
+ 		info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ;
+ 		hdr->seq_ctrl = cpu_to_le16(sdata->sequence_number);
+ 		sdata->sequence_number += 0x10;
+ 	}
+ 
+ 	if (skb_shinfo(skb)->gso_size)
+ 		sta->tx_stats.msdu[tid] +=
+ 			DIV_ROUND_UP(skb->len, skb_shinfo(skb)->gso_size);
+ 	else
+ 		sta->tx_stats.msdu[tid]++;
+ 
+ 	info->hw_queue = sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
+ 
+ 	/* statistics normally done by ieee80211_tx_h_stats (but that
+ 	 * has to consider fragmentation, so is more complex)
+ 	 */
+ 	sta->tx_stats.bytes[skb_get_queue_mapping(skb)] += skb->len;
+ 	sta->tx_stats.packets[skb_get_queue_mapping(skb)]++;
+ 
+ 	if (pn_offs) {
+ 		u64 pn;
+ 		u8 *crypto_hdr = skb->data + pn_offs;
+ 
+ 		switch (key->conf.cipher) {
+ 		case WLAN_CIPHER_SUITE_CCMP:
+ 		case WLAN_CIPHER_SUITE_CCMP_256:
+ 		case WLAN_CIPHER_SUITE_GCMP:
+ 		case WLAN_CIPHER_SUITE_GCMP_256:
+ 			pn = atomic64_inc_return(&key->conf.tx_pn);
+ 			crypto_hdr[0] = pn;
+ 			crypto_hdr[1] = pn >> 8;
+ 			crypto_hdr[4] = pn >> 16;
+ 			crypto_hdr[5] = pn >> 24;
+ 			crypto_hdr[6] = pn >> 32;
+ 			crypto_hdr[7] = pn >> 40;
+ 			break;
+ 		}
+ 	}
+ }
+ 
  static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
- 				struct net_device *dev, struct sta_info *sta,
+ 				struct sta_info *sta,
  				struct ieee80211_fast_tx *fast_tx,
  				struct sk_buff *skb)
  {
@@@ -3316,6 -3374,90 +3378,94 @@@
  	return true;
  }
  
+ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
+ 				     struct ieee80211_txq *txq)
+ {
+ 	struct ieee80211_local *local = hw_to_local(hw);
+ 	struct txq_info *txqi = container_of(txq, struct txq_info, txq);
+ 	struct ieee80211_hdr *hdr;
+ 	struct sk_buff *skb = NULL;
+ 	struct fq *fq = &local->fq;
+ 	struct fq_tin *tin = &txqi->tin;
+ 	struct ieee80211_tx_info *info;
+ 	struct ieee80211_tx_data tx;
+ 	ieee80211_tx_result r;
+ 
+ 	spin_lock_bh(&fq->lock);
+ 
+ 	if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags))
+ 		goto out;
+ 
+ 	/* Make sure fragments stay together. */
+ 	skb = __skb_dequeue(&txqi->frags);
+ 	if (skb)
+ 		goto out;
+ 
+ begin:
+ 	skb = fq_tin_dequeue(fq, tin, fq_tin_dequeue_func);
+ 	if (!skb)
+ 		goto out;
+ 
+ 	ieee80211_set_skb_vif(skb, txqi);
+ 
+ 	hdr = (struct ieee80211_hdr *)skb->data;
+ 	info = IEEE80211_SKB_CB(skb);
+ 
+ 	memset(&tx, 0, sizeof(tx));
+ 	__skb_queue_head_init(&tx.skbs);
+ 	tx.local = local;
+ 	tx.skb = skb;
+ 	tx.sdata = vif_to_sdata(info->control.vif);
+ 
+ 	if (txq->sta)
+ 		tx.sta = container_of(txq->sta, struct sta_info, sta);
+ 
+ 	/*
+ 	 * The key can be removed while the packet was queued, so need to call
+ 	 * this here to get the current key.
+ 	 */
+ 	r = ieee80211_tx_h_select_key(&tx);
+ 	if (r != TX_CONTINUE) {
+ 		ieee80211_free_txskb(&local->hw, skb);
+ 		goto begin;
+ 	}
+ 
+ 	if (info->control.flags & IEEE80211_TX_CTRL_FAST_XMIT) {
+ 		struct sta_info *sta = container_of(txq->sta, struct sta_info,
+ 						    sta);
+ 		u8 pn_offs = 0;
+ 
+ 		if (tx.key &&
+ 		    (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV))
+ 			pn_offs = ieee80211_hdrlen(hdr->frame_control);
+ 
+ 		ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs,
+ 					   tx.key, skb);
+ 	} else {
+ 		if (invoke_tx_handlers_late(&tx))
+ 			goto begin;
+ 
+ 		skb = __skb_dequeue(&tx.skbs);
+ 
+ 		if (!skb_queue_empty(&tx.skbs))
+ 			skb_queue_splice_tail(&tx.skbs, &txqi->frags);
+ 	}
+ 
+ out:
+ 	spin_unlock_bh(&fq->lock);
+ 
+ 	if (skb && skb_has_frag_list(skb) &&
 -	    !ieee80211_hw_check(&local->hw, TX_FRAG_LIST))
 -		skb_linearize(skb);
++	    !ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) {
++		if (skb_linearize(skb)) {
++			ieee80211_free_txskb(&local->hw, skb);
++			return NULL;
++		}
++	}
+ 
+ 	return skb;
+ }
+ EXPORT_SYMBOL(ieee80211_tx_dequeue);
+ 
  void __ieee80211_subif_start_xmit(struct sk_buff *skb,
  				  struct net_device *dev,
  				  u32 info_flags)

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

end of thread, other threads:[~2021-12-21  0:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-02 23:02 linux-next: manual merge of the mac80211-next tree with Linus' tree Stephen Rothwell
2016-10-02 23:21 Stephen Rothwell
2018-06-18  1:29 Stephen Rothwell
2018-06-18  7:07 ` Johannes Berg
2021-12-21  0:19 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).