linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] A few cleanups and a fix for mwifiex
@ 2021-10-16 10:17 Jonas Dreßler
  2021-10-16 10:17 ` [PATCH 1/4] mwifiex: Don't log error on suspend if wake-on-wlan is disabled Jonas Dreßler
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jonas Dreßler @ 2021-10-16 10:17 UTC (permalink / raw)
  To: Amitkumar Karwar, Ganapathi Bhat, Xinming Hu, Kalle Valo,
	David S. Miller, Jakub Kicinski
  Cc: Jonas Dreßler, Tsuchiya Yuto, linux-wireless, netdev,
	linux-kernel, Maximilian Luz, Andy Shevchenko, Bjorn Helgaas,
	Pali Rohár

Just a few cleanups and a fix for incorrect DELBA requests (found that while 
looking at on-air packets with wireshark) for mwifiex.

Jonas Dreßler (4):
  mwifiex: Don't log error on suspend if wake-on-wlan is disabled
  mwifiex: Log an error on command failure during key-material upload
  mwifiex: Fix an incorrect comment
  mwifiex: Send DELBA requests according to spec

 drivers/net/wireless/marvell/mwifiex/11n.c      |  7 ++++---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 12 +++++++++---
 2 files changed, 13 insertions(+), 6 deletions(-)

-- 
2.31.1


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

* [PATCH 1/4] mwifiex: Don't log error on suspend if wake-on-wlan is disabled
  2021-10-16 10:17 [PATCH 0/4] A few cleanups and a fix for mwifiex Jonas Dreßler
@ 2021-10-16 10:17 ` Jonas Dreßler
  2021-10-16 10:17 ` [PATCH 2/4] mwifiex: Log an error on command failure during key-material upload Jonas Dreßler
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jonas Dreßler @ 2021-10-16 10:17 UTC (permalink / raw)
  To: Amitkumar Karwar, Ganapathi Bhat, Xinming Hu, Kalle Valo,
	David S. Miller, Jakub Kicinski
  Cc: Jonas Dreßler, Tsuchiya Yuto, linux-wireless, netdev,
	linux-kernel, Maximilian Luz, Andy Shevchenko, Bjorn Helgaas,
	Pali Rohár

It's not an error if someone chooses to put their computer to sleep, not
wanting it to wake up because the person next door has just discovered
what a magic packet is. So change the loglevel of this annoying message
from ERROR to INFO.

Signed-off-by: Jonas Dreßler <verdre@v0yd.nl>
---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index ef697572a293..987558c4fc79 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -3492,7 +3492,7 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy,
 	}
 
 	if (!wowlan) {
-		mwifiex_dbg(adapter, ERROR,
+		mwifiex_dbg(adapter, INFO,
 			    "None of the WOWLAN triggers enabled\n");
 		ret = 0;
 		goto done;
-- 
2.31.1


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

* [PATCH 2/4] mwifiex: Log an error on command failure during key-material upload
  2021-10-16 10:17 [PATCH 0/4] A few cleanups and a fix for mwifiex Jonas Dreßler
  2021-10-16 10:17 ` [PATCH 1/4] mwifiex: Don't log error on suspend if wake-on-wlan is disabled Jonas Dreßler
@ 2021-10-16 10:17 ` Jonas Dreßler
  2021-10-16 10:17 ` [PATCH 3/4] mwifiex: Fix an incorrect comment Jonas Dreßler
  2021-10-16 10:17 ` [PATCH 4/4] mwifiex: Send DELBA requests according to spec Jonas Dreßler
  3 siblings, 0 replies; 5+ messages in thread
From: Jonas Dreßler @ 2021-10-16 10:17 UTC (permalink / raw)
  To: Amitkumar Karwar, Ganapathi Bhat, Xinming Hu, Kalle Valo,
	David S. Miller, Jakub Kicinski
  Cc: Jonas Dreßler, Tsuchiya Yuto, linux-wireless, netdev,
	linux-kernel, Maximilian Luz, Andy Shevchenko, Bjorn Helgaas,
	Pali Rohár

Sometimes the KEY_MATERIAL command can fail with the 88W8897 firmware
(when this happens exactly seems pretty random). This appears to prevent
the access point from starting, so it seems like a good idea to log an
error in that case.

Signed-off-by: Jonas Dreßler <verdre@v0yd.nl>
---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 987558c4fc79..6f23ec34e2e2 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -519,8 +519,14 @@ mwifiex_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
 	encrypt_key.is_igtk_def_key = true;
 	eth_broadcast_addr(encrypt_key.mac_addr);
 
-	return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_KEY_MATERIAL,
-				HostCmd_ACT_GEN_SET, true, &encrypt_key, true);
+	if (mwifiex_send_cmd(priv, HostCmd_CMD_802_11_KEY_MATERIAL,
+			     HostCmd_ACT_GEN_SET, true, &encrypt_key, true)) {
+		mwifiex_dbg(priv->adapter, ERROR,
+			    "Sending KEY_MATERIAL command failed\n");
+		return -1;
+	}
+
+	return 0;
 }
 
 /*
-- 
2.31.1


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

* [PATCH 3/4] mwifiex: Fix an incorrect comment
  2021-10-16 10:17 [PATCH 0/4] A few cleanups and a fix for mwifiex Jonas Dreßler
  2021-10-16 10:17 ` [PATCH 1/4] mwifiex: Don't log error on suspend if wake-on-wlan is disabled Jonas Dreßler
  2021-10-16 10:17 ` [PATCH 2/4] mwifiex: Log an error on command failure during key-material upload Jonas Dreßler
@ 2021-10-16 10:17 ` Jonas Dreßler
  2021-10-16 10:17 ` [PATCH 4/4] mwifiex: Send DELBA requests according to spec Jonas Dreßler
  3 siblings, 0 replies; 5+ messages in thread
From: Jonas Dreßler @ 2021-10-16 10:17 UTC (permalink / raw)
  To: Amitkumar Karwar, Ganapathi Bhat, Xinming Hu, Kalle Valo,
	David S. Miller, Jakub Kicinski
  Cc: Jonas Dreßler, Tsuchiya Yuto, linux-wireless, netdev,
	linux-kernel, Maximilian Luz, Andy Shevchenko, Bjorn Helgaas,
	Pali Rohár

We're sending DELBA requests here, not ADDBA requests.

Signed-off-by: Jonas Dreßler <verdre@v0yd.nl>
---
 drivers/net/wireless/marvell/mwifiex/11n.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/11n.c b/drivers/net/wireless/marvell/mwifiex/11n.c
index 6696bce56178..b0695432b26a 100644
--- a/drivers/net/wireless/marvell/mwifiex/11n.c
+++ b/drivers/net/wireless/marvell/mwifiex/11n.c
@@ -125,7 +125,7 @@ int mwifiex_ret_11n_delba(struct mwifiex_private *priv,
 					   tx_ba_tbl->ra);
 	} else { /*
 		  * In case of failure, recreate the deleted stream in case
-		  * we initiated the ADDBA
+		  * we initiated the DELBA
 		  */
 		if (!INITIATOR_BIT(del_ba_param_set))
 			return 0;
-- 
2.31.1


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

* [PATCH 4/4] mwifiex: Send DELBA requests according to spec
  2021-10-16 10:17 [PATCH 0/4] A few cleanups and a fix for mwifiex Jonas Dreßler
                   ` (2 preceding siblings ...)
  2021-10-16 10:17 ` [PATCH 3/4] mwifiex: Fix an incorrect comment Jonas Dreßler
@ 2021-10-16 10:17 ` Jonas Dreßler
  3 siblings, 0 replies; 5+ messages in thread
From: Jonas Dreßler @ 2021-10-16 10:17 UTC (permalink / raw)
  To: Amitkumar Karwar, Ganapathi Bhat, Xinming Hu, Kalle Valo,
	David S. Miller, Jakub Kicinski
  Cc: Jonas Dreßler, Tsuchiya Yuto, linux-wireless, netdev,
	linux-kernel, Maximilian Luz, Andy Shevchenko, Bjorn Helgaas,
	Pali Rohár

We're currently failing to set the initiator bit for DELBA requests:
While we set the bit on our del_ba_param_set bitmask, we forget to
actually copy that bitmask over to the command struct, which means we
never actually set the initiator bit.

Fix that and copy the bitmask over to the host_cmd_ds_11n_delba command
struct.

Signed-off-by: Jonas Dreßler <verdre@v0yd.nl>
---
 drivers/net/wireless/marvell/mwifiex/11n.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/11n.c b/drivers/net/wireless/marvell/mwifiex/11n.c
index b0695432b26a..9ff2058bcd7e 100644
--- a/drivers/net/wireless/marvell/mwifiex/11n.c
+++ b/drivers/net/wireless/marvell/mwifiex/11n.c
@@ -657,14 +657,15 @@ int mwifiex_send_delba(struct mwifiex_private *priv, int tid, u8 *peer_mac,
 	uint16_t del_ba_param_set;
 
 	memset(&delba, 0, sizeof(delba));
-	delba.del_ba_param_set = cpu_to_le16(tid << DELBA_TID_POS);
 
-	del_ba_param_set = le16_to_cpu(delba.del_ba_param_set);
+	del_ba_param_set = tid << DELBA_TID_POS;
+
 	if (initiator)
 		del_ba_param_set |= IEEE80211_DELBA_PARAM_INITIATOR_MASK;
 	else
 		del_ba_param_set &= ~IEEE80211_DELBA_PARAM_INITIATOR_MASK;
 
+	delba.del_ba_param_set = cpu_to_le16(del_ba_param_set);
 	memcpy(&delba.peer_mac_addr, peer_mac, ETH_ALEN);
 
 	/* We don't wait for the response of this command */
-- 
2.31.1


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

end of thread, other threads:[~2021-10-16 10:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-16 10:17 [PATCH 0/4] A few cleanups and a fix for mwifiex Jonas Dreßler
2021-10-16 10:17 ` [PATCH 1/4] mwifiex: Don't log error on suspend if wake-on-wlan is disabled Jonas Dreßler
2021-10-16 10:17 ` [PATCH 2/4] mwifiex: Log an error on command failure during key-material upload Jonas Dreßler
2021-10-16 10:17 ` [PATCH 3/4] mwifiex: Fix an incorrect comment Jonas Dreßler
2021-10-16 10:17 ` [PATCH 4/4] mwifiex: Send DELBA requests according to spec Jonas Dreßler

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).