All of lore.kernel.org
 help / color / mirror / Atom feed
* pull-request: iwlwifi 2016-09-15
@ 2016-09-15 16:10 Luca Coelho
  2016-09-15 16:13 ` [PATCH] iwlwifi: mvm: update TX queue before making a copy of the skb Luca Coelho
  2016-09-17 14:08 ` pull-request: iwlwifi 2016-09-15 Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Luca Coelho @ 2016-09-15 16:10 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, linuxwifi

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

Hi Kalle,

Here is one more patch intended for 4.8.  It's small and low risk, just
moving some lines of code around, to prevent a firmware crash in
certain situations.

Let me know if everything's fine (or not). :)

Luca.


The following changes since commit a904a08b5fee5317ff0f7b8212aa5d0776795a52:

  iwlwifi: mvm: Advertise support for AP channel width change (2016-08-29 22:29:06 +0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git tags/iwlwifi-for-kalle-2016-09-15

for you to fetch changes up to 54c5ef2e93ea002dc5dd63349298b2778fe59edb:

  iwlwifi: mvm: update TX queue before making a copy of the skb (2016-09-15 18:35:20 +0300)

----------------------------------------------------------------
* fix to prevent firmware crash when sending off-channel frames

----------------------------------------------------------------
Beni Lev (1):
      iwlwifi: mvm: update TX queue before making a copy of the skb

 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH] iwlwifi: mvm: update TX queue before making a copy of the skb
  2016-09-15 16:10 pull-request: iwlwifi 2016-09-15 Luca Coelho
@ 2016-09-15 16:13 ` Luca Coelho
  2016-09-17 14:08 ` pull-request: iwlwifi 2016-09-15 Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Luca Coelho @ 2016-09-15 16:13 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

From: Beni Lev <beni.lev@intel.com>

Off-channel action frames (such as ANQP frames) must be sent either on
the AUX queue or on the offchannel queue, otherwise the firmware will
cause a SYSASSERT.

In the current implementation, the queue to be used is correctly set in
the original skb, but this is done after it is copied.  Thus the copy
remains with the original, incorrect queue.

Fix this by setting the queue in the original skb before copying it.

Fixes: commit 5c08b0f5026f ("iwlwifi: mvm: don't override the rate with the AMSDU len")
Cc: stable@vger.kernel.org # v4.6+
Signed-off-by: Beni Lev <beni.lev@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index c6585ab..b3a87a3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -513,6 +513,15 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
 	int hdrlen = ieee80211_hdrlen(hdr->frame_control);
 	int queue;
 
+	/* IWL_MVM_OFFCHANNEL_QUEUE is used for ROC packets that can be used
+	 * in 2 different types of vifs, P2P & STATION. P2P uses the offchannel
+	 * queue. STATION (HS2.0) uses the auxiliary context of the FW,
+	 * and hence needs to be sent on the aux queue
+	 */
+	if (IEEE80211_SKB_CB(skb)->hw_queue == IWL_MVM_OFFCHANNEL_QUEUE &&
+	    skb_info->control.vif->type == NL80211_IFTYPE_STATION)
+		IEEE80211_SKB_CB(skb)->hw_queue = mvm->aux_queue;
+
 	memcpy(&info, skb->cb, sizeof(info));
 
 	if (WARN_ON_ONCE(info.flags & IEEE80211_TX_CTL_AMPDU))
@@ -526,16 +535,6 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
 	/* This holds the amsdu headers length */
 	skb_info->driver_data[0] = (void *)(uintptr_t)0;
 
-	/*
-	 * IWL_MVM_OFFCHANNEL_QUEUE is used for ROC packets that can be used
-	 * in 2 different types of vifs, P2P & STATION. P2P uses the offchannel
-	 * queue. STATION (HS2.0) uses the auxiliary context of the FW,
-	 * and hence needs to be sent on the aux queue
-	 */
-	if (IEEE80211_SKB_CB(skb)->hw_queue == IWL_MVM_OFFCHANNEL_QUEUE &&
-	    info.control.vif->type == NL80211_IFTYPE_STATION)
-		IEEE80211_SKB_CB(skb)->hw_queue = mvm->aux_queue;
-
 	queue = info.hw_queue;
 
 	/*
-- 
2.9.3

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

* Re: pull-request: iwlwifi 2016-09-15
  2016-09-15 16:10 pull-request: iwlwifi 2016-09-15 Luca Coelho
  2016-09-15 16:13 ` [PATCH] iwlwifi: mvm: update TX queue before making a copy of the skb Luca Coelho
@ 2016-09-17 14:08 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-09-17 14:08 UTC (permalink / raw)
  To: Luca Coelho; +Cc: linux-wireless, linuxwifi

Luca Coelho <luca@coelho.fi> writes:

> Hi Kalle,
>
> Here is one more patch intended for 4.8. =C2=A0It's small and low risk, j=
ust
> moving some lines of code around, to prevent a firmware crash in
> certain situations.
>
> Let me know if everything's fine (or not). :)
>
> Luca.
>
>
> The following changes since commit a904a08b5fee5317ff0f7b8212aa5d0776795a=
52:
>
> =C2=A0 iwlwifi: mvm: Advertise support for AP channel width change (2016-=
08-29 22:29:06 +0300)
>
> are available in the git repository at:
>
> =C2=A0 git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixe=
s.git tags/iwlwifi-for-kalle-2016-09-15

Pulled, thanks.

--=20
Kalle Valo

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

end of thread, other threads:[~2016-09-17 14:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15 16:10 pull-request: iwlwifi 2016-09-15 Luca Coelho
2016-09-15 16:13 ` [PATCH] iwlwifi: mvm: update TX queue before making a copy of the skb Luca Coelho
2016-09-17 14:08 ` pull-request: iwlwifi 2016-09-15 Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.