All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] iwlwifi: updates intended for v4.14 2017-08-25
@ 2017-08-25  8:27 Luca Coelho
  2017-08-25  8:27 ` [PATCH 1/2] iwlwifi: fix long debug print Luca Coelho
  2017-08-25  8:27 ` [PATCH 2/2] iwlwifi: mvm: Avoid deffering non bufferable frames Luca Coelho
  0 siblings, 2 replies; 10+ messages in thread
From: Luca Coelho @ 2017-08-25  8:27 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Luca Coelho

From: Luca Coelho <luciano.coelho@intel.com>

Hi,

A very tiny set of patches for v4.14. :) Nothing is backlogged in our
internal tree anymore and this has been a very slow week due to
vacations in our team.

These are the changes:

* Fix a queue hang problem due to 11w behavior
* Fix a warning caused by a too long debug print

As usual, I'm pushing this to a pending branch, for kbuild bot, and
will send a pull-request later.

Please review.

Cheers,
Luca.


David Spinadel (1):
  iwlwifi: mvm: Avoid deffering non bufferable frames

Liad Kaufman (1):
  iwlwifi: fix long debug print

 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 9 +++++++--
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  | 9 +++++----
 2 files changed, 12 insertions(+), 6 deletions(-)

-- 
2.14.1

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

* [PATCH 1/2] iwlwifi: fix long debug print
  2017-08-25  8:27 [PATCH 0/2] iwlwifi: updates intended for v4.14 2017-08-25 Luca Coelho
@ 2017-08-25  8:27 ` Luca Coelho
  2017-08-31 21:57   ` Joe Perches
  2017-08-25  8:27 ` [PATCH 2/2] iwlwifi: mvm: Avoid deffering non bufferable frames Luca Coelho
  1 sibling, 1 reply; 10+ messages in thread
From: Luca Coelho @ 2017-08-25  8:27 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Liad Kaufman, Luca Coelho

From: Liad Kaufman <liad.kaufman@intel.com>

There is a debug print that sometimes reaches over
110 chars, thus generating a warning in those cases.
Split the print into two to prevent these cases.

Fixes: 92b0f7b26b31 ("iwlwifi: split the regulatory rules when the bandwidth flags require it")
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index b46796944cf2..3014beef4873 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -915,7 +915,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
 		prev_reg_rule_flags = reg_rule_flags;
 
 		IWL_DEBUG_DEV(dev, IWL_DL_LAR,
-			      "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s%s%s%s(0x%02x) reg_flags 0x%x: %s\n",
+			      "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s%s%s%s(0x%02x)\n",
 			      center_freq,
 			      band == NL80211_BAND_5GHZ ? "5.2" : "2.4",
 			      CHECK_AND_PRINT_I(VALID),
@@ -930,7 +930,12 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
 			      CHECK_AND_PRINT_I(80MHZ),
 			      CHECK_AND_PRINT_I(160MHZ),
 			      CHECK_AND_PRINT_I(DC_HIGH),
-			      ch_flags, reg_rule_flags,
+			      ch_flags);
+		IWL_DEBUG_DEV(dev, IWL_DL_LAR,
+			      "Ch. %d [%sGHz] reg_flags 0x%x: %s\n",
+			      center_freq,
+			      band == NL80211_BAND_5GHZ ? "5.2" : "2.4",
+			      reg_rule_flags,
 			      ((ch_flags & NVM_CHANNEL_ACTIVE) &&
 			       !(ch_flags & NVM_CHANNEL_RADAR))
 					 ? "Ad-Hoc" : "");
-- 
2.14.1

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

* [PATCH 2/2] iwlwifi: mvm: Avoid deffering non bufferable frames
  2017-08-25  8:27 [PATCH 0/2] iwlwifi: updates intended for v4.14 2017-08-25 Luca Coelho
  2017-08-25  8:27 ` [PATCH 1/2] iwlwifi: fix long debug print Luca Coelho
@ 2017-08-25  8:27 ` Luca Coelho
  2017-08-29  8:22   ` Kalle Valo
  1 sibling, 1 reply; 10+ messages in thread
From: Luca Coelho @ 2017-08-25  8:27 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, David Spinadel, Luca Coelho

From: David Spinadel <david.spinadel@intel.com>

Use bcast station for all non bufferable frames on AP and AD-HOC.

The host is no longer aware of STAs PS status because of buffer
station offload, so we can't rely on mac80211 to toggle on
IEEE80211_TX_CTL_NO_PS_BUFFER bit.

A possible issue with buffering such frames, beside the obvious spec
violation, is when a station disconnects while in PS but the AP isn't
aware of that. In such scenarios the AP won't be able to send probe
responses or auth frames so the STA won't be able to reconnect and
the AP will have a queue hang.

Fixes: 3e56eadfb6a1 ("iwlwifi: mvm: implement AP/GO uAPSD support")
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index d7feb1ab4dc9..15f2d826bb4b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -810,10 +810,11 @@ static void iwl_mvm_mac_tx(struct ieee80211_hw *hw,
 	    !test_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status))
 		goto drop;
 
-	/* treat non-bufferable MMPDUs as broadcast if sta is sleeping */
-	if (unlikely(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER &&
-		     ieee80211_is_mgmt(hdr->frame_control) &&
-		     !ieee80211_is_bufferable_mmpdu(hdr->frame_control)))
+	/* treat non-bufferable MMPDUs on AP interfaces as broadcast */
+	if ((info->control.vif->type == NL80211_IFTYPE_AP ||
+	     info->control.vif->type == NL80211_IFTYPE_ADHOC) &&
+	    ieee80211_is_mgmt(hdr->frame_control) &&
+	    !ieee80211_is_bufferable_mmpdu(hdr->frame_control))
 		sta = NULL;
 
 	if (sta) {
-- 
2.14.1

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

* Re: [PATCH 2/2] iwlwifi: mvm: Avoid deffering non bufferable frames
  2017-08-25  8:27 ` [PATCH 2/2] iwlwifi: mvm: Avoid deffering non bufferable frames Luca Coelho
@ 2017-08-29  8:22   ` Kalle Valo
  2017-08-30  7:32     ` Luca Coelho
  0 siblings, 1 reply; 10+ messages in thread
From: Kalle Valo @ 2017-08-29  8:22 UTC (permalink / raw)
  To: Luca Coelho; +Cc: linux-wireless, David Spinadel, Luca Coelho

Luca Coelho <luca@coelho.fi> writes:

> From: David Spinadel <david.spinadel@intel.com>
>
> Use bcast station for all non bufferable frames on AP and AD-HOC.
>
> The host is no longer aware of STAs PS status because of buffer
> station offload, so we can't rely on mac80211 to toggle on
> IEEE80211_TX_CTL_NO_PS_BUFFER bit.
>
> A possible issue with buffering such frames, beside the obvious spec
> violation, is when a station disconnects while in PS but the AP isn't
> aware of that. In such scenarios the AP won't be able to send probe
> responses or auth frames so the STA won't be able to reconnect and
> the AP will have a queue hang.
>
> Fixes: 3e56eadfb6a1 ("iwlwifi: mvm: implement AP/GO uAPSD support")
> Signed-off-by: David Spinadel <david.spinadel@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

"deffering"? Should it be deferring?

-- 
Kalle Valo

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

* Re: [PATCH 2/2] iwlwifi: mvm: Avoid deffering non bufferable frames
  2017-08-29  8:22   ` Kalle Valo
@ 2017-08-30  7:32     ` Luca Coelho
  0 siblings, 0 replies; 10+ messages in thread
From: Luca Coelho @ 2017-08-30  7:32 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, David Spinadel

On Tue, 2017-08-29 at 11:22 +0300, Kalle Valo wrote:
> Luca Coelho <luca@coelho.fi> writes:
> 
> > From: David Spinadel <david.spinadel@intel.com>
> > 
> > Use bcast station for all non bufferable frames on AP and AD-HOC.
> > 
> > The host is no longer aware of STAs PS status because of buffer
> > station offload, so we can't rely on mac80211 to toggle on
> > IEEE80211_TX_CTL_NO_PS_BUFFER bit.
> > 
> > A possible issue with buffering such frames, beside the obvious spec
> > violation, is when a station disconnects while in PS but the AP isn't
> > aware of that. In such scenarios the AP won't be able to send probe
> > responses or auth frames so the STA won't be able to reconnect and
> > the AP will have a queue hang.
> > 
> > Fixes: 3e56eadfb6a1 ("iwlwifi: mvm: implement AP/GO uAPSD support")
> > Signed-off-by: David Spinadel <david.spinadel@intel.com>
> > Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> 
> "deffering"? Should it be deferring?

Yeah, sorry, I'll fix it before sending the pull-req.

--
Cheers,
Luca.

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

* Re: [PATCH 1/2] iwlwifi: fix long debug print
  2017-08-25  8:27 ` [PATCH 1/2] iwlwifi: fix long debug print Luca Coelho
@ 2017-08-31 21:57   ` Joe Perches
  2017-09-01  5:37     ` Luca Coelho
  0 siblings, 1 reply; 10+ messages in thread
From: Joe Perches @ 2017-08-31 21:57 UTC (permalink / raw)
  To: Luca Coelho, kvalo; +Cc: linux-wireless, Liad Kaufman, Luca Coelho

On Fri, 2017-08-25 at 11:27 +0300, Luca Coelho wrote:
> From: Liad Kaufman <liad.kaufman@intel.com>
> 
> There is a debug print that sometimes reaches over
> 110 chars, thus generating a warning in those cases.

What emits a warning here?

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

* Re: [PATCH 1/2] iwlwifi: fix long debug print
  2017-08-31 21:57   ` Joe Perches
@ 2017-09-01  5:37     ` Luca Coelho
  2017-09-01  6:15       ` Joe Perches
  0 siblings, 1 reply; 10+ messages in thread
From: Luca Coelho @ 2017-09-01  5:37 UTC (permalink / raw)
  To: Joe Perches, kvalo; +Cc: linux-wireless, Liad Kaufman

On Thu, 2017-08-31 at 14:57 -0700, Joe Perches wrote:
> On Fri, 2017-08-25 at 11:27 +0300, Luca Coelho wrote:
> > From: Liad Kaufman <liad.kaufman@intel.com>
> > 
> > There is a debug print that sometimes reaches over
> > 110 chars, thus generating a warning in those cases.
> 
> What emits a warning here?

We have a WARN_ON in iwl-devtrace-msg.h:

#define MAX_MSG_LEN	110

DECLARE_EVENT_CLASS(iwlwifi_msg_event,
	TP_PROTO(struct va_format *vaf),
	TP_ARGS(vaf),
	TP_STRUCT__entry(
		__dynamic_array(char, msg, MAX_MSG_LEN)
	),
	TP_fast_assign(
		WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
				       MAX_MSG_LEN, vaf->fmt,
				       *vaf->va) >= MAX_MSG_LEN);
	),
	TP_printk("%s", __get_str(msg))
);

We limit all our tracing messages to 110 bytes.  Anything longer than
that starts getting annoying to read.  In mac80211 we limit it even
further, to 100 bytes, so this is not unique to the iwlwifi driver.

--
Cheers,
Luca.

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

* Re: [PATCH 1/2] iwlwifi: fix long debug print
  2017-09-01  5:37     ` Luca Coelho
@ 2017-09-01  6:15       ` Joe Perches
  2017-09-01  8:15         ` Kalle Valo
  0 siblings, 1 reply; 10+ messages in thread
From: Joe Perches @ 2017-09-01  6:15 UTC (permalink / raw)
  To: Luca Coelho, kvalo; +Cc: linux-wireless, Liad Kaufman

On Fri, 2017-09-01 at 08:37 +0300, Luca Coelho wrote:
> On Thu, 2017-08-31 at 14:57 -0700, Joe Perches wrote:
> > On Fri, 2017-08-25 at 11:27 +0300, Luca Coelho wrote:
> > > From: Liad Kaufman <liad.kaufman@intel.com>
> > > 
> > > There is a debug print that sometimes reaches over
> > > 110 chars, thus generating a warning in those cases.
> > 
> > What emits a warning here?
> 
> We have a WARN_ON in iwl-devtrace-msg.h:
> 
> #define MAX_MSG_LEN	110

OK, thanks for the hint.

The commit message is a bit obscure.

It might make sense to add a comment to describe these
trace events coming from TRACE_EVENT(iwlwifi_dbg,

All the IWL_DEBUG_<foo> use this trace message maximum.

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

* Re: [PATCH 1/2] iwlwifi: fix long debug print
  2017-09-01  6:15       ` Joe Perches
@ 2017-09-01  8:15         ` Kalle Valo
  2017-09-01  8:21           ` Joe Perches
  0 siblings, 1 reply; 10+ messages in thread
From: Kalle Valo @ 2017-09-01  8:15 UTC (permalink / raw)
  To: Joe Perches; +Cc: Luca Coelho, linux-wireless, Liad Kaufman

Joe Perches <joe@perches.com> writes:

> On Fri, 2017-09-01 at 08:37 +0300, Luca Coelho wrote:
>> On Thu, 2017-08-31 at 14:57 -0700, Joe Perches wrote:
>> > On Fri, 2017-08-25 at 11:27 +0300, Luca Coelho wrote:
>> > > From: Liad Kaufman <liad.kaufman@intel.com>
>> > > 
>> > > There is a debug print that sometimes reaches over
>> > > 110 chars, thus generating a warning in those cases.
>> > 
>> > What emits a warning here?
>> 
>> We have a WARN_ON in iwl-devtrace-msg.h:
>> 
>> #define MAX_MSG_LEN	110
>
> OK, thanks for the hint.
>
> The commit message is a bit obscure.
>
> It might make sense to add a comment to describe these
> trace events coming from TRACE_EVENT(iwlwifi_dbg,
>
> All the IWL_DEBUG_<foo> use this trace message maximum.

Unfortunately the patch is already commited to wireless-drivers-next so
we can't change the commit log anymore.

-- 
Kalle Valo

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

* Re: [PATCH 1/2] iwlwifi: fix long debug print
  2017-09-01  8:15         ` Kalle Valo
@ 2017-09-01  8:21           ` Joe Perches
  0 siblings, 0 replies; 10+ messages in thread
From: Joe Perches @ 2017-09-01  8:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Luca Coelho, linux-wireless, Liad Kaufman

On Fri, 2017-09-01 at 11:15 +0300, Kalle Valo wrote:
> Joe Perches <joe@perches.com> writes:
> > On Fri, 2017-09-01 at 08:37 +0300, Luca Coelho wrote:
> > > On Thu, 2017-08-31 at 14:57 -0700, Joe Perches wrote:
> > > > On Fri, 2017-08-25 at 11:27 +0300, Luca Coelho wrote:
> > > > > From: Liad Kaufman <liad.kaufman@intel.com>
> > > > > There is a debug print that sometimes reaches over
> > > > > 110 chars, thus generating a warning in those cases.
[]
> > It might make sense to add a comment to describe these
> > trace events coming from TRACE_EVENT(iwlwifi_dbg,
> > 
> > All the IWL_DEBUG_<foo> use this trace message maximum.
> 
> Unfortunately the patch is already commited to wireless-drivers-next so
> we can't change the commit log anymore.

No worries about the commit.
It'd be useful to add a comment to the code.

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

end of thread, other threads:[~2017-09-01  8:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25  8:27 [PATCH 0/2] iwlwifi: updates intended for v4.14 2017-08-25 Luca Coelho
2017-08-25  8:27 ` [PATCH 1/2] iwlwifi: fix long debug print Luca Coelho
2017-08-31 21:57   ` Joe Perches
2017-09-01  5:37     ` Luca Coelho
2017-09-01  6:15       ` Joe Perches
2017-09-01  8:15         ` Kalle Valo
2017-09-01  8:21           ` Joe Perches
2017-08-25  8:27 ` [PATCH 2/2] iwlwifi: mvm: Avoid deffering non bufferable frames Luca Coelho
2017-08-29  8:22   ` Kalle Valo
2017-08-30  7:32     ` Luca Coelho

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.