All of lore.kernel.org
 help / color / mirror / Atom feed
* request for 4.14-stable: c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs")
@ 2018-12-16 19:57 Sudip Mukherjee
  2018-12-18 21:01 ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2018-12-16 19:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: stable, Johannes Berg, Emmanuel Grumbach, Luca Coelho, Ilan Peer

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

Hi Greg,

This was not marked for stable but seems it should be in stable. And the
second patch fixes the first one.

Please apply to your queue of 4.14-stable.

--
Regards
Sudip

[-- Attachment #2: 0001-mac80211-don-t-WARN-on-bad-WMM-parameters-from-buggy.patch --]
[-- Type: text/x-diff, Size: 1628 bytes --]

>From 3f7f162bae9353580e026398f0d93354752e024c Mon Sep 17 00:00:00 2001
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date: Mon, 26 Mar 2018 16:21:04 +0300
Subject: [PATCH 1/2] mac80211: don't WARN on bad WMM parameters from buggy APs

commit c470bdc1aaf36669e04ba65faf1092b2d1c6cabe upstream

Apparently, some APs are buggy enough to send a zeroed
WMM IE. Don't WARN on this since this is not caused by a bug
on the client's system.

This aligns the condition of the WARNING in drv_conf_tx
with the validity check in ieee80211_sta_wmm_params.
We will now pick the default values whenever we get
a zeroed WMM IE.

This has been reported here:
https://bugzilla.kernel.org/show_bug.cgi?id=199161

Fixes: f409079bb678 ("mac80211: sanity check CW_min/CW_max towards driver")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
 net/mac80211/mlme.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 328ac10084e4..75909a744121 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1861,7 +1861,8 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local,
 		params[ac].acm = acm;
 		params[ac].uapsd = uapsd;
 
-		if (params[ac].cw_min > params[ac].cw_max) {
+		if (params->cw_min == 0 ||
+		    params[ac].cw_min > params[ac].cw_max) {
 			sdata_info(sdata,
 				   "AP has invalid WMM params (CWmin/max=%d/%d for ACI %d), using defaults\n",
 				   params[ac].cw_min, params[ac].cw_max, aci);
-- 
2.11.0


[-- Attachment #3: 0002-mac80211-Fix-condition-validating-WMM-IE.patch --]
[-- Type: text/x-diff, Size: 1479 bytes --]

>From 19ef91476432a4d6e2e9f6732c46906229accd44 Mon Sep 17 00:00:00 2001
From: Ilan Peer <ilan.peer@intel.com>
Date: Tue, 3 Apr 2018 11:35:22 +0300
Subject: [PATCH 2/2] mac80211: Fix condition validating WMM IE

commit 911a26484c33e10de6237228ca1d7293548e9f49 upstream

Commit c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from
buggy APs") handled cases where an AP reports a zeroed WMM
IE. However, the condition that checks the validity accessed the wrong
index in the ieee80211_tx_queue_params array, thus wrongly deducing
that the parameters are invalid. Fix it.

Fixes: c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs")
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
 net/mac80211/mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 75909a744121..4c59b5507e7a 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1861,7 +1861,7 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local,
 		params[ac].acm = acm;
 		params[ac].uapsd = uapsd;
 
-		if (params->cw_min == 0 ||
+		if (params[ac].cw_min == 0 ||
 		    params[ac].cw_min > params[ac].cw_max) {
 			sdata_info(sdata,
 				   "AP has invalid WMM params (CWmin/max=%d/%d for ACI %d), using defaults\n",
-- 
2.11.0


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

* Re: request for 4.14-stable: c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs")
  2018-12-16 19:57 request for 4.14-stable: c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs") Sudip Mukherjee
@ 2018-12-18 21:01 ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2018-12-18 21:01 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: Greg Kroah-Hartman, stable, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Ilan Peer

On Sun, Dec 16, 2018 at 07:57:47PM +0000, Sudip Mukherjee wrote:
>Hi Greg,
>
>This was not marked for stable but seems it should be in stable. And the
>second patch fixes the first one.
>
>Please apply to your queue of 4.14-stable.

Note I also picked up 911a26484c3 ("mac80211: Fix condition validating
WMM IE") which is a fix to this patch.

--
Thanks,
Sasha

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

end of thread, other threads:[~2018-12-18 21:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-16 19:57 request for 4.14-stable: c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs") Sudip Mukherjee
2018-12-18 21:01 ` Sasha Levin

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.